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

MIDI Import feature ported to drumstick and new MIDI Export feature #3224

Closed
wants to merge 13 commits into from
4 changes: 0 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ dist: trusty
sudo: required
matrix:
include:
- env: TARGET_OS=win32
- env: TARGET_OS=win64
- os: osx
osx_image: xcode8.2
- env: QT5=True
- env: QT5=True TARGET_OS=win32
- env: QT5=True TARGET_OS=win64
Expand Down
2 changes: 1 addition & 1 deletion .travis/linux..install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ PACKAGES="$PACKAGES libjack0"
if [ $QT5 ]; then
PACKAGES="$PACKAGES qtbase5-dev qttools5-dev-tools qttools5-dev"
else
PACKAGES="$PACKAGES libqt4-dev"
PACKAGES="$PACKAGES libqt4-dev libdrumstick-dev"
fi

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

if [ $QT5 ];then
bash ${TRAVIS_BUILD_DIR}/cmake/linux/build_linux_drumstick.sh 1.1.0
fi

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

export CMAKE_OPTS="-DUSE_WERROR=ON"

# Just a temporarily solution.
if [ $QT5 ];then
bash ${TRAVIS_BUILD_DIR}/cmake/nsis/build_mingw_drumstick.sh 1.1.0 32
else
bash ${TRAVIS_BUILD_DIR}/cmake/nsis/build_mingw_drumstick.sh 0.5.0 32
fi

../cmake/build_mingw32.sh
7 changes: 7 additions & 0 deletions .travis/linux.win64.script.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#!/usr/bin/env bash

export CMAKE_OPTS="-DUSE_WERROR=ON"


if [ $QT5 ];then
bash ${TRAVIS_BUILD_DIR}/cmake/nsis/build_mingw_drumstick.sh 1.1.0 64
else
bash ${TRAVIS_BUILD_DIR}/cmake/nsis/build_mingw_drumstick.sh 0.5.0 64
fi
../cmake/build_mingw64.sh
7 changes: 7 additions & 0 deletions .travis/osx..script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,11 @@ if [ $QT5 ]; then
export CMAKE_PREFIX_PATH="$(brew --prefix qt55)"
fi

if [ $QT5 ];then
bash ${TRAVIS_BUILD_DIR}/cmake/apple/build_osx_drumstick.sh 1.1.0
else

bash ${TRAVIS_BUILD_DIR}/cmake/apple/build_osx_drumstick.sh 0.5.0
fi

cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWANT_QT5=$QT5 -DUSE_WERROR=OFF ..
23 changes: 23 additions & 0 deletions cmake/apple/build_osx_drumstick.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
drumstick_ver=$1

cd /tmp

wget https://master.dl.sourceforge.net/project/drumstick/${drumstick_ver}/drumstick-${drumstick_ver}.tar.gz
tar xf drumstick-${drumstick_ver}.tar.gz
cd drumstick-${drumstick_ver}

# We just need library
sed -i "" "/ADD_SUBDIRECTORY(utils)/d" CMakeLists.txt
sed -i "" "/add_subdirectory(utils)/d" CMakeLists.txt

mkdir -p build && cd build

if [ $QT5 ];then
STATIC_OPTS=ON
else
STATIC_OPTS=OFF
fi

cmake ../ -DUSE_WERROR=OFF -DLIB_SUFFIX='' -DSTATIC_DRUMSTICK=$STATIC_OPTS
make && sudo make install
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is near identical to Linux. They should be consolidated. It can live in linux until this library is ported to homebrew.


17 changes: 17 additions & 0 deletions cmake/linux/build_linux_drumstick.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
drumstick_ver=$1

cd /tmp

wget https://master.dl.sourceforge.net/project/drumstick/${drumstick_ver}/drumstick-${drumstick_ver}.tar.gz
tar xf drumstick-${drumstick_ver}.tar.gz
cd drumstick-${drumstick_ver}

# We just need library
sed -i "/ADD_SUBDIRECTORY(utils)/d" CMakeLists.txt
sed -i "/add_subdirectory(utils)/d" CMakeLists.txt

mkdir -p build && cd build

cmake ../ -DUSE_WERROR=OFF -DLIB_SUFFIX='' -DCMAKE_INSTALL_PREFIX=/usr
make && sudo make install

54 changes: 54 additions & 0 deletions cmake/nsis/build_mingw_drumstick.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
drumstick_ver=$1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can stay as-is, but this should probably be ported to https://github.com/LMMS/lmms/blob/master/cmake/msys/msys_helper.sh like @dragoneagle did in #3369 or alternately added directly to the mingw mirros that Toby maintains for us. Toby generally does this on-request.

I think first though we can pull Qt4 support, which is an open task, so we wouldn't hold up the merge for this script alone.


cd /tmp

wget https://master.dl.sourceforge.net/project/drumstick/${drumstick_ver}/drumstick-${drumstick_ver}.tar.gz
tar xf drumstick-${drumstick_ver}.tar.gz
cd drumstick-${drumstick_ver}

# We just need library, for utils depends on Qt5Svg
# But no mingw*-x-qt5svg
sed -i "/ADD_SUBDIRECTORY(utils)/d" CMakeLists.txt
sed -i "/add_subdirectory(utils)/d" CMakeLists.txt

mkdir -p build && cd build

case $2 in
32)
export MINGW=/opt/mingw32
export PROCESSOR=i686
;;
64)
export MINGW=/opt/mingw64
export PROCESSOR=x86_64
;;
*)
;;
esac

export PKG_CONFIG_PATH=${MINGW}/lib/pkgconfig
export MINGW_TOOL_PREFIX=${MINGW}/bin/${PROCESSOR}-w64-mingw32-

export CMAKE_OPTS="-DUSE_WERROR=ON
-DLIB_SUFFIX=''
-DCMAKE_INSTALL_PREFIX=$MINGW
-DCMAKE_PREFIX_PATH=$MINGW
-DMINGW_PREFIX=$MINGW
-DCMAKE_SYSTEM_PROCESSOR=$PROCESSOR
-DCMAKE_SYSTEM_NAME=Windows
-DCMAKE_SYSTEM_VERSION=1
-DCMAKE_FIND_ROOT_PATH=$MINGW
-DCMAKE_C_COMPILER=${MINGW_TOOL_PREFIX}gcc
-DCMAKE_CXX_COMPILER=${MINGW_TOOL_PREFIX}g++
-DCMAKE_RC_COMPILER=${MINGW_TOOL_PREFIX}gcc
-DSTRIP=${MINGW_TOOL_PREFIX}strip
-DWINDRES=${MINGW_TOOL_PREFIX}windres
-DPKG_CONFIG_EXECUTABLE=${MINGW_TOOL_PREFIX}pkgconfig
-DQT_BINARY_DIR=$MINGW/bin
-DQT_QMAKE_EXECUTABLE=$MINGW/bin/qmake"

export PATH=$PATH:$MINGW/bin

cmake ../ $CMAKE_OPTS
make && sudo make install

Loading