UFO:Alien Invasion

Technical support => Feature Requests => Topic started by: Another Guy on June 27, 2009, 12:05:42 pm

Title: UFO.exe version
Post by: Another Guy on June 27, 2009, 12:05:42 pm
I propose a new .txt file in the trunk (Version.txt) cointaining the actual revision number of each revision. The format should be %version%.R%revision%. (eg: 2.3.R24882), and should be updated every revision. With a minor changes in UFO.exe C::B project to link to this file content, this could result that every compilation shows the actual revision version on the UFO.exe file (on file details).
Nice touch uh? Also easier to keep track of revisions for everyone from the game main executable.
Title: Re: UFO.exe version
Post by: BTAxis on June 27, 2009, 12:17:59 pm
This has been suggested in one way or another countless times. It's not possible to do.
Title: Re: UFO.exe version
Post by: Another Guy on June 27, 2009, 12:24:57 pm
A pity... Well, thx anyway for the fast answer.
Title: Re: UFO.exe version
Post by: ralthor on June 28, 2009, 04:59:06 am
well wait it would suck to have to keep track of a file and change that with every update (I don't know of something that can do that automically) and am assuming that is the problem, but the current svn version is stored in the .svn\entries file, couldn't this file be parsed and have the revision number grabbed from there (not sure how to do this off the top of my head at compile time with C::B, but certainly at run time...)  A batch script could just copy the entries file to a directory that would be available during installation.  (sorry if this is a rehash tried searching to see what the other suggestions had be but wasn't pulling anything up).
Title: Re: UFO.exe version
Post by: bayo on June 28, 2009, 09:44:04 am
after an update, man creating a package can use
Code: [Select]
svn info > svninfo.txt
The result is
Code: [Select]
Path: .
URL: https://ufoai.svn.sourceforge.net/svnroot/ufoai/ufoai/trunk
Repository Root: https://ufoai.svn.sourceforge.net/svnroot/ufoai
Repository UUID: 39b98707-f80d-0410-bc7e-c6b02f5409da
Revision: 24882
Node Kind: directory
Schedule: normal
Last Changed Author: aduke1
Last Changed Rev: 24882
Last Changed Date: 2009-06-27 00:27:17 +0200 (sam., 27 juin 2009)
Title: Re: UFO.exe version
Post by: Another Guy on June 28, 2009, 04:07:00 pm
I haven't realized it was already there on .svn/entries. Thx ralthor.
It seems to store the info bayo said about there too.
C::B seems to add some file info already on ufo.exe (like product name, copyright and language) and sets file version to 0.0.0.0. so I think C::B might handle setting UFO.exe file version from .svn/entries file content (although I'm still trying to figure how to do it...).
Title: Re: UFO.exe version
Post by: geever on June 28, 2009, 05:19:28 pm
svn revision can be different for 2 different files in the working copy which one would you choose (and why that)?
The latest? You should check all files' revison info for that.

-geever
Title: Re: UFO.exe version
Post by: Another Guy on June 28, 2009, 07:16:22 pm
I'd go for root .svn "entries" file as stand. Seems a natural default option, but it's just me (Regarding the use of files for versioning UFO.exe, "entries" files seems to be updated by tortoisesvn on all (.svn) dirs).
Title: Re: UFO.exe version
Post by: odie on June 28, 2009, 08:11:28 pm
I'd go for root .svn "entries" file as stand. Seems a natural default option, but it's just me (Regarding the use of files for versioning UFO.exe, "entries" files seems to be updated by tortoisesvn on all (.svn) dirs).

Well, if u r already using TSVN, like i do, then u can simply see the subversion of the files.

Otherwise, i thnk somewhere in the updates, the SVN version is already somewhere in the game. :D
Title: Re: UFO.exe version
Post by: Another Guy on June 28, 2009, 08:18:25 pm
Well, if u r already using TSVN, like i do, then u can simply see the subversion of the files.

Otherwise, i thnk somewhere in the updates, the SVN version is already somewhere in the game. :D
It isn't, but it's not the point. It just makes the game look a lot better to have proper file version marking. And will help ppl tell revision version from .exe from installers for forum pourpouses.
Title: Re: UFO.exe version
Post by: odie on June 28, 2009, 08:33:28 pm
It isn't, but it's not the point. It just makes the game look a lot better to have proper file version marking. And will help ppl tell revision version from .exe from installers for forum pourpouses.

Well, at this point, the 'revisioning' i guess its more for us who are compiling dev-versions.... and usually its marked on the installers (like mine) or in SVN. I understand your proposal for the ufo.exe file to be well, defined with an addition version nos. :D

Maybe can change the NSIS script to accom tat if u wan. Simply rename the ufo.exe to ufo-Rxxxxx.exe and change the nSIS script's ufo.exe entry to ufo-Rxxxxx.exe, and u get wat u wan. Lol. Okie, its 2.33am and i am getting a bit cranky, and u do reply fast. Tml onwards! :D
Title: Re: UFO.exe version
Post by: ralthor on July 29, 2009, 01:46:20 am
Ran across this while doing some work:

http://blog.taragana.com/index.php/archive/how-to-add-revision-number-id-automatically-to-subversion-files-in-two-simple-steps/

Turns out you should be able to easily add the revision number in there with a little setup.  Haven't tested it or anything.
Title: Re: UFO.exe version
Post by: Borsti67 on July 29, 2009, 07:15:09 am
Quite interesting, but I'm not sure if project admins are allowed to change SVN parameters at SF?
If they can, this would be a great improvement (the ID could be printed into the logs, e.g.)...!
Title: Re: UFO.exe version
Post by: Mattn on July 29, 2009, 03:27:52 pm
once we have converted c::b (windows) to use configure, too - we can also integrate svn-version. That would tell you the revision the binaries were compiled with (but of course not if only a few ufo script files changed (but still better than nothing imo)
Title: Re: UFO.exe version
Post by: odie on July 29, 2009, 06:12:10 pm
once we have converted c::b (windows) to use configure, too - we can also integrate svn-version. That would tell you the revision the binaries were compiled with (but of course not if only a few ufo script files changed (but still better than nothing imo)

Yayness!
I guess i will wait until then for the whole CB package to be revised then. :D

Btw mattn, would u pls enlighten me on the other issue on my new CB package compilation issues pls? Ur current CB package i have downloaded does not seemed to be able to compile due to some po related issues. :D Thanks!
Title: Re: UFO.exe version
Post by: Mattn on July 29, 2009, 06:16:03 pm
they are not important right now - only radiant po files are affected. but this error should be fixed in the updated version of the package
Title: Re: UFO.exe version
Post by: odie on July 29, 2009, 06:28:20 pm
they are not important right now - only radiant po files are affected. but this error should be fixed in the updated version of the package

Hi Mattn,

Thanks for quick reply.

When u mentioned an updated version of the 'package', does the package refers to the another new CB upcoming zip?

Or .... ?
The CB i have downloaded was very recent, as of 27th July (2 days ago). From your webbie. :D
Title: Re: UFO.exe version
Post by: Borsti67 on July 30, 2009, 12:53:40 pm
once we have converted c::b (windows) to use configure, too - we can also integrate svn-version.
Why is this related?
If I understand the article correctly, the substitution is done by the svn-server.
This means you'd have to insert the keyword "$ID$" into the output-sourcecode of (at least) one file. It should be the one which writes the log messages and preferrably that for the loading screen. Then the "svn propset ..."-command has to be issued for the file(s) - here it is unclear to me, if more than one is supported.
That's all, or did I miss something?
Title: Re: UFO.exe version
Post by: Mattn on July 30, 2009, 03:38:39 pm
yes - $ID$ will only print the revision of that one file - not the whole repository.
Title: Re: UFO.exe version
Post by: Borsti67 on July 31, 2009, 03:38:39 pm
damn. :(
Title: Re: UFO.exe version
Post by: Duke on July 31, 2009, 11:01:55 pm
Piping 'svn info' to some file and including it in the packages - like bayo suggested - would be a good start imho:
easy to do and immediately available.