The International Simutrans Forum

Simutrans Extended => Simutrans-Extended bug reports => Simutrans-Extended development => Simutrans-Extended closed bug reports => Topic started by: prissi on April 14, 2011, 02:10:58 PM

Title: REVISION with SE
Post by: prissi on April 14, 2011, 02:10:58 PM
First, please change simsys_w16.cc to
const wchar_t* const title =
#ifdef _MSC_VER
#define TOW_(x) L#x
#define TOW(x) TOW_(x)
L"Simutrans " WIDE_VERSION_NUMBER EXPERIMENTAL_VERSION
#ifdef REVISION
L" - r" TOW(REVISION)
#endif
#else
L"" SAVEGAME_PREFIX " " VERSION_NUMBER NARROW_EXPERIMENTAL_VERSION " - " VERSION_DATE
#ifdef REVISION
" - r" QUOTEME(REVISION)
#endif
#endif
;

or it won't compile at all with REVISION defined. But the makefile need change too for taking the number from git rather than the SVN revision.
Title: Re: REVISION with SE
Post by: jamespetts on April 14, 2011, 09:31:21 PM
Prissi,

thank you for tracking that down: I have made the change as you requested (Edit: in the 9.x branch). I'm not sure how to go about changing the makefile to set the revision from Git, however - do you have any suggestions as to where I can read about how to do that?
Title: Re: REVISION with SE
Post by: prissi on April 14, 2011, 10:24:13 PM

ifneq ($(WITH_REVISION),)
  REV = $(shell git log|head -1|tail -c +8|cksum| awk '{print $1}')
  ifneq ($(REV),)
    CFLAGS  += -DREVISION="$(REV)"
  endif
endif


If you replace current code in Makefile for WITH_REVISION with this one, it will use the checksum of the very long git revision as "revision" which checks that both client and server run the same version.
Title: Re: REVISION with SE
Post by: jamespetts on April 14, 2011, 10:27:19 PM
Prissi,

thank you very much. That is now implemented on the 9.x branch.
Title: Re: REVISION with SE
Post by: jamespetts on May 28, 2011, 04:45:37 PM
This is now implemented in the master branch and released binaries for 9.6.