From 17ccac659e82c058583a6966369a03ad631a9108 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 13 Oct 2014 10:38:30 +0100 Subject: [PATCH] Move 2 functions to common file --- source/backend/CarlaHostCommon.cpp | 32 ++++++++++++++++++++++++++++++ source/backend/CarlaStandalone.cpp | 32 ------------------------------ 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/source/backend/CarlaHostCommon.cpp b/source/backend/CarlaHostCommon.cpp index 5b3259d83..c7ed39936 100644 --- a/source/backend/CarlaHostCommon.cpp +++ b/source/backend/CarlaHostCommon.cpp @@ -166,3 +166,35 @@ const char* carla_get_supported_file_extensions() } // ------------------------------------------------------------------------------------------------------------------- + +const char* carla_get_library_filename() +{ + carla_debug("carla_get_library_filename()"); + + static CarlaString ret; + + if (ret.isEmpty()) + { + using juce::File; + ret = File(File::getSpecialLocation(File::currentExecutableFile)).getFullPathName().toRawUTF8(); + } + + return ret; +} + +const char* carla_get_library_folder() +{ + carla_debug("carla_get_library_folder()"); + + static CarlaString ret; + + if (ret.isEmpty()) + { + using juce::File; + ret = File(File::getSpecialLocation(File::currentExecutableFile).getParentDirectory()).getFullPathName().toRawUTF8(); + } + + return ret; +} + +// ------------------------------------------------------------------------------------------------------------------- diff --git a/source/backend/CarlaStandalone.cpp b/source/backend/CarlaStandalone.cpp index 63a42c1b2..f56dd447f 100644 --- a/source/backend/CarlaStandalone.cpp +++ b/source/backend/CarlaStandalone.cpp @@ -2301,38 +2301,6 @@ const char* carla_get_host_osc_url_udp() // ------------------------------------------------------------------------------------------------------------------- -const char* carla_get_library_filename() -{ - carla_debug("carla_get_library_filename()"); - - static CarlaString ret; - - if (ret.isEmpty()) - { - using juce::File; - ret = File(File::getSpecialLocation(File::currentExecutableFile)).getFullPathName().toRawUTF8(); - } - - return ret; -} - -const char* carla_get_library_folder() -{ - carla_debug("carla_get_library_folder()"); - - static CarlaString ret; - - if (ret.isEmpty()) - { - using juce::File; - ret = File(File::getSpecialLocation(File::currentExecutableFile).getParentDirectory()).getFullPathName().toRawUTF8(); - } - - return ret; -} - -// ------------------------------------------------------------------------------------------------------------------- - #include "CarlaHostCommon.cpp" #include "CarlaPluginUI.cpp" #include "CarlaDssiUtils.cpp"