mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Change python embedding to get standard library from zip, not a dll
* This seems way more reliable and smaller than shipping a compiled .dll * For some reason I didn't find this method before (I only knew that you could ship the loose files which wasn't a good solution).
This commit is contained in:
@@ -99,6 +99,11 @@ namespace renderdocui.Windows.Dialogs
|
||||
|
||||
searches.Add(Directory.GetCurrentDirectory());
|
||||
|
||||
string libspath = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "pythonlibs.zip");
|
||||
|
||||
if (File.Exists(libspath))
|
||||
searches.Add(libspath);
|
||||
|
||||
engine.SetSearchPaths(searches);
|
||||
|
||||
return engine;
|
||||
@@ -464,11 +469,6 @@ namespace renderdocui.Windows.Dialogs
|
||||
scriptEditor.Text = String.Format("# RenderDoc Python scripts, powered by IronPython {0}\n" +
|
||||
"# The 'renderdoc' object is the Core class instance.\n\n", IronPython.CurrentVersion.AssemblyFileVersion);
|
||||
|
||||
if (File.Exists("pythonlibs.dll"))
|
||||
scriptEditor.Text += "import clr\nclr.AddReference(\"pythonlibs\")\n\n";
|
||||
else
|
||||
scriptEditor.Text += "#import clr\n#clr.AddReference(\"pythonlibs\")\n\n";
|
||||
|
||||
scriptEditor.Text = scriptEditor.Text.Replace("\n", Environment.NewLine);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user