Blame view

config/AMDAIntegrationConfig.php 1.97 KB
22521f1c   Benjamin Renard   First commit
1
2
<?php 

f1252b32   Benjamin Renard   Add template for ...
3
$config_file=__DIR__."/current.env";
8ade06fe   Benjamin Renard   Improve config load
4
5

if (!file_exists($config_file)) {
f1252b32   Benjamin Renard   Add template for ...
6
	//DEPRECATED - Defined for compatbility mode! For new instance, copy the template file config/current.env.template in config/current.env and replace placeholders by your own values
8ade06fe   Benjamin Renard   Improve config load
7
	$localIP = exec("hostname -i");
8ade06fe   Benjamin Renard   Improve config load
8
9
	switch ($localIP)
	{
8ade06fe   Benjamin Renard   Improve config load
10
11
12
		case  '172.25.30.65' :
			$config_file=__DIR__."/predefined_env/akka-dev.env";
			break;
8ade06fe   Benjamin Renard   Improve config load
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
		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;
f1252b32   Benjamin Renard   Add template for ...
29
30
		default:
			$config_file="";
8ade06fe   Benjamin Renard   Improve config load
31
	}
22521f1c   Benjamin Renard   First commit
32
33
}

8ade06fe   Benjamin Renard   Improve config load
34
if (empty($config_file) || !file_exists($config_file) || ($config=parse_ini_file($config_file)) == FALSE) {
f1252b32   Benjamin Renard   Add template for ...
35
        throw new Exception("Error to load environment config file ".$config_file);
8ade06fe   Benjamin Renard   Improve config load
36
}
22521f1c   Benjamin Renard   First commit
37

8ade06fe   Benjamin Renard   Improve config load
38
39
40
41
42
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']);
22521f1c   Benjamin Renard   First commit
43

8ade06fe   Benjamin Renard   Improve config load
44
45
46
47
48
49
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);
22521f1c   Benjamin Renard   First commit
50
51

//Path to AMDA_Integration source dir
8ade06fe   Benjamin Renard   Improve config load
52
53
54
55
56
57
if (defined('INTEGRATION_BASE_PATH')) {
	define('INTEGRATION_SRC_DIR', INTEGRATION_BASE_PATH.'/src/');
}
else {
	define('INTEGRATION_SRC_DIR', __DIR__."/../src");
}
22521f1c   Benjamin Renard   First commit
58
59

?>