News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

REVISION with SE

Started by prissi, April 14, 2011, 02:10:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

prissi

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.

jamespetts

#1
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?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

prissi


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.

jamespetts

Prissi,

thank you very much. That is now implemented on the 9.x branch.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

jamespetts

This is now implemented in the master branch and released binaries for 9.6.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.