mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Projucer: Removed the live build
This commit is contained in:
parent
64896eefcd
commit
bfdda737a2
74 changed files with 673 additions and 7583 deletions
|
|
@ -55,56 +55,42 @@ struct ProjucerApplication::MainMenuModel : public MenuBarModel
|
|||
//==============================================================================
|
||||
void ProjucerApplication::initialise (const String& commandLine)
|
||||
{
|
||||
if (commandLine.trimStart().startsWith ("--server"))
|
||||
initialiseLogger ("IDE_Log_");
|
||||
Logger::writeToLog (SystemStats::getOperatingSystemName());
|
||||
Logger::writeToLog ("CPU: " + String (SystemStats::getCpuSpeedInMegahertz())
|
||||
+ "MHz Cores: " + String (SystemStats::getNumCpus())
|
||||
+ " " + String (SystemStats::getMemorySizeInMegabytes()) + "MB");
|
||||
|
||||
isRunningCommandLine = commandLine.isNotEmpty()
|
||||
&& ! commandLine.startsWith ("-NSDocumentRevisionsDebugMode");
|
||||
|
||||
settings = std::make_unique<StoredSettings>();
|
||||
|
||||
if (isRunningCommandLine)
|
||||
{
|
||||
initialiseLogger ("Compiler_Log_");
|
||||
LookAndFeel::setDefaultLookAndFeel (&lookAndFeel);
|
||||
auto appReturnCode = performCommandLine (ArgumentList ("Projucer", commandLine));
|
||||
|
||||
#if JUCE_MAC
|
||||
Process::setDockIconVisible (false);
|
||||
#endif
|
||||
|
||||
server = createClangServer (commandLine);
|
||||
}
|
||||
else
|
||||
{
|
||||
initialiseLogger ("IDE_Log_");
|
||||
Logger::writeToLog (SystemStats::getOperatingSystemName());
|
||||
Logger::writeToLog ("CPU: " + String (SystemStats::getCpuSpeedInMegahertz())
|
||||
+ "MHz Cores: " + String (SystemStats::getNumCpus())
|
||||
+ " " + String (SystemStats::getMemorySizeInMegabytes()) + "MB");
|
||||
|
||||
isRunningCommandLine = commandLine.isNotEmpty()
|
||||
&& ! commandLine.startsWith ("-NSDocumentRevisionsDebugMode");
|
||||
|
||||
settings = std::make_unique<StoredSettings>();
|
||||
|
||||
if (isRunningCommandLine)
|
||||
if (appReturnCode != commandLineNotPerformed)
|
||||
{
|
||||
auto appReturnCode = performCommandLine (ArgumentList ("Projucer", commandLine));
|
||||
|
||||
if (appReturnCode != commandLineNotPerformed)
|
||||
{
|
||||
setApplicationReturnValue (appReturnCode);
|
||||
quit();
|
||||
return;
|
||||
}
|
||||
|
||||
isRunningCommandLine = false;
|
||||
}
|
||||
|
||||
if (sendCommandLineToPreexistingInstance())
|
||||
{
|
||||
DBG ("Another instance is running - quitting...");
|
||||
setApplicationReturnValue (appReturnCode);
|
||||
quit();
|
||||
return;
|
||||
}
|
||||
|
||||
doBasicApplicationSetup();
|
||||
|
||||
// do further initialisation in a moment when the message loop has started
|
||||
triggerAsyncUpdate();
|
||||
isRunningCommandLine = false;
|
||||
}
|
||||
|
||||
if (sendCommandLineToPreexistingInstance())
|
||||
{
|
||||
DBG ("Another instance is running - quitting...");
|
||||
quit();
|
||||
return;
|
||||
}
|
||||
|
||||
doBasicApplicationSetup();
|
||||
|
||||
// do further initialisation in a moment when the message loop has started
|
||||
triggerAsyncUpdate();
|
||||
}
|
||||
|
||||
bool ProjucerApplication::initialiseLogger (const char* filePrefix)
|
||||
|
|
@ -143,8 +129,6 @@ void ProjucerApplication::handleAsyncUpdate()
|
|||
rescanJUCEPathModules();
|
||||
rescanUserPathModules();
|
||||
|
||||
openDocumentManager.registerType (new ProjucerAppClasses::LiveBuildCodeEditorDocument::Type(), 2);
|
||||
|
||||
menuModel.reset (new MainMenuModel());
|
||||
|
||||
#if JUCE_MAC
|
||||
|
|
@ -171,7 +155,6 @@ void ProjucerApplication::doBasicApplicationSetup()
|
|||
licenseController = std::make_unique<LicenseController>();
|
||||
LookAndFeel::setDefaultLookAndFeel (&lookAndFeel);
|
||||
initCommandManager();
|
||||
childProcessCache = std::make_unique<ChildProcessCache>();
|
||||
icons = std::make_unique<Icons>();
|
||||
}
|
||||
|
||||
|
|
@ -185,12 +168,6 @@ static void deleteTemporaryFiles()
|
|||
|
||||
void ProjucerApplication::shutdown()
|
||||
{
|
||||
if (server != nullptr)
|
||||
{
|
||||
destroyClangServer (server);
|
||||
Logger::writeToLog ("Server shutdown cleanly");
|
||||
}
|
||||
|
||||
utf8Window.reset();
|
||||
svgPathWindow.reset();
|
||||
aboutWindow.reset();
|
||||
|
|
@ -201,8 +178,6 @@ void ProjucerApplication::shutdown()
|
|||
mainWindowList.forceCloseAllWindows();
|
||||
openDocumentManager.clear();
|
||||
|
||||
childProcessCache.reset();
|
||||
|
||||
#if JUCE_MAC
|
||||
MenuBarModel::setMacMainMenu (nullptr);
|
||||
#endif
|
||||
|
|
@ -242,11 +217,7 @@ struct AsyncQuitRetrier : private Timer
|
|||
|
||||
void ProjucerApplication::systemRequestedQuit()
|
||||
{
|
||||
if (server != nullptr)
|
||||
{
|
||||
sendQuitMessageToIDE (server);
|
||||
}
|
||||
else if (ModalComponentManager::getInstance()->cancelAllModalComponents())
|
||||
if (ModalComponentManager::getInstance()->cancelAllModalComponents())
|
||||
{
|
||||
new AsyncQuitRetrier();
|
||||
}
|
||||
|
|
@ -275,7 +246,7 @@ String ProjucerApplication::getVersionDescription() const
|
|||
|
||||
void ProjucerApplication::anotherInstanceStarted (const String& commandLine)
|
||||
{
|
||||
if (server == nullptr && ! commandLine.trim().startsWithChar ('-'))
|
||||
if (! commandLine.trim().startsWithChar ('-'))
|
||||
{
|
||||
ArgumentList list ({}, commandLine);
|
||||
|
||||
|
|
@ -316,9 +287,8 @@ MenuBarModel* ProjucerApplication::getMenuModel()
|
|||
|
||||
StringArray ProjucerApplication::getMenuNames()
|
||||
{
|
||||
StringArray currentMenuNames { "File", "Edit", "View", "Build", "Window", "Document", "GUI Editor", "Tools", "Help" };
|
||||
StringArray currentMenuNames { "File", "Edit", "View", "Window", "Document", "GUI Editor", "Tools", "Help" };
|
||||
|
||||
if (! isLiveBuildEnabled()) currentMenuNames.removeString ("Build");
|
||||
if (! isGUIEditorEnabled()) currentMenuNames.removeString ("GUI Editor");
|
||||
|
||||
return currentMenuNames;
|
||||
|
|
@ -335,10 +305,6 @@ PopupMenu ProjucerApplication::createMenu (const String& menuName)
|
|||
if (menuName == "View")
|
||||
return createViewMenu();
|
||||
|
||||
if (menuName == "Build")
|
||||
if (isLiveBuildEnabled())
|
||||
return createBuildMenu();
|
||||
|
||||
if (menuName == "Window")
|
||||
return createWindowMenu();
|
||||
|
||||
|
|
@ -437,8 +403,6 @@ PopupMenu ProjucerApplication::createViewMenu()
|
|||
{
|
||||
PopupMenu menu;
|
||||
menu.addCommandItem (commandManager.get(), CommandIDs::showProjectSettings);
|
||||
menu.addCommandItem (commandManager.get(), CommandIDs::showProjectTab);
|
||||
menu.addCommandItem (commandManager.get(), CommandIDs::showBuildTab);
|
||||
menu.addCommandItem (commandManager.get(), CommandIDs::showFileExplorerPanel);
|
||||
menu.addCommandItem (commandManager.get(), CommandIDs::showModulesPanel);
|
||||
menu.addCommandItem (commandManager.get(), CommandIDs::showExportersPanel);
|
||||
|
|
@ -450,25 +414,6 @@ PopupMenu ProjucerApplication::createViewMenu()
|
|||
return menu;
|
||||
}
|
||||
|
||||
PopupMenu ProjucerApplication::createBuildMenu()
|
||||
{
|
||||
PopupMenu menu;
|
||||
menu.addCommandItem (commandManager.get(), CommandIDs::toggleBuildEnabled);
|
||||
menu.addCommandItem (commandManager.get(), CommandIDs::buildNow);
|
||||
menu.addCommandItem (commandManager.get(), CommandIDs::toggleContinuousBuild);
|
||||
menu.addSeparator();
|
||||
menu.addCommandItem (commandManager.get(), CommandIDs::launchApp);
|
||||
menu.addCommandItem (commandManager.get(), CommandIDs::killApp);
|
||||
menu.addCommandItem (commandManager.get(), CommandIDs::cleanAll);
|
||||
menu.addSeparator();
|
||||
menu.addCommandItem (commandManager.get(), CommandIDs::reinstantiateComp);
|
||||
menu.addCommandItem (commandManager.get(), CommandIDs::showWarnings);
|
||||
menu.addSeparator();
|
||||
menu.addCommandItem (commandManager.get(), CommandIDs::nextError);
|
||||
menu.addCommandItem (commandManager.get(), CommandIDs::prevError);
|
||||
return menu;
|
||||
}
|
||||
|
||||
void ProjucerApplication::createColourSchemeItems (PopupMenu& menu)
|
||||
{
|
||||
{
|
||||
|
|
@ -569,7 +514,6 @@ PopupMenu ProjucerApplication::createToolsMenu()
|
|||
menu.addCommandItem (commandManager.get(), CommandIDs::showSVGPathTool);
|
||||
menu.addCommandItem (commandManager.get(), CommandIDs::showTranslationTool);
|
||||
menu.addSeparator();
|
||||
menu.addCommandItem (commandManager.get(), CommandIDs::enableLiveBuild);
|
||||
menu.addCommandItem (commandManager.get(), CommandIDs::enableGUIEditor);
|
||||
return menu;
|
||||
}
|
||||
|
|
@ -964,7 +908,6 @@ void ProjucerApplication::getAllCommands (Array <CommandID>& commands)
|
|||
CommandIDs::showGlobalPathsWindow,
|
||||
CommandIDs::showUTF8Tool,
|
||||
CommandIDs::showSVGPathTool,
|
||||
CommandIDs::enableLiveBuild,
|
||||
CommandIDs::enableGUIEditor,
|
||||
CommandIDs::showAboutWindow,
|
||||
CommandIDs::checkForNewVersion,
|
||||
|
|
@ -1041,13 +984,6 @@ void ProjucerApplication::getCommandInfo (CommandID commandID, ApplicationComman
|
|||
result.setInfo ("SVG Path Converter", "Shows the SVG->Path data conversion utility", CommandCategories::general, 0);
|
||||
break;
|
||||
|
||||
case CommandIDs::enableLiveBuild:
|
||||
result.setInfo ("Live-Build Enabled",
|
||||
"Enables or disables the live-build functionality",
|
||||
CommandCategories::general,
|
||||
(isLiveBuildEnabled() ? ApplicationCommandInfo::isTicked : 0));
|
||||
break;
|
||||
|
||||
case CommandIDs::enableGUIEditor:
|
||||
result.setInfo ("GUI Editor Enabled",
|
||||
"Enables or disables the GUI editor functionality",
|
||||
|
|
@ -1120,7 +1056,6 @@ bool ProjucerApplication::perform (const InvocationInfo& info)
|
|||
case CommandIDs::clearRecentFiles: clearRecentFiles(); break;
|
||||
case CommandIDs::showUTF8Tool: showUTF8ToolWindow(); break;
|
||||
case CommandIDs::showSVGPathTool: showSVGPathDataToolWindow(); break;
|
||||
case CommandIDs::enableLiveBuild: enableOrDisableLiveBuild(); break;
|
||||
case CommandIDs::enableGUIEditor: enableOrDisableGUIEditor(); break;
|
||||
case CommandIDs::showGlobalPathsWindow: showPathsWindow (false); break;
|
||||
case CommandIDs::showAboutWindow: showAboutWindow(); break;
|
||||
|
|
@ -1213,7 +1148,7 @@ bool ProjucerApplication::closeAllDocuments (OpenDocumentManager::SaveIfNeeded a
|
|||
|
||||
bool ProjucerApplication::closeAllMainWindows()
|
||||
{
|
||||
return server != nullptr || mainWindowList.askAllWindowsToClose();
|
||||
return mainWindowList.askAllWindowsToClose();
|
||||
}
|
||||
|
||||
void ProjucerApplication::closeAllMainWindowsAndQuitIfNeeded()
|
||||
|
|
@ -1256,16 +1191,6 @@ void ProjucerApplication::showSVGPathDataToolWindow()
|
|||
500, 500, 300, 300, 1000, 1000);
|
||||
}
|
||||
|
||||
bool ProjucerApplication::isLiveBuildEnabled() const
|
||||
{
|
||||
return getGlobalProperties().getBoolValue (Ids::liveBuildEnabled);
|
||||
}
|
||||
|
||||
void ProjucerApplication::enableOrDisableLiveBuild()
|
||||
{
|
||||
getGlobalProperties().setValue (Ids::liveBuildEnabled, ! isLiveBuildEnabled());
|
||||
}
|
||||
|
||||
bool ProjucerApplication::isGUIEditorEnabled() const
|
||||
{
|
||||
return getGlobalProperties().getBoolValue (Ids::guiEditorEnabled);
|
||||
|
|
|
|||
|
|
@ -32,8 +32,6 @@
|
|||
#include "../CodeEditor/jucer_SourceCodeEditor.h"
|
||||
#include "../Utility/UI/jucer_ProjucerLookAndFeel.h"
|
||||
|
||||
struct ChildProcessCache;
|
||||
|
||||
//==============================================================================
|
||||
class ProjucerApplication : public JUCEApplication,
|
||||
private AsyncUpdater
|
||||
|
|
@ -65,7 +63,6 @@ public:
|
|||
void getCommandInfo (CommandID commandID, ApplicationCommandInfo&) override;
|
||||
bool perform (const InvocationInfo&) override;
|
||||
|
||||
bool isLiveBuildEnabled() const;
|
||||
bool isGUIEditorEnabled() const;
|
||||
|
||||
//==============================================================================
|
||||
|
|
@ -107,7 +104,6 @@ public:
|
|||
std::unique_ptr<ApplicationCommandManager> commandManager;
|
||||
|
||||
bool isRunningCommandLine = false;
|
||||
std::unique_ptr<ChildProcessCache> childProcessCache;
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
|
|
@ -133,7 +129,6 @@ private:
|
|||
PopupMenu createFileMenu();
|
||||
PopupMenu createEditMenu();
|
||||
PopupMenu createViewMenu();
|
||||
PopupMenu createBuildMenu();
|
||||
void createColourSchemeItems (PopupMenu&);
|
||||
PopupMenu createWindowMenu();
|
||||
PopupMenu createDocumentMenu();
|
||||
|
|
@ -168,7 +163,6 @@ private:
|
|||
void doLoginOrLogout();
|
||||
void showLoginForm();
|
||||
|
||||
void enableOrDisableLiveBuild();
|
||||
void enableOrDisableGUIEditor();
|
||||
|
||||
//==============================================================================
|
||||
|
|
@ -207,7 +201,6 @@ private:
|
|||
//==============================================================================
|
||||
std::unique_ptr<LicenseController> licenseController;
|
||||
|
||||
void* server = nullptr;
|
||||
std::unique_ptr<TooltipWindow> tooltipWindow;
|
||||
AvailableModulesList jucePathModulesList, userPathsModulesList;
|
||||
|
||||
|
|
|
|||
|
|
@ -56,12 +56,9 @@ namespace CommandIDs
|
|||
showAboutWindow = 0x300024,
|
||||
checkForNewVersion = 0x300025,
|
||||
enableNewVersionCheck = 0x300026,
|
||||
enableLiveBuild = 0x300027,
|
||||
enableGUIEditor = 0x300028,
|
||||
enableGUIEditor = 0x300027,
|
||||
|
||||
showProjectSettings = 0x300030,
|
||||
showProjectTab = 0x300031,
|
||||
showBuildTab = 0x300032,
|
||||
showFileExplorerPanel = 0x300033,
|
||||
showModulesPanel = 0x300034,
|
||||
showExportersPanel = 0x300035,
|
||||
|
|
@ -83,24 +80,12 @@ namespace CommandIDs
|
|||
findNext = 0x300052,
|
||||
findPrevious = 0x300053,
|
||||
|
||||
cleanAll = 0x300060,
|
||||
toggleBuildEnabled = 0x300061,
|
||||
showWarnings = 0x300062,
|
||||
reinstantiateComp = 0x300063,
|
||||
launchApp = 0x300064,
|
||||
killApp = 0x300065,
|
||||
buildNow = 0x300066,
|
||||
toggleContinuousBuild = 0x300067,
|
||||
|
||||
enableSnapToGrid = 0x300070,
|
||||
zoomIn = 0x300071,
|
||||
zoomOut = 0x300072,
|
||||
zoomNormal = 0x300073,
|
||||
spaceBarDrag = 0x300074,
|
||||
|
||||
nextError = 0x300080,
|
||||
prevError = 0x300081,
|
||||
|
||||
loginLogout = 0x300090,
|
||||
|
||||
showForum = 0x300100,
|
||||
|
|
|
|||
|
|
@ -27,9 +27,3 @@
|
|||
|
||||
#include <JuceHeader.h>
|
||||
#include "jucer_CommonHeaders.h"
|
||||
|
||||
#if JUCE_DEBUG
|
||||
#define RUN_CLANG_IN_CHILD_PROCESS 1
|
||||
#else
|
||||
#define RUN_CLANG_IN_CHILD_PROCESS 1
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -39,27 +39,6 @@
|
|||
#include "Windows/jucer_PIPCreatorWindowComponent.h"
|
||||
#include "Windows/jucer_FloatingToolWindow.h"
|
||||
|
||||
#include "../LiveBuildEngine/jucer_MessageIDs.h"
|
||||
#include "../LiveBuildEngine/jucer_CppHelpers.h"
|
||||
#include "../LiveBuildEngine/jucer_SourceCodeRange.h"
|
||||
#include "../LiveBuildEngine/jucer_ClassDatabase.h"
|
||||
#include "../LiveBuildEngine/jucer_DiagnosticMessage.h"
|
||||
|
||||
#include "../LiveBuildEngine/jucer_CompileEngineDLL.h"
|
||||
#include "../LiveBuildEngine/jucer_CompileEngineClient.h"
|
||||
#include "../LiveBuildEngine/UI/jucer_ActivityListComponent.h"
|
||||
#include "../LiveBuildEngine/UI/jucer_BuildTabStatusComponent.h"
|
||||
#include "../LiveBuildEngine/UI/jucer_ComponentListComponent.h"
|
||||
#include "../LiveBuildEngine/jucer_CompileEngineServer.h"
|
||||
|
||||
JUCE_IMPLEMENT_SINGLETON (CompileEngineDLL)
|
||||
|
||||
struct ProjucerAppClasses
|
||||
{
|
||||
#include "../CodeEditor/jucer_LiveBuildCodeEditor.h"
|
||||
#include "../LiveBuildEngine/UI/jucer_ErrorListComponent.h"
|
||||
};
|
||||
|
||||
#include "jucer_CommandLine.h"
|
||||
|
||||
#include "../Project/UI/jucer_ProjectContentComponent.cpp"
|
||||
|
|
|
|||
|
|
@ -376,15 +376,8 @@ void MainWindow::setupTemporaryPIPProject (PIPGenerator& generator)
|
|||
|
||||
currentProject->setTemporaryDirectory (generator.getOutputDirectory());
|
||||
|
||||
ProjectSaver liveBuildSaver (*currentProject);
|
||||
liveBuildSaver.saveContentNeededForLiveBuild();
|
||||
|
||||
if (auto* pcc = getProjectContentComponent())
|
||||
{
|
||||
pcc->invokeDirectly (CommandIDs::toggleBuildEnabled, true);
|
||||
pcc->invokeDirectly (CommandIDs::buildNow, true);
|
||||
pcc->invokeDirectly (CommandIDs::toggleContinuousBuild, true);
|
||||
|
||||
auto fileToDisplay = generator.getPIPFile();
|
||||
|
||||
if (fileToDisplay != File())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue