public Map<String, String> getEnv() { return HostInfoProvider.getEnv(executionEnvironment); }
private final String getPathName(ExecutionEnvironment env, HostInfo hostInfo) { if (hostInfo.getOSFamily() == HostInfo.OSFamily.WINDOWS) { for (String key : HostInfoProvider.getEnv(env).keySet()) { if (key.toLowerCase(Locale.getDefault()).equals("path")) { // NOI18N return key.substring(0, 4); } } } return "PATH"; // NOI18N }
/** Returns system environment for the given host */ protected abstract Map<String, String> getEnv();
/** * This utility method makes it easier (on Windows) to replace PATH with one with * the same case. IZ 103016 updated PATH but it wasn't foud because Path wasn't * replaced. This will let us add a path using the exact same name. */ public String getPathName(ExecutionEnvironment executionEnvironment) { if (executionEnvironment.isLocal() && Utilities.isWindows()) { HostInfoProvider.getEnv(executionEnvironment); for (String key : HostInfoProvider.getEnv(executionEnvironment).keySet()) { if (key.toLowerCase().equals("path")) { // NOI18N return key.substring(0, 4); } } } return "PATH"; // NOI18N }
public static String getLdLibraryPath(ExecutionEnvironment eenv) { String ldLibraryPathName = getLdLibraryPathName(eenv); String paths = HostInfoProvider.getEnv(eenv).get(ldLibraryPathName); if (paths == null) { paths = ""; } return appendDefaultPaths(eenv, paths); }
return null; // getEnv() might be costly for remote host userPath = HostInfoProvider.getEnv(conf.getDevelopmentHost().getExecutionEnvironment()).get(pi.getPathName()); return null; // getEnv() might be costly for remote host extPath = HostInfoProvider.getEnv(conf.getDevelopmentHost().getExecutionEnvironment()).get("DYLD_LIBRARY_PATH"); // NOI18N return null; // NOI18N extPath = HostInfoProvider.getEnv(conf.getDevelopmentHost().getExecutionEnvironment()).get("LD_LIBRARY_PATH"); // NOI18N String ont = HostInfoProvider.getEnv(conf.getDevelopmentHost().getExecutionEnvironment()).get("OMP_NUM_THREADS"); // NOI18N if (ont == null) { ont = conf.getProfile().getEnvironment().getenv("OMP_NUM_THREADS"); // NOI18N && HostInfoProvider.getEnv(conf.getDevelopmentHost().getExecutionEnvironment()).get("DISPLAY") == null && // NOI18N conf.getProfile().getEnvironment().getenv("DISPLAY") == null) {// NOI18N
public static String getLdLibraryPath(MakeConfiguration activeConfiguration) { String ldLibraryPathName = getLdLibraryPathName(activeConfiguration); String ldLibPath = activeConfiguration.getProfile().getEnvironment().getenv(ldLibraryPathName); ExecutionEnvironment eenv = activeConfiguration.getDevelopmentHost().getExecutionEnvironment(); if (ldLibPath != null) { try { ldLibPath = MacroExpanderFactory.getExpander(eenv).expandMacros(ldLibPath, HostInfoUtils.getHostInfo(eenv).getEnvironment()); } catch (Exception ex) { Exceptions.printStackTrace(ex); } } if (ldLibPath == null) { ldLibPath = HostInfoProvider.getEnv(eenv).get(ldLibraryPathName); // NOI18N } if (ldLibPath == null) { ldLibPath = ""; // NOI18N } return appendDefaultPaths(eenv, ldLibPath); }