Skip to content

Commit

Permalink
Merge pull request #154 from Musicoll/dev/master
Browse files Browse the repository at this point in the history
Dev/master
  • Loading branch information
eliottparis authored Jan 28, 2019
2 parents 5ef0dc8 + 482ac74 commit 8f1ef8d
Show file tree
Hide file tree
Showing 689 changed files with 175,412 additions and 165,188 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@
Build/
ThirdParty/flip
ThirdParty/boost
ThirdParty/llvm

# Compressed files
*.tar.gz
*.tar.xz
*.zip
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
[submodule "ThirdParty/concurrentqueue"]
path = ThirdParty/concurrentqueue
url = https://github.com/cameron314/concurrentqueue.git
[submodule "ThirdParty/Beast"]
path = ThirdParty/Beast
url = https://github.com/boostorg/beast.git
[submodule "ThirdParty/kiwi-node-server"]
path = ThirdParty/kiwi-node-server
url = https://github.com/Musicoll/kiwi-node-server.git
[submodule "ThirdParty/faust"]
path = ThirdParty/faust
url = https://github.com/grame-cncm/faust.git
155 changes: 67 additions & 88 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,73 +12,72 @@ matrix:
include:
- os: linux
compiler: gcc
env: COMPILER=g++-4.9

env: Tests
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: [g++-4.9, 'python-pip', 'python-yaml', 'libssl1.0.0']
before_install:
- python --version
- python -c 'import ssl; print ssl.OPENSSL_VERSION;'
- sudo add-apt-repository ppa:webkit-team/ppa -y
- sudo apt-get update
- sudo apt-get install libfreetype6-dev
- sudo apt-get install libx11-dev
- sudo apt-get install libxrandr-dev
- sudo apt-get install libxinerama1
- sudo apt-get install libxinerama-dev
- sudo apt-get install libxcursor-dev
- sudo apt-get install libasound2-dev
- sudo apt-get install libgtk-3-dev
- sudo apt-get install libwebkit2gtk-4.0-dev

- sudo apt-get install -y pkg-config libedit-dev libfreetype6-dev libx11-dev libxrandr-dev libxinerama1 libxinerama-dev libxcursor-dev libasound2-dev libgtk-3-dev libwebkit2gtk-4.0-dev
install:
- export CXX=g++-4.9 # make sure CXX is correctly set
- git submodule update --init --recursive
- pip install --user cpp-coveralls
script:
- cd $TRAVIS_BUILD_DIR
- mkdir Build && cd Build
- cmake .. -DCMAKE_C_FLAGS=-m64 -DCMAKE_BUILD_TYPE=Debug -DGCOV_SUPPORT=On
- cmake --build . --config Debug --target Tests -- -j 4
after_success:
- coveralls -i Modules --gcov-options '\-lp' > /dev/null

- os: linux
compiler: gcc
env: Deployment
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: [g++-4.9, 'python-pip', 'python-yaml', 'libssl1.0.0']

before_install:
- python --version
- python -c 'import ssl; print ssl.OPENSSL_VERSION;'
- sudo add-apt-repository ppa:webkit-team/ppa -y
- sudo apt-get update
- sudo apt-get install -y pkg-config libedit-dev libfreetype6-dev libx11-dev libxrandr-dev libxinerama1 libxinerama-dev libxcursor-dev libasound2-dev libgtk-3-dev libwebkit2gtk-4.0-dev
install:
# make sure CXX is correctly set
- if [[ "${COMPILER}" != "" ]]; then export CXX=${COMPILER}; fi
- git submodule update --init --recursive ThirdParty/Juce ThirdParty/concurrentqueue ThirdParty/Beast
- pip install --user cpp-coveralls

- export CXX=g++-4.9 # make sure CXX is correctly set
- git submodule update --init --recursive
script:
- python ./Scripts/configure.py -coverage
- python ./Scripts/build.py -c Release
- python ./Scripts/build.py -c Debug -t Tests

- cd $TRAVIS_BUILD_DIR
- mkdir Build && cd Build
- cmake .. -DCMAKE_C_FLAGS=-m64 -DCMAKE_BUILD_TYPE=Release
- cmake --build . --target Kiwi --config Release -- -j 4
- cmake --build . --target Server --config Release -- -j 4
after_success:
- coveralls -i Modules --gcov-options '\-lp' > /dev/null

before_deploy:
- cd $TRAVIS_BUILD_DIR
# Client
- mkdir Kiwi
- mv Build/Release/KiwiBuild/Kiwi Kiwi/Kiwi
- tar zcvf Kiwi_linux.tar.gz Kiwi/
- mkdir Kiwi_Server
- mv Build/Release/KiwiBuild/Server Kiwi_Server/Server
- tar zcvf Kiwi_Server_linux.tar.gz Kiwi_Server/

- cp -r docs/ Kiwi/docs
- cp -r Resources/helps/ Kiwi/helps
- cp -r Resources/examples/ Kiwi/examples
- mkdir -p Kiwi/libs/faust && cp -r ThirdParty/faust/libraries/* Kiwi/libs/faust
- mv Build/KiwiBuild/Kiwi Kiwi/Kiwi
- cp Changelog.txt Kiwi/Changelog.txt
- zip -r Kiwi-linux-x64.zip Kiwi
# Server
- mkdir KiwiServer && mv Build/KiwiBuild/Server KiwiServer/Server
- zip -r Kiwi-server-linux-x64.zip KiwiServer
deploy:
provider: releases
api_key:
secure: atcBDMdJNzUGiUYSqQu/URg8mfvRk9b78tvj1eHKCeDXSTP0Y1UvI5YpmTx8SkUXp23QH4sgp0tKTFB98FbRojR4IL2NW+KZDG1o5BxZ4HYJ4hdCXXXhzeujcn2AjQzRJ9f8uodX/7Pfa19jGlovj1Tl9ZJ9jIfyyvcxlJXkTN9+CDlkkcpLNU64c4B+CclS8aLPbIKqvLmIy3fphzzkJoKN5rnE4EvKrIkJBPEib1WIY8K7W8boCwghsGBs04MwRZwidKIjPSPgbYpmGPspfKpu0W8mKMirdGEVt4rzpm+Dl9wMa/5Qsyc6afYfS4p3PZOfBio0mtVrPz4+4VXy/Ad+FDNnvxUy9776D0pSv2iBrdHhqs6n1vG0uT4uhbGtvwJR3BBbo6+TmEKakRgp+uRhYEvGy/EO0OkcKrOVLsrZ/akj8O+KOSROrz2VYfxmDTxtUi8K51vW3pJhcGsEsN1FkcJfef/pvxGLK5i0qEZWoyCyA4YMPNDWFFiuBadPTujIGJ/iDmwouzalV9F0vKOIFvP9IuZ1FHLOyEzhyoBS3l1NNpQUz+HNgupTVYSREH1qPXUHg3B5BdFpEJpOjU/P8gwG4npcNxX/5XvigFFiTeEN+eV4xcBVLcg+SsumeswIqi5Tvm+mzYyqz3wj628ddWxgGiPFSfySI4tz6lg=
file:
- Kiwi_linux.tar.gz
- Kiwi_Server_linux.tar.gz
skip_cleanup: true
draft: true
prerelease: false
on:
repo: Musicoll/Kiwi
tags: true
branch: master

deploy:
provider: releases
api_key:
secure: atcBDMdJNzUGiUYSqQu/URg8mfvRk9b78tvj1eHKCeDXSTP0Y1UvI5YpmTx8SkUXp23QH4sgp0tKTFB98FbRojR4IL2NW+KZDG1o5BxZ4HYJ4hdCXXXhzeujcn2AjQzRJ9f8uodX/7Pfa19jGlovj1Tl9ZJ9jIfyyvcxlJXkTN9+CDlkkcpLNU64c4B+CclS8aLPbIKqvLmIy3fphzzkJoKN5rnE4EvKrIkJBPEib1WIY8K7W8boCwghsGBs04MwRZwidKIjPSPgbYpmGPspfKpu0W8mKMirdGEVt4rzpm+Dl9wMa/5Qsyc6afYfS4p3PZOfBio0mtVrPz4+4VXy/Ad+FDNnvxUy9776D0pSv2iBrdHhqs6n1vG0uT4uhbGtvwJR3BBbo6+TmEKakRgp+uRhYEvGy/EO0OkcKrOVLsrZ/akj8O+KOSROrz2VYfxmDTxtUi8K51vW3pJhcGsEsN1FkcJfef/pvxGLK5i0qEZWoyCyA4YMPNDWFFiuBadPTujIGJ/iDmwouzalV9F0vKOIFvP9IuZ1FHLOyEzhyoBS3l1NNpQUz+HNgupTVYSREH1qPXUHg3B5BdFpEJpOjU/P8gwG4npcNxX/5XvigFFiTeEN+eV4xcBVLcg+SsumeswIqi5Tvm+mzYyqz3wj628ddWxgGiPFSfySI4tz6lg=
file:
- Kiwi_linux.tar.gz
- Kiwi_Server_linux.tar.gz
- Kiwi-linux-x64.zip
- Kiwi-server-linux-x64.zip
skip_cleanup: true
draft: true
prerelease: false
Expand All @@ -87,57 +86,38 @@ matrix:
on:
repo: Musicoll/Kiwi
tags: true
condition: $TRAVIS_BRANCH != "master"

- os: osx
compiler: clang++
env: COMPILER=clang++
env: Deployment
osx_image: xcode9.2

before_install:
- pyenv install 2.7.11
- pyenv global 2.7.11
- eval "$(pyenv init -)"
- python --version
- python -c 'import ssl; print ssl.OPENSSL_VERSION;'

install:
- git submodule update --init --recursive ThirdParty/Juce ThirdParty/concurrentqueue ThirdParty/Beast

script:
- python ./Scripts/configure.py -c Release
- python ./Scripts/build.py -c Release

before_deploy:
- mkdir Kiwi
- mv Build/Release/KiwiBuild/Release/Kiwi.app Kiwi/Kiwi.app
- zip -r Kiwi_macos.zip Kiwi
- mkdir Kiwi_Server
- mv Build/Release/KiwiBuild/Release/Server Kiwi_Server/Server
- zip -r Kiwi_Server_macos.zip Kiwi_Server
- git submodule update --init --recursive

deploy:
provider: releases
api_key:
secure: atcBDMdJNzUGiUYSqQu/URg8mfvRk9b78tvj1eHKCeDXSTP0Y1UvI5YpmTx8SkUXp23QH4sgp0tKTFB98FbRojR4IL2NW+KZDG1o5BxZ4HYJ4hdCXXXhzeujcn2AjQzRJ9f8uodX/7Pfa19jGlovj1Tl9ZJ9jIfyyvcxlJXkTN9+CDlkkcpLNU64c4B+CclS8aLPbIKqvLmIy3fphzzkJoKN5rnE4EvKrIkJBPEib1WIY8K7W8boCwghsGBs04MwRZwidKIjPSPgbYpmGPspfKpu0W8mKMirdGEVt4rzpm+Dl9wMa/5Qsyc6afYfS4p3PZOfBio0mtVrPz4+4VXy/Ad+FDNnvxUy9776D0pSv2iBrdHhqs6n1vG0uT4uhbGtvwJR3BBbo6+TmEKakRgp+uRhYEvGy/EO0OkcKrOVLsrZ/akj8O+KOSROrz2VYfxmDTxtUi8K51vW3pJhcGsEsN1FkcJfef/pvxGLK5i0qEZWoyCyA4YMPNDWFFiuBadPTujIGJ/iDmwouzalV9F0vKOIFvP9IuZ1FHLOyEzhyoBS3l1NNpQUz+HNgupTVYSREH1qPXUHg3B5BdFpEJpOjU/P8gwG4npcNxX/5XvigFFiTeEN+eV4xcBVLcg+SsumeswIqi5Tvm+mzYyqz3wj628ddWxgGiPFSfySI4tz6lg=
file:
- Kiwi_macos.zip
- Kiwi_Server_macos.zip
skip_cleanup: true
draft: true
prerelease: false
on:
repo: Musicoll/Kiwi
tags: true
branch: master
# Install a recent CMake
- brew install cmake || brew upgrade cmake
- cmake --version

script:
- cd $TRAVIS_BUILD_DIR
- mkdir Build && cd Build
- cmake .. -GXcode
- xcodebuild -scheme Kiwi -configuration Release
- xcodebuild -scheme Server -configuration Release
after_success:
- cd $TRAVIS_BUILD_DIR
- mkdir Kiwi && mv Build/KiwiBuild/Release/Kiwi.app Kiwi/Kiwi.app
- cp Changelog.txt Kiwi/Changelog.txt
- zip -r Kiwi-macos-x64.zip Kiwi
- mkdir KiwiServer && mv Build/KiwiBuild/Release/Server KiwiServer/Server
- zip -r Kiwi-server-macos-x64.zip KiwiServer
deploy:
provider: releases
api_key:
secure: atcBDMdJNzUGiUYSqQu/URg8mfvRk9b78tvj1eHKCeDXSTP0Y1UvI5YpmTx8SkUXp23QH4sgp0tKTFB98FbRojR4IL2NW+KZDG1o5BxZ4HYJ4hdCXXXhzeujcn2AjQzRJ9f8uodX/7Pfa19jGlovj1Tl9ZJ9jIfyyvcxlJXkTN9+CDlkkcpLNU64c4B+CclS8aLPbIKqvLmIy3fphzzkJoKN5rnE4EvKrIkJBPEib1WIY8K7W8boCwghsGBs04MwRZwidKIjPSPgbYpmGPspfKpu0W8mKMirdGEVt4rzpm+Dl9wMa/5Qsyc6afYfS4p3PZOfBio0mtVrPz4+4VXy/Ad+FDNnvxUy9776D0pSv2iBrdHhqs6n1vG0uT4uhbGtvwJR3BBbo6+TmEKakRgp+uRhYEvGy/EO0OkcKrOVLsrZ/akj8O+KOSROrz2VYfxmDTxtUi8K51vW3pJhcGsEsN1FkcJfef/pvxGLK5i0qEZWoyCyA4YMPNDWFFiuBadPTujIGJ/iDmwouzalV9F0vKOIFvP9IuZ1FHLOyEzhyoBS3l1NNpQUz+HNgupTVYSREH1qPXUHg3B5BdFpEJpOjU/P8gwG4npcNxX/5XvigFFiTeEN+eV4xcBVLcg+SsumeswIqi5Tvm+mzYyqz3wj628ddWxgGiPFSfySI4tz6lg=
file:
- Kiwi_macos.zip
- Kiwi_Server_macos.zip
- Kiwi-macos-x64.zip
- Kiwi-server-macos-x64.zip
skip_cleanup: true
draft: true
prerelease: false
Expand All @@ -146,4 +126,3 @@ matrix:
on:
repo: Musicoll/Kiwi
tags: true
condition: $TRAVIS_BRANCH != "master"
119 changes: 119 additions & 0 deletions CMake/ConfigBoost.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@

message(STATUS "Boost - searching the static Boost library 1.69.0 with system")
option(USE_SYSTEM_BOOST "Use the pre-compiled Boost library of your system" OFF)
# -----------------------------------------------------------------------------#

# Start the script
# -----------------------------------------------------------------------------#
set(Boost_USE_STATIC_LIBS ON) # Use the static library

# Use the boost internal library
# -----------------------------------------------------------------------------#
if(NOT ${USE_SYSTEM_BOOST})

# Local OS Specific Variables
# -----------------------------------------------------------------------------#
set(BOOST_URL "https://github.com/Musicoll/KiwiDependenciesPrebuilt/releases/download/v1.3")
set(BOOST_PKG_NAME "boost_1_69_0")

# Boost internal directory
# -----------------------------------------------------------------------------#
if(NOT DEFINED KIWI_DEPENDENCIES_DIR)
set(KIWI_DEPENDENCIES_DIR "${PROJECT_SOURCE_DIR}/ThirdParty")
endif()

set(KIWI_BOOST_INTERN_DIR "${KIWI_DEPENDENCIES_DIR}/boost")
set(BOOST_INTERN_INCLUDE_DIR "${KIWI_BOOST_INTERN_DIR}")

# Local Generic Variables
# -----------------------------------------------------------------------------#
if(APPLE)
set(BOOST_PKG_EXT "tar.gz")
set(BOOST_INTERN_LIBRARIES_DIR "${KIWI_BOOST_INTERN_DIR}/stage/lib")
elseif(UNIX)
set(BOOST_PKG_EXT "tar.gz")
set(BOOST_INTERN_LIBRARIES_DIR "${KIWI_BOOST_INTERN_DIR}/stage/lib")
elseif(WIN32)
set(BOOST_PKG_EXT "zip")
set(BOOST_INTERN_LIBRARIES_DIR "${KIWI_BOOST_INTERN_DIR}/stage64/lib")
endif()

set(BOOST_PKG_FILE "${BOOST_PKG_NAME}.${BOOST_PKG_EXT}")
set(BOOST_PKG_PATH "${BOOST_URL}/${BOOST_PKG_FILE}")

# ---------------------------------------------------------------------------#
set(Boost_INCLUDE_DIR "${BOOST_INTERN_INCLUDE_DIR}")
set(Boost_LIBRARY_DIR "${BOOST_INTERN_LIBRARIES_DIR}")

message(STATUS "Boost_INCLUDE_DIR ${Boost_INCLUDE_DIR}")
message(STATUS "Boost_LIBRARY_DIR ${Boost_LIBRARY_DIR}")

# Set up for the boost internal library
# ---------------------------------------------------------------------------#
if(NOT EXISTS ${KIWI_BOOST_INTERN_DIR}/bootstrap.log)

# Remove the current invalid boost folder
# -------------------------------------------------------------------------#
if(EXISTS ${KIWI_BOOST_INTERN_DIR})
message(STATUS "Remove current invalid boost folder ${KIWI_BOOST_INTERN_DIR}")
file(REMOVE_RECURSE ${KIWI_BOOST_INTERN_DIR})
endif()

# Download the boost package
# -------------------------------------------------------------------------#
if(NOT EXISTS "${KIWI_DEPENDENCIES_DIR}/${BOOST_PKG_FILE}")
message(STATUS "Download ${BOOST_PKG_FILE}")
file(DOWNLOAD ${BOOST_PKG_PATH} "${KIWI_DEPENDENCIES_DIR}/${BOOST_PKG_FILE}")
endif()

# Unpack the boost package
# -------------------------------------------------------------------------#
message(STATUS "Unpack ${BOOST_PKG_FILE} to ${KIWI_BOOST_INTERN_DIR}")
if(APPLE)
execute_process(COMMAND tar xzf ./${BOOST_PKG_FILE} WORKING_DIRECTORY ${KIWI_DEPENDENCIES_DIR})
elseif(UNIX)
execute_process(COMMAND tar xzf ./${BOOST_PKG_FILE} WORKING_DIRECTORY ${KIWI_DEPENDENCIES_DIR})
elseif(WIN32)
execute_process(COMMAND 7z x ${BOOST_PKG_FILE} WORKING_DIRECTORY ${KIWI_DEPENDENCIES_DIR})
endif()

file(RENAME ${KIWI_DEPENDENCIES_DIR}/${BOOST_PKG_NAME} ${KIWI_BOOST_INTERN_DIR})

# Configure the boost library
# -------------------------------------------------------------------------#
message(STATUS "Configure the boost library")
if(APPLE)
execute_process(COMMAND ./bootstrap.sh toolset=clang link=static WORKING_DIRECTORY ${KIWI_BOOST_INTERN_DIR})
elseif(UNIX)
execute_process(COMMAND ./bootstrap.sh toolset=gcc link=static WORKING_DIRECTORY ${KIWI_BOOST_INTERN_DIR})
elseif(WIN32)
execute_process(COMMAND bootstrap.bat WORKING_DIRECTORY ${KIWI_BOOST_INTERN_DIR})
endif()

# Compile the boost library
# -------------------------------------------------------------------------#
message(STATUS "Compile the boost library")
if(APPLE)
execute_process(COMMAND ./b2 cflags=-mmacosx-version-min=10.9 address-model=64 --with-system stage WORKING_DIRECTORY ${KIWI_BOOST_INTERN_DIR})
elseif(UNIX)
execute_process(COMMAND ./b2 --with-system stage WORKING_DIRECTORY ${KIWI_BOOST_INTERN_DIR})
elseif(WIN32)
execute_process(COMMAND b2 --toolset=msvc -j4 --with-system --stagedir=stage64 variant=release architecture=x86 address-model=64 link=static WORKING_DIRECTORY ${KIWI_BOOST_INTERN_DIR})
endif()

endif()

endif(NOT ${USE_SYSTEM_BOOST})

# Find boost library on the system
# ---------------------------------------------------------------------------#
find_package(Boost 1.69.0 COMPONENTS system)

if(Boost_FOUND)
message(STATUS "Boost include directory: " ${Boost_INCLUDE_DIRS})
message(STATUS "Boost library directory: " ${Boost_LIBRARY_DIRS})
message(STATUS "Boost libraries:" ${Boost_LIBRARIES})
else()
message(SEND_ERROR "Boost not installed")
endif()
message(STATUS "")
42 changes: 42 additions & 0 deletions CMake/ConfigFAUST.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

message(STATUS "FAUST - configuring the FAUST static library")
# -----------------------------------------------------------------------------#

# FAUST internal directory
# -----------------------------------------------------------------------------#
if(NOT DEFINED KIWI_DEPENDENCIES_DIR)
set(KIWI_DEPENDENCIES_DIR "${PROJECT_SOURCE_DIR}/ThirdParty")
endif()
set(KIWI_FAUST_INTERN_DIR "${KIWI_DEPENDENCIES_DIR}/faust")

## Hardcoded targets for faust
set(INCLUDE_STATIC ON CACHE STRING "Include static library" FORCE)
set(INCLUDE_EXECUTABLE OFF CACHE STRING "Include runtime executable" FORCE)
set(INCLUDE_DYNAMIC OFF CACHE STRING "Include dynamic library" FORCE)
set(INCLUDE_OSC OFF CACHE STRING "Include Faust OSC library" FORCE)
set(INCLUDE_HTTP OFF CACHE STRING "Include Faust HTTPD library" FORCE)

## Hardcoded backends for faust
set(ASMJS_BACKEND OFF CACHE STRING "Include ASMJS backend" FORCE)
set(C_BACKEND OFF CACHE STRING "Include C backend" FORCE)
set(CPP_BACKEND OFF CACHE STRING "Include CPP backend" FORCE)
set(FIR_BACKEND OFF CACHE STRING "Include FIR backend" FORCE)
set(INTERP_BACKEND OFF CACHE STRING "Include INTERPRETER backend" FORCE)
set(JAVA_BACKEND OFF CACHE STRING "Include JAVA backend" FORCE)
set(JS_BACKEND OFF CACHE STRING "Include JAVASCRIPT backend" FORCE)
set(LLVM_BACKEND COMPILER STATIC DYNAMIC CACHE STRING "Include LLVM backend" FORCE)
set(OLDCPP_BACKEND OFF CACHE STRING "Include old CPP backend" FORCE)
set(RUST_BACKEND OFF CACHE STRING "Include RUST backend" FORCE)
set(WASM_BACKEND OFF CACHE STRING "Include WASM backend" FORCE)

## Call the faust cmakelist.txt
add_subdirectory(./ThirdParty/faust/build EXCLUDE_FROM_ALL)

if(MSVC)
set_property(TARGET staticlib APPEND_STRING PROPERTY COMPILE_FLAGS " /EHsc /D WIN32 -D_SCL_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES")
set_property(TARGET staticlib APPEND_STRING PROPERTY LINK_FLAGS " /ignore:4099 ")
endif()

include_directories(${KIWI_FAUST_INTERN_DIR}/architecture)

message(STATUS "")
Loading

0 comments on commit 8f1ef8d

Please sign in to comment.