]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/main.cxx
Check for the proper version of the base package and exit gracefully if not
[flightgear.git] / src / Main / main.cxx
index a840e65bd8026abbed1a615018c16e14a370dba6..1122fb2e153026e38b28885ddd4556aa1bd4bc2a 100644 (file)
@@ -25,6 +25,8 @@
 #  include <config.h>
 #endif
 
+#include <simgear/compiler.h>
+
 #ifdef SG_MATH_EXCEPTION_CLASH
 #  include <math.h>
 #endif
@@ -1479,6 +1481,14 @@ int main( int argc, char **argv ) {
     // fg_root was specified (ignore all other options for now)
     fgInitFGRoot(argc, argv);
 
+    // Check for the correct base package version
+    string base_version = fgBasePackageVersion();
+    if ( !(base_version == "0.7.9") ) {
+       SG_LOG( SG_GENERAL, SG_ALERT, "Base package check failed ... "
+               << base_version);
+       exit(-1);
+    }
+
     // Initialize the Aircraft directory to "" (UIUC)
     aircraft_dir = "";