From dd936407419f5cfe9389a75ca4948c6dd0c3efd5 Mon Sep 17 00:00:00 2001 From: Nazar Mokrynskyi Date: Sat, 6 Jan 2024 03:03:18 +0200 Subject: [PATCH] Fix SVG icons on Windows --- .github/workflows/release.yml | 6 +++++- .github/workflows/rust.yml | 4 ++-- Cargo.lock | 2 +- Cargo.toml | 2 +- res/windows/wix/expected-dlls.log | 2 ++ res/windows/wix/space-acres.wxs | 20 ++++++++++++++++++++ 6 files changed, 31 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5f8fd5f8..528e81f6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -74,7 +74,7 @@ jobs: - name: Install GTK4 (Windows) run: | pipx install gvsbuild - gvsbuild build gtk4 + gvsbuild build gtk4 librsvg if: runner.os == 'Windows' && steps.cache.outputs.cache-hit != 'true' # TODO: This is a workaround for https://github.com/wingtk/gvsbuild/issues/984, remove once fixed upstream @@ -171,11 +171,15 @@ jobs: Remove-Item target\wix\gtk4 -Recurse -Confirm:$false -ErrorAction SilentlyContinue New-Item target\wix\gtk4\bin -ItemType Directory + New-Item target\wix\gtk4\lib\gdk-pixbuf-2.0\2.10.0\loaders -ItemType Directory New-Item target\wix\gtk4\share\glib-2.0\schemas -ItemType Directory Copy-Item -Path C:\gtk-build\gtk\x64\release\bin\*.dll -Destination target\wix\gtk4\bin Copy-Item -Path C:\gtk-build\gtk\x64\release\bin\gdbus.exe -Destination target\wix\gtk4\bin + Copy-Item -Path C:\gtk-build\gtk\x64\release\lib\gdk-pixbuf-2.0\2.10.0\loaders\*.dll -Destination target\wix\gtk4\lib\gdk-pixbuf-2.0\2.10.0\loaders + Copy-Item -Path C:\gtk-build\gtk\x64\release\lib\gdk-pixbuf-2.0\2.10.0\loaders.cache -Destination target\wix\gtk4\lib\gdk-pixbuf-2.0\2.10.0 + Copy-Item -Path C:\gtk-build\gtk\x64\release\share\glib-2.0\schemas\gschemas.compiled -Destination target\wix\gtk4\share\glib-2.0\schemas\gschemas.compiled # TODO: Ideally something like this would have worked and we wouldn't need to hardcode stuff in `space-acres.wxs`: https://github.com/volks73/cargo-wix/issues/271 diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 63dccd6b..2dfb74e2 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -92,7 +92,7 @@ jobs: - name: Install GTK4 (Windows) run: | pipx install gvsbuild - gvsbuild build gtk4 + gvsbuild build gtk4 librsvg if: runner.os == 'Windows' && steps.cache.outputs.cache-hit != 'true' # TODO: This is a workaround for https://github.com/wingtk/gvsbuild/issues/984, remove once fixed upstream @@ -207,7 +207,7 @@ jobs: - name: Install GTK4 (Windows) run: | pipx install gvsbuild - gvsbuild build gtk4 + gvsbuild build gtk4 librsvg if: runner.os == 'Windows' && steps.cache.outputs.cache-hit != 'true' # TODO: This is a workaround for https://github.com/wingtk/gvsbuild/issues/984, remove once fixed upstream diff --git a/Cargo.lock b/Cargo.lock index f34b5713..2d683642 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10695,7 +10695,7 @@ dependencies = [ [[package]] name = "space-acres" -version = "0.0.15" +version = "0.0.16" dependencies = [ "anyhow", "arc-swap", diff --git a/Cargo.toml b/Cargo.toml index 59001700..1dca254a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "space-acres" description = "Space Acres is an opinionated unofficial GUI application for farming on Subspace Network" license = "0BSD" -version = "0.0.15" +version = "0.0.16" authors = ["Nazar Mokrynskyi "] repository = "https://github.com/nazar-pc/space-acres" edition = "2021" diff --git a/res/windows/wix/expected-dlls.log b/res/windows/wix/expected-dlls.log index f1824795..b4ee92be 100644 --- a/res/windows/wix/expected-dlls.log +++ b/res/windows/wix/expected-dlls.log @@ -27,6 +27,7 @@ intl.dll jpeg62.dll libexpat.dll libpng16.dll +libxml2.dll pango-1.0-0.dll pangocairo-1.0-0.dll pangowin32-1.0-0.dll @@ -36,6 +37,7 @@ pcre2-8.dll pcre2-posix.dll pixman-1-0.dll pkgconf-4.dll +rsvg-2.0-vs17.dll textstyle.dll tiff.dll turbojpeg.dll diff --git a/res/windows/wix/space-acres.wxs b/res/windows/wix/space-acres.wxs index 618ad003..65fdb55e 100644 --- a/res/windows/wix/space-acres.wxs +++ b/res/windows/wix/space-acres.wxs @@ -160,6 +160,7 @@ + @@ -169,6 +170,7 @@ + @@ -176,6 +178,22 @@ + + + + + + + + + + + + + + + + @@ -252,6 +270,8 @@ + +