Skip to content

Commit

Permalink
Merge pull request #80 from nazar-pc/fix-svg-icons-on-windows
Browse files Browse the repository at this point in the history
Fix SVG icons on Windows
  • Loading branch information
nazar-pc authored Jan 6, 2024
2 parents 83aace3 + dd93640 commit 714f1ae
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 5 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>"]
repository = "https://github.com/nazar-pc/space-acres"
edition = "2021"
Expand Down
2 changes: 2 additions & 0 deletions res/windows/wix/expected-dlls.log
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
20 changes: 20 additions & 0 deletions res/windows/wix/space-acres.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@
<File Id='jpeg62.dll' Name='jpeg62.dll' DiskId='1' Source='target\wix\gtk4\bin\jpeg62.dll' />
<File Id='libexpat.dll' Name='libexpat.dll' DiskId='1' Source='target\wix\gtk4\bin\libexpat.dll' />
<File Id='libpng16.dll' Name='libpng16.dll' DiskId='1' Source='target\wix\gtk4\bin\libpng16.dll' />
<File Id='libxml2.dll' Name='libxml2.dll' DiskId='1' Source='target\wix\gtk4\bin\libxml2.dll' />
<File Id='pango_1.0_0.dll' Name='pango-1.0-0.dll' DiskId='1' Source='target\wix\gtk4\bin\pango-1.0-0.dll' />
<File Id='pangocairo_1.0_0.dll' Name='pangocairo-1.0-0.dll' DiskId='1' Source='target\wix\gtk4\bin\pangocairo-1.0-0.dll' />
<File Id='pangowin32_1.0_0.dll' Name='pangowin32-1.0-0.dll' DiskId='1' Source='target\wix\gtk4\bin\pangowin32-1.0-0.dll' />
Expand All @@ -169,13 +170,30 @@
<File Id='pcre2_posix.dll' Name='pcre2-posix.dll' DiskId='1' Source='target\wix\gtk4\bin\pcre2-posix.dll' />
<File Id='pixman_1_0.dll' Name='pixman-1-0.dll' DiskId='1' Source='target\wix\gtk4\bin\pixman-1-0.dll' />
<File Id='pkgconf_4.dll' Name='pkgconf-4.dll' DiskId='1' Source='target\wix\gtk4\bin\pkgconf-4.dll' />
<File Id='rsvg_2.0_vs17.dll' Name='rsvg-2.0-vs17.dll' DiskId='1' Source='target\wix\gtk4\bin\rsvg-2.0-vs17.dll' />
<File Id='textstyle.dll' Name='textstyle.dll' DiskId='1' Source='target\wix\gtk4\bin\textstyle.dll' />
<File Id='tiff.dll' Name='tiff.dll' DiskId='1' Source='target\wix\gtk4\bin\tiff.dll' />
<File Id='turbojpeg.dll' Name='turbojpeg.dll' DiskId='1' Source='target\wix\gtk4\bin\turbojpeg.dll' />
<File Id='zlib1.dll' Name='zlib1.dll' DiskId='1' Source='target\wix\gtk4\bin\zlib1.dll' />
</Component>
</Directory>

<Directory Id='lib' Name='lib'>
<Directory Id='gdk_pixbuf_2.0' Name='gdk-pixbuf-2.0'>
<Directory Id='gdk_pixbuf_2.10.0' Name='2.10.0'>
<Directory Id='loaders' Name='loaders'>
<Component Id='gdk_pixbuf_loaders' Guid='613bbf0a-780c-4d31-aaab-a81d556c289c'>
<File Id='libpixbufloader_svg.dll' Name='libpixbufloader-svg.dll' DiskId='1' Source='target\wix\gtk4\lib\gdk-pixbuf-2.0\2.10.0\loaders\libpixbufloader-svg.dll' />
</Component>
</Directory>

<Component Id='glib_2.gdk_pixbuf_loaders.cache' Guid='028fdea3-a0ef-4678-a18a-a72150a48b53'>
<File Id='loaders.cache' Name='loaders.cache' DiskId='1' Source='target\wix\gtk4\lib\gdk-pixbuf-2.0\2.10.0\loaders.cache' />
</Component>
</Directory>
</Directory>
</Directory>

<Directory Id='share' Name='share'>
<Directory Id='glib_2.0' Name='glib-2.0'>
<Directory Id='schemas' Name='schemas'>
Expand Down Expand Up @@ -252,6 +270,8 @@

<ComponentRef Id='binary0'/>
<ComponentRef Id='gtk4'/>
<ComponentRef Id='gdk_pixbuf_loaders'/>
<ComponentRef Id='glib_2.gdk_pixbuf_loaders.cache'/>
<ComponentRef Id='glib_2.0_schemas'/>

<Feature
Expand Down

0 comments on commit 714f1ae

Please sign in to comment.