From 6c7438b3043c4dd0b0aa0de964a64d640f37daf8 Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 11 Aug 2021 21:02:51 -0400 Subject: [PATCH] Surge runs without a factory directory (#4833) If the factory directory is set to /Flargl/Blargl surge will start with an empty skin (no hovers etc...) and have one and only one wavetable (sin to saw) but will work and be usable. Closes #4398 --- CMakeLists.txt | 2 + resources/surge-xt/memory-skin.xml | 8 +++ resources/surge-xt/memoryWavetable.wt | Bin 0 -> 16140 bytes src/common/SurgeStorage.cpp | 11 ++++ src/gui/SkinSupport.cpp | 78 +++++++++++++++++--------- src/gui/SkinSupport.h | 19 +++++-- 6 files changed, 87 insertions(+), 31 deletions(-) create mode 100644 resources/surge-xt/memory-skin.xml create mode 100644 resources/surge-xt/memoryWavetable.wt diff --git a/CMakeLists.txt b/CMakeLists.txt index 5169819f049..0d5ae015dcb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -172,6 +172,7 @@ juce_add_binary_data(surge-shared-binary SOURCES resources/data/configuration.xml resources/surge-xt/README_UserArea.txt + resources/surge-xt/memoryWavetable.wt resources/data/windows.wt resources/data/paramdocumentation.xml) @@ -885,6 +886,7 @@ if( BUILD_SURGE_XT ) resources/fonts/Lato*ttf resources/fonts/IndieFlower.ttf resources/fonts/FiraMono-Regular.ttf + resources/surge-xt/memory-skin.xml ) juce_add_binary_data( surge-xt-binary diff --git a/resources/surge-xt/memory-skin.xml b/resources/surge-xt/memory-skin.xml new file mode 100644 index 00000000000..077c34b4e5f --- /dev/null +++ b/resources/surge-xt/memory-skin.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/resources/surge-xt/memoryWavetable.wt b/resources/surge-xt/memoryWavetable.wt new file mode 100644 index 0000000000000000000000000000000000000000..1bdd306f00360e9e5955ade4279330550d1bb83f GIT binary patch literal 16140 zcmW+-by(Zi`wb8wAw&pq2yr8Zwp3Sl+bXN;+O4vF>$dvpwyv_ZtE|4t>fY6;;6w;< zBM_1hh>(OR@cTT!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?VQlz$aDFfn_&3ncANTF>j_`hJKhX~NXn{8{ zx$X~MF`mw+U!*Ogb>#e$GXO}y9wrOPI^s$qm+%0;F1r)=KC2`P ziQSC(9{nHcdL}5-pD{e6KjI+#0Pq5$0g8pvAk)AzY7O3Sr(=5|*!$ZSY9bBK#EY*q{s~V>@6sgxM@2Pgn2Pl88i_7sf M`EqXsQUUt#f7JWs*Z=?k literal 0 HcmV?d00001 diff --git a/src/common/SurgeStorage.cpp b/src/common/SurgeStorage.cpp index 8b488dbe4c2..510a8ce909a 100644 --- a/src/common/SurgeStorage.cpp +++ b/src/common/SurgeStorage.cpp @@ -976,10 +976,12 @@ void SurgeStorage::refresh_wtlist() if (wt_category.size() == 0 || wt_list.size() == 0) { + /* std::ostringstream ss; ss << "Surge was unable to load wavetables from '" << datapath << "'. Please reinstall Surge!"; reportError(ss.str(), "Surge Installation Error"); + */ } firstThirdPartyWTCategory = wt_category.size(); @@ -1106,6 +1108,15 @@ void SurgeStorage::load_wt(int id, Wavetable *wt, OscillatorStorage *osc) { wt->current_id = id; wt->queue_id = -1; + if (wt_list.empty() && id == 0) + { + load_wt_wt_mem(SurgeCoreBinary::memoryWavetable_wt, SurgeCoreBinary::memoryWavetable_wtSize, + wt); + if (osc) + strncpy(osc->wavetable_display_name, "Sin to Saw", TXT_SIZE); + + return; + } if (id < 0) return; if (id >= wt_list.size()) diff --git a/src/gui/SkinSupport.cpp b/src/gui/SkinSupport.cpp index 51887ca793d..9525595b52f 100644 --- a/src/gui/SkinSupport.cpp +++ b/src/gui/SkinSupport.cpp @@ -15,6 +15,7 @@ #include #include #include +#include "BinaryData.h" namespace Surge { @@ -61,11 +62,11 @@ std::shared_ptr SkinDB::defaultSkin(SurgeStorage *storage) else { auto st = (Entry::RootType)(Surge::Storage::getUserDefaultValue( - storage, Surge::Storage::DefaultSkinRootType, Entry::UNKNOWN)); + storage, Surge::Storage::DefaultSkinRootType, UNKNOWN)); for (auto e : availableSkins) { - if (e.name == uds && (e.rootType == st || st == Entry::UNKNOWN)) + if (e.name == uds && (e.rootType == st || st == UNKNOWN)) return getSkin(e); } return getSkin(defaultSkinEntry); @@ -76,7 +77,14 @@ std::shared_ptr SkinDB::getSkin(const Entry &skinEntry) { if (skins.find(skinEntry) == skins.end()) { - skins[skinEntry] = std::make_shared(skinEntry.root, skinEntry.name); + if (skinEntry.rootType == MEMORY) + { + skins[skinEntry] = std::make_shared(true); + } + else + { + skins[skinEntry] = std::make_shared(skinEntry.root, skinEntry.name); + } } return skins[skinEntry]; } @@ -93,11 +101,11 @@ void SkinDB::rescanForSkins(SurgeStorage *storage) for (auto &source : paths) { - Entry::RootType rt = Entry::UNKNOWN; + Entry::RootType rt = UNKNOWN; if (path_to_string(source) == path_to_string(paths[0])) - rt = Entry::FACTORY; + rt = FACTORY; if (path_to_string(source) == path_to_string(paths[1])) - rt = Entry::USER; + rt = USER; std::vector alldirs; std::deque workStack; @@ -153,8 +161,8 @@ void SkinDB::rescanForSkins(SurgeStorage *storage) e.rootType = rt; e.root = path; e.name = lo + sep; - if (e.name.find("default.surge-skin") != std::string::npos && - rt == Entry::FACTORY && defaultSkinEntry.name == "") + if (e.name.find("default.surge-skin") != std::string::npos && rt == FACTORY && + defaultSkinEntry.name == "") { defaultSkinEntry = e; foundDefaultSkinEntry = true; @@ -166,13 +174,14 @@ void SkinDB::rescanForSkins(SurgeStorage *storage) } if (!foundDefaultSkinEntry) { - std::ostringstream oss; - oss << "Surge Classic skin was not located. This usually means Surge is incorrectly " - "installed or uses an incompatible " - << "set of resources. Surge looked in '" << storage->datapath << "' and '" - << storage->userDataPath << "'. " - << "Please reinstall Surge or remove incompatible resources."; - storage->reportError(oss.str(), "Skin Loading Error"); + auto memSkin = Entry(); + memSkin.rootType = MEMORY; + memSkin.name = "In Memory Default"; + memSkin.displayName = "In Memory Default"; + memSkin.category = ""; + memSkin.root = ""; + availableSkins.push_back(memSkin); + defaultSkinEntry = memSkin; } // Run over the skins parsing the name @@ -235,6 +244,17 @@ Skin::Skin(const std::string &root, const std::string &name) : root(root), name( imageAllowedIds = allowedImageIds(); } +Skin::Skin(bool inMemory) +{ + if (!inMemory) + std::cout << "SOFTWARE ERROR" << std::endl; + instances++; + // std::cout << "Constructing a skin " << _D(root) << _D(name) << _D(instances) << std::endl; + imageStringToId = createIdNameMap(); + imageAllowedIds = allowedImageIds(); + useInMemorySkin = true; +} + Skin::~Skin() { #ifdef INSTRUMENT_UI @@ -255,17 +275,25 @@ bool Skin::reloadSkin(std::shared_ptr bitmapStore) #endif // std::cout << "Reloading skin " << _D(name) << std::endl; TiXmlDocument doc; - // Obviously fix this - doc.SetTabSize(4); - - if (!doc.LoadFile(string_to_path(resourceName("skin.xml")))) + if (useInMemorySkin) { - FIXMEERROR << "Unable to load skin.xml resource '" << resourceName("skin.xml") << "'" - << std::endl; - FIXMEERROR << "Unable to parse skin.xml\nError is:\n" - << doc.ErrorDesc() << " at row " << doc.ErrorRow() << ", column " - << doc.ErrorCol() << std::endl; - return false; + auto memSkin = std::string(BinaryData::memoryskin_xml, BinaryData::memoryskin_xmlSize); + doc.Parse(memSkin.c_str()); + } + else + { + // Obviously fix this + doc.SetTabSize(4); + + if (!doc.LoadFile(string_to_path(resourceName("skin.xml")))) + { + FIXMEERROR << "Unable to load skin.xml resource '" << resourceName("skin.xml") << "'" + << std::endl; + FIXMEERROR << "Unable to parse skin.xml\nError is:\n" + << doc.ErrorDesc() << " at row " << doc.ErrorRow() << ", column " + << doc.ErrorCol() << std::endl; + return false; + } } TiXmlElement *surgeskin = TINYXML_SAFE_TO_ELEMENT(doc.FirstChild("surge-skin")); diff --git a/src/gui/SkinSupport.h b/src/gui/SkinSupport.h index 5eee36d2b77..5a130011509 100644 --- a/src/gui/SkinSupport.h +++ b/src/gui/SkinSupport.h @@ -77,6 +77,14 @@ void loadTypefacesFromPath(const fs::path &p, extern const std::string NoneClassName; class SkinDB; +enum RootType +{ + UNKNOWN, + FACTORY, + USER, + MEMORY +}; + class Skin { public: @@ -95,8 +103,11 @@ class Skin friend class SkinDB; Skin(const std::string &root, const std::string &name); + Skin(bool inMemory); ~Skin(); + bool useInMemorySkin{false}; + bool reloadSkin(std::shared_ptr bitmapStore); std::string resourceName(const std::string &relativeName) @@ -400,13 +411,9 @@ class SkinDB : public juce::DeletedAtShutdown struct Entry { + using RootType = Surge::GUI::RootType; - enum RootType - { - UNKNOWN, - FACTORY, - USER - } rootType = UNKNOWN; + RootType rootType = UNKNOWN; std::string root; std::string name;