Added some process control for windows and updated mac build scripts.

This commit is contained in:
Joey Payne 2015-04-21 09:58:22 -06:00
commit 1bc208738c
3 changed files with 17 additions and 3 deletions

View file

@ -10,6 +10,8 @@ sudo chown -R joey dist/main.app
sudo chown -R joey dist/ build/
mv dist/main.app Web2Executable.app
rm -rf Web2Executable.app/Contents/Frameworks/Qt*
rm -rf build dist
zip -r -9 Web2ExeMac-CMD.zip Web2ExeMac-CMD

View file

@ -12,7 +12,9 @@ DATA_FILES = ['files']
OPTIONS = {
'iconfile': 'icon.icns',
'includes': ['PySide.QtCore', 'PySide.QtGui', 'PySide.QtNetwork', 'configobj'],
'packages': ['PIL']
'packages': ['PIL'],
'excludes': ['numpy', 'matplotlib', 'PyQt5', 'PySide.QtXmlPatterns', 'PySide.QtWebEngineCore', 'PySide.QtDesigner', 'PySide.QtScript', 'PySide.QtWebkit', 'Cython', 'selenium', 'scapy', 'pytz', 'pygments', 'pip', 'netaddr', 'mercurial', 'cx_Freeze', 'bpython', 'astroid', 'Shiboken', 'PyInstaller', 'sip', 'llvmpy', 'llvm', 'pylint', 'unittest', 'pysideuic', 'email', 'Tkinter', 'multiprocessing', 'yaml', 'logilab', 'urwid', 'test', 'networkx' ],
'dylib_excludes':['QtXml.framework', 'QtWebkit.framework', 'QtScript.framework', 'QtDesigner.framework', 'QtWebEngineCore.framework', 'QtXmlPatterns.framework', 'QtNetwork.framework', 'QtGui.framework', 'QtCore.framework']
}
setup(

View file

@ -739,8 +739,18 @@ class CommandBase(object):
upx_bin = os.path.join('files', 'compressors', upx_version)
os.chmod(upx_bin, 0755)
cmd = [upx_bin, '--lzma', '-{}'.format(compression.value), str(nw_path)]
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
if platform.system() == 'Windows':
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
startupinfo.wShowWindow = subprocess.SW_HIDE
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
stdin=subprocess.PIPE,
startupinfo=startupinfo)
else:
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
stdin=subprocess.PIPE)
self.progress_text = '\n\n'
self.progress_text = 'Compressing files'
while proc.poll() is None: