From 75197a3dbc8045e1498901ac160516f0507e798f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=20Rodr=C3=ADguez?= Date: Sat, 6 Jul 2024 20:39:45 +0200 Subject: [PATCH] Build a Windows version --- .github/workflows/main.yaml | 23 +++++++++++++++++++++++ build-aux/msys-build.sh | 12 ++++-------- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 167f56c..5aa5cf5 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -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 diff --git a/build-aux/msys-build.sh b/build-aux/msys-build.sh index 3111646..0d46c14 100644 --- a/build-aux/msys-build.sh +++ b/build-aux/msys-build.sh @@ -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/ @@ -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 \ No newline at end of file +gtk4-update-icon-cache.exe -t share/icons/hicolor \ No newline at end of file