diff --git a/.gitignore b/.gitignore index f62003cd4..6bcdb4da7 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,5 @@ obj/ symsrv.yes ipch/ *.shfbproj_* + +renderdocui/3rdparty/ironpython/pythonlibs.zip diff --git a/dist.sh b/dist.sh index 58b4256b2..b3544964f 100644 --- a/dist.sh +++ b/dist.sh @@ -22,8 +22,8 @@ mkdir -p dist/Release{32,64} cp -R x64/Release/* dist/Release64/ cp -R Win32/Release/* dist/Release32/ -cp renderdocui/3rdparty/ironpython/pythonlibs.dll dist/Release64/ -cp renderdocui/3rdparty/ironpython/pythonlibs.dll dist/Release32/ +cp renderdocui/3rdparty/ironpython/pythonlibs.zip dist/Release64/ +cp renderdocui/3rdparty/ironpython/pythonlibs.zip dist/Release32/ # Copy in d3dcompiler from windows kit 8.1 cp /c/Program\ Files\ \(x86\)/Windows\ Kits/8.1/Redist/D3D/x64/d3dcompiler_47.dll dist/Release64/ diff --git a/installer/Installer32.wxs b/installer/Installer32.wxs index 75719faa9..cb3cdf41b 100644 --- a/installer/Installer32.wxs +++ b/installer/Installer32.wxs @@ -114,7 +114,7 @@ - + diff --git a/installer/Installer64.wxs b/installer/Installer64.wxs index 4db8dfdc7..92f0d6bad 100644 --- a/installer/Installer64.wxs +++ b/installer/Installer64.wxs @@ -104,7 +104,7 @@ - + diff --git a/renderdocui/3rdparty/ironpython/README.md b/renderdocui/3rdparty/ironpython/README.md index ceacbf888..189c1014c 100644 --- a/renderdocui/3rdparty/ironpython/README.md +++ b/renderdocui/3rdparty/ironpython/README.md @@ -1,5 +1,5 @@ This is a distribution of [IronPython](http://ironpython.net/) 2.7.4, license is available in LICENSE.md. -In this folder is compilelibs.sh which will build a selection of the Libs/ python standard library into a single dll for distribution. The dll isn't included since it ends up being ~10MB so too large to be nice to commit to git. +In this folder is compilelibs.sh which will rompress the Libs/ python standard library into a zip for distribution. -Run compilelibs.sh and point it at an IronPython checkout and it will copy pythonlibs.dll to this folder, which will be optionally loaded in code (and expected by the packaging scripts) to provide the python standard library in-program. +Run compilelibs.sh and point it at an IronPython checkout and it will copy pythonlibs.zip to this folder, which will be copied by the packaging scripts next to renderdocui.exe to provide the python standard library in-program. diff --git a/renderdocui/3rdparty/ironpython/compilelibs.sh b/renderdocui/3rdparty/ironpython/compilelibs.sh index e51be3563..982b1d7c7 100644 --- a/renderdocui/3rdparty/ironpython/compilelibs.sh +++ b/renderdocui/3rdparty/ironpython/compilelibs.sh @@ -6,9 +6,7 @@ if [ $# -ne 1 ]; then fi IRONPYTHON="$1" -LIBS=$(cat libs.txt | awk '{print "Lib/"$1}') OUTDIR=$PWD -cd $IRONPYTHON -./ipy.exe Tools/Scripts/pyc.py /target:dll /out:pythonlibs $LIBS -mv pythonlibs.dll $OUTDIR/ +cd $IRONPYTHON/Lib +zip -r $OUTDIR/pythonlibs.zip * diff --git a/renderdocui/3rdparty/ironpython/libs.txt b/renderdocui/3rdparty/ironpython/libs.txt deleted file mode 100644 index 0fb7c8b7b..000000000 --- a/renderdocui/3rdparty/ironpython/libs.txt +++ /dev/null @@ -1,137 +0,0 @@ -ConfigParser.py -HTMLParser.py -Queue.py -StringIO.py -UserDict.py -UserList.py -UserString.py -__future__.py -_abcoll.py -_pyio.py -_strptime.py -_threading_local.py -_weakrefset.py -abc.py -argparse.py -asynchat.py -asyncore.py -atexit.py -base64.py -bisect.py -calendar.py -cgitb.py -cmd.py -code.py -codecs.py -collections.py -colorsys.py -commands.py -contextlib.py -copy.py -csv.py -decimal.py -difflib.py -dircache.py -dummy_thread.py -dummy_threading.py -filecmp.py -fnmatch.py -formatter.py -fpformat.py -fractions.py -functools.py -genericpath.py -getopt.py -gettext.py -glob.py -gzip.py -hashlib.py -heapq.py -hmac.py -htmlentitydefs.py -htmllib.py -httplib.py -imghdr.py -inspect.py -io.py -keyword.py -linecache.py -locale.py -macurl2path.py -markupbase.py -md5.py -mhlib.py -mimetools.py -mimetypes.py -modulefinder.py -mutex.py -new.py -ntpath.py -nturl2path.py -numbers.py -optparse.py -os.py -os2emxpath.py -pickle.py -pickletools.py -pipes.py -pkgutil.py -platform.py -popen2.py -posixfile.py -posixpath.py -pprint.py -random.py -repr.py -rexec.py -rfc822.py -rlcompleter.py -robotparser.py -runpy.py -sched.py -sets.py -sgmllib.py -sha.py -shelve.py -shlex.py -shutil.py -site.py -smtpd.py -smtplib.py -sndhdr.py -sre_compile.py -sre_constants.py -sre_parse.py -ssl.py -stat.py -statvfs.py -string.py -stringold.py -struct.py -subprocess.py -symbol.py -sysconfig.py -tabnanny.py -tarfile.py -tempfile.py -textwrap.py -this.py -threading.py -timeit.py -token.py -tokenize.py -trace.py -traceback.py -types.py -urllib.py -urllib2.py -urlparse.py -user.py -uu.py -uuid.py -warnings.py -weakref.py -webbrowser.py -xmllib.py -xmlrpclib.py -zipfile.py diff --git a/renderdocui/Code/Core.cs b/renderdocui/Code/Core.cs index 81c4dc5b2..a00c03d50 100644 --- a/renderdocui/Code/Core.cs +++ b/renderdocui/Code/Core.cs @@ -114,7 +114,7 @@ namespace renderdocui.Code public bool LogLoading { get { return m_LogLoadingInProgress; } } public string LogFileName { get { return m_LogFile; } set { if (LogLoaded) m_LogFile = value; } } - public FetchFrameInfo[] FrameInfo { get { while (m_FrameInfo == null); return m_FrameInfo; } } + public FetchFrameInfo[] FrameInfo { get { return m_FrameInfo; } } public APIProperties APIProps { get { return m_APIProperties; } } diff --git a/renderdocui/Windows/Dialogs/PythonShell.cs b/renderdocui/Windows/Dialogs/PythonShell.cs index 466cee469..f533da869 100644 --- a/renderdocui/Windows/Dialogs/PythonShell.cs +++ b/renderdocui/Windows/Dialogs/PythonShell.cs @@ -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); }