Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anytizer/a674f2d24cd91dd2ffc510963e1a241c to your computer and use it in GitHub Desktop.
Save anytizer/a674f2d24cd91dd2ffc510963e1a241c to your computer and use it in GitHub Desktop.
Compiling 64bit LMMS under Windows with Visual Studio

Installing with msys

sudo apt install pacman
pacman --needed -S bash pacman pacman-mirrors msys2-runtime

mkdir build
cd build
../cmake/build_win64.sh

cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../target/
cmake --install . --config Release --prefix=./lmms.win
make -j12 package
make install

This section is incomplete or work in progress!

Disk Usage while compiling LMMS

Project Size Notes
vcpkg x64, x86 7.5 GB My statistics includes packages unessential to LMMS as well
AppData/Local/vcpkg 840 MB Archives
LMMS Sources + .git 500 MB Including submodules
LMMS/build 5 GB created after compilation
LMMS/target < 1 GB created after compilation
LMMS packaging
CMake
QT 5, Qt 6 24 GB Old version should be ok. (5.15.2 basic installation: 1.18 GB)
Visual Studio CE 16 GB with C++, C# tools

Summary of General Preperation

  • Install GIT - https://git-scm.com/downloads
  • Install TortoiseGIT - https://tortoisegit.org/download/ optionally
  • Install NSIS - https://nsis.sourceforge.io/Download
  • Install CMake - https://cmake.org
  • Install QT 5.12.12 - opensource from qt.io, offline installers
  • Install C++ Developer Toolkit on top of Visual Studio community edition.
  • Install WSL and / or linux commands - https://getgnuwin32.sourceforge.net and set them appear in system path.
  • Install doxygen - https://www.doxygen.nl, later: graphviz via vcpkg
  • Install vcpkg from GitHub - https://github.com/microsoft/vcpkg
  • Install vcpkg based packages required for LMMS
    • very long time taking process: > 1:00 hours
    • Uses a lot of bandwidth downloading packages
  • Obtain the LMMS Source Code from GitHub
  • Obtain other LMMS Depedencies (git submodules)
  • Build project (Visual Studio Solution files) with CMake
  • Manually copy data/, data/stk, plugins directories
  • Manually copy plugins/ladspa/*.dll - because they do not build
  • Unload 32bit projects from Visual Studio - because it requires 32 bit qt
  • Compile! Run!
  • Plugins with difficulties
  • Other notes

Compiling 64bit LMMS under Windows with Visual Studio

Build platform/hardware

  • Windows 11 Laptop, Intel Core i7, 16gb RAM
  • Visual Studio 2022, Community Edition
  • OS installed on SSD
  • Software installed on HDD

Original references

Step by Step Instructions

Preperation for the plugins that do not compile from the source code.

  • Install official/nighly build of LMMS.
  • Copy LMMS/ folder to a reference path. You will need plugins/ladspa folder from this reference.
  • Uninstall LMMS - so we can build our own copy.
cd d:\
git clone https://github.com/Microsoft/vcpkg
cd vcpkg
.\bootstrap-vcpkg.bat

Install vcpkg packages

.\vcpkg install --triplet=x64-windows fftw3 fltk fluidsynth glib graphviz
.\vcpkg install --triplet=x64-windows libsamplerate libsndfile lilv lv2 sdl2 sndfile libstk portaudio

Getting the source code

Obtain LMMS Source Code. Obtain 3rd party depenencies for LMMS

git clone --recurse-submodules -b master https://github.com/lmms/lmms

cd lmms

git submodule update --progress --init --recursive --force --merge --rebase

mkdir build
cd build
cmake .. -G "Visual Studio 17 2022" -DCMAKE_PREFIX_PATH=C:\Qt\Qt5.12.12\5.12.12\msvc2017_64 -DQT_32_PREFIX=C:\Qt\Qt5.12.12\5.12.12\msvc2019 -DCMAKE_TOOLCHAIN_FILE=d:/vcpkg/scripts/buildsystems/vcpkg.cmake

In another installation

cmake .. -G "Visual Studio 17 2022" -DCMAKE_PREFIX_PATH=D:\qt\5.15.2\msvc2019_64 -DCMAKE_TOOLCHAIN_FILE=d:/vcpkg/scripts/buildsystems/vcpkg.cmake

Choose one of the build mode from lmms\build:

Debug Release Notes
mkdir Debug mkdir Release Optional
mkdir plugins\Debug mkdir plugins\Release Optional
cmake --build . --config Debug cmake --build . --config Release Build the project, plugins in particular
copy ..\data .\Debug copy ..\data .\Release data\stk\rawwaves, data/themes, data/presets, ...
cd Debug cd Release
mklink /d plugins ..\plugins\Debug mklink /d plugins ..\plugins\Release Link to the plugins by symlinking
.\Debug\lmms.exe .\Release\lmms.exe Opening the compiled LMMS binary
lmms.sln lmms.sln Visual Studio Project File in build directory.

The basic intent is to compile the plugins folder. Otherise, Visual Studio will compile the build\lmms.sln.

  • open lmms.sln in Visual Studio
  • Unload 32bit projects from Visual Studio from the solution explorer.
    • Scroll down to RemoteVstPlugin32 project and unload.
  • Compile!
  • Run :-)

You will get lmms.exe at build/Debug/lmms.exe or at build\Release\lmms.exe. I have not tested in-depth with Release build option. But both builds work well.

Plugins that are difficult

None of the plugins/ladspa/*.dll plugins will compile natively in our case. So, please copy them directly into plugins/ladspa folder from outside (from LMMS original installation folder reference)

You can see: The specified module could not be found.

  • ladspa/*.dll copied directly into (imp_1199.dll, mbeq_1197.dll, pitch_scale_1193.dll, pitch_scale_1194.dll)
  • sf2player.dll - compiled/built but does not run well, if once crashed.
  • libfluidsynth-3.dll

In release mode, further, following modules could not be found.

  • plugins\carlarack.dll
  • plugins\glib-2.0-0.dll

In both cases, the .dll files exist but somehow unuseful.

Other notes

  • Activates microphone while running LMMS
  • Gigabytes of overall downloads
  • Gigabytes of total hard disk usage
  • Takes a lot of time to complete the proces
  • All projects are listed in same hierarchy.
    • For example, one language translation becomes a project on the top hierarchy of the lmms.sln file.
    • Translation projects, and application projects are mixed together.
  • Packaging, Installation, Uninstallation not considered.
  • I did not consider release mode build in details.

Hope, your builds were successful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment