Skip to content

Commit

Permalink
Remove asset directory jassert
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-thompson committed Jan 14, 2024
1 parent f09f136 commit 1aa8531
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions native/PluginProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ juce::File getAssetsDirectory()
#error "We only support Mac and Windows here yet."
#endif

jassert(assetsDir.isDirectory());
return assetsDir;
}

Expand All @@ -37,11 +36,11 @@ EffectsPluginProcessor::EffectsPluginProcessor()
auto manifestFileContents = manifestFile.readEntireTextStream().toStdString();
#else
auto manifestFile = getAssetsDirectory().getChildFile("manifest.json");
std::string manifestFileContents;

if (manifestFile.existsAsFile()) {
manifestFileContents = manifestFile.loadFileAsString().toStdString();
}
if (!manifestFile.existsAsFile())
return;

auto manifestFileContents = manifestFile.loadFileAsString().toStdString();
#endif

auto manifest = elem::js::parseJSON(manifestFileContents);
Expand Down Expand Up @@ -318,6 +317,10 @@ void EffectsPluginProcessor::initJavaScriptEngine()
auto dspEntryFileContents = dspEntryFile.readEntireTextStream().toStdString();
#else
auto dspEntryFile = getAssetsDirectory().getChildFile("dsp.main.js");

if (!dspEntryFile.existsAsFile())
return;

auto dspEntryFileContents = dspEntryFile.loadFileAsString().toStdString();
#endif
jsContext.evaluate(dspEntryFileContents);
Expand Down

0 comments on commit 1aa8531

Please sign in to comment.