Project

General

Profile

Debian MinGW toolchain

apt-get install -y mingw-w64 mingw-w64-tools make g++ nsis pkg-config pev

Dependencies

Inspired from

LibIntl

(optional for i18n messages)

libiconv

cd
wget https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.17.tar.gz
tar xvzf libiconv-*.tar.gz
rm libiconv-*.tar.gz
cd libiconv-*
./configure --host=x86_64-w64-mingw32 --prefix=/usr/x86_64-w64-mingw32
make install

gettext (libintl)

cd
wget https://ftp.gnu.org/pub/gnu/gettext/gettext-0.22.4.tar.gz
tar xvzf gettext-*.tar.gz 
rm gettext-*.tar.gz 
cd gettext-*/gettext-runtime
./configure --host=x86_64-w64-mingw32 --prefix=/usr/x86_64-w64-mingw32 --enable-threads=win32 --without-libexpat-prefix --without-libxml2-prefix 
make install

GTK4

glib

apt-get install -y git meson

cd
wget https://download.gnome.org/sources/glib/2.74/glib-2.74.6.tar.xz
tar xvJf glib-2.74.6.tar.xz
rm glib-2.74.6.tar.xz
cd glib-2.74.6
cat > cc.txt << EOF
[host_machine]
system = 'windows'
cpu_family = 'x86_64'
cpu = 'x86_64'
endian = 'little'

[properties]
c_args = []
c_link_args = []

[binaries]
c = 'x86_64-w64-mingw32-gcc'
cpp = 'x86_64-w64-mingw32-g++'
ar = 'x86_64-w64-mingw32-ar'
ld = 'x86_64-w64-mingw32-ld'
objcopy = 'x86_64-w64-mingw32-objcopy'
strip = 'x86_64-w64-mingw32-strip'
pkgconfig = 'x86_64-w64-mingw32-pkg-config'
windres = 'x86_64-w64-mingw32-windres'
EOF
meson setup --cross-file cc.txt --prefix=/usr/x86_64-w64-mingw32 _build
meson compile -C _build
meson install -C _build

gstreamer

apt-get install -y libglib2.0-dev-bin flex bison
cd
wget https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.22.3.tar.xz
tar xvJf gstreamer-1.22.3.tar.xz
rm gstreamer-1.22.3.tar.xz
cd gstreamer-1.22.3
cat > cc.txt << EOF
[host_machine]
system = 'windows'
cpu_family = 'x86_64'
cpu = 'x86_64'
endian = 'little'

[properties]
c_args = []
c_link_args = []

[binaries]
c = 'x86_64-w64-mingw32-gcc'
cpp = 'x86_64-w64-mingw32-g++'
ar = 'x86_64-w64-mingw32-ar'
ld = 'x86_64-w64-mingw32-ld'
objcopy = 'x86_64-w64-mingw32-objcopy'
strip = 'x86_64-w64-mingw32-strip'
pkgconfig = 'x86_64-w64-mingw32-pkg-config'
windres = 'x86_64-w64-mingw32-windres'
EOF
meson setup --cross-file cc.txt --prefix=/usr/x86_64-w64-mingw32 _build
#meson configure -Dharfbuzz:tests=disabled _build
meson compile -C _build
meson install -C _build

Cairo

cd
wget https://cairographics.org/releases/cairo-1.18.0.tar.xz
tar xvJf cairo-1.18.0.tar.xz
rm cairo-1.18.0.tar.xz
cd cairo-1.18.0
cat > cc.txt << EOF
[host_machine]
system = 'windows'
cpu_family = 'x86_64'
cpu = 'x86_64'
endian = 'little'

[properties]
c_args = []
c_link_args = []

[binaries]
c = 'x86_64-w64-mingw32-gcc'
cpp = 'x86_64-w64-mingw32-g++'
ar = 'x86_64-w64-mingw32-ar'
ld = 'x86_64-w64-mingw32-ld'
objcopy = 'x86_64-w64-mingw32-objcopy'
strip = 'x86_64-w64-mingw32-strip'
pkgconfig = 'x86_64-w64-mingw32-pkg-config'
windres = 'x86_64-w64-mingw32-windres'
EOF
meson setup --cross-file cc.txt --prefix=/usr/x86_64-w64-mingw32 _build
meson compile -C _build
meson install -C _build

Harfbuzz

cd
wget https://github.com/harfbuzz/harfbuzz/releases/download/6.0.0/harfbuzz-6.0.0.tar.xz
tar xvJf harfbuzz-6.0.0.tar.xz
rm harfbuzz-6.0.0.tar.xz
cd harfbuzz-6.0.0
cat > cc.txt << EOF
[host_machine]
system = 'windows'
cpu_family = 'x86_64'
cpu = 'x86_64'
endian = 'little'

[properties]
c_args = []
c_link_args = []

[binaries]
c = 'x86_64-w64-mingw32-gcc'
cpp = 'x86_64-w64-mingw32-g++'
ar = 'x86_64-w64-mingw32-ar'
ld = 'x86_64-w64-mingw32-ld'
objcopy = 'x86_64-w64-mingw32-objcopy'
strip = 'x86_64-w64-mingw32-strip'
pkgconfig = 'x86_64-w64-mingw32-pkg-config'
windres = 'x86_64-w64-mingw32-windres'
EOF
meson setup --cross-file cc.txt --prefix=/usr/x86_64-w64-mingw32 -Dtests=disabled _build
meson compile -C _build
meson install -C _build

Pango

cd
wget https://download.gnome.org/sources/pango/1.50/pango-1.50.12.tar.xz
tar xvJf pango-1.50.12.tar.xz
rm pango-1.50.12.tar.xz
cd pango-1.50.12
cat > cc.txt << EOF
[host_machine]
system = 'windows'
cpu_family = 'x86_64'
cpu = 'x86_64'
endian = 'little'

[properties]
c_args = []
c_link_args = []

[binaries]
c = 'x86_64-w64-mingw32-gcc'
cpp = 'x86_64-w64-mingw32-g++'
ar = 'x86_64-w64-mingw32-ar'
ld = 'x86_64-w64-mingw32-ld'
objcopy = 'x86_64-w64-mingw32-objcopy'
strip = 'x86_64-w64-mingw32-strip'
pkgconfig = 'x86_64-w64-mingw32-pkg-config'
windres = 'x86_64-w64-mingw32-windres'
EOF
meson setup --cross-file cc.txt --prefix=/usr/x86_64-w64-mingw32 _build
meson compile -C _build
meson install -C _build

libgtk-4

https://www.gtk.org/docs/installations/linux/

https://docs.gtk.org/gtk4/building.html

https://github.com/MGlolenstine/gtk4-cross

apt-get install -y libglib2.0-dev-bin python3-docutils libglib2.0-bin

or
apt-get install -y python3-pip
pip3 install meson --break-system-packages
cd
wget https://download.gnome.org/sources/gtk/4.8/gtk-4.8.3.tar.xz
tar xvJf gtk-4.8.3.tar.xz
rm gtk-4.8.3.tar.xz
cd gtk-4.8.3/
cat > cc.txt << EOF
[host_machine]
system = 'windows'
cpu_family = 'x86_64'
cpu = 'x86_64'
endian = 'little'

[properties]
c_args = []
c_link_args = []

[binaries]
c = 'x86_64-w64-mingw32-gcc'
cpp = 'x86_64-w64-mingw32-g++'
ar = 'x86_64-w64-mingw32-ar'
ld = 'x86_64-w64-mingw32-ld'
objcopy = 'x86_64-w64-mingw32-objcopy'
strip = 'x86_64-w64-mingw32-strip'
pkgconfig = 'x86_64-w64-mingw32-pkg-config'
windres = 'x86_64-w64-mingw32-windres'
EOF
meson setup --cross-file cc.txt --prefix=/usr/x86_64-w64-mingw32 -Dmedia-gstreamer=disabled _build
meson compile -C _build
meson install -C _build

Build mkernel

cd
wget --no-check-certificate  https://packages.cerbelle.net/mkernel/mkernel-0.0.1.tar.gz
tar xvzf mkernel-0.0.1.tar.gz
rm mkernel-0.0.1.tar.gz
cd mkernel-0.0.1
#./configure --host=x86_64-w64-mingw32 --prefix=/usr --with-included-ltdl --enable-local-libopts ac_cv_func_malloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes
./configure --host=x86_64-w64-mingw32 --prefix=/usr ac_cv_func_malloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes
make clean install DESTDIR=`pwd`/../mkernel-0.0.1-win64

Package

cd
cd mkernel-0.0.1
makensis -NOCD -DBINDIR=../mkernel-0.0.1-win64 -DSRCDIR=../mkernel-0.0.1 ../mkernel-0.0.1/mkernel

Also available in: PDF HTML TXT