Eddi wrote:the check for 1.9 vs. 1.10 still works
wallyweb wrote:@Andrew350 - Do you need to test for changes to master, or will a simple "stable/not stable" test satisfy what you need?
Hmm, yeah I found a semi-acceptable solution by throwing an error for OpenTTD < 1.9.9. It doesn't check the exact version but at least it won't load in stable this way. At least as long as there aren't 10 bug fix releases anyway
But while I've been playing around with the version checking to see if I can get something that works, I've found that the results seem inconsistent to what I'm expecting.
Maybe I'm doing something wrong or expecting the wrong results? I set up a test grf with an error check like so:
Code: Select all
if (openttd_version <= version_openttd(1, 9, 1)) {
error(FATAL, REQUIRES_OPENTTD, string(STR_MIN_OPENTTD_VERSION));
For reference, I tried the following with these results:
openttd_version <= version_openttd(1, 9, 1)
=> grf loads in 1.9.1
openttd_version == version_openttd(1, 9, 1)
=> grf loads in 1.9.1
openttd_version > version_openttd(1, 9, 1)
=> grf fails in 1.9.1 and master
openttd_version < version_openttd(1, 10, 0)
=> grf fails in 1.9.1 and master
openttd_version < version_openttd(1, 9, 2)
=> grf fails in 1.9.1 and loads in master
openttd_version > version_openttd(1, 9, 2)
=> grf loads in 1.9.1 and fails in master
The first three seem wrong to me, but want to rule out my own ignorance first before filing a bug. Maybe someone can verify this? And sorry for going off topic.
wallyweb wrote:I'll make an assumption here. NRT has been merged into master. Once it has passed muster and the merge is found to be stable, OTTD stable will move to 1.10 and master to 1.11.
The tentative plan appears to be aiming for an October release, but that's of course subject to change