Author: sveinung
Date: Wed Aug  5 12:59:31 2015
New Revision: 29335

Development version internal savegame compatibility

The save game format usually changes many times during the development of a
new version of Freeciv. Permanently carrying support for loading every
development version save game format isn't sustainable. The support for
loading save games from previously released versions is enough.

At the same time it would be nice to be able to load that game started with
last week's development version. Not having your save games broken on every
upgrade would help motivate testers. It would also make Freeciv-web's life

I think a reasonable compromise is to have clearly marked development
version internal save game compatibility code. The compatibility code should
always be removed before a release to take care of the sustainability issue.
It may also be removed during a development version if the backwards
compatibility becomes a large burden.

The marking should be machine readable to make it easy to remove all
development version internal save game compatibility code sections at once.
It should also be possible to build a development version without any
compatibility code so save game loading error handling code can be tested.

Add the new configure option --enable-dev-save-compat. If enabled the new
symbol FREECIV_DEV_SAVE_COMPAT is defined. Development version save game
compatibility code sections can then be marked using regular macros.

See patch #6154


Modified: trunk/
--- trunk/  (original)
+++ trunk/  Wed Aug  5 12:59:31 2015
@@ -228,6 +228,20 @@
   AS_HELP_STRING([--with-appdatadir], [install appdata files to given dir]),
 [ APPDATADIR=${withval} ], [ APPDATADIR="\$(prefix)/share/appdata" ])
+dnl try to support this development version's previous save games formats
+  AS_HELP_STRING([--enable-dev-save-compat=yes/no],
+                 [enable development version save game compatibility]),
+  [case "${enableval}" in
+    yes) dev_save_compat=1 ;;
+    no) dev_save_compat=0 ;;
+    *) AC_MSG_ERROR([bad value ${enableval} for --enable-dev-save-compat]) ;;
+  esac],
+  [dev_save_compat=$IS_DEVEL_VERSION])
+AS_IF([test $dev_save_compat != 0],
+                 [Development version save game compatibility])])
 dnl set default values

Freeciv-commits mailing list

Reply via email to