diff --git a/BUILD.md b/BUILD.md index a042f27..cef74da 100644 --- a/BUILD.md +++ b/BUILD.md @@ -157,8 +157,9 @@ Now the next time you use PyInstaller to build dangerzone, the `.exe` file shoul ### If you want to build the installer -* Go to http://nsis.sourceforge.net/Download and download the latest NSIS. I downloaded `nsis-3.05-setup.exe`. -* Add `C:\Program Files (x86)\NSIS` to the path. +* Go to https://dotnet.microsoft.com/download/dotnet-framework and download and install .NET Framework 3.5 SP1 Runtime. I downloaded `dotnetfx35.exe`. +* Go to https://wixtoolset.org/releases/ and download and install WiX toolset. I downloaded `wix311.exe`. +* Add `C:\Program Files (x86)\WiX Toolset v3.1.1\bin` to the path. ### If you want to sign binaries with Authenticode @@ -177,12 +178,12 @@ poetry run pyinstaller install\pyinstaller\pyinstaller.spec ### To build the installer -Note that you must have a codesigning certificate installed in order to use the `install\windows\build_exe.bat` script, because it codesigns `dangerzone.exe`, `uninstall.exe`, and `dangerzone-setup.exe`. +Note that you must have a codesigning certificate installed in order to use the `install\windows\build.bat` script, because it codesigns `dangerzone.exe` and `Dangerzone.msi`. Open a command prompt, cd to the dangerzone directory, and run: ``` -poetry run install\build_exe.bat +poetry run install\windows\build.bat ``` -This will prompt you to codesign three binaries and execute one unsigned binary. When you're done clicking through everything you will have `dist\dangerzone-setup.exe`. \ No newline at end of file +When you're done you will have `dist\Dangerzone.msi`. \ No newline at end of file diff --git a/dangerzone/settings_widget.py b/dangerzone/settings_widget.py index a4f7700..c44c7b9 100644 --- a/dangerzone/settings_widget.py +++ b/dangerzone/settings_widget.py @@ -114,7 +114,8 @@ class SettingsWidget(QtWidgets.QWidget): # Is update containers required? output = subprocess.check_output( - [self.common.container_runtime, "image", "ls", "dangerzone"] + [self.common.container_runtime, "image", "ls", "dangerzone"], + startupinfo=self.common.get_subprocess_startupinfo(), ) if b"dangerzone" not in output: self.update_checkbox.setCheckState(QtCore.Qt.Checked) diff --git a/install/pyinstaller/pyinstaller.spec b/install/pyinstaller/pyinstaller.spec index 41944fa..4b14d42 100644 --- a/install/pyinstaller/pyinstaller.spec +++ b/install/pyinstaller/pyinstaller.spec @@ -23,6 +23,11 @@ if p == "Darwin": else: datas = [("../../share", "share")] +if p == "Windows": + icon = os.path.join(root, "install", "windows", "dangerzone.ico") +else: + icon = None + a = Analysis( ["dangerzone"], pathex=["."], @@ -48,6 +53,7 @@ exe = EXE( strip=False, upx=True, console=False, + icon=icon, ) coll = COLLECT( diff --git a/install/windows/Dangerzone.wxs b/install/windows/Dangerzone.wxs new file mode 100644 index 0000000..d6f855b --- /dev/null +++ b/install/windows/Dangerzone.wxs @@ -0,0 +1,247 @@ + + + + + + + + + + + + + + + + + + + + + NOT NEWERVERSIONDETECTED + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install/windows/build.bat b/install/windows/build.bat new file mode 100644 index 0000000..fe60330 --- /dev/null +++ b/install/windows/build.bat @@ -0,0 +1,21 @@ +REM delete old dist and build files +rmdir /s /q dist +rmdir /s /q build + +REM build the exe with pyinstaller +pyinstaller install\pyinstaller\pyinstaller.spec + +REM TODO: code sign dangerzone.exe + +REM build the msi package +cd build +mkdir wix +cd wix +candle.exe ..\..\install\windows\Dangerzone.wxs +light.exe -ext WixUIExtension Dangerzone.wixobj + +REM TODO: code sign dangerzone.msi + +REM moving dangerzone.msi to dist +cd ..\.. +move build\wix\Dangerzone.msi dist diff --git a/install/windows/dangerzone.ico b/install/windows/dangerzone.ico new file mode 100644 index 0000000..e89af0d Binary files /dev/null and b/install/windows/dangerzone.ico differ diff --git a/install/windows/dialog.bmp b/install/windows/dialog.bmp new file mode 100644 index 0000000..75d2651 Binary files /dev/null and b/install/windows/dialog.bmp differ diff --git a/install/windows/license.rtf b/install/windows/license.rtf new file mode 100755 index 0000000..f31674a Binary files /dev/null and b/install/windows/license.rtf differ