Cross-compilation to windows (mingw)?
Is there a way to cross-compile pygobject app to windows? I'm using a fedora docker container with mingw64 and trying to build package from source:
meson build --cross=../cross_build.txt -Dtests=false
my cross_build.txt is:
[host_machine] system = 'windows' cpu_family = 'x86_64' cpu = 'x86_64' endian = 'little' [properties] c_args =  c_link_args = ['-lpython3.8'] needs_exe_wrapper = true [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' exe_wrapper = 'wine'
It somewhat worked but obviously resulted libraries are windows dlls and at some point when build tries to execute g-ir-scanner it fails:
[90/160] Generating gir-glib with a meson_exe.py custom command FAILED: subprojects/gobject-introspection/gir/GLib-2.0.gir /usr/bin/meson --internal exe --unpickle /build/pygobject-3.38.0/build/meson-private/meson_exe_g-ir-scanner_f7b22e6c19f2244aa29173f625d326e9c3a89258.dat Traceback (most recent call last): File "/build/pygobject-3.38.0/build/subprojects/gobject-introspection/tools/g-ir-scanner", line 98, in <module> from giscanner.scannermain import scanner_main File "/build/pygobject-3.38.0/build/subprojects/gobject-introspection/giscanner/scannermain.py", line 35, in <module> from giscanner.ast import Include, Namespace File "/build/pygobject-3.38.0/build/subprojects/gobject-introspection/giscanner/ast.py", line 29, in <module> from .sourcescanner import CTYPE_TYPEDEF, CSYMBOL_TYPE_TYPEDEF File "/build/pygobject-3.38.0/build/subprojects/gobject-introspection/giscanner/sourcescanner.py", line 35, in <module> from giscanner._giscanner import SourceScanner as CSourceScanner ImportError: /build/pygobject-3.38.0/build/subprojects/gobject-introspection/giscanner/_giscanner.cpython-38-x86_64-linux-gnu.so: invalid ELF header
It does not work under wine, too. Can you please check is there any way to get a windows packages inside a linux container? Or may be there is a good place where I can download ready to use binaries? I'm a bit confused about python package system, but as a final result I want to create a windows exe with dll bundle that I can pack into nsis installer.