Disable dev mode, use source dir as system dir; Fix some builds
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
beb0965051
commit
a482ee7b73
5 changed files with 64 additions and 33 deletions
10
Makefile
10
Makefile
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
include dpf/Makefile.base.mk
|
include dpf/Makefile.base.mk
|
||||||
|
|
||||||
all: dgl plugins gen resources
|
all: dgl plugins gen
|
||||||
|
|
||||||
# --------------------------------------------------------------
|
# --------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -17,22 +17,16 @@ plugins: dgl
|
||||||
$(MAKE) all -C plugins/Cardinal
|
$(MAKE) all -C plugins/Cardinal
|
||||||
|
|
||||||
ifneq ($(CROSS_COMPILING),true)
|
ifneq ($(CROSS_COMPILING),true)
|
||||||
gen: plugins resources dpf/utils/lv2_ttl_generator
|
gen: plugins dpf/utils/lv2_ttl_generator
|
||||||
@$(CURDIR)/dpf/utils/generate-ttl.sh
|
@$(CURDIR)/dpf/utils/generate-ttl.sh
|
||||||
ifeq ($(MACOS),true)
|
ifeq ($(MACOS),true)
|
||||||
@$(CURDIR)/dpf/utils/generate-vst-bundles.sh
|
@$(CURDIR)/dpf/utils/generate-vst-bundles.sh
|
||||||
endif
|
endif
|
||||||
|
|
||||||
resources: bin/Cardinal.lv2/res
|
|
||||||
|
|
||||||
bin/Cardinal.lv2/res: plugins
|
|
||||||
ln -sf $(CURDIR)/plugins/Cardinal/Rack/res bin/Cardinal.lv2/res
|
|
||||||
|
|
||||||
dpf/utils/lv2_ttl_generator:
|
dpf/utils/lv2_ttl_generator:
|
||||||
$(MAKE) -C dpf/utils/lv2-ttl-generator
|
$(MAKE) -C dpf/utils/lv2-ttl-generator
|
||||||
else
|
else
|
||||||
gen:
|
gen:
|
||||||
resources:
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# --------------------------------------------------------------
|
# --------------------------------------------------------------
|
||||||
|
|
2
dpf
2
dpf
|
@ -1 +1 @@
|
||||||
Subproject commit a1322bc0c5814633ec3c82080540a2657f4f4486
|
Subproject commit 65eb8c098d6ed2c3407b761e8b967f82e0a7b8a7
|
|
@ -58,13 +58,18 @@ struct Initializer {
|
||||||
{
|
{
|
||||||
using namespace rack;
|
using namespace rack;
|
||||||
|
|
||||||
settings::devMode = true;
|
settings::autoCheckUpdates = false;
|
||||||
settings::autosaveInterval = 0;
|
settings::autosaveInterval = 0;
|
||||||
|
settings::discordUpdateActivity = false;
|
||||||
|
settings::isPlugin = true;
|
||||||
system::init();
|
system::init();
|
||||||
asset::init();
|
asset::init();
|
||||||
logger::init();
|
logger::init();
|
||||||
random::init();
|
random::init();
|
||||||
|
|
||||||
|
// Make system dir point to source code location. It is good enough for now
|
||||||
|
asset::systemDir = CARDINAL_PLUGIN_SOURCE_DIR DISTRHO_OS_SEP_STR "Rack";
|
||||||
|
|
||||||
// Log environment
|
// Log environment
|
||||||
INFO("%s %s v%s", APP_NAME.c_str(), APP_EDITION.c_str(), APP_VERSION.c_str());
|
INFO("%s %s v%s", APP_NAME.c_str(), APP_EDITION.c_str(), APP_VERSION.c_str());
|
||||||
INFO("%s", system::getOperatingSystemInfo().c_str());
|
INFO("%s", system::getOperatingSystemInfo().c_str());
|
||||||
|
@ -107,20 +112,20 @@ struct Initializer {
|
||||||
keyboard::init();
|
keyboard::init();
|
||||||
plugin::init();
|
plugin::init();
|
||||||
library::init();
|
library::init();
|
||||||
ui::init();
|
ui::init();
|
||||||
}
|
}
|
||||||
|
|
||||||
~Initializer()
|
~Initializer()
|
||||||
{
|
{
|
||||||
using namespace rack;
|
using namespace rack;
|
||||||
|
|
||||||
ui::destroy();
|
ui::destroy();
|
||||||
library::destroy();
|
library::destroy();
|
||||||
midi::destroy();
|
midi::destroy();
|
||||||
audio::destroy();
|
audio::destroy();
|
||||||
plugin::destroy();
|
plugin::destroy();
|
||||||
INFO("Destroying logger");
|
INFO("Destroying logger");
|
||||||
logger::destroy();
|
logger::destroy();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -144,7 +149,7 @@ class CardinalPlugin : public Plugin
|
||||||
|
|
||||||
~ScopedContext()
|
~ScopedContext()
|
||||||
{
|
{
|
||||||
rack::contextSet(nullptr);
|
rack::contextSet(nullptr);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -161,6 +166,7 @@ public:
|
||||||
fContext->scene = new rack::app::Scene;
|
fContext->scene = new rack::app::Scene;
|
||||||
fContext->event->rootWidget = fContext->scene;
|
fContext->event->rootWidget = fContext->scene;
|
||||||
fContext->patch = new rack::patch::Manager;
|
fContext->patch = new rack::patch::Manager;
|
||||||
|
fContext->patch->autosavePath = "/OBVIOUSLY-NOT-VALID-PATH/";
|
||||||
fContext->engine->startFallbackThread();
|
fContext->engine->startFallbackThread();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ class CardinalUI : public UI
|
||||||
|
|
||||||
~ScopedContext()
|
~ScopedContext()
|
||||||
{
|
{
|
||||||
rack::contextSet(nullptr);
|
rack::contextSet(nullptr);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ public:
|
||||||
{
|
{
|
||||||
const ScopedContext sc(this);
|
const ScopedContext sc(this);
|
||||||
|
|
||||||
fContext->window->step();
|
fContext->window->step();
|
||||||
}
|
}
|
||||||
|
|
||||||
void uiIdle() override
|
void uiIdle() override
|
||||||
|
|
|
@ -24,6 +24,7 @@ FILES_UI = \
|
||||||
# Import base definitions
|
# Import base definitions
|
||||||
|
|
||||||
USE_NANOVG_FBO = true
|
USE_NANOVG_FBO = true
|
||||||
|
USE_RGBA = true
|
||||||
include ../../dpf/Makefile.base.mk
|
include ../../dpf/Makefile.base.mk
|
||||||
|
|
||||||
# --------------------------------------------------------------
|
# --------------------------------------------------------------
|
||||||
|
@ -65,16 +66,40 @@ EXTRA_LIBS += Rack/dep/lib/libzstd.a
|
||||||
|
|
||||||
include ../../dpf/Makefile.plugins.mk
|
include ../../dpf/Makefile.plugins.mk
|
||||||
|
|
||||||
|
# --------------------------------------------------------------
|
||||||
|
# Fix up cmake for windows cross-compilation
|
||||||
|
|
||||||
ifeq ($(WINDOWS),true)
|
ifeq ($(WINDOWS),true)
|
||||||
CMAKE := cmake -G 'Unix Makefiles' -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_RC_COMPILER=$(subst gcc,windres,$(CC))
|
CMAKE := cmake -G 'Unix Makefiles' -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_RC_COMPILER=$(subst gcc,windres,$(CC))
|
||||||
else
|
else
|
||||||
CMAKE := cmake
|
CMAKE := cmake
|
||||||
endif
|
endif
|
||||||
|
|
||||||
BUILD_C_FLAGS += -std=gnu11
|
CMAKE += -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_PREFIX='$(abspath Rack/dep)'
|
||||||
|
|
||||||
|
# --------------------------------------------------------------
|
||||||
|
# override VCV arch.mk stuff so we can build more architectures
|
||||||
|
|
||||||
|
ifeq ($(CPU_ARM),true)
|
||||||
|
ARCH_NAME = arm
|
||||||
|
MACHINE = i686-bring-forth-the-rack
|
||||||
|
else ifeq ($(CPU_ARM64),true)
|
||||||
|
ARCH_NAME = arm64
|
||||||
|
MACHINE = x86_64-bring-forth-the-rack
|
||||||
|
else ifeq ($(CPU_AARCH64),true)
|
||||||
|
ARCH_NAME = aarch64
|
||||||
|
MACHINE = x86_64-bring-forth-the-rack
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(MACOS_OR_WINDOWS),true)
|
||||||
|
MACHINE += -linux
|
||||||
|
endif
|
||||||
|
|
||||||
|
# --------------------------------------------------------------
|
||||||
|
# VCV internal dependencies target
|
||||||
|
|
||||||
Rack/dep/lib/%.a:
|
Rack/dep/lib/%.a:
|
||||||
$(MAKE) CMAKE="$(CMAKE) -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_PREFIX='$(abspath Rack/dep)'" -C Rack/dep lib/$*.a
|
$(MAKE) ARCH_NAME=$(ARCH_NAME) CMAKE="$(CMAKE)" MACHINE=$(MACHINE) -C Rack/dep lib/$*.a
|
||||||
|
|
||||||
Rack/dep/lib/libarchive.a: Rack/dep/lib/libzstd.a
|
Rack/dep/lib/libarchive.a: Rack/dep/lib/libzstd.a
|
||||||
|
|
||||||
|
@ -83,7 +108,25 @@ Rack/dep/lib/libarchive_static.a: Rack/dep/lib/libzstd.a
|
||||||
# --------------------------------------------------------------
|
# --------------------------------------------------------------
|
||||||
# Extra flags for VCV stuff
|
# Extra flags for VCV stuff
|
||||||
|
|
||||||
BASE_FLAGS += -D_APP_VERSION=2.git.0
|
ifeq ($(MACOS),true)
|
||||||
|
BASE_FLAGS += -DARCH_MAC
|
||||||
|
else ifeq ($(WINDOWS),true)
|
||||||
|
BASE_FLAGS += -DARCH_WIN
|
||||||
|
else
|
||||||
|
BASE_FLAGS += -DARCH_LIN
|
||||||
|
endif
|
||||||
|
|
||||||
|
BUILD_C_FLAGS += -std=gnu11
|
||||||
|
|
||||||
|
# temporary macro just to get the ball rolling
|
||||||
|
ifeq ($(EXE_WRAPPER),wine)
|
||||||
|
SOURCE_DIR = Z:$(subst /,\\,$(CURDIR))
|
||||||
|
else
|
||||||
|
SOURCE_DIR = $(CURDIR)
|
||||||
|
endif
|
||||||
|
BUILD_CXX_FLAGS += -DCARDINAL_PLUGIN_SOURCE_DIR='"$(SOURCE_DIR)"'
|
||||||
|
|
||||||
|
BASE_FLAGS += -D_APP_VERSION=Cardinal
|
||||||
BASE_FLAGS += -I$(DPF_PATH)/dgl/src/nanovg
|
BASE_FLAGS += -I$(DPF_PATH)/dgl/src/nanovg
|
||||||
BASE_FLAGS += -IRack/include
|
BASE_FLAGS += -IRack/include
|
||||||
BASE_FLAGS += -IRack/dep/include
|
BASE_FLAGS += -IRack/dep/include
|
||||||
|
@ -94,20 +137,13 @@ BASE_FLAGS += -IRack/dep/nanosvg/src
|
||||||
BASE_FLAGS += -IRack/dep/osdialog
|
BASE_FLAGS += -IRack/dep/osdialog
|
||||||
BASE_FLAGS += -IRack/dep/oui-blendish
|
BASE_FLAGS += -IRack/dep/oui-blendish
|
||||||
BASE_FLAGS += -IRack/dep/pffft
|
BASE_FLAGS += -IRack/dep/pffft
|
||||||
|
BASE_FLAGS += -pthread
|
||||||
|
|
||||||
ifeq ($(WINDOWS),true)
|
ifeq ($(WINDOWS),true)
|
||||||
BASE_FLAGS += -Imingw-compat
|
BASE_FLAGS += -Imingw-compat
|
||||||
BUILD_CXX_FLAGS += -Imingw-std-threads
|
BUILD_CXX_FLAGS += -Imingw-std-threads
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(MACOS),true)
|
|
||||||
BASE_FLAGS += -DARCH_MAC
|
|
||||||
else ifeq ($(WINDOWS),true)
|
|
||||||
BASE_FLAGS += -DARCH_WIN
|
|
||||||
else
|
|
||||||
BASE_FLAGS += -DARCH_LIN
|
|
||||||
endif
|
|
||||||
|
|
||||||
# FIXME lots of warnings from VCV side
|
# FIXME lots of warnings from VCV side
|
||||||
BASE_FLAGS += -Wno-unused-parameter
|
BASE_FLAGS += -Wno-unused-parameter
|
||||||
BASE_FLAGS += -Wno-unused-variable
|
BASE_FLAGS += -Wno-unused-variable
|
||||||
|
@ -123,11 +159,6 @@ else ifeq ($(WINDOWS),true)
|
||||||
LINK_FLAGS += -ldbghelp -lshlwapi
|
LINK_FLAGS += -ldbghelp -lshlwapi
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# LINK_FLAGS += $(OPENGL_LIBS)
|
|
||||||
|
|
||||||
# TODO needed on windows? need to check
|
|
||||||
LINK_FLAGS += -lpthread
|
|
||||||
|
|
||||||
# --------------------------------------------------------------
|
# --------------------------------------------------------------
|
||||||
# Enable all possible plugin types
|
# Enable all possible plugin types
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue