Browse Source

Fix ProM build, ship with custom resource files as needed

Signed-off-by: falkTX <falktx@falktx.com>
tags/v1.5
falkTX 4 years ago
parent
commit
45aa9b0719
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
5 changed files with 83 additions and 2 deletions
  1. +20
    -0
      .github/workflows/irc.yml
  2. +43
    -0
      Makefile
  3. +11
    -0
      plugins/ProM/DistrhoUIProM.cpp
  4. +8
    -1
      plugins/ProM/Makefile
  5. +1
    -1
      plugins/ProM/projectM/README.md

+ 20
- 0
.github/workflows/irc.yml View File

@@ -0,0 +1,20 @@
name: irc

on: [push]

jobs:
notification:
runs-on: ubuntu-latest
name: IRC notification
steps:
- name: Format message
id: message
run: |
message="${{ github.actor }} pushed $(echo '${{ github.event.commits[0].message }}' | head -n 1) ${{ github.event.commits[0].url }}"
echo ::set-output name=message::"${message}"
- name: IRC notification
uses: Gottox/irc-message-action@v2
with:
channel: '#kxstudio'
nickname: kxstudio-bot
message: ${{ steps.message.outputs.message }}

+ 43
- 0
Makefile View File

@@ -13,6 +13,11 @@ all: dgl plugins gen
PREFIX ?= /usr/local
DESTDIR ?=

# --------------------------------------------------------------
# Check for system-wide projectM

HAVE_PROJECTM = $(shell pkg-config --exists libprojectM && echo true)

# --------------------------------------------------------------

ifneq ($(CROSS_COMPILING),true)
@@ -60,6 +65,44 @@ ifeq ($(HAVE_OPENGL),true)
$(MAKE) all -C plugins/ProM
endif # HAVE_OPENGL

ifneq ($(HAVE_PROJECTM),true)
resources: gen
# LV2 fonts
install -d bin/ProM.lv2/resources/fonts
ln -sf $(CURDIR)/plugins/ProM/projectM/fonts/*.ttf bin/ProM.lv2/resources/fonts/
# LV2 presets
install -d bin/ProM.lv2/resources/presets
ln -sf $(CURDIR)/plugins/ProM/projectM/presets/presets_* bin/ProM.lv2/resources/presets/

ifeq ($(MACOS),true)
# VST2 fonts
install -d bin/ProM.vst/Contents/Resources/fonts
ln -sf $(CURDIR)/plugins/ProM/projectM/fonts/*.ttf bin/ProM.vst/Contents/Resources/fonts/
# VST2 presets
install -d bin/ProM.vst/Contents/Resources/presets
ln -sf $(CURDIR)/plugins/ProM/projectM/presets/presets_* bin/ProM.vst/Contents/Resources/presets/
else
# VST2 directory
install -d bin/ProM.vst
mv bin/ProM-vst$(LIB_EXT) bin/ProM.vst/ProM$(LIB_EXT)
# VST2 fonts
install -d bin/ProM.vst/resources/fonts
ln -sf $(CURDIR)/plugins/ProM/projectM/fonts/*.ttf bin/ProM.vst/resources/fonts/
# VST2 presets
install -d bin/ProM.vst/resources/presets
ln -sf $(CURDIR)/plugins/ProM/projectM/presets/presets_* bin/ProM.vst/resources/presets/
endif

# VST3 fonts
install -d bin/ProM.vst3/Contents/Resources/fonts
ln -sf $(CURDIR)/plugins/ProM/projectM/fonts/*.ttf bin/ProM.vst3/Contents/Resources/fonts/
# VST3 presets
install -d bin/ProM.vst3/Contents/Resources/presets
ln -sf $(CURDIR)/plugins/ProM/projectM/presets/presets_* bin/ProM.vst3/Contents/Resources/presets/
else
resources:
endif

gen: plugins dpf/utils/lv2_ttl_generator
ifeq ($(CAN_GENERATE_TTL),true)
@$(CURDIR)/dpf/utils/generate-ttl.sh


+ 11
- 0
plugins/ProM/DistrhoUIProM.cpp View File

@@ -14,7 +14,14 @@
* For a full copy of the license see the LICENSE file.
*/

/* s/private/public/ as workaround old projectM versions */
#define private public
#include "libprojectM/projectM.hpp"
#undef private

#ifndef PROJECTM_DATA_DIR
#include "libprojectM/projectM-opengl.h"
#endif

#include "DistrhoPluginProM.hpp"
#include "DistrhoUIProM.hpp"
@@ -253,6 +260,7 @@ bool DistrhoUIProM::onKeyboard(const KeyboardEvent& ev)
if (fPM == nullptr)
return false;

#ifdef HAVE_PROJECTM_TEXT_FUNCTIONS
// special handling for text
if (fPM->isTextInputActive(true) && !ev.press)
{
@@ -269,6 +277,7 @@ bool DistrhoUIProM::onKeyboard(const KeyboardEvent& ev)
return true;
}
}
#endif

projectMKeycode pmKey = PROJECTM_K_NONE;

@@ -304,12 +313,14 @@ bool DistrhoUIProM::onKeyboard(const KeyboardEvent& ev)
case '\r':
pmKey = PROJECTM_K_RETURN;
break;
#ifdef HAVE_PROJECTM_TEXT_FUNCTIONS
case '/':
pmKey = PROJECTM_K_SLASH;
break;
case '\\':
pmKey = PROJECTM_K_BACKSLASH;
break;
#endif
case '+':
pmKey = PROJECTM_K_PLUS;
break;


+ 8
- 1
plugins/ProM/Makefile View File

@@ -116,9 +116,16 @@ BASE_FLAGS += -DPROJECTM_DATA_DIR='"$(shell pkg-config --variable=pkgdatadir lib
BASE_FLAGS += $(shell pkg-config --cflags libprojectM)
LINK_FLAGS += $(shell pkg-config --libs libprojectM)

ifeq ($(shell pkg-config --atleast-version=3.1.8 libprojectM && echo true),true)
BASE_FLAGS += -DHAVE_PROJECTM_TEXT_FUNCTIONS
endif

else # HAVE_PROJECTM

# compiler macros
# custom macros for ProM
BASE_FLAGS += -DHAVE_PROJECTM_TEXT_FUNCTIONS

# compiler macros from projectM
BASE_FLAGS += -DUSE_TEXT_MENU=1
BASE_FLAGS += -DUSE_THREADS=1
# GLES stuff


+ 1
- 1
plugins/ProM/projectM/README.md View File

@@ -30,7 +30,7 @@ Its purpose in life is to read an audio input and to produce mesmerizing visuals
* [Windows Store](https://www.microsoft.com/store/apps/9NDCVH0VCWJN)
#### Other
* [Source code](https://github.com/projectM-visualizer/projectm/)
* [LV2 + VST2 audio plugin](https://github.com/DISTRHO/ProM/)
* [LV2, VST2 and VST3 audio plugin](https://github.com/DISTRHO/ProM/)
* [Qt5](https://www.qt.io/)-based [PulseAudio](https://www.freedesktop.org/wiki/Software/PulseAudio/) and JACK desktop apps in [source code](https://github.com/projectM-visualizer/projectm/)
* [ALSA, XMMS, Winamp, JACK](https://sourceforge.net/projects/projectm/files/) (source, unmaintained)



Loading…
Cancel
Save