Hi, I have been busy setting up a build environment on Linux with a Windows guest VM so that I can build on Windows and test on Wine.
However, some things are not clear to me yet:
- Does OpenMPT support building with mingw64?
- Can I otherwise build OpenMPT via the command line?
- Is there a recommended way of doing all this?
Quote from: vananaBanana on October 23, 2022, 14:37:13
Does OpenMPT support building with mingw64?
No. OpenMPT requires MFC, and MFC is only supported by Visual Studio MSVC (and the clang-cl Visual Studio ships). MinGW-w64 (or MSYS2, ...) does not support building MFC applications.
Quote from: vananaBanana on October 23, 2022, 14:37:13
Can I otherwise build OpenMPT via the command line?
We have scripts that can automate building from the Windows Command Line in
build/auto/, but for development it is generally easier to just use the Visual Studio solutions in
build/vs*/.
Quote from: vananaBanana on October 23, 2022, 14:37:13
I have been busy setting up a build environment on Linux with a Windows guest VM so that I can build on Windows and test on Wine.
Is there a recommended way of doing all this?
Install Visual Studio inside your Windows VM.
Quote from: manx on October 23, 2022, 15:34:05
Quote from: vananaBanana on October 23, 2022, 14:37:13
Does OpenMPT support building with mingw64?
No. OpenMPT requires MFC, and MFC is only supported by Visual Studio MSVC (and the clang-cl Visual Studio ships). MinGW-w64 (or MSYS2, ...) does not support building MFC applications.
Quote from: vananaBanana on October 23, 2022, 14:37:13
Can I otherwise build OpenMPT via the command line?
We have scripts that can automate building from the Windows Command Line in build/auto/, but for development it is generally easier to just use the Visual Studio solutions in build/vs*/.
Quote from: vananaBanana on October 23, 2022, 14:37:13
I have been busy setting up a build environment on Linux with a Windows guest VM so that I can build on Windows and test on Wine.
Is there a recommended way of doing all this?
Install Visual Studio inside your Windows VM.
Alright, and how would one go on about adding source files and compiler/linker options to the build process?
Quote from: vananaBanana on October 24, 2022, 12:16:59
Alright, and how would one go on about adding source files and compiler/linker options to the build process?
- run build\build_tools.cmd once to build premake
- most MSVC compiler settings are set in build\premake\premake-defaults.lua
- source files are listed in build\premake\mpt-*.lua, build\premake-xcode\mpt-*.lua, build\autotools\Makefile.am, build\android_ndk\Android.mk, and Makefile
- run build\regenerate_vs_projects.cmd to regenerate the Visual Studio project files