Change: Merge Product into Package element

- The Keywords and Description items move under a new SummaryInformation element.
- Shuffle things around so that elements previously under the product element are now under the Package element.
- Rename SummaryCodepage in SummaryInformation to Codepage and remove a duplicate Manufacturer item.
- Remove InstallerVersion and let WiX set it to default value. (500 a.k.a Windows 7)
This commit is contained in:
JKarasti 2024-09-23 20:31:58 +03:00 committed by Alex Pyrgiotis
parent 180b9442ab
commit cc5ba29455
No known key found for this signature in database
GPG key ID: B6C15EBA0357C9AA

View file

@ -160,77 +160,75 @@ def main():
# Add the Wix root element # Add the Wix root element
wix_el = ET.Element("Wix", xmlns="http://wixtoolset.org/schemas/v4/wxs") wix_el = ET.Element("Wix", xmlns="http://wixtoolset.org/schemas/v4/wxs")
product_el = ET.SubElement(
# Add the Package element
package_el = ET.SubElement(
wix_el, wix_el,
"Product", "Package",
Name="Dangerzone", Name="Dangerzone",
Manufacturer="Freedom of the Press Foundation", Manufacturer="Freedom of the Press Foundation",
Id="*",
UpgradeCode="$(var.ProductUpgradeCode)", UpgradeCode="$(var.ProductUpgradeCode)",
Language="1033", Language="1033",
Compressed="yes",
Codepage="1252", Codepage="1252",
Version="$(var.ProductVersion)", Version="$(var.ProductVersion)",
) )
ET.SubElement( ET.SubElement(
product_el, package_el,
"Package", "SummaryInformation",
Id="*",
Keywords="Installer", Keywords="Installer",
Description="Dangerzone $(var.ProductVersion) Installer", Description="Dangerzone $(var.ProductVersion) Installer",
Manufacturer="Freedom of the Press Foundation", Codepage="1252",
InstallerVersion="100",
Languages="1033",
Compressed="yes",
SummaryCodepage="1252",
) )
ET.SubElement(product_el, "Media", Id="1", Cabinet="product.cab", EmbedCab="yes") ET.SubElement(package_el, "Media", Id="1", Cabinet="product.cab", EmbedCab="yes")
ET.SubElement( ET.SubElement(
product_el, "Icon", Id="ProductIcon", SourceFile="..\\share\\dangerzone.ico" package_el, "Icon", Id="ProductIcon", SourceFile="..\\share\\dangerzone.ico"
) )
ET.SubElement(product_el, "Property", Id="ARPPRODUCTICON", Value="ProductIcon") ET.SubElement(package_el, "Property", Id="ARPPRODUCTICON", Value="ProductIcon")
ET.SubElement( ET.SubElement(
product_el, package_el,
"Property", "Property",
Id="ARPHELPLINK", Id="ARPHELPLINK",
Value="https://dangerzone.rocks", Value="https://dangerzone.rocks",
) )
ET.SubElement( ET.SubElement(
product_el, package_el,
"Property", "Property",
Id="ARPURLINFOABOUT", Id="ARPURLINFOABOUT",
Value="https://freedom.press", Value="https://freedom.press",
) )
ET.SubElement( ET.SubElement(
product_el, package_el,
"Property", "Property",
Id="WIXUI_INSTALLDIR", Id="WIXUI_INSTALLDIR",
Value="INSTALLFOLDER", Value="INSTALLFOLDER",
) )
ET.SubElement(product_el, "UIRef", Id="WixUI_InstallDir") ET.SubElement(package_el, "UIRef", Id="WixUI_InstallDir")
ET.SubElement(product_el, "UIRef", Id="WixUI_ErrorProgressText") ET.SubElement(package_el, "UIRef", Id="WixUI_ErrorProgressText")
ET.SubElement( ET.SubElement(
product_el, package_el,
"WixVariable", "WixVariable",
Id="WixUILicenseRtf", Id="WixUILicenseRtf",
Value="..\\install\\windows\\license.rtf", Value="..\\install\\windows\\license.rtf",
) )
ET.SubElement( ET.SubElement(
product_el, package_el,
"WixVariable", "WixVariable",
Id="WixUIDialogBmp", Id="WixUIDialogBmp",
Value="..\\install\\windows\\dialog.bmp", Value="..\\install\\windows\\dialog.bmp",
) )
ET.SubElement( ET.SubElement(
product_el, package_el,
"MajorUpgrade", "MajorUpgrade",
AllowSameVersionUpgrades="yes", 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.", 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.",
) )
build_dir_xml(product_el, data) build_dir_xml(package_el, data)
component_ids = build_components_xml(product_el, data) component_ids = build_components_xml(package_el, data)
feature_el = ET.SubElement(product_el, "Feature", Id="DefaultFeature", Level="1") # Add the Feature element
feature_el = ET.SubElement(package_el, "Feature", Id="DefaultFeature", Level="1")
for component_id in component_ids: for component_id in component_ids:
ET.SubElement(feature_el, "ComponentRef", Id=component_id) ET.SubElement(feature_el, "ComponentRef", Id=component_id)
ET.SubElement(feature_el, "ComponentRef", Id="ApplicationShortcuts") ET.SubElement(feature_el, "ComponentRef", Id="ApplicationShortcuts")