[Pkg-privacy-commits] [onionshare] 59/66: Updated Windows packaging scripts to work with PyInstaller

Ulrike Uhlig u-guest at moszumanska.debian.org
Wed Apr 13 22:17:52 UTC 2016


This is an automated email from the git hooks/post-receive script.

u-guest pushed a commit to branch master
in repository onionshare.

commit e37ce32fcd501b9cd330aacaa9fe21224225adf7
Author: Micah Lee <micah at micahflee.com>
Date:   Tue Apr 12 17:53:33 2016 -0700

    Updated Windows packaging scripts to work with PyInstaller
---
 BUILD.md                 |  2 +-
 install/build_exe.bat    |  4 +--
 install/onionshare.nsi   | 93 ++++++++++++++++++++++++++++++++++++------------
 install/pyinstaller.spec |  2 +-
 4 files changed, 75 insertions(+), 26 deletions(-)

diff --git a/BUILD.md b/BUILD.md
index 69b8905..ebb33df 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -110,7 +110,7 @@ If you want to sign binaries with Authenticode:
 
 ### To make a .exe:
 
-* Open a command prompt, cd into the onionshare directory, and type: `python setup.py py2exe`. `onionshare.exe` and all of its supporting files will get created inside the `dist` folder.
+* Open a command prompt, cd into the onionshare directory, and type: `pyinstaller install\pyinstaller.spec -y`. `onionshare.exe` and all of its supporting files will get created inside the `dist\onionshare` folder.
 
 ### To build the installer:
 
diff --git a/install/build_exe.bat b/install/build_exe.bat
index da8719e..dee34cf 100644
--- a/install/build_exe.bat
+++ b/install/build_exe.bat
@@ -1,8 +1,8 @@
 REM use PyInstaller to builder a folder with onionshare.exe
-pyinstaller install/pyinstaller.spec
+pyinstaller install\pyinstaller.spec -y
 
 REM sign onionshare.exe
-signtool.exe sign /v /d "OnionShare" /a /tr http://timestamp.globalsign.com/scripts/timstamp.dll /fd sha256 dist\onionshare.exe
+signtool.exe sign /v /d "OnionShare" /a /tr http://timestamp.globalsign.com/scripts/timstamp.dll /fd sha256 dist\onionshare\onionshare.exe
 
 REM build an installer, dist\OnionShare_Setup.exe
 makensis.exe install\onionshare.nsi
diff --git a/install/onionshare.nsi b/install/onionshare.nsi
index 80cf256..d5a6f97 100644
--- a/install/onionshare.nsi
+++ b/install/onionshare.nsi
@@ -1,9 +1,9 @@
 !define APPNAME "OnionShare"
-!define BINPATH "..\dist"
+!define BINPATH "..\dist\onionshare"
 !define ABOUTURL "https:\\onionshare.org\"
 
 # change these with each release
-!define INSTALLSIZE 60104
+!define INSTALLSIZE 60866
 !define VERSIONMAJOR 0
 !define VERSIONMINOR 8
 !define VERSIONSTRING "0.8.1"
@@ -59,14 +59,11 @@ Function .onInit
 FunctionEnd
 
 Section "install"
-    # application
     SetOutPath "$INSTDIR"
-    File "${BINPATH}\onionshare.exe"
-    File "${BINPATH}\license.txt"
-    File "${BINPATH}\version"
-    File "${BINPATH}\onionshare.ico"
+    File "onionshare.ico"
     SetOutPath "$INSTDIR\html"
     File "${BINPATH}\html\404.html"
+    File "${BINPATH}\html\denied.html"
     File "${BINPATH}\html\index.html"
     SetOutPath "$INSTDIR\images"
     File "${BINPATH}\images\logo.png"
@@ -74,6 +71,8 @@ Section "install"
     File "${BINPATH}\images\server_stopped.png"
     File "${BINPATH}\images\server_started.png"
     File "${BINPATH}\images\server_working.png"
+    SetOutPath "$INSTDIR\Include"
+    File "${BINPATH}\include\pyconfig.h"
     SetOutPath "$INSTDIR\locale"
     File "${BINPATH}\locale\de.json"
     File "${BINPATH}\locale\en.json"
@@ -87,11 +86,26 @@ Section "install"
     File "${BINPATH}\locale\pt.json"
     File "${BINPATH}\locale\ru.json"
     File "${BINPATH}\locale\tr.json"
-
-    # dependencies
-    SetOutPath "$INSTDIR\platforms"
-    File "${BINPATH}\platforms\qwindows.dll"
-    SetOutPath $INSTDIR
+    SetOutPath "$INSTDIR\qt5_plugins\iconengines"
+    File "${BINPATH}\qt5_plugins\iconengines\qsvgicon.dll"
+    SetOutPath "$INSTDIR\qt5_plugins\imageformats"
+    File "${BINPATH}\qt5_plugins\imageformats\qdds.dll"
+    File "${BINPATH}\qt5_plugins\imageformats\qgif.dll"
+    File "${BINPATH}\qt5_plugins\imageformats\qicns.dll"
+    File "${BINPATH}\qt5_plugins\imageformats\qico.dll"
+    File "${BINPATH}\qt5_plugins\imageformats\qjp2.dll"
+    File "${BINPATH}\qt5_plugins\imageformats\qjpeg.dll"
+    File "${BINPATH}\qt5_plugins\imageformats\qmng.dll"
+    File "${BINPATH}\qt5_plugins\imageformats\qsvg.dll"
+    File "${BINPATH}\qt5_plugins\imageformats\qtga.dll"
+    File "${BINPATH}\qt5_plugins\imageformats\qtiff.dll"
+    File "${BINPATH}\qt5_plugins\imageformats\qwbmp.dll"
+    File "${BINPATH}\qt5_plugins\imageformats\qwebp.dll"
+    SetOutPath "$INSTDIR\qt5_plugins\platforms"
+    File "${BINPATH}\qt5_plugins\platforms\qminimal.dll"
+    File "${BINPATH}\qt5_plugins\platforms\qoffscreen.dll"
+    File "${BINPATH}\qt5_plugins\platforms\qwindows.dll"
+    SetOutPath "$INSTDIR"
     File "${BINPATH}\_bz2.pyd"
     File "${BINPATH}\_ctypes.pyd"
     File "${BINPATH}\_decimal.pyd"
@@ -100,24 +114,33 @@ Section "install"
     File "${BINPATH}\_multiprocessing.pyd"
     File "${BINPATH}\_socket.pyd"
     File "${BINPATH}\_ssl.pyd"
+    File "${BINPATH}\base_library.zip"
     File "${BINPATH}\icudt53.dll"
     File "${BINPATH}\icuin53.dll"
     File "${BINPATH}\icuuc53.dll"
-    File "${BINPATH}\library.zip"
-    File "${BINPATH}\license.txt"
+    File "${BINPATH}\MSVCP100.dll"
+    File "${BINPATH}\MSVCR100.dll"
+    File "${BINPATH}\onionshare.exe"
+    File "${BINPATH}\onionshare.exe.manifest"
     File "${BINPATH}\pyexpat.pyd"
+    File "${BINPATH}\PyQt5.Qt.pyd"
     File "${BINPATH}\PyQt5.QtCore.pyd"
     File "${BINPATH}\PyQt5.QtGui.pyd"
+    File "${BINPATH}\PyQt5.QtPrintSupport.pyd"
     File "${BINPATH}\PyQt5.QtWidgets.pyd"
     File "${BINPATH}\python34.dll"
     File "${BINPATH}\pywintypes34.dll"
     File "${BINPATH}\Qt5Core.dll"
     File "${BINPATH}\Qt5Gui.dll"
+    File "${BINPATH}\Qt5PrintSupport.dll"
+    File "${BINPATH}\Qt5Svg.dll"
     File "${BINPATH}\Qt5Widgets.dll"
     File "${BINPATH}\select.pyd"
     File "${BINPATH}\sip.pyd"
     File "${BINPATH}\unicodedata.pyd"
+    File "${BINPATH}\version.txt"
     File "${BINPATH}\win32wnet.pyd"
+    File "${BINPATH}\wordlist.txt"
 
     # uninstaller
     !ifndef INNER
@@ -161,17 +184,15 @@ FunctionEnd
         Delete "$SMPROGRAMS\${APPNAME}.lnk"
 
         # remove files
-        Delete "$INSTDIR\onionshare.exe"
-        Delete "$INSTDIR\license.txt"
-        Delete "$INSTDIR\version"
-        Delete "$INSTDIR\onionshare.ico"
         Delete "$INSTDIR\html\404.html"
+        Delete "$INSTDIR\html\denied.html"
         Delete "$INSTDIR\html\index.html"
         Delete "$INSTDIR\images\logo.png"
         Delete "$INSTDIR\images\drop_files.png"
         Delete "$INSTDIR\images\server_stopped.png"
         Delete "$INSTDIR\images\server_started.png"
         Delete "$INSTDIR\images\server_working.png"
+        Delete "$INSTDIR\include\pyconfig.h"
         Delete "$INSTDIR\locale\de.json"
         Delete "$INSTDIR\locale\en.json"
         Delete "$INSTDIR\locale\eo.json"
@@ -184,7 +205,22 @@ FunctionEnd
         Delete "$INSTDIR\locale\pt.json"
         Delete "$INSTDIR\locale\ru.json"
         Delete "$INSTDIR\locale\tr.json"
-        Delete "$INSTDIR\platforms\qwindows.dll"
+        Delete "$INSTDIR\qt5_plugins\iconengines\qsvgicon.dll"
+        Delete "$INSTDIR\qt5_plugins\imageformats\qdds.dll"
+        Delete "$INSTDIR\qt5_plugins\imageformats\qgif.dll"
+        Delete "$INSTDIR\qt5_plugins\imageformats\qicns.dll"
+        Delete "$INSTDIR\qt5_plugins\imageformats\qico.dll"
+        Delete "$INSTDIR\qt5_plugins\imageformats\qjp2.dll"
+        Delete "$INSTDIR\qt5_plugins\imageformats\qjpeg.dll"
+        Delete "$INSTDIR\qt5_plugins\imageformats\qmng.dll"
+        Delete "$INSTDIR\qt5_plugins\imageformats\qsvg.dll"
+        Delete "$INSTDIR\qt5_plugins\imageformats\qtga.dll"
+        Delete "$INSTDIR\qt5_plugins\imageformats\qtiff.dll"
+        Delete "$INSTDIR\qt5_plugins\imageformats\qwbmp.dll"
+        Delete "$INSTDIR\qt5_plugins\imageformats\qwebp.dll"
+        Delete "$INSTDIR\qt5_plugins\platforms\qminimal.dll"
+        Delete "$INSTDIR\qt5_plugins\platforms\qoffscreen.dll"
+        Delete "$INSTDIR\qt5_plugins\platforms\qwindows.dll"
         Delete "$INSTDIR\_bz2.pyd"
         Delete "$INSTDIR\_ctypes.pyd"
         Delete "$INSTDIR\_decimal.pyd"
@@ -193,31 +229,44 @@ FunctionEnd
         Delete "$INSTDIR\_multiprocessing.pyd"
         Delete "$INSTDIR\_socket.pyd"
         Delete "$INSTDIR\_ssl.pyd"
+        Delete "$INSTDIR\base_library.zip"
         Delete "$INSTDIR\icudt53.dll"
         Delete "$INSTDIR\icuin53.dll"
         Delete "$INSTDIR\icuuc53.dll"
-        Delete "$INSTDIR\library.zip"
-        Delete "$INSTDIR\license.txt"
+        Delete "$INSTDIR\MSVCP100.dll"
+        Delete "$INSTDIR\MSVCR100.dll"
+        Delete "$INSTDIR\onionshare.exe"
+        Delete "$INSTDIR\onionshare.exe.manifest"
         Delete "$INSTDIR\pyexpat.pyd"
+        Delete "$INSTDIR\PyQt5.Qt.pyd"
         Delete "$INSTDIR\PyQt5.QtCore.pyd"
         Delete "$INSTDIR\PyQt5.QtGui.pyd"
+        Delete "$INSTDIR\PyQt5.QtPrintSupport.pyd"
         Delete "$INSTDIR\PyQt5.QtWidgets.pyd"
         Delete "$INSTDIR\python34.dll"
         Delete "$INSTDIR\pywintypes34.dll"
         Delete "$INSTDIR\Qt5Core.dll"
         Delete "$INSTDIR\Qt5Gui.dll"
+        Delete "$INSTDIR\Qt5PrintSupport.dll"
+        Delete "$INSTDIR\Qt5Svg.dll"
         Delete "$INSTDIR\Qt5Widgets.dll"
         Delete "$INSTDIR\select.pyd"
         Delete "$INSTDIR\sip.pyd"
         Delete "$INSTDIR\unicodedata.pyd"
+        Delete "$INSTDIR\version.txt"
         Delete "$INSTDIR\win32wnet.pyd"
+        Delete "$INSTDIR\wordlist.txt"
 
         Delete "$INSTDIR\uninstall.exe"
 
         rmDir "$INSTDIR\html"
         rmDir "$INSTDIR\images"
+        rmDir "$INSTDIR\Include"
         rmDir "$INSTDIR\locale"
-        rmDir "$INSTDIR\platforms"
+        rmDir "$INSTDIR\qt5_plugins\iconengines"
+        rmDir "$INSTDIR\qt5_plugins\imageformats"
+        rmDir "$INSTDIR\qt5_plugins\platforms"
+        rmDir "$INSTDIR\qt5_plugins"
         rmDir "$INSTDIR"
 
         # remove uninstaller information from the registry
diff --git a/install/pyinstaller.spec b/install/pyinstaller.spec
index 5eb239c..f733774 100644
--- a/install/pyinstaller.spec
+++ b/install/pyinstaller.spec
@@ -36,7 +36,7 @@ exe = EXE(
     debug=False,
     strip=False,
     upx=True,
-    console=True)
+    console=False)
 
 coll = COLLECT(
     exe,

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onionshare.git



More information about the Pkg-privacy-commits mailing list