mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-29 10:12:38 +02:00
Change: Write Dangerzone.wxs inside the script directly
Also reduce duplication slightly by definig `build_dir`, `cx_freeze_dir` and `dist_dir`
This commit is contained in:
parent
5d47984e45
commit
6e2a95326d
1 changed files with 11 additions and 4 deletions
|
@ -88,11 +88,15 @@ def main():
|
||||||
|
|
||||||
dangerzone_product_upgrade_code = "12B9695C-965B-4BE0-BC33-21274E809576"
|
dangerzone_product_upgrade_code = "12B9695C-965B-4BE0-BC33-21274E809576"
|
||||||
|
|
||||||
dist_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__)))),
|
||||||
"build",
|
"build",
|
||||||
"exe.win-amd64-3.12",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
cx_freeze_dir = "exe.win-amd64-3.12"
|
||||||
|
|
||||||
|
dist_dir = os.path.join(build_dir, cx_freeze_dir)
|
||||||
|
|
||||||
if not os.path.exists(dist_dir):
|
if not os.path.exists(dist_dir):
|
||||||
print("You must build the dangerzone binary before running this")
|
print("You must build the dangerzone binary before running this")
|
||||||
return
|
return
|
||||||
|
@ -100,7 +104,7 @@ def main():
|
||||||
# Prepare data for WiX file harvesting from the output of cx_Freeze
|
# Prepare data for WiX file harvesting from the output of cx_Freeze
|
||||||
data = build_data(
|
data = build_data(
|
||||||
dist_dir,
|
dist_dir,
|
||||||
"exe.win-amd64-3.12",
|
cx_freeze_dir,
|
||||||
"INSTALLFOLDER",
|
"INSTALLFOLDER",
|
||||||
"Dangerzone",
|
"Dangerzone",
|
||||||
)
|
)
|
||||||
|
@ -126,6 +130,7 @@ def main():
|
||||||
Codepage="1252",
|
Codepage="1252",
|
||||||
Version=dangerzone_version,
|
Version=dangerzone_version,
|
||||||
)
|
)
|
||||||
|
|
||||||
ET.SubElement(
|
ET.SubElement(
|
||||||
package_el,
|
package_el,
|
||||||
"SummaryInformation",
|
"SummaryInformation",
|
||||||
|
@ -229,7 +234,9 @@ def main():
|
||||||
ET.SubElement(feature_el, "ComponentRef", Id="ApplicationShortcuts")
|
ET.SubElement(feature_el, "ComponentRef", Id="ApplicationShortcuts")
|
||||||
|
|
||||||
ET.indent(wix_el, space=" ")
|
ET.indent(wix_el, space=" ")
|
||||||
print(ET.tostring(wix_el).decode())
|
|
||||||
|
with open(os.path.join(build_dir, "Dangerzone.wxs"), "w") as wxs_file:
|
||||||
|
wxs_file.write(ET.tostring(wix_el).decode())
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Reference in a new issue