Skip to content

Commit

Permalink
Build a Windows version
Browse files Browse the repository at this point in the history
  • Loading branch information
danirod committed Jul 6, 2024
1 parent a14f8d9 commit 75197a3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 8 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,29 @@ jobs:
cache-key: flatpak-builder-${{ github.sha }}
build-bundle: true
arch: ${{ matrix.arch }}
windows:
name: "Windows"
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
with:
update: true
install: >-
git
msystem: ucrt64
- uses: actions/checkout@v4
- name: Build Windows version
run: |
export PATH=/c/Users/$USER/.cargo/bin:$PATH
build-aux/msys-build.sh
- uses: actions/upload-artifact@v4
name: Upload Windows version
with:
name: es.danirod.Cartero-windows-x86_64
path: build/cartero-win32/
# Deliver:
# name: "Deliver Package"
# runs-on: ubuntu-latest
Expand Down
12 changes: 4 additions & 8 deletions build-aux/msys-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ pacman -Sy --noconfirm --needed \
${MINGW_PACKAGE_PREFIX}-blueprint-compiler \
meson

MSYS2_ARG_CONV_EXCL="--prefix=" meson setup build --prefix="${MINGW_PREFIX}"
MSYS2_ARG_CONV_EXCL="--prefix=" meson setup build --prefix="/" -Dprofile=development
ninja -C build
DESTDIR=$PWD/install ninja -C build install
DESTDIR=$PWD/build/cartero-win32 ninja -C build install

cd $PWD/install/$MINGW_PREFIX
cd $PWD/build/cartero-win32
mkdir -p {lib,share}

cp $(ldd bin/cartero.exe | grep "$MINGW_PREFIX" | awk '{ print $3 }') bin/
Expand All @@ -36,8 +36,4 @@ cp -RTn $MINGW_PREFIX/share/gtksourceview-5 share/gtksourceview-5
cp $(ldd lib/gdk-pixbuf-2.0/2.10.0/loaders/*.dll | grep "$MINGW_PREFIX" | awk '{ print $3 }' | sort | uniq) bin/

glib-compile-schemas.exe share/glib-2.0/schemas
gtk4-update-icon-cache.exe -t share/icons/hicolor

cd ..
mv .${MINGW_PREFIX} cartero
zip -r cartero.zip cartero
gtk4-update-icon-cache.exe -t share/icons/hicolor

0 comments on commit 75197a3

Please sign in to comment.