diff --git a/BUILD.md b/BUILD.md index 97bc617..6377d1b 100644 --- a/BUILD.md +++ b/BUILD.md @@ -187,6 +187,13 @@ poetry run pyinstaller install\pyinstaller\pyinstaller.spec `dangerzone.exe` and all of their supporting files will get created inside the `dist` folder. +You then must create a symbolic link for dangerzone to run. To do this, open a command prompt _as an administrator_, cd to the dangerzone folder, and run: + +``` +cd dist\dangerzone +mklink dangerzone-container.exe dangerzone.exe +``` + ### To build the installer 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`. @@ -194,7 +201,20 @@ Note that you must have a codesigning certificate installed in order to use the Open a command prompt, cd to the dangerzone directory, and run: ``` -poetry run install\windows\build.bat +poetry run install\windows\step1-build-exe.bat ``` +Open a second command prompt _as an administratror_, cd to the dangerzone directory, and run: + +``` +install\windows\step2-make-symlink.bat +``` + +Then back in the first command prompt, run: + +``` +poetry run install\windows\step3-build-installer.bat +``` + + When you're done you will have `dist\Dangerzone.msi`. diff --git a/install/windows/Dangerzone.wxs b/install/windows/Dangerzone.wxs index 70ddf43..2c3467f 100644 --- a/install/windows/Dangerzone.wxs +++ b/install/windows/Dangerzone.wxs @@ -1,5 +1,5 @@ - + @@ -64,6 +64,7 @@ + diff --git a/install/windows/step1-build-exe.bat b/install/windows/step1-build-exe.bat new file mode 100644 index 0000000..dacc95a --- /dev/null +++ b/install/windows/step1-build-exe.bat @@ -0,0 +1,9 @@ +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 code sign dangerzone.exe +signtool.exe sign /v /d "Dangerzone" /a /tr http://time.certum.pl/ dist\dangerzone\dangerzone.exe diff --git a/install/windows/step2-make-symlink.bat b/install/windows/step2-make-symlink.bat new file mode 100644 index 0000000..1f17c58 --- /dev/null +++ b/install/windows/step2-make-symlink.bat @@ -0,0 +1,4 @@ +REM make dangerzone-container.exe symbolic link (as administrator) +cd dist\dangerzone +mklink dangerzone-container.exe dangerzone.exe +cd ..\.. \ No newline at end of file diff --git a/install/windows/build.bat b/install/windows/step3-build-installer.bat similarity index 54% rename from install/windows/build.bat rename to install/windows/step3-build-installer.bat index 06ed65b..c62f24e 100644 --- a/install/windows/build.bat +++ b/install/windows/step3-build-installer.bat @@ -1,13 +1,3 @@ -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 code sign dangerzone.exe -signtool.exe sign /v /d "Dangerzone" /a /tr http://time.certum.pl/ dist\dangerzone\dangerzone.exe - REM build the msi package cd build mkdir wix