Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Iss Mneur on January 11, 2010, 04:47:34 pm

Title: flags.lch addition and fixes
Post by: Iss Mneur on January 11, 2010, 04:47:34 pm
Because there is no way of getting the version number of a FSO binary (in a cross platform way, the linux builds accept -help and output the version as text). I thought I would extend the flags.lch file to include this information, this way the version information is provided in a binary format for the launchers to read.

This version information is appended to the end of the file so it should not affect the windows launcher, because the windows launcher (at least currently) is well behaved and only reads the to the build_caps byte in the file, the extra data on the end of the file is ignored by the current windows launcher.  Any other launcher that uses the flags.lch should behave the same way because of the format of the file.

This patch adds a build capability (1<<2) so that any launcher that supports this added functionality will know that this information exists and its format.  I do realize that (at least currently), FS_VERSION_REVIS is not updated automatically during a build (and as such will not always be correct), but major, minor, and build are still useful to a launcher for other purposes.

In working on the above update I have also noticed that the code that outputs the flags.lch (as does the current windows launcher) assumes that int will always 32 bits.

buildcap_version.patch is done assuming that make_flags.lch_safer.patch was applied before.

Both patches have been tested with the current windows launcher. Both patches also compile on linux, unfortunately I do not have a linux machine that can run FSO.


[attachment deleted by admin]