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

msvc #4384

Closed
wants to merge 31 commits into from
Closed

msvc #4384

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
231a6aa
MSVC fixes
May 10, 2018
d21c59b
added vcpkg support & std::make_unique for MSVC
May 11, 2018
a4a8612
remotevstplugin
May 12, 2018
b55042f
implementing PR comments
May 12, 2018
78a7941
renamed second RemoteVstPlugin
May 12, 2018
8474786
Added install for remotevstplugin
May 12, 2018
a569bad
remotevst: -64bit install (appimage problem)
May 12, 2018
493a0e0
cmake install fixes
May 13, 2018
dab9e04
msvc: installer works
May 13, 2018
42488a6
cmake cleanup & corrected system files install dir
May 15, 2018
24792c9
extra validation saved audio/midi devices
May 20, 2018
f1a2b38
reflexe sdl2 audio impl (PR #3947)
May 20, 2018
84aa38b
enable jack2
May 20, 2018
a7da98a
enable sf2player (fluidsynth lib)
May 20, 2018
fe16451
Added support portaudio
May 20, 2018
a91a043
set lmms as startup project (thanks secondflight)
May 20, 2018
09fb0ae
RemoteVST: process all remaining messages after the process has quit
May 21, 2018
e6dccb7
msvc: fixed portaudio install & 32b VST on 64b machine
May 21, 2018
1937ed4
quick hacks for installer (don't include in push to lmms)
May 22, 2018
bc15d2f
enable monstro for msvc
May 23, 2018
73aa137
msvc: enable organic
May 23, 2018
2b937a3
msvc: enable reverbsc
May 23, 2018
7fa15a1
msvc: enable sid
May 23, 2018
ddb098f
msvc: enable vibed
May 23, 2018
85550bf
msvc: enable vsteffect
May 23, 2018
5b973a6
msvc: enable xpressive
May 24, 2018
2a0fc67
msvc: enable zynaddsubfx
May 28, 2018
897e681
updated module zynaddsubfx to latest commit
May 28, 2018
bf71a5d
updated zynaddsubfx
May 28, 2018
9af5ac8
fltk config fix & update zynaddsubfx submodule
May 28, 2018
abb13bd
Jack midi improvements
May 30, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
url = https://github.com/rampantpixels/rpmalloc.git
[submodule "plugins/zynaddsubfx/zynaddsubfx"]
path = plugins/zynaddsubfx/zynaddsubfx
url = https://github.com/lmms/zynaddsubfx.git
url = https://github.com/justnope/zynaddsubfx.git
branch = msvc/ng
[submodule "plugins/FreeBoy/game-music-emu"]
path = plugins/FreeBoy/game-music-emu
url = https://bitbucket.org/mpyne/game-music-emu.git
Expand Down
120 changes: 86 additions & 34 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ ENDIF()
INCLUDE(VersionInfo)
INCLUDE(DetectMachine)

IF(CMAKE_TOOLCHAIN_FILE MATCHES "vcpkg.cmake$")
SET(USING_VCPKG TRUE)
ENDIF()

OPTION(WANT_ALSA "Include ALSA (Advanced Linux Sound Architecture) support" ON)
OPTION(WANT_CALF "Include CALF LADSPA plugins" ON)
Expand Down Expand Up @@ -86,9 +89,7 @@ ENDIF(LMMS_BUILD_APPLE)

IF(LMMS_BUILD_WIN32)
SET(WANT_ALSA OFF)
SET(WANT_JACK OFF)
SET(WANT_PULSEAUDIO OFF)
SET(WANT_PORTAUDIO OFF)
SET(WANT_SOUNDIO OFF)
SET(WANT_WINMM ON)
SET(LMMS_HAVE_WINMM TRUE)
Expand Down Expand Up @@ -166,10 +167,15 @@ FIND_PACKAGE(Qt5Test)
SET(QT_QTTEST_LIBRARY Qt5::Test)

# check for libsndfile
PKG_CHECK_MODULES(SNDFILE REQUIRED sndfile>=1.0.18)
IF(NOT SNDFILE_FOUND)
MESSAGE(FATAL_ERROR "LMMS requires libsndfile1 and libsndfile1-dev >= 1.0.18 - please install, remove CMakeCache.txt and try again!")
ENDIF()
IF(USING_VCPKG)
FIND_PACKAGE(LibSndFile 1.0.18 REQUIRED)
SET(SNDFILE_LIBRARIES sndfile-shared)
ELSE(USING_VCPKG)
PKG_CHECK_MODULES(SNDFILE REQUIRED sndfile>=1.0.18)
IF(NOT SNDFILE_FOUND)
MESSAGE(FATAL_ERROR "LMMS requires libsndfile1 and libsndfile1-dev >= 1.0.18 - please install, remove CMakeCache.txt and try again!")
ENDIF()
ENDIF(USING_VCPKG)
# check if we can use SF_SET_COMPRESSION_LEVEL
IF(NOT SNDFILE_VERSION VERSION_LESS 1.0.26)
SET(LMMS_HAVE_SF_COMPLEVEL TRUE)
Expand Down Expand Up @@ -373,49 +379,88 @@ ENDIF(NOT LMMS_HAVE_ALSA)

# check for JACK
IF(WANT_JACK)
PKG_CHECK_MODULES(JACK jack>=0.77)
IF(JACK_FOUND)
IF(WANT_WEAKJACK)
SET(LMMS_HAVE_WEAKJACK TRUE)
SET(WEAKJACK_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/src/3rdparty/weakjack/weakjack)
SET(STATUS_JACK "OK (weak linking enabled)")
SET(JACK_INCLUDE_DIRS "")
# use dlsym instead
SET(JACK_LIBRARIES ${CMAKE_DL_LIBS})
ELSE()
SET(STATUS_JACK "OK")
ENDIF()
#TODO: quick hack to enable jack for windows. remove and implement it better.
#Do not use jack2 from vcpkg, uninstall if you have it (header file defines uint8_t etc...)
IF(MSVC)
#this is the jack common dir if you got it from git
SET(JACK_INCLUDE_DIRS "" CACHE PATH "Jack2 path")
#This is in the jack build dir common/jack.lib again if from git
SET(JACK_LIBRARIES "" CACHE FILEPATH "jack2 library path")
#again, quick hack. Get the jack dll for installing its in build/common/libjack-0.dll
SET(JACK_LIBRARY_DLL "" CACHE FILEPATH "jack2 library dll")

SET(JACK_FOUND TRUE)
SET(LMMS_HAVE_JACK TRUE)
ELSE(JACK_FOUND)
SET(STATUS_JACK "not found, please install libjack0.100.0-dev (or similar) "
"if you require JACK support")
ENDIF(JACK_FOUND)
ELSE(MSVC)
PKG_CHECK_MODULES(JACK jack>=0.77)
IF(JACK_FOUND)
IF(WANT_WEAKJACK)
SET(LMMS_HAVE_WEAKJACK TRUE)
SET(WEAKJACK_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/src/3rdparty/weakjack/weakjack)
SET(STATUS_JACK "OK (weak linking enabled)")
SET(JACK_INCLUDE_DIRS "")
# use dlsym instead
SET(JACK_LIBRARIES ${CMAKE_DL_LIBS})
ELSE()
SET(STATUS_JACK "OK")
ENDIF()
SET(LMMS_HAVE_JACK TRUE)
ELSE(JACK_FOUND)
SET(STATUS_JACK "not found, please install libjack0.100.0-dev (or similar) "
"if you require JACK support")
ENDIF(JACK_FOUND)
ENDIF(MSVC)
ENDIF(WANT_JACK)


# check for FFTW3F-library
PKG_CHECK_MODULES(FFTW3F REQUIRED fftw3f>=3.0.0)

IF(USING_VCPKG)
#currently find_package for fftw is broken in vcpkg. Replace this when fixed
FIND_PATH(FFTW3F_INCLUDE_DIRS fftw3.h)
FIND_LIBRARY(FFTW3F_LIBRARIES fftw3f)
ELSE(USING_VCPKG)
PKG_CHECK_MODULES(FFTW3F REQUIRED fftw3f>=3.0.0)
ENDIF(USING_VCPKG)

# check for FLTK
FIND_PACKAGE(FLTK)
IF(USING_VCPKG)
FIND_PATH(FLTK_INCLUDE_DIR "fl/fl.h")
FIND_LIBRARY(FLTK_LIBRARIES "fltk")
FIND_PROGRAM(FLTK_FLUID_EXECUTABLE "fluid")
IF(FLTK_INCLUDE_DIR)
SET(FLTK_FOUND TRUE)
ENDIF(FLTK_INCLUDE_DIR)
ELSE(USING_PCPKG)
FIND_PACKAGE(FLTK)
ENDIF(USING_VCPKG)
IF(FLTK_FOUND)
SET(STATUS_ZYN "OK")
ELSE()
SET(STATUS_ZYN "not found, please install fltk")
ENDIF()

# check for Fluidsynth
IF(WANT_SF2)
PKG_CHECK_MODULES(FLUIDSYNTH fluidsynth>=1.0.7)
IF(FLUIDSYNTH_FOUND)
#TODO: better impl
IF(USING_VCPKG)
FIND_FILE(FLUIDSYNTH_INCLUDE_DIRS "fluidsynth.h")
FIND_LIBRARY(FLUIDSYNTH_LIBRARIES "fluidsynth.lib")
IF(FLUIDSYNTH_INCLUDE_DIRS)
SET(FLUIDSYNTH_FOUND)
SET(LMMS_HAVE_FLUIDSYNTH TRUE)
SET(STATUS_FLUIDSYNTH "OK")
ELSE(FLUIDSYNTH_FOUND)
SET(STATUS_FLUIDSYNTH "not found, libfluidsynth-dev (or similar)"
"is highly recommended")
ENDIF(FLUIDSYNTH_FOUND)
ENDIF(WANT_SF2)
ENDIF(FLUIDSYNTH_INCLUDE_DIRS)
ELSE(USING_VCPKG)
IF(WANT_SF2)
PKG_CHECK_MODULES(FLUIDSYNTH fluidsynth>=1.0.7)
IF(FLUIDSYNTH_FOUND)
SET(LMMS_HAVE_FLUIDSYNTH TRUE)
SET(STATUS_FLUIDSYNTH "OK")
ELSE(FLUIDSYNTH_FOUND)
SET(STATUS_FLUIDSYNTH "not found, libfluidsynth-dev (or similar)"
"is highly recommended")
ENDIF(FLUIDSYNTH_FOUND)
ENDIF(WANT_SF2)
ENDIF(USING_VCPKG)

# check for libgig
If(WANT_GIG)
Expand Down Expand Up @@ -477,7 +522,13 @@ ELSE()
ENDIF(WANT_DEBUG_FPE)

# check for libsamplerate
PKG_CHECK_MODULES(SAMPLERATE REQUIRED samplerate>=0.1.8)
IF(USING_VCPKG)
#TODO no cmake config support. Can we check the version some other way?
FIND_FILE(SAMPLERATE_INCLUDE_DIRS samplerate.h)
FIND_LIBRARY(SAMPLERATE_LIBRARIES libsamplerate-0)
ELSE(USING_VCPKG)
PKG_CHECK_MODULES(SAMPLERATE REQUIRED samplerate>=0.1.8)
ENDIF(USING_VCPKG)

# set compiler flags
IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
Expand Down Expand Up @@ -700,4 +751,5 @@ MESSAGE(
"-----------------------------------------------------------------\n"
"\n\n")

SET(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION "${BIN_DIR}")
INCLUDE(InstallRequiredSystemLibraries)
4 changes: 2 additions & 2 deletions cmake/linux/package_linux.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ fi

# Move executables so linuxdeployqt can find them
ZYNLIB="${APPDIR}usr/lib/lmms/RemoteZynAddSubFx"
VSTLIB="${APPDIR}usr/lib/lmms/RemoteVstPlugin.exe.so"
VSTLIB="${APPDIR}usr/lib/lmms/RemoteVstPlugin32.exe.so"

ZYNBIN="${APPDIR}usr/bin/RemoteZynAddSubFx"
VSTBIN="${APPDIR}usr/bin/RemoteVstPlugin.exe.so"
VSTBIN="${APPDIR}usr/bin/RemoteVstPlugin32.exe.so"

mv "$ZYNLIB" "$ZYNBIN"
mv "$VSTLIB" "$VSTBIN"
Expand Down
45 changes: 26 additions & 19 deletions cmake/modules/FindPortaudio.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,31 @@
#


if (PORTAUDIO_LIBRARIES AND PORTAUDIO_INCLUDE_DIRS)
# in cache already
set(PORTAUDIO_FOUND TRUE)
else (PORTAUDIO_LIBRARIES AND PORTAUDIO_INCLUDE_DIRS)
include(FindPkgConfig)
pkg_check_modules(PORTAUDIO portaudio-2.0)
if (PORTAUDIO_FOUND)
if (NOT Portaudio_FIND_QUIETLY)
message(STATUS "Found Portaudio: ${PORTAUDIO_LIBRARIES}")
endif (NOT Portaudio_FIND_QUIETLY)
else (PORTAUDIO_FOUND)
if (Portaudio_FIND_REQUIRED)
message(FATAL_ERROR "Could not find Portaudio")
endif (Portaudio_FIND_REQUIRED)
endif (PORTAUDIO_FOUND)
IF(PORTAUDIO_LIBRARIES AND PORTAUDIO_INCLUDE_DIRS)
# in cache already
set(PORTAUDIO_FOUND TRUE)
ELSE(PORTAUDIO_LIBRARIES AND PORTAUDIO_INCLUDE_DIRS)
IF(USING_VCPKG)
FIND_FILE(PORTAUDIO_INCLUDE_DIRS "portaudio.h")
FIND_LIBRARY(PORTAUDIO_LIBRARIES "portaudio.lib")
IF(PORTAUDIO_INCLUDE_DIRS)
SET(PORTAUDIO_FOUND TRUE)
ENDIF(PORTAUDIO_INCLUDE_DIRS)
ELSE(USING_VCPKG)
include(FindPkgConfig)
pkg_check_modules(PORTAUDIO portaudio-2.0)
if (PORTAUDIO_FOUND)
if (NOT Portaudio_FIND_QUIETLY)
message(STATUS "Found Portaudio: ${PORTAUDIO_LIBRARIES}")
endif (NOT Portaudio_FIND_QUIETLY)
else (PORTAUDIO_FOUND)
if (Portaudio_FIND_REQUIRED)
message(FATAL_ERROR "Could not find Portaudio")
endif (Portaudio_FIND_REQUIRED)
endif (PORTAUDIO_FOUND)

# show the PORTAUDIO_INCLUDE_DIRS and PORTAUDIO_LIBRARIES variables only in the advanced view
mark_as_advanced(PORTAUDIO_INCLUDE_DIRS PORTAUDIO_LIBRARIES)

endif (PORTAUDIO_LIBRARIES AND PORTAUDIO_INCLUDE_DIRS)
# show the PORTAUDIO_INCLUDE_DIRS and PORTAUDIO_LIBRARIES variables only in the advanced view
mark_as_advanced(PORTAUDIO_INCLUDE_DIRS PORTAUDIO_LIBRARIES)
ENDIF(USING_VCPKG)
ENDIF(PORTAUDIO_LIBRARIES AND PORTAUDIO_INCLUDE_DIRS)

6 changes: 5 additions & 1 deletion cmake/nsis/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
SET(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis/nsis_branding.bmp")
IF(MSVC)
STRING(REPLACE "/" "\\\\" CPACK_PACKAGE_ICON ${CPACK_PACKAGE_ICON})
ENDIF(MSVC)
SET(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis/lmms.ico")
SET(CPACK_NSIS_INSTALLED_ICON_NAME "${CMAKE_PROJECT_NAME}.exe" PARENT_SCOPE)
SET(CPACK_NSIS_DISPLAY_NAME "${PROJECT_NAME_UCASE} ${VERSION}" PARENT_SCOPE)
Expand All @@ -8,7 +11,8 @@ SET(CPACK_NSIS_CONTACT "${PROJECT_EMAIL}" PARENT_SCOPE)
SET(CPACK_PACKAGE_EXECUTABLES "${CMAKE_PROJECT_NAME}.exe;${PROJECT_NAME_UCASE}" PARENT_SCOPE)
SET(CPACK_NSIS_MENU_LINKS "${CMAKE_PROJECT_NAME}.exe;${PROJECT_NAME_UCASE}" PARENT_SCOPE)
SET(CPACK_NSIS_DEFINES "
!include ${CMAKE_SOURCE_DIR}/cmake/nsis/FileAssociation.nsh
!addincludedir ${CMAKE_SOURCE_DIR}/cmake/nsis
!include FileAssociation.nsh
!include LogicLib.nsh
!include WinVer.nsh")
SET(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${VERSION}-win32")
Expand Down
2 changes: 1 addition & 1 deletion data/locale/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ FOREACH(_ts_file ${lmms_LOCALES})
STRING(REPLACE ".ts" ".qm" _qm_file "${_ts_file}")
STRING(REPLACE ".ts" ".qm" _qm_target "${_ts_target}")
ADD_CUSTOM_TARGET(${_ts_target}
COMMAND "${QT_LUPDATE_EXECUTABLE}" -locations none -no-obsolete -I ${CMAKE_SOURCE_DIR}/include/ ${LMMS_SRCS} ${LMMS_INCLUDES} ${LMMS_UIS} `find "\"${CMAKE_SOURCE_DIR}/plugins/\"" -type f -name '*.cpp' -or -name '*.h'` -ts "\"${_ts_file}\""
COMMAND "${QT_LUPDATE_EXECUTABLE}" -locations none -no-obsolete -I ${CMAKE_SOURCE_DIR}/include/ ${LMMS_SRCS} ${LMMS_UIS} ${CMAKE_SOURCE_DIR}/plugins -ts "\"${_ts_file}\""
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
ADD_CUSTOM_TARGET(${_qm_target}
COMMAND "${QT_LRELEASE_EXECUTABLE}" "${_ts_file}" -qm "${_qm_file}"
Expand Down
8 changes: 0 additions & 8 deletions include/AudioJack.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,6 @@ class AudioJack : public QObject, public AudioDevice
AudioJack( bool & _success_ful, Mixer* mixer );
virtual ~AudioJack();

// this is to allow the jack midi connection to use the same jack client connection
// the jack callback is handled here, we call the midi client so that it can read
// it's midi data during the callback
AudioJack * addMidiClient(MidiJack *midiClient);
jack_client_t * jackClient() {return m_client;};

inline static QString name()
{
return QT_TRANSLATE_NOOP( "setupWidget",
Expand All @@ -78,7 +72,6 @@ class AudioJack : public QObject, public AudioDevice
private:
QLineEdit * m_clientName;
LcdSpinBox * m_channels;

} ;


Expand Down Expand Up @@ -110,7 +103,6 @@ private slots:
bool m_stopped;
QMutex m_processingMutex;

MidiJack *m_midiClient;
QVector<jack_port_t *> m_outputPorts;
jack_default_audio_sample_t * * m_tempOutBufs;
surroundSampleFrame * m_outBuf;
Expand Down
Loading