The help.h file is generated by premake in the source/ directory, but shouldn’t get committed there.
Run pyrogenesis -help, pyrogenesis --help and check that they print the help.
Run pyrogenesis and check that it doesn’t.
Unit Tests Skipped
Writing C++ code in premake sounds problematic, why not load the file in C++ directly? It seems like it'd be there even in the released version. On the other hand also seems unexpected that C++ code depends on a readme file?
Notice that we have a copy of this readme fle in Gamesetup.cpp L1196 already, it was proposed to remove the duplication before.
Perhaps one could have a Readme.cpp with the string and perhaps that could be written to the readme.txt file on demand (whenever soeone updates the file) and shown when the --help command is ran?
Then again that sounds like homecrafted version for a problem that has been solved in more general ways already.
Wouldn't a Manpage be more conventional? Don't linux distributions provide them already?
Then one only needs to type man 0ad and it should show up, without changing any code.
I think this is okay. While a build-time copy isn't perfect, having a binaries' help text rely on an external file seems equivalently undesirable. A help text should always work in my opinion.
I just request that you also try to have Gamesetup.cpp use this API. I'd say it's up to you on if you want to swap things around such that the cpp file is the master copy which is copied to the system dir at build-time. Maybe not since text blocks in cpp files are harder to edit?