diff --git a/build_mac.bash b/build_mac.bash index 71f5a1a..47d35b6 100755 --- a/build_mac.bash +++ b/build_mac.bash @@ -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 diff --git a/build_mac_setup.py b/build_mac_setup.py index 7d5172d..0eac48b 100644 --- a/build_mac_setup.py +++ b/build_mac_setup.py @@ -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( diff --git a/command_line.py b/command_line.py index 242322a..511518c 100644 --- a/command_line.py +++ b/command_line.py @@ -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: