Skip to content

Commit

Permalink
0.6.0 compatibility attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastien-bouffier committed Mar 31, 2018
1 parent 93d23ee commit 4f9c800
Show file tree
Hide file tree
Showing 167 changed files with 102,192 additions and 63 deletions.
72 changes: 61 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,27 +1,77 @@
SLUG = Bidoo
VERSION = 0.6.0
DISTRIBUTABLES += $(wildcard LICENSE*) res
RACK_DIR ?= ../..
SLUG = Bidoo
VERSION = 0.6.0.1

FLAGS += -I./src/dep/include -I./src/dep/audiofile -I./src/dep/filters -I./src/dep/freeverb
FLAGS += -Idep/include -I./src/dep/include -I./src/dep/audiofile -I./src/dep/filters -I./src/dep/freeverb
SOURCES += $(wildcard src/*.cpp src/dep/audiofile/*cpp src/dep/pffft/*c src/dep/filters/*cpp src/dep/freeverb/*cpp)
DISTRIBUTABLES += $(wildcard LICENSE*) res

include $(RACK_DIR)/arch.mk

ifeq ($(ARCH), lin)
LDFLAGS += -L$(RACK_DIR)/dep/lib -lglfw $(RACK_DIR)/dep/lib/libcurl.a src/dep/lib/libmpg123.a
LDFLAGS += -Ldep/lib -lglfw -lcurl -lssl
endif

ifeq ($(ARCH), mac)
LDFLAGS += -L$(RACK_DIR)/dep/lib -lglfw $(RACK_DIR)/dep/lib/libcurl.a src/dep/lib/libmpg123.a
LDFLAGS += -Ldep/lib -lglfw -lcurl -lssl
endif

ifeq ($(ARCH), win)
LDFLAGS += -L$(RACK_DIR)/dep/lib -lglfw3dll -lcurl src/dep/lib/libmpg123.a -lshlwapi
LDFLAGS += -Ldep/lib -lglfw3dll -lcurl -lssl -lshlwapi
endif

SOURCES = $(wildcard src/*.cpp src/dep/audiofile/*cpp src/dep/pffft/*c src/dep/filters/*cpp src/dep/freeverb/*cpp)
# Static libs
mpg123 := dep/lib/libmpg123.a
curl := dep/lib/libcurl.a

include $(RACK_DIR)/plugin.mk
ifeq ($(ARCH), lin)
glfw := dep/lib/libglfw.a
endif

ifeq ($(ARCH), mac)
glfw := dep/lib/libglfw.a
endif

dep:
$(MAKE) -C src/dep
ifeq ($(ARCH), win)
glfw := dep/lib/libglfw3dll.a
endif

OBJECTS += $(mpg123) $(curl) $(glfw)

# Dependencies
$(shell mkdir -p dep)
DEP_LOCAL := dep
DEPS += $(mpg123) $(libcurl) $(glfw)

$(mpg123):
cd dep && $(WGET) https://www.mpg123.de/download/mpg123-1.25.8.tar.bz2
cd dep && $(UNTAR) mpg123-1.25.8.tar.bz2
cd dep/mpg123-1.25.8 && ./configure --prefix="$(realpath $(DEP_LOCAL))" --with-cpu=generic --with-pic --disable-shared --enable-static
cd dep/mpg123-1.25.8 && $(MAKE)
cd dep/mpg123-1.25.8 && $(MAKE) install

$(glfw):
cd dep/glfw && $(CMAKE) . \
-DBUILD_SHARED_LIBS=ON \
-DGLFW_COCOA_CHDIR_RESOURCES=OFF -DGLFW_COCOA_MENUBAR=ON -DGLFW_COCOA_RETINA_FRAMEBUFFER=ON
$(MAKE) -C dep/glfw
$(MAKE) -C dep/glfw install

$(openssl):
cd dep && $(WGET) https://www.openssl.org/source/openssl-1.1.0g.tar.gz
cd dep && $(UNTAR) openssl-1.1.0g.tar.gz
cd dep/openssl-1.1.0g && ./config --prefix="$(realpath $(DEP_LOCAL))"
cd dep/openssl-1.1.0g $(MAKE)
cd dep/openssl-1.1.0g $(MAKE) install_sw

$(curl): $(openssl)
cd dep && $(WGET) https://github.com/curl/curl/releases/download/curl-7_56_0/curl-7.56.0.tar.gz
cd dep && $(UNTAR) curl-7.56.0.tar.gz
cd dep/curl-7.56.0 && $(CONFIGURE) --disable-ftp --disable-file --disable-ldap --disable-ldaps --disable-rtsp --disable-proxy --disable-dict \
--disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smb --disable-smtp --disable-gopher --disable-manual \
--without-zlib --without-libpsl --without-libmetalink --without-libssh2 --without-librtmp --without-winidn --without-libidn2 --without-nghttp2 \
--without-ca-bundle --with-ca-fallback --with-ssl="$(realpath $(DEP_LOCAL))"
$(MAKE) -C dep/curl-7.56.0
$(MAKE) -C dep/curl-7.56.0 install

include $(RACK_DIR)/plugin.mk
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Bidoo's plugins for [VCVRack](https://vcvrack.com)

<!-- Version and License Badges -->
![Version](https://img.shields.io/badge/version-0.6.0-green.svg?style=flat-square)
![Version](https://img.shields.io/badge/version-0.6.0.1-green.svg?style=flat-square)
![License](https://img.shields.io/badge/license-BSD3-blue.svg?style=flat-square)
![Language](https://img.shields.io/badge/language-C++-yellow.svg?style=flat-square)

Expand Down
23 changes: 23 additions & 0 deletions dep/glfw/.appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
branches:
only:
- ci
- master
skip_tags: true
environment:
CFLAGS: /WX
matrix:
- BUILD_SHARED_LIBS: ON
- BUILD_SHARED_LIBS: OFF
matrix:
fast_finish: true
build_script:
- mkdir build
- cd build
- cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DBUILD_SHARED_LIBS=%BUILD_SHARED_LIBS% ..
- cmake --build .
notifications:
- provider: Email
to:
- [email protected]
on_build_failure: true
on_build_success: false
1 change: 1 addition & 0 deletions dep/glfw/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.m linguist-language=Objective-C
84 changes: 84 additions & 0 deletions dep/glfw/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# External junk
.DS_Store
_ReSharper*
*.opensdf
*.sdf
*.suo
*.dir
*.vcxproj*
*.sln
Win32
x64
Debug
Release
MinSizeRel
RelWithDebInfo
*.xcodeproj

# CMake files
Makefile
CMakeCache.txt
CMakeFiles
CMakeScripts
cmake_install.cmake
cmake_uninstall.cmake

# Generated files
docs/Doxyfile
docs/html
docs/warnings.txt
docs/doxygen_sqlite3.db
src/glfw_config.h
src/glfw3.pc
src/glfw3Config.cmake
src/glfw3ConfigVersion.cmake
src/wayland-pointer-constraints-unstable-v1-client-protocol.h
src/wayland-pointer-constraints-unstable-v1-protocol.c
src/wayland-relative-pointer-unstable-v1-client-protocol.h
src/wayland-relative-pointer-unstable-v1-protocol.c

# Compiled binaries
src/libglfw.so
src/libglfw.so.3
src/libglfw.so.3.3
src/libglfw.dylib
src/libglfw.dylib
src/libglfw.3.dylib
src/libglfw.3.3.dylib
src/libglfw3.a
src/glfw3.lib
src/glfw3.dll
src/glfw3dll.lib
src/libglfw3dll.a
examples/*.app
examples/*.exe
examples/boing
examples/gears
examples/heightmap
examples/offscreen
examples/particles
examples/splitview
examples/sharing
examples/simple
examples/wave
tests/*.app
tests/*.exe
tests/clipboard
tests/cursor
tests/empty
tests/events
tests/gamma
tests/glfwinfo
tests/icon
tests/iconify
tests/joysticks
tests/monitors
tests/msaa
tests/reopen
tests/tearing
tests/threads
tests/timeout
tests/title
tests/vulkan
tests/windows

78 changes: 78 additions & 0 deletions dep/glfw/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
language: c
compiler: clang
branches:
only:
- ci
- master
sudo: false
dist: trusty
addons:
apt:
packages:
- cmake
- libxrandr-dev
- libxinerama-dev
- libxcursor-dev
- libxi-dev
matrix:
include:
- os: linux
env:
- BUILD_SHARED_LIBS=ON
- CFLAGS=-Werror
- os: linux
env:
- BUILD_SHARED_LIBS=OFF
- CFLAGS=-Werror
- os: linux
sudo: required
addons:
apt:
packages:
- libwayland-dev
- libxkbcommon-dev
- libegl1-mesa-dev
env:
- USE_WAYLAND=ON
- BUILD_SHARED_LIBS=ON
- CFLAGS=-Werror
- os: linux
sudo: required
addons:
apt:
packages:
- libwayland-dev
- libxkbcommon-dev
- libegl1-mesa-dev
env:
- USE_WAYLAND=ON
- BUILD_SHARED_LIBS=OFF
- CFLAGS=-Werror
- os: osx
env:
- BUILD_SHARED_LIBS=ON
- CFLAGS=-Werror
- os: osx
env:
- BUILD_SHARED_LIBS=OFF
- CFLAGS=-Werror
script:
- if grep -Inr '\s$' src include docs tests examples CMake *.md .gitattributes .gitignore; then echo Trailing whitespace found, aborting.; exit 1; fi
- mkdir build
- cd build
- if test -n "${USE_WAYLAND}";
then wget https://mirrors.kernel.org/ubuntu/pool/universe/e/extra-cmake-modules/extra-cmake-modules_5.38.0a-0ubuntu1_amd64.deb;
sudo dpkg -i extra-cmake-modules_5.38.0a-0ubuntu1_amd64.deb;
git clone git://anongit.freedesktop.org/wayland/wayland-protocols;
pushd wayland-protocols;
git checkout 1.12 && ./autogen.sh --prefix=/usr && make && sudo make install;
popd;
fi
- cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} -DGLFW_USE_WAYLAND=${USE_WAYLAND} ..
- cmake --build .
notifications:
email:
recipients:
- [email protected]
on_success: never
on_failure: always
33 changes: 33 additions & 0 deletions dep/glfw/CMake/GenerateMappings.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Usage:
# cmake -P GenerateMappings.cmake <path/to/mappings.h.in> <path/to/mappings.h>

set(source_url "https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt")
set(source_path "${CMAKE_CURRENT_BINARY_DIR}/gamecontrollerdb.txt")
set(template_path "${CMAKE_ARGV3}")
set(target_path "${CMAKE_ARGV4}")

if (NOT EXISTS "${template_path}")
message(FATAL_ERROR "Failed to find template file ${template_path}")
endif()

file(DOWNLOAD "${source_url}" "${source_path}"
STATUS download_status
TLS_VERIFY on)

list(GET download_status 0 status_code)
list(GET download_status 1 status_message)

if (status_code)
message(FATAL_ERROR "Failed to download ${source_url}: ${status_message}")
endif()

file(STRINGS "${source_path}" lines)
foreach(line ${lines})
if ("${line}" MATCHES "^[0-9a-fA-F].*$")
set(GLFW_GAMEPAD_MAPPINGS "${GLFW_GAMEPAD_MAPPINGS}\"${line}\",\n")
endif()
endforeach()

configure_file("${template_path}" "${target_path}" @ONLY NEWLINE_STYLE UNIX)
file(REMOVE "${source_path}")

38 changes: 38 additions & 0 deletions dep/glfw/CMake/MacOSXBundleInfo.plist.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
<key>CFBundleGetInfoString</key>
<string>${MACOSX_BUNDLE_INFO_STRING}</string>
<key>CFBundleIconFile</key>
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
<key>CFBundleIdentifier</key>
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
<key>CFBundleName</key>
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>LSRequiresCarbon</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>
13 changes: 13 additions & 0 deletions dep/glfw/CMake/amd64-mingw32msvc.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Define the environment for cross compiling from Linux to Win64
SET(CMAKE_SYSTEM_NAME Windows)
SET(CMAKE_SYSTEM_VERSION 1)
SET(CMAKE_C_COMPILER "amd64-mingw32msvc-gcc")
SET(CMAKE_CXX_COMPILER "amd64-mingw32msvc-g++")
SET(CMAKE_RC_COMPILER "amd64-mingw32msvc-windres")
SET(CMAKE_RANLIB "amd64-mingw32msvc-ranlib")

# Configure the behaviour of the find commands
SET(CMAKE_FIND_ROOT_PATH "/usr/amd64-mingw32msvc")
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
13 changes: 13 additions & 0 deletions dep/glfw/CMake/i586-mingw32msvc.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Define the environment for cross compiling from Linux to Win32
SET(CMAKE_SYSTEM_NAME Windows)
SET(CMAKE_SYSTEM_VERSION 1)
SET(CMAKE_C_COMPILER "i586-mingw32msvc-gcc")
SET(CMAKE_CXX_COMPILER "i586-mingw32msvc-g++")
SET(CMAKE_RC_COMPILER "i586-mingw32msvc-windres")
SET(CMAKE_RANLIB "i586-mingw32msvc-ranlib")

# Configure the behaviour of the find commands
SET(CMAKE_FIND_ROOT_PATH "/usr/i586-mingw32msvc")
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
Loading

0 comments on commit 4f9c800

Please sign in to comment.