[gimp/wip/Jehan/win32-distrib-job] build: (Windows) glib-compile-schemas and gdk-pixbuf-query-loaders in…
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/wip/Jehan/win32-distrib-job] build: (Windows) glib-compile-schemas and gdk-pixbuf-query-loaders in…
- Date: Fri, 2 Oct 2020 11:03:02 +0000 (UTC)
commit 6eab32c71ae8de02e4658276169d15728f4935d2
Author: Jehan <jehan girinstud io>
Date: Fri Oct 2 12:46:32 2020 +0200
build: (Windows) glib-compile-schemas and gdk-pixbuf-query-loaders in…
… the CI.
There are 2 finale steps before finale binary distribution on Windows.
We must compile the GSettings XML schema files and register GdkPixbuf
loaders (for file format support in the GUI).
I used to provide a wrapper to be run inside Windows before first GIMP
run. Never did I realize that I can compile the distributed GSettings
schemas with the native `glib-compile-schemas` (works fine in my tests).
As for the GdkPixbuf loaders, we inspect DLL libraries, hence we do
require the target `gdk-pixbuf-query-loaders` which is unfortunately a
Windows executable. Yet it seems to work fine with Wine, so let's be
done with it in the CI instead of requiring manual steps from testers of
the CI builds. Then a few `sed` calls are enough to make the path in the
produced text file relative instead of absolute (which works fine, again
in my tests at least).
This means that I don't have to distribute the 2 binaries and the DLLs
they depend on anymore. Moreover let's remove the wrapper (but still
generate one which just calls GIMP so that we call it from the tree
root, where it's much less messy).
Note: I failed to install wine32 (32-bit Wine) on the Gitlab runner.
After following all instructions, I encountered weird errors. So
instead, I just make the win32-nightly job depend on win64-nightly and
copy `loaders.cache` from one to another, as it is a
platform-independent text file (as long as we provide the same GdkPixbuf
loaders on both of course, which we do).
.gitlab-ci.yml | 43 +++++++++++++++-------
.../windows/crossbuild-gitlab-ci/gimp-wrapper.cmd | 3 --
2 files changed, 30 insertions(+), 16 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index aa62db983d..45f942baa4 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -357,7 +357,10 @@ win64-nightly:
- gimp-w64
script:
- apt-get update
- - apt-get install -y --no-install-recommends python3 binutils-mingw-w64-x86-64 file
+ - apt-get install -y --no-install-recommends
+ python3 binutils-mingw-w64-x86-64 file
+ libglib2.0-bin
+ wine wine64
# Package ressources.
- mkdir -p ${GIMP_DISTRIB}
@@ -369,13 +372,13 @@ win64-nightly:
# Package executables.
- mkdir ${GIMP_DISTRIB}/bin
- cp -fr ${GIMP_PREFIX}/bin/gimp*.exe ${GIMP_DISTRIB}/bin/
- - cp -fr ${GIMP_PREFIX}/bin/glib-compile-schemas.exe ${GIMP_DISTRIB}/bin/
- - cp -fr ${GIMP_PREFIX}/bin/gdk-pixbuf-query-loaders.exe ${GIMP_DISTRIB}/bin/
- mkdir ${GIMP_DISTRIB}/libexec
- cp -fr ${GIMP_PREFIX}/libexec/gimp*.exe ${GIMP_DISTRIB}/libexec/
- - cp build/windows/crossbuild-gitlab-ci/gimp-wrapper.cmd ${GIMP_DISTRIB}/
+ # Add a wrapper at tree root, less messy than having to look for the
+ # binary inside bin/, in the middle of all the DLLs.
+ - echo "bin\gimp-2.99.exe" > ${GIMP_DISTRIB}/gimp.cmd
# Package library data and modules.
- mkdir ${GIMP_DISTRIB}/lib/
@@ -386,13 +389,19 @@ win64-nightly:
- cp -fr ${GIMP_PREFIX}/lib/babl-0.1 ${GIMP_DISTRIB}/lib/
- cp -fr ${GIMP_PREFIX}/lib/girepository-1.0 ${GIMP_DISTRIB}/lib/
+ # Generate the loaders.cache file for GUI image support.
+ - wine ${GIMP_PREFIX}/bin/gdk-pixbuf-query-loaders.exe
${GIMP_DISTRIB}/lib/gdk-pixbuf-2.0/2.10.0/loaders/*.dll >
${GIMP_DISTRIB}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
+ - sed -i "s&[A-Z]:.*/gimp/$GIMP_DISTRIB/&&" ${GIMP_DISTRIB}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
+ - sed -i '/.dll"/s*/*\\\\*g' ${GIMP_DISTRIB}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
+
+ # Generate share/glib-2.0/schemas/gschemas.compiled
+ - glib-compile-schemas --targetdir=${GIMP_DISTRIB}/share/glib-2.0/schemas
${GIMP_DISTRIB}/share/glib-2.0/schemas
+
# Package needed DLLs only
- python3 build/windows/crossbuild-gitlab-ci/dll_link.py ${GIMP_DISTRIB}/bin/gimp-2.99.exe
${GIMP_PREFIX}/ ${GIMP_DISTRIB}
- python3 build/windows/crossbuild-gitlab-ci/dll_link.py ${GIMP_DISTRIB}/bin/gimp-console-2.99.exe
${GIMP_PREFIX}/ ${GIMP_DISTRIB}
- python3 build/windows/crossbuild-gitlab-ci/dll_link.py
${GIMP_DISTRIB}/bin/gimp-test-clipboard-2.99.exe ${GIMP_PREFIX}/ ${GIMP_DISTRIB}
- python3 build/windows/crossbuild-gitlab-ci/dll_link.py ${GIMP_DISTRIB}/bin/gimptool-2.99.exe
${GIMP_PREFIX}/ ${GIMP_DISTRIB}
- - python3 build/windows/crossbuild-gitlab-ci/dll_link.py ${GIMP_PREFIX}/bin/gdk-pixbuf-query-loaders.exe
${GIMP_PREFIX}/ ${GIMP_DISTRIB}
- - python3 build/windows/crossbuild-gitlab-ci/dll_link.py ${GIMP_PREFIX}/bin/glib-compile-schemas.exe
${GIMP_PREFIX}/ ${GIMP_DISTRIB}
- for dll in ${GIMP_DISTRIB}/lib/babl-0.1/*.dll; do
python3 build/windows/crossbuild-gitlab-ci/dll_link.py $dll ${GIMP_PREFIX}/ ${GIMP_DISTRIB};
@@ -427,7 +436,9 @@ win32-nightly:
- gimp-w32
script:
- apt-get update
- - apt-get install -y --no-install-recommends python3 binutils-mingw-w64-i686 file
+ - apt-get install -y --no-install-recommends
+ python3 binutils-mingw-w64-i686 file
+ libglib2.0-bin
# Package ressources.
- mkdir -p ${GIMP_DISTRIB}
@@ -439,13 +450,13 @@ win32-nightly:
# Package executables.
- mkdir ${GIMP_DISTRIB}/bin
- cp -fr ${GIMP_PREFIX}/bin/gimp*.exe ${GIMP_DISTRIB}/bin/
- - cp -fr ${GIMP_PREFIX}/bin/glib-compile-schemas.exe ${GIMP_DISTRIB}/bin/
- - cp -fr ${GIMP_PREFIX}/bin/gdk-pixbuf-query-loaders.exe ${GIMP_DISTRIB}/bin/
- mkdir ${GIMP_DISTRIB}/libexec
- cp -fr ${GIMP_PREFIX}/libexec/gimp*.exe ${GIMP_DISTRIB}/libexec/
- - cp build/windows/crossbuild-gitlab-ci/gimp-wrapper.cmd ${GIMP_DISTRIB}/
+ # Add a wrapper at tree root, less messy than having to look for the
+ # binary inside bin/, in the middle of all the DLLs.
+ - echo "bin\gimp-2.99.exe" > ${GIMP_DISTRIB}/gimp.cmd
# Package library data and modules.
- mkdir ${GIMP_DISTRIB}/lib/
@@ -456,13 +467,19 @@ win32-nightly:
- cp -fr ${GIMP_PREFIX}/lib/babl-0.1 ${GIMP_DISTRIB}/lib/
- cp -fr ${GIMP_PREFIX}/lib/girepository-1.0 ${GIMP_DISTRIB}/lib/
+ # I fail to install wine32 inside the Gitlab runner. So instead, I
+ # just reuse the loaders.cache generated in the win64-nightly job as
+ # they should be the same (text format).
+ - cp gimp-w64/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
${GIMP_DISTRIB}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
+
+ # Generate share/glib-2.0/schemas/gschemas.compiled
+ - glib-compile-schemas --targetdir=${GIMP_DISTRIB}/share/glib-2.0/schemas
${GIMP_DISTRIB}/share/glib-2.0/schemas
+
# Package needed DLLs only.
- python3 build/windows/crossbuild-gitlab-ci/dll_link.py ${GIMP_DISTRIB}/bin/gimp-2.99.exe
${GIMP_PREFIX}/ ${GIMP_DISTRIB}
- python3 build/windows/crossbuild-gitlab-ci/dll_link.py ${GIMP_DISTRIB}/bin/gimp-console-2.99.exe
${GIMP_PREFIX}/ ${GIMP_DISTRIB}
- python3 build/windows/crossbuild-gitlab-ci/dll_link.py
${GIMP_DISTRIB}/bin/gimp-test-clipboard-2.99.exe ${GIMP_PREFIX}/ ${GIMP_DISTRIB}
- python3 build/windows/crossbuild-gitlab-ci/dll_link.py ${GIMP_DISTRIB}/bin/gimptool-2.99.exe
${GIMP_PREFIX}/ ${GIMP_DISTRIB}
- - python3 build/windows/crossbuild-gitlab-ci/dll_link.py ${GIMP_PREFIX}/bin/gdk-pixbuf-query-loaders.exe
${GIMP_PREFIX}/ ${GIMP_DISTRIB}
- - python3 build/windows/crossbuild-gitlab-ci/dll_link.py ${GIMP_PREFIX}/bin/glib-compile-schemas.exe
${GIMP_PREFIX}/ ${GIMP_DISTRIB}
- for dll in ${GIMP_DISTRIB}/lib/babl-0.1/*.dll; do
python3 build/windows/crossbuild-gitlab-ci/dll_link.py $dll ${GIMP_PREFIX}/ ${GIMP_DISTRIB};
@@ -482,4 +499,4 @@ win32-nightly:
- for dll in ${GIMP_DISTRIB}/lib/gimp/2.99/plug-ins/*/*.exe; do
python3 build/windows/crossbuild-gitlab-ci/dll_link.py $dll ${GIMP_PREFIX}/ ${GIMP_DISTRIB};
done
- needs: ["gimp-win32"]
+ needs: ["gimp-win32", "win64-nightly"]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]