Skip to content

Commit

Permalink
add vendor name to public data folder
Browse files Browse the repository at this point in the history
  • Loading branch information
dsp56300 committed Oct 29, 2024
1 parent b5e7bf7 commit 020ffa4
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion source/jucePluginEditorLib/pluginEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ namespace jucePluginEditorLib
return res;

const auto modulePath = synthLib::getModulePath();
const auto publicDataPath = pluginLib::Tools::getPublicDataFolder(m_processor.getProperties().name);
const auto publicDataPath = pluginLib::Tools::getPublicDataFolder(m_processor.getProperties().vendor, m_processor.getProperties().name);
const auto folder = synthLib::validatePath(m_skinFolder.find(modulePath) == 0 || m_skinFolder.find(publicDataPath) == 0 ? m_skinFolder : modulePath + m_skinFolder);

// try to load from disk first
Expand Down
2 changes: 1 addition & 1 deletion source/jucePluginEditorLib/pluginEditorState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void PluginEditorState::getPerInstanceConfig(std::vector<uint8_t>& _data)

std::string PluginEditorState::getSkinFolder() const
{
return synthLib::validatePath(pluginLib::Tools::getPublicDataFolder(m_processor.getProperties().name) + "skins/");
return synthLib::validatePath(pluginLib::Tools::getPublicDataFolder(m_processor.getProperties().vendor, m_processor.getProperties().name) + "skins/");
}

void PluginEditorState::loadSkin(const Skin& _skin)
Expand Down
2 changes: 1 addition & 1 deletion source/jucePluginLib/processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ namespace pluginLib

std::string Processor::getPublicRomFolder() const
{
return Tools::getPublicDataFolder(getProperties().name) + "roms/";
return Tools::getPublicDataFolder(getProperties().vendor, getProperties().name) + "roms/";
}

void Processor::destroyController()
Expand Down
1 change: 1 addition & 0 deletions source/jucePluginLib/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ namespace pluginLib
struct Properties
{
const std::string name;
const std::string vendor;
const bool isSynth;
const bool wantsMidiInput;
const bool producesMidiOut;
Expand Down
4 changes: 2 additions & 2 deletions source/jucePluginLib/tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ namespace pluginLib
return host.contains("juce_vst3_helper") || host.contains("juce_lv2_helper");
}

std::string Tools::getPublicDataFolder(const std::string& _productName)
std::string Tools::getPublicDataFolder(const std::string& _vendorName, const std::string& _productName)
{
return synthLib::validatePath(synthLib::getSpecialFolderPath(synthLib::SpecialFolderType::UserDocuments) + _productName + '/');
return synthLib::validatePath(synthLib::getSpecialFolderPath(synthLib::SpecialFolderType::UserDocuments) + _vendorName + '/' + _productName + '/');
}
}
2 changes: 1 addition & 1 deletion source/jucePluginLib/tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ namespace pluginLib
public:
static bool isHeadless();

static std::string getPublicDataFolder(const std::string& _productName);
static std::string getPublicDataFolder(const std::string& _vendorName, const std::string& _productName);
};
}
2 changes: 1 addition & 1 deletion source/mqJucePlugin/PluginProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace mqJucePlugin
.withOutput("Out 2", juce::AudioChannelSet::stereo(), true)
.withOutput("Out 3", juce::AudioChannelSet::stereo(), true)
#endif
, getOptions(), pluginLib::Processor::Properties{JucePlugin_Name, JucePlugin_IsSynth, JucePlugin_WantsMidiInput, JucePlugin_ProducesMidiOutput, JucePlugin_IsMidiEffect, JucePlugin_Lv2Uri, getBinaryData()})
, getOptions(), pluginLib::Processor::Properties{JucePlugin_Name, JucePlugin_Manufacturer, JucePlugin_IsSynth, JucePlugin_WantsMidiInput, JucePlugin_ProducesMidiOutput, JucePlugin_IsMidiEffect, JucePlugin_Lv2Uri, getBinaryData()})
{
getController();
const auto latencyBlocks = getConfig().getIntValue("latencyBlocks", static_cast<int>(getPlugin().getLatencyBlocks()));
Expand Down
2 changes: 1 addition & 1 deletion source/nord/n2x/n2xJucePlugin/n2xPluginProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace n2xJucePlugin
Processor(BusesProperties()
.withOutput("Out AB", juce::AudioChannelSet::stereo(), true)
.withOutput("Out CD", juce::AudioChannelSet::stereo(), true)
, getOptions(), pluginLib::Processor::Properties{JucePlugin_Name, JucePlugin_IsSynth, JucePlugin_WantsMidiInput, JucePlugin_ProducesMidiOutput, JucePlugin_IsMidiEffect, JucePlugin_Lv2Uri, getBinaryData()})
, getOptions(), pluginLib::Processor::Properties{JucePlugin_Name, JucePlugin_Manufacturer, JucePlugin_IsSynth, JucePlugin_WantsMidiInput, JucePlugin_ProducesMidiOutput, JucePlugin_IsMidiEffect, JucePlugin_Lv2Uri, getBinaryData()})
{
getController();
const auto latencyBlocks = getConfig().getIntValue("latencyBlocks", static_cast<int>(getPlugin().getLatencyBlocks()));
Expand Down
2 changes: 1 addition & 1 deletion source/osTIrusJucePlugin/OsTIrusProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ OsTIrusProcessor::OsTIrusProcessor() :
.withOutput("USB 2", juce::AudioChannelSet::stereo(), true)
.withOutput("USB 3", juce::AudioChannelSet::stereo(), true)
#endif
, ::getConfigOptions(), pluginLib::Processor::Properties{JucePlugin_Name, JucePlugin_IsSynth, JucePlugin_WantsMidiInput, JucePlugin_ProducesMidiOutput, JucePlugin_IsMidiEffect, JucePlugin_Lv2Uri, getBinaryData()}
, ::getConfigOptions(), pluginLib::Processor::Properties{JucePlugin_Name, JucePlugin_Manufacturer, JucePlugin_IsSynth, JucePlugin_WantsMidiInput, JucePlugin_ProducesMidiOutput, JucePlugin_IsMidiEffect, JucePlugin_Lv2Uri, getBinaryData()}
, virusLib::DeviceModel::TI2)
{
postConstruct(virusLib::ROMLoader::findROMs(virusLib::DeviceModel::TI2, virusLib::DeviceModel::Snow));
Expand Down
2 changes: 1 addition & 1 deletion source/osirusJucePlugin/OsirusProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ OsirusProcessor::OsirusProcessor() :
.withOutput("Out 2", juce::AudioChannelSet::stereo(), true)
.withOutput("Out 3", juce::AudioChannelSet::stereo(), true)
#endif
, ::getConfigOptions(), pluginLib::Processor::Properties{JucePlugin_Name, JucePlugin_IsSynth, JucePlugin_WantsMidiInput, JucePlugin_ProducesMidiOutput, JucePlugin_IsMidiEffect, JucePlugin_Lv2Uri, getBinaryData()}
, ::getConfigOptions(), pluginLib::Processor::Properties{JucePlugin_Name, JucePlugin_Manufacturer, JucePlugin_IsSynth, JucePlugin_WantsMidiInput, JucePlugin_ProducesMidiOutput, JucePlugin_IsMidiEffect, JucePlugin_Lv2Uri, getBinaryData()}
, virusLib::DeviceModel::ABC)
{
postConstruct(virusLib::ROMLoader::findROMs(virusLib::DeviceModel::ABC));
Expand Down
2 changes: 1 addition & 1 deletion source/xtJucePlugin/PluginProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace xtJucePlugin
#if JucePlugin_IsSynth
.withOutput("Out 2", juce::AudioChannelSet::stereo(), true)
#endif
, getOptions(), pluginLib::Processor::Properties{JucePlugin_Name, JucePlugin_IsSynth, JucePlugin_WantsMidiInput, JucePlugin_ProducesMidiOutput, JucePlugin_IsMidiEffect, JucePlugin_Lv2Uri, getBinaryData()})
, getOptions(), pluginLib::Processor::Properties{JucePlugin_Name, JucePlugin_Manufacturer, JucePlugin_IsSynth, JucePlugin_WantsMidiInput, JucePlugin_ProducesMidiOutput, JucePlugin_IsMidiEffect, JucePlugin_Lv2Uri, getBinaryData()})
{
getController();
const auto latencyBlocks = getConfig().getIntValue("latencyBlocks", static_cast<int>(getPlugin().getLatencyBlocks()));
Expand Down

0 comments on commit 020ffa4

Please sign in to comment.