mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-05-03 12:11:50 +02:00
Compare commits
17 commits
5c9f5fe34c
...
223fb0f1b9
Author | SHA1 | Date | |
---|---|---|---|
![]() |
223fb0f1b9 | ||
![]() |
8603cd3b86 | ||
![]() |
7e4346a306 | ||
![]() |
dba5b7a3ac | ||
![]() |
a0f99f89f7 | ||
![]() |
c1dc2490b5 | ||
![]() |
6e2a95326d | ||
![]() |
5d47984e45 | ||
![]() |
d61f8667ae | ||
![]() |
4f97ed4177 | ||
![]() |
9035497da3 | ||
![]() |
ea3f4c88a5 | ||
![]() |
a1dba4a098 | ||
![]() |
aab5bd08d7 | ||
![]() |
965210dee5 | ||
![]() |
f7f81c5960 | ||
![]() |
8c26f3512b |
2 changed files with 36 additions and 31 deletions
|
@ -28,6 +28,7 @@ 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,7 +84,9 @@ 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.
|
||||||
version = f.read().strip().split("-")[0]
|
dangerzone_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__)))),
|
||||||
|
@ -122,17 +124,18 @@ def main():
|
||||||
"Package",
|
"Package",
|
||||||
Name="Dangerzone",
|
Name="Dangerzone",
|
||||||
Manufacturer="Freedom of the Press Foundation",
|
Manufacturer="Freedom of the Press Foundation",
|
||||||
UpgradeCode="12B9695C-965B-4BE0-BC33-21274E809576",
|
UpgradeCode=dangerzone_product_upgrade_code,
|
||||||
Language="1033",
|
Language="1033",
|
||||||
Compressed="yes",
|
Compressed="yes",
|
||||||
Codepage="1252",
|
Codepage="1252",
|
||||||
Version=version,
|
Version=dangerzone_version,
|
||||||
)
|
)
|
||||||
|
|
||||||
ET.SubElement(
|
ET.SubElement(
|
||||||
package_el,
|
package_el,
|
||||||
"SummaryInformation",
|
"SummaryInformation",
|
||||||
Keywords="Installer",
|
Keywords="Installer",
|
||||||
Description="Dangerzone " + version + " Installer",
|
Description="Dangerzone " + dangerzone_version + " Installer",
|
||||||
Codepage="1252",
|
Codepage="1252",
|
||||||
)
|
)
|
||||||
ET.SubElement(package_el, "MediaTemplate", EmbedCab="yes")
|
ET.SubElement(package_el, "MediaTemplate", EmbedCab="yes")
|
||||||
|
@ -152,40 +155,22 @@ 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 v3 to v5 where the older
|
# Workaround for an issue after upgrading from WiX Toolset 3 to 5 where the older
|
||||||
# version of Dangerzone is not uninstalled during the upgrade
|
# version of Dangerzone is not uninstalled during the upgrade
|
||||||
#
|
#
|
||||||
# Fix the issue by adding some extra functionality to the "Next" button on the welcome screen
|
# Work around 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 v3
|
# 1. Flips the install scope to "perUser" which is the default in WiX 3
|
||||||
# 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 v4 and newer
|
# 3. And finally flips the scope back to "perMachine" which is the default in WiX 4 and newer
|
||||||
#
|
#
|
||||||
# Adapted from this stack overflow answer: https://stackoverflow.com/a/35064434
|
# Adapted from this stack overflow answer: https://stackoverflow.com/a/35064434
|
||||||
#
|
#
|
||||||
|
@ -215,13 +200,32 @@ 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",
|
||||||
|
@ -255,14 +259,14 @@ def main():
|
||||||
Id="ProgramFiles64Folder",
|
Id="ProgramFiles64Folder",
|
||||||
)
|
)
|
||||||
|
|
||||||
# Create the directory structure for the installed product
|
# Generate the directory layout 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