Replace svgs with dummy files for MOD builds; Fix last commit
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
f3704490f6
commit
62f5a80f72
4 changed files with 71 additions and 8 deletions
|
@ -854,7 +854,7 @@ RESOURCE_FILES += MindMeldModular/res/ShapeMaster/CommunityShapes
|
|||
RESOURCE_FILES += MindMeldModular/res/ShapeMaster/MindMeldPresets
|
||||
RESOURCE_FILES += MindMeldModular/res/ShapeMaster/MindMeldShapes
|
||||
|
||||
# MOD builds only have FX variant for now
|
||||
# MOD builds only have LV2 FX variant for now
|
||||
ifeq ($(MOD_BUILD),true)
|
||||
LV2_RESOURCES = $(PLUGIN_LIST:%=../bin/CardinalFX.lv2/resources/PluginManifests/%.json)
|
||||
LV2_RESOURCES += $(RESOURCE_FILES:%=../bin/CardinalFX.lv2/resources/%)
|
||||
|
@ -865,7 +865,6 @@ LV2_RESOURCES += $(PLUGIN_LIST:%=../bin/CardinalSynth.lv2/resources/PluginManife
|
|||
LV2_RESOURCES += $(RESOURCE_FILES:%=../bin/Cardinal.lv2/resources/%)
|
||||
LV2_RESOURCES += $(RESOURCE_FILES:%=../bin/CardinalFX.lv2/resources/%)
|
||||
LV2_RESOURCES += $(RESOURCE_FILES:%=../bin/CardinalSynth.lv2/resources/%)
|
||||
endif
|
||||
|
||||
ifeq ($(MACOS),true)
|
||||
VST2_RESOURCES = $(PLUGIN_LIST:%=../bin/CardinalFX.vst/Contents/Resources/PluginManifests/%.json)
|
||||
|
@ -885,6 +884,7 @@ VST3_RESOURCES += $(PLUGIN_LIST:%=../bin/CardinalSynth.vst3/Contents/Resources/P
|
|||
VST3_RESOURCES += $(RESOURCE_FILES:%=../bin/Cardinal.vst3/Contents/Resources/%)
|
||||
VST3_RESOURCES += $(RESOURCE_FILES:%=../bin/CardinalFX.vst3/Contents/Resources/%)
|
||||
VST3_RESOURCES += $(RESOURCE_FILES:%=../bin/CardinalSynth.vst3/Contents/Resources/%)
|
||||
endif
|
||||
|
||||
resources: $(LV2_RESOURCES) $(VST2_RESOURCES) $(VST3_RESOURCES)
|
||||
|
||||
|
@ -900,6 +900,12 @@ resources: $(LV2_RESOURCES) $(VST2_RESOURCES) $(VST3_RESOURCES)
|
|||
-@mkdir -p "$(shell dirname $@)"
|
||||
$(SILENT)ln -sf $(abspath $<) $@
|
||||
|
||||
ifeq ($(MOD_BUILD),true)
|
||||
../bin/CardinalFX.lv2/resources/%.svg: %.svg ../deps/svg2stub.py
|
||||
-@mkdir -p "$(shell dirname $@)"
|
||||
$(SILENT)python3 ../deps/svg2stub.py $< $@
|
||||
endif
|
||||
|
||||
../bin/Cardinal.lv2/resources/PluginManifests/%.json: %/plugin.json
|
||||
-@mkdir -p "$(shell dirname $@)"
|
||||
$(SILENT)ln -sf $(abspath $<) $@
|
||||
|
@ -987,10 +993,10 @@ $(TARGET): $(PLUGIN_OBJS)
|
|||
$(SILENT)rm -f $@
|
||||
$(SILENT)$(AR) crs $@ $^
|
||||
|
||||
$(BUILD_DIR)/%.bin.c: % res2c.py
|
||||
$(BUILD_DIR)/%.bin.c: % ../deps/res2c.py
|
||||
-@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)"
|
||||
@echo "Generating $*.bin.c"
|
||||
$(SILENT)python3 ./res2c.py $< > $@
|
||||
$(SILENT)python3 ../deps/res2c.py $< > $@
|
||||
|
||||
$(BUILD_DIR)/%.bin.o: $(BUILD_DIR)/%.bin.c
|
||||
-@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)"
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# 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
|
||||
# or without fee is hereby granted, provided that the above copyright notice and this
|
||||
# permission notice appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
|
||||
# TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
|
||||
# NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
# DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
|
||||
# IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||
# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
# -----------------------------------------------------
|
||||
|
||||
def res2c(filename):
|
||||
resname = "src_" + os.path.basename(filename.replace(".","_"))
|
||||
fhandle = open(filename, 'rb')
|
||||
resdata = fhandle.read()
|
||||
|
||||
print("const unsigned char %s[] = {\n" % resname)
|
||||
for data in resdata:
|
||||
print(" %3u," % data)
|
||||
print("};\n")
|
||||
|
||||
print("const unsigned int %s_len = %d;\n" % (resname, fhandle.tell()))
|
||||
|
||||
# -----------------------------------------------------
|
||||
|
||||
if __name__ == '__main__':
|
||||
if len(sys.argv) != 2:
|
||||
print("Usage: %s <filename>" % sys.argv[0])
|
||||
quit()
|
||||
|
||||
filename = sys.argv[1]
|
||||
|
||||
if not os.path.exists(filename):
|
||||
print("Folder '%s' does not exist" % filename)
|
||||
quit()
|
||||
|
||||
# dump code now
|
||||
res2c(filename)
|
Loading…
Add table
Add a link
Reference in a new issue