Skip to content

Commit

Permalink
Add Win/Qt5 build directives for Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
tresf committed Feb 25, 2016
1 parent 389a1da commit 67334a8
Show file tree
Hide file tree
Showing 9 changed files with 75 additions and 26 deletions.
10 changes: 6 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@ matrix:
include:
- env: TARGET_OS=win32
- env: TARGET_OS=win64
- os: osx
- env: QT5=True
- os: osx
- 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
3 changes: 1 addition & 2 deletions .travis/linux..install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ PACKAGES="cmake libsndfile-dev fftw3-dev libvorbis-dev libogg-dev
libfluidsynth-dev portaudio19-dev wine-dev g++-multilib libfltk1.3-dev
libgig-dev libsoundio-dev"

if [ $QT5 ]
then
if [ $QT5 ]; then
PACKAGES="$PACKAGES qtbase5-dev qttools5-dev-tools qttools5-dev"
else
PACKAGES="$PACKAGES libqt4-dev"
Expand Down
19 changes: 13 additions & 6 deletions .travis/linux.win32.install.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
#!/usr/bin/env bash

sudo apt-get install -y nsis cloog-isl libmpc2 mingw32
PACKAGES="nsis cloog-isl libmpc2 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"

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
if [ $QT5 ]; then
PACKAGES="$PACKAGES mingw32-x-qt5base"
else
PACKAGES="$PACKAGES mingw32-x-qt"
fi

sudo apt-get install -y $PACKAGES
23 changes: 17 additions & 6 deletions .travis/linux.win64.install.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
#!/usr/bin/env bash

. .travis/linux.win32.install.sh
# First, install 32-bit deps

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
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: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ IF(WANT_QT5)

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

Expand Down
8 changes: 6 additions & 2 deletions cmake/build_mingw32.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ 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

if [ $QT5 ]; then
CMAKE_OPTS="-DWANT_QT5=$QT5 -DCMAKE_PREFIX_PATH=$MINGW $CMAKE_OPTS"
fi

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
Expand Down
8 changes: 6 additions & 2 deletions cmake/build_mingw64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ 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

if [ $QT5 ]; then
CMAKE_OPTS="-DWANT_QT5=$QT5 -DCMAKE_PREFIX_PATH=$MINGW $CMAKE_OPTS"
fi

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
Expand Down
10 changes: 8 additions & 2 deletions plugins/vst_base/Win64/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@ INCLUDE_DIRECTORIES("${CMAKE_BINARY_DIR}" "${CMAKE_SOURCE_DIR}/include")
SET(CMAKE_CXX_COMPILER "${CMAKE_CXX_COMPILER32}")

ADD_EXECUTABLE(RemoteVstPlugin32 "${CMAKE_CURRENT_SOURCE_DIR}/../RemoteVstPlugin.cpp")
TARGET_LINK_LIBRARIES(RemoteVstPlugin32 -lQtCore4 -lpthread -lgdi32 -lws2_32)

IF(QT5)
SET(QTCORE "Qt5Core")
ELSE()
SET(QTCORE "QtCore4")
ENDIF()
TARGET_LINK_LIBRARIES(RemoteVstPlugin32 -l${QTCORE} -lpthread -lgdi32 -lws2_32)

ADD_CUSTOM_COMMAND(TARGET RemoteVstPlugin32 POST_BUILD COMMAND "${STRIP}" "$<TARGET_FILE:RemoteVstPlugin32>")
SET_TARGET_PROPERTIES(RemoteVstPlugin32 PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -O0")

INSTALL(TARGETS RemoteVstPlugin32 RUNTIME DESTINATION "${PLUGIN_DIR}/32")
INSTALL(FILES "${MINGW_PREFIX32}/bin/QtCore4.dll" "${MINGW_PREFIX32}/bin/zlib1.dll" "${MINGW_PREFIX32}/${CMAKE_SYSTEM_PROCESSOR32}-w64-mingw32/bin/libwinpthread-1.dll"
INSTALL(FILES "${MINGW_PREFIX32}/bin/${QTCORE}.dll" "${MINGW_PREFIX32}/bin/zlib1.dll" "${MINGW_PREFIX32}/${CMAKE_SYSTEM_PROCESSOR32}-w64-mingw32/bin/libwinpthread-1.dll"
DESTINATION "${PLUGIN_DIR}/32")

18 changes: 17 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,27 @@ IF(LMMS_BUILD_WIN32)
ENDIF()

INSTALL(TARGETS lmms RUNTIME DESTINATION "${BIN_DIR}")
INSTALL(FILES

IF(QT5)
INSTALL(FILES
"${MINGW_PREFIX}/bin/Qt5Core.dll"
"${MINGW_PREFIX}/bin/Qt5Gui.dll"
"${MINGW_PREFIX}/bin/Qt5Widgets.dll"
"${MINGW_PREFIX}/bin/Qt5Xml.dll"
DESTINATION .)
INSTALL(FILES
"${MINGW_PREFIX}/lib/qt5/plugins/platforms/qwindows.dll"
DESTINATION ./platforms)
ELSE()
INSTALL(FILES
"${MINGW_PREFIX}/bin/QtCore4.dll"
"${MINGW_PREFIX}/bin/QtGui4.dll"
"${MINGW_PREFIX}/bin/QtSvg4.dll"
"${MINGW_PREFIX}/bin/QtXml4.dll"
DESTINATION .)
ENDIF()

INSTALL(FILES
"${MINGW_PREFIX}/bin/libsamplerate-0.dll"
"${MINGW_PREFIX}/bin/libsndfile-1.dll"
"${MINGW_PREFIX}/bin/libvorbis-0.dll"
Expand Down

0 comments on commit 67334a8

Please sign in to comment.