]> git.openstreetmap.org Git - nominatim.git/blobdiff - cmake/script.tmpl
Merge pull request #2147 from lonvia/tests-for-python-code
[nominatim.git] / cmake / script.tmpl
index 8146ca8b5880b2376d996bbfffe6b9e166617d60..aa25a1248418d064916454880eff55f94a71adf5 100755 (executable)
@@ -1,4 +1,13 @@
 #!@PHP_BIN@ -Cq
 <?php
-require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
-require_once(CONST_BasePath.'/@script_source@');
+require('@CMAKE_SOURCE_DIR@/lib/dotenv_loader.php');
+
+@define('CONST_Default_ModulePath', '@CMAKE_BINARY_DIR@/module');
+@define('CONST_Default_Osm2pgsql', '@CMAKE_BINARY_DIR@/osm2pgsql/osm2pgsql');
+@define('CONST_BinDir', '@CMAKE_SOURCE_DIR@/utils');
+@define('CONST_DataDir', '@CMAKE_SOURCE_DIR@');
+
+loadDotEnv();
+$_SERVER['NOMINATIM_NOMINATIM_TOOL'] = '@CMAKE_BINARY_DIR@/nominatim';
+
+require_once('@CMAKE_SOURCE_DIR@/lib/admin/@script_source@');