mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-29 18:22:37 +02:00
Create dangerzone-container.exe symlink in Windows when creating the binary and installer
This commit is contained in:
parent
1f7f29a456
commit
4d6de4f077
5 changed files with 36 additions and 12 deletions
22
BUILD.md
22
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.
|
`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
|
### 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`.
|
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:
|
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`.
|
When you're done you will have `dist\Dangerzone.msi`.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version='1.0' encoding='windows-1252'?>
|
<?xml version='1.0' encoding='windows-1252'?>
|
||||||
<?define ProductVersion = "0.1"?>
|
<?define ProductVersion = "0.1.0"?>
|
||||||
<?define ProductUpgradeCode = "12b9695c-965b-4be0-bc33-21274e809576"?>
|
<?define ProductUpgradeCode = "12b9695c-965b-4be0-bc33-21274e809576"?>
|
||||||
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
|
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
|
||||||
<Product Name="Dangerzone" Manufacturer="First Look Media" Id="f40ff0a9-ebf8-4e1e-9bce-6ab5c74fe119" UpgradeCode="$(var.ProductUpgradeCode)" Language="1033" Codepage="1252" Version="$(var.ProductVersion)">
|
<Product Name="Dangerzone" Manufacturer="First Look Media" Id="f40ff0a9-ebf8-4e1e-9bce-6ab5c74fe119" UpgradeCode="$(var.ProductUpgradeCode)" Language="1033" Codepage="1252" Version="$(var.ProductVersion)">
|
||||||
|
@ -64,6 +64,7 @@
|
||||||
<File Source="..\..\dist\dangerzone\d3dcompiler_47.dll" />
|
<File Source="..\..\dist\dangerzone\d3dcompiler_47.dll" />
|
||||||
<File Source="..\..\dist\dangerzone\dangerzone.exe" />
|
<File Source="..\..\dist\dangerzone\dangerzone.exe" />
|
||||||
<File Source="..\..\dist\dangerzone\dangerzone.exe.manifest" />
|
<File Source="..\..\dist\dangerzone\dangerzone.exe.manifest" />
|
||||||
|
<File Source="..\..\dist\dangerzone\dangerzone-container.exe" />
|
||||||
<File Source="..\..\dist\dangerzone\libcrypto-1_1.dll" />
|
<File Source="..\..\dist\dangerzone\libcrypto-1_1.dll" />
|
||||||
<File Source="..\..\dist\dangerzone\libEGL.dll" />
|
<File Source="..\..\dist\dangerzone\libEGL.dll" />
|
||||||
<File Source="..\..\dist\dangerzone\libGLESv2.dll" />
|
<File Source="..\..\dist\dangerzone\libGLESv2.dll" />
|
||||||
|
|
9
install/windows/step1-build-exe.bat
Normal file
9
install/windows/step1-build-exe.bat
Normal file
|
@ -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
|
4
install/windows/step2-make-symlink.bat
Normal file
4
install/windows/step2-make-symlink.bat
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
REM make dangerzone-container.exe symbolic link (as administrator)
|
||||||
|
cd dist\dangerzone
|
||||||
|
mklink dangerzone-container.exe dangerzone.exe
|
||||||
|
cd ..\..
|
|
@ -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
|
REM build the msi package
|
||||||
cd build
|
cd build
|
||||||
mkdir wix
|
mkdir wix
|
Loading…
Reference in a new issue