Skip to content

Commit

Permalink
Merge branch 'master' into SDI
Browse files Browse the repository at this point in the history
  • Loading branch information
Hussam Eddin Alhomsi authored Dec 21, 2017
2 parents b95768c + e9b76a5 commit ed669db
Show file tree
Hide file tree
Showing 849 changed files with 5,983 additions and 214,950 deletions.
30 changes: 30 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[submodule "src/3rdparty/qt5-x11embed"]
path = src/3rdparty/qt5-x11embed
url = https://github.com/Lukas-W/qt5-x11embed.git
[submodule "src/3rdparty/rpmalloc/rpmalloc"]
path = src/3rdparty/rpmalloc/rpmalloc
url = https://github.com/rampantpixels/rpmalloc.git
[submodule "plugins/zynaddsubfx/zynaddsubfx"]
path = plugins/zynaddsubfx/zynaddsubfx
url = https://github.com/lmms/zynaddsubfx.git
[submodule "plugins/FreeBoy/game-music-emu"]
path = plugins/FreeBoy/game-music-emu
url = https://bitbucket.org/mpyne/game-music-emu.git
[submodule "plugins/OpulenZ/adplug"]
path = plugins/OpulenZ/adplug
url = https://github.com/adplug/adplug.git
[submodule "plugins/LadspaEffect/calf/veal"]
path = plugins/LadspaEffect/calf/veal
url = https://github.com/lmms/veal
[submodule "plugins/Xpressive/exprtk"]
path = plugins/Xpressive/exprtk
url = https://github.com/ArashPartow/exprtk
[submodule "plugins/LadspaEffect/swh/ladspa"]
path = plugins/LadspaEffect/swh/ladspa
url = https://github.com/swh/ladspa
[submodule "plugins/LadspaEffect/tap/tap-plugins"]
path = plugins/LadspaEffect/tap/tap-plugins
url = https://github.com/tomszilagyi/tap-plugins
[submodule "src/3rdparty/weakjack/weakjack"]
path = src/3rdparty/weakjack/weakjack
url = https://github.com/x42/weakjack.git
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ matrix:
- env: TARGET_OS=win64
- os: osx
osx_image: xcode8.2
- env: QT5=
- env: QT5=True
- env: QT5=True TARGET_OS=win32
- env: QT5=True TARGET_OS=win64
- os: osx
osx_image: xcode8.2
env: QT5=True
install: ${TRAVIS_BUILD_DIR}/.travis/install.sh
script: ${TRAVIS_BUILD_DIR}/.travis/script.sh
Expand Down
1 change: 1 addition & 0 deletions .travis/linux..before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

set -e

sudo add-apt-repository ppa:beineri/opt-qt592-trusty -y
sudo add-apt-repository ppa:andrewrk/libgroove -y
sudo sed -e "s/trusty/precise/" -i \
/etc/apt/sources.list.d/andrewrk-libgroove-trusty.list
Expand Down
20 changes: 16 additions & 4 deletions .travis/linux..install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,30 @@
set -e

PACKAGES="cmake libsndfile-dev fftw3-dev libvorbis-dev libogg-dev libmp3lame-dev
libasound2-dev libjack-dev libsdl-dev libsamplerate0-dev libstk0-dev
libfluidsynth-dev portaudio19-dev wine-dev g++-multilib libfltk1.3-dev
libasound2-dev libjack-jackd2-dev libsdl-dev libsamplerate0-dev libstk0-dev stk
libfluidsynth-dev portaudio19-dev g++-multilib libfltk1.3-dev
libgig-dev libsoundio-dev"

# swh build dependencies
SWH_PACKAGES="perl libxml2-utils libxml-perl liblist-moreutils-perl"

# VST dependencies
VST_PACKAGES="wine-dev libqt5x11extras5-dev qtbase5-private-dev libxcb-util0-dev libxcb-keysyms1-dev"

# Help with unmet dependencies
PACKAGES="$PACKAGES libjack0"
PACKAGES="$PACKAGES $SWH_PACKAGES $VST_PACKAGES libjack-jackd2-0"

if [ "$QT5" ]; then
PACKAGES="$PACKAGES qtbase5-dev qttools5-dev-tools qttools5-dev"
PACKAGES="$PACKAGES qt59base qt59translations qt59tools"
else
PACKAGES="$PACKAGES libqt4-dev"
fi

# shellcheck disable=SC2086
sudo apt-get install -y $PACKAGES

# kxstudio repo offers Carla; avoid package conflicts (wine, etc) by running last
sudo add-apt-repository -y ppa:kxstudio-debian/libs
sudo add-apt-repository -y ppa:kxstudio-debian/apps
sudo apt-get update
sudo apt-get install -y carla-git
5 changes: 5 additions & 0 deletions .travis/linux..script.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/usr/bin/env bash
if [ "$QT5" ]; then
unset QTDIR QT_PLUGIN_PATH LD_LIBRARY_PATH
# shellcheck disable=SC1091
source /opt/qt59/bin/qt59-env.sh
fi

set -e

Expand Down
5 changes: 4 additions & 1 deletion .travis/linux.win32.install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ MINGW_PACKAGES="mingw32-x-sdl mingw32-x-libvorbis mingw32-x-fluidsynth mingw32-x
mingw32-x-pkgconfig mingw32-x-binutils mingw32-x-gcc mingw32-x-runtime
mingw32-x-libgig mingw32-x-libsoundio mingw32-x-lame $MINGW_PACKAGES"

# swh build dependencies
SWH_PACKAGES="perl libxml2-utils libxml-perl liblist-moreutils-perl"

export MINGW_PACKAGES

"$TRAVIS_BUILD_DIR/.travis/linux.win.download.sh" win32

PACKAGES="nsis cloog-isl libmpc3 qt4-linguist-tools mingw32 $MINGW_PACKAGES"
PACKAGES="nsis cloog-isl libmpc3 qt4-linguist-tools mingw32 $MINGW_PACKAGES $SWH_PACKAGES"

# shellcheck disable=SC2086
sudo apt-get install -y $PACKAGES
Expand Down
14 changes: 2 additions & 12 deletions .travis/osx..install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,8 @@ done;
brew install $PACKAGES

# Recompile fluid-synth without CoreAudio per issues #649
# Changes to fluid-synth.rb must be pushed to URL prior to use
if [ "$TRAVIS_EVENT_TYPE" == "pull_request" ]; then
slug=$TRAVIS_PULL_REQUEST_SLUG
branch=$TRAVIS_PULL_REQUEST_BRANCH
elif "${TRAVIS}"; then
slug=$TRAVIS_REPO_SLUG
branch=$TRAVIS_BRANCH
else
slug="LMMS/lmms"
branch=$(git symbolic-ref --short HEAD)
fi
# Ruby formula must be a URL

brew install --build-from-source "https://raw.githubusercontent.com/${slug}/${branch}/cmake/apple/fluid-synth.rb"
brew install --build-from-source "https://gist.githubusercontent.com/tresf/c9260c43270abd4ce66ff40359588435/raw/fluid-synth.rb"

sudo npm install -g appdmg
2 changes: 1 addition & 1 deletion .travis/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if [ "$TYPE" = 'style' ]; then

else

mkdir build
mkdir -p build
cd build

export CMAKE_FLAGS="-DWANT_QT5=$QT5 -DUSE_WERROR=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo"
Expand Down
111 changes: 75 additions & 36 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0)

PROJECT(lmms)

Expand All @@ -8,19 +8,22 @@ IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0005 NEW)
CMAKE_POLICY(SET CMP0003 NEW)
IF (CMAKE_MAJOR_VERSION GREATER 2)
CMAKE_POLICY(SET CMP0026 OLD)
CMAKE_POLICY(SET CMP0026 NEW)
CMAKE_POLICY(SET CMP0045 NEW)
CMAKE_POLICY(SET CMP0050 OLD)
ENDIF()
CMAKE_POLICY(SET CMP0020 NEW)
ENDIF(COMMAND CMAKE_POLICY)

INCLUDE(CheckSubmodules)
INCLUDE(AddFileDependencies)
INCLUDE(CheckIncludeFiles)
INCLUDE(FindPkgConfig)

STRING(TOUPPER "${CMAKE_PROJECT_NAME}" PROJECT_NAME_UCASE)

# Updated by maintenance tasks
SET(PROJECT_YEAR 2015)
SET(PROJECT_YEAR 2017)

SET(PROJECT_AUTHOR "LMMS Developers")
SET(PROJECT_URL "https://lmms.io")
Expand All @@ -30,7 +33,7 @@ SET(PROJECT_COPYRIGHT "2008-${PROJECT_YEAR} ${PROJECT_AUTHOR}")
SET(VERSION_MAJOR "1")
SET(VERSION_MINOR "2")
SET(VERSION_RELEASE "0")
SET(VERSION_STAGE "rc3")
SET(VERSION_STAGE "rc5")
SET(VERSION_BUILD "0")
SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_RELEASE}")
IF(VERSION_STAGE)
Expand All @@ -51,6 +54,7 @@ OPTION(WANT_CAPS "Include C* Audio Plugin Suite (LADSPA plugins)" ON)
OPTION(WANT_CARLA "Include Carla plugin" ON)
OPTION(WANT_CMT "Include Computer Music Toolkit LADSPA plugins" ON)
OPTION(WANT_JACK "Include JACK (Jack Audio Connection Kit) support" ON)
OPTION(WANT_WEAKJACK "Loosely link JACK libraries" ON)
OPTION(WANT_MP3LAME "Include MP3/Lame support" ON)
OPTION(WANT_OGGVORBIS "Include OGG/Vorbis support" ON)
OPTION(WANT_PULSEAUDIO "Include PulseAudio support" ON)
Expand Down Expand Up @@ -85,12 +89,14 @@ 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)
SET(STATUS_ALSA "<not supported on this platform>")
SET(STATUS_JACK "<not supported on this platform>")
SET(STATUS_PULSEAUDIO "<not supported on this platform>")
SET(STATUS_PORTAUDIO "<disabled on this platform>")
SET(STATUS_SOUNDIO "<disabled in this release>")
SET(STATUS_WINMM "OK")
SET(STATUS_APPLEMIDI "<not supported on this platform>")
Expand All @@ -108,6 +114,7 @@ IF(LMMS_BUILD_MSYS AND CMAKE_BUILD_TYPE STREQUAL "Debug")
SET(STATUS_STK "not built as requested")
ENDIF()

SET(CMAKE_CXX_STANDARD_REQUIRED ON)

CHECK_INCLUDE_FILES(stdint.h LMMS_HAVE_STDINT_H)
CHECK_INCLUDE_FILES(stdlib.h LMMS_HAVE_STDLIB_H)
Expand Down Expand Up @@ -153,6 +160,14 @@ IF(WANT_QT5)
Qt5::Xml
)

IF(LMMS_BUILD_LINUX)
FIND_PACKAGE(Qt5X11Extras REQUIRED)
LIST(APPEND QT_LIBRARIES Qt5::X11Extras)
ENDIF()

# Resolve Qt5::qmake to full path for use in packaging scripts
GET_TARGET_PROPERTY(QT_QMAKE_EXECUTABLE "${Qt5Core_QMAKE_EXECUTABLE}" IMPORTED_LOCATION)

FIND_PACKAGE(Qt5Test)
SET(QT_QTTEST_LIBRARY Qt5::Test)
ELSE()
Expand Down Expand Up @@ -300,13 +315,13 @@ ENDIF(WANT_PORTAUDIO)
IF(WANT_SOUNDIO)
FIND_PACKAGE(SoundIo)
IF(SOUNDIO_FOUND)
SET(LMMS_HAVE_SOUNDIO TRUE)
SET(STATUS_SOUNDIO "OK")
INCLUDE_DIRECTORIES("${SOUNDIO_INCLUDE_DIR}")
SET(LMMS_HAVE_SOUNDIO TRUE)
SET(STATUS_SOUNDIO "OK")
INCLUDE_DIRECTORIES("${SOUNDIO_INCLUDE_DIR}")
ELSE(SOUNDIO_FOUND)
SET(SOUNDIO_INCLUDE_DIR "")
SET(STATUS_SOUNDIO "not found, please install libsoundio if you require libsoundio support")
SET(SOUNDIO_LIBRARY "")
SET(SOUNDIO_INCLUDE_DIR "")
SET(STATUS_SOUNDIO "not found, please install libsoundio if you require libsoundio support")
SET(SOUNDIO_LIBRARY "")
ENDIF(SOUNDIO_FOUND)
ENDIF(WANT_SOUNDIO)

Expand Down Expand Up @@ -385,8 +400,17 @@ ENDIF(NOT LMMS_HAVE_ALSA)
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 "dl")
ELSE()
SET(STATUS_JACK "OK")
ENDIF()
SET(LMMS_HAVE_JACK TRUE)
SET(STATUS_JACK "OK")
ELSE(JACK_FOUND)
SET(STATUS_JACK "not found, please install libjack0.100.0-dev (or similar) "
"if you require JACK support")
Expand Down Expand Up @@ -445,7 +469,11 @@ IF(WANT_VST)
FIND_PACKAGE(Wine)
IF(WINE_FOUND)
SET(LMMS_SUPPORT_VST TRUE)
SET(STATUS_VST "OK")
IF(WINE_LIBRARY_FIX)
SET(STATUS_VST "OK, with workaround linking ${WINE_LIBRARY_FIX}")
ELSE()
SET(STATUS_VST "OK")
ENDIF()
ELSEIF(WANT_VST_NOWINE)
SET(LMMS_SUPPORT_VST TRUE)
SET(STATUS_VST "OK")
Expand All @@ -469,32 +497,41 @@ ELSE()
SET (STATUS_DEBUG_FPE "Disabled")
ENDIF(WANT_DEBUG_FPE)


# check for libsamplerate
PKG_CHECK_MODULES(SAMPLERATE REQUIRED samplerate>=0.1.8)

# set compiler flags
SET(WERROR_FLAGS "-Wall -Werror=unused-function -Wno-sign-compare -Wno-strict-overflow")
OPTION(USE_WERROR "Add -werror to the build flags. Stops the build on warnings" OFF)
IF(${USE_WERROR})
SET(WERROR_FLAGS "${WERROR_FLAGS} -Werror")
ENDIF()
IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|AppleClang")
SET(WERROR_FLAGS "-Wall -Werror=unused-function -Wno-sign-compare -Wno-strict-overflow")
OPTION(USE_WERROR "Add -werror to the build flags. Stops the build on warnings" OFF)
IF(${USE_WERROR})
SET(WERROR_FLAGS "${WERROR_FLAGS} -Werror")
ENDIF()

# Due to a regression in gcc-4.8.X, we need to disable array-bounds check
IF (CMAKE_COMPILER_IS_GNUCXX AND ((CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL "4.8.0") OR (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.8.0") OR LMMS_BUILD_WIN32))
SET(WERROR_FLAGS "${WERROR_FLAGS} -Wno-array-bounds")
# Due to a regression in gcc-4.8.X, we need to disable array-bounds check
IF (CMAKE_COMPILER_IS_GNUCXX AND ((CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL "4.8.0") OR (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.8.0") OR LMMS_BUILD_WIN32))
SET(WERROR_FLAGS "${WERROR_FLAGS} -Wno-array-bounds")
ENDIF()
ELSEIF(MSVC)
# Remove any existing /W flags
STRING(REGEX REPLACE "/W[0-4]" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
SET(WERROR_FLAGS "/W2")
IF(${USE_WERROR})
SET(WERROR_FLAGS "${WERROR_FLAGS} /WX")
ENDIF()
ENDIF()


IF(NOT CMAKE_BUILD_TYPE)
message(STATUS "Setting build type to 'Release' as none was specified.")
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
"MinSizeRel" "RelWithDebInfo")
"MinSizeRel" "RelWithDebInfo")
ENDIF()

SET(CMAKE_C_FLAGS "${WERROR_FLAGS} ${CMAKE_C_FLAGS}")
SET(CMAKE_CXX_FLAGS "-fno-exceptions ${WERROR_FLAGS} ${CMAKE_CXX_FLAGS}")
SET(CMAKE_CXX_FLAGS "${WERROR_FLAGS} ${CMAKE_CXX_FLAGS}")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DLMMS_DEBUG")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DLMMS_DEBUG")

Expand All @@ -508,23 +545,25 @@ LIST(SORT LMMS_INCLUDES)
# we somehow have to make LMMS-binary depend on MOC-files
ADD_FILE_DEPENDENCIES("${CMAKE_BINARY_DIR}/lmmsconfig.h")

IF(WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes")
ELSE(WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -DPIC")
ENDIF(WIN32)
IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|AppleClang")
IF(WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes")
ELSE(WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -DPIC")
ENDIF(WIN32)
ENDIF()

# use ccache
OPTION(USE_CCACHE "Use ccache for compilation" OFF)
IF(USE_CCACHE)
FIND_PROGRAM(CCACHE ccache)
IF (CCACHE)
MESSAGE(STATUS "Using ccache found in PATH")
SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE})
SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE})
ELSE()
MESSAGE(WARNING "USE_CCACHE enabled, but no ccache found")
ENDIF()
FIND_PROGRAM(CCACHE ccache)
IF (CCACHE)
MESSAGE(STATUS "Using ccache found in PATH")
SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE})
SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE})
ELSE()
MESSAGE(WARNING "USE_CCACHE enabled, but no ccache found")
ENDIF()
ENDIF()

# make sub-directories
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Features
* Many powerful instrument and effect-plugins out of the box
* Full user-defined track-based automation and computer-controlled automation sources
* Compatible with many standards such as SoundFont2, VST(i), LADSPA, GUS Patches, and full MIDI support
* MIDI file importing
* MIDI file importing and exporting

Building
---------
Expand Down
Loading

0 comments on commit ed669db

Please sign in to comment.