--- /dev/null
+#ifndef FG_NO_VERSION_H
+#define FG_NO_VERSION_H
+
+// version.h is generated by the build system for official builds of
+// FlightGear. To avoid complicating the life of regular developers,
+// especially on Windows, we set HAVE_VERSION_H if version.h is generated.
+// If that define is not set, we include this file instead, which provides
+// placeholder values instead.
+
+#define FLIGHTGEAR_VERSION "development " __DATE__
+
+#define HUDSON_BUILD_NUMBER 0
+#define HUDSON_BUILD_ID "none"
+#define REVISION "unknown"
+
+#endif
\ No newline at end of file
#define FLIGHTGEAR_VERSION "@VERSION@"
-#define HUDSON_BUILD_NUMBER "@HUDSON_BUILD_NUMBER@"
+#define HUDSON_BUILD_NUMBER @HUDSON_BUILD_NUMBER@
#define HUDSON_BUILD_ID "@HUDSON_BUILD_ID@"
#define REVISION "@REVISION@"
#include <Airports/runways.hxx>
#include <Airports/simple.hxx>
-#ifndef _MSC_VER
+
+#ifdef HAVE_VERSION_H
# include <Include/version.h>
+#else
+# include <Include/no_version.h>
#endif
+
#include <Main/fg_props.hxx>
#include <Main/globals.hxx>
#include "instrument_mgr.hxx"
using std::cerr;
using std::endl;
-#ifndef VERSION
-#define VERSION "CVS "__DATE__
+#ifdef HAVE_VERSION_H
+# include <Include/version.h>
+#else
+# include <Include/no_version.h>
#endif
#define NEW_DEFAULT_MODEL_HZ 120
fgSetString("/sim/multiplay/txhost", "0");
fgSetInt("/sim/multiplay/rxport", 0);
fgSetInt("/sim/multiplay/txport", 0);
+
+ fgSetString("/sim/version/flightgear", FLIGHTGEAR_VERSION);
+ //fgSetString("/sim/version/simgear", FLIGHTGEAR_VERSION);
+ fgSetString("/sim/version/revision", REVISION);
+ fgSetInt("/sim/version/build-number", HUDSON_BUILD_NUMBER);
+ fgSetString("/sim/version/build-id", HUDSON_BUILD_ID);
}
static bool
static int
fgOptVersion( const char *arg )
{
- cerr << "FlightGear version: " << VERSION << endl;
+ cerr << "FlightGear version: " << FLIGHTGEAR_VERSION << endl;
+ cerr << "Revision: " << REVISION << endl;
+ cerr << "Build-Id: " << HUDSON_BUILD_ID << endl;
cerr << "FG_ROOT=" << globals->get_fg_root() << endl;
cerr << "FG_HOME=" << fgGetString("/sim/fg-home") << endl;
cerr << "FG_SCENERY=";