Opened 11 years ago

Closed 10 years ago

#2118 closed enhancement (wontfix)

Gather version informations into the config files

Reported by: Itms Owned by:
Priority: Should Have Milestone:
Component: Core engine Keywords:
Cc: leper Patch:

Description (last modified by Itms)

The version informations (number and name) are written in the GUI but it would be more convenient gathering it in the code, or in the config files. That makes more simple fixing the splashscreen defect described here : #2116

I've written such a system and modified accordingly the concerned parts of the GUI.

Attachments (2)

patch_versiondata.diff (6.0 KB ) - added by Itms 11 years ago.
patch_versiondata.2.diff (4.2 KB ) - added by Itms 11 years ago.

Download all attachments as: .zip

Change History (16)

by Itms, 11 years ago

Attachment: patch_versiondata.diff added

comment:1 by historic_bruno, 11 years ago

The disadvantage of this is that it will require rebuilding the game to change the version information, instead of editing two data files. Perhaps that data could be stored in a config file instead?

comment:2 by Itms, 11 years ago

I don't agree since version information in something developers update when they modifiy the source code. The config files should, IMO, contain data the user can modify (in the future thanks to the 'options' item in the main menu).

The version core information should remain at the heart of the executable file, to be manipulated easily (for example to decide whether to display the splashscreen, but in the future other needs could appear).

Nonetheless, general information such as changelog, or "This is an early version of the game, etc.etc." should definitely be placed in another file (I don't want to change that !).

Last edited 11 years ago by Itms (previous) (diff)

comment:3 by historic_bruno, 11 years ago

Of course developers can rebuild the engine, but part of the design of the engine is to be easily moddable. If we hardcode 0 A.D. version info in the engine, modding requires recompiling the engine - and distributing the new binaries. This is why I say it would be convenient if it was in config (eventually mods can have a mod.cfg file to override default.cfg, this could be useful for lots of things, like data paths).

Config data is as much for flexibility and convenience of developers and modders as it is for players, we simply won't show every config option in-game.

Last edited 11 years ago by historic_bruno (previous) (diff)

comment:4 by fabio, 11 years ago

What about just checking and keeping the date of the news file?

comment:5 by Itms, 11 years ago

Okay, I hadn't thought about the modding-point of view. I hadn't either fully understood the behaviour of the default.cfg file when installing a new version of the game.

I update my previous patch and the ticket description, could you review it and make your point before I modify my patch on #2116 accordingly ?

@fabio : I'm not sure what you meant : the aim of this patch is creating a place where to gather informations which shall be used again in the future development. It permits amongst other things fixing the splashcreen defect.

Last edited 11 years ago by Itms (previous) (diff)

by Itms, 11 years ago

Attachment: patch_versiondata.2.diff added

comment:6 by Itms, 11 years ago

Description: modified (diff)
Summary: [PATCH] Gather version informations into the code[PATCH] Gather version informations into the config files

comment:7 by leper, 11 years ago

The setting names should be version.whatever IMO (makes grouping them easier).

I'm going to add some functions to ScriptFunctions.cpp to keep us from adding 3 more of those to it (there are already some), apart from that the patch is looking good IMO.

I'll make some fixes and commit it.

Last edited 11 years ago by leper (previous) (diff)

comment:8 by Itms, 11 years ago

Ok, I'll be waiting for the new revision to submit my new patch on #2116.

comment:9 by leper, 11 years ago

Sorry for taking so long with this, but the modification to #2116 shouldn't use the version number at all, just use a number which we can increment even between alpha releases if we want to do so.

comment:10 by Itms, 11 years ago

See my answer on #2116.

No more link between the two tickets.

comment:11 by historic_bruno, 10 years ago

Cc: leper added
Keywords: review removed

Sorry, forgot to bump this ticket with a relevant discussion: http://irclogs.wildfiregames.com/2013-09-10-QuakeNet-%230ad-dev.log

Particularly:

21:40 < Philip`> leper: historicbruno: Why would you ever want to treat a version number as a number?
21:40 < Philip`> They're not numbers, they're opaque strings
21:41 < Philip`> e.g. "0.1.0-rc1" is certainly not a number

which is a great point, our versions aren't really numbers at all, and treating them as such would be too limiting and not very useful.

I think unifying the version info in a config file may still be worthwhile, but it will have to be done per-mod, rather than in default config. As leper has worked on this, I will CC him to take a look at this when he has time.

comment:12 by leper, 10 years ago

Milestone: Alpha 15Alpha 16

comment:13 by leper, 10 years ago

Note to self: Update ReleaseProcess when fixing this.

comment:14 by Itms, 10 years ago

Keywords: patch removed
Milestone: Alpha 16
Resolution: wontfix
Status: newclosed
Summary: [PATCH] Gather version informations into the config filesGather version informations into the config files

I designed another patch another way (#2487), thus I'm closing this one as wontfix. My approach here was not the good one.

Note: See TracTickets for help on using tickets.