Skip to content

Commit

Permalink
Fix Windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
ids1024 committed Jan 23, 2024
1 parent b92ef08 commit fd085c3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion windows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- [MSYS2](https://www.msys2.org/)
- [WiX Toolset](https://wixtoolset.org/)

In msys2, run `pacman -S ingw-w64-i686-gtk3 mingw-w64-i686-rust mingw-w64-i686-toolchain mingw-w64-i686-ntldd mingw-w64-i686-imagemagick`.
In msys2, run `pacman -S mingw-w64-i686-gtk3 mingw-w64-i686-rust mingw-w64-i686-toolchain mingw-w64-i686-ntldd mingw-w64-x86_64-imagemagick`.

### Building
`.\build.bat` will build and generate a `.msi` installer.
Expand Down
10 changes: 7 additions & 3 deletions windows/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@

DLL_RE = r"(?<==> )(.*\\mingw32)\\bin\\(\S+.dll)"

# mingw64 version seems to no longer be packaged, and need to avoid unrelated
# System32/convert
CONVERT = "/mingw64/bin/convert"

ADWAITA_FILES = [
'index.theme',
'symbolic/actions/open-menu-symbolic.svg',
Expand Down Expand Up @@ -119,11 +123,11 @@ def strip(srcdir, destdir, path):

# Generate Icon and installer banner
subprocess.check_call(["rsvg-convert", "--width", "256", "--height", "256", "-o", "keyboard-configurator.png", ICON])
subprocess.check_call(["convert", "keyboard-configurator.png", "out/keyboard-configurator.ico"])
subprocess.check_call([CONVERT, "keyboard-configurator.png", "out/keyboard-configurator.ico"])
subprocess.check_call(["rsvg-convert", "--width", "493", "--height", "58", "-o", "banner.png", "banner.svg"])
subprocess.check_call(["convert", "banner.png", "banner.bmp"])
subprocess.check_call([CONVERT, "banner.png", "banner.bmp"])
subprocess.check_call(["rsvg-convert", "--width", "493", "--height", "312", "-o", "dialog.png", "dialog.svg"])
subprocess.check_call(["convert", "dialog.png", "dialog.bmp"])
subprocess.check_call([CONVERT, "dialog.png", "dialog.bmp"])

# Generate libraries.wxi
with open('libraries.wxi', 'w') as f:
Expand Down

0 comments on commit fd085c3

Please sign in to comment.