Hi! I'm working with Lunacy to automate HISE exports.
Environment
Problem
When web view is present in a HISE project, the HISE CLI commands export and export_ci do not embed the web resources in the binary files. In contrast, exporting through the HISE GUI properly embeds all web resources in the final binaries. EG, the temporary file externalFile (supposedly) containing all web resources has size of ~200KB when running from CLI vs. a size of ~900KB from HISE GUI. Note, that changing the architecture, or standalone vs. plugin type, or cleaning the binaries/pooled resources does nothing to remedy the problem.
Namely it seems to be an issues with BaseExporter::exportEmbeddedFiles() call to ValueTree webViewResources = chainToExport->getMainController()->exportWebViewResources();
exportWebViewResources() seems to be a JUCE command with the following code:
Juce::ValueTree GlobalScriptCompileBroadcaster::exportWebViewResources()
{
ValueTree v("WebViewResources");
for (const auto& wv : webviews)
{
auto data = std::get<1>(wv);
auto projectRoot = dynamic_cast<MainController*>(this)->getCurrentFileHandler().getRootFolder();
// We only embed file resources that are in the project directory (because then we'll assume
// that they are not likely to be installed on the end user's computer).
auto shouldEmbedResource = data->getRootDirectory().isAChildOf(projectRoot);
if (shouldEmbedResource)
{
auto id = std::get<0>(wv).toString();
auto c = data->exportAsValueTree();
c.setProperty("ID", id, nullptr);
v.addChild(c, -1, nullptr);
}
}
return v;
}
Perhaps the shouldEmbedResource is throwing a false negative due to the HISE CLI not correctly setting the project root?
Conclusion
This is just a theory. Anyway, let me know if you need any more info from me, or if you can reproduce it, or if I can do anything to help with the issue! The ability to completely automate the build process without a GUI would be quite nice! :,)
Cheers,
Jack
Hi! I'm working with Lunacy to automate HISE exports.
Environment
Problem
When web view is present in a HISE project, the HISE CLI commands
exportandexport_cido not embed the web resources in the binary files. In contrast, exporting through the HISE GUI properly embeds all web resources in the final binaries. EG, the temporary fileexternalFile(supposedly) containing all web resources has size of ~200KB when running from CLI vs. a size of ~900KB from HISE GUI. Note, that changing the architecture, orstandalone vs. plugintype, or cleaning the binaries/pooled resources does nothing to remedy the problem.Namely it seems to be an issues with
BaseExporter::exportEmbeddedFiles()call toValueTree webViewResources = chainToExport->getMainController()->exportWebViewResources();exportWebViewResources()seems to be a JUCE command with the following code:Perhaps the
shouldEmbedResourceis throwing a false negative due to the HISE CLI not correctly setting the project root?Conclusion
This is just a theory. Anyway, let me know if you need any more info from me, or if you can reproduce it, or if I can do anything to help with the issue! The ability to completely automate the build process without a GUI would be quite nice! :,)
Cheers,
Jack