diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index e6dfd542..f0e42542 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -122,6 +122,11 @@ jobs:
python wix/vcpkg_licenses.py > wix/LICENSE-dynamic-libraries.txt
if: matrix.os == 'windows-latest'
+ - name: Generate components (Windows)
+ run: |
+ python wix/generate_components.py
+ if: matrix.os == 'windows-latest'
+
- name: Build installer (Windows)
run: cargo wix --no-build --nocapture -v
if: matrix.os == 'windows-latest'
diff --git a/.gitignore b/.gitignore
index e328fab3..7429e4bb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,12 @@
/target
/tests/*/output.txt
/tests/ui/*/output.txt
+/wix/full-licenses
+/wix/dll-components.wxi
+/wix/dll-references.wxi
+/wix/license-components.wxi
+/wix/license-references.wxi
+/wix/LICENSE-packetry.txt
+/wix/LICENSE-static-libraries.txt
+/wix/LICENSE-dynamic-libraries.txt
+/vcpkg
diff --git a/wix/dll-components.wxi b/wix/dll-components.wxi
deleted file mode 100644
index b14a9c79..00000000
--- a/wix/dll-components.wxi
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/wix/dll-refs.wxi b/wix/dll-refs.wxi
deleted file mode 100644
index d5772cac..00000000
--- a/wix/dll-refs.wxi
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/wix/generate_components.py b/wix/generate_components.py
new file mode 100644
index 00000000..e75b812a
--- /dev/null
+++ b/wix/generate_components.py
@@ -0,0 +1,47 @@
+from contextlib import redirect_stdout
+import os
+
+dll_components = open('wix/dll-components.wxi', 'w')
+dll_references = open('wix/dll-references.wxi', 'w')
+license_components = open('wix/license-components.wxi', 'w')
+license_references = open('wix/license-references.wxi', 'w')
+
+output_files = [
+ dll_components,
+ dll_references,
+ license_components,
+ license_references
+]
+
+for file in output_files:
+ print("", file=file)
+
+bin_dir = '$(env.VCPKG_INSTALLED_DIR)/x64-windows/bin'
+
+for line in open('wix/required-dlls.txt', 'r'):
+ filename, guid = line.rstrip().split(' ')
+ component = filename.replace('-', '_')
+ with redirect_stdout(dll_components):
+ print(f" ")
+ print(f" ")
+ print(f" ")
+ with redirect_stdout(dll_references):
+ print(f" ")
+
+for filename in os.listdir('wix/full-licenses'):
+ component = filename.replace('-', '_')
+ with redirect_stdout(license_components):
+ print(f" ")
+ print(f" ")
+ print(f" ")
+ with redirect_stdout(license_references):
+ print(f" ")
+
+for file in output_files:
+ print("", file=file)
diff --git a/wix/license-components.wxi b/wix/license-components.wxi
deleted file mode 100644
index 3c55ab1a..00000000
--- a/wix/license-components.wxi
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/wix/license-refs.wxi b/wix/license-refs.wxi
deleted file mode 100644
index da3f3b17..00000000
--- a/wix/license-refs.wxi
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/wix/main.wxs b/wix/main.wxs
index fc6622df..7b5d3230 100644
--- a/wix/main.wxs
+++ b/wix/main.wxs
@@ -139,10 +139,10 @@
-
+
-
+
diff --git a/wix/required-dlls.txt b/wix/required-dlls.txt
new file mode 100644
index 00000000..1760e518
--- /dev/null
+++ b/wix/required-dlls.txt
@@ -0,0 +1,48 @@
+atk-1.0-0.dll 5edbbda4-db12-4e43-8f0c-218ebab94d93
+brotlicommon.dll 0be65eb3-8928-4817-925a-5550e666683b
+brotlidec.dll a1aa709a-a611-47bf-91d4-2f655270bec5
+brotlienc.dll ef53d54e-d61b-4e7f-8a2b-c8347bd0884e
+bz2.dll 4a8a184b-11a9-4493-a709-7d0ec8614f14
+cairo-2.dll d8ce6c10-20fc-4128-a9ac-6ef047cb96e2
+cairo-gobject-2.dll 9992fb8f-f693-4dcd-a387-1f86b4b41aac
+cairo-script-interpreter-2.dll 75cc1bb6-d916-4f82-aea3-1179f5eb7ba5
+charset-1.dll 56827d0e-68e1-4e4b-8278-659184d9e570
+epoxy-0.dll 9aeef0ec-6c93-480d-a44c-ced8dfabfb2f
+ffi-8.dll 7c63276a-0848-4f46-96fa-8df568a2bb61
+fontconfig-1.dll aa8ad7de-59cc-435c-97cb-e328bbff8460
+freetype.dll 74abc4a2-df13-48bb-8696-96f92a2c0be0
+fribidi-0.dll e462dcd8-2226-4f73-9f7e-d2b3b58eba49
+gdk_pixbuf-2.0-0.dll c24a4c43-def6-4c24-8cb8-54ece1b6bb9c
+getopt.dll f7d09e7c-fccc-4558-b478-5f8a3e88e4e4
+gio-2.0-0.dll a91cae44-99b8-4d47-9682-7985abc3bbe1
+glib-2.0-0.dll 9c81fa23-c96b-4802-aab0-3401300d7bc3
+gmodule-2.0-0.dll 6bf333ce-3f3a-49ba-b035-fc952b63725b
+gobject-2.0-0.dll 7bc6b550-918a-4d1b-91d9-358f02a242ba
+graphene-1.0-0.dll 2874cda9-9885-4495-9763-38a51a37b9d8
+gthread-2.0-0.dll 4c314fb1-7224-48e2-af39-81984fa6c19e
+gtk-4-1.dll 6fe10843-e106-4883-bf29-a6a94cd2b1cd
+harfbuzz.dll a12abb2a-7edf-40d6-adb2-39cd5a9d8ef8
+harfbuzz-gobject.dll 202cb447-b82f-47c0-9356-c353b675fd3d
+harfbuzz-subset.dll 58296888-07a8-4258-9054-5fa089e3c855
+iconv-2.dll 18abffeb-462a-4186-8b8a-0149c8b9f062
+intl-8.dll 628852d1-0ccd-40cc-84f4-ae6fee75db16
+jpeg62.dll 086f589c-d8af-474d-9564-8d65ef6f4401
+libexpat.dll b7c975d0-6e53-49b4-b7ed-c75daad6616e
+liblzma.dll abd4caa2-4acd-4ec1-85a1-8d621c672529
+libpng16.dll b489d04b-74d9-4001-b185-0573968a6da2
+pango-1.0-0.dll 9e6b8c45-d189-4b8a-aaa9-1f83c92421c2
+pangocairo-1.0-0.dll fde9897b-09a2-4201-94f7-2284dcc7246f
+pangoft2-1.0-0.dll d1b0f76f-747a-4e81-9c98-24c91d7c7e21
+pangowin32-1.0-0.dll 1e350ffc-f0e7-4739-aeb4-2c0f93616259
+pcre2-16.dll 34b8d08a-979f-41be-a894-0ac7ec47e670
+pcre2-32.dll 86190ec9-596b-412b-b005-d24256086457
+pcre2-8.dll 32f1711c-a8f7-4f09-890e-eb3a69347b7d
+pcre2-posix.dll c153933b-e57e-432a-9a29-ff8a4889615e
+pixman-1-0.dll 1c88f629-1474-4dd5-9b23-7b6dcfb4143c
+pthreadVC3.dll 88992acc-c1bd-4d6c-8155-ce1e07cd66af
+pthreadVCE3.dll efeab01d-ac1e-42be-8cb1-75b0a419503f
+pthreadVSE3.dll 09cc7e5d-ebc3-42bb-9bd9-26a9bdac449e
+sass-1.dll e67bbd5b-edf9-4f2b-a04a-241e628ba95f
+tiff.dll f181c65d-b7fc-41ab-9fcf-49b3a5996ba3
+turbojpeg.dll 8cfa1139-79e4-4e80-9c76-fbe5d404d9c5
+zlib1.dll e10ca69b-ce5e-4368-bc78-5109ba0e6b75