Update NSIS file to work with new PyInstaller files

This commit is contained in:
Micah Lee 2017-02-22 15:10:28 -08:00
parent 878b4e9760
commit 65d1ae7bb0
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73

View File

@ -1,18 +1,18 @@
!define APPNAME "OnionShare"
!define BINPATH "..\build\exe.win32-3.5"
!define BINPATH "..\dist\onionshare"
!define ABOUTURL "https:\\onionshare.org\"
# change these with each release
!define INSTALLSIZE 35630
!define VERSIONMAJOR 0
!define VERSIONMINOR 9
!define VERSIONSTRING "0.9.1"
!define INSTALLSIZE 39265
!define VERSIONMAJOR 1
!define VERSIONMINOR 0
!define VERSIONSTRING "1.0.0"
RequestExecutionLevel admin
Name "OnionShare"
InstallDir "$PROGRAMFILES\${APPNAME}"
LicenseData "..\resources\license.txt"
LicenseData "..\share\license.txt"
Icon "onionshare.ico"
!include LogicLib.nsh
@ -41,7 +41,7 @@ ${EndIf}
!echo "Creating normal installer"
!system "makensis.exe /DINNER onionshare.nsi" = 0
!system "$%TEMP%\tempinstaller.exe" = 2
!system "signtool.exe sign /v /d $\"Uninstall OnionShare$\" /a /tr http://timestamp.globalsign.com/scripts/timstamp.dll /fd sha256 $%TEMP%\uninstall.exe" = 0
#!system "signtool.exe sign /v /d $\"Uninstall OnionShare$\" /a /tr http://timestamp.globalsign.com/scripts/timstamp.dll /fd sha256 $%TEMP%\uninstall.exe" = 0
# all done, now we can build the real installer
OutFile "..\dist\OnionShare_Setup.exe"
@ -61,65 +61,67 @@ FunctionEnd
Section "install"
SetOutPath "$INSTDIR"
File "onionshare.ico"
SetOutPath "$INSTDIR\imageformats"
File "${BINPATH}\imageformats\qdds.dll"
File "${BINPATH}\imageformats\qgif.dll"
File "${BINPATH}\imageformats\qicns.dll"
File "${BINPATH}\imageformats\qico.dll"
File "${BINPATH}\imageformats\qjpeg.dll"
File "${BINPATH}\imageformats\qsvg.dll"
File "${BINPATH}\imageformats\qtga.dll"
File "${BINPATH}\imageformats\qtiff.dll"
File "${BINPATH}\imageformats\qwbmp.dll"
File "${BINPATH}\imageformats\qwebp.dll"
SetOutPath "$INSTDIR\platforms"
File "${BINPATH}\platforms\qminimal.dll"
File "${BINPATH}\platforms\qoffscreen.dll"
File "${BINPATH}\platforms\qwindows.dll"
SetOutPath "$INSTDIR\resources"
File "${BINPATH}\resources\license.txt"
File "${BINPATH}\resources\version.txt"
File "${BINPATH}\resources\wordlist.txt"
SetOutPath "$INSTDIR\resources\html"
File "${BINPATH}\resources\html\404.html"
File "${BINPATH}\resources\html\denied.html"
File "${BINPATH}\resources\html\index.html"
SetOutPath "$INSTDIR\resources\images"
File "${BINPATH}\resources\images\logo.png"
File "${BINPATH}\resources\images\drop_files.png"
File "${BINPATH}\resources\images\server_stopped.png"
File "${BINPATH}\resources\images\server_started.png"
File "${BINPATH}\resources\images\server_working.png"
SetOutPath "$INSTDIR\resources\locale"
File "${BINPATH}\resources\locale\de.json"
File "${BINPATH}\resources\locale\en.json"
File "${BINPATH}\resources\locale\eo.json"
File "${BINPATH}\resources\locale\es.json"
File "${BINPATH}\resources\locale\fi.json"
File "${BINPATH}\resources\locale\fr.json"
File "${BINPATH}\resources\locale\it.json"
File "${BINPATH}\resources\locale\nl.json"
File "${BINPATH}\resources\locale\no.json"
File "${BINPATH}\resources\locale\pt.json"
File "${BINPATH}\resources\locale\ru.json"
File "${BINPATH}\resources\locale\tr.json"
SetOutPath "$INSTDIR"
File "${BINPATH}\api-ms-win-core-console-l1-1-0.dll"
File "${BINPATH}\api-ms-win-core-datetime-l1-1-0.dll"
File "${BINPATH}\api-ms-win-core-debug-l1-1-0.dll"
File "${BINPATH}\api-ms-win-core-errorhandling-l1-1-0.dll"
File "${BINPATH}\api-ms-win-core-file-l1-1-0.dll"
File "${BINPATH}\api-ms-win-core-file-l1-2-0.dll"
File "${BINPATH}\api-ms-win-core-file-l2-1-0.dll"
File "${BINPATH}\api-ms-win-core-handle-l1-1-0.dll"
File "${BINPATH}\api-ms-win-core-heap-l1-1-0.dll"
File "${BINPATH}\api-ms-win-core-interlocked-l1-1-0.dll"
File "${BINPATH}\api-ms-win-core-libraryloader-l1-1-0.dll"
File "${BINPATH}\api-ms-win-core-localization-l1-2-0.dll"
File "${BINPATH}\api-ms-win-core-memory-l1-1-0.dll"
File "${BINPATH}\api-ms-win-core-namedpipe-l1-1-0.dll"
File "${BINPATH}\api-ms-win-core-processenvironment-l1-1-0.dll"
File "${BINPATH}\api-ms-win-core-processthreads-l1-1-0.dll"
File "${BINPATH}\api-ms-win-core-processthreads-l1-1-1.dll"
File "${BINPATH}\api-ms-win-core-profile-l1-1-0.dll"
File "${BINPATH}\api-ms-win-core-rtlsupport-l1-1-0.dll"
File "${BINPATH}\api-ms-win-core-string-l1-1-0.dll"
File "${BINPATH}\api-ms-win-core-synch-l1-1-0.dll"
File "${BINPATH}\api-ms-win-core-synch-l1-2-0.dll"
File "${BINPATH}\api-ms-win-core-sysinfo-l1-1-0.dll"
File "${BINPATH}\api-ms-win-core-timezone-l1-1-0.dll"
File "${BINPATH}\api-ms-win-core-util-l1-1-0.dll"
File "${BINPATH}\api-ms-win-crt-conio-l1-1-0.dll"
File "${BINPATH}\api-ms-win-crt-convert-l1-1-0.dll"
File "${BINPATH}\api-ms-win-crt-environment-l1-1-0.dll"
File "${BINPATH}\api-ms-win-crt-filesystem-l1-1-0.dll"
File "${BINPATH}\api-ms-win-crt-heap-l1-1-0.dll"
File "${BINPATH}\api-ms-win-crt-locale-l1-1-0.dll"
File "${BINPATH}\api-ms-win-crt-math-l1-1-0.dll"
File "${BINPATH}\api-ms-win-crt-multibyte-l1-1-0.dll"
File "${BINPATH}\api-ms-win-crt-process-l1-1-0.dll"
File "${BINPATH}\api-ms-win-crt-runtime-l1-1-0.dll"
File "${BINPATH}\api-ms-win-crt-stdio-l1-1-0.dll"
File "${BINPATH}\api-ms-win-crt-string-l1-1-0.dll"
File "${BINPATH}\api-ms-win-crt-time-l1-1-0.dll"
File "${BINPATH}\api-ms-win-crt-utility-l1-1-0.dll"
File "${BINPATH}\base_library.zip"
File "${BINPATH}\MSVCP140.dll"
File "${BINPATH}\MSVCR100.dll"
File "${BINPATH}\onionshare-gui.exe"
File "${BINPATH}\onionshare.exe"
File "${BINPATH}\onionshare-gui.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}\python3.dll"
File "${BINPATH}\python35.dll"
File "${BINPATH}\python35.zip"
File "${BINPATH}\pywintypes35.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}\ucrtbase.dll"
File "${BINPATH}\unicodedata.pyd"
File "${BINPATH}\VCRUNTIME140.dll"
File "${BINPATH}\win32wnet.pyd"
@ -132,6 +134,69 @@ Section "install"
File "${BINPATH}\_socket.pyd"
File "${BINPATH}\_ssl.pyd"
SetOutPath "$INSTDIR\Include"
File "${BINPATH}\Include\pyconfig.h"
SetOutPath "$INSTDIR\lib2to3"
File "${BINPATH}\lib2to3\Grammar.txt"
File "${BINPATH}\lib2to3\Grammar3.5.2.final.0.pickle"
File "${BINPATH}\lib2to3\PatternGrammar.txt"
File "${BINPATH}\lib2to3\PatternGrammar3.5.2.final.0.pickle"
SetOutPath "$INSTDIR\share"
File "${BINPATH}\share\license.txt"
File "${BINPATH}\share\version.txt"
File "${BINPATH}\share\wordlist.txt"
SetOutPath "$INSTDIR\share\html"
File "${BINPATH}\share\html\404.html"
File "${BINPATH}\share\html\denied.html"
File "${BINPATH}\share\html\index.html"
SetOutPath "$INSTDIR\share\images"
File "${BINPATH}\share\images\drop_files.png"
File "${BINPATH}\share\images\logo.png"
File "${BINPATH}\share\images\server_started.png"
File "${BINPATH}\share\images\server_stopped.png"
File "${BINPATH}\share\images\server_working.png"
SetOutPath "$INSTDIR\share\locale"
File "${BINPATH}\share\locale\cs.json"
File "${BINPATH}\share\locale\de.json"
File "${BINPATH}\share\locale\en.json"
File "${BINPATH}\share\locale\eo.json"
File "${BINPATH}\share\locale\es.json"
File "${BINPATH}\share\locale\fi.json"
File "${BINPATH}\share\locale\fr.json"
File "${BINPATH}\share\locale\it.json"
File "${BINPATH}\share\locale\nl.json"
File "${BINPATH}\share\locale\no.json"
File "${BINPATH}\share\locale\pt.json"
File "${BINPATH}\share\locale\ru.json"
File "${BINPATH}\share\locale\tr.json"
SetOutPath "$INSTDIR\qt5_plugins\iconengines"
File "${BINPATH}\qt5_plugins\iconengines\qsvgicon.dll"
SetOutPath "$INSTDIR\qt5_plugins\imageformats"
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\qjpeg.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\qt5_plugins\printsupport"
File "${BINPATH}\qt5_plugins\printsupport\windowsprintersupport.dll"
# uninstaller
!ifndef INNER
SetOutPath $INSTDIR
@ -174,58 +239,67 @@ FunctionEnd
Delete "$SMPROGRAMS\${APPNAME}.lnk"
# remove files
Delete "$INSTDIR\imageformats\qdds.dll"
Delete "$INSTDIR\imageformats\qgif.dll"
Delete "$INSTDIR\imageformats\qicns.dll"
Delete "$INSTDIR\imageformats\qico.dll"
Delete "$INSTDIR\imageformats\qjpeg.dll"
Delete "$INSTDIR\imageformats\qsvg.dll"
Delete "$INSTDIR\imageformats\qtga.dll"
Delete "$INSTDIR\imageformats\qtiff.dll"
Delete "$INSTDIR\imageformats\qwbmp.dll"
Delete "$INSTDIR\imageformats\qwebp.dll"
Delete "$INSTDIR\platforms\qminimal.dll"
Delete "$INSTDIR\platforms\qoffscreen.dll"
Delete "$INSTDIR\platforms\qwindows.dll"
Delete "$INSTDIR\resources\license.txt"
Delete "$INSTDIR\resources\version.txt"
Delete "$INSTDIR\resources\wordlist.txt"
Delete "$INSTDIR\resources\html\404.html"
Delete "$INSTDIR\resources\html\denied.html"
Delete "$INSTDIR\resources\html\index.html"
Delete "$INSTDIR\resources\images\logo.png"
Delete "$INSTDIR\resources\images\drop_files.png"
Delete "$INSTDIR\resources\images\server_stopped.png"
Delete "$INSTDIR\resources\images\server_started.png"
Delete "$INSTDIR\resources\images\server_working.png"
Delete "$INSTDIR\resources\locale\de.json"
Delete "$INSTDIR\resources\locale\en.json"
Delete "$INSTDIR\resources\locale\eo.json"
Delete "$INSTDIR\resources\locale\es.json"
Delete "$INSTDIR\resources\locale\fi.json"
Delete "$INSTDIR\resources\locale\fr.json"
Delete "$INSTDIR\resources\locale\it.json"
Delete "$INSTDIR\resources\locale\nl.json"
Delete "$INSTDIR\resources\locale\no.json"
Delete "$INSTDIR\resources\locale\pt.json"
Delete "$INSTDIR\resources\locale\ru.json"
Delete "$INSTDIR\resources\locale\tr.json"
Delete "$INSTDIR\api-ms-win-core-console-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-core-datetime-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-core-debug-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-core-errorhandling-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-core-file-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-core-file-l1-2-0.dll"
Delete "$INSTDIR\api-ms-win-core-file-l2-1-0.dll"
Delete "$INSTDIR\api-ms-win-core-handle-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-core-heap-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-core-interlocked-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-core-libraryloader-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-core-localization-l1-2-0.dll"
Delete "$INSTDIR\api-ms-win-core-memory-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-core-namedpipe-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-core-processenvironment-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-core-processthreads-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-core-processthreads-l1-1-1.dll"
Delete "$INSTDIR\api-ms-win-core-profile-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-core-rtlsupport-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-core-string-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-core-synch-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-core-synch-l1-2-0.dll"
Delete "$INSTDIR\api-ms-win-core-sysinfo-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-core-timezone-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-core-util-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-crt-conio-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-crt-convert-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-crt-environment-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-crt-filesystem-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-crt-heap-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-crt-locale-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-crt-math-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-crt-multibyte-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-crt-process-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-crt-runtime-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-crt-stdio-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-crt-string-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-crt-time-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-crt-utility-l1-1-0.dll"
Delete "$INSTDIR\base_library.zip"
Delete "$INSTDIR\MSVCP140.dll"
Delete "$INSTDIR\MSVCR100.dll"
Delete "$INSTDIR\onionshare-gui.exe"
Delete "$INSTDIR\onionshare.exe"
Delete "$INSTDIR\onionshare-gui.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\python3.dll"
Delete "$INSTDIR\python35.dll"
Delete "$INSTDIR\python35.zip"
Delete "$INSTDIR\pywintypes35.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\ucrtbase.dll"
Delete "$INSTDIR\unicodedata.pyd"
Delete "$INSTDIR\VCRUNTIME140.dll"
Delete "$INSTDIR\win32wnet.pyd"
@ -237,16 +311,64 @@ FunctionEnd
Delete "$INSTDIR\_multiprocessing.pyd"
Delete "$INSTDIR\_socket.pyd"
Delete "$INSTDIR\_ssl.pyd"
Delete "$INSTDIR\Include\pyconfig.h"
Delete "$INSTDIR\lib2to3\Grammar.txt"
Delete "$INSTDIR\lib2to3\Grammar3.5.2.final.0.pickle"
Delete "$INSTDIR\lib2to3\PatternGrammar.txt"
Delete "$INSTDIR\lib2to3\PatternGrammar3.5.2.final.0.pickle"
Delete "$INSTDIR\share\license.txt"
Delete "$INSTDIR\share\version.txt"
Delete "$INSTDIR\share\wordlist.txt"
Delete "$INSTDIR\share\html\404.html"
Delete "$INSTDIR\share\html\denied.html"
Delete "$INSTDIR\share\html\index.html"
Delete "$INSTDIR\share\images\drop_files.png"
Delete "$INSTDIR\share\images\logo.png"
Delete "$INSTDIR\share\images\server_started.png"
Delete "$INSTDIR\share\images\server_stopped.png"
Delete "$INSTDIR\share\images\server_working.png"
Delete "$INSTDIR\share\locale\cs.json"
Delete "$INSTDIR\share\locale\de.json"
Delete "$INSTDIR\share\locale\en.json"
Delete "$INSTDIR\share\locale\eo.json"
Delete "$INSTDIR\share\locale\es.json"
Delete "$INSTDIR\share\locale\fi.json"
Delete "$INSTDIR\share\locale\fr.json"
Delete "$INSTDIR\share\locale\it.json"
Delete "$INSTDIR\share\locale\nl.json"
Delete "$INSTDIR\share\locale\no.json"
Delete "$INSTDIR\share\locale\pt.json"
Delete "$INSTDIR\share\locale\ru.json"
Delete "$INSTDIR\share\locale\tr.json"
Delete "$INSTDIR\qt5_plugins\iconengines\qsvgicon.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\qjpeg.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\qt5_plugins\printsupport\windowsprintersupport.dll"
Delete "$INSTDIR\onionshare.ico"
Delete "$INSTDIR\uninstall.exe"
rmDir "$INSTDIR\imageformats"
rmDir "$INSTDIR\platforms"
rmDir "$INSTDIR\resources\html"
rmDir "$INSTDIR\resources\images"
rmDir "$INSTDIR\resources\locale"
rmDir "$INSTDIR\resources"
rmDir "$INSTDIR\Include"
rmDir "$INSTDIR\lib2to3"
rmDir "$INSTDIR\share"
rmDir "$INSTDIR\share\html"
rmDir "$INSTDIR\share\images"
rmDir "$INSTDIR\share\locale"
rmDir "$INSTDIR\qt5_plugins\iconengines"
rmDir "$INSTDIR\qt5_plugins\imageformats"
rmDir "$INSTDIR\qt5_plugins\platforms"
rmDir "$INSTDIR\qt5_plugins\printsupport"
rmDir "$INSTDIR\qt5_plugins"
rmDir "$INSTDIR"
# remove uninstaller information from the registry