Changeset 17989 for branches/3087_Ceres_Integration/HeuristicLab.ExtLibs/HeuristicLab.NativeInterpreter/0.1/HeuristicLab.NativeInterpreter-0.1/Plugin.cs
- Timestamp:
- 06/16/21 21:15:16 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3087_Ceres_Integration/HeuristicLab.ExtLibs/HeuristicLab.NativeInterpreter/0.1/HeuristicLab.NativeInterpreter-0.1/Plugin.cs
r17844 r17989 20 20 #endregion 21 21 22 using System;23 using System.IO;24 25 22 using HeuristicLab.PluginInfrastructure; 26 23 27 24 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 28 [Plugin("HeuristicLab.NativeInterpreter", "Provides a native (C++) interpreter for symbolic expression trees", "0. 0.0.1")]25 [Plugin("HeuristicLab.NativeInterpreter", "Provides a native (C++) interpreter for symbolic expression trees", "0.1.0.0")] 29 26 [PluginFile("HeuristicLab.Problems.DataAnalysis.Symbolic.NativeInterpreter-0.1.dll", PluginFileType.Assembly)] 27 // [PluginFile("hl-native-interpreter-msvc-x86.dll", PluginFileType.NativeDll)] 28 // [PluginFile("hl-native-interpreter-msvc-x64.dll", PluginFileType.NativeDll)] 29 [PluginFile("hl-native-interpreter-x64.dll", PluginFileType.NativeDll)] 30 [PluginFile("libceres.dll", PluginFileType.NativeDll)] 31 [PluginFile("libgcc_s_seh-1.dll", PluginFileType.NativeDll)] 32 [PluginFile("libopenlibm.dll", PluginFileType.NativeDll)] 33 [PluginFile("libstdc++-6.dll", PluginFileType.NativeDll)] 34 [PluginFile("libwinpthread-1.dll", PluginFileType.NativeDll)] 30 35 public class HeuristicLabNativeInterpreterPlugin : PluginBase { 31 public override void OnLoad() {32 base.OnLoad();33 // add path for native dlls to PATH env variable34 35 var is64 = Environment.Is64BitProcess;36 string nativeDllPath = Path.Combine(Environment.CurrentDirectory, is64 ? "x64" : "x86");37 var envPath = Environment.GetEnvironmentVariable("PATH");38 if (!envPath.Contains(nativeDllPath))39 Environment.SetEnvironmentVariable("PATH", envPath + ";" + nativeDllPath);40 }41 36 } 42 37 }
Note: See TracChangeset
for help on using the changeset viewer.