set CONST_LibDir directly from the source scripts

Now that the source scripts have been moved to \lib, they
can determine the position of the PHP library relative to
themselves.
This commit is contained in:
Sarah Hoffmann 2021-01-13 17:00:38 +01:00
parent ff5a237200
commit e467b956ff
9 changed files with 9 additions and 3 deletions

View File

@ -3,7 +3,6 @@
@define('CONST_Default_ModulePath', '@CMAKE_BINARY_DIR@/module'); @define('CONST_Default_ModulePath', '@CMAKE_BINARY_DIR@/module');
@define('CONST_Default_Osm2pgsql', '@CMAKE_BINARY_DIR@/osm2pgsql/osm2pgsql'); @define('CONST_Default_Osm2pgsql', '@CMAKE_BINARY_DIR@/osm2pgsql/osm2pgsql');
@define('CONST_BinDir', '@CMAKE_SOURCE_DIR@/utils'); @define('CONST_BinDir', '@CMAKE_SOURCE_DIR@/utils');
@define('CONST_LibDir', '@CMAKE_SOURCE_DIR@/lib');
@define('CONST_DataDir', '@CMAKE_SOURCE_DIR@'); @define('CONST_DataDir', '@CMAKE_SOURCE_DIR@');
require_once(CONST_LibDir.'/admin/@script_source@'); require_once('@CMAKE_SOURCE_DIR@/lib/admin/@script_source@');

View File

@ -1,4 +1,5 @@
<?php <?php
@define('CONST_LibDir', dirname(dirname(__FILE__)));
require_once(CONST_LibDir.'/init-cmd.php'); require_once(CONST_LibDir.'/init-cmd.php');
@ -18,7 +19,6 @@ $print_fail = function ($message = 'Failed') use ($term_colors) {
echo $term_colors['red'].$message.$term_colors['normal']."\n"; echo $term_colors['red'].$message.$term_colors['normal']."\n";
}; };
$oDB = new Nominatim\DB; $oDB = new Nominatim\DB;

View File

@ -1,4 +1,5 @@
<?php <?php
@define('CONST_LibDir', dirname(dirname(__FILE__)));
require_once(CONST_LibDir.'/init-cmd.php'); require_once(CONST_LibDir.'/init-cmd.php');

View File

@ -1,4 +1,5 @@
<?php <?php
@define('CONST_LibDir', dirname(dirname(__FILE__)));
// Script to extract structured city and street data // Script to extract structured city and street data
// from a running nominatim instance as CSV data // from a running nominatim instance as CSV data

View File

@ -1,4 +1,5 @@
<?php <?php
@define('CONST_LibDir', dirname(dirname(__FILE__)));
require_once(CONST_LibDir.'/init-cmd.php'); require_once(CONST_LibDir.'/init-cmd.php');
require_once(CONST_LibDir.'/Geocode.php'); require_once(CONST_LibDir.'/Geocode.php');

View File

@ -1,4 +1,5 @@
<?php <?php
@define('CONST_LibDir', dirname(dirname(__FILE__)));
require_once(CONST_LibDir.'/init-cmd.php'); require_once(CONST_LibDir.'/init-cmd.php');
require_once(CONST_LibDir.'/setup/SetupClass.php'); require_once(CONST_LibDir.'/setup/SetupClass.php');

View File

@ -1,4 +1,5 @@
<?php <?php
@define('CONST_LibDir', dirname(dirname(__FILE__)));
require_once(CONST_LibDir.'/init-cmd.php'); require_once(CONST_LibDir.'/init-cmd.php');
ini_set('memory_limit', '800M'); ini_set('memory_limit', '800M');

View File

@ -1,4 +1,5 @@
<?php <?php
@define('CONST_LibDir', dirname(dirname(__FILE__)));
require_once(CONST_LibDir.'/init-cmd.php'); require_once(CONST_LibDir.'/init-cmd.php');
require_once(CONST_LibDir.'/setup_functions.php'); require_once(CONST_LibDir.'/setup_functions.php');

View File

@ -1,4 +1,5 @@
<?php <?php
@define('CONST_LibDir', dirname(dirname(__FILE__)));
require_once(CONST_LibDir.'/init-cmd.php'); require_once(CONST_LibDir.'/init-cmd.php');
require_once(CONST_LibDir.'/log.php'); require_once(CONST_LibDir.'/log.php');