mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-05-03 12:11:50 +02:00
Compare commits
17 commits
223fb0f1b9
...
5c9f5fe34c
Author | SHA1 | Date | |
---|---|---|---|
![]() |
5c9f5fe34c | ||
![]() |
5bb09f7c03 | ||
![]() |
2149ad8963 | ||
![]() |
096b075126 | ||
![]() |
5ecfbcd323 | ||
![]() |
2d95c078d3 | ||
![]() |
b1d9bfccab | ||
![]() |
31e865a347 | ||
![]() |
b9c9dbccae | ||
![]() |
a78f0a7000 | ||
![]() |
cd9eafbd63 | ||
![]() |
e8202759f1 | ||
![]() |
1a84fbe998 | ||
![]() |
287bd55c2e | ||
![]() |
6ca30a39b2 | ||
![]() |
0f2a385913 | ||
![]() |
3df5c0d3be |
2 changed files with 31 additions and 36 deletions
|
@ -28,7 +28,6 @@ REM validate Dangerzone.msi
|
||||||
wix msi validate Dangerzone.msi
|
wix msi validate Dangerzone.msi
|
||||||
|
|
||||||
REM code sign Dangerzone.msi
|
REM code sign Dangerzone.msi
|
||||||
wix msi inscribe Dangerzone.msi
|
|
||||||
signtool.exe sign /v /d "Dangerzone" /a /n "Freedom of the Press Foundation" /fd sha256 /t http://time.certum.pl/ Dangerzone.msi
|
signtool.exe sign /v /d "Dangerzone" /a /n "Freedom of the Press Foundation" /fd sha256 /t http://time.certum.pl/ Dangerzone.msi
|
||||||
|
|
||||||
REM verify the signature of Dangerzone.msi
|
REM verify the signature of Dangerzone.msi
|
||||||
|
|
|
@ -84,9 +84,7 @@ def main():
|
||||||
with open(version_filename) as f:
|
with open(version_filename) as f:
|
||||||
# Read the Dangerzone version from share/version.txt, and remove any potential
|
# Read the Dangerzone version from share/version.txt, and remove any potential
|
||||||
# -rc markers.
|
# -rc markers.
|
||||||
dangerzone_version = f.read().strip().split("-")[0]
|
version = f.read().strip().split("-")[0]
|
||||||
|
|
||||||
dangerzone_product_upgrade_code = "12B9695C-965B-4BE0-BC33-21274E809576"
|
|
||||||
|
|
||||||
build_dir = os.path.join(
|
build_dir = os.path.join(
|
||||||
os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))),
|
os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))),
|
||||||
|
@ -124,18 +122,17 @@ def main():
|
||||||
"Package",
|
"Package",
|
||||||
Name="Dangerzone",
|
Name="Dangerzone",
|
||||||
Manufacturer="Freedom of the Press Foundation",
|
Manufacturer="Freedom of the Press Foundation",
|
||||||
UpgradeCode=dangerzone_product_upgrade_code,
|
UpgradeCode="12B9695C-965B-4BE0-BC33-21274E809576",
|
||||||
Language="1033",
|
Language="1033",
|
||||||
Compressed="yes",
|
Compressed="yes",
|
||||||
Codepage="1252",
|
Codepage="1252",
|
||||||
Version=dangerzone_version,
|
Version=version,
|
||||||
)
|
)
|
||||||
|
|
||||||
ET.SubElement(
|
ET.SubElement(
|
||||||
package_el,
|
package_el,
|
||||||
"SummaryInformation",
|
"SummaryInformation",
|
||||||
Keywords="Installer",
|
Keywords="Installer",
|
||||||
Description="Dangerzone " + dangerzone_version + " Installer",
|
Description="Dangerzone " + version + " Installer",
|
||||||
Codepage="1252",
|
Codepage="1252",
|
||||||
)
|
)
|
||||||
ET.SubElement(package_el, "MediaTemplate", EmbedCab="yes")
|
ET.SubElement(package_el, "MediaTemplate", EmbedCab="yes")
|
||||||
|
@ -155,22 +152,40 @@ def main():
|
||||||
Id="ARPURLINFOABOUT",
|
Id="ARPURLINFOABOUT",
|
||||||
Value="https://freedom.press",
|
Value="https://freedom.press",
|
||||||
)
|
)
|
||||||
|
ET.SubElement(
|
||||||
|
package_el,
|
||||||
|
"WixVariable",
|
||||||
|
Id="WixUILicenseRtf",
|
||||||
|
Value="..\\install\\windows\\license.rtf",
|
||||||
|
)
|
||||||
|
ET.SubElement(
|
||||||
|
package_el,
|
||||||
|
"WixVariable",
|
||||||
|
Id="WixUIDialogBmp",
|
||||||
|
Value="..\\install\\windows\\dialog.bmp",
|
||||||
|
)
|
||||||
|
ET.SubElement(
|
||||||
|
package_el,
|
||||||
|
"MajorUpgrade",
|
||||||
|
AllowSameVersionUpgrades="yes",
|
||||||
|
DowngradeErrorMessage="A newer version of [ProductName] is already installed. If you are sure you want to downgrade, remove the existing installation via Programs and Features.",
|
||||||
|
)
|
||||||
|
|
||||||
|
# Add The UI element
|
||||||
ui_el = ET.SubElement(package_el, "UI")
|
ui_el = ET.SubElement(package_el, "UI")
|
||||||
|
|
||||||
ET.SubElement(
|
ET.SubElement(
|
||||||
ui_el, "ui:WixUI", Id="WixUI_InstallDir", InstallDirectory="INSTALLFOLDER"
|
ui_el, "ui:WixUI", Id="WixUI_InstallDir", InstallDirectory="INSTALLFOLDER"
|
||||||
)
|
)
|
||||||
ET.SubElement(ui_el, "UIRef", Id="WixUI_ErrorProgressText")
|
ET.SubElement(ui_el, "UIRef", Id="WixUI_ErrorProgressText")
|
||||||
|
|
||||||
# Workaround for an issue after upgrading from WiX Toolset 3 to 5 where the older
|
# Workaround for an issue after upgrading from WiX Toolset v3 to v5 where the older
|
||||||
# version of Dangerzone is not uninstalled during the upgrade
|
# version of Dangerzone is not uninstalled during the upgrade
|
||||||
#
|
#
|
||||||
# Work around the issue by adding some extra functionality to the "Next" button on the welcome screen
|
# Fix the issue by adding some extra functionality to the "Next" button on the welcome screen
|
||||||
# of the installer. When the user clicks it to proceed with the installation this:
|
# of the installer. When the user clicks it to proceed with the installation this:
|
||||||
# 1. Flips the install scope to "perUser" which is the default in WiX 3
|
# 1. Flips the install scope to "perUser" which is the default in WiX v3
|
||||||
# 2. Finds the older installation
|
# 2. Finds the older installation
|
||||||
# 3. And finally flips the scope back to "perMachine" which is the default in WiX 4 and newer
|
# 3. And finally flips the scope back to "perMachine" which is the default in WiX v4 and newer
|
||||||
#
|
#
|
||||||
# Adapted from this stack overflow answer: https://stackoverflow.com/a/35064434
|
# Adapted from this stack overflow answer: https://stackoverflow.com/a/35064434
|
||||||
#
|
#
|
||||||
|
@ -200,32 +215,13 @@ def main():
|
||||||
Value="1",
|
Value="1",
|
||||||
)
|
)
|
||||||
|
|
||||||
ET.SubElement(
|
|
||||||
package_el,
|
|
||||||
"WixVariable",
|
|
||||||
Id="WixUILicenseRtf",
|
|
||||||
Value="..\\install\\windows\\license.rtf",
|
|
||||||
)
|
|
||||||
ET.SubElement(
|
|
||||||
package_el,
|
|
||||||
"WixVariable",
|
|
||||||
Id="WixUIDialogBmp",
|
|
||||||
Value="..\\install\\windows\\dialog.bmp",
|
|
||||||
)
|
|
||||||
ET.SubElement(
|
|
||||||
package_el,
|
|
||||||
"MajorUpgrade",
|
|
||||||
AllowSameVersionUpgrades="yes",
|
|
||||||
DowngradeErrorMessage="A newer version of [ProductName] is already installed. If you are sure you want to downgrade, remove the existing installation via Programs and Features.",
|
|
||||||
)
|
|
||||||
|
|
||||||
# Add the ProgramMenuFolder StandardDirectory
|
# Add the ProgramMenuFolder StandardDirectory
|
||||||
programmenufolder_el = ET.SubElement(
|
programmenufolder_el = ET.SubElement(
|
||||||
package_el,
|
package_el,
|
||||||
"StandardDirectory",
|
"StandardDirectory",
|
||||||
Id="ProgramMenuFolder",
|
Id="ProgramMenuFolder",
|
||||||
)
|
)
|
||||||
|
# Add a shortcut for Dangerzone in the Start menu
|
||||||
shortcut_el = ET.SubElement(
|
shortcut_el = ET.SubElement(
|
||||||
programmenufolder_el,
|
programmenufolder_el,
|
||||||
"Component",
|
"Component",
|
||||||
|
@ -259,14 +255,14 @@ def main():
|
||||||
Id="ProgramFiles64Folder",
|
Id="ProgramFiles64Folder",
|
||||||
)
|
)
|
||||||
|
|
||||||
# Generate the directory layout for the installed product
|
# Create the directory structure for the installed product
|
||||||
build_directory_xml(programfilesfolder_el, data)
|
build_directory_xml(programfilesfolder_el, data)
|
||||||
|
|
||||||
|
# Create a component group for application components
|
||||||
applicationcomponents_el = ET.SubElement(
|
applicationcomponents_el = ET.SubElement(
|
||||||
package_el, "ComponentGroup", Id="ApplicationComponents"
|
package_el, "ComponentGroup", Id="ApplicationComponents"
|
||||||
)
|
)
|
||||||
|
# Populate the application components group with components for the installed package
|
||||||
# Generate the components for the installed product
|
|
||||||
build_components_xml(applicationcomponents_el, data)
|
build_components_xml(applicationcomponents_el, data)
|
||||||
|
|
||||||
# Add the Feature element
|
# Add the Feature element
|
||||||
|
|
Loading…
Reference in a new issue