build/windows: Crossbuilds are back and with UCRT (thanks to 'quasi-msys2')

Fixes: #11756

Context: Debian Bookworm only have GCC that links to MSVCRT C library.
Actually, crossroads is failing on our CI probably due to GCC-MSVCRT.
On Debian, there is GCC-UCRT too but it is marked as Experimental and
crossroad does not support it nor Clang-UCRT yet: GNOME/gimp!1860.

Some people reported crossroad working with GCC-MSVCRT in Fedora but
adding a brand new pipeline would be at least suboptimal to mantain.

So, we are temporarely moving from crossroad to quasi-msys2 project which
have UCRT support for both GCC and Clang (it takes compiler resources from
MSYS2). The compilers itself we will take from Debian Testing for parity
(they are standard GCC and Clang with proper CFLAGS set by quasi-msys2).
We may go back to Crossroad when it has UCRT support like quasi-msys2.
This commit is contained in:
Bruno 2025-01-02 13:42:08 -03:00
parent b78f3dadc6
commit d4a7175a0f
No known key found for this signature in database
8 changed files with 270 additions and 271 deletions

View File

@ -112,8 +112,8 @@ stages:
- $RUNNER
image: $CI_REGISTRY_IMAGE:build-debian-${DEB_VERSION}-${RUNNER}
variables:
CC: "ccache clang"
CXX: "ccache clang++"
CC: "clang"
CXX: "clang++"
CC_LD: lld
CXX_LD: lld
before_script:
@ -161,6 +161,7 @@ image-debian:
entrypoint: [""]
variables:
GIT_STRATEGY: none
UMFPACK: libumfpack5
cache: []
before_script: []
script:
@ -225,12 +226,11 @@ image-debian:
libpoppler-glib-dev
libqoi-dev
libraw-dev
libraw20
librsvg2-dev
libspiro-dev
libsuitesparse-dev
libtiff-dev
libumfpack5
$UMFPACK
libunwind-dev
libwebp-dev
libwmf-dev
@ -454,29 +454,39 @@ gimp-flatpak-x64:
extends: .debian-x64
rules:
- <<: *CI_MERGE
when: never
- <<: *CI_COMMIT
when: never
- if: '$GIMP_CI_CROSSROAD_WIN64 != null'
variables:
DEB_VERSION: testing
MSYSTEM_PREFIX: clang64
cache: []
image-debian-x64-cross:
extends: .win-cross
stage: !reference [image-debian, stage]
image: !reference [image-debian, image]
variables:
GIT_STRATEGY: none
UMFPACK: libumfpack6
cache: !reference [image-debian, cache]
before_script:
- !reference [image-debian, before_script]
script:
- !reference [image-debian, script]
deps-win-x64-cross:
extends: .win-cross
needs: ["image-debian-x64"]
needs: ["image-debian-x64-cross"]
stage: dependencies
variables:
XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache/"
cache:
- key: ${CI_JOB_NAME}-pkg
paths:
- .cache/
- !reference [.default, cache]
before_script: []
script:
- bash build/windows/1_build-deps-crossroad.sh
- bash build/windows/1_build-deps-quasimsys2.sh
artifacts:
paths:
- .local/
- babl/_build-cross/meson-logs/meson-log.txt
- gegl/_build-cross/meson-logs/meson-log.txt
- quasi-msys2/
- _install-$MSYSTEM_PREFIX-cross/
- babl/_build-$MSYSTEM_PREFIX-cross/meson-logs/meson-log.txt
- gegl/_build-$MSYSTEM_PREFIX-cross/meson-logs/meson-log.txt
expire_in: 2 hours
gimp-win-x64-cross:
@ -486,13 +496,13 @@ gimp-win-x64-cross:
variables:
GIT_SUBMODULE_STRATEGY: recursive
script:
- bash build/windows/2_build-gimp-crossroad.sh
- bash build/windows/2_build-gimp-quasimsys2.sh
artifacts:
expose_as: 'Windows zip'
paths:
- gimp-x64/
- _build-cross/meson-logs/meson-log.txt
- _build-cross/done-dll.list
- gimp-clang64/
- _build-clang64-cross/meson-logs/meson-log.txt
- _build-clang64-cross/done-dll.list
expire_in: 2 days
## WINDOWS pipelines (native MSYS2) ##

View File

@ -1,135 +0,0 @@
#!/bin/sh
set -e
# SHELL ENV
if [ -z "$CROSSROAD_PLATFORM" ]; then
if [ -z "$GITLAB_CI" ]; then
# Make the script work locally
if [ "$0" != 'build/windows/1_build-deps-crossroad.sh' ] && [ ${PWD/*\//} != 'windows' ]; then
echo -e '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, read: https://developer.gimp.org/core/setup/build/windows/'
exit 1
elif [ ${PWD/*\//} = 'windows' ]; then
cd ../..
fi
export GIT_DEPTH=1
export GIMP_DIR=$(echo "${PWD##*/}/")
cd $(dirname $PWD)
fi
## Install crossroad and its deps
# Beginning of install code block
if [ "$GITLAB_CI" ]; then
apt-get update -y
# libjxl uses C++ features that require posix threads so we install
# specifically g++-mingw-w64-x86-64-posix and gcc-mingw-w64-x86-64-posix.
# Note that we can't install both the -posix and -win32 versions since
# update gcc-mingw-w64 (25).
apt-get install -y --no-install-recommends \
git \
ccache \
cpio \
gcc-mingw-w64-x86-64-posix \
g++-mingw-w64-x86-64-posix \
meson \
pkg-config \
python3-distutils \
python3-docutils \
python3-zstandard \
rpm \
wine \
wine64
fi
# End of install code block
if [ -d 'crossroad' ]; then
rm -r -f crossroad
fi
git clone --depth $GIT_DEPTH https://gitlab.freedesktop.org/crossroad/crossroad
cd crossroad
git apply ../${GIMP_DIR}build/windows/patches/0001-platforms-Enable-ccache.patch
# Needed because Debian adds by default a local/ folder to the install
# prefix of setup.py. This environment variable overrides this behavior.
export DEB_PYTHON_INSTALL_LAYOUT="deb"
./setup.py install --prefix=`pwd`/../.local
cd ..
# CROSSROAD ENV
export PATH="$PWD/.local/bin:$PATH"
export XDG_DATA_HOME="$PWD/.local/share"
crossroad w64 msys2 --run="${GIMP_DIR}build/windows/1_build-deps-crossroad.sh"
crossroad w64 gimp --depends msys2 --run="${GIMP_DIR}build/windows/1_build-deps-crossroad.sh"
else
if [ "$CROSSROAD_PROJECT" = 'msys2' ]; then
## Install the required (pre-built) packages for babl, GEGL and GIMP
crossroad source msys2
deps=$(cat ${GIMP_DIR}build/windows/all-deps-uni.txt |
sed "s/\${MINGW_PACKAGE_PREFIX}-//g" | sed 's/\\//g')
## NOTE: Crossroad is too prone to fail at downloading deps so let's retry
crossroad install $deps || crossroad install $deps
if [ $? -ne 0 ]; then
echo "Installation of pre-built dependencies failed.";
exit 1;
fi
## FIXME: Build manually gio 'giomodule.cache' to fix error about
## absent libgiognutls.dll that prevents generating loaders.cache
echo 'libgiognomeproxy.dll: gio-proxy-resolver
libgiognutls.dll: gio-tls-backend
libgiolibproxy.dll: gio-proxy-resolver
libgioopenssl.dll: gio-tls-backend' > $CROSSROAD_PREFIX/lib/gio/modules/giomodule.cache
## FIXME: Build manually pixbuf 'loaders.cache' for GUI image support
echo '"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-png.dll"
"png" 5 "gdk-pixbuf" "PNG" "LGPL"
"image/png" ""
"png" ""
"\211PNG\r\n\032\n" "" 100
"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-svg.dll"
"svg" 6 "gdk-pixbuf" "Scalable Vector Graphics" "LGPL"
"image/svg+xml" "image/svg" "image/svg-xml" "image/vnd.adobe.svg+xml" "text/xml-svg" "image/svg+xml-compressed" ""
"svg" "svgz" "svg.gz" ""
" <svg" "* " 100
" <!DOCTYPE svg" "* " 100
' > $(echo $CROSSROAD_PREFIX/lib/gdk-pixbuf-*/*/)/loaders.cache
## FIXME: Build manually glib 'gschemas.compiled'
GLIB_PATH=$(echo $CROSSROAD_PREFIX/share/glib-*/schemas/)
wine $CROSSROAD_PREFIX/bin/glib-compile-schemas.exe --targetdir=$GLIB_PATH $GLIB_PATH >/dev/null 2>&1
fi
if [ "$CROSSROAD_PROJECT" = 'gimp' ]; then
## Prepare env (no env var is needed, all are auto set to CROSSROAD_PREFIX)
export ARTIFACTS_SUFFIX="-cross"
## Build babl and GEGL
self_build ()
{
# Clone source only if not already cloned or downloaded
if [ ! -d "$1" ]; then
git clone --depth $GIT_DEPTH https://gitlab.gnome.org/gnome/$1
fi
cd $1
git pull
if [ ! -f "_build$ARTIFACTS_SUFFIX/build.ninja" ]; then
crossroad meson setup _build$ARTIFACTS_SUFFIX $2
fi
cd _build$ARTIFACTS_SUFFIX
ninja
ninja install
ccache --show-stats
cd ../..
}
self_build babl '-Denable-gir=false'
self_build gegl '-Dintrospection=false'
fi
fi # END OF CROSSROAD ENV

View File

@ -0,0 +1,131 @@
#!/bin/sh
set -e
# SHELL ENV
if [ -z "$QUASI_MSYS2_ROOT" ]; then
if [ -z "$GITLAB_CI" ]; then
# Make the script work locally
if [ "$0" != 'build/windows/1_build-deps-quasimsys2.sh' ] && [ ${PWD/*\//} != 'windows' ]; then
echo -e '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, read: https://developer.gimp.org/core/setup/build/windows/'
exit 1
elif [ ${PWD/*\//} = 'windows' ]; then
cd ../..
fi
export GIT_DEPTH=1
export GIMP_DIR=$(echo "$PWD/")
cd $(dirname $PWD)
fi
## Install quasi-msys2 and its deps
# Beginning of install code block
if [ "$GITLAB_CI" ]; then
apt-get update -y >/dev/null
apt-get install -y --no-install-recommends \
clang \
lld \
llvm >/dev/null
apt-get install -y --no-install-recommends \
gawk \
gpg \
make \
sudo \
tar \
wget \
zstd >/dev/null
fi
# End of install code block
if [ ! -d 'quasi-msys2' ]; then
git clone --depth $GIT_DEPTH https://github.com/HolyBlackCat/quasi-msys2
fi
cd quasi-msys2
git pull
cd ..
## Install the required (pre-built) packages for babl, GEGL and GIMP
echo -e "\e[0Ksection_start:`date +%s`:deps_install[collapsed=true]\r\e[0KInstalling dependencies provided by MSYS2"
echo ${MSYSTEM_PREFIX^^} > quasi-msys2/msystem.txt
deps=$(cat ${GIMP_DIR}build/windows/all-deps-uni.txt |
sed "s/\${MINGW_PACKAGE_PREFIX}-/_/g" | sed 's/\\//g')
cd quasi-msys2
make install _clang $deps || $true
cd ..
sudo ln -nfs "$PWD/quasi-msys2/root/$MSYSTEM_PREFIX" /$MSYSTEM_PREFIX
## Manually build gio 'giomodule.cache' to fix fatal error about
## absent libgiognutls.dll that prevents generating loaders.cache
echo 'libgiognomeproxy.dll: gio-proxy-resolver
libgiognutls.dll: gio-tls-backend
libgiolibproxy.dll: gio-proxy-resolver
libgioopenssl.dll: gio-tls-backend' > /$MSYSTEM_PREFIX/lib/gio/modules/giomodule.cache
## Manually build pixbuf 'loaders.cache'
## (the reason for pixbuf is on '2_bundle-gimp-uni_base.sh' script)
echo '"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-png.dll"
"png" 5 "gdk-pixbuf" "PNG" "LGPL"
"image/png" ""
"png" ""
"\211PNG\r\n\032\n" "" 100
"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\pixbufloader_svg.dll"
"svg" 6 "gdk-pixbuf" "Scalable Vector Graphics" "LGPL"
"image/svg+xml" "image/svg" "image/svg-xml" "image/vnd.adobe.svg+xml" "text/xml-svg" "image/svg+xml-compressed" ""
"svg" "svgz" "svg.gz" ""
" <svg" "* " 100
" <!DOCTYPE svg" "* " 100
' > $(echo /$MSYSTEM_PREFIX/lib/gdk-pixbuf-*/*/)/loaders.cache
## Manually build glib 'gschemas.compiled'
## (the reason for glib schemas is on '2_bundle-gimp-uni_base.sh' script)
GLIB_PATH=$(echo /$MSYSTEM_PREFIX/share/glib-*/schemas/)
glib-compile-schemas --targetdir=$GLIB_PATH $GLIB_PATH >/dev/null 2>&1
echo -e "\e[0Ksection_end:`date +%s`:deps_install\r\e[0K"
# QUASI-MSYS2 ENV
echo -e "\e[0Ksection_start:`date +%s`:cross_environ[collapsed=true]\r\e[0KPreparing cross-build environment"
bash -c "source quasi-msys2/env/all.src && bash ${GIMP_DIR}build/windows/1_build-deps-quasimsys2.sh"
else
export GIMP_PREFIX="$PWD/_install-$(echo $MSYSTEM_PREFIX | sed 's|/||')-cross"
IFS=$'\n' VAR_ARRAY=($(cat ${GIMP_DIR}.gitlab-ci.yml | sed -n '/export PATH=/,/GI_TYPELIB_PATH}\"/p' | sed 's/ - //'))
IFS=$' \t\n'
for VAR in "${VAR_ARRAY[@]}"; do
if [[ ! "$VAR" =~ 'multiarch' ]]; then
unset LIB_SUBDIR
eval "$VAR" || continue
fi
done
echo -e "\e[0Ksection_end:`date +%s`:cross_environ\r\e[0K"
## Build babl and GEGL
self_build ()
{
echo -e "\e[0Ksection_start:`date +%s`:${1}_build[collapsed=true]\r\e[0KBuilding $1"
# Clone source only if not already cloned or downloaded
if [ ! -d "$1" ]; then
git clone --depth $GIT_DEPTH https://gitlab.gnome.org/gnome/$1
fi
cd $1
git pull
if [ ! -f "_build-$(echo $MSYSTEM_PREFIX | sed 's|/||')-cross/build.ninja" ]; then
meson setup _build-$(echo $MSYSTEM_PREFIX | sed 's|/||')-cross -Dprefix="$GIMP_PREFIX" $2
fi
cd _build-$(echo $MSYSTEM_PREFIX | sed 's|/||')-cross
ninja
ninja install
cd ../..
echo -e "\e[0Ksection_end:`date +%s`:${1}_build\r\e[0K"
}
self_build babl '-Denable-gir=false'
self_build gegl '-Dintrospection=false' '-Dworkshop=false'
fi # END OF QUASI-MSYS2 ENV

View File

@ -1,83 +0,0 @@
#!/bin/sh
set -e
# SHELL ENV
if [ -z "$CROSSROAD_PLATFORM" ]; then
if [ -z "$GITLAB_CI" ]; then
# Make the script work locally
if [ "$0" != 'build/windows/2_build-gimp-crossroad.sh' ] && [ ${PWD/*\//} != 'windows' ]; then
echo -e '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, read: https://developer.gimp.org/core/setup/build/windows/'
exit 1
elif [ ${PWD/*\//} = 'windows' ]; then
cd ../..
fi
git submodule update --init
PARENT_DIR='../'
fi
# FIXME: We need native/Linux gimp-console.
# https://gitlab.gnome.org/GNOME/gimp/-/issues/6393
if [ "$1" ]; then
export BUILD_DIR="$1"
else
export BUILD_DIR=$(echo _build*$RUNNER)
fi
if [ ! -d "$BUILD_DIR" ]; then
echo -e "\033[31m(ERROR)\033[0m: Before running this script, first build GIMP natively in $BUILD_DIR"
fi
if [ -z "$GITLAB_CI" ] && [ -z "$GIMP_PREFIX" ]; then
export GIMP_PREFIX="$PWD/../_install"
fi
if [ ! -d "$GIMP_PREFIX" ]; then
echo -e "\033[31m(ERROR)\033[0m: Before running this script, first install GIMP natively in $GIMP_PREFIX"
fi
if [ ! -d "$BUILD_DIR" ] || [ ! -d "$GIMP_PREFIX" ]; then
echo 'Patches are very welcome: https://gitlab.gnome.org/GNOME/gimp/-/issues/6393'
exit 1
fi
GIMP_APP_VERSION=$(grep GIMP_APP_VERSION $BUILD_DIR/config.h | head -1 | sed 's/^.*"\([^"]*\)"$/\1/')
GIMP_CONSOLE_PATH=$PWD/${PARENT_DIR}.local/bin/gimp-console-$GIMP_APP_VERSION
echo "#!/bin/sh" > $GIMP_CONSOLE_PATH
IFS=$'\n' VAR_ARRAY=($(cat .gitlab-ci.yml | sed -n '/export PATH=/,/GI_TYPELIB_PATH}\"/p' | sed 's/ - //'))
IFS=$' \t\n'
for VAR in "${VAR_ARRAY[@]}"; do
echo $VAR >> $GIMP_CONSOLE_PATH
done
echo "$GIMP_PREFIX/bin/gimp-console-$GIMP_APP_VERSION \"\$@\"" >> $GIMP_CONSOLE_PATH
chmod u+x $GIMP_CONSOLE_PATH
if [ "$GITLAB_CI" ]; then
# Install crossroad deps again
# We take code from deps script to better maintenance
echo "$(cat build/windows/1_build-deps-crossroad.sh |
sed -n '/# Beginning of install/,/# End of install/p')" | bash
fi
# CROSSROAD ENV
export PATH="$PWD/${PARENT_DIR}.local/bin:$PWD/bin:$PATH"
export XDG_DATA_HOME="$PWD/${PARENT_DIR}.local/share"
crossroad w64 gimp --depends msys2 --run="build/windows/2_build-gimp-crossroad.sh"
else
## The required packages for GIMP are taken from the result of previous script
## Prepare env (no env var is needed, all are auto set to CROSSROAD_PREFIX)
export ARTIFACTS_SUFFIX="-cross"
## Build GIMP
if [ ! -f "_build$ARTIFACTS_SUFFIX/build.ninja" ]; then
crossroad meson setup _build$ARTIFACTS_SUFFIX -Dgi-docgen=disabled \
-Djavascript=disabled -Dvala=disabled
fi
cd _build$ARTIFACTS_SUFFIX
ninja
ninja install
ccache --show-stats
cd ..
fi # END OF CROSSROAD ENV

View File

@ -0,0 +1,98 @@
#!/bin/sh
set -e
# SHELL ENV
if [ -z "$QUASI_MSYS2_ROOT" ]; then
if [ -z "$GITLAB_CI" ]; then
# Make the script work locally
if [ "$0" != 'build/windows/2_build-gimp-quasimsys2.sh' ] && [ ${PWD/*\//} != 'windows' ]; then
echo -e '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, read: https://developer.gimp.org/core/setup/build/windows/'
exit 1
elif [ ${PWD/*\//} = 'windows' ]; then
cd ../..
fi
git submodule update --init
PARENT_DIR='../'
fi
# FIXME: We need native/Linux gimp-console.
# https://gitlab.gnome.org/GNOME/gimp/-/issues/6393
if [ "$1" ]; then
export BUILD_DIR="$1"
else
export BUILD_DIR=$(echo _build*$RUNNER)
fi
if [ ! -d "$BUILD_DIR" ]; then
echo -e "\033[31m(ERROR)\033[0m: Before running this script, first build GIMP natively in $BUILD_DIR"
fi
if [ "$GITLAB_CI" ]; then
eval "$(grep 'export GIMP_PREFIX' .gitlab-ci.yml | head -1 | sed 's/ - //')" || $true
elif [ -z "$GITLAB_CI" ] && [ -z "$GIMP_PREFIX" ]; then
export GIMP_PREFIX="$PWD/../_install"
fi
if [ ! -d "$GIMP_PREFIX" ]; then
echo -e "\033[31m(ERROR)\033[0m: Before running this script, first install GIMP natively in $GIMP_PREFIX"
fi
if [ ! -d "$BUILD_DIR" ] || [ ! -d "$GIMP_PREFIX" ]; then
echo 'Patches are very welcome: https://gitlab.gnome.org/GNOME/gimp/-/issues/6393'
exit 1
fi
if [ -z $GITLAB_CI ]; then
IFS=$'\n' VAR_ARRAY=($(cat .gitlab-ci.yml | sed -n '/export PATH=/,/GI_TYPELIB_PATH}\"/p' | sed 's/ - //'))
IFS=$' \t\n'
for VAR in "${VAR_ARRAY[@]}"; do
eval "$VAR" || continue
done
fi
if [ "$GITLAB_CI" ]; then
# Install quasi-msys2 deps again
# We take code from deps script to better maintenance
echo "$(cat build/windows/1_build-deps-quasimsys2.sh |
sed -n '/# Beginning of install/,/# End of install/p')" | bash
fi
## The required packages for GIMP are taken from the result of previous script
sudo ln -nfs "$PWD/${PARENT_DIR}quasi-msys2/root/$MSYSTEM_PREFIX" /$MSYSTEM_PREFIX
# QUASI-MSYS2 ENV
echo -e "\e[0Ksection_start:`date +%s`:cross_environ[collapsed=true]\r\e[0KPreparing cross-build environment"
bash -c "source ${PARENT_DIR}quasi-msys2/env/all.src && bash build/windows/2_build-gimp-quasimsys2.sh"
else
export GIMP_PREFIX="$PWD/${PARENT_DIR}_install-$(echo $MSYSTEM_PREFIX | sed 's|/||')-cross"
IFS=$'\n' VAR_ARRAY=($(cat .gitlab-ci.yml | sed -n '/export PATH=/,/GI_TYPELIB_PATH}\"/p' | sed 's/ - //'))
IFS=$' \t\n'
for VAR in "${VAR_ARRAY[@]}"; do
if [[ ! "$VAR" =~ 'multiarch' ]]; then
unset LIB_SUBDIR
eval "$VAR" || continue
fi
done
echo -e "\e[0Ksection_end:`date +%s`:cross_environ\r\e[0K"
## Build GIMP
echo -e "\e[0Ksection_start:`date +%s`:gimp_build[collapsed=true]\r\e[0KBuilding GIMP"
echo 'needs_exe_wrapper = true' >> ${PARENT_DIR}quasi-msys2/env/config/meson_cross_file.ini
if [ ! -f "_build-$(echo $MSYSTEM_PREFIX | sed 's|/||')-cross/build.ninja" ]; then
meson setup _build-$(echo $MSYSTEM_PREFIX | sed 's|/||')-cross -Dprefix="$GIMP_PREFIX" -Dgi-docgen=disabled \
-Djavascript=disabled -Dvala=disabled -Dms-store=true
fi
cd _build-$(echo $MSYSTEM_PREFIX | sed 's|/||')-cross
ninja
echo -e "\e[0Ksection_end:`date +%s`:gimp_build\r\e[0K"
# Bundle GIMP
echo -e "\e[0Ksection_start:`date +%s`:gimp_bundle[collapsed=true]\r\e[0KCreating bundle"
ninja install &> ninja_install.log | rm ninja_install.log || cat ninja_install.log
cd ..
echo -e "\e[0Ksection_end:`date +%s`:gimp_bundle\r\e[0K"
fi # END OF QUASI-MSYS2 ENV

View File

@ -33,15 +33,15 @@ fi
## GIMP prefix: as set at meson configure time
export GIMP_PREFIX=$(echo $MESON_INSTALL_DESTDIR_PREFIX | sed 's|\\|/|g')
## System prefix: on Windows, it is MSYSTEM_PREFIX; on Linux it is set by crossroad
## System prefix: it is MSYSTEM_PREFIX
export MSYS_PREFIX=$(grep 'Main binary:' meson-logs/meson-log.txt | sed 's|Main binary: ||' | sed 's|\\bin\\python.exe||' | sed 's|\\|/|g')
if [ "$CROSSROAD_PLATFORM" ]; then
export MSYS_PREFIX="$CROSSROAD_PREFIX/../msys2"
if [ "$QUASI_MSYS2_ROOT" ]; then
export MSYS_PREFIX="$MSYSTEM_PREFIX"
fi
## Bundle dir: we make a "perfect" bundle separated from GIMP_PREFIX
#NOTE: The bundling script need to set $MSYSTEM_PREFIX to our dist scripts
#fallback code be able to identify what arch they are distributing
export GIMP_DISTRIB="$GIMP_SOURCE/gimp-$MSYSTEM_PREFIX"
export GIMP_DISTRIB="$GIMP_SOURCE/gimp-$(echo $MSYSTEM_PREFIX | sed 's|/||')"
bundle ()
{
@ -184,7 +184,7 @@ if [ -z "$GIMP_UNSTABLE" ]; then
fi
### Optional binaries for GObject Introspection support
if [ "$CI_JOB_NAME" != 'gimp-win-x64-cross' ]; then
if [ -z "$QUASI_MSYS2_ROOT" ]; then
bundle "$GIMP_PREFIX" lib/girepository-*
bundle "$MSYS_PREFIX" lib/girepository-*

View File

@ -1,25 +0,0 @@
From 97108e3d7bdf651856212917a875a65ea4859a56 Mon Sep 17 00:00:00 2001
From: Bruno Lopes <brunolopesdsilv@outlook.com>
Date: Tue, 23 Apr 2024 09:44:37 -0300
Subject: [PATCH] platforms: Enable ccache
---
platforms/meson/toolchain-w64.meson | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/platforms/meson/toolchain-w64.meson b/platforms/meson/toolchain-w64.meson
index b57bc6f..7e237d1 100644
--- a/platforms/meson/toolchain-w64.meson
+++ b/platforms/meson/toolchain-w64.meson
@@ -1,6 +1,6 @@
[binaries]
-c = 'x86_64-w64-mingw32-gcc'
-cpp = 'x86_64-w64-mingw32-g++'
+c = ['ccache', 'x86_64-w64-mingw32-gcc']
+cpp = ['ccache', 'x86_64-w64-mingw32-g++']
ar = 'x86_64-w64-mingw32-ar'
strip = 'x86_64-w64-mingw32-strip'
pkgconfig = 'x86_64-w64-mingw32-pkg-config'
--
2.44.0.windows.1

View File

@ -1,5 +1,4 @@
subdir('common')
subdir('file-bmp')
subdir('file-dds')
subdir('file-exr')
subdir('file-faxg3')
@ -32,3 +31,7 @@ subdir('screenshot')
subdir('script-fu')
subdir('selection-to-path')
subdir('twain')
if not meson.is_cross_build()
subdir('file-bmp')
endif