1
1
mirror of https://gitlab.gnome.org/GNOME/gimp.git synced 2025-10-06 09:32:41 +02:00

build/windows: Make possible to execute Win cross artifact without the wrapper

The wrapper, like in native artifact, exists just for avoid searching the exe.
But, if the user wanted, wasn't possible to execute gimp-*.exe directly since
the wrapper was needed to generate loaders.cache. Now, loaders.cache are built.
This commit is contained in:
Bruno Lopes
2024-04-29 08:14:27 -03:00
committed by Bruno
parent bf0671dac2
commit 59b62c3355
4 changed files with 23 additions and 15 deletions

View File

@@ -62,11 +62,27 @@ gio+="libgiolibproxy.dll: gio-proxy-resolver\n"
gio+="libgioopenssl.dll: gio-tls-backend\n"
printf "%b" "$gio" > ${CROSSROAD_PREFIX}/lib/gio/modules/giomodule.cache
### NOT WORKING: Fallback generator of the pixbuf 'loaders.cache' for GUI image support
### Generator of the pixbuf 'loaders.cache' for GUI image support
GDK_PATH=$(echo ${CROSSROAD_PREFIX}/lib/gdk-pixbuf-*/*/)
wine ${CROSSROAD_PREFIX}/bin/gdk-pixbuf-query-loaders.exe ${GDK_PATH}loaders/*.dll > ${GDK_PATH}loaders.cache
sed -i "s&$CROSSROAD_PREFIX/&&" ${CROSSROAD_PREFIX}/${GDK_PATH}/loaders.cache
sed -i '/.dll\"/s*/*\\\\*g' ${CROSSROAD_PREFIX}/${GDK_PATH}/loaders.cache
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
' > $GDK_PATH/loaders.cache
### NOT WORKING: Fallback generator of the pixbuf 'loaders.cache' for GUI image support
#wine ${CROSSROAD_PREFIX}/bin/gdk-pixbuf-query-loaders.exe ${GDK_PATH}loaders/*.dll > ${GDK_PATH}loaders.cache
#sed -i "s&$CROSSROAD_PREFIX/&&" ${CROSSROAD_PREFIX}/${GDK_PATH}/loaders.cache
#sed -i '/.dll\"/s*/*\\\\*g' ${CROSSROAD_PREFIX}/${GDK_PATH}/loaders.cache
### Generator of the glib 'gschemas.compiled'
GLIB_PATH=$(echo ${CROSSROAD_PREFIX}/share/glib-*/schemas/)

View File

@@ -38,12 +38,8 @@ ninja install
ccache --show-stats
cd ..
## XXX Functional fix to the problem of non-configured interpreters
## XXX Also, functional generator of the pixbuf 'loaders.cache' for GUI image support
## Wrapper just for easier GIMP running (to not look at the huge bin/ folder with many .DLLs)
GIMP_APP_VERSION=$(grep GIMP_APP_VERSION _build${ARTIFACTS_SUFFIX}-cross/config.h | head -1 | sed 's/^.*"\([^"]*\)"$/\1/')
GDK_PATH=$(echo ${CROSSROAD_PREFIX}/lib/gdk-pixbuf-*/*/)
GDK_PATH=$(sed "s|${CROSSROAD_PREFIX}/||g" <<< $GDK_PATH)
GDK_PATH=$(sed 's|/|\\|g' <<< $GDK_PATH)
echo "@echo off
echo This is a CI crossbuild of GIMP.
:: Don't run this under PowerShell since it produces UTF-16 files.
@@ -52,10 +48,8 @@ echo "@echo off
echo .py (Python) plug-ins ^|^ NOT supported!
echo .scm (ScriptFu) plug-ins ^|^ NOT supported!
echo .vala (Vala) plug-ins ^|^ NOT supported!
bin\gdk-pixbuf-query-loaders.exe ${GDK_PATH}loaders\*.dll > ${GDK_PATH}loaders.cache
echo.
bin\gimp-$GIMP_APP_VERSION.exe" > ${CROSSROAD_PREFIX}/gimp.cmd
echo "Please run the gimp.cmd file to know the actual plug-in support." > ${CROSSROAD_PREFIX}/README.txt
## Copy built GIMP, babl and GEGL and pre-built packages to GIMP_PREFIX
cp -fr $CROSSROAD_PREFIX/ _install${ARTIFACTS_SUFFIX}-cross/

View File

@@ -36,11 +36,9 @@ export GIMP_DISTRIB="`realpath ./gimp`${ARTIFACTS_SUFFIX}"
## Copy a previously built wrapper at tree root, less messy than
## having to look inside bin/, in the middle of all the DLLs.
## This utility also configure the interpreters.
## Then, copy a built README that make clear the utility of .cmd.
## This utility also configure the interpreters for local builds.
mkdir -p ${GIMP_DISTRIB}
cp -fr ${GIMP_PREFIX}/*.cmd ${GIMP_DISTRIB}/
cp -fr ${GIMP_PREFIX}/*.txt ${GIMP_DISTRIB}/
## Modules.

View File

@@ -138,7 +138,7 @@ Copy-Item -Path "..\..\..\$arch_a64" -Destination "$vfs_a64" -Recurse
Copy-Item -Path "..\..\..\$arch_x64" -Destination "$vfs_x64" -Recurse
## Remove uneeded files (to match the Inno Windows Installer artifact)
$omissions = ("include\", "share\gir-1.0\", "share\man\", "share\vala\", "gimp.cmd", "README.txt")
$omissions = ("include\", "share\gir-1.0\", "share\man\", "share\vala\", "gimp.cmd")
Set-Location $vfs_a64
Remove-Item $omissions -Recurse
Set-Location ..\..\..\..\$vfs_x64