Build date / build number of a game?

Started by fernewelten, Sat 24/04/2021 16:07:03

Previous topic - Next topic

fernewelten

Hello,

is there an easy way to automatically get the build date (the date and time that F7 was hit in the Editor) into a constant that I can work with and display? Or alternatively, a build number that is automatically bumped whenever I hit F7?

I find it hard to keep the versions apart when incrementally fixing things and moving compiles around.

Keeping a global in the game and bumping it per hand doesn't quite cut it for me: When I fix things in a hurry, I tend to forget to bump the variable afterwards. So then I'm forced to talk about "the compile that is exactly 772335 bytes large". That isn't er, quite, er, professional.

eri0o

If you use a CI system to build your game you could add it as a step before building your game.

General settings allows you to manually define a date too, but as far as I can tell there's no way to read that value in game - and you still need to manually update it.

If you have a script you use for packaging you could also use that for writing a version.txt or renaming the game zip file with the version added at the end.

As far as I can tell there's not a current way to get this information from inside ags itself.

Crimson Wizard

#2
This version and release date information is a part of "Windows Game Explorer" category, and is saved into special binary chunk in game data (probably is saved to non-Windows versions too, but my memory is not clear on this).

The solution could be, for example, to remake it into more general category (or pick only certain fields) and expose in scripts as a Game struct members.

Then one could add a preference in the editor to auto-increment last version component and update release date each time a game is fully rebuilt.

fernewelten

#3
Quote from: Crimson Wizard on Sat 24/04/2021 21:00:06
This version and release date information is a part of "Windows Game Explorer" category, and is saved into special binary chunk in game data

As far as I understand, the Windows Games Explorer is a Windows Vista idea and has been removed from Windows 10 as of version 1803. So this part of the AGS is probably going to become increasingly obsolete. Even if the game coders fill the fields in, all the Windows boxes post Windows 7 lack the means to do anything with it. And Windows 7 as well as Windows Vista have dropped out of Microsoft support.

SMF spam blocked by CleanTalk