mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
Change: Wrap ProgramMenuFolder
component with a StandardDirectory
component
This commit is contained in:
parent
68da50a6b2
commit
4638444290
1 changed files with 33 additions and 32 deletions
|
@ -61,34 +61,6 @@ def build_dir_xml(root, data):
|
||||||
for subdata in data["dirs"]:
|
for subdata in data["dirs"]:
|
||||||
build_dir_xml(el, subdata)
|
build_dir_xml(el, subdata)
|
||||||
|
|
||||||
# If this is the ProgramMenuFolder, add the menu component
|
|
||||||
if "id" in data and data["id"] == "ProgramMenuFolder":
|
|
||||||
component_el = ET.SubElement(
|
|
||||||
el,
|
|
||||||
"Component",
|
|
||||||
Id="ApplicationShortcuts",
|
|
||||||
Guid="539e7de8-a124-4c09-aa55-0dd516aad7bc",
|
|
||||||
)
|
|
||||||
ET.SubElement(
|
|
||||||
component_el,
|
|
||||||
"Shortcut",
|
|
||||||
Id="ApplicationShortcut1",
|
|
||||||
Name="Dangerzone",
|
|
||||||
Description="Dangerzone",
|
|
||||||
Target="[INSTALLFOLDER]dangerzone.exe",
|
|
||||||
WorkingDirectory="INSTALLFOLDER",
|
|
||||||
)
|
|
||||||
ET.SubElement(
|
|
||||||
component_el,
|
|
||||||
"RegistryValue",
|
|
||||||
Root="HKCU",
|
|
||||||
Key="Software\\Freedom of the Press Foundation\\Dangerzone",
|
|
||||||
Name="installed",
|
|
||||||
Type="integer",
|
|
||||||
Value="1",
|
|
||||||
KeyPath="yes",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def build_components_xml(root, data):
|
def build_components_xml(root, data):
|
||||||
component_ids = []
|
component_ids = []
|
||||||
|
@ -142,10 +114,6 @@ def main():
|
||||||
"id": "ProgramFilesFolder",
|
"id": "ProgramFilesFolder",
|
||||||
"dirs": [],
|
"dirs": [],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"id": "ProgramMenuFolder",
|
|
||||||
"dirs": [],
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,6 +191,39 @@ def main():
|
||||||
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.",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# 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",
|
||||||
|
Id="ApplicationShortcuts",
|
||||||
|
Guid="539e7de8-a124-4c09-aa55-0dd516aad7bc",
|
||||||
|
)
|
||||||
|
ET.SubElement(
|
||||||
|
shortcut_el,
|
||||||
|
"Shortcut",
|
||||||
|
Id="DangerzoneStartMenuShortcut",
|
||||||
|
Name="Dangerzone",
|
||||||
|
Description="Dangerzone",
|
||||||
|
Target="[INSTALLFOLDER]dangerzone.exe",
|
||||||
|
WorkingDirectory="INSTALLFOLDER",
|
||||||
|
)
|
||||||
|
ET.SubElement(
|
||||||
|
shortcut_el,
|
||||||
|
"RegistryValue",
|
||||||
|
Root="HKCU",
|
||||||
|
Key="Software\\Freedom of the Press Foundation\\Dangerzone",
|
||||||
|
Name="installed",
|
||||||
|
Type="integer",
|
||||||
|
Value="1",
|
||||||
|
KeyPath="yes",
|
||||||
|
)
|
||||||
|
|
||||||
build_dir_xml(package_el, data)
|
build_dir_xml(package_el, data)
|
||||||
component_ids = build_components_xml(package_el, data)
|
component_ids = build_components_xml(package_el, data)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue