internal static InterpreterConfiguration GetConfiguration(InterpreterArchitecture arch) { var prefixPath = IronPythonResolver.GetPythonInstallDir(); if (string.IsNullOrEmpty(prefixPath)) { return(null); } // IronPython 2.7.8 changed the executable names for 64-bit vs 32-bit var ipyExe = arch == InterpreterArchitecture.x64 ? "ipy64.exe" : "ipy.exe"; var ipywExe = arch == InterpreterArchitecture.x64 ? "ipyw64.exe" : "ipyw.exe"; if (File.Exists(Path.Combine(prefixPath, "ipy32.exe"))) { ipyExe = arch == InterpreterArchitecture.x64 ? "ipy.exe" : "ipy32.exe"; ipywExe = arch == InterpreterArchitecture.x64 ? "ipyw.exe" : "ipyw32.exe"; } return(new InterpreterConfiguration( GetInterpreterId(arch), string.Format("IronPython 2.7{0: ()}", arch), prefixPath, Path.Combine(prefixPath, ipyExe), Path.Combine(prefixPath, ipywExe), "IRONPYTHONPATH", arch, new Version(2, 7), InterpreterUIMode.SupportsDatabase )); }
private void DiscoverInterpreterFactories() { if (_config == null && IronPythonResolver.GetPythonInstallDir() != null) { _config = GetConfiguration(InterpreterArchitecture.x86); if (Environment.Is64BitOperatingSystem) { _configX64 = GetConfiguration(InterpreterArchitecture.x64); } InterpreterFactoriesChanged?.Invoke(this, EventArgs.Empty); } }
private static InterpreterConfiguration GetConfiguration(ProcessorArchitecture arch) { var prefixPath = IronPythonResolver.GetPythonInstallDir(); return(new InterpreterConfiguration( prefixPath, Path.Combine(prefixPath, arch == ProcessorArchitecture.Amd64 ? "ipy64.exe" : "ipy.exe"), Path.Combine(prefixPath, arch == ProcessorArchitecture.Amd64 ? "ipyw64.exe" : "ipyw.exe"), Path.Combine(prefixPath, "Lib"), "IRONPYTHONPATH", arch, new Version(2, 7))); }
internal static InterpreterConfiguration GetConfiguration(ProcessorArchitecture arch) { var prefixPath = IronPythonResolver.GetPythonInstallDir(); return(new InterpreterConfiguration( GetInterpreterId(arch), "IronPython", prefixPath, Path.Combine(prefixPath, arch == ProcessorArchitecture.Amd64 ? "ipy64.exe" : "ipy.exe"), Path.Combine(prefixPath, arch == ProcessorArchitecture.Amd64 ? "ipyw64.exe" : "ipyw.exe"), Path.Combine(prefixPath, "Lib"), "IRONPYTHONPATH", arch, new Version(2, 7), InterpreterUIMode.SupportsDatabase)); }
private void DiscoverInterpreterFactories() { if (_interpreter == null && IronPythonResolver.GetPythonInstallDir() != null) { _interpreter = new IronPythonInterpreterFactory(ProcessorArchitecture.X86); if (Environment.Is64BitOperatingSystem) { _interpreterX64 = new IronPythonInterpreterFactory(ProcessorArchitecture.Amd64); } var evt = InterpreterFactoriesChanged; if (evt != null) { evt(this, EventArgs.Empty); } } }
internal static InterpreterConfiguration GetConfiguration(InterpreterArchitecture arch) { var prefixPath = IronPythonResolver.GetPythonInstallDir(); return(new InterpreterConfiguration( GetInterpreterId(arch), string.Format("IronPython 2.7{0: ()}", arch), prefixPath, Path.Combine(prefixPath, arch == InterpreterArchitecture.x64 ? "ipy64.exe" : "ipy.exe"), Path.Combine(prefixPath, arch == InterpreterArchitecture.x64 ? "ipyw64.exe" : "ipyw.exe"), "IRONPYTHONPATH", arch, new Version(2, 7), InterpreterUIMode.SupportsDatabase )); }