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
|
||||
|
||||
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
|
||||
|
||||
REM verify the signature of Dangerzone.msi
|
||||
|
|
|
@ -84,9 +84,7 @@ def main():
|
|||
with open(version_filename) as f:
|
||||
# Read the Dangerzone version from share/version.txt, and remove any potential
|
||||
# -rc markers.
|
||||
dangerzone_version = f.read().strip().split("-")[0]
|
||||
|
||||
dangerzone_product_upgrade_code = "12B9695C-965B-4BE0-BC33-21274E809576"
|
||||
version = f.read().strip().split("-")[0]
|
||||
|
||||
build_dir = os.path.join(
|
||||
os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))),
|
||||
|
@ -124,18 +122,17 @@ def main():
|
|||
"Package",
|
||||
Name="Dangerzone",
|
||||
Manufacturer="Freedom of the Press Foundation",
|
||||
UpgradeCode=dangerzone_product_upgrade_code,
|
||||
UpgradeCode="12B9695C-965B-4BE0-BC33-21274E809576",
|
||||
Language="1033",
|
||||
Compressed="yes",
|
||||
Codepage="1252",
|
||||
Version=dangerzone_version,
|
||||
Version=version,
|
||||
)
|
||||
|
||||
ET.SubElement(
|
||||
package_el,
|
||||
"SummaryInformation",
|
||||
Keywords="Installer",
|
||||
Description="Dangerzone " + dangerzone_version + " Installer",
|
||||
Description="Dangerzone " + version + " Installer",
|
||||
Codepage="1252",
|
||||
)
|
||||
ET.SubElement(package_el, "MediaTemplate", EmbedCab="yes")
|
||||
|
@ -155,22 +152,40 @@ def main():
|
|||
Id="ARPURLINFOABOUT",
|
||||
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")
|
||||
|
||||
ET.SubElement(
|
||||
ui_el, "ui:WixUI", Id="WixUI_InstallDir", InstallDirectory="INSTALLFOLDER"
|
||||
)
|
||||
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
|
||||
#
|
||||
# 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:
|
||||
# 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
|
||||
# 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
|
||||
#
|
||||
|
@ -200,32 +215,13 @@ def main():
|
|||
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
|
||||
programmenufolder_el = ET.SubElement(
|
||||
package_el,
|
||||
"StandardDirectory",
|
||||
Id="ProgramMenuFolder",
|
||||
)
|
||||
|
||||
# Add a shortcut for Dangerzone in the Start menu
|
||||
shortcut_el = ET.SubElement(
|
||||
programmenufolder_el,
|
||||
"Component",
|
||||
|
@ -259,14 +255,14 @@ def main():
|
|||
Id="ProgramFiles64Folder",
|
||||
)
|
||||
|
||||
# Generate the directory layout for the installed product
|
||||
# Create the directory structure for the installed product
|
||||
build_directory_xml(programfilesfolder_el, data)
|
||||
|
||||
# Create a component group for application components
|
||||
applicationcomponents_el = ET.SubElement(
|
||||
package_el, "ComponentGroup", Id="ApplicationComponents"
|
||||
)
|
||||
|
||||
# Generate the components for the installed product
|
||||
# Populate the application components group with components for the installed package
|
||||
build_components_xml(applicationcomponents_el, data)
|
||||
|
||||
# Add the Feature element
|
||||
|
|
Loading…
Reference in a new issue