Skip to content

Commit

Permalink
Update everything
Browse files Browse the repository at this point in the history
  • Loading branch information
falkTX committed Jul 19, 2021
1 parent 06864e0 commit 5130b62
Show file tree
Hide file tree
Showing 64 changed files with 14,488 additions and 1,041 deletions.
189 changes: 189 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
name: build

on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
env:
DEBIAN_FRONTEND: noninteractive

jobs:
linux-arm64:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up dependencies
run: |
sudo dpkg --add-architecture arm64 && \
sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list && \
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports bionic main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/ports-arm64.list && \
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports bionic-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-arm64.list && \
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports bionic-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-arm64.list && \
sudo apt-get update -qq && \
sudo apt-get install -yq g++-aarch64-linux-gnu libasound2-dev:arm64 libcairo2-dev:arm64 libgl1-mesa-dev:arm64 liblo-dev:arm64 libpulse-dev:arm64 qemu-user-static
- name: Build linux arm64 cross-compiled
env:
CC: aarch64-linux-gnu-gcc
CXX: aarch64-linux-gnu-g++
LDFLAGS: -static-libgcc -static-libstdc++
run: |
make -j $(nproc)
- name: Set sha8
id: slug
run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
- uses: actions/upload-artifact@v2
with:
name: ${{ github.event.repository.name }}-linux-arm64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
path: |
bin/*
linux-armhf:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up dependencies
run: |
sudo dpkg --add-architecture armhf && \
sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list && \
echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports bionic main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/ports-armhf.list && \
echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports bionic-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list && \
echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports bionic-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list && \
sudo apt-get update -qq && \
sudo apt-get install -yq g++-arm-linux-gnueabihf libasound2-dev:armhf libcairo2-dev:armhf libgl1-mesa-dev:armhf liblo-dev:armhf libpulse-dev:armhf qemu-user-static
- name: Build linux armhf cross-compiled
env:
CC: arm-linux-gnueabihf-gcc
CXX: arm-linux-gnueabihf-g++
LDFLAGS: -static-libgcc -static-libstdc++
run: |
make -j $(nproc)
- name: Set sha8
id: slug
run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
- uses: actions/upload-artifact@v2
with:
name: ${{ github.event.repository.name }}-linux-armhf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
path: |
bin/*
linux-x64:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up dependencies
run: |
sudo apt-get install -yq libasound2-dev libgl1-mesa-dev liblo-dev libpulse-dev
- name: Build linux x64
env:
LDFLAGS: -static-libgcc -static-libstdc++
run: |
make -j $(nproc)
- name: Set sha8
id: slug
run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
- uses: actions/upload-artifact@v2
with:
name: ${{ github.event.repository.name }}-linux-x64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
path: |
bin/*
macos-universal:
runs-on: macos-10.15
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Fix up Xcode
run: |
sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*
sudo xcode-select -s "/Applications/Xcode_12.3.app"
- name: Build macOS universal
env:
CFLAGS: -arch x86_64 -arch arm64 -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_12 -mmacosx-version-min=10.12 -mtune=generic -msse -msse2
CXXFLAGS: -arch x86_64 -arch arm64 -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_12 -mmacosx-version-min=10.12 -mtune=generic -msse -msse2
LDFLAGS: -arch x86_64 -arch arm64 -mmacosx-version-min=10.12
run: |
make NOOPT=true -j $(sysctl -n hw.logicalcpu) && \
./dpf/utils/package-osx-bundles.sh
- name: Set sha8
id: slug
run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
- uses: actions/upload-artifact@v2
with:
name: ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
path: |
*-macOS.pkg
bin/*
!bin/*-ladspa.dylib
!bin/*-dssi.dylib
!bin/lv2
!bin/vst2
win32:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up dependencies
run: |
sudo dpkg --add-architecture i386 && \
sudo apt-get update -qq && \
sudo apt-get install -yq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386
- name: Build win32 cross-compiled
env:
CC: i686-w64-mingw32-gcc
CXX: i686-w64-mingw32-g++
EXE_WRAPPER: wine
PKG_CONFIG: "false"
WINEDEBUG: "-all"
run: |
make -j $(nproc)
- name: Set sha8
id: slug
run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
- uses: actions/upload-artifact@v2
with:
name: ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
path: |
bin/*
!bin/*-ladspa.dll
!bin/*-dssi.dll
win64:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up dependencies
run: |
sudo apt-get install -yq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable
- name: Build win64 cross-compiled
env:
CC: x86_64-w64-mingw32-gcc
CXX: x86_64-w64-mingw32-g++
EXE_WRAPPER: wine
PKG_CONFIG: "false"
WINEDEBUG: "-all"
run: |
make -j $(nproc)
- name: Set sha8
id: slug
run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
- uses: actions/upload-artifact@v2
with:
name: ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
path: |
bin/*
!bin/*-ladspa.dll
!bin/*-dssi.dll
1 change: 0 additions & 1 deletion dpf/LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
DISTRHO Plugin Framework (DPF)
Copyright (C) 2012-2021 Filipe Coelho <falktx@falktx.com>

Permission to use, copy, modify, and/or distribute this software for any purpose with
Expand Down
30 changes: 27 additions & 3 deletions dpf/Makefile.base.mk
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ endif

ifeq ($(WINDOWS),true)
# Always build statically on windows
LINK_FLAGS += -static
LINK_FLAGS += -static -static-libgcc -static-libstdc++
endif

# ---------------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -247,6 +247,20 @@ endif

HAVE_LIBLO = $(shell $(PKG_CONFIG) --exists liblo && echo true)

ifeq ($(MACOS),true)
HAVE_RTAUDIO = true
else ifeq ($(WINDOWS),true)
HAVE_RTAUDIO = true
else ifneq ($(HAIKU),true)
HAVE_ALSA = $(shell $(PKG_CONFIG) --exists alsa && echo true)
HAVE_PULSEAUDIO = $(shell $(PKG_CONFIG) --exists libpulse-simple && echo true)
ifeq ($(HAVE_ALSA),true)
HAVE_RTAUDIO = true
else ifeq ($(HAVE_PULSEAUDIO),true)
HAVE_RTAUDIO = true
endif
endif

# backwards compat
HAVE_JACK = true

Expand Down Expand Up @@ -357,9 +371,19 @@ endif
# ---------------------------------------------------------------------------------------------------------------------
# Set optional libraries specific stuff

ifeq ($(HAVE_ALSA),true)
ALSA_FLAGS = $(shell $(PKG_CONFIG) --cflags alsa)
ALSA_LIBS = $(shell $(PKG_CONFIG) --libs alsa)
endif

ifeq ($(HAVE_LIBLO),true)
LIBLO_FLAGS = $(shell $(PKG_CONFIG) --cflags liblo)
LIBLO_LIBS = $(shell $(PKG_CONFIG) --libs liblo)
LIBLO_FLAGS = $(shell $(PKG_CONFIG) --cflags liblo)
LIBLO_LIBS = $(shell $(PKG_CONFIG) --libs liblo)
endif

ifeq ($(HAVE_PULSEAUDIO),true)
PULSEAUDIO_FLAGS = $(shell $(PKG_CONFIG) --cflags libpulse-simple)
PULSEAUDIO_LIBS = $(shell $(PKG_CONFIG) --libs libpulse-simple)
endif

# ---------------------------------------------------------------------------------------------------------------------
Expand Down
48 changes: 32 additions & 16 deletions dpf/Makefile.plugins.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,46 +7,62 @@
# NOTE: NAME, FILES_DSP and FILES_UI must have been defined before including this file!


ifeq ($(DPF_CUSTOM_PATH),)
ifeq ($(DPF_PATH),)
ifeq (,$(wildcard ../../Makefile.base.mk))
DPF_PATH=../../dpf
else
DPF_PATH=../..
endif
else
DPF_PATH = $(DPF_CUSTOM_PATH)
endif

include $(DPF_PATH)/Makefile.base.mk

# ---------------------------------------------------------------------------------------------------------------------
# Basic setup

ifeq ($(DPF_CUSTOM_PATH),)
ifeq ($(DPF_TARGET_DIR),)
TARGET_DIR = ../../bin
BUILD_DIR = ../../build/$(NAME)
else
ifeq ($(DPF_CUSTOM_TARGET_DIR),)
$(error DPF_CUSTOM_TARGET_DIR is not set)
else
TARGET_DIR = $(DPF_CUSTOM_TARGET_DIR)
TARGET_DIR = $(DPF_TARGET_DIR)
endif
ifeq ($(DPF_CUSTOM_BUILD_DIR),)
$(error DPF_CUSTOM_BUILD_DIR is not set)
ifeq ($(DPF_BUILD_DIR),)
BUILD_DIR = ../../build/$(NAME)
else
BUILD_DIR = $(DPF_CUSTOM_BUILD_DIR)
endif
BUILD_DIR = $(DPF_BUILD_DIR)
endif

BUILD_C_FLAGS += -I.
BUILD_CXX_FLAGS += -I. -I$(DPF_PATH)/distrho -I$(DPF_PATH)/dgl

ifeq ($(HAVE_ALSA),true)
BASE_FLAGS += -DHAVE_ALSA
endif

ifeq ($(HAVE_LIBLO),true)
BASE_FLAGS += -DHAVE_LIBLO
endif

ifneq ($(HAIKU_OR_MACOS_OR_WINDOWS),true)
JACK_LIBS = -ldl
ifeq ($(HAVE_PULSEAUDIO),true)
BASE_FLAGS += -DHAVE_PULSEAUDIO
endif

ifeq ($(MACOS),true)
JACK_LIBS += -framework CoreAudio -framework CoreFoundation
else ifeq ($(WINDOWS),true)
JACK_LIBS += -lksuser -lmfplat -lmfuuid -lole32 -lwinmm -lwmcodecdspuuid
else ifneq ($(HAIKU),true)
JACK_LIBS = -ldl
ifeq ($(HAVE_ALSA),true)
JACK_FLAGS += $(ALSA_FLAGS)
JACK_LIBS += $(ALSA_LIBS)
endif
ifeq ($(HAVE_PULSEAUDIO),true)
JACK_FLAGS += $(PULSEAUDIO_FLAGS)
JACK_LIBS += $(PULSEAUDIO_LIBS)
endif
ifeq ($(HAVE_RTAUDIO),true)
JACK_LIBS += -lpthread
endif # !HAIKU
endif

# backwards compat
Expand Down Expand Up @@ -257,7 +273,7 @@ $(BUILD_DIR)/DistrhoUI_macOS_%.mm.o: $(DPF_PATH)/distrho/DistrhoUI_macOS.mm
$(BUILD_DIR)/DistrhoPluginMain_JACK.cpp.o: $(DPF_PATH)/distrho/DistrhoPluginMain.cpp
-@mkdir -p $(BUILD_DIR)
@echo "Compiling DistrhoPluginMain.cpp (JACK)"
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -DDISTRHO_PLUGIN_TARGET_JACK -c -o $@
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -DDISTRHO_PLUGIN_TARGET_JACK $(JACK_FLAGS) -c -o $@

$(BUILD_DIR)/DistrhoUIMain_DSSI.cpp.o: $(DPF_PATH)/distrho/DistrhoUIMain.cpp
-@mkdir -p $(BUILD_DIR)
Expand Down
9 changes: 9 additions & 0 deletions dpf/cmake/DPF-plugin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,13 @@ function(dpf__build_jack NAME DGL_LIBRARY)
if((NOT WIN32) AND (NOT APPLE) AND (NOT HAIKU))
target_link_libraries("${NAME}-jack" PRIVATE "dl")
endif()

# for RtAudio native fallback
if(APPLE)
find_library(APPLE_COREAUDIO_FRAMEWORK "CoreAudio")
find_library(APPLE_COREFOUNDATION_FRAMEWORK "CoreFoundation")
target_link_libraries("${NAME}-jack" PRIVATE "${APPLE_COREAUDIO_FRAMEWORK}" "${APPLE_COREFOUNDATION_FRAMEWORK}")
endif()
endfunction()

# dpf__build_ladspa
Expand Down Expand Up @@ -326,6 +333,7 @@ function(dpf__add_dgl_cairo)
"${DPF_ROOT_DIR}/dgl/src/Application.cpp"
"${DPF_ROOT_DIR}/dgl/src/ApplicationPrivateData.cpp"
"${DPF_ROOT_DIR}/dgl/src/Color.cpp"
"${DPF_ROOT_DIR}/dgl/src/EventHandlers.cpp"
"${DPF_ROOT_DIR}/dgl/src/Geometry.cpp"
"${DPF_ROOT_DIR}/dgl/src/ImageBase.cpp"
"${DPF_ROOT_DIR}/dgl/src/ImageBaseWidgets.cpp"
Expand Down Expand Up @@ -386,6 +394,7 @@ function(dpf__add_dgl_opengl)
"${DPF_ROOT_DIR}/dgl/src/Application.cpp"
"${DPF_ROOT_DIR}/dgl/src/ApplicationPrivateData.cpp"
"${DPF_ROOT_DIR}/dgl/src/Color.cpp"
"${DPF_ROOT_DIR}/dgl/src/EventHandlers.cpp"
"${DPF_ROOT_DIR}/dgl/src/Geometry.cpp"
"${DPF_ROOT_DIR}/dgl/src/ImageBase.cpp"
"${DPF_ROOT_DIR}/dgl/src/ImageBaseWidgets.cpp"
Expand Down
Loading

0 comments on commit 5130b62

Please sign in to comment.