Commit 5f5e337d48205f71e7fa842bbd55f0a1b1d218b8
1 parent
35322ea6
Exists in
master
and in
9 other branches
First step to remove all stuff hard coded
Showing
9 changed files
with
45 additions
and
75 deletions
Show diff stats
.gitignore
CMakeLists.txt
... | ... | @@ -37,6 +37,21 @@ configure_file ( |
37 | 37 | "${CMAKE_SOURCE_DIR}/scripts/DDServer.env" |
38 | 38 | ) |
39 | 39 | |
40 | +set(DDSERVICE_URL $ENV{DDSERVICE_URL}) | |
41 | +set(DDRESPATH $ENV{DDRESPATH}) | |
42 | +set(DDBASEDATA $ENV{DDBASEDATA}) | |
43 | +set(DDBASEINFO $ENV{DDBASEINFO}) | |
44 | + | |
45 | +configure_file ( | |
46 | + "${CMAKE_SOURCE_DIR}/src/DDSERVICES/SOAP/DDserverWeb_ini.php.in" | |
47 | + "${CMAKE_SOURCE_DIR}/src/DDSERVICES/SOAP/DDserverWeb_ini.php" | |
48 | +) | |
49 | + | |
50 | +configure_file ( | |
51 | + "${CMAKE_SOURCE_DIR}/src/DDSERVICES/SOAP/dd.wsdl.in" | |
52 | + "${CMAKE_SOURCE_DIR}/src/DDSERVICES/SOAP/dd.wsdl" | |
53 | +) | |
54 | + | |
40 | 55 | MESSAGE( STATUS "Build DD_Server Project" ) |
41 | 56 | add_subdirectory(src/SERVER) |
42 | 57 | add_subdirectory(src/DECODERS/ascii2nc) |
... | ... |
compil.sh
1 | 1 | #!/bin/sh |
2 | 2 | |
3 | -export NETCDF_ROOT="/opt/local" | |
4 | -export DDCLIENT_ROOT="/opt/local" | |
3 | +export INSTALL_DIR="/opt/local" | |
4 | +export DDSERVICE_URL="http://apus.irap.omp.eu/NEWAMDA/DDService" | |
5 | +export DDRESPATH="/home/budnik/DDBASE" | |
6 | +export DDBASEDATA="/home/budnik/DDBASE/DATA" | |
7 | +export DDBASEINFO="/home/budnik/DDBASE/INFO" | |
8 | + | |
9 | +echo "Install dir. : ${INSTALL_DIR}" | |
10 | +echo "DDService Url : ${DDSERVICE_URL}" | |
11 | +echo "DD.res path : ${DDRESPATH}" | |
12 | +echo "DDBASE DATA path : ${DDBASEDATA}" | |
13 | +echo "DDBASE INFO path : ${DDBASEINFO}" | |
14 | +read -p "Press any key to continue..." | |
15 | + | |
16 | +export NETCDF_ROOT=$INSTALL_DIR | |
17 | +export DDCLIENT_ROOT=$INSTALL_DIR | |
5 | 18 | |
6 | 19 | cmake -E make_directory build |
7 | -cmake -E chdir build cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/local .. | |
20 | +cmake -E chdir build cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} .. | |
8 | 21 | cmake --build build |
9 | 22 | sudo make -C build install VERBOSE=1 |
... | ... |
scripts/DDServer.env.in
src/DATA/MANAGER/DDBaseMgr.php
... | ... | @@ -151,8 +151,8 @@ class DDBaseMgr |
151 | 151 | if (!file_exists($this->info)) system("infoLocal2nc ".$this->info_xml." ".$this->info); |
152 | 152 | if (!file_exists("clean")) |
153 | 153 | { |
154 | - copy(getenv("DDBASE")."/Cache.template", $this->cache); | |
155 | - $SED = "sed 's/NAME/".$this->brief."/g' ".getenv("DDBASE")."/Clean.template > clean"; | |
154 | + copy(getenv("DDBASEBIN")."/Cache.template", $this->cache); | |
155 | + $SED = "sed 's/NAME/".$this->brief."/g' ".getenv("DDBASEBIN")."/Clean.template > clean"; | |
156 | 156 | exec($SED); |
157 | 157 | chmod("clean", 0755); |
158 | 158 | } |
... | ... | @@ -278,4 +278,4 @@ class DDBaseMgr |
278 | 278 | } |
279 | 279 | } |
280 | 280 | ?> |
281 | - | |
282 | 281 | \ No newline at end of file |
282 | + | |
... | ... |
src/DATA/MANAGER/mgr_ini.php deleted
... | ... | @@ -1,59 +0,0 @@ |
1 | -<?php | |
2 | - | |
3 | -/** | |
4 | -* @file mgr_ini.php | |
5 | -* @brief All necessary SETUP for DD Data Center Manager | |
6 | -* @version $Id: mgr_ini.php,v 1.1 2013/03/13 08:44:40 budnik Exp $ | |
7 | -*/ | |
8 | - | |
9 | -/* MAIN DEFINITIONS SHOULD BE MODIFIED!!!!!! */ | |
10 | - define("rootDir", "/home/budnik/AMDA-NG.core/DDBASE"); | |
11 | - define("DDLIBHOME","/opt/local"); | |
12 | - define ("DDLIB", DDLIBHOME."/lib"); | |
13 | - define('CEFLIB', '/opt/local/lib'); | |
14 | - define('CDFLIB', '/opt/local/lib'); | |
15 | - define('SYS_LIBS', '/lib:/usr/lib:/usr/local/lib'); | |
16 | - | |
17 | - | |
18 | - /* CDAWeb stuff */ | |
19 | - define ("wsdlCDAWEB", "https://cdaweb.sci.gsfc.nasa.gov/WS/jaxrpc?WSDL"); | |
20 | - define ("viewID" , "sp_phys"); | |
21 | - | |
22 | -/* THEMIS stuff */ | |
23 | - define ("ThemisDir", "/THEMIS_B1/themisdata/"); | |
24 | - | |
25 | -/* Compound Definitions: Nothing to modify */ | |
26 | - | |
27 | - define ("DDBASEBIN", DDLIBHOME."/bin"); | |
28 | - define ("DDBASE", rootDir."/DATA/"); | |
29 | - define ("DDsys", "DDsys.xml"); | |
30 | - | |
31 | - define ("INFO_DIR", rootDir."/INFO/"); | |
32 | - define ("DICTIONARY_DIR", INFO_DIR."Dictionary/"); | |
33 | - define ("XML_BASE_DIR",INFO_DIR."xsl/"); | |
34 | - | |
35 | - define ("USERS_INFO","AMDA_Users_Info.xml"); | |
36 | - define ("USERS_GROUPS","AMDA_Users.xml"); | |
37 | - | |
38 | - putenv("LD_LIBRARY_PATH=".SYS_LIBS.":".DDLIB.":".CEFLIB.":".CDFLIB); | |
39 | - $old_include_path = set_include_path("./:".DDLIB.":".DDBASEBIN); | |
40 | - | |
41 | - define("STDERR", fopen("php://stderr","w")); | |
42 | - define("log_", fopen("log","w")); | |
43 | - | |
44 | - define("treeLATMOS", "http://impex.latmos.ipsl.fr/tree.xml"); | |
45 | - define("treeSINP", "http://smdc.sinp.msu.ru/impex/SINP_tree.xml"); // official: http://dec1.sinp.msu.ru/~lucymu/paraboloid/SINP_tree.xml | |
46 | - define("treeFMI_HYB", "http://impex-fp7.fmi.fi/ws/Tree_FMI_HYB.xml"); | |
47 | - define("treeFMI_GUMICS", "http://impex-fp7.fmi.fi/ws/Tree_FMI_GUMICS.xml"); | |
48 | - define("treeLESIA", "http://maser.obspm.fr/IMPExWS/tree_Mag.xml"); | |
49 | - define("treeCCMC", "http://apus.irap.omp.eu/AMDA-IMPEX/public/trees/Tree_CCMC_chablon5.xml"); | |
50 | - | |
51 | - define('wsdl_LESIA', 'http://maser.obspm.fr/IMPExWS/Methods_LESIA-Mag.wsdl'); | |
52 | - | |
53 | - if (!function_exists('__autoload')) { | |
54 | - function __autoload($class_name) { | |
55 | - require_once $class_name . '.php'; | |
56 | - } | |
57 | - } | |
58 | - | |
59 | -?> |
src/DATA/TEMPLATES/Clean.template
src/DDSERVICES/SOAP/DDserverWeb_ini.php renamed to src/DDSERVICES/SOAP/DDserverWeb_ini.php.in
... | ... | @@ -8,22 +8,21 @@ |
8 | 8 | |
9 | 9 | /* MAIN DEFINITIONS SHOULD BE MODIFIED!!!!!! */ |
10 | 10 | |
11 | - define("rootDir", "/home/budnik/DDBASE"); | |
12 | - define("rootAlias", "http://apus.irap.omp.eu/NEWAMDA/DDService"); | |
11 | + define("rootAlias", "@DDSERVICE_URL@"); | |
13 | 12 | // define("DDLIBHOME","/home/budnik/AMDANEW/DDLIB"); |
14 | - define("DDLIB", "/opt/local/lib/"); | |
13 | + define("DDLIB", "@DDCLIENTLIB_DIR@"); | |
15 | 14 | |
16 | 15 | putenv("LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:".DDLIB); |
17 | 16 | |
18 | 17 | /* Compound Definitions: Nothing to modify */ |
19 | 18 | |
20 | - define("baseDir", rootDir."/DATA/"); | |
21 | -// define("extBaseDir",rootDir."/INFO/"); | |
19 | + define("baseDir", "@DDBASEDATA@"); | |
20 | + define("extBaseDir", "@DDBASEINFO@"); | |
22 | 21 | // define("extBaseXml", "Bases.xml"); |
23 | 22 | |
24 | 23 | define("webAlias", rootAlias."/DATA/"); |
25 | 24 | define("extWebAlias", rootAlias."/INFO/"); |
26 | - define("DDBASEBIN", "/opt/local/bin"); | |
25 | + define("DDBASEBIN", "@CMAKE_INSTALL_PREFIX@/bin"); | |
27 | 26 | |
28 | 27 | // Errors |
29 | 28 | define("UNKNOWNBASEID","UNKNOWNBASEID"); |
... | ... |
src/DDSERVICES/SOAP/dd.wsdl renamed to src/DDSERVICES/SOAP/dd.wsdl.in
... | ... | @@ -366,7 +366,7 @@ |
366 | 366 | |
367 | 367 | <service name='AmdaService'> |
368 | 368 | <port name='AmdaPort' binding='AmdaBinding'> |
369 | - <soap:address location='http://apus.irap.omp.eu/NEWAMDA/DDService/DDserverWeb.php'/> | |
369 | + <soap:address location='@DDSERVICE_URL@/DDserverWeb.php'/> | |
370 | 370 | </port> |
371 | 371 | </service> |
372 | 372 | </definitions> |
... | ... |