Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hello, may I ask how to compile executable files for Windows? #771

Closed
wankaiming opened this issue Nov 12, 2024 · 3 comments
Closed

Hello, may I ask how to compile executable files for Windows? #771

wankaiming opened this issue Nov 12, 2024 · 3 comments
Labels

Comments

@wankaiming
Copy link

Is there a tutorial on cross compiling using the arch operating system?
Or a tutorial compiled on the Windows operating system using mingw64?

@zaps166
Copy link
Owner

zaps166 commented Nov 12, 2024

Cross compilation is similar to Linux native compilation.

Install/compile all required dependencies for mingw-w64 (e.g. from AUR, however you may modify them to not compile unneeded dependencies) and run (example, adjust parameters if not working for you):

x86_64-w64-mingw32-cmake -S . -B build-win64 -DCMAKE_BUILD_TYPE=Release -GNinja -DCMAKE_INSTALL_PREFIX="$PWD/install" -DCUSTOM_LIBQMPLAY2_LIBRARIES="libass.dll.a" -DCUSTOM_AUDIOCD_LIBRARIES="libcdio.dll.a libcddb.dll.a" -DCUSTOM_PORTAUDIO_LIBRARIES="libportaudio.dll.a" -DCUSTOM_CHIPTUNE_LIBRARIES="libgme.dll.a libsidplayfp.dll.a" -DCUSTOM_GUI_LIBRARIES="libtag.dll.a" -DTAGLIB_STATIC_LINK=OFF
ninja -C build-win64 install/strip

Next copy needed files from /usr/x86_64-w64-mingw32 into $PWD/install and run (see my Windows packages as reference).

@zaps166 zaps166 closed this as completed Nov 12, 2024
@zaps166
Copy link
Owner

zaps166 commented Nov 12, 2024

Compilation instruction for Windows on Windows is here: https://github.com/zaps166/QMPlay2/wiki/Compilation-on-Windows-x86-64 (a bit obsolete for now, but still more-or-less relevant for Qt 6.x).

@wankaiming
Copy link
Author

@zaps166 Thank you very much for your reply. I will refer to the tutorial again and try again

@zaps166 zaps166 pinned this issue Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants