Is there a way when I compile my C program into an EXE in UNIX to associate a version number with my EXE. I know it's possible in Windows, but have never done it in UNIX.
I suppose that involves storing your version number in a variable within your program (hard-coded), or in a separate file. Provide a function to get your version number when necessary (such as for upgrading information).
In Windows, I believe that is done through registry. Registry is basically a data file. In DOS days, many programs used .dat files to store information (such as user preferences, etc.). Many of these .dat files were actually just plain text files. However, there were problems of conflicting names. Two programs may have the same name for their data files, such as data.dat. Thus, the registry system was invented and the programs basically let Windows handles much of the data storing that the programs require.
In UNIX, I believe the programs must handle much of the data storing themselves. So you either hard-code it or store it in a separate file (much like .dat file).
How about just putting the version number in as part of the name of the program? I know you could just rename it to remove the version number, but it's better than nothing, right?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.