AMDAIntegrationConfig.php
1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
$config_file=__DIR__."/my_config.env";
if (!file_exists($config_file)) {
$localIP = exec("hostname -i");
//Add your server below
switch ($localIP)
{
//bas-amda-01 server (AKKA dev)
case '172.25.30.65' :
$config_file=__DIR__."/predefined_env/akka-dev.env";
break;
//bas-amda-02 server (AKKA - integration)
case '10.168.220.87' :
$config_file=__DIR__."/predefined_env/akka-integration.env";
break;
case '195.83.102.55' :
$config_file=__DIR__."/predefined_env/irap-test.env";
break;
case '10.121.0.3' :
$config_file=__DIR__."/predefined_env/apus-dev.env";
break;
case '10.121.1.121' :
$config_file=__DIR__."/predefined_env/pc1121-dev.env";
case '10.121.0.31' :
$config_file=__DIR__."/predefined_env/irap-amdatest.env";
case '192.168.83.101' :
$config_file=__DIR__."/predefined_env/akka-amdadev.env";
break;
}
} else {
$config_file="";
}
if (empty($config_file) || !file_exists($config_file) || ($config=parse_ini_file($config_file)) == FALSE) {
throw new Exception("Error to load environment config file");
}
define('COTS_BASE_DIR', $config['COTS_BASE_DIR']);
define('TOOLS_BASE_DIR', $config['TOOLS_BASE_DIR']);
define('KERNEL_BUILD_TYPE', $config['KERNEL_BUILD_TYPE']);
define('AMDA_KERNEL_DIR', $config['AMDA_KERNEL_DIR']);
define('IHM_SRC_DIR', $config['IHM_SRC_DIR']);
define('GCC_BASE_DIR', TOOLS_BASE_DIR.'/gcc/4.7.2/rtf');
define('BOOST_BASE_DIR', TOOLS_BASE_DIR.'/gcc/4.7.2/boost');
define('KERNEL_CONFIG_DIR',__DIR__.'/kernel');
define('DDRES_DIR',__DIR__.'/kernel');
define('AMDA_KERNEL_SRC_DIR', AMDA_KERNEL_DIR.'/src');
define('AMDA_KERNEL_BUILD_DIR', AMDA_KERNEL_DIR.'/build/'.KERNEL_BUILD_TYPE);
//Path to AMDA_Integration source dir
if (defined('INTEGRATION_BASE_PATH')) {
define('INTEGRATION_SRC_DIR', INTEGRATION_BASE_PATH.'/src/');
}
else {
define('INTEGRATION_SRC_DIR', __DIR__."/../src");
}
?>