mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-13 13:30:44 +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:
@@ -30,3 +30,5 @@ obj/
|
||||
symsrv.yes
|
||||
ipch/
|
||||
*.shfbproj_*
|
||||
|
||||
renderdocui/3rdparty/ironpython/pythonlibs.zip
|
||||
|
||||
@@ -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/
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
<File Id='IronPythonModulesDLL' Name='IronPython.Modules.dll' DiskId='1' Source='dist/Release32/IronPython.Modules.dll' />
|
||||
<File Id='MicrosoftScriptingDLL' Name='Microsoft.Scripting.dll' DiskId='1' Source='dist/Release32/Microsoft.Scripting.dll' />
|
||||
<File Id='MicrosoftDynamicDLL' Name='Microsoft.Dynamic.dll' DiskId='1' Source='dist/Release32/Microsoft.Dynamic.dll' />
|
||||
<File Id='PythonLibsDLL' Name='pythonlibs.dll' DiskId='1' Source='dist/Release32/pythonlibs.dll' />
|
||||
<File Id='PythonLibsZIP' Name='pythonlibs.zip' DiskId='1' Source='dist/Release32/pythonlibs.zip' />
|
||||
</Component>
|
||||
|
||||
<Component Id='Documentation' Guid='CD32B446-6DC1-49E4-8FE9-509E1AFB126D'>
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
<File Id='IronPythonModulesDLL' Name='IronPython.Modules.dll' DiskId='1' Source='dist/Release64/IronPython.Modules.dll' />
|
||||
<File Id='MicrosoftScriptingDLL' Name='Microsoft.Scripting.dll' DiskId='1' Source='dist/Release64/Microsoft.Scripting.dll' />
|
||||
<File Id='MicrosoftDynamicDLL' Name='Microsoft.Dynamic.dll' DiskId='1' Source='dist/Release32/Microsoft.Dynamic.dll' />
|
||||
<File Id='PythonLibsDLL' Name='pythonlibs.dll' DiskId='1' Source='dist/Release64/pythonlibs.dll' />
|
||||
<File Id='PythonLibsZIP' Name='pythonlibs.zip' DiskId='1' Source='dist/Release64/pythonlibs.zip' />
|
||||
</Component>
|
||||
|
||||
<Component Id='Documentation' Win64="yes" Guid='C49ABF1D-1D73-469B-A44A-DD9470E85F19'>
|
||||
|
||||
+2
-2
@@ -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.
|
||||
|
||||
+2
-4
@@ -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 *
|
||||
|
||||
-137
@@ -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
|
||||
@@ -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; } }
|
||||
|
||||
|
||||
@@ -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