diff options
author | Hanspeter Portner <dev@open-music-kontrollers.ch> | 2018-02-19 19:26:24 +0100 |
---|---|---|
committer | Hanspeter Portner <dev@open-music-kontrollers.ch> | 2018-02-19 19:26:24 +0100 |
commit | 6914ad1153c561388be56e0d83646f16cf65369f (patch) | |
tree | 5dab50791e07f72fe50e36243347cfd98f8852e3 | |
parent | 083599c6e2bac71feff7320a1b23475e33afadbb (diff) | |
download | synthpod-6914ad1153c561388be56e0d83646f16cf65369f.tar.xz |
nk: install data into LV2 dir.
-rw-r--r-- | CMakeLists.txt | 4 | ||||
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | data/CMakeLists.txt | 23 | ||||
-rw-r--r-- | plugins/CMakeLists.txt | 25 | ||||
-rw-r--r-- | plugins/synthpod_common_nk.c | 43 |
5 files changed, 46 insertions, 51 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ad75ea3c..2195bd68 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,9 +46,6 @@ endif() set(SYNTHPOD_BIN_DIR "bin") add_definitions("-DSYNTHPOD_BIN_DIR=\"${CMAKE_INSTALL_PREFIX}/${SYNTHPOD_BIN_DIR}/\"") -set(SYNTHPOD_DATA_DIR "share/synthpod") -add_definitions("-DSYNTHPOD_DATA_DIR=\"${CMAKE_INSTALL_PREFIX}/${SYNTHPOD_DATA_DIR}/\"") - set(SYNTHPOD_BUNDLE_DIR "lib/synthpod/lv2") add_definitions("-DSYNTHPOD_BUNDLE_DIR=\"${CMAKE_INSTALL_PREFIX}/${SYNTHPOD_BUNDLE_DIR}/\"") @@ -232,6 +229,5 @@ set(SANDBOX_LIBS add_subdirectory(app) add_subdirectory(bin) add_subdirectory(bundle) -add_subdirectory(data) add_subdirectory(plugins) add_subdirectory(sandbox_ui.lv2) @@ -1 +1 @@ -0.1.5557 +0.1.5559 diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt deleted file mode 100644 index cefd5465..00000000 --- a/data/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pix/audio.png DESTINATION ${SYNTHPOD_DATA_DIR}) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pix/control.png DESTINATION ${SYNTHPOD_DATA_DIR}) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pix/cv.png DESTINATION ${SYNTHPOD_DATA_DIR}) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pix/event.png DESTINATION ${SYNTHPOD_DATA_DIR}) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pix/event_inverted.png DESTINATION ${SYNTHPOD_DATA_DIR}) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pix/atom.png DESTINATION ${SYNTHPOD_DATA_DIR}) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pix/atom_inverted.png DESTINATION ${SYNTHPOD_DATA_DIR}) - -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pix/midi.png DESTINATION ${SYNTHPOD_DATA_DIR}) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pix/osc.png DESTINATION ${SYNTHPOD_DATA_DIR}) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pix/time.png DESTINATION ${SYNTHPOD_DATA_DIR}) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pix/patch.png DESTINATION ${SYNTHPOD_DATA_DIR}) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pix/xpress.png DESTINATION ${SYNTHPOD_DATA_DIR}) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pix/automaton.png DESTINATION ${SYNTHPOD_DATA_DIR}) - -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/png/plus.png DESTINATION ${SYNTHPOD_DATA_DIR}) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/png/download.png DESTINATION ${SYNTHPOD_DATA_DIR}) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/png/cancel.png DESTINATION ${SYNTHPOD_DATA_DIR}) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/png/house.png DESTINATION ${SYNTHPOD_DATA_DIR}) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/png/layers.png DESTINATION ${SYNTHPOD_DATA_DIR}) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/png/user.png DESTINATION ${SYNTHPOD_DATA_DIR}) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/png/settings.png DESTINATION ${SYNTHPOD_DATA_DIR}) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/png/menu.png DESTINATION ${SYNTHPOD_DATA_DIR}) diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 7ac9e30a..e044ca2c 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -101,6 +101,31 @@ if(BUILD_UI) # font install(FILES ${PROJECT_SOURCE_DIR}/data/font/Abel-Regular.ttf DESTINATION ${SYNTHPOD_PLUGIN_DIR}) + + # icons + install(FILES ${PROJECT_SOURCE_DIR}/data/pix/audio.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) + install(FILES ${PROJECT_SOURCE_DIR}/data/pix/control.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) + install(FILES ${PROJECT_SOURCE_DIR}/data/pix/cv.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) + install(FILES ${PROJECT_SOURCE_DIR}/data/pix/event.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) + install(FILES ${PROJECT_SOURCE_DIR}/data/pix/event_inverted.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) + install(FILES ${PROJECT_SOURCE_DIR}/data/pix/atom.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) + install(FILES ${PROJECT_SOURCE_DIR}/data/pix/atom_inverted.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) + + install(FILES ${PROJECT_SOURCE_DIR}/data/pix/midi.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) + install(FILES ${PROJECT_SOURCE_DIR}/data/pix/osc.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) + install(FILES ${PROJECT_SOURCE_DIR}/data/pix/time.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) + install(FILES ${PROJECT_SOURCE_DIR}/data/pix/patch.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) + install(FILES ${PROJECT_SOURCE_DIR}/data/pix/xpress.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) + install(FILES ${PROJECT_SOURCE_DIR}/data/pix/automaton.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) + + install(FILES ${PROJECT_SOURCE_DIR}/data/png/plus.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) + install(FILES ${PROJECT_SOURCE_DIR}/data/png/download.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) + install(FILES ${PROJECT_SOURCE_DIR}/data/png/cancel.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) + install(FILES ${PROJECT_SOURCE_DIR}/data/png/house.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) + install(FILES ${PROJECT_SOURCE_DIR}/data/png/layers.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) + install(FILES ${PROJECT_SOURCE_DIR}/data/png/user.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) + install(FILES ${PROJECT_SOURCE_DIR}/data/png/settings.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) + install(FILES ${PROJECT_SOURCE_DIR}/data/png/menu.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) else() set(UI_WRAP "#") endif() diff --git a/plugins/synthpod_common_nk.c b/plugins/synthpod_common_nk.c index 8378e430..9f40d209 100644 --- a/plugins/synthpod_common_nk.c +++ b/plugins/synthpod_common_nk.c @@ -363,8 +363,6 @@ struct _plughandle_t { LV2UI_Write_Function writer; LV2UI_Controller controller; - const char *bundle_path; - nk_pugl_window_t win; mod_t *module_selector; @@ -7265,12 +7263,11 @@ _expose(struct nk_context *ctx, struct nk_rect wbounds, void *data) } static struct nk_image -_icon_load(plughandle_t *handle, const char *file) +_icon_load(plughandle_t *handle, const char *bundle_path, const char *file) { struct nk_image img; char *path; - //if(asprintf(&path, "%s%s", handle->bundle_path, file) != -1) - if(asprintf(&path, "%s%s", SYNTHPOD_DATA_DIR, file) != -1) //FIXME + if(asprintf(&path, "%s%s", bundle_path, file) != -1) { img = nk_pugl_icon_load(&handle->win, path); free(path); @@ -7431,24 +7428,24 @@ instantiate(const LV2UI_Descriptor *descriptor, const char *plugin_uri, handle->type = PROPERTY_TYPE_AUDIO; //FIXME make configurable - handle->icon.atom = _icon_load(handle, "atom.png"); - handle->icon.audio = _icon_load(handle, "audio.png"); - handle->icon.control = _icon_load(handle, "control.png"); - handle->icon.cv = _icon_load(handle, "cv.png"); - handle->icon.midi = _icon_load(handle, "midi.png"); - handle->icon.osc = _icon_load(handle, "osc.png"); - handle->icon.patch = _icon_load(handle, "patch.png"); - handle->icon.time = _icon_load(handle, "time.png"); - handle->icon.xpress = _icon_load(handle, "xpress.png"); - handle->icon.automaton = _icon_load(handle, "automaton.png"); - handle->icon.plus = _icon_load(handle, "plus.png"); - handle->icon.download = _icon_load(handle, "download.png"); - handle->icon.cancel = _icon_load(handle, "cancel.png"); - handle->icon.house = _icon_load(handle, "house.png"); - handle->icon.layers = _icon_load(handle, "layers.png"); - handle->icon.user = _icon_load(handle, "user.png"); - handle->icon.settings = _icon_load(handle, "settings.png"); - handle->icon.menu = _icon_load(handle, "menu.png"); + handle->icon.atom = _icon_load(handle, bundle_path, "atom.png"); + handle->icon.audio = _icon_load(handle, bundle_path, "audio.png"); + handle->icon.control = _icon_load(handle, bundle_path, "control.png"); + handle->icon.cv = _icon_load(handle, bundle_path, "cv.png"); + handle->icon.midi = _icon_load(handle, bundle_path, "midi.png"); + handle->icon.osc = _icon_load(handle, bundle_path, "osc.png"); + handle->icon.patch = _icon_load(handle, bundle_path, "patch.png"); + handle->icon.time = _icon_load(handle, bundle_path, "time.png"); + handle->icon.xpress = _icon_load(handle, bundle_path, "xpress.png"); + handle->icon.automaton = _icon_load(handle, bundle_path, "automaton.png"); + handle->icon.plus = _icon_load(handle, bundle_path, "plus.png"); + handle->icon.download = _icon_load(handle, bundle_path, "download.png"); + handle->icon.cancel = _icon_load(handle, bundle_path, "cancel.png"); + handle->icon.house = _icon_load(handle, bundle_path, "house.png"); + handle->icon.layers = _icon_load(handle, bundle_path, "layers.png"); + handle->icon.user = _icon_load(handle, bundle_path, "user.png"); + handle->icon.settings = _icon_load(handle, bundle_path, "settings.png"); + handle->icon.menu = _icon_load(handle, bundle_path, "menu.png"); handle->show_sidebar = 1; handle->show_bottombar = 1; |