DDRES_DIR, "MY_GXX_HOME" => self::$gccDir, "PATH" => self::getKernelBinPath().":".self::$gccDir."bin/:".getenv("PATH"), "LD_LIBRARY_PATH" => self::$gccDir."lib64:".self::$gccDir."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"] = NEWKERNEL_CONFIG_DIR.self::$logConfigFile; $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"] = INTEGRATION_SRC_DIR.'../config/'.self::$spiceKernelConfigFile; $appProperties["app.plugin"] = NEWKERNEL_INSTALL_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".NEWKERNEL_SRC_DIR.$inc." "); $appProperties["app.process.INCLUDE"] .= "-I".self::$localInclude." -I".self::$boostInclude." -I".self::$log4cxxInclude; $appProperties["app.process.LIB"] = "-L".NEWKERNEL_INSTALL_DIR.self::$libDir." "; foreach (self::$libArray as $lib) $appProperties["app.process.LIB"] .= ("-l".$lib." "); $appProperties["app.plot.configfile"] = INTEGRATION_SRC_DIR.'../config/'.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); //create amda.properties file $amdaPropertiesArray = array(); $amdaPropertiesArray["createdby"] = self::$kernelAbout; $amdaPropertiesArray["acknowledgement"] = self::$kernelAcknow; $fp = fopen($working_dir.self::$amdaPropFile, 'w'); foreach ($amdaPropertiesArray as $key => $value) fwrite($fp, $key."=".$value.PHP_EOL); fclose($fp); } } ?>