KERNEL_CONFIG_DIR, "MY_GXX_HOME" => GCC_BASE_DIR, "PATH" => self::getKernelBinPath().":".COTS_BASE_DIR."/bin:".GCC_BASE_DIR."/bin:".getenv("PATH"), "LD_LIBRARY_PATH" => COTS_BASE_DIR."/lib:".GCC_BASE_DIR."/lib64:".GCC_BASE_DIR."/lib:".getenv("LD_LIBRARY_PATH"), ); } public static function setTimeToBatchMode($timeToBatchMode) { self::$timeToBatchMode = $timeToBatchMode; } public static function getTimeToBatchMode() { return self::$timeToBatchMode; } public static function write($working_dir, $compilation_path, $localbase_path) { //create app.properties file $appProperties = array(); $appProperties["app.log4cxx.configfile"] = KERNEL_CONFIG_DIR."/log4cxx.config"; $appProperties["app.param.path"] = self::getRequestParamsPath($working_dir); $appProperties["app.parameter.xsd"] = self::getXSDParameterFilePath(); $appProperties["app.request.xsd"] = self::getXSDRequestFilePath(); $appProperties["app.paramInfo.xsd"] = self::getXSDParamInfoFilePath(); $appProperties["app.dataSetInfo.path"] = self::getDatasetInfoPath(); $appProperties["app.dataSetInfo.xsd"] = self::getXSDDatasetInfoFilePath(); $appProperties["app.instrumentInfo.path"] = self::getInstrumentInfoPath(); $appProperties["app.instrumentInfo.xsd"] = self::getXSDInstrumentInfoFilePath(); $appProperties["app.missionInfo.path"] = self::getMissionInfoPath(); $appProperties["app.missionInfo.xsd"] = self::getXSDMissionInfoFilePath(); $appProperties["app.localbase.path"] = $localbase_path; $appProperties["app.localbase.xsd"] = self::getXSDLocalBaseFilePath(); $appProperties["app.spicekernel.configxsd"] = self::getXSDSpiceKernelConfigFilePath(); $appProperties["app.spicekernel.configfile"] = KERNEL_CONFIG_DIR.'/spiceKernelConfig.xml'; $appProperties["app.plugin"] = AMDA_KERNEL_BUILD_DIR.'/'.self::$pluginDir; $appProperties["app.process.src"] = $compilation_path.self::$userSrcDir; $appProperties["app.process.lib"] = $compilation_path.self::$userLibDir; $appProperties["app.process.CXX_COMPILER"] = self::$cxxCompiler; $appProperties["app.process.CMAKE_CXX_FLAGS"] = self::$cmakeFlags; $appProperties["app.process.INCLUDE"] = ""; foreach (self::$includeArray as $inc) $appProperties["app.process.INCLUDE"] .= ("-I".AMDA_KERNEL_SRC_DIR."/".$inc." "); $appProperties["app.process.INCLUDE"] .= "-I".COTS_BASE_DIR."/include"." -I".BOOST_BASE_DIR."/include -I".COTS_BASE_DIR."/include/log4cxx"; $appProperties["app.process.LIB"] = "-L".AMDA_KERNEL_BUILD_DIR.'/'.self::$libDir." "; foreach (self::$libArray as $lib) $appProperties["app.process.LIB"] .= ("-l".$lib." "); $appProperties["app.plot.configfile"] = KERNEL_CONFIG_DIR.'/'.self::$plotConfigFile; $appProperties["app.param.gapthreshold"] = self::$defaultGapThreshold; if (self::$userHost != "") $appProperties["app.user.host"] = self::$userHost; if (self::$userName != "") $appProperties["app.user.name"] = self::$userName; $fp = fopen($working_dir.self::$propFile, 'w'); foreach ($appProperties as $key => $value) fwrite($fp, $key."=".$value.PHP_EOL); fclose($fp); //copy amda.properties file copy(KERNEL_CONFIG_DIR.'/amda.properties', $working_dir.'/amda.properties'); } } ?>