10 #include <boost/version.hpp>
11 #if BOOST_VERSION != 102800
12 #include <boost/python/object.hpp>
14 #include <boost/python/objects.hpp>
17 static FILE *
withAndWithout( std::string filename, std::string time_of_day_hint )
27 static FILE *
getFullFile( std::string filename, std::string time_of_day_hint, std::string
faction )
29 FILE *fp =
withAndWithout( filename+
"_"+faction, time_of_day_hint );
37 std::string full_filename = string(
"bases/" )+filename;
38 std::string daynight_filename = full_filename+
"_"+string( time_of_day_hint );
41 std::string newfile = daynight_filename;
42 cout<<
"BaseInterface::LoadXML "<<full_filename<<endl;
45 newfile = full_filename;
52 daynight_filename = string(
"bases/planet_" )+time_of_day_hint+string(
BASE_EXTENSION );
54 newfile = daynight_filename;
60 daynight_filename = string(
"bases/unit_" )+time_of_day_hint+string(
BASE_EXTENSION );
62 newfile = daynight_filename;
73 FILE *inFile =
getFullFile(
string(
"bases/" )+filename, time_of_day_hint, faction );
79 string basestring(
"bases/unit" );
81 basestring =
"bases/planet";
82 inFile =
getFullFile( basestring, time_of_day_hint, faction );
88 string compilefile = string( filename )+time_of_day_hint+string( faction )+
BASE_EXTENSION;
89 Python::reseterrors();
90 PyRun_SimpleFile( inFile, compilefile.c_str() );
91 Python::reseterrors();