@@ -79,8 +79,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
79
79
#include " guiEngine.h"
80
80
#include " mapsector.h"
81
81
82
- #ifdef USE_LEVELDB
83
82
#include " database-sqlite3.h"
83
+ #ifdef USE_LEVELDB
84
84
#include " database-leveldb.h"
85
85
#endif
86
86
@@ -795,10 +795,8 @@ int main(int argc, char *argv[])
795
795
_ (" Set logfile path ('' = no logging)" ))));
796
796
allowed_options.insert (std::make_pair (" gameid" , ValueSpec (VALUETYPE_STRING,
797
797
_ (" Set gameid (\" --gameid list\" prints available ones)" ))));
798
- #if USE_LEVELDB
799
798
allowed_options.insert (std::make_pair (" migrate" , ValueSpec (VALUETYPE_STRING,
800
799
_ (" Migrate from current map backend to another (Only works when using minetestserver or with --server)" ))));
801
- #endif
802
800
#ifndef SERVER
803
801
allowed_options.insert (std::make_pair (" videomodes" , ValueSpec (VALUETYPE_FLAG,
804
802
_ (" Show available video modes" ))));
@@ -1219,7 +1217,6 @@ int main(int argc, char *argv[])
1219
1217
// Create server
1220
1218
Server server (world_path, gamespec, false );
1221
1219
1222
- #if USE_LEVELDB
1223
1220
// Database migration
1224
1221
if (cmd_args.exists (" migrate" )) {
1225
1222
std::string migrate_to = cmd_args.get (" migrate" );
@@ -1242,8 +1239,10 @@ int main(int argc, char *argv[])
1242
1239
}
1243
1240
if (migrate_to == " sqlite3" )
1244
1241
new_db = new Database_SQLite3 (&(ServerMap&)server.getMap (), world_path);
1242
+ #if USE_LEVELDB
1245
1243
else if (migrate_to == " leveldb" )
1246
1244
new_db = new Database_LevelDB (&(ServerMap&)server.getMap (), world_path);
1245
+ #endif
1247
1246
else {
1248
1247
errorstream << " Migration to " << migrate_to << " is not supported" << std::endl;
1249
1248
return 1 ;
@@ -1275,7 +1274,6 @@ int main(int argc, char *argv[])
1275
1274
1276
1275
return 0 ;
1277
1276
}
1278
- #endif
1279
1277
1280
1278
server.start (port);
1281
1279
0 commit comments