diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c62a18e6fb..1ba7b22e874 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -166,14 +166,14 @@ add_subdirectory(libs/sqlite-3.23.3) add_subdirectory(libs/LuaJitLib) juce_add_binary_data(surge-shared-binary - NAMESPACE SurgeCoreBinary - HEADER_NAME SurgeCoreBinary.h + NAMESPACE SurgeSharedBinary + HEADER_NAME SurgeSharedBinary.h SOURCES - resources/data/configuration.xml - resources/surge-xt/README_UserArea.txt - resources/surge-xt/memoryWavetable.wt - resources/data/windows.wt - resources/data/paramdocumentation.xml) + resources/surge-shared/configuration.xml + resources/surge-shared/README_UserArea.txt + resources/surge-shared/memoryWavetable.wt + resources/surge-shared/windows.wt + resources/surge-shared/paramdocumentation.xml) target_link_libraries(surge-shared PUBLIC luajit-5.1 @@ -890,6 +890,9 @@ if( BUILD_SURGE_XT ) ) juce_add_binary_data( surge-xt-binary + NAMESPACE SurgeXTBinary + HEADER_NAME SurgeXTBinary.h + SOURCES ${SURGE_SYNTH_JUCE_RESOURCES_GLOB} ) set_target_properties(surge-xt-binary PROPERTIES diff --git a/resources/data/patchbrowser/patchbrowser_init.sql b/resources/data/patchbrowser/patchbrowser_init.sql deleted file mode 100644 index 142a37045b8..00000000000 --- a/resources/data/patchbrowser/patchbrowser_init.sql +++ /dev/null @@ -1,33 +0,0 @@ --- Initialize the SQLite DB for the Patch Browser - -CREATE TABLE surge_metadata ( - schema_version integer -) - -CREATE TABLE patches ( - id integer primary key, - filename varchar(1024), - patchname varchar( 256 ), - author varchar(256), - - comment varchar(4096), - - factoryThirdPartyOrUser integer -); - -CREATE TABLE patchtag ( - id integer primary key, - patchid integer, - tag integer -); - -CREATE TABLE tags ( - id integer primary key, - tagcagetory integer, - tag varchar(256) -); - -CREATE TABLE tagcategory ( - id integer primary key, - tagcategory varchar( 256 ) -); diff --git a/resources/surge-xt/README_UserArea.txt b/resources/surge-shared/README_UserArea.txt similarity index 100% rename from resources/surge-xt/README_UserArea.txt rename to resources/surge-shared/README_UserArea.txt diff --git a/resources/data/configuration.xml b/resources/surge-shared/configuration.xml similarity index 100% rename from resources/data/configuration.xml rename to resources/surge-shared/configuration.xml diff --git a/resources/surge-xt/memoryWavetable.wt b/resources/surge-shared/memoryWavetable.wt similarity index 100% rename from resources/surge-xt/memoryWavetable.wt rename to resources/surge-shared/memoryWavetable.wt diff --git a/resources/data/paramdocumentation.xml b/resources/surge-shared/paramdocumentation.xml similarity index 100% rename from resources/data/paramdocumentation.xml rename to resources/surge-shared/paramdocumentation.xml diff --git a/resources/data/windows.wt b/resources/surge-shared/windows.wt similarity index 100% rename from resources/data/windows.wt rename to resources/surge-shared/windows.wt diff --git a/src/common/SurgeStorage.cpp b/src/common/SurgeStorage.cpp index 510a8ce909a..ada04d242e9 100644 --- a/src/common/SurgeStorage.cpp +++ b/src/common/SurgeStorage.cpp @@ -22,7 +22,7 @@ #include #include #include "UserDefaults.h" -#include "SurgeCoreBinary.h" +#include "SurgeSharedBinary.h" #if MAC #include @@ -485,9 +485,9 @@ SurgeStorage::SurgeStorage(std::string suppliedDataPath) : otherscene_clients(0) */ // TIXML requires a newline at end. - auto cxmlData = - std::string(SurgeCoreBinary::configuration_xml, SurgeCoreBinary::configuration_xmlSize) + - "\n"; + auto cxmlData = std::string(SurgeSharedBinary::configuration_xml, + SurgeSharedBinary::configuration_xmlSize) + + "\n"; if (!snapshotloader.Parse(cxmlData.c_str())) { reportError("Cannot parse 'configuration.xml' in path '" + datapath + @@ -514,8 +514,8 @@ SurgeStorage::SurgeStorage(std::string suppliedDataPath) : otherscene_clients(0) // WindowWT is a Wavetable which now has a constructor so don't do this // memset(&WindowWT, 0, sizeof(WindowWT)); - if (loadWtAndPatch && - !load_wt_wt_mem(SurgeCoreBinary::windows_wt, SurgeCoreBinary::windows_wtSize, &WindowWT)) + if (loadWtAndPatch && !load_wt_wt_mem(SurgeSharedBinary::windows_wt, + SurgeSharedBinary::windows_wtSize, &WindowWT)) { WindowWT.size = 0; std::ostringstream oss; @@ -540,8 +540,8 @@ SurgeStorage::SurgeStorage(std::string suppliedDataPath) : otherscene_clients(0) // Load the XML DocStrings if we are loading startup data if (loadWtAndPatch) { - auto pdData = std::string(SurgeCoreBinary::paramdocumentation_xml, - SurgeCoreBinary::paramdocumentation_xmlSize) + + auto pdData = std::string(SurgeSharedBinary::paramdocumentation_xml, + SurgeSharedBinary::paramdocumentation_xmlSize) + "\n"; TiXmlDocument doc; @@ -673,8 +673,8 @@ void SurgeStorage::createUserDirectory() userSkinsPath, userMidiMappingsPath}) fs::create_directories(string_to_path(s)); - auto rd = std::string(SurgeCoreBinary::README_UserArea_txt, - SurgeCoreBinary::README_UserArea_txtSize) + + auto rd = std::string(SurgeSharedBinary::README_UserArea_txt, + SurgeSharedBinary::README_UserArea_txtSize) + "\n"; auto of = std::ofstream(string_to_path(userDataPath) / "README.txt", std::ofstream::out); @@ -1110,8 +1110,8 @@ void SurgeStorage::load_wt(int id, Wavetable *wt, OscillatorStorage *osc) wt->queue_id = -1; if (wt_list.empty() && id == 0) { - load_wt_wt_mem(SurgeCoreBinary::memoryWavetable_wt, SurgeCoreBinary::memoryWavetable_wtSize, - wt); + load_wt_wt_mem(SurgeSharedBinary::memoryWavetable_wt, + SurgeSharedBinary::memoryWavetable_wtSize, wt); if (osc) strncpy(osc->wavetable_display_name, "Sin to Saw", TXT_SIZE); diff --git a/src/gui/RuntimeFont.cpp b/src/gui/RuntimeFont.cpp index a2a09d4297a..41212ad1f68 100644 --- a/src/gui/RuntimeFont.cpp +++ b/src/gui/RuntimeFont.cpp @@ -14,7 +14,7 @@ */ #include "RuntimeFont.h" -#include "BinaryData.h" +#include "SurgeXTBinary.h" #include @@ -27,15 +27,15 @@ DefaultFonts::DefaultFonts() { #define TEST_WITH_INDIE_FLOWER 0 #if TEST_WITH_INDIE_FLOWER - latoRegularTypeface = juce::Typeface::createSystemTypefaceFor(BinaryData::IndieFlower_ttf, - BinaryData::IndieFlower_ttfSize); + latoRegularTypeface = juce::Typeface::createSystemTypefaceFor( + SurgeXTBinary::IndieFlower_ttf, SurgeXTBinary::IndieFlower_ttfSize); #else - latoRegularTypeface = juce::Typeface::createSystemTypefaceFor(BinaryData::LatoRegular_ttf, - BinaryData::LatoRegular_ttfSize); + latoRegularTypeface = juce::Typeface::createSystemTypefaceFor( + SurgeXTBinary::LatoRegular_ttf, SurgeXTBinary::LatoRegular_ttfSize); #endif firaMonoRegularTypeface = juce::Typeface::createSystemTypefaceFor( - BinaryData::FiraMonoRegular_ttf, BinaryData::FiraMonoRegular_ttfSize); + SurgeXTBinary::FiraMonoRegular_ttf, SurgeXTBinary::FiraMonoRegular_ttfSize); displayFont = getLatoAtSize(9); patchNameFont = getLatoAtSize(13); lfoTypeFont = getLatoAtSize(8); diff --git a/src/gui/SkinSupport.cpp b/src/gui/SkinSupport.cpp index 9525595b52f..861bd3b995c 100644 --- a/src/gui/SkinSupport.cpp +++ b/src/gui/SkinSupport.cpp @@ -15,7 +15,7 @@ #include #include #include -#include "BinaryData.h" +#include "SurgeXTBinary.h" namespace Surge { @@ -277,7 +277,8 @@ bool Skin::reloadSkin(std::shared_ptr bitmapStore) TiXmlDocument doc; if (useInMemorySkin) { - auto memSkin = std::string(BinaryData::memoryskin_xml, BinaryData::memoryskin_xmlSize); + auto memSkin = + std::string(SurgeXTBinary::memoryskin_xml, SurgeXTBinary::memoryskin_xmlSize); doc.Parse(memSkin.c_str()); } else diff --git a/src/gui/SurgeImage.cpp b/src/gui/SurgeImage.cpp index 27308ca0196..d9b30168a55 100644 --- a/src/gui/SurgeImage.cpp +++ b/src/gui/SurgeImage.cpp @@ -14,14 +14,14 @@ */ #include "SurgeImage.h" -#include "BinaryData.h" +#include "SurgeXTBinary.h" SurgeImage::SurgeImage(int rid) { resourceID = rid; std::string fn = "bmp00" + std::to_string(rid) + "_svg"; int bds; - auto bd = BinaryData::getNamedResource(fn.c_str(), bds); + auto bd = SurgeXTBinary::getNamedResource(fn.c_str(), bds); if (bd) { drawable = juce::Drawable::createFromImageData(bd, bds);