#!@PHP_BIN@ -Cq
<?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_LibDir', '@CMAKE_SOURCE_DIR@/lib');
@define('CONST_DataDir', '@CMAKE_SOURCE_DIR@');
$this->iCacheMemory = getCacheMemoryMB();
}
- $this->sModulePath = getSetting('DATABASE_MODULE_PATH', CONST_InstallDir.'/module');
+ $this->sModulePath = getSetting('DATABASE_MODULE_PATH', CONST_Default_ModulePath);
info('module path: ' . $this->sModulePath);
// parse database string
fwriteConstDef($rFile, 'LibDir', CONST_LibDir);
fwriteConstDef($rFile, 'DataDir', CONST_DataDir);
fwriteConstDef($rFile, 'InstallDir', CONST_InstallDir);
-
- fwrite($rFile, "if (file_exists(getenv('NOMINATIM_SETTINGS'))) require_once(getenv('NOMINATIM_SETTINGS'));\n\n");
-
fwriteConstDef($rFile, 'Database_DSN', getSetting('DATABASE_DSN'));
fwriteConstDef($rFile, 'Default_Language', getSetting('DEFAULT_LANGUAGE'));
fwriteConstDef($rFile, 'Log_DB', getSettingBool('LOG_DB'));
function getOsm2pgsqlBinary()
{
- $sBinary = getSetting('OSM2PGSQL_BINARY');
- if (!$sBinary) {
- $sBinary = CONST_InstallDir.'/osm2pgsql/osm2pgsql';
- }
-
- return $sBinary;
+ return getSetting('OSM2PGSQL_BINARY', CONST_Default_Osm2pgsql);
}
function getImportStyle()