vst3: don't link with -ldl, build with rutex, proper shortTitle for MIDI params

This commit is contained in:
Stefano D'Angelo 2025-01-16 08:10:48 +01:00
parent a1281745c9
commit dae279564e
4 changed files with 12 additions and 6 deletions

View File

@ -79,6 +79,12 @@ LDFLAGS_ALL := -shared -lm $(LDFLAGS_EXTRA) $(LDFLAGS)
CXXFLAGS := $(CFLAGS) CXXFLAGS := $(CFLAGS)
CXXFLAGS_ALL := -I$(DATA_DIR)/src -I$(PLUGIN_DIR) -I$(API_DIR) -fPIC $(CXXFLAGS_EXTRA) $(CXXFLAGS) CXXFLAGS_ALL := -I$(DATA_DIR)/src -I$(PLUGIN_DIR) -I$(API_DIR) -fPIC $(CXXFLAGS_EXTRA) $(CXXFLAGS)
ifeq ($(HAS_PARAMETER_IN), yes)
RUTEX_DIR ?= ../rutex
CFLAGS_ALL := -I$(RUTEX_DIR) $(CFLAGS_ALL)
CXXFLAGS_ALL := -I$(RUTEX_DIR) $(CXXFLAGS_ALL)
endif
ifeq ($(UNAME_S), Darwin) ifeq ($(UNAME_S), Darwin)
CFLAGS_ALL := $(CFLAGS_ALL) -arch arm64 -arch x86_64 CFLAGS_ALL := $(CFLAGS_ALL) -arch arm64 -arch x86_64
LDFLAGS_ALL := $(LDFLAGS_ALL) -arch arm64 -arch x86_64 LDFLAGS_ALL := $(LDFLAGS_ALL) -arch arm64 -arch x86_64
@ -90,7 +96,6 @@ endif
ifeq ($(UNAME_S), Linux) ifeq ($(UNAME_S), Linux)
CFLAGS_ALL := $(CFLAGS_ALL) -D_GNU_SOURCE CFLAGS_ALL := $(CFLAGS_ALL) -D_GNU_SOURCE
LDFLAGS_ALL := $(LDFLAGS_ALL) -ldl
ifeq ($(HAS_UI), yes) ifeq ($(HAS_UI), yes)
CFLAGS_ALL := $(CFLAGS_ALL) $(shell pkg-config --cflags x11) CFLAGS_ALL := $(CFLAGS_ALL) $(shell pkg-config --cflags x11)
LDFLAGS_ALL := $(LDFLAGS_ALL) $(shell pkg-config --libs x11) LDFLAGS_ALL := $(LDFLAGS_ALL) $(shell pkg-config --libs x11)
@ -98,7 +103,6 @@ ifeq ($(UNAME_S), Linux)
endif endif
endif endif
DLL_FILE := $(DLL_DIR)/$(BUNDLE_NAME)$(DLL_SUFFIX) DLL_FILE := $(DLL_DIR)/$(BUNDLE_NAME)$(DLL_SUFFIX)
C_SRCS := $(COMMON_DIR)/src/vst3.c $(C_SRCS_EXTRA) C_SRCS := $(COMMON_DIR)/src/vst3.c $(C_SRCS_EXTRA)

View File

@ -1,7 +1,7 @@
# #
# Tibia # Tibia
# #
# Copyright (C) 2023, 2024 Orastron Srl unipersonale # Copyright (C) 2023-2025 Orastron Srl unipersonale
# #
# Tibia is free software: you can redistribute it and/or modify # Tibia is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -37,6 +37,7 @@ MKINC_DIR := {{=it.vst3_make?.mkincDir ?? (it.make?.mkincDir ?? "")}}
{{?}} {{?}}
HAS_UI := {{=it.product.ui ? "yes" : "no"}} HAS_UI := {{=it.product.ui ? "yes" : "no"}}
HAS_PARAMETER_IN := {{=it.product.parameters.filter(x => x.direction == "input").length > 0 ? "yes" : "no"}}
{{?it.make?.extra}} {{?it.make?.extra}}
{{=it.make.extra}} {{=it.make.extra}}

View File

@ -154,7 +154,7 @@ static struct Steinberg_Vst_ParameterInfo parameterInfo[DATA_PRODUCT_PARAMETERS_
{ {
/* .id = */ {{=(it.tibia.sdbm(b.name + " Channel Pressure") & 0x7fffffff) >>> 0}}, /* .id = */ {{=(it.tibia.sdbm(b.name + " Channel Pressure") & 0x7fffffff) >>> 0}},
/* .title = */ { {{~Array.from(b.name + " Channel Pressure") :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, /* .title = */ { {{~Array.from(b.name + " Channel Pressure") :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 },
/* .shortTitle = */ { {{~Array.from(b.shortName + " Chan Pres") :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, /* .shortTitle = */ { {{~Array.from(b.shortName + " CP").slice(0,16) :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 },
/* .units = */ { 0 }, /* .units = */ { 0 },
/* .stepCount = */ 0, /* .stepCount = */ 0,
/* .defaultNormalizedValue = */ 0.0, /* .defaultNormalizedValue = */ 0.0,
@ -164,7 +164,7 @@ static struct Steinberg_Vst_ParameterInfo parameterInfo[DATA_PRODUCT_PARAMETERS_
{ {
/* .id = */ {{=(it.tibia.sdbm(b.name + " Pitch Bend") & 0x7fffffff) >>> 0}}, /* .id = */ {{=(it.tibia.sdbm(b.name + " Pitch Bend") & 0x7fffffff) >>> 0}},
/* .title = */ { {{~Array.from(b.name + " Pitch Bend") :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, /* .title = */ { {{~Array.from(b.name + " Pitch Bend") :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 },
/* .shortTitle = */ { {{~Array.from(b.shortName + " Pitch Bend") :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, /* .shortTitle = */ { {{~Array.from(b.shortName + " PB").slice(0, 16) :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 },
/* .units = */ { 0 }, /* .units = */ { 0 },
/* .stepCount = */ 0, /* .stepCount = */ 0,
/* .defaultNormalizedValue = */ 0.5, /* .defaultNormalizedValue = */ 0.5,
@ -174,7 +174,7 @@ static struct Steinberg_Vst_ParameterInfo parameterInfo[DATA_PRODUCT_PARAMETERS_
{ {
/* .id = */ {{=(it.tibia.sdbm(b.name + " Mod Wheel") & 0x7fffffff) >>> 0}}, /* .id = */ {{=(it.tibia.sdbm(b.name + " Mod Wheel") & 0x7fffffff) >>> 0}},
/* .title = */ { {{~Array.from(b.name + " Mod Wheel") :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, /* .title = */ { {{~Array.from(b.name + " Mod Wheel") :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 },
/* .shortTitle = */ { {{~Array.from(b.shortName + " Mod Wheel") :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, /* .shortTitle = */ { {{~Array.from(b.shortName + " MW").slice(0, 16) :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 },
/* .units = */ { 0 }, /* .units = */ { 0 },
/* .stepCount = */ 0, /* .stepCount = */ 0,
/* .defaultNormalizedValue = */ 0.0, /* .defaultNormalizedValue = */ 0.0,

View File

@ -11,6 +11,7 @@ ifeq ($(TEMPLATE), lv2)
endif endif
ifeq ($(TEMPLATE), vst3) ifeq ($(TEMPLATE), vst3)
RUTEX_DIR := ../../../rutex
CFLAGS_EXTRA := -I../../../vst3_c_api $(shell pkg-config --cflags pugl-cairo-0) CFLAGS_EXTRA := -I../../../vst3_c_api $(shell pkg-config --cflags pugl-cairo-0)
LDFLAGS_EXTRA := $(shell pkg-config --libs pugl-cairo-0 pugl-0 cairo) -Wl,-rpath,$(shell pkg-config --variable=libdir pugl-cairo-0),-rpath,$(shell pkg-config --variable=libdir pugl-0),-rpath,$(shell pkg-config --variable=libdir cairo) LDFLAGS_EXTRA := $(shell pkg-config --libs pugl-cairo-0 pugl-0 cairo) -Wl,-rpath,$(shell pkg-config --variable=libdir pugl-cairo-0),-rpath,$(shell pkg-config --variable=libdir pugl-0),-rpath,$(shell pkg-config --variable=libdir cairo)
endif endif