Got GTK crosscompiled again. Adding GTK4 because it was so easy to compile.

GTK+-3.24.1 is working.
GTK+-3.24.30 is not.
master
Steffen Pohle 4 years ago
parent 7ce986644e
commit 4a7eb317b8

@ -2,7 +2,7 @@
This manual explains the steps to prepare a basic cross compiling environment on Debian. The build will be installed to `/opt/W64-cross-compile`. If the destination folder is set up right, you do not need any root rights.
The following packages are needed:
The following packages are needed: (maybe wine is not anymore needed, haven't tested yet)
- wine
- wine64
- mingw-w64
@ -61,12 +61,11 @@ Because not all compiled `*.dll` files are installed into the destination we nee
## atk
Edit the `meson_options.txt` file and disable the building of the introspection files.
Compile the library using the following steps.
The flags -Dintrospection=false will tell meson to disable some building options. See the file `meson_options.txt` for some information. Compile the library using the following steps.
mkdir build
cd build
PKG_CONFIG_PATH=/opt/W64-cross-compile/lib/pkgconfig meson --buildtype=release --prefix=/opt/W64-cross-compile/ --cross-file ../../cross-file.ini
PKG_CONFIG_PATH=/opt/W64-cross-compile/lib/pkgconfig meson --buildtype=release -Dintrospection=false -Ddocs=false --prefix=/opt/W64-cross-compile/ --cross-file ../../cross-file.ini
meson compile
meson install
@ -107,7 +106,21 @@ In case of an error with unresolved symbols like undefined reference to '__strca
cp `find -name "*.dll"` /opt/W64-cross-compile/lib/
## GTK
## GTK+-4
### Configuration and Compilation of GTK
mkdir build
cd build
PKG_CONFIG_PATH=/opt/W64-cross-compile/lib/pkgconfig meson --buildtype=release --prefix=/opt/W64-cross-compile/ -Dmedia-gstreamer=disabled -Ddemos=false -Dbuild-examples=false -Dbuild-tests=false --cross-file ../../cross-file.ini
meson compile
If the compile process stops with error `../gdk/loaders/gdkjpeg.c:302:67: error: free undeclared (first use in this function)` you need to add the line `#include <stdlib.h>`on top of the file, before the `#include <jpeglib.h>` line. Run the compile command again.
meson install
cp `find -name "*.dll"` /opt/W64-cross-compile/lib/
## GTK+-3
### preparation beacuse of `wine`
@ -115,10 +128,12 @@ Copy all compiled executeble and library files into the wine windows/system fold
cp /opt/W64-cross-compile/bin/*.exe ~/.wine/drive_c/windows/system32/
cp /opt/W64-cross-compile/lib/*.dll ~/.wine/drive_c/windows/system32/
cp /usr/x86_64-w64-mingw32/lib/zlib1.dll ~/.wine/drive_c/windows/system32/
### workaround for some issues
edit the file `gdk/win32/gdkprivate-win32.h` and search around line 300 for the following declaration. The compiler is missing the **extern** statement here.
Edit the file `gdk/win32/gdkprivate-win32.h` and search around line 300 for the following declaration. In some releases the compiler is missing the **extern** statement here.
300 /* The singleton selection object pointer */
301 extern GdkWin32Selection *_win32_selection;
@ -128,8 +143,20 @@ edit the file `gdk/win32/gdkprivate-win32.h` and search around line 300 for the
Configure and compile the library.
PKG_CONFIG_PATH=/opt/W64-cross-compile/lib/pkgconfig ./configure --prefix=/opt/W64-cross-compile/ --host=x86_64-w64-mingw32
touch gdk/win32/winpointer.h
PKG_CONFIG_PATH=/opt/W64-cross-compile/lib/pkgconfig make
make install
#### Compile Error: `/opt/W64-cross-compile/bin/glib-compile-resources: Datei oder Verzeichnis nicht gefunden`
make[2]: Verzeichnis „/home/steffen/test/GTKCross/gtk+-3.24.1/gdk“ wird betreten
/bin/bash: Zeile 1: /opt/W64-cross-compile/bin/glib-compile-resources: Datei oder Verzeichnis nicht gefunden
GEN gdkresources.h
/bin/bash: Zeile 1: /opt/W64-cross-compile/bin/glib-compile-resources: Datei oder Verzeichnis nicht gefunden
make[2]: *** [Makefile:2243: gdkresources.h] Fehler 127
Edit the file `gdk/Makefile` append the windows `.exe` extension here.
Find the `GLIB_COMPILE_RESOURCES` and add the wine command prior to all `$(GLIB_COMPILE_RESOURCES)` calls.
Try to compile.
### fix and install the compilation

Loading…
Cancel
Save