mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Projucer: Fixed exporter name not being written to console when saving via the cmd line
This commit is contained in:
parent
cb8a40d47c
commit
6814cc0b8d
2 changed files with 7 additions and 28 deletions
|
|
@ -733,7 +733,7 @@ void ProjectSaver::writeProjects (const OwnedArray<LibraryModule>& modules, Proj
|
||||||
if (ProjucerApplication::getApp().isRunningCommandLine)
|
if (ProjucerApplication::getApp().isRunningCommandLine)
|
||||||
saveExporter (*exporter, modules);
|
saveExporter (*exporter, modules);
|
||||||
else
|
else
|
||||||
threadPool.addJob (new ExporterJob (*this, *exporter, modules), true);
|
threadPool.addJob ([this, &exporter, &modules] { saveExporter (*exporter, modules); });
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -806,8 +806,12 @@ void ProjectSaver::saveExporter (ProjectExporter& exporter, const OwnedArray<Lib
|
||||||
|
|
||||||
if (! exporter.isCLion())
|
if (! exporter.isCLion())
|
||||||
{
|
{
|
||||||
auto exporterName = exporter.getUniqueName();
|
auto outputString = "Finished saving: " + exporter.getUniqueName();
|
||||||
MessageManager::callAsync ([exporterName] { std::cout << "Finished saving: " << exporterName << std::endl; });
|
|
||||||
|
if (MessageManager::getInstance()->isThisTheMessageThread())
|
||||||
|
std::cout << outputString << std::endl;
|
||||||
|
else
|
||||||
|
MessageManager::callAsync ([outputString] { std::cout << outputString << std::endl; });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (build_tools::SaveError& error)
|
catch (build_tools::SaveError& error)
|
||||||
|
|
|
||||||
|
|
@ -65,31 +65,6 @@ private:
|
||||||
JUCE_DECLARE_NON_COPYABLE (SaveThreadWithProgressWindow)
|
JUCE_DECLARE_NON_COPYABLE (SaveThreadWithProgressWindow)
|
||||||
};
|
};
|
||||||
|
|
||||||
class ExporterJob : public ThreadPoolJob
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
ExporterJob (ProjectSaver& ps, ProjectExporter& pe, const OwnedArray<LibraryModule>& modulesList)
|
|
||||||
: ThreadPoolJob ("export"),
|
|
||||||
owner (ps),
|
|
||||||
exporter (pe),
|
|
||||||
modules (modulesList)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
JobStatus runJob() override
|
|
||||||
{
|
|
||||||
owner.saveExporter (exporter, modules);
|
|
||||||
return jobHasFinished;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
ProjectSaver& owner;
|
|
||||||
ProjectExporter& exporter;
|
|
||||||
const OwnedArray<LibraryModule>& modules;
|
|
||||||
|
|
||||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ExporterJob)
|
|
||||||
};
|
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
Project::Item saveGeneratedFile (const String& filePath, const MemoryOutputStream& newData);
|
Project::Item saveGeneratedFile (const String& filePath, const MemoryOutputStream& newData);
|
||||||
bool replaceFileIfDifferent (const File& f, const MemoryOutputStream& newData);
|
bool replaceFileIfDifferent (const File& f, const MemoryOutputStream& newData);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue