The International Simutrans Forum

Development => Bug Reports => Topic started by: River on October 26, 2016, 09:07:12 AM

Title: Version not working in nightlybuilds
Post by: River on October 26, 2016, 09:07:12 AM
Hi,

People on my server have been complaining that there is no build version. Can this be fixed in the nightly builds?

River
Title: Re: Version not working in nightlybuilds
Post by: DrSuperGood on October 26, 2016, 02:59:00 PM
If the nightly build server is using Makefile then the following applies.


ifneq ($(WITH_REVISION),)
  ifeq ($(shell expr $(WITH_REVISION) \>= 1), 1)
    ifeq ($(shell expr $(WITH_REVISION) \>= 2), 1)
      REV = $(WITH_REVISION)
    else
      REV = $(shell svnversion)
    endif
    ifneq ($(REV),)
      CFLAGS  += -DREVISION="$(REV)"
    endif
  endif
endif

REV is meant to be sources from shell svnversion.
Title: Re: Version not working in nightlybuilds
Post by: Ters on October 26, 2016, 03:20:12 PM
I just downloaded the latest Windows nightly, and it had the string r7923 embedded in the executable, suggesting that the code DrSuperGood posted (or some alternative) is run. I didn't try running the nightly, though, since I didn't want to mess up my current installation, so it may be that this isn't shown in the caption bar anymore for all I know.

The revision number is however not shown when looking at the file details in Explorer. Does anyone look there at all?
Title: Re: Version not working in nightlybuilds
Post by: DrSuperGood on October 26, 2016, 03:37:13 PM
Quote
I just downloaded the latest Windows nightly, and it had the string r7923 embedded in the executable, suggesting that the code DrSuperGood posted (or some alternative) is run. I didn't try running the nightly, though, since I didn't want to mess up my current installation, so it may be that this isn't shown in the caption bar anymore for all I know.

The revision number is however not shown when looking at the file details in Explorer. Does anyone look there at all?
The problem is that if one runs a server using the nightly build then it shows up as revision "0", in other words no revision number. This makes it possible to join with any nightly version that uses the same pakset version (pakset hashes will still stop one from joining). This is a problem that is not unique to River, as I have noticed several such servers since the move to the new build server.