Skip to content

Commit

Permalink
Merge branch 'master' into jackmidi
Browse files Browse the repository at this point in the history
* master: (90 commits)
  Grey out muted patterns in the BB editor
  Crash at clearing path in settings manager
  Clear buffer of dummy instruments. Should fix LMMS#2682
  Get rid of another copy constructor call to prevent Qt5 crashes
  Enables style sheets for knob line colors for all knob types
  Kicker 'version' 0 on first save
  Add C++11 compile flag to the carla plugin as well
  Elide channel names to prevent text overflow in FxLine
  Replace every use of the foreach macro with a C++11 range-based for loop
  Compile several plugins with -std=c++0x to support range-based for loops
  Make lb302 include math.h so we can switch it to C++11
  File browser, factory files off by one
  Fix regression caused by fcec8dd
  Fix BBtrack updating; Fix the Pattern tooltip
  Rewrote ProjectVersionTest.cpp to use QVERIFY and indeed fail when it's supposed to fail, and added 2 tests in this test suite.
  data/locale: zh_CN.ts not zh.ts
  White-space formatting
  Add gig player to win32 builds
  Update Chinese translations
  Fix locale generation for win32 builds Closes LMMS#2577
  ...
  • Loading branch information
sambler committed Mar 25, 2016
2 parents 76507ef + 4e9de49 commit 9cda70c
Show file tree
Hide file tree
Showing 244 changed files with 7,770 additions and 4,839 deletions.
10 changes: 7 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,20 @@ matrix:
include:
- env: TARGET_OS=win32
- env: TARGET_OS=win64
- os: osx
- env: QT5=True
- env: QT5=True TARGET_OS=win32
- env: QT5=True TARGET_OS=win64
- os: osx
env: QT5=True
before_install:
- sh ${TRAVIS_BUILD_DIR}/.travis/${TRAVIS_OS_NAME}.${TARGET_OS}.before_install.sh
- . ${TRAVIS_BUILD_DIR}/.travis/${TRAVIS_OS_NAME}.${TARGET_OS}.before_install.sh
install:
- sh ${TRAVIS_BUILD_DIR}/.travis/${TRAVIS_OS_NAME}.${TARGET_OS}.install.sh
- . ${TRAVIS_BUILD_DIR}/.travis/${TRAVIS_OS_NAME}.${TARGET_OS}.install.sh
before_script:
- mkdir build && cd build
script:
- sh ${TRAVIS_BUILD_DIR}/.travis/${TRAVIS_OS_NAME}.${TARGET_OS}.script.sh
- . ${TRAVIS_BUILD_DIR}/.travis/${TRAVIS_OS_NAME}.${TARGET_OS}.script.sh
- make -j4
- if [[ $TARGET_OS != win* ]]; then make tests && ./tests/tests; fi;
before_deploy: make package
Expand Down
5 changes: 3 additions & 2 deletions .travis/linux..before_install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/env bash

sudo add-apt-repository ppa:kalakris/cmake -y;
sudo add-apt-repository ppa:andrewrk/libgroove -y;
if [ $QT5 ]
then
if [ $QT5 ]; then
sudo add-apt-repository ppa:ubuntu-sdk-team/ppa -y
fi
sudo apt-get update -qq
7 changes: 4 additions & 3 deletions .travis/linux..install.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/usr/bin/env bash

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

if [ $QT5 ]
then
PACKAGES="$PACKAGES qtbase5-dev"
if [ $QT5 ]; then
PACKAGES="$PACKAGES qtbase5-dev qttools5-dev-tools qttools5-dev"
else
PACKAGES="$PACKAGES libqt4-dev"
fi
Expand Down
2 changes: 2 additions & 0 deletions .travis/linux..script.sh
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
#!/usr/bin/env bash

cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_WERROR=ON -DWANT_QT5=$QT5 ..
2 changes: 2 additions & 0 deletions .travis/linux.win32.before_install.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#!/usr/bin/env bash

sudo add-apt-repository ppa:tobydox/mingw-x-precise -y
sudo apt-get update -qq
21 changes: 15 additions & 6 deletions .travis/linux.win32.install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
sudo apt-get install -y nsis cloog-isl libmpc2 mingw32
#!/usr/bin/env bash

sudo apt-get install -y mingw32-x-qt mingw32-x-sdl mingw32-x-libvorbis \
mingw32-x-fluidsynth mingw32-x-stk mingw32-x-glib2 mingw32-x-portaudio \
mingw32-x-libsndfile mingw32-x-fftw mingw32-x-flac mingw32-x-fltk \
mingw32-x-libsamplerate mingw32-x-pkgconfig mingw32-x-binutils \
mingw32-x-gcc mingw32-x-runtime mingw32-x-libgig mingw32-x-libsoundio
PACKAGES="nsis cloog-isl libmpc2 qt4-linguist-tools mingw32
mingw32-x-sdl mingw32-x-libvorbis mingw32-x-fluidsynth mingw32-x-stk
mingw32-x-glib2 mingw32-x-portaudio mingw32-x-libsndfile mingw32-x-fftw
mingw32-x-flac mingw32-x-fltk mingw32-x-libsamplerate
mingw32-x-pkgconfig mingw32-x-binutils mingw32-x-gcc mingw32-x-runtime
mingw32-x-libgig mingw32-x-libsoundio"

if [ $QT5 ]; then
PACKAGES="$PACKAGES mingw32-x-qt5base"
else
PACKAGES="$PACKAGES mingw32-x-qt"
fi

sudo apt-get install -y $PACKAGES
2 changes: 2 additions & 0 deletions .travis/linux.win32.script.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#!/usr/bin/env bash

export CMAKE_OPTS="-DUSE_WERROR=ON"
../cmake/build_mingw32.sh || ../cmake/build_mingw32.sh
4 changes: 3 additions & 1 deletion .travis/linux.win64.before_install.sh
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
sh .travis/linux.win32.before_install.sh
#!/usr/bin/env bash

. .travis/linux.win32.before_install.sh
25 changes: 19 additions & 6 deletions .travis/linux.win64.install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
sh .travis/linux.win32.install.sh
#!/usr/bin/env bash

sudo apt-get install -y mingw64-x-qt mingw64-x-sdl mingw64-x-libvorbis \
mingw64-x-fluidsynth mingw64-x-stk mingw64-x-glib2 mingw64-x-portaudio \
mingw64-x-libsndfile mingw64-x-fftw mingw64-x-flac mingw64-x-fltk \
mingw64-x-libsamplerate mingw64-x-pkgconfig mingw64-x-binutils mingw64-x-gcc\
mingw64-x-runtime mingw64-x-libgig mingw64-x-libsoundio
# First, install 32-bit deps

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
. $DIR/linux.win32.install.sh

PACKAGES="mingw64-x-sdl mingw64-x-libvorbis mingw64-x-fluidsynth mingw64-x-stk
mingw64-x-glib2 mingw64-x-portaudio mingw64-x-libsndfile
mingw64-x-fftw mingw64-x-flac mingw64-x-fltk mingw64-x-libsamplerate
mingw64-x-pkgconfig mingw64-x-binutils mingw64-x-gcc mingw64-x-runtime
mingw64-x-libgig mingw64-x-libsoundio"

if [ $QT5 ]; then
PACKAGES="$PACKAGES mingw64-x-qt5base"
else
PACKAGES="$PACKAGES mingw64-x-qt"
fi

sudo apt-get install -y $PACKAGES
2 changes: 2 additions & 0 deletions .travis/linux.win64.script.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#!/usr/bin/env bash

export CMAKE_OPTS="-DUSE_WERROR=ON"
../cmake/build_mingw64.sh || ../cmake/build_mingw64.sh
2 changes: 2 additions & 0 deletions .travis/osx..before_install.sh
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
#!/usr/bin/env bash

brew update
21 changes: 20 additions & 1 deletion .travis/osx..install.sh
Original file line number Diff line number Diff line change
@@ -1 +1,20 @@
brew install qt libsndfile fftw libvorbis libogg jack sdl libsamplerate stk fluid-synth portaudio fltk
#!/usr/bin/env bash

PACKAGES="cmake pkgconfig fftw libogg libvorbis libsndfile libsamplerate jack sdl stk fluid-synth portaudio node"

if [ $QT5 ]; then
PACKAGES="$PACKAGES qt5"
else
PACKAGES="$PACKAGES qt"
fi

brew reinstall $PACKAGES

sudo npm install -g appdmg

# Workaround per Homebrew bug #44806
brew reinstall fltk
if [ $? -ne 0 ]; then
echo "Warning: fltk installation failed, trying workaround..."
brew reinstall --devel https://raw.githubusercontent.com/dpo/homebrew/ec46018128dde5bf466b013a6c7086d0880930a3/Library/Formula/fltk.rb
fi
9 changes: 8 additions & 1 deletion .travis/osx..script.sh
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .. -DUSE_WERROR=OFF
#!/usr/bin/env bash

if [ $QT5 ]; then
# Workaround; No FindQt5.cmake module exists
export CMAKE_PREFIX_PATH="$(brew --prefix qt5)"
fi

cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWANT_QT5=$QT5 -DUSE_WERROR=OFF ..
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ SET(PROJECT_AUTHOR "LMMS Developers")
SET(PROJECT_URL "http://lmms.io")
SET(PROJECT_EMAIL "[email protected]")
SET(PROJECT_DESCRIPTION "${PROJECT_NAME_UCASE} - Free music production software")
SET(PROJECT_COPYRIGHT "${PROJECT_AUTHOR}, 2008-${PROJECT_YEAR}")
SET(PROJECT_COPYRIGHT "2008-${PROJECT_YEAR} ${PROJECT_AUTHOR}")
SET(VERSION_MAJOR "1")
SET(VERSION_MINOR "1")
SET(VERSION_PATCH "3")
SET(VERSION_PATCH "90")
#SET(VERSION_SUFFIX "")
SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
IF(VERSION_SUFFIX)
Expand Down Expand Up @@ -83,12 +83,14 @@ IF(LMMS_BUILD_WIN32)
SET(WANT_ALSA OFF)
SET(WANT_JACK OFF)
SET(WANT_PULSEAUDIO OFF)
SET(WANT_SOUNDIO OFF)
SET(WANT_SYSTEM_SR 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_SOUNDIO "<disabled in this release>")
SET(STATUS_WINMM "OK")
SET(STATUS_APPLEMIDI "<not supported on this platform>")
ELSE(LMMS_BUILD_WIN32)
Expand Down Expand Up @@ -132,6 +134,7 @@ IF(WANT_QT5)

FIND_PACKAGE(Qt5Core REQUIRED)
FIND_PACKAGE(Qt5Gui REQUIRED)
FIND_PACKAGE(Qt5LinguistTools)
FIND_PACKAGE(Qt5Widgets REQUIRED)
FIND_PACKAGE(Qt5Xml REQUIRED)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Features
* Song-Editor for composing songs
* A Beat+Bassline-Editor for creating beats and basslines
* An easy-to-use Piano-Roll for editing patterns and melodies
* An FX mixer with 64 FX channels and arbitrary number of effects allow unlimited mixing possibilities
* An FX mixer with unlimited FX channels and arbitrary number of effects
* 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
Expand Down
12 changes: 8 additions & 4 deletions cmake/build_mingw32.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash

# Accomodate both linux windows mingw locations
MINGW=/mingw32
Expand All @@ -12,9 +12,13 @@ export PATH=$PATH:$MINGW/bin
export CFLAGS="-march=pentium3 -mtune=generic -mpreferred-stack-boundary=5 -mfpmath=sse"
export CXXFLAGS="$CFLAGS"

if [ "$1" = "-qt5" ] ; then
CMAKE_OPTS="-DWANT_QT5=ON -DCMAKE_PREFIX_PATH=$MINGW $CMAKE_OPTS"
if [ "$1" = "-qt5" ]; then
QT5=True
fi

cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/modules/Win32Toolchain.cmake -DCMAKE_MODULE_PATH=`pwd`/../cmake/modules/ $CMAKE_OPTS
if [ $QT5 ]; then
CMAKE_OPTS="-DWANT_QT5=$QT5 -DCMAKE_PREFIX_PATH=$MINGW $CMAKE_OPTS"
fi

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cmake $DIR/.. -DCMAKE_TOOLCHAIN_FILE=$DIR/../cmake/modules/Win32Toolchain.cmake -DCMAKE_MODULE_PATH=$DIR/../cmake/modules/ $CMAKE_OPTS
12 changes: 8 additions & 4 deletions cmake/build_mingw64.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash

# Accomodate both linux windows mingw locations
MINGW=/mingw64
Expand All @@ -10,9 +10,13 @@ fi

export PATH=$PATH:$MINGW/bin

if [ "$1" = "-qt5" ] ; then
CMAKE_OPTS="-DWANT_QT5=ON -DCMAKE_PREFIX_PATH=$MINGW $CMAKE_OPTS"
if [ "$1" = "-qt5" ]; then
QT5=True
fi

cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/modules/Win64Toolchain.cmake -DCMAKE_MODULE_PATH=`pwd`/../cmake/modules/ $CMAKE_OPTS
if [ $QT5 ]; then
CMAKE_OPTS="-DWANT_QT5=$QT5 -DCMAKE_PREFIX_PATH=$MINGW $CMAKE_OPTS"
fi

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cmake $DIR/.. -DCMAKE_TOOLCHAIN_FILE=$DIR/../cmake/modules/Win64Toolchain.cmake -DCMAKE_MODULE_PATH=$DIR/../cmake/modules/ $CMAKE_OPTS
11 changes: 8 additions & 3 deletions cmake/modules/BuildPlugin.cmake
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# BuildPlugin.cmake - Copyright (c) 2008 Tobias Doerffel
#
# description: build LMMS-plugin
# usage: BUILD_PLUGIN(<PLUGIN_NAME> <PLUGIN_SOURCES> MOCFILES <HEADERS_FOR_MOC> EMBEDDED_RESOURCES <LIST_OF_FILES_TO_EMBED> UICFILES <UI_FILES_TO_COMPILE> )
# usage: BUILD_PLUGIN(<PLUGIN_NAME> <PLUGIN_SOURCES> MOCFILES <HEADERS_FOR_MOC> EMBEDDED_RESOURCES <LIST_OF_FILES_TO_EMBED> UICFILES <UI_FILES_TO_COMPILE> LINK <SHARED|MODULE>)

MACRO(BUILD_PLUGIN PLUGIN_NAME)
CMAKE_PARSE_ARGUMENTS(PLUGIN "" "" "MOCFILES;EMBEDDED_RESOURCES;UICFILES" ${ARGN})
CMAKE_PARSE_ARGUMENTS(PLUGIN "" "" "MOCFILES;EMBEDDED_RESOURCES;UICFILES;LINK" ${ARGN})
SET(PLUGIN_SOURCES ${PLUGIN_UNPARSED_ARGUMENTS})

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/src/gui)
Expand Down Expand Up @@ -45,7 +45,12 @@ MACRO(BUILD_PLUGIN PLUGIN_NAME)
SET(QT_LIBRARIES "${QT_OVERRIDE_LIBRARIES}")
ENDIF()

ADD_LIBRARY(${PLUGIN_NAME} MODULE ${PLUGIN_SOURCES} ${plugin_MOC_out})
IF ("${PLUGIN_LINK}" STREQUAL "SHARED")
ADD_LIBRARY(${PLUGIN_NAME} SHARED ${PLUGIN_SOURCES} ${plugin_MOC_out})
ELSE ()
ADD_LIBRARY(${PLUGIN_NAME} MODULE ${PLUGIN_SOURCES} ${plugin_MOC_out})
ENDIF ()

IF(QT5)
TARGET_LINK_LIBRARIES(${PLUGIN_NAME} Qt5::Widgets Qt5::Xml)
ENDIF()
Expand Down
4 changes: 0 additions & 4 deletions cmake/modules/DetectMachine.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ ELSE()
SET(LMMS_BUILD_LINUX 1)
ENDIF(WIN32)

IF(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
SET(LMMS_BUILD_CLANG 1)
ENDIF()

# See build_mingwXX.sh for LMMS_BUILD_MSYS

MESSAGE("PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}")
Expand Down
51 changes: 49 additions & 2 deletions data/locale/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,54 @@
FILE(GLOB QM_FILES *.qm)
if (QT5)
set (QT_LUPDATE_EXECUTABLE "${Qt5_LUPDATE_EXECUTABLE}")
set (QT_LRELEASE_EXECUTABLE "${Qt5_LRELEASE_EXECUTABLE}")
endif ()

IF(QT_LUPDATE_EXECUTABLE STREQUAL "")
EXECUTE_PROCESS(COMMAND "lupdate" "--help" RESULT_VARIABLE LUPDATE_FALLBACK OUTPUT_QUIET)
IF(LUPDATE_FALLBACK EQUAL 0)
SET(QT_LUPDATE_EXECUTABLE lupdate)
SET(QT_LRELEASE_EXECUTABLE lrelease)
ELSE()
MESSAGE(FATAL_ERROR "Cannot generate locales")
ENDIF()
ENDIF()


#
# rules for building localizations
#
SET(ts_targets "")
SET(qm_targets "")
SET(QM_FILES "")

FILE(GLOB lmms_LOCALES ${CMAKE_CURRENT_SOURCE_DIR}/*.ts)
FOREACH(_ts_file ${lmms_LOCALES})
GET_FILENAME_COMPONENT(_ts_target "${_ts_file}" NAME)
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}\""
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
ADD_CUSTOM_TARGET(${_qm_target}
COMMAND "${QT_LRELEASE_EXECUTABLE}" "\"${_ts_file}\"" -qm "\"${_qm_file}\""
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
LIST(APPEND ts_targets "${_ts_target}")
LIST(APPEND qm_targets "${_qm_target}")
LIST(APPEND QM_FILES "${_qm_file}")
ENDFOREACH(_ts_file ${lmms_LOCALES})

ADD_CUSTOM_TARGET(update-locales)
FOREACH(_item ${ts_targets})
ADD_DEPENDENCIES(update-locales "${_item}")
ENDFOREACH(_item ${ts_targets})

ADD_CUSTOM_TARGET(finalize-locales ALL)
FOREACH(_item ${qm_targets})
ADD_DEPENDENCIES(finalize-locales "${_item}")
ENDFOREACH(_item ${qm_targets})

IF(LMMS_BUILD_WIN32)
FILE(GLOB QT_QM_FILES "${QT_TRANSLATIONS_DIR}/qt*[^h].qm")
ENDIF(LMMS_BUILD_WIN32)

INSTALL(FILES ${QM_FILES} ${QT_QM_FILES} DESTINATION "${LMMS_DATA_DIR}/locale")

Loading

0 comments on commit 9cda70c

Please sign in to comment.