Skip to content

Compilation on Windows x86 64

Błażej Szczygieł edited this page Jul 6, 2020 · 8 revisions
  1. Download Qt online installer, run and install:
    • Qt 5.14.2 for MinGW 64-bit
    • Ninja
    • CMake 64-bit
  2. Run QtCreator.
  3. (Optional step, only if not configured automatically) Configure Ninja and CMake in QtCreator:
    • set CMake in "Tools/Options/Kits/CMake"
    • set Ninja in "Tools/Options/Kits/Kits":
      • CMake generator to Ninja
      • be sure Ninja is available in system PATH, if it is not available globally:
        • set CMAKE_MAKE_PROGRAM to full path with ninja.exe in "CMake Configuration"
  4. Download QMPlay2-Win64-deps.7z from QMPlay2 Release page and unpack it e.g. to C:\.
  5. Open CMakeLists.txt from QMPlay2 sources in QtCreator.
  6. Go to "Projects/Build" and set (and press "Apply Configuration Changes"):
    • CUSTOM_INCLUDE_DIR to C:\QMPlay2-Win64-deps\include
    • CUSTOM_LINK_DIR to C:\QMPlay2-Win64-deps\lib
  7. Select unchecked USE_ features you want to build (USE_AUDIOCD, USE_CHIPTUNE_GME, USE_TAGLIB, USE_CHIPTUNE_SID), but don't select non-Windows features like USE_ALSA (and press "Apply Configuration Changes").
  8. Set (and press "Apply Configuration Changes"):
    • CUSTOM_AUDIOCD_LIBRARIES to winmm;z;regex;ws2_32
    • CUSTOM_CHIPTUNE_LIBRARIES to z
    • CUSTOM_GUI_LIBRARIES to z
    • CUSTOM_LIBQMPLAY2_LIBRARIES to freetype;fribidi;bz2
    • CUSTOM_PORTAUDIO_LIBRARIES to winmm
    • TAGLIB_STATIC_LINK to ON
  9. Build the project.
  10. (Optional step if not configured automatically) Go to "Projects/Run" and append to environment PATH: C:\QMPlay2-Win64-deps\bin;%QTDIR%\bin;
    • also append src\qmplay2 path from the build directory (Release or Debug).
  11. Run.

Clone this wiki locally