Git Product home page Git Product logo

Comments (6)

Meakk avatar Meakk commented on September 27, 2024

FYI @snoyer
The suggested solution looks good to me, wdyt?

from f3d.

snoyer avatar snoyer commented on September 27, 2024

If I remember correctly F3D::AppName is F3D (all caps) and at the time the choices for the "f3d" instances in the help text were:

  1. leave them hardcoded in the strings
  2. introduce a new global variable containing lowercase f3d
  3. just use the existing ExecutableName

I went with the last one assuming in nominal use the app would be aliased to simply f3d and that's what users would see when calling f3d -h

I guess now the options are:

  1. leave have them hardcoded in the strings again
  2. introduce a new global variable containing lowercase f3d
  3. just use the existing ExecutableName with some std::fs::path stuff to keep only the name part
  4. fudge it from cmake. ExecutableName is basically argv[0] not the actual absolute path of the executable, so changing the working directory or doing something like exec -a could work

from f3d.

mwestphal avatar mwestphal commented on September 27, 2024

Indeed, this is incorrect.

have them hardcoded in the strings again
F3D::ExecutableName

This is the simplest way to go. Its not like we are going to change the executable name at any point.

Want to take care of it @snoyer ?

This is funny though:

$ ../../f3d/build/bin/f3d --help
F3D - A fast and minimalist 3D viewer
Usage:
  ../../f3d/build/bin/f3d [OPTIONS...] file1 file2 ...

from f3d.

snoyer avatar snoyer commented on September 27, 2024

This is funny though:

$ ../../f3d/build/bin/f3d --help
F3D - A fast and minimalist 3D viewer
Usage:
  ../../f3d/build/bin/f3d [OPTIONS...] file1 file2 ...

The real funny part is, from help2man's manual:

Use argv[0] for the program name in these synopses, just as it is, with no directory stripping. This is in contrast to the canonical (constant) name of the program which is used in --version.

If I read it correctly it means we're doing it right actually?

I was hoping for help2man to have an argument to override argv[0] but I can't see one :(
Best I can come up with is:

echo "exec -a f3d /foo/bar/baz/bin/f3d \$*" > /tmp/f3d.sh
help2man /tmp/f3d.sh
  • pros: app uses argv[0], doesn't hardcode "f3d", manpage issue solved at manpage generation
  • cons: is dirty hack?

from f3d.

mwestphal avatar mwestphal commented on September 27, 2024

I dont think GNU ever considered reproducible build in that doc.

I'd rather not use a dirty hack and assume that we are not following GNU recommandation here.

inputs @mzf-guest ?

from f3d.

mwestphal avatar mwestphal commented on September 27, 2024

@snoyer so, do you want to do it ?

from f3d.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.