Best way to handle assets ? #484
Replies: 11 comments
-
that seems more of a general question on using cmake, no? |
Beta Was this translation helpful? Give feedback.
-
not really because while in cmake i'd just set the cmake archive output and cmake binary output variables but dpf seems to output to specific directories depending on whether it's lv2, vst3 etc so i'd need to rely on these dpf specific variables to output to the right directory |
Beta Was this translation helpful? Give feedback.
-
for that the develop branch has a dedicated function to let you know where the resources would be at runtime. |
Beta Was this translation helpful? Give feedback.
-
from what i can see for each target it sets a target property specifying the library output directory directly for instance for LV2 set_target_properties("${NAME}-lv2-ui" PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/${NAME}.lv2/$<0:>"
ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/obj/lv2/$<0:>"
OUTPUT_NAME "${NAME}_ui"
PREFIX "")
endif() the issue I see is that because of it we'd need to manually read the properties of the generated target names |
Beta Was this translation helpful? Give feedback.
-
I'm referring to copy the asset folder to the folder of the vst, lv2 etc at build time, not locating the folder at runtime |
Beta Was this translation helpful? Give feedback.
-
Nice, I didn't notice DPF supported the resource bundles yet. @falkTX, unrelated: about the fixed resource directories |
Beta Was this translation helpful? Give feedback.
-
I am not super keen on changing the binary location and bundle structure at this point tbh.. |
Beta Was this translation helpful? Give feedback.
-
also I tried getBundlePath but it returns null for vst3 |
Beta Was this translation helpful? Give feedback.
-
I guess i'll rely on res2c instead atm to convert the resources to cpp and directly bundle them in the executable |
Beta Was this translation helpful? Give feedback.
-
there should be some assertion fail if that is the case. vst3 and lv2 are required by design to have a bundle |
Beta Was this translation helpful? Give feedback.
-
that's kinda what i find weird since i just build it normally using cmake with dpf_add_plugin |
Beta Was this translation helpful? Give feedback.
-
Hi, I am working on a vst3 and LV2 plugin using DPF and it is working as intended however I would like to start working on making a user interface for it.
I use cmake to handle the build of my project using dpf_add_plugin and I am not sure about how I would indicate the directory holding the assets of the plugin so that it always gets bundled with it
Beta Was this translation helpful? Give feedback.
All reactions