Closed nightsky30 closed 4 years ago
Meson might allow this... https://mesonbuild.com/Cross-compilation.html
meson srcdir builddir --cross-file cross_file.txt
Files added: commit 026a8073af5609fc19aa4ea5890e992f0a7ce0ed Paths/binaries fixed: commit dddca5ccbc8631e4396cfae8fda9012e3241913a
sudo apt install mingw-w64 mingw-w64-tools
meson koikoi koikoi/builddir_x64 --cross-file koikoi/misc/meson.cross.win.x64
Build type: cross build Project name: koikoi Project version: undefined C++ compiler for the build machine: c++ (gcc 9.2.1 "c++ (Ubuntu 9.2.1-8ubuntu1) 9.2.1 20190909") C++ compiler for the host machine: /usr/bin/x86_64-w64-mingw32-g++ (gcc 9.2.0 "x86_64-w64-mingw32-g++ (GCC) 9.2-win32 20190909") Host machine cpu family: x86_64 Host machine cpu: i686 Target machine cpu family: x86_64 Target machine cpu: i686 Build machine cpu family: x86_64 Build machine cpu: x86_64 WARNING: rcc dependencies will not work reliably until this upstream issue is fixed: https://bugreports.qt.io/browse/QTBUG-45460 Found pkg-config: /usr/bin/x86_64-w64-mingw32-pkg-config (1.6.3) Found qmake: /usr/bin/qmake (5.12.4) Run-time dependency qt5 (modules: Widgets) found: NO (tried pkgconfig, qmake-qt5 and qmake)
meson.build:7:0: ERROR: Dependency "qt5" not found, tried pkgconfig, qmake-qt5 and qmake
sudo apt install \ autoconf \ automake \ autopoint \ bash \ bison \ bzip2 \ flex \ g++ \ g++-multilib \ gettext \ git \ gperf \ intltool \ libc6-dev-i386 \ libgdk-pixbuf2.0-dev \ libltdl-dev \ libssl-dev \ libtool-bin \ libxml-parser-perl \ lzip \ make \ openssl \ p7zip-full \ patch \ perl \ pkg-config \ python \ ruby \ sed \ unzip \ wget \ xz-utils
sudo apt-mark auto \ autoconf \ automake \ autopoint \ bash \ bison \ bzip2 \ flex \ g++ \ g++-multilib \ gettext \ git \ gperf \ intltool \ libc6-dev-i386 \ libgdk-pixbuf2.0-dev \ libltdl-dev \ libssl-dev \ libtool-bin \ libxml-parser-perl \ lzip \ make \ openssl \ p7zip-full \ patch \ perl \ pkg-config \ python \ ruby \ sed \ unzip \ wget \ xz-utils
mkdir mxe_build cd mxe_build git clone git@github.com:mxe/mxe.git cd mxe make qt5 MXE_TARGETS='x86_64-w64-mingw32.shared i686-w64-mingw32.shared x86_64-w64-mingw32.static i686-w64-mingw32.static'
Compiling .exe files, but not certain it is linking properly...
In liu of cross-compiling, just installed Qt in Win10 VM and compiled there...
Looking into Qt Installer Framework. Maybe revisit this later.
Cross-compile g++
Windows: https://stackoverflow.com/questions/2033997/how-to-compile-for-windows-on-linux-with-gcc-g
MacOS: https://stackoverflow.com/questions/693952/how-to-compile-for-os-x-in-linux-or-windows
Good Info: https://wiki.qt.io/Building_Qt_5_from_Git https://forum.qt.io/topic/94742/cross-compile-and-deploy-from-linux-to-windows/9
Have to build qt5 for Windows using mingw to satisfy the qt5 deps before building koikoi for Windows with said qt5 deps.
From Delphi251189:
Other junks: https://mesonbuild.com/Cross-compilation.html https://github.com/pololu/nixcrpkgs https://packages.ubuntu.com/search?mode=filename&suite=eoan§ion=all&arch=any&keywords=mingw+gcc&searchon=contents