From bfdda737a2c33640cc4e56f04bb3880ef0cd3887 Mon Sep 17 00:00:00 2001 From: Tom Poole Date: Fri, 14 May 2021 08:18:19 +0100 Subject: [PATCH] Projucer: Removed the live build --- BREAKING-CHANGES.txt | 20 + .../Plugins/InterAppAudioEffectPluginDemo.h | 31 - extras/Projucer/Builds/LinuxMakefile/Makefile | 18 - .../MacOSX/Projucer.xcodeproj/project.pbxproj | 74 -- .../VisualStudio2015/Projucer_App.vcxproj | 26 - .../Projucer_App.vcxproj.filters | 84 -- .../VisualStudio2017/Projucer_App.vcxproj | 26 - .../Projucer_App.vcxproj.filters | 84 -- .../VisualStudio2019/Projucer_App.vcxproj | 26 - .../Projucer_App.vcxproj.filters | 84 -- extras/Projucer/CMakeLists.txt | 3 - extras/Projucer/Projucer.jucer | 56 -- .../Source/Application/jucer_Application.cpp | 133 +-- .../Source/Application/jucer_Application.h | 7 - .../Source/Application/jucer_CommandIDs.h | 17 +- .../Source/Application/jucer_Headers.h | 6 - .../Source/Application/jucer_Main.cpp | 21 - .../Source/Application/jucer_MainWindow.cpp | 7 - .../CodeEditor/jucer_LiveBuildCodeEditor.h | 742 -------------- .../UI/jucer_ErrorListComponent.h | 358 ------- .../LiveBuildEngine/jucer_ActivityList.h | 111 --- .../LiveBuildEngine/jucer_ClassDatabase.h | 731 -------------- .../jucer_ClientServerMessages.h | 295 ------ .../jucer_CompileEngineClient.cpp | 907 ------------------ .../jucer_CompileEngineClient.h | 155 --- .../LiveBuildEngine/jucer_CompileEngineDLL.h | 201 ---- .../jucer_CompileEngineServer.cpp | 307 ------ .../jucer_CompileEngineServer.h | 42 - .../jucer_CompileEngineSettings.h | 109 --- .../Source/LiveBuildEngine/jucer_CppHelpers.h | 283 ------ .../LiveBuildEngine/jucer_DiagnosticMessage.h | 208 ---- .../jucer_DownloadCompileEngineThread.cpp | 166 ---- .../jucer_DownloadCompileEngineThread.h | 53 - .../Source/LiveBuildEngine/jucer_ErrorList.h | 120 --- .../jucer_LiveCodeBuilderDLL.h | 50 - .../Source/LiveBuildEngine/jucer_MessageIDs.h | 63 -- .../LiveBuildEngine/jucer_ProjectBuildInfo.h | 101 -- .../LiveBuildEngine/jucer_SourceCodeRange.h | 105 -- .../Project/UI/Sidebar/jucer_LiveBuildTab.h | 277 ------ .../Project/UI/Sidebar/jucer_ProjectTab.h | 307 ------ .../Source/Project/UI/Sidebar/jucer_Sidebar.h | 558 +++++++++++ .../Project/UI/Sidebar/jucer_TabComponents.h | 297 ------ .../Project/UI/jucer_HeaderComponent.cpp | 114 --- .../Source/Project/UI/jucer_HeaderComponent.h | 14 +- .../UI/jucer_ProjectContentComponent.cpp | 555 +---------- .../UI/jucer_ProjectContentComponent.h | 58 +- .../Projucer/Source/Project/jucer_Project.cpp | 3 - .../Projucer/Source/Project/jucer_Project.h | 5 - .../ProjectSaving/jucer_ProjectSaver.cpp | 13 - .../Source/ProjectSaving/jucer_ProjectSaver.h | 1 - .../Utility/Helpers/jucer_MiscUtilities.cpp | 4 - .../Source/Utility/Helpers/jucer_PresetIDs.h | 4 - .../Source/Utility/UI/jucer_Icons.cpp | 10 - .../Projucer/Source/Utility/UI/jucer_Icons.h | 6 +- .../Utility/UI/jucer_JucerTreeViewBase.cpp | 6 +- .../Utility/UI/jucer_JucerTreeViewBase.h | 2 +- .../Utility/UI/jucer_ProjucerLookAndFeel.cpp | 13 +- .../buffers/juce_AudioSampleBuffer.h | 2 +- .../codecs/oggvorbis/libvorbis-1.3.7/lib/os.h | 2 +- .../AU/CoreAudioUtilityClasses/AUBase.h | 1 - .../AU/CoreAudioUtilityClasses/AUBuffer.h | 2 - .../AUCarbonViewBase.h | 1 - .../AUCarbonViewControl.h | 1 - .../AUOutputElement.cpp | 1 - .../AUScopeElement.cpp | 1 - .../CoreAudioUtilityClasses/CAAUParameter.cpp | 1 - .../CoreAudioUtilityClasses/CADebugMacros.h | 2 - .../CarbonEventHandler.cpp | 1 - .../native/juce_mac_ClangBugWorkaround.h | 41 - .../native/juce_win32_SystemStats.cpp | 4 - .../juce_core/system/juce_TargetPlatform.h | 1 - modules/juce_core/text/juce_String.h | 89 -- .../native/juce_mac_MessageManager.mm | 9 - .../playback/juce_VideoComponent.cpp | 2 +- 74 files changed, 664 insertions(+), 7574 deletions(-) delete mode 100644 extras/Projucer/Source/CodeEditor/jucer_LiveBuildCodeEditor.h delete mode 100644 extras/Projucer/Source/LiveBuildEngine/UI/jucer_ErrorListComponent.h delete mode 100644 extras/Projucer/Source/LiveBuildEngine/jucer_ActivityList.h delete mode 100644 extras/Projucer/Source/LiveBuildEngine/jucer_ClassDatabase.h delete mode 100644 extras/Projucer/Source/LiveBuildEngine/jucer_ClientServerMessages.h delete mode 100644 extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineClient.cpp delete mode 100644 extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineClient.h delete mode 100644 extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineDLL.h delete mode 100644 extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineServer.cpp delete mode 100644 extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineServer.h delete mode 100644 extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineSettings.h delete mode 100644 extras/Projucer/Source/LiveBuildEngine/jucer_CppHelpers.h delete mode 100644 extras/Projucer/Source/LiveBuildEngine/jucer_DiagnosticMessage.h delete mode 100644 extras/Projucer/Source/LiveBuildEngine/jucer_DownloadCompileEngineThread.cpp delete mode 100644 extras/Projucer/Source/LiveBuildEngine/jucer_DownloadCompileEngineThread.h delete mode 100644 extras/Projucer/Source/LiveBuildEngine/jucer_ErrorList.h delete mode 100644 extras/Projucer/Source/LiveBuildEngine/jucer_LiveCodeBuilderDLL.h delete mode 100644 extras/Projucer/Source/LiveBuildEngine/jucer_MessageIDs.h delete mode 100644 extras/Projucer/Source/LiveBuildEngine/jucer_ProjectBuildInfo.h delete mode 100644 extras/Projucer/Source/LiveBuildEngine/jucer_SourceCodeRange.h delete mode 100644 extras/Projucer/Source/Project/UI/Sidebar/jucer_LiveBuildTab.h delete mode 100644 extras/Projucer/Source/Project/UI/Sidebar/jucer_ProjectTab.h create mode 100644 extras/Projucer/Source/Project/UI/Sidebar/jucer_Sidebar.h delete mode 100644 extras/Projucer/Source/Project/UI/Sidebar/jucer_TabComponents.h delete mode 100644 modules/juce_core/native/juce_mac_ClangBugWorkaround.h diff --git a/BREAKING-CHANGES.txt b/BREAKING-CHANGES.txt index 1c3f2b365b..5a931e892d 100644 --- a/BREAKING-CHANGES.txt +++ b/BREAKING-CHANGES.txt @@ -4,6 +4,26 @@ JUCE breaking changes Develop ======= +Change +------ +The live build functionality of the Projucer has been removed. + +Possible Issues +--------------- +You will no longer be able to use live build in the Projucer. + +Workaround +---------- +None. + +Rationale +--------- +Keeping the live build compatible with the latest compilers on all our +supported platforms is a very substantial maintenance burden, but very few +people are using this feature of the Projucer. Removing the live build will +simplify the code and our release process. + + Change ------ `Component::createFocusTraverser()` has been renamed to diff --git a/examples/Plugins/InterAppAudioEffectPluginDemo.h b/examples/Plugins/InterAppAudioEffectPluginDemo.h index 45fea61287..253c839108 100644 --- a/examples/Plugins/InterAppAudioEffectPluginDemo.h +++ b/examples/Plugins/InterAppAudioEffectPluginDemo.h @@ -112,37 +112,6 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SimpleMeter) }; -#if JUCE_PROJUCER_LIVE_BUILD - -// Animate the meter in the Projucer live build. -struct MockSimpleMeter : public Component, - private Timer -{ - MockSimpleMeter() - { - addAndMakeVisible (meter); - resized(); - startTimerHz (100); - } - - void paint (Graphics&) override {} - - void resized() override - { - meter.setBounds (getBounds()); - } - - void timerCallback() override - { - meter.update (std::pow (randomNumberGenerator.nextFloat(), 2)); - } - - SimpleMeter meter; - Random randomNumberGenerator; -}; - -#endif - //============================================================================== // A simple Inter-App Audio plug-in with a gain control and some meters. class IAAEffectProcessor : public AudioProcessor diff --git a/extras/Projucer/Builds/LinuxMakefile/Makefile b/extras/Projucer/Builds/LinuxMakefile/Makefile index 5c1f084d4b..8990f5c4f1 100644 --- a/extras/Projucer/Builds/LinuxMakefile/Makefile +++ b/extras/Projucer/Builds/LinuxMakefile/Makefile @@ -99,9 +99,6 @@ OBJECTS_APP := \ $(JUCE_OBJDIR)/jucer_JucerDocument_ff8afcc2.o \ $(JUCE_OBJDIR)/jucer_ObjectTypes_4406f01c.o \ $(JUCE_OBJDIR)/jucer_PaintRoutine_e1e891ee.o \ - $(JUCE_OBJDIR)/jucer_CompileEngineClient_aee8c99c.o \ - $(JUCE_OBJDIR)/jucer_CompileEngineServer_5d8914.o \ - $(JUCE_OBJDIR)/jucer_DownloadCompileEngineThread_19bb4bb3.o \ $(JUCE_OBJDIR)/jucer_Modules_e20cbd10.o \ $(JUCE_OBJDIR)/jucer_HeaderComponent_1ebf72ba.o \ $(JUCE_OBJDIR)/jucer_Project_c131864a.o \ @@ -298,21 +295,6 @@ $(JUCE_OBJDIR)/jucer_PaintRoutine_e1e891ee.o: ../../Source/ComponentEditor/jucer @echo "Compiling jucer_PaintRoutine.cpp" $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" -$(JUCE_OBJDIR)/jucer_CompileEngineClient_aee8c99c.o: ../../Source/LiveBuildEngine/jucer_CompileEngineClient.cpp - -$(V_AT)mkdir -p $(JUCE_OBJDIR) - @echo "Compiling jucer_CompileEngineClient.cpp" - $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" - -$(JUCE_OBJDIR)/jucer_CompileEngineServer_5d8914.o: ../../Source/LiveBuildEngine/jucer_CompileEngineServer.cpp - -$(V_AT)mkdir -p $(JUCE_OBJDIR) - @echo "Compiling jucer_CompileEngineServer.cpp" - $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" - -$(JUCE_OBJDIR)/jucer_DownloadCompileEngineThread_19bb4bb3.o: ../../Source/LiveBuildEngine/jucer_DownloadCompileEngineThread.cpp - -$(V_AT)mkdir -p $(JUCE_OBJDIR) - @echo "Compiling jucer_DownloadCompileEngineThread.cpp" - $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" - $(JUCE_OBJDIR)/jucer_Modules_e20cbd10.o: ../../Source/Project/Modules/jucer_Modules.cpp -$(V_AT)mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_Modules.cpp" diff --git a/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj b/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj index e65ba8da1f..99361b8ea7 100644 --- a/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj +++ b/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj @@ -53,7 +53,6 @@ 71713DE4716DCEDB45A206E2 /* jucer_OpenDocumentManager.cpp */ = {isa = PBXBuildFile; fileRef = F9111E150CFF155329D44853; }; 7D750EF5FCE1E1A461D435BE /* jucer_PaintElementPath.cpp */ = {isa = PBXBuildFile; fileRef = 4AE72953E3B3DF06D3B9BA86; }; 83431B7234A78ECFB3C15F63 /* jucer_GeneratedCode.cpp */ = {isa = PBXBuildFile; fileRef = 78D0DBC4798FF040FDB90F6D; }; - 85E7FCB0516EFF853FA7B380 /* jucer_CompileEngineServer.cpp */ = {isa = PBXBuildFile; fileRef = D2FE76E4CF003856278343CC; }; 89116B0BD882B51C63A84425 /* jucer_ResourceEditorPanel.cpp */ = {isa = PBXBuildFile; fileRef = 0EE17BE4154CF1B2EE683894; }; 8B4A593B3869815BBAC3EF93 /* AudioUnit.framework */ = {isa = PBXBuildFile; fileRef = 7B3F7ECF6DBF8C8EE5C2CB86; }; 8BE478303CDF061B72F219E2 /* jucer_CodeHelpers.cpp */ = {isa = PBXBuildFile; fileRef = F2E4998FB2C7221587A79F8B; }; @@ -76,10 +75,8 @@ C1B9334AE849F93FB3C56B34 /* AudioToolbox.framework */ = {isa = PBXBuildFile; fileRef = 5A75806B34E4EA6598A6024A; }; C2A85091A28C907A4E1E1687 /* jucer_ComponentLayout.cpp */ = {isa = PBXBuildFile; fileRef = 133F1E428260C5ADDF496DF9; }; C93569F47B4AC1A8E37992ED /* jucer_ObjectTypes.cpp */ = {isa = PBXBuildFile; fileRef = 9D7689451732AF8333402B3A; }; - CC6C4D351BA9B473E5F95791 /* jucer_DownloadCompileEngineThread.cpp */ = {isa = PBXBuildFile; fileRef = ADA538034910F52FDD2DC88D; }; CDEF9FF2D119476D707305DF /* OpenGL.framework */ = {isa = PBXBuildFile; fileRef = 431D30038CBF67F80E8B3A13; }; D0E26EB54B0087C8BE3D541E /* jucer_Icons.cpp */ = {isa = PBXBuildFile; fileRef = 846B2A670C5A19DE0039E11A; }; - D25EBE02B55DB244BE0D5635 /* jucer_CompileEngineClient.cpp */ = {isa = PBXBuildFile; fileRef = DE3E6B2614229FAD56D50770; }; D5C9125F65493CA481F18E53 /* include_juce_cryptography.mm */ = {isa = PBXBuildFile; fileRef = D766BB9D8C32B5560F0493F3; }; DD0FF38F7E8DE0220D73671D /* Foundation.framework */ = {isa = PBXBuildFile; fileRef = BF006EF584FB274FF0319E08; }; EE26A1C2DAAB609362F407EA /* jucer_PaintElementGroup.cpp */ = {isa = PBXBuildFile; fileRef = 988F5C1E40DED02D8B064253; }; @@ -101,7 +98,6 @@ 0462692BAA9CD1BE6DFBCC33 /* include_juce_gui_basics.mm */ /* include_juce_gui_basics.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_gui_basics.mm; path = ../../JuceLibraryCode/include_juce_gui_basics.mm; sourceTree = SOURCE_ROOT; }; 0543E83BF7D7D9234C396E82 /* jucer_ComponentUndoableAction.h */ /* jucer_ComponentUndoableAction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ComponentUndoableAction.h; path = ../../Source/ComponentEditor/Components/jucer_ComponentUndoableAction.h; sourceTree = SOURCE_ROOT; }; 055636565C2F512E40114582 /* jucer_ViewportHandler.h */ /* jucer_ViewportHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ViewportHandler.h; path = ../../Source/ComponentEditor/Components/jucer_ViewportHandler.h; sourceTree = SOURCE_ROOT; }; - 0640E34282A97BF73CC8F1EB /* jucer_ComponentListComponent.h */ /* jucer_ComponentListComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ComponentListComponent.h; path = ../../Source/LiveBuildEngine/UI/jucer_ComponentListComponent.h; sourceTree = SOURCE_ROOT; }; 079802C6AEE7646010766FE8 /* jucer_AudioPluginFilterTemplate.cpp */ /* jucer_AudioPluginFilterTemplate.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_AudioPluginFilterTemplate.cpp; path = ../../Source/BinaryData/Templates/jucer_AudioPluginFilterTemplate.cpp; sourceTree = SOURCE_ROOT; }; 09DE066936CF037E9709ADB1 /* App */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Projucer.app; sourceTree = BUILT_PRODUCTS_DIR; }; 0AE75B0ACD368A4C0FBC2CD0 /* jucer_TabbedComponentHandler.h */ /* jucer_TabbedComponentHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_TabbedComponentHandler.h; path = ../../Source/ComponentEditor/Components/jucer_TabbedComponentHandler.h; sourceTree = SOURCE_ROOT; }; @@ -114,15 +110,12 @@ 124232706D1C8A3CA49E70CD /* jucer_PIPCreatorWindowComponent.h */ /* jucer_PIPCreatorWindowComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_PIPCreatorWindowComponent.h; path = ../../Source/Application/Windows/jucer_PIPCreatorWindowComponent.h; sourceTree = SOURCE_ROOT; }; 129F2DE0FEF154F8F8C7A74E /* gradle-wrapper.jar */ /* gradle-wrapper.jar */ = {isa = PBXFileReference; lastKnownFileType = file.jar; name = "gradle-wrapper.jar"; path = "../../Source/BinaryData/gradle/gradle-wrapper.jar"; sourceTree = SOURCE_ROOT; }; 133F1E428260C5ADDF496DF9 /* jucer_ComponentLayout.cpp */ /* jucer_ComponentLayout.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_ComponentLayout.cpp; path = ../../Source/ComponentEditor/jucer_ComponentLayout.cpp; sourceTree = SOURCE_ROOT; }; - 159DE1FEE2099398983CDDF0 /* jucer_ErrorList.h */ /* jucer_ErrorList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ErrorList.h; path = ../../Source/LiveBuildEngine/jucer_ErrorList.h; sourceTree = SOURCE_ROOT; }; 16751E04B0F3737BDF52CEB4 /* jucer_HeaderComponent.h */ /* jucer_HeaderComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_HeaderComponent.h; path = ../../Source/Project/UI/jucer_HeaderComponent.h; sourceTree = SOURCE_ROOT; }; 169DD91232C070C4D6470B31 /* jucer_IconButton.h */ /* jucer_IconButton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_IconButton.h; path = ../../Source/Utility/UI/jucer_IconButton.h; sourceTree = SOURCE_ROOT; }; - 182CB1F96890620A202C6524 /* jucer_SourceCodeRange.h */ /* jucer_SourceCodeRange.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_SourceCodeRange.h; path = ../../Source/LiveBuildEngine/jucer_SourceCodeRange.h; sourceTree = SOURCE_ROOT; }; 191330B20DAC08B890656EA0 /* jucer_PIPGenerator.cpp */ /* jucer_PIPGenerator.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_PIPGenerator.cpp; path = ../../Source/Utility/PIPs/jucer_PIPGenerator.cpp; sourceTree = SOURCE_ROOT; }; 1B0F18E1D96F727C062B05FA /* jucer_ProjectContentComponent.cpp */ /* jucer_ProjectContentComponent.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_ProjectContentComponent.cpp; path = ../../Source/Project/UI/jucer_ProjectContentComponent.cpp; sourceTree = SOURCE_ROOT; }; 1B5BCD4899A9E295786EB642 /* jucer_OpenDocumentManager.h */ /* jucer_OpenDocumentManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_OpenDocumentManager.h; path = ../../Source/CodeEditor/jucer_OpenDocumentManager.h; sourceTree = SOURCE_ROOT; }; 1B9B5A37F079FE3B3CF8FAB6 /* include_juce_graphics.mm */ /* include_juce_graphics.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_graphics.mm; path = ../../JuceLibraryCode/include_juce_graphics.mm; sourceTree = SOURCE_ROOT; }; - 1C80C7672975C1FF9AAC4A4F /* jucer_ProjectTab.h */ /* jucer_ProjectTab.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ProjectTab.h; path = ../../Source/Project/UI/Sidebar/jucer_ProjectTab.h; sourceTree = SOURCE_ROOT; }; 1D7D2E563E8491643C9F2748 /* jucer_StartPageComponent.h */ /* jucer_StartPageComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_StartPageComponent.h; path = ../../Source/Application/StartPage/jucer_StartPageComponent.h; sourceTree = SOURCE_ROOT; }; 1DCA18E935A35D29D2D9B6A0 /* jucer_ComponentDocument.cpp */ /* jucer_ComponentDocument.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_ComponentDocument.cpp; path = ../../Source/ComponentEditor/Documents/jucer_ComponentDocument.cpp; sourceTree = SOURCE_ROOT; }; 1DE5BBC777FB64798D823002 /* include_juce_data_structures.mm */ /* include_juce_data_structures.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_data_structures.mm; path = ../../JuceLibraryCode/include_juce_data_structures.mm; sourceTree = SOURCE_ROOT; }; @@ -136,18 +129,15 @@ 234251407CD1A499D8A816BB /* jucer_ValueWithDefaultWrapper.h */ /* jucer_ValueWithDefaultWrapper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ValueWithDefaultWrapper.h; path = ../../Source/Utility/Helpers/jucer_ValueWithDefaultWrapper.h; sourceTree = SOURCE_ROOT; }; 23A8DE16C0CDB8EED18B008B /* jucer_CommandIDs.h */ /* jucer_CommandIDs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_CommandIDs.h; path = ../../Source/Application/jucer_CommandIDs.h; sourceTree = SOURCE_ROOT; }; 23D79A22569BEDF63B57DD36 /* jucer_CodeHelpers.h */ /* jucer_CodeHelpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_CodeHelpers.h; path = ../../Source/Utility/Helpers/jucer_CodeHelpers.h; sourceTree = SOURCE_ROOT; }; - 245C81599FB53865A74FC65B /* jucer_ActivityList.h */ /* jucer_ActivityList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ActivityList.h; path = ../../Source/LiveBuildEngine/jucer_ActivityList.h; sourceTree = SOURCE_ROOT; }; 247768B490B9D759DDA79359 /* jucer_UserAvatarComponent.h */ /* jucer_UserAvatarComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_UserAvatarComponent.h; path = ../../Source/Project/UI/jucer_UserAvatarComponent.h; sourceTree = SOURCE_ROOT; }; 24EB4C2412821B8019D6F754 /* jucer_TestComponent.cpp */ /* jucer_TestComponent.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_TestComponent.cpp; path = ../../Source/ComponentEditor/UI/jucer_TestComponent.cpp; sourceTree = SOURCE_ROOT; }; 25BE1265FE6C6EA3473A3A0A /* jucer_ResourceFile.h */ /* jucer_ResourceFile.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ResourceFile.h; path = ../../Source/ProjectSaving/jucer_ResourceFile.h; sourceTree = SOURCE_ROOT; }; 269A454F1FF081DA67FFD578 /* jucer_JucerDocument.cpp */ /* jucer_JucerDocument.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_JucerDocument.cpp; path = ../../Source/ComponentEditor/jucer_JucerDocument.cpp; sourceTree = SOURCE_ROOT; }; 2BD9B4556479A8A41740BCAE /* jucer_ComponentTemplate.h */ /* jucer_ComponentTemplate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ComponentTemplate.h; path = ../../Source/BinaryData/Templates/jucer_ComponentTemplate.h; sourceTree = SOURCE_ROOT; }; 2CD34A70B4032C0426F7AA10 /* jucer_MainWindow.h */ /* jucer_MainWindow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_MainWindow.h; path = ../../Source/Application/jucer_MainWindow.h; sourceTree = SOURCE_ROOT; }; - 2DF5A61F3C497537634773DF /* jucer_ActivityListComponent.h */ /* jucer_ActivityListComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ActivityListComponent.h; path = ../../Source/LiveBuildEngine/UI/jucer_ActivityListComponent.h; sourceTree = SOURCE_ROOT; }; 2EEB1C074162F363C6599282 /* jucer_CommandLine.h */ /* jucer_CommandLine.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_CommandLine.h; path = ../../Source/Application/jucer_CommandLine.h; sourceTree = SOURCE_ROOT; }; 2F0A7CA808B2FCCC9ED68992 /* jucer_LicenseQueryThread.h */ /* jucer_LicenseQueryThread.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_LicenseQueryThread.h; path = ../../Source/Application/UserAccount/jucer_LicenseQueryThread.h; sourceTree = SOURCE_ROOT; }; 2F373F97E30AC1A0BFC1FC61 /* jucer_FilePropertyComponent.h */ /* jucer_FilePropertyComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_FilePropertyComponent.h; path = ../../Source/ComponentEditor/Properties/jucer_FilePropertyComponent.h; sourceTree = SOURCE_ROOT; }; - 308084CBEE9F7D405D72A5E1 /* jucer_CompileEngineClient.h */ /* jucer_CompileEngineClient.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_CompileEngineClient.h; path = ../../Source/LiveBuildEngine/jucer_CompileEngineClient.h; sourceTree = SOURCE_ROOT; }; 32C4B61AD995877956B7FA66 /* jucer_InlineComponentTemplate.h */ /* jucer_InlineComponentTemplate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_InlineComponentTemplate.h; path = ../../Source/BinaryData/Templates/jucer_InlineComponentTemplate.h; sourceTree = SOURCE_ROOT; }; 32ECBC08D903418CA0825870 /* jucer_ContentViewComponents.h */ /* jucer_ContentViewComponents.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ContentViewComponents.h; path = ../../Source/Project/UI/jucer_ContentViewComponents.h; sourceTree = SOURCE_ROOT; }; 332AF94C3275FEA8B878D603 /* jucer_SourceCodeEditor.cpp */ /* jucer_SourceCodeEditor.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_SourceCodeEditor.cpp; path = ../../Source/CodeEditor/jucer_SourceCodeEditor.cpp; sourceTree = SOURCE_ROOT; }; @@ -159,10 +149,8 @@ 364D1A9B113320407A7E57B9 /* JuceHeader.h */ /* JuceHeader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JuceHeader.h; path = ../../JuceLibraryCode/JuceHeader.h; sourceTree = SOURCE_ROOT; }; 36E5FBF64A89D5F2A266A5A7 /* jucer_PaintElementUndoableAction.h */ /* jucer_PaintElementUndoableAction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_PaintElementUndoableAction.h; path = ../../Source/ComponentEditor/PaintElements/jucer_PaintElementUndoableAction.h; sourceTree = SOURCE_ROOT; }; 39597BD78897CB711AFA945A /* jucer_EditingPanelBase.h */ /* jucer_EditingPanelBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_EditingPanelBase.h; path = ../../Source/ComponentEditor/UI/jucer_EditingPanelBase.h; sourceTree = SOURCE_ROOT; }; - 3BBFA655E129C2D817EA47C9 /* jucer_ErrorListComponent.h */ /* jucer_ErrorListComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ErrorListComponent.h; path = ../../Source/LiveBuildEngine/UI/jucer_ErrorListComponent.h; sourceTree = SOURCE_ROOT; }; 3D36F0CEB84B27BD02FC461A /* jucer_LabelPropertyComponent.h */ /* jucer_LabelPropertyComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_LabelPropertyComponent.h; path = ../../Source/Utility/UI/PropertyComponents/jucer_LabelPropertyComponent.h; sourceTree = SOURCE_ROOT; }; 3D6FD9C0065BF16568EC0AB7 /* jucer_SlidingPanelComponent.h */ /* jucer_SlidingPanelComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_SlidingPanelComponent.h; path = ../../Source/Utility/UI/jucer_SlidingPanelComponent.h; sourceTree = SOURCE_ROOT; }; - 3EA27F52A254912218F4DE94 /* jucer_ProjectBuildInfo.h */ /* jucer_ProjectBuildInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ProjectBuildInfo.h; path = ../../Source/LiveBuildEngine/jucer_ProjectBuildInfo.h; sourceTree = SOURCE_ROOT; }; 3F7C5B53347A487C7FBD2223 /* jucer_OpenGLComponentTemplate.h */ /* jucer_OpenGLComponentTemplate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_OpenGLComponentTemplate.h; path = ../../Source/BinaryData/Templates/jucer_OpenGLComponentTemplate.h; sourceTree = SOURCE_ROOT; }; 3F8EC008960DBEB2A5D3C3F4 /* jucer_Headers.h */ /* jucer_Headers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_Headers.h; path = ../../Source/Application/jucer_Headers.h; sourceTree = SOURCE_ROOT; }; 3F9D4C7F6E5779D4E4AE655D /* jucer_ComponentLayout.h */ /* jucer_ComponentLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ComponentLayout.h; path = ../../Source/ComponentEditor/jucer_ComponentLayout.h; sourceTree = SOURCE_ROOT; }; @@ -193,7 +181,6 @@ 52E30AD23A8BE69D5766AF6D /* jucer_NewFileWizard.h */ /* jucer_NewFileWizard.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_NewFileWizard.h; path = ../../Source/Utility/Helpers/jucer_NewFileWizard.h; sourceTree = SOURCE_ROOT; }; 5432B7B9B2CF2EAEC8B66D5C /* jucer_UtilityFunctions.h */ /* jucer_UtilityFunctions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_UtilityFunctions.h; path = ../../Source/ComponentEditor/jucer_UtilityFunctions.h; sourceTree = SOURCE_ROOT; }; 5524B5C9FC6AEAA670B92AA9 /* jucer_ComponentLayoutEditor.h */ /* jucer_ComponentLayoutEditor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ComponentLayoutEditor.h; path = ../../Source/ComponentEditor/UI/jucer_ComponentLayoutEditor.h; sourceTree = SOURCE_ROOT; }; - 55DEDCEB35AA1FB54C74B375 /* jucer_MessageIDs.h */ /* jucer_MessageIDs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_MessageIDs.h; path = ../../Source/LiveBuildEngine/jucer_MessageIDs.h; sourceTree = SOURCE_ROOT; }; 56177921580A4855917E0205 /* jucer_AudioPluginEditorTemplate.h */ /* jucer_AudioPluginEditorTemplate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_AudioPluginEditorTemplate.h; path = ../../Source/BinaryData/Templates/jucer_AudioPluginEditorTemplate.h; sourceTree = SOURCE_ROOT; }; 56749E4C72A8F51ACA8F2330 /* export_clion.svg */ /* export_clion.svg */ = {isa = PBXFileReference; lastKnownFileType = file.svg; name = export_clion.svg; path = ../../Source/BinaryData/Icons/export_clion.svg; sourceTree = SOURCE_ROOT; }; 576A92E1E0D8F453EC0FEB34 /* gradlew.bat */ /* gradlew.bat */ = {isa = PBXFileReference; lastKnownFileType = file.bat; name = gradlew.bat; path = ../../Source/BinaryData/gradle/gradlew.bat; sourceTree = SOURCE_ROOT; }; @@ -215,7 +202,6 @@ 65FAD7F6DF65A72B741C2913 /* jucer_PaintRoutinePanel.h */ /* jucer_PaintRoutinePanel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_PaintRoutinePanel.h; path = ../../Source/ComponentEditor/UI/jucer_PaintRoutinePanel.h; sourceTree = SOURCE_ROOT; }; 6678E9B3EEACAD47F438B264 /* RecentFilesMenuTemplate.nib */ /* RecentFilesMenuTemplate.nib */ = {isa = PBXFileReference; lastKnownFileType = file.nib; name = RecentFilesMenuTemplate.nib; path = RecentFilesMenuTemplate.nib; sourceTree = SOURCE_ROOT; }; 66B49F08C5EC3E4974825FF8 /* jucer_PaintRoutine.h */ /* jucer_PaintRoutine.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_PaintRoutine.h; path = ../../Source/ComponentEditor/jucer_PaintRoutine.h; sourceTree = SOURCE_ROOT; }; - 68C1949F56295D5871C1F223 /* jucer_LiveBuildTab.h */ /* jucer_LiveBuildTab.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_LiveBuildTab.h; path = ../../Source/Project/UI/Sidebar/jucer_LiveBuildTab.h; sourceTree = SOURCE_ROOT; }; 68F41A216E7454E7442AB1F4 /* jucer_TreeItemTypes.h */ /* jucer_TreeItemTypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_TreeItemTypes.h; path = ../../Source/Project/UI/Sidebar/jucer_TreeItemTypes.h; sourceTree = SOURCE_ROOT; }; 69555CEFC6ED613AA3949298 /* juce_data_structures */ /* juce_data_structures */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_data_structures; path = ../../../../modules/juce_data_structures; sourceTree = SOURCE_ROOT; }; 69B478C992FA0B8C885946A6 /* export_linux.svg */ /* export_linux.svg */ = {isa = PBXFileReference; lastKnownFileType = file.svg; name = export_linux.svg; path = ../../Source/BinaryData/Icons/export_linux.svg; sourceTree = SOURCE_ROOT; }; @@ -248,7 +234,6 @@ 85A5E3E71BED93B9A3E07681 /* jucer_PositionPropertyBase.h */ /* jucer_PositionPropertyBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_PositionPropertyBase.h; path = ../../Source/ComponentEditor/Properties/jucer_PositionPropertyBase.h; sourceTree = SOURCE_ROOT; }; 861E52D9AFECADF079BB1F2C /* jucer_ExporterTreeItems.h */ /* jucer_ExporterTreeItems.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ExporterTreeItems.h; path = ../../Source/Project/UI/Sidebar/jucer_ExporterTreeItems.h; sourceTree = SOURCE_ROOT; }; 868B459E02F0877EBE3D56F1 /* jucer_TextEditorHandler.h */ /* jucer_TextEditorHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_TextEditorHandler.h; path = ../../Source/ComponentEditor/Components/jucer_TextEditorHandler.h; sourceTree = SOURCE_ROOT; }; - 8A82061A978B03745485C3AC /* jucer_LiveBuildCodeEditor.h */ /* jucer_LiveBuildCodeEditor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_LiveBuildCodeEditor.h; path = ../../Source/CodeEditor/jucer_LiveBuildCodeEditor.h; sourceTree = SOURCE_ROOT; }; 8C52A3DDA62A746AA7A68535 /* jucer_Main.cpp */ /* jucer_Main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_Main.cpp; path = ../../Source/Application/jucer_Main.cpp; sourceTree = SOURCE_ROOT; }; 8D178CAEE6D89DE33233313F /* jucer_ElementSiblingComponent.h */ /* jucer_ElementSiblingComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ElementSiblingComponent.h; path = ../../Source/ComponentEditor/PaintElements/jucer_ElementSiblingComponent.h; sourceTree = SOURCE_ROOT; }; 8D9A9A373E4621F7CBFCCCEF /* jucer_ContentCompTemplate.cpp */ /* jucer_ContentCompTemplate.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_ContentCompTemplate.cpp; path = ../../Source/BinaryData/Templates/jucer_ContentCompTemplate.cpp; sourceTree = SOURCE_ROOT; }; @@ -257,7 +242,6 @@ 8F30A53C7FE4BC65171FB3E2 /* jucer_JucerDocument.h */ /* jucer_JucerDocument.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_JucerDocument.h; path = ../../Source/ComponentEditor/jucer_JucerDocument.h; sourceTree = SOURCE_ROOT; }; 8F4D281E98808204E2846A7D /* export_xcode.svg */ /* export_xcode.svg */ = {isa = PBXFileReference; lastKnownFileType = file.svg; name = export_xcode.svg; path = ../../Source/BinaryData/Icons/export_xcode.svg; sourceTree = SOURCE_ROOT; }; 8F67F3C0492EAFEBDBBC12DB /* jucer_NewCppFileTemplate.cpp */ /* jucer_NewCppFileTemplate.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_NewCppFileTemplate.cpp; path = ../../Source/BinaryData/Templates/jucer_NewCppFileTemplate.cpp; sourceTree = SOURCE_ROOT; }; - 8F685EFEFD6EE399058DE842 /* jucer_DownloadCompileEngineThread.h */ /* jucer_DownloadCompileEngineThread.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_DownloadCompileEngineThread.h; path = ../../Source/LiveBuildEngine/jucer_DownloadCompileEngineThread.h; sourceTree = SOURCE_ROOT; }; 8F731F1F98BAB42F1C3B96AA /* jucer_ComponentTypeHandler.cpp */ /* jucer_ComponentTypeHandler.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_ComponentTypeHandler.cpp; path = ../../Source/ComponentEditor/Components/jucer_ComponentTypeHandler.cpp; sourceTree = SOURCE_ROOT; }; 8F7BE18698ADCEF51CDE4A5C /* CoreMIDI.framework */ /* CoreMIDI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = System/Library/Frameworks/CoreMIDI.framework; sourceTree = SDKROOT; }; 8FEF6F5EA676B824C021EB6F /* wizard_AnimatedApp.svg */ /* wizard_AnimatedApp.svg */ = {isa = PBXFileReference; lastKnownFileType = file.svg; name = wizard_AnimatedApp.svg; path = ../../Source/BinaryData/Icons/wizard_AnimatedApp.svg; sourceTree = SOURCE_ROOT; }; @@ -267,7 +251,6 @@ 92A66A8BD87F98EB6B4FB6D0 /* jucer_ProjectContentComponent.h */ /* jucer_ProjectContentComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ProjectContentComponent.h; path = ../../Source/Project/UI/jucer_ProjectContentComponent.h; sourceTree = SOURCE_ROOT; }; 94146B40B41BF0AACF4359DD /* jucer_LicenseState.h */ /* jucer_LicenseState.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_LicenseState.h; path = ../../Source/Application/UserAccount/jucer_LicenseState.h; sourceTree = SOURCE_ROOT; }; 951128CA33CCDEF570436B1C /* Icon.icns */ /* Icon.icns */ = {isa = PBXFileReference; lastKnownFileType = file.icns; name = Icon.icns; path = Icon.icns; sourceTree = SOURCE_ROOT; }; - 95EAB6EC9B724538B93910D4 /* jucer_TabComponents.h */ /* jucer_TabComponents.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_TabComponents.h; path = ../../Source/Project/UI/Sidebar/jucer_TabComponents.h; sourceTree = SOURCE_ROOT; }; 983CFBA01CA8811F30FA7F4C /* jucer_MiscUtilities.h */ /* jucer_MiscUtilities.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_MiscUtilities.h; path = ../../Source/Utility/Helpers/jucer_MiscUtilities.h; sourceTree = SOURCE_ROOT; }; 988F5C1E40DED02D8B064253 /* jucer_PaintElementGroup.cpp */ /* jucer_PaintElementGroup.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_PaintElementGroup.cpp; path = ../../Source/ComponentEditor/PaintElements/jucer_PaintElementGroup.cpp; sourceTree = SOURCE_ROOT; }; 9914F905BFCFBE5F76619670 /* jucer_ColouredElement.h */ /* jucer_ColouredElement.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ColouredElement.h; path = ../../Source/ComponentEditor/PaintElements/jucer_ColouredElement.h; sourceTree = SOURCE_ROOT; }; @@ -285,7 +268,6 @@ 9F01BA9942D038EA8B5289A8 /* QTKit.framework */ /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = System/Library/Frameworks/QTKit.framework; sourceTree = SDKROOT; }; 9F2D3E5FC10F7C3270908E97 /* jucer_ButtonDocument.h */ /* jucer_ButtonDocument.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ButtonDocument.h; path = ../../Source/ComponentEditor/Documents/jucer_ButtonDocument.h; sourceTree = SOURCE_ROOT; }; 9F959ECF8CD9B7314AE604A9 /* jucer_LabelHandler.h */ /* jucer_LabelHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_LabelHandler.h; path = ../../Source/ComponentEditor/Components/jucer_LabelHandler.h; sourceTree = SOURCE_ROOT; }; - A081306A9E95CA114B81910F /* jucer_CompileEngineSettings.h */ /* jucer_CompileEngineSettings.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_CompileEngineSettings.h; path = ../../Source/LiveBuildEngine/jucer_CompileEngineSettings.h; sourceTree = SOURCE_ROOT; }; A0BBBFBA13A1308B3CD725D5 /* jucer_ComponentLayoutPanel.h */ /* jucer_ComponentLayoutPanel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ComponentLayoutPanel.h; path = ../../Source/ComponentEditor/UI/jucer_ComponentLayoutPanel.h; sourceTree = SOURCE_ROOT; }; A0ECDAF137029C445910D3ED /* PIPAudioProcessor.cpp.in */ /* PIPAudioProcessor.cpp.in */ = {isa = PBXFileReference; lastKnownFileType = file.in; name = PIPAudioProcessor.cpp.in; path = ../../../Build/CMake/PIPAudioProcessor.cpp.in; sourceTree = SOURCE_ROOT; }; A160AEF56553A658E6EA6A8E /* jucer_MainTemplate_Window.cpp */ /* jucer_MainTemplate_Window.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_MainTemplate_Window.cpp; path = ../../Source/BinaryData/Templates/jucer_MainTemplate_Window.cpp; sourceTree = SOURCE_ROOT; }; @@ -293,16 +275,11 @@ A49503B646A7BD2BEEFC5CBD /* jucer_HyperlinkButtonHandler.h */ /* jucer_HyperlinkButtonHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_HyperlinkButtonHandler.h; path = ../../Source/ComponentEditor/Components/jucer_HyperlinkButtonHandler.h; sourceTree = SOURCE_ROOT; }; A509BC22854D50E4C786EB32 /* jucer_FileGroupInformationComponent.h */ /* jucer_FileGroupInformationComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_FileGroupInformationComponent.h; path = ../../Source/Project/UI/jucer_FileGroupInformationComponent.h; sourceTree = SOURCE_ROOT; }; A66F17E7472E5C19AFE98E46 /* jucer_MainConsoleAppTemplate.cpp */ /* jucer_MainConsoleAppTemplate.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_MainConsoleAppTemplate.cpp; path = ../../Source/BinaryData/Templates/jucer_MainConsoleAppTemplate.cpp; sourceTree = SOURCE_ROOT; }; - A978DFE87D9BB5EFE5B3DAAC /* jucer_CompileEngineDLL.h */ /* jucer_CompileEngineDLL.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_CompileEngineDLL.h; path = ../../Source/LiveBuildEngine/jucer_CompileEngineDLL.h; sourceTree = SOURCE_ROOT; }; - A9954DC7F876A7006743ACB6 /* jucer_DiagnosticMessage.h */ /* jucer_DiagnosticMessage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_DiagnosticMessage.h; path = ../../Source/LiveBuildEngine/jucer_DiagnosticMessage.h; sourceTree = SOURCE_ROOT; }; AA1C44E89D792DDC4867B2C8 /* juce_cryptography */ /* juce_cryptography */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_cryptography; path = ../../../../modules/juce_cryptography; sourceTree = SOURCE_ROOT; }; AAF90697C0F171EFC3984A5D /* jucer_ContentComponents.h */ /* jucer_ContentComponents.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ContentComponents.h; path = ../../Source/Application/StartPage/jucer_ContentComponents.h; sourceTree = SOURCE_ROOT; }; - ADA538034910F52FDD2DC88D /* jucer_DownloadCompileEngineThread.cpp */ /* jucer_DownloadCompileEngineThread.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_DownloadCompileEngineThread.cpp; path = ../../Source/LiveBuildEngine/jucer_DownloadCompileEngineThread.cpp; sourceTree = SOURCE_ROOT; }; - ADD6A3CF5D7DE55E57E8E38B /* jucer_CppHelpers.h */ /* jucer_CppHelpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_CppHelpers.h; path = ../../Source/LiveBuildEngine/jucer_CppHelpers.h; sourceTree = SOURCE_ROOT; }; AECE3914F5119A3D586A5635 /* include_juce_gui_extra.mm */ /* include_juce_gui_extra.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_gui_extra.mm; path = ../../JuceLibraryCode/include_juce_gui_extra.mm; sourceTree = SOURCE_ROOT; }; AEFE3BA0C31EC78A5767A10E /* wizard_DLL.svg */ /* wizard_DLL.svg */ = {isa = PBXFileReference; lastKnownFileType = file.svg; name = wizard_DLL.svg; path = ../../Source/BinaryData/Icons/wizard_DLL.svg; sourceTree = SOURCE_ROOT; }; B1C2F8ED14BF914CD1882708 /* wizard_Openfile.svg */ /* wizard_Openfile.svg */ = {isa = PBXFileReference; lastKnownFileType = file.svg; name = wizard_Openfile.svg; path = ../../Source/BinaryData/Icons/wizard_Openfile.svg; sourceTree = SOURCE_ROOT; }; - B24E3F34C3C4EE54A60C35CC /* jucer_LiveCodeBuilderDLL.h */ /* jucer_LiveCodeBuilderDLL.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_LiveCodeBuilderDLL.h; path = ../../Source/LiveBuildEngine/jucer_LiveCodeBuilderDLL.h; sourceTree = SOURCE_ROOT; }; B2CB95B3F44C3CC5735051A3 /* jucer_JustificationProperty.h */ /* jucer_JustificationProperty.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_JustificationProperty.h; path = ../../Source/ComponentEditor/Properties/jucer_JustificationProperty.h; sourceTree = SOURCE_ROOT; }; B3528C08B84CBC950252EA69 /* jucer_ModulesInformationComponent.h */ /* jucer_ModulesInformationComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ModulesInformationComponent.h; path = ../../Source/Project/UI/jucer_ModulesInformationComponent.h; sourceTree = SOURCE_ROOT; }; B403AF75EAF361ED74EE476E /* jucer_FileHelpers.cpp */ /* jucer_FileHelpers.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_FileHelpers.cpp; path = ../../Source/Utility/Helpers/jucer_FileHelpers.cpp; sourceTree = SOURCE_ROOT; }; @@ -312,7 +289,6 @@ B97D60D2531CFD0D8555BA5C /* jucer_PaintElementText.h */ /* jucer_PaintElementText.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_PaintElementText.h; path = ../../Source/ComponentEditor/PaintElements/jucer_PaintElementText.h; sourceTree = SOURCE_ROOT; }; B9B130F596953116393138DC /* jucer_SourceCodeEditor.h */ /* jucer_SourceCodeEditor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_SourceCodeEditor.h; path = ../../Source/CodeEditor/jucer_SourceCodeEditor.h; sourceTree = SOURCE_ROOT; }; BA159A3B7D129771F5C15EA3 /* juce_core */ /* juce_core */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_core; path = ../../../../modules/juce_core; sourceTree = SOURCE_ROOT; }; - BA186B51EE4884CD8E3F2741 /* jucer_CompileEngineServer.h */ /* jucer_CompileEngineServer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_CompileEngineServer.h; path = ../../Source/LiveBuildEngine/jucer_CompileEngineServer.h; sourceTree = SOURCE_ROOT; }; BAC43B20E14A340CCF14119C /* jucer_Project.cpp */ /* jucer_Project.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_Project.cpp; path = ../../Source/Project/jucer_Project.cpp; sourceTree = SOURCE_ROOT; }; BC3B310D42C489E8B8D93327 /* jucer_DocumentEditorComponent.cpp */ /* jucer_DocumentEditorComponent.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_DocumentEditorComponent.cpp; path = ../../Source/CodeEditor/jucer_DocumentEditorComponent.cpp; sourceTree = SOURCE_ROOT; }; BC623CC67AC58297BF6B4C70 /* jucer_TestComponent.h */ /* jucer_TestComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_TestComponent.h; path = ../../Source/ComponentEditor/UI/jucer_TestComponent.h; sourceTree = SOURCE_ROOT; }; @@ -336,7 +312,6 @@ C76271530EB4458B6146D463 /* jucer_PIPGenerator.h */ /* jucer_PIPGenerator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_PIPGenerator.h; path = ../../Source/Utility/PIPs/jucer_PIPGenerator.h; sourceTree = SOURCE_ROOT; }; CC1C5F8E5DE34223FEC59673 /* jucer_AudioPluginFilterTemplate.h */ /* jucer_AudioPluginFilterTemplate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_AudioPluginFilterTemplate.h; path = ../../Source/BinaryData/Templates/jucer_AudioPluginFilterTemplate.h; sourceTree = SOURCE_ROOT; }; CCD62DB0A19A985A4B9D7F32 /* jucer_ProjectExport_Android.h */ /* jucer_ProjectExport_Android.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ProjectExport_Android.h; path = ../../Source/ProjectSaving/jucer_ProjectExport_Android.h; sourceTree = SOURCE_ROOT; }; - CCEA34A55813C7C4E58254F5 /* jucer_BuildTabStatusComponent.h */ /* jucer_BuildTabStatusComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_BuildTabStatusComponent.h; path = ../../Source/LiveBuildEngine/UI/jucer_BuildTabStatusComponent.h; sourceTree = SOURCE_ROOT; }; CD267A28C16C4E79EB749005 /* gpl_logo.svg */ /* gpl_logo.svg */ = {isa = PBXFileReference; lastKnownFileType = file.svg; name = gpl_logo.svg; path = ../../Source/BinaryData/Icons/gpl_logo.svg; sourceTree = SOURCE_ROOT; }; CF6C8BD0DA3D8CD4E99EBADA /* WebKit.framework */ /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; D00F311BFC3C2625C457CB9B /* Carbon.framework */ /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; }; @@ -344,8 +319,6 @@ D05BD91B6105827B010E1C20 /* juce_gui_extra */ /* juce_gui_extra */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_gui_extra; path = ../../../../modules/juce_gui_extra; sourceTree = SOURCE_ROOT; }; D1739728A79A2062418B8EF0 /* wizard_StaticLibrary.svg */ /* wizard_StaticLibrary.svg */ = {isa = PBXFileReference; lastKnownFileType = file.svg; name = wizard_StaticLibrary.svg; path = ../../Source/BinaryData/Icons/wizard_StaticLibrary.svg; sourceTree = SOURCE_ROOT; }; D1F9B0E9F5D54FE48BEB46EA /* Cocoa.framework */ /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; - D251114072E67CA86D9913D6 /* jucer_ClassDatabase.h */ /* jucer_ClassDatabase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ClassDatabase.h; path = ../../Source/LiveBuildEngine/jucer_ClassDatabase.h; sourceTree = SOURCE_ROOT; }; - D2FE76E4CF003856278343CC /* jucer_CompileEngineServer.cpp */ /* jucer_CompileEngineServer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_CompileEngineServer.cpp; path = ../../Source/LiveBuildEngine/jucer_CompileEngineServer.cpp; sourceTree = SOURCE_ROOT; }; D4EB334E5186D1584EC63CA4 /* jucer_AudioComponentSimpleTemplate.h */ /* jucer_AudioComponentSimpleTemplate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_AudioComponentSimpleTemplate.h; path = ../../Source/BinaryData/Templates/jucer_AudioComponentSimpleTemplate.h; sourceTree = SOURCE_ROOT; }; D5795F8CAC5876714DAB355F /* jucer_AnimatedComponentTemplate.h */ /* jucer_AnimatedComponentTemplate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_AnimatedComponentTemplate.h; path = ../../Source/BinaryData/Templates/jucer_AnimatedComponentTemplate.h; sourceTree = SOURCE_ROOT; }; D5EF5961B1F0E3FAED32E30A /* jucer_ProjectExport_CLion.h */ /* jucer_ProjectExport_CLion.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ProjectExport_CLion.h; path = ../../Source/ProjectSaving/jucer_ProjectExport_CLion.h; sourceTree = SOURCE_ROOT; }; @@ -357,12 +330,10 @@ DA4D0CC5149F7C0FBDAF34A2 /* jucer_PaintElementPath.h */ /* jucer_PaintElementPath.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_PaintElementPath.h; path = ../../Source/ComponentEditor/PaintElements/jucer_PaintElementPath.h; sourceTree = SOURCE_ROOT; }; DB9C8E35DF815B803CB4A9CF /* include_juce_core.mm */ /* include_juce_core.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_core.mm; path = ../../JuceLibraryCode/include_juce_core.mm; sourceTree = SOURCE_ROOT; }; DDC382008FFD9F9E0B2B0EDD /* jucer_SVGPathDataWindowComponent.h */ /* jucer_SVGPathDataWindowComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_SVGPathDataWindowComponent.h; path = ../../Source/Application/Windows/jucer_SVGPathDataWindowComponent.h; sourceTree = SOURCE_ROOT; }; - DE3E6B2614229FAD56D50770 /* jucer_CompileEngineClient.cpp */ /* jucer_CompileEngineClient.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_CompileEngineClient.cpp; path = ../../Source/LiveBuildEngine/jucer_CompileEngineClient.cpp; sourceTree = SOURCE_ROOT; }; DE4A987B2D5529990A6AA9D4 /* jucer_AboutWindowComponent.h */ /* jucer_AboutWindowComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_AboutWindowComponent.h; path = ../../Source/Application/Windows/jucer_AboutWindowComponent.h; sourceTree = SOURCE_ROOT; }; DFBEB8E086832AEB0FBEADF0 /* jucer_StoredSettings.h */ /* jucer_StoredSettings.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_StoredSettings.h; path = ../../Source/Settings/jucer_StoredSettings.h; sourceTree = SOURCE_ROOT; }; E111A336FE13C033EAA0A1D1 /* jucer_NewCppFileTemplate.h */ /* jucer_NewCppFileTemplate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_NewCppFileTemplate.h; path = ../../Source/BinaryData/Templates/jucer_NewCppFileTemplate.h; sourceTree = SOURCE_ROOT; }; E13A54A6D3A1895EACE53E51 /* jucer_ResourceFile.cpp */ /* jucer_ResourceFile.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_ResourceFile.cpp; path = ../../Source/ProjectSaving/jucer_ResourceFile.cpp; sourceTree = SOURCE_ROOT; }; - E1535CDF4258E7D4AB70B5E5 /* jucer_ClientServerMessages.h */ /* jucer_ClientServerMessages.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ClientServerMessages.h; path = ../../Source/LiveBuildEngine/jucer_ClientServerMessages.h; sourceTree = SOURCE_ROOT; }; E1577F8617C75B91D7399812 /* jucer_ImageButtonHandler.h */ /* jucer_ImageButtonHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ImageButtonHandler.h; path = ../../Source/ComponentEditor/Components/jucer_ImageButtonHandler.h; sourceTree = SOURCE_ROOT; }; E186BC01A1B1529937A46485 /* jucer_FileHelpers.h */ /* jucer_FileHelpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_FileHelpers.h; path = ../../Source/Utility/Helpers/jucer_FileHelpers.h; sourceTree = SOURCE_ROOT; }; E266DE67FF319D56F63193A6 /* Info-App.plist */ /* Info-App.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Info-App.plist"; path = "Info-App.plist"; sourceTree = SOURCE_ROOT; }; @@ -525,42 +496,13 @@ name = Documents; sourceTree = ""; }; - 20B39D53B7DAAB53C7533532 /* LiveBuildEngine */ = { - isa = PBXGroup; - children = ( - 9014CA5F3B8D23E883D6975E, - 245C81599FB53865A74FC65B, - D251114072E67CA86D9913D6, - E1535CDF4258E7D4AB70B5E5, - DE3E6B2614229FAD56D50770, - 308084CBEE9F7D405D72A5E1, - A978DFE87D9BB5EFE5B3DAAC, - D2FE76E4CF003856278343CC, - BA186B51EE4884CD8E3F2741, - A081306A9E95CA114B81910F, - ADD6A3CF5D7DE55E57E8E38B, - A9954DC7F876A7006743ACB6, - ADA538034910F52FDD2DC88D, - 8F685EFEFD6EE399058DE842, - 159DE1FEE2099398983CDDF0, - B24E3F34C3C4EE54A60C35CC, - 55DEDCEB35AA1FB54C74B375, - 3EA27F52A254912218F4DE94, - 182CB1F96890620A202C6524, - ); - name = LiveBuildEngine; - sourceTree = ""; - }; 236D186F5A6536C59D6E751C /* Sidebar */ = { isa = PBXGroup; children = ( 861E52D9AFECADF079BB1F2C, 4974E7808F9B57E9A627F878, - 68C1949F56295D5871C1F223, 5E4EB84A7983AB31366A3490, - 1C80C7672975C1FF9AAC4A4F, E3BADF21095BC23DE2CB454F, - 95EAB6EC9B724538B93910D4, 68F41A216E7454E7442AB1F4, ); name = Sidebar; @@ -775,17 +717,6 @@ name = "JUCE Modules"; sourceTree = ""; }; - 9014CA5F3B8D23E883D6975E /* UI */ = { - isa = PBXGroup; - children = ( - 2DF5A61F3C497537634773DF, - CCEA34A55813C7C4E58254F5, - 0640E34282A97BF73CC8F1EB, - 3BBFA655E129C2D817EA47C9, - ); - name = UI; - sourceTree = ""; - }; 92ABB8016546F41128399E9D /* Products */ = { isa = PBXGroup; children = ( @@ -906,7 +837,6 @@ DC3A4B0AD79334BA8A7E0661, F1B44F007A02A0FAE4DC8D79, F6BD840F9A06F2DA891E2CB8, - 20B39D53B7DAAB53C7533532, 89E9055A179B4C2019B4E1AE, 4DCC5D64BBE8DE85360A3D57, EC535A977A1A114BC5DAE7B3, @@ -1000,7 +930,6 @@ BC3B310D42C489E8B8D93327, 51BC758EF5D33197CF543E67, 35CAE8930F2885F9322D22D5, - 8A82061A978B03745485C3AC, F9111E150CFF155329D44853, 1B5BCD4899A9E295786EB642, 332AF94C3275FEA8B878D603, @@ -1151,9 +1080,6 @@ 209FCCC2155A1FCB7E11E20D, C93569F47B4AC1A8E37992ED, 1B988E139004D8E2850EB656, - D25EBE02B55DB244BE0D5635, - 85E7FCB0516EFF853FA7B380, - CC6C4D351BA9B473E5F95791, 0E783907C6214ADD59EC95DC, 05A08E366EBF8D650974E695, 30B921C38DCEE787B294B746, diff --git a/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj b/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj index 76ebb3db94..674d85cc60 100644 --- a/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj +++ b/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj @@ -213,9 +213,6 @@ - - - @@ -1547,7 +1544,6 @@ - @@ -1614,35 +1610,13 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters b/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters index 22606bc95f..0d739cb99b 100644 --- a/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters +++ b/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters @@ -47,12 +47,6 @@ {5F21E507-E5E8-0A74-F1AE-874BB67C26CC} - - {E880260F-D9FB-64B6-244B-6F06B70FE9EE} - - - {0A3B9446-F50B-3D4E-230F-7ED493541A07} - {F5C79836-30DE-9DC7-9392-DAAB3F04C18E} @@ -466,15 +460,6 @@ Projucer\ComponentEditor - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - Projucer\Project\Modules @@ -2031,9 +2016,6 @@ Projucer\CodeEditor - - Projucer\CodeEditor - Projucer\CodeEditor @@ -2232,63 +2214,6 @@ Projucer\ComponentEditor - - Projucer\LiveBuildEngine\UI - - - Projucer\LiveBuildEngine\UI - - - Projucer\LiveBuildEngine\UI - - - Projucer\LiveBuildEngine\UI - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - Projucer\Project\Modules @@ -2304,21 +2229,12 @@ Projucer\Project\UI\Sidebar - - Projucer\Project\UI\Sidebar - Projucer\Project\UI\Sidebar - - Projucer\Project\UI\Sidebar - Projucer\Project\UI\Sidebar - - Projucer\Project\UI\Sidebar - Projucer\Project\UI\Sidebar diff --git a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj index 88333c2fab..09b4b346a6 100644 --- a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj +++ b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj @@ -213,9 +213,6 @@ - - - @@ -1547,7 +1544,6 @@ - @@ -1614,35 +1610,13 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters index 536dd308b6..26759e6a0f 100644 --- a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters +++ b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters @@ -47,12 +47,6 @@ {5F21E507-E5E8-0A74-F1AE-874BB67C26CC} - - {E880260F-D9FB-64B6-244B-6F06B70FE9EE} - - - {0A3B9446-F50B-3D4E-230F-7ED493541A07} - {F5C79836-30DE-9DC7-9392-DAAB3F04C18E} @@ -466,15 +460,6 @@ Projucer\ComponentEditor - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - Projucer\Project\Modules @@ -2031,9 +2016,6 @@ Projucer\CodeEditor - - Projucer\CodeEditor - Projucer\CodeEditor @@ -2232,63 +2214,6 @@ Projucer\ComponentEditor - - Projucer\LiveBuildEngine\UI - - - Projucer\LiveBuildEngine\UI - - - Projucer\LiveBuildEngine\UI - - - Projucer\LiveBuildEngine\UI - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - Projucer\Project\Modules @@ -2304,21 +2229,12 @@ Projucer\Project\UI\Sidebar - - Projucer\Project\UI\Sidebar - Projucer\Project\UI\Sidebar - - Projucer\Project\UI\Sidebar - Projucer\Project\UI\Sidebar - - Projucer\Project\UI\Sidebar - Projucer\Project\UI\Sidebar diff --git a/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj b/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj index ba7ab371de..e6e74ecac9 100644 --- a/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj +++ b/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj @@ -213,9 +213,6 @@ - - - @@ -1547,7 +1544,6 @@ - @@ -1614,35 +1610,13 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj.filters b/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj.filters index 4ea40e97da..1c1d90dd39 100644 --- a/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj.filters +++ b/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj.filters @@ -47,12 +47,6 @@ {5F21E507-E5E8-0A74-F1AE-874BB67C26CC} - - {E880260F-D9FB-64B6-244B-6F06B70FE9EE} - - - {0A3B9446-F50B-3D4E-230F-7ED493541A07} - {F5C79836-30DE-9DC7-9392-DAAB3F04C18E} @@ -466,15 +460,6 @@ Projucer\ComponentEditor - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - Projucer\Project\Modules @@ -2031,9 +2016,6 @@ Projucer\CodeEditor - - Projucer\CodeEditor - Projucer\CodeEditor @@ -2232,63 +2214,6 @@ Projucer\ComponentEditor - - Projucer\LiveBuildEngine\UI - - - Projucer\LiveBuildEngine\UI - - - Projucer\LiveBuildEngine\UI - - - Projucer\LiveBuildEngine\UI - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - - - Projucer\LiveBuildEngine - Projucer\Project\Modules @@ -2304,21 +2229,12 @@ Projucer\Project\UI\Sidebar - - Projucer\Project\UI\Sidebar - Projucer\Project\UI\Sidebar - - Projucer\Project\UI\Sidebar - Projucer\Project\UI\Sidebar - - Projucer\Project\UI\Sidebar - Projucer\Project\UI\Sidebar diff --git a/extras/Projucer/CMakeLists.txt b/extras/Projucer/CMakeLists.txt index 3346e8819f..11f08bcc49 100644 --- a/extras/Projucer/CMakeLists.txt +++ b/extras/Projucer/CMakeLists.txt @@ -66,9 +66,6 @@ target_sources(Projucer PRIVATE Source/ComponentEditor/jucer_JucerDocument.cpp Source/ComponentEditor/jucer_ObjectTypes.cpp Source/ComponentEditor/jucer_PaintRoutine.cpp - Source/LiveBuildEngine/jucer_CompileEngineClient.cpp - Source/LiveBuildEngine/jucer_CompileEngineServer.cpp - Source/LiveBuildEngine/jucer_DownloadCompileEngineThread.cpp Source/Project/Modules/jucer_Modules.cpp Source/Project/UI/jucer_HeaderComponent.cpp Source/Project/jucer_Project.cpp diff --git a/extras/Projucer/Projucer.jucer b/extras/Projucer/Projucer.jucer index 6438920436..6e1961a21e 100644 --- a/extras/Projucer/Projucer.jucer +++ b/extras/Projucer/Projucer.jucer @@ -301,8 +301,6 @@ resource="0" file="Source/CodeEditor/jucer_DocumentEditorComponent.h"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extras/Projucer/Source/Application/jucer_Application.cpp b/extras/Projucer/Source/Application/jucer_Application.cpp index c441a911e2..5907027c6a 100644 --- a/extras/Projucer/Source/Application/jucer_Application.cpp +++ b/extras/Projucer/Source/Application/jucer_Application.cpp @@ -55,56 +55,42 @@ struct ProjucerApplication::MainMenuModel : public MenuBarModel //============================================================================== void ProjucerApplication::initialise (const String& commandLine) { - if (commandLine.trimStart().startsWith ("--server")) - { - initialiseLogger ("Compiler_Log_"); - LookAndFeel::setDefaultLookAndFeel (&lookAndFeel); - - #if JUCE_MAC - Process::setDockIconVisible (false); - #endif + initialiseLogger ("IDE_Log_"); + Logger::writeToLog (SystemStats::getOperatingSystemName()); + Logger::writeToLog ("CPU: " + String (SystemStats::getCpuSpeedInMegahertz()) + + "MHz Cores: " + String (SystemStats::getNumCpus()) + + " " + String (SystemStats::getMemorySizeInMegabytes()) + "MB"); - 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"); - isRunningCommandLine = commandLine.isNotEmpty() - && ! commandLine.startsWith ("-NSDocumentRevisionsDebugMode"); + settings = std::make_unique(); - settings = std::make_unique(); - - if (isRunningCommandLine) - { - auto appReturnCode = performCommandLine (ArgumentList ("Projucer", commandLine)); - - if (appReturnCode != commandLineNotPerformed) - { - setApplicationReturnValue (appReturnCode); - quit(); - return; - } - - isRunningCommandLine = false; - } + if (isRunningCommandLine) + { + auto appReturnCode = performCommandLine (ArgumentList ("Projucer", commandLine)); - if (sendCommandLineToPreexistingInstance()) + if (appReturnCode != commandLineNotPerformed) { - DBG ("Another instance is running - quitting..."); + setApplicationReturnValue (appReturnCode); quit(); return; } - doBasicApplicationSetup(); + isRunningCommandLine = false; + } - // do further initialisation in a moment when the message loop has started - triggerAsyncUpdate(); + 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(); LookAndFeel::setDefaultLookAndFeel (&lookAndFeel); initCommandManager(); - childProcessCache = std::make_unique(); icons = std::make_unique(); } @@ -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 & 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); diff --git a/extras/Projucer/Source/Application/jucer_Application.h b/extras/Projucer/Source/Application/jucer_Application.h index 2bdc86539b..7c85a9b90d 100644 --- a/extras/Projucer/Source/Application/jucer_Application.h +++ b/extras/Projucer/Source/Application/jucer_Application.h @@ -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 commandManager; bool isRunningCommandLine = false; - std::unique_ptr 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; - void* server = nullptr; std::unique_ptr tooltipWindow; AvailableModulesList jucePathModulesList, userPathsModulesList; diff --git a/extras/Projucer/Source/Application/jucer_CommandIDs.h b/extras/Projucer/Source/Application/jucer_CommandIDs.h index 14e6e2a214..b4003ab591 100644 --- a/extras/Projucer/Source/Application/jucer_CommandIDs.h +++ b/extras/Projucer/Source/Application/jucer_CommandIDs.h @@ -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, diff --git a/extras/Projucer/Source/Application/jucer_Headers.h b/extras/Projucer/Source/Application/jucer_Headers.h index 2d73570bf7..8eb59ac193 100644 --- a/extras/Projucer/Source/Application/jucer_Headers.h +++ b/extras/Projucer/Source/Application/jucer_Headers.h @@ -27,9 +27,3 @@ #include #include "jucer_CommonHeaders.h" - -#if JUCE_DEBUG - #define RUN_CLANG_IN_CHILD_PROCESS 1 -#else - #define RUN_CLANG_IN_CHILD_PROCESS 1 -#endif diff --git a/extras/Projucer/Source/Application/jucer_Main.cpp b/extras/Projucer/Source/Application/jucer_Main.cpp index 0bc46595e7..ca1d4f53a8 100644 --- a/extras/Projucer/Source/Application/jucer_Main.cpp +++ b/extras/Projucer/Source/Application/jucer_Main.cpp @@ -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" diff --git a/extras/Projucer/Source/Application/jucer_MainWindow.cpp b/extras/Projucer/Source/Application/jucer_MainWindow.cpp index d92892ff45..366d8839a4 100644 --- a/extras/Projucer/Source/Application/jucer_MainWindow.cpp +++ b/extras/Projucer/Source/Application/jucer_MainWindow.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()) diff --git a/extras/Projucer/Source/CodeEditor/jucer_LiveBuildCodeEditor.h b/extras/Projucer/Source/CodeEditor/jucer_LiveBuildCodeEditor.h deleted file mode 100644 index a80c6e9a67..0000000000 --- a/extras/Projucer/Source/CodeEditor/jucer_LiveBuildCodeEditor.h +++ /dev/null @@ -1,742 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2020 - Raw Material Software Limited - - JUCE is an open source library subject to commercial or open-source - licensing. - - By using JUCE, you agree to the terms of both the JUCE 6 End-User License - Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). - - End User License Agreement: www.juce.com/juce-6-licence - Privacy Policy: www.juce.com/juce-privacy-policy - - Or: You may also use this code under the terms of the GPL v3 (see - www.gnu.org/licenses). - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -#pragma once - -class LiveBuildCodeEditorDocument; - -//============================================================================== -class LiveBuildCodeEditor : public CppCodeEditorComponent, - private Timer -{ -public: - LiveBuildCodeEditor (LiveBuildCodeEditorDocument& edDoc, CodeDocument& doc) - : CppCodeEditorComponent (edDoc.getFile(), doc), - editorDoc (edDoc), - classList (*this, edDoc) - { - } - - ~LiveBuildCodeEditor() override - { - for (int i = getNumChildComponents(); --i >= 0;) - if (auto* c = dynamic_cast (getChildComponent (i))) - delete c; - } - - CompileEngineChildProcess::Ptr getChildProcess() const - { - return editorDoc.getChildProcess(); - } - - Component* addDiagnosticOverlay (CodeDocument::Position start, CodeDocument::Position end, - DiagnosticMessage::Type diagType) - { - auto* d = new DiagnosticOverlayComponent (*this, start, end, diagType); - addAndMakeVisible (d); - return d; - } - -private: - LiveBuildCodeEditorDocument& editorDoc; - - //============================================================================== - struct OverlayComponent : public Component, - private GenericCodeEditorComponent::Listener, - private CodeDocument::Listener - { - OverlayComponent (CodeDocument::Position start, - CodeDocument::Position end) - : startPosition (start), - endPosition (end) - { - startPosition.setPositionMaintained (true); - endPosition.setPositionMaintained (true); - } - - ~OverlayComponent() override - { - setEditor (nullptr); - } - - void setEditor (GenericCodeEditorComponent* editor) - { - if (editor != codeEditor) - { - if (codeEditor != nullptr) - { - codeEditor->removeListener (this); - codeEditor->getDocument().removeListener (this); - codeEditor->removeChildComponent (this); - } - - codeEditor = editor; - - if (codeEditor != nullptr) - { - codeEditor->addListener (this); - codeEditor->getDocument().addListener (this); - codeEditor->addAndMakeVisible (this); - } - - if (editor != nullptr) - updatePosition(); - } - } - - void codeEditorViewportMoved (CodeEditorComponent& editor) override - { - setEditor (dynamic_cast (&editor)); - updatePosition(); - } - - void codeDocumentTextInserted (const String&, int) override { updatePosition(); } - void codeDocumentTextDeleted (int, int) override { updatePosition(); } - - void parentSizeChanged() override - { - updatePosition(); - } - - virtual void updatePosition() = 0; - - Component::SafePointer codeEditor; - CodeDocument::Position startPosition, endPosition; - }; - - //============================================================================== - struct LaunchClassOverlayComponent : public OverlayComponent - { - LaunchClassOverlayComponent (GenericCodeEditorComponent& editor, - CodeDocument::Position start, CodeDocument::Position end, - const String className) - : OverlayComponent (start, end), - launchButton (className.fromLastOccurrenceOf ("::", false, false)), - name (className) - { - setAlwaysOnTop (true); - setEditor (&editor); - addAndMakeVisible (launchButton); - } - - void updatePosition() override - { - if (codeEditor != nullptr) - { - jassert (isVisible()); - - const auto charArea = codeEditor->getCharacterBounds (startPosition); - const int height = charArea.getHeight() + 8; - - Font f ((float) height * 0.7f); - - const int width = jmin (height * 2 + f.getStringWidth (launchButton.getName()), - jmax (120, codeEditor->proportionOfWidth (0.2f))); - - setBounds (codeEditor->getWidth() - width - 10, charArea.getY() - 4, - width, height); - } - } - - void resized() override - { - launchButton.setBounds (getLocalBounds()); - } - - struct LaunchButton : public Button - { - LaunchButton (const String& nm) : Button (nm) - { - setMouseCursor (MouseCursor::PointingHandCursor); - } - - void paintButton (Graphics& g, bool isMouseOverButton, bool isButtonDown) override - { - Colour background (findColour (CodeEditorComponent::backgroundColourId) - .contrasting() - .overlaidWith (Colours::yellow.withAlpha (0.5f)) - .withAlpha (0.4f)); - g.setColour (background); - g.fillRoundedRectangle (getLocalBounds().toFloat(), 3.0f); - - const Path& path = getIcons().play; - - Colour col (background.contrasting (Colours::lightgreen, 0.6f)); - - Rectangle r (getLocalBounds().reduced (getHeight() / 5)); - - Icon (path, col.withAlpha (isButtonDown ? 1.0f : (isMouseOverButton ? 0.8f : 0.5f))) - .draw (g, r.removeFromLeft (getHeight()).toFloat(), false); - - g.setColour (Colours::white); - g.setFont ((float) getHeight() * 0.7f); - g.drawFittedText (getName(), r, Justification::centredLeft, 1); - } - - void clicked() override - { - if (auto* l = findParentComponentOfClass()) - l->launch(); - } - - using Button::clicked; - }; - - void launch() - { - if (auto* e = findParentComponentOfClass()) - e->launch (name); - } - - private: - LaunchButton launchButton; - String name; - }; - - struct ComponentClassList : private Timer - { - ComponentClassList (GenericCodeEditorComponent& e, LiveBuildCodeEditorDocument& edDoc) - : owner (e), - childProcess (edDoc.getChildProcess()), - file (edDoc.getFile()) - { - startTimer (600); - } - - ~ComponentClassList() override - { - deleteOverlays(); - } - - void timerCallback() override - { - Array> newClasses; - - if (childProcess != nullptr) - const_cast (childProcess->getComponentList()).globalNamespace.findClassesDeclaredInFile (newClasses, file); - - for (int i = newClasses.size(); --i >= 0;) - { - auto& c = newClasses.getReference (i); - - if (c == nullptr || ! c->getInstantiationFlags().canBeInstantiated()) - newClasses.remove (i); - } - - if (newClasses != classes) - { - classes = newClasses; - deleteOverlays(); - - for (auto c : classes) - { - if (c != nullptr) - { - CodeDocument::Position pos (owner.getDocument(), c->getClassDeclarationRange().range.getStart()); - overlays.add (new LaunchClassOverlayComponent (owner, pos, pos, c->getName())); - } - } - } - } - - void deleteOverlays() - { - for (auto& o : overlays) - o.deleteAndZero(); - - overlays.clear(); - } - - GenericCodeEditorComponent& owner; - CompileEngineChildProcess::Ptr childProcess; - File file; - Array> classes; - Array> overlays; - - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ComponentClassList) - }; - - ComponentClassList classList; - - //============================================================================== - struct DiagnosticOverlayComponent : public OverlayComponent - { - DiagnosticOverlayComponent (GenericCodeEditorComponent& editor, - CodeDocument::Position start, CodeDocument::Position end, - DiagnosticMessage::Type diagType) - : OverlayComponent (start, end), diagnosticType (diagType) - { - setInterceptsMouseClicks (false, false); - setEditor (&editor); - } - - void updatePosition() override - { - if (codeEditor != nullptr) - { - jassert (isVisible()); - - const auto charStartRect = codeEditor->getCharacterBounds (startPosition); - const auto charEndRect = codeEditor->getCharacterBounds (endPosition); - - auto charHeight = charStartRect.getHeight(); - const auto editorBounds = codeEditor->getBounds(); - - arrowXMin = static_cast (jmin (charStartRect.getX(), charEndRect.getX())); - arrowXMax = static_cast (jmax (charStartRect.getX() + charStartRect.getWidth(), charEndRect.getX() + charEndRect.getWidth())); - - lineYMin = charStartRect.getY(); - lineOffset = charHeight; - - setBounds (0, lineYMin, editorBounds.getWidth(), lineOffset + charHeight); - repaint(); - } - } - - void paint (Graphics& g) override - { - const auto diagColour = diagnosticType == DiagnosticMessage::Type::error ? Colours::red - : Colour (200, 200, 64); - - g.setColour (diagColour.withAlpha (0.2f)); - g.fillRect (getLocalBounds().withTrimmedBottom (lineOffset)); - - Path path; - const float bottomY = (float) getHeight() - ((float) lineOffset / 2.0f); - path.addTriangle ((float) arrowXMin, bottomY, - (float) (arrowXMax + arrowXMin) / 2.0f, (float) lineOffset, - (float) arrowXMax, bottomY); - - g.setColour (diagColour.withAlpha (0.8f)); - g.fillPath (path); - } - - private: - int arrowXMin, arrowXMax; - int lineYMin, lineOffset; - const DiagnosticMessage::Type diagnosticType; - }; - - //============================================================================== - void timerCallback() override - { - if (isMouseButtonDownAnywhere()) - return; - - MouseInputSource mouse = Desktop::getInstance().getMainMouseSource(); - Component* underMouse = mouse.getComponentUnderMouse(); - - if (underMouse != nullptr - && (dynamic_cast (underMouse) != nullptr - || underMouse->findParentComponentOfClass() != nullptr)) - return; - - overlay.reset(); - - if (hasKeyboardFocus (true) && underMouse != nullptr - && (underMouse == this || underMouse->isParentOf (this))) - { - Point mousePos = getLocalPoint (nullptr, mouse.getScreenPosition()).toInt(); - - CodeDocument::Position start, end; - getDocument().findTokenContaining (getPositionAt (mousePos.x, mousePos.y), start, end); - - if (end.getPosition() > start.getPosition()) - { - Range selection = optimiseSelection ({ start.getPosition(), end.getPosition() }); - - String text = getTextInRange (selection).toLowerCase(); - - if (isIntegerLiteral (text) || isFloatLiteral (text)) - overlay.reset (new LiteralHighlightOverlay (*this, selection, mightBeColourValue (text))); - } - } - - startTimerHz (10); - } - - void hideOverlay() - { - stopTimer(); - overlay.reset(); - } - - void focusLost (FocusChangeType) override - { - if (CompileEngineChildProcess::Ptr childProcess = getChildProcess()) - childProcess->flushEditorChanges(); - } - - void mouseMove (const MouseEvent& e) override - { - if (overlay == nullptr) - startTimer (100); - - CppCodeEditorComponent::mouseMove (e); - } - - void mouseDrag (const MouseEvent& e) override - { - if (e.getDistanceFromDragStart() > 0) - hideOverlay(); - - CppCodeEditorComponent::mouseDrag (e); - } - - void mouseDown (const MouseEvent& e) override - { - CppCodeEditorComponent::mouseDown (e); - } - - void mouseUp (const MouseEvent& e) override - { - CppCodeEditorComponent::mouseUp (e); - } - - bool keyPressed (const KeyPress& key) override - { - hideOverlay(); - return CppCodeEditorComponent::keyPressed (key); - } - - static bool isIntegerLiteral (const String& text) { return CppParserHelpers::parseSingleToken (text) == CPlusPlusCodeTokeniser::tokenType_integer; } - static bool isFloatLiteral (const String& text) { return CppParserHelpers::parseSingleToken (text) == CPlusPlusCodeTokeniser::tokenType_float; } - - static bool mightBeColourValue (const String& text) - { - return isIntegerLiteral (text) - && text.trim().startsWith ("0x") - && text.trim().length() > 7; - } - - Range optimiseSelection (Range selection) - { - String text (getTextInRange (selection)); - - if (CharacterFunctions::isDigit (text[0]) || text[0] == '.') - if (getTextInRange (Range (selection.getStart() - 1, selection.getStart())) == "-") - selection.setStart (selection.getStart() - 1); - - selection.setStart (selection.getStart() + (text.length() - text.trimStart().length())); - selection.setEnd (selection.getEnd() - (text.length() - text.trimEnd().length())); - - return selection; - } - - void launch (const String& name) - { - if (CompileEngineChildProcess::Ptr p = getChildProcess()) - if (auto* cls = p->getComponentList().globalNamespace.findClass (name)) - p->openPreview (*cls); - } - - //============================================================================== - class ControlsComponent : public Component, - private ChangeListener - { - public: - ControlsComponent (CodeDocument& doc, const Range& selection, - CompileEngineChildProcess::Ptr cp, bool showColourSelector) - : document (doc), - start (doc, selection.getStart()), - end (doc, selection.getEnd()), - childProcess (cp) - { - slider.setTextBoxStyle (Slider::NoTextBox, true, 0, 0); - slider.setWantsKeyboardFocus (false); - slider.setMouseClickGrabsKeyboardFocus (false); - setWantsKeyboardFocus (false); - setMouseClickGrabsKeyboardFocus (false); - addAndMakeVisible (&slider); - updateRange(); - slider.onValueChange = [this] { updateSliderValue(); }; - slider.onDragEnd = [this] { updateRange(); }; - - if (showColourSelector) - { - updateColourSelector(); - selector.setWantsKeyboardFocus (false); - selector.setMouseClickGrabsKeyboardFocus (false); - addAndMakeVisible (&selector); - setSize (400, sliderHeight + 400); - selector.addChangeListener (this); - } - else - { - setSize (400, sliderHeight); - } - - end.setPositionMaintained (true); - } - - void updateRange() - { - double v = getValue(); - - if (isFloat()) - slider.setRange (v - 10, v + 10); - else - slider.setRange (v - 100, v + 100); - - slider.setValue (v, dontSendNotification); - } - - private: - Slider slider; - ColourSelector selector; - - CodeDocument& document; - CodeDocument::Position start, end; - CompileEngineChildProcess::Ptr childProcess; - - static const int sliderHeight = 26; - - void paint (Graphics& g) override - { - g.setColour (LiteralHighlightOverlay::getBackgroundColour()); - g.fillRoundedRectangle (getLocalBounds().toFloat(), 8.0f); - } - - void updateSliderValue() - { - const String oldText (document.getTextBetween (start, end)); - const String newText (CppParserHelpers::getReplacementStringInSameFormat (oldText, slider.getValue())); - - if (oldText != newText) - document.replaceSection (start.getPosition(), end.getPosition(), newText); - - if (childProcess != nullptr) - childProcess->flushEditorChanges(); - - updateColourSelector(); - } - - void changeListenerCallback (ChangeBroadcaster*) override - { - setNewColour (selector.getCurrentColour()); - } - - void updateColourSelector() - { - selector.setCurrentColour (getCurrentColour()); - } - - Colour getCurrentColour() const - { - int64 val; - if (CppParserHelpers::parseInt (document.getTextBetween (start, end), val)) - return Colour ((uint32) val); - - return Colours::white; - } - - void setNewColour (const Colour& c) - { - const String oldText (document.getTextBetween (start, end)); - const String newText (CppParserHelpers::getReplacementStringInSameFormat (oldText, (int64) c.getARGB())); - - if (oldText != newText) - document.replaceSection (start.getPosition(), end.getPosition(), newText); - - if (childProcess != nullptr) - childProcess->flushEditorChanges(); - } - - void resized() override - { - Rectangle r (getLocalBounds()); - - slider.setBounds (r.removeFromTop (sliderHeight)); - - r.removeFromTop (10); - - if (selector.isVisible()) - selector.setBounds (r); - - } - - double getValue() const - { - const String text (document.getTextBetween (start, end)); - - if (text.containsChar ('.')) - { - double f; - if (CppParserHelpers::parseFloat (text, f)) - return f; - } - else - { - int64 val; - if (CppParserHelpers::parseInt (text, val)) - return (double) val; - } - - jassertfalse; - return 0; - } - - bool isFloat() const - { - return document.getTextBetween (start, end).containsChar ('.'); - } - }; - - //============================================================================== - struct LiteralHighlightOverlay : public Component, - private CodeDocument::Listener - { - LiteralHighlightOverlay (LiveBuildCodeEditor& e, Range section, bool showColourSelector) - : owner (e), - start (e.getDocument(), section.getStart()), - end (e.getDocument(), section.getEnd()), - controls (e.getDocument(), section, e.getChildProcess(), showColourSelector) - { - if (e.hasKeyboardFocus (true)) - previouslyFocused = Component::getCurrentlyFocusedComponent(); - - start.setPositionMaintained (true); - end.setPositionMaintained (true); - - setInterceptsMouseClicks (false, false); - - if (Component* parent = owner.findParentComponentOfClass()) - parent->addAndMakeVisible (controls); - else - jassertfalse; - - owner.addAndMakeVisible (this); - toBack(); - - updatePosition(); - - owner.getDocument().addListener (this); - } - - ~LiteralHighlightOverlay() override - { - if (auto* p = getParentComponent()) - { - p->removeChildComponent (this); - - if (previouslyFocused != nullptr && ! previouslyFocused->hasKeyboardFocus (true)) - previouslyFocused->grabKeyboardFocus(); - } - - owner.getDocument().removeListener (this); - } - - void paint (Graphics& g) override - { - g.setColour (getBackgroundColour()); - - Rectangle r (getLocalBounds()); - g.fillRect (r.removeFromTop (borderSize)); - g.fillRect (r.removeFromLeft (borderSize)); - g.fillRect (r.removeFromRight (borderSize)); - } - - void updatePosition() - { - Rectangle area = owner.getCharacterBounds (start) - .getUnion (owner.getCharacterBounds (end.movedBy (-1))) - .expanded (borderSize) - .withTrimmedBottom (borderSize); - - setBounds (getParentComponent()->getLocalArea (&owner, area)); - - area.setPosition (area.getX() - controls.getWidth() / 2, area.getBottom()); - area.setSize (controls.getWidth(), controls.getHeight()); - - controls.setBounds (controls.getParentComponent()->getLocalArea (&owner, area)); - } - - void codeDocumentTextInserted (const String&, int) override { updatePosition(); } - void codeDocumentTextDeleted (int, int) override { updatePosition(); } - - LiveBuildCodeEditor& owner; - CodeDocument::Position start, end; - ControlsComponent controls; - Component::SafePointer previouslyFocused; - - static const int borderSize = 4; - static Colour getBackgroundColour() { return Colour (0xcb5c7879); } - }; - - std::unique_ptr overlay; -}; - -//============================================================================== -class LiveBuildCodeEditorDocument : public SourceCodeDocument -{ -public: - LiveBuildCodeEditorDocument (Project* projectToUse, const File& file) - : SourceCodeDocument (projectToUse, file) - { - if (projectToUse != nullptr) - if (CompileEngineChildProcess::Ptr childProcess = getChildProcess()) - childProcess->editorOpened (file, getCodeDocument()); - } - - struct Type : public SourceCodeDocument::Type - { - Document* openFile (Project* proj, const File& file) override - { - return new LiveBuildCodeEditorDocument (proj, file); - } - }; - - std::unique_ptr createEditor() override - { - auto e = fileNeedsCppSyntaxHighlighting (getFile()) ? std::make_unique (this, new LiveBuildCodeEditor (*this, getCodeDocument())) - : std::make_unique (this, getCodeDocument()); - - applyLastState (*(e->editor)); - - JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wredundant-move") - return std::move (e); - JUCE_END_IGNORE_WARNINGS_GCC_LIKE - } - - // override save() to make a few more attempts at saving if it fails, since on Windows - // the compiler can interfere with things saving.. - bool save() override - { - for (int i = 5; --i >= 0;) - { - if (SourceCodeDocument::save()) // should already re-try for up to half a second - return true; - - Thread::sleep (100); - } - - return false; - } - - CompileEngineChildProcess::Ptr getChildProcess() const - { - return ProjucerApplication::getApp().childProcessCache->getExisting (*project); - } -}; diff --git a/extras/Projucer/Source/LiveBuildEngine/UI/jucer_ErrorListComponent.h b/extras/Projucer/Source/LiveBuildEngine/UI/jucer_ErrorListComponent.h deleted file mode 100644 index f290bf0d45..0000000000 --- a/extras/Projucer/Source/LiveBuildEngine/UI/jucer_ErrorListComponent.h +++ /dev/null @@ -1,358 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2020 - Raw Material Software Limited - - JUCE is an open source library subject to commercial or open-source - licensing. - - By using JUCE, you agree to the terms of both the JUCE 6 End-User License - Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). - - End User License Agreement: www.juce.com/juce-6-licence - Privacy Policy: www.juce.com/juce-privacy-policy - - Or: You may also use this code under the terms of the GPL v3 (see - www.gnu.org/licenses). - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -#pragma once - - -//============================================================================== -class ErrorListComp : public TreePanelBase, - private ChangeListener -{ -public: - ErrorListComp (ErrorList& el) - : TreePanelBase (nullptr, String()), - errorList (el) - { - setName ("Errors and Warnings"); - setEmptyTreeMessage ("(No Messages)"); - - tree.setMultiSelectEnabled (false); - tree.setRootItemVisible (false); - setRoot (new ErrorRootTreeItem (errorList)); - - errorList.addChangeListener (this); - errorListChanged(); - } - - ~ErrorListComp() override - { - errorList.removeChangeListener (this); - } - - void errorListChanged() - { - static_cast (rootItem.get())->refreshSubItems(); - } - - void moveBy (const int delta) - { - if (delta < 0) - if (TreeViewItem* selected = tree.getSelectedItem (0)) - if (selected->getRowNumberInTree() <= 1) - return; - - tree.moveSelectedRow (delta); - - if (dynamic_cast (tree.getSelectedItem (0)) == nullptr) - tree.moveSelectedRow (delta); - } - - void showNext() { moveBy (1); } - void showPrevious() { moveBy (-1); } - -private: - TreeView list; - ErrorList& errorList; - struct ErrorMessageTreeItem; - - void changeListenerCallback (ChangeBroadcaster*) override - { - errorListChanged(); - } - - static void limitNumberOfSubItems (TreeViewItem& item, const int maxSubItems) - { - while (item.getNumSubItems() > maxSubItems) - item.removeSubItem (item.getNumSubItems() - 1); - } - - //============================================================================== - class ErrorRootTreeItem : public JucerTreeViewBase - { - public: - ErrorRootTreeItem (ErrorList& el) : errorList (el) {} - - String getRenamingName() const override { return getDisplayName(); } - String getDisplayName() const override { return "Errors and Warnings"; } - void setName (const String&) override {} - bool isMissing() const override { return false; } - Icon getIcon() const override { return Icon (getIcons().bug, getContentColour (true)); } - bool canBeSelected() const override { return true; } - bool mightContainSubItems() override { return true; } - String getUniqueName() const override { return "errors"; } - - void refreshSubItems() - { - Array errors; - errorList.takeCopy (errors); - - StringArray files; - - for (const auto& m : errors) - { - files.addIfNotAlreadyThere (m.mainFile); - - if (m.associatedDiagnostic != nullptr) - files.addIfNotAlreadyThere (m.associatedDiagnostic->mainFile); - } - - limitNumberOfSubItems (*this, files.size()); - - int i = 0; - - for (const auto& f : files) - { - if (i >= getNumSubItems() || static_cast (getSubItem (i))->compileUnit != f) - { - limitNumberOfSubItems (*this, i); - addSubItem (new CompileUnitTreeItem (f)); - } - - static_cast (getSubItem (i))->refresh (errors); - ++i; - } - } - - private: - ErrorList& errorList; - }; - - //============================================================================== - struct CompileUnitTreeItem : public JucerTreeViewBase - { - CompileUnitTreeItem (const String& filename) : compileUnit (filename) {} - - void setName (const String&) override {} - void addSubItems() override {} - bool isMissing() const override { return false; } - Icon getIcon() const override { return Icon (getIcons().bug, getContentColour (true)); } - bool canBeSelected() const override { return true; } - bool mightContainSubItems() override { return true; } - String getUniqueName() const override { return String::toHexString (compileUnit.hashCode64()); } - - String getRenamingName() const override { return getDisplayName(); } - String getDisplayName() const override - { - if (File::isAbsolutePath (compileUnit)) - { - File f (compileUnit); - return f.exists() ? f.getFileName() : compileUnit; - } - - if (! compileUnit.isEmpty()) - return compileUnit; - - return String ("Global"); - } - - void showOverlays() - { - for (int i = 0; i < getNumSubItems(); ++i) - if (auto* e = dynamic_cast (getSubItem (i))) - e->showOverlays(); - } - - ErrorMessageTreeItem* getItemForError (const DiagnosticMessage& m) const - { - for (int i = 0; i < getNumSubItems(); ++i) - if (auto* item = dynamic_cast (getSubItem(i))) - if (item->message == m) - return item; - - return nullptr; - } - - void refresh (const Array& allErrors) - { - clearSubItems(); - - for (const auto& error : allErrors) - if (error.mainFile == compileUnit && error.associatedDiagnostic == nullptr) - addSubItem (new ErrorMessageTreeItem (error)); - - for (const auto& error : allErrors) - if (error.mainFile == compileUnit && error.associatedDiagnostic != nullptr) - if (ErrorMessageTreeItem* parent = getItemForError (*error.associatedDiagnostic)) - parent->addSubItem (new ErrorMessageTreeItem (error)); - } - - void showDocument() override - { - if (ProjectContentComponent* pcc = getProjectContentComponent()) - if (File::isAbsolutePath (compileUnit) && File (compileUnit).exists()) - pcc->showEditorForFile (File (compileUnit), true); - } - - String compileUnit; - }; - - //============================================================================== - struct ErrorMessageTreeItem : public JucerTreeViewBase - { - ErrorMessageTreeItem (const DiagnosticMessage& m) - : message (m), itemHeight (25) - { - setOpenness (Openness::opennessClosed); - uniqueID << message.message << ':' << message.range.toString(); - } - - ~ErrorMessageTreeItem() override - { - overlay.deleteAndZero(); - } - - String getRenamingName() const override { return getDisplayName(); } - String getDisplayName() const override { return message.message; } - void setName (const String&) override {} - bool isMissing() const override { return false; } - Icon getIcon() const override { return Icon (message.isNote() ? getIcons().info - : getIcons().warning, getContentColour (true)); } - bool canBeSelected() const override { return true; } - bool mightContainSubItems() override { return getNumSubItems() != 0; } - String getUniqueName() const override { return uniqueID; } - - void paintContent (Graphics& g, Rectangle area) override - { - jassert (area.getWidth() >= 0); - - AttributedString s (message.message); - s.setFont (Font (12.0f)); - s.setColour (getContentColour (false)); - s.setJustification (Justification::centredLeft); - - text.createLayout (s, (float) area.getWidth()); - - const auto newHeight = 2 + jmax (25, (int) text.getHeight()); - if (itemHeight != newHeight) - { - itemHeight = newHeight; - treeHasChanged(); - } - - text.draw (g, area.toFloat()); - } - - Colour getContentColour (bool isIcon) const override - { - if (isIcon) - { - if (isSelected()) - return getOwnerView()->findColour (defaultHighlightedTextColourId); - - if (message.isError()) - return Colours::red; - - if (message.isWarning()) - return Colours::yellow; - - return getOwnerView()->findColour (treeIconColourId); - } - - return getOwnerView()->findColour (isSelected() ? defaultHighlightedTextColourId - : defaultTextColourId); - } - - void showPopupMenu (Point p) override - { - PopupMenu menu; - menu.addItem (1, "Copy"); - launchPopupMenu (menu, p); - } - - void handlePopupMenuResult (int resultCode) override - { - if (resultCode == 1) - SystemClipboard::copyTextToClipboard (message.toString()); - } - - int getItemHeight() const override - { - return itemHeight; - } - - SourceCodeEditor* getEditor() - { - if (auto* pcc = getProjectContentComponent()) - { - const auto file = File::createFileWithoutCheckingPath (message.range.file); - - if (message.range.isValid() && file.exists() && pcc->showEditorForFile (file, false)) - return dynamic_cast (pcc->getEditorComponent()); - } - - return nullptr; - } - - void showDocument() override - { - if (SourceCodeEditor* ed = getEditor()) - { - ed->grabKeyboardFocus(); - ed->highlight (message.range.range, false); - - if (auto cu = findCompileUnitParent()) - cu->showOverlays(); - } - } - - CompileUnitTreeItem* findCompileUnitParent() - { - for (TreeViewItem* p = getParentItem(); p != nullptr; p = p->getParentItem()) - if (auto cu = dynamic_cast (p)) - return cu; - - return nullptr; - } - - void showOverlays() - { - overlay.deleteAndZero(); - - if (ProjectContentComponent* pcc = getProjectContentComponent()) - { - if (auto* ed = dynamic_cast (pcc->getEditorComponent())) - { - auto start = CodeDocument::Position (ed->editor->getDocument(), message.range.range.getStart()); - auto end = CodeDocument::Position (ed->editor->getDocument(), message.range.range.getEnd()); - - if (auto* ce = dynamic_cast (ed->editor.get())) - overlay = ce->addDiagnosticOverlay (start, end, message.type); - } - } - - for (int i = 0; i < getNumSubItems(); ++i) - if (auto* e = dynamic_cast (getSubItem (i))) - e->showOverlays(); - } - - DiagnosticMessage message; - - private: - String uniqueID; - TextLayout text; - int itemHeight; - Component::SafePointer overlay; - }; -}; diff --git a/extras/Projucer/Source/LiveBuildEngine/jucer_ActivityList.h b/extras/Projucer/Source/LiveBuildEngine/jucer_ActivityList.h deleted file mode 100644 index 107664eabe..0000000000 --- a/extras/Projucer/Source/LiveBuildEngine/jucer_ActivityList.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2020 - Raw Material Software Limited - - JUCE is an open source library subject to commercial or open-source - licensing. - - By using JUCE, you agree to the terms of both the JUCE 6 End-User License - Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). - - End User License Agreement: www.juce.com/juce-6-licence - Privacy Policy: www.juce.com/juce-privacy-policy - - Or: You may also use this code under the terms of the GPL v3 (see - www.gnu.org/licenses). - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -#pragma once - - -//============================================================================== -struct ActivityList : public ChangeBroadcaster -{ - ActivityList() {} - - void setList (const StringArray& newList) - { - checkThread(); - - if (activities != newList) - { - const bool wasEmpty = isEmpty(); - activities = newList; - sendChangeMessage(); - - if (wasEmpty != isEmpty()) - ProjucerApplication::getCommandManager().commandStatusChanged(); - } - } - - void clear() - { - setList (StringArray()); - } - - StringArray getActivities() const - { - checkThread(); - - StringArray s; - - for (auto a : activities) - s.add (a.upToFirstOccurrenceOf ("|||", false, false)); - - return s; - } - - bool isEmpty() const noexcept - { - return activities.size() == 0; - } - - int getNumActivities() const - { - checkThread(); - return activities.size(); - } - - struct Listener - { - virtual ~Listener() {} - virtual void classListChanged (const ClassDatabase::ClassList&) = 0; - }; - - void addListener (Listener* l) - { - checkThread(); - listeners.add (l); - } - - void removeListener (Listener* l) - { - checkThread(); - listeners.remove (l); - } - - void sendClassListChangedMessage (const ClassDatabase::ClassList& newList) - { - checkThread(); - listeners.call ([&] (Listener& l) { l.classListChanged (newList); }); - } - -private: - StringArray activities; - ListenerList listeners; - - static void checkThread() - { - JUCE_ASSERT_MESSAGE_THREAD - } - - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ActivityList) -}; diff --git a/extras/Projucer/Source/LiveBuildEngine/jucer_ClassDatabase.h b/extras/Projucer/Source/LiveBuildEngine/jucer_ClassDatabase.h deleted file mode 100644 index 173f7bbf6d..0000000000 --- a/extras/Projucer/Source/LiveBuildEngine/jucer_ClassDatabase.h +++ /dev/null @@ -1,731 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2020 - Raw Material Software Limited - - JUCE is an open source library subject to commercial or open-source - licensing. - - By using JUCE, you agree to the terms of both the JUCE 6 End-User License - Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). - - End User License Agreement: www.juce.com/juce-6-licence - Privacy Policy: www.juce.com/juce-privacy-policy - - Or: You may also use this code under the terms of the GPL v3 (see - www.gnu.org/licenses). - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -#pragma once - - -//============================================================================== -struct ClassDatabase -{ - //============================================================================== - struct MemberInfo - { - enum CodeLocationType - { - declaration = 0, - addedToParent, - setBoundsParamX, - setBoundsParamY, - setBoundsParamW, - setBoundsParamH, - - // WARNING! When you change any of these, also update the copy that lives in the live editing code - - numCodeLocationTypes - }; - - MemberInfo() {} - - MemberInfo (const MemberInfo& other) - : name (other.name), type (other.type) - { - for (int i = 0; i < numCodeLocationTypes; ++i) - locations[i] = other.locations[i]; - } - - MemberInfo (const String& nm, const String& ty) - : name (nm), type (ty) - { - } - - MemberInfo (const ValueTree& v) - : name (v [Ids::name].toString()), - type (v [Ids::class_].toString()) - { - for (int i = 0; i < numCodeLocationTypes; ++i) - locations[i] = v [getIdentifierForCodeLocationType (i)].toString(); - } - - const String& getName() const { return name; } - const String& getType() const { return type; } - - const SourceCodeRange& getLocation (CodeLocationType t) const - { - return locations[t]; - } - - void setLocation (CodeLocationType t, const SourceCodeRange& range) - { - locations[t] = range; - } - - void mergeWith (const MemberInfo& other) - { - jassert (name == other.name); - if (other.type.isNotEmpty()) - type = other.type; - - for (int i = 0; i < numCodeLocationTypes; ++i) - if (other.locations[i].isValid()) - locations[i] = other.locations[i]; - } - - void nudgeAllCodeRanges (const String& file, const int insertPoint, const int delta) - { - for (int i = 0; i < numCodeLocationTypes; ++i) - locations[i].nudge (file, insertPoint, delta); - } - - void fileContentChanged (const String& file) - { - for (int i = 0; i < numCodeLocationTypes; ++i) - locations[i].fileContentChanged (file); - } - - ValueTree toValueTree() const - { - ValueTree m (Ids::MEMBER); - m.setProperty (Ids::name, name, nullptr); - m.setProperty (Ids::class_, type, nullptr); - - for (int i = 0; i < numCodeLocationTypes; ++i) - locations[i].writeToValueTree (m, getIdentifierForCodeLocationType (i)); - - return m; - } - - private: - String name, type; - SourceCodeRange locations [numCodeLocationTypes]; - - static Identifier getIdentifierForCodeLocationType (int typeIndex) - { - // (These need to remain in order) - static_assert (setBoundsParamX + 1 == setBoundsParamY && setBoundsParamY + 1 == setBoundsParamW - && setBoundsParamW + 1 == setBoundsParamH, ""); - - static const Identifier ids[] = - { - "declaration", - "addedToParent", - "setBoundsParamX", - "setBoundsParamY", - "setBoundsParamW", - "setBoundsParamH" - }; - - return ids [typeIndex]; - } - }; - - //============================================================================== - struct MethodInfo - { - MethodInfo() {} - - MethodInfo (const MethodInfo& other) - : name (other.name), returnType (other.returnType), - declaration (other.declaration), definition (other.definition), - numArgs (other.numArgs), flags (other.flags) - { - } - - String name, returnType; - SourceCodeRange declaration, definition; - int numArgs, flags; - - enum - { - isConstructor = 1, - isDefaultConstructor = 2, - isTemplated = 4, - isPublic = 8 - }; - - MethodInfo (const ValueTree& v) - : name (v[Ids::name].toString()), - returnType (v[Ids::returnType].toString()), - declaration (v[Ids::declaration].toString()), - definition (v[Ids::definition].toString()), - numArgs (v[Ids::numArgs]), - flags (v[Ids::flags]) - { - } - - ValueTree toValueTree() const - { - ValueTree m (Ids::METHOD); - m.setProperty (Ids::name, name, nullptr); - m.setProperty (Ids::returnType, returnType, nullptr); - m.setProperty (Ids::numArgs, numArgs, nullptr); - m.setProperty (Ids::flags, flags, nullptr); - declaration.writeToValueTree (m, Ids::declaration); - definition.writeToValueTree (m, Ids::definition); - return m; - } - - void nudgeAllCodeRanges (const String& file, const int insertPoint, const int delta) - { - declaration.nudge (file, insertPoint, delta); - definition.nudge (file, insertPoint, delta); - } - - void fileContentChanged (const String& file) - { - declaration.fileContentChanged (file); - definition.fileContentChanged (file); - } - }; - - //============================================================================== - struct InstantiationFlags - { - InstantiationFlags() - : isAbstract (false), - inAnonymousNamespace (false), - noDefaultConstructor (false) - {} - - bool canBeInstantiated() const noexcept - { - return ! (isAbstract || inAnonymousNamespace || noDefaultConstructor); - } - - String getReasonForUnavailability() const - { - if (isAbstract) return "This class is abstract"; - if (noDefaultConstructor) return "This class has no default constructor"; - if (inAnonymousNamespace) return "This class is declared inside an anonymous namespace"; - return String(); - } - - bool isDisallowed (const InstantiationFlags& disallowedFlags) const - { - return ! ((disallowedFlags.isAbstract && isAbstract) - || (disallowedFlags.inAnonymousNamespace && inAnonymousNamespace) - || (disallowedFlags.noDefaultConstructor && noDefaultConstructor)); - } - - bool isAbstract; - bool inAnonymousNamespace; - bool noDefaultConstructor; - }; - - //============================================================================== - struct Class - { - Class() {} - ~Class() {} - - Class (const Class& other) - : className (other.className), members (other.members), - methods (other.methods), classDeclaration (other.classDeclaration), - instantiationFlags (other.instantiationFlags) - { - } - - Class (const String& name, const InstantiationFlags& flags, - const Array& m, - const Array& meth, - const SourceCodeRange& classDeclarationRange) - : className (name), - members (m), methods (meth), - classDeclaration (classDeclarationRange), - instantiationFlags (flags) - { - } - - Class& operator= (const Class& other) - { - className = other.className; - members = other.members; - methods = other.methods; - classDeclaration = other.classDeclaration; - instantiationFlags = other.instantiationFlags; - return *this; - } - - const String& getName() const noexcept { return className; } - - const InstantiationFlags& getInstantiationFlags() const - { - return instantiationFlags; - } - - void setInstantiationFlags (const InstantiationFlags& newFlags) - { - instantiationFlags = newFlags; - } - - const SourceCodeRange& getClassDeclarationRange() const - { - return classDeclaration; - } - - const MemberInfo* findMember (const String& memberName) const - { - for (auto& m : members) - if (m.getName() == memberName) - return &m; - - return nullptr; - } - - MemberInfo* findMember (const String& memberName) - { - return const_cast (static_cast(*this).findMember (memberName)); - } - - const MethodInfo* getDefaultConstructor() const - { - for (const MethodInfo& m : methods) - if ((m.flags & MethodInfo::isDefaultConstructor) != 0) - return &m; - - return nullptr; - } - - const MethodInfo* getConstructor() const - { - if (const MethodInfo* m = getDefaultConstructor()) - return m; - - for (const MethodInfo& m : methods) - if ((m.flags & MethodInfo::isConstructor) != 0) - return &m; - - return nullptr; - } - - const MethodInfo* getResizedMethod() const - { - for (const MethodInfo& m : methods) - if (m.name == "resized" && m.numArgs == 0) - return &m; - - return nullptr; - } - - File getMainSourceFile() const - { - if (const MethodInfo* m = getResizedMethod()) - if (m->definition.isValid()) - return m->definition.file; - - if (const MethodInfo* m = getConstructor()) - if (m->definition.isValid()) - return m->definition.file; - - for (auto& m : methods) - if (m.definition.isValid() && File (m.definition.file).hasFileExtension ("cpp;mm")) - return m.definition.file; - - for (auto& m : methods) - if ((m.flags & MethodInfo::isConstructor) != 0 && m.definition.isValid()) - return m.definition.file; - - for (auto& m : methods) - if (m.definition.isValid() && File (m.definition.file).exists()) - return m.definition.file; - - return {}; - } - - Array getAllSourceFiles() const - { - Array files; - - for (const MethodInfo& m : methods) - { - files.addIfNotAlreadyThere (m.declaration.file); - files.addIfNotAlreadyThere (m.definition.file); - } - - return files; - } - - bool isDeclaredInFile (const File& file) const - { - return file == classDeclaration.file; - } - - void mergeWith (const Class& other) - { - jassert (*this == other); - - if (other.classDeclaration.isValid()) - classDeclaration = other.classDeclaration; - - for (auto& m : other.members) - { - if (auto* existing = findMember (m.getName())) - existing->mergeWith (m); - else - members.add (m); - } - } - - void nudgeAllCodeRanges (const String& file, int index, int delta) - { - for (MemberInfo& m : members) m.nudgeAllCodeRanges (file, index, delta); - for (MethodInfo& m : methods) m.nudgeAllCodeRanges (file, index, delta); - - classDeclaration.nudge (file, index, delta); - } - - void fileContentChanged (const String& file) - { - for (MemberInfo& m : members) m.fileContentChanged (file); - for (MethodInfo& m : methods) m.fileContentChanged (file); - - classDeclaration.fileContentChanged (file); - } - - Class (const ValueTree& v) - { - className = v[Ids::name]; - instantiationFlags.isAbstract = v[Ids::abstract]; - instantiationFlags.inAnonymousNamespace = v[Ids::anonymous]; - instantiationFlags.noDefaultConstructor = v[Ids::noDefConstructor]; - - classDeclaration = v [Ids::classDecl].toString(); - - for (int i = 0; i < v.getNumChildren(); ++i) - members.add (MemberInfo (v.getChild(i))); - } - - ValueTree toValueTree() const - { - ValueTree v (Ids::CLASS); - v.setProperty (Ids::name, className, nullptr); - v.setProperty (Ids::abstract, instantiationFlags.isAbstract, nullptr); - v.setProperty (Ids::anonymous, instantiationFlags.inAnonymousNamespace, nullptr); - v.setProperty (Ids::noDefConstructor, instantiationFlags.noDefaultConstructor, nullptr); - classDeclaration.writeToValueTree (v, Ids::classDecl); - - for (const MemberInfo& m : members) - v.appendChild (m.toValueTree(), nullptr); - - return v; - } - - bool operator== (const Class& other) const noexcept { return className == other.className; } - bool operator!= (const Class& other) const noexcept { return ! operator== (other); } - bool operator< (const Class& other) const noexcept { return className < other.className; } - - const Array& getMembers() const { return members; } - - private: - String className; - Array members; - Array methods; - SourceCodeRange classDeclaration; - InstantiationFlags instantiationFlags; - - JUCE_LEAK_DETECTOR (Class) - JUCE_DECLARE_WEAK_REFERENCEABLE (Class) - }; - - //============================================================================== - struct Namespace - { - Namespace() : name ("Global Namespace") {} - Namespace (const String& n, const String& full) : name (n), fullName (full) {} - - bool isEmpty() const noexcept - { - for (const auto& n : namespaces) - if (! n.isEmpty()) - return false; - - return components.size() == 0; - } - - int getTotalClassesAndNamespaces() const - { - int total = components.size(); - - for (const auto& n : namespaces) - total += n.getTotalClassesAndNamespaces(); - - return total; - } - - void add (const Class& c, const String::CharPointerType& localName) - { - auto nextDoubleColon = CharacterFunctions::find (localName, CharPointer_ASCII ("::")); - - if (nextDoubleColon.isEmpty()) - merge (c); - else - getOrCreateNamespace (String (localName, nextDoubleColon))->add (c, nextDoubleColon + 2); - } - - bool containsRecursively (const Class& c) const - { - if (components.contains (c)) - return true; - - for (const auto& n : namespaces) - if (n.containsRecursively (c)) - return true; - - return false; - } - - const Class* findClass (const String& className) const - { - for (auto& c : components) - if (c.getName() == className) - return &c; - - for (auto& n : namespaces) - if (auto* c = n.findClass (className)) - return c; - - return nullptr; - } - - const MemberInfo* findClassMemberInfo (const String& className, const String& memberName) const - { - if (auto* classInfo = findClass (className)) - return classInfo->findMember (memberName); - - return nullptr; - } - - void findClassesDeclaredInFile (Array>& results, const File& file) - { - for (int i = 0; i < components.size(); ++i) - { - auto& c = components.getReference (i); - - if (c.isDeclaredInFile (file)) - results.add (&c); - } - - for (int i = 0; i < namespaces.size(); ++i) - namespaces.getReference (i).findClassesDeclaredInFile (results, file); - } - - void merge (const Namespace& other) - { - if (components.size() == 0) - { - components = other.components; - } - else - { - for (const auto& c : other.components) - merge (c); - } - - for (const auto& n : other.namespaces) - getOrCreateNamespace (n.name)->merge (n); - } - - void merge (const Class& c) - { - const int existing = components.indexOf (c); - - if (existing < 0) - components.add (c); - else - components.getReference (existing).mergeWith (c); - } - - Namespace* findNamespace (const String& targetName) - { - for (int i = 0; i < namespaces.size(); ++i) - { - auto& n = namespaces.getReference (i); - - if (n.name == targetName) - return &n; - } - - return nullptr; - } - - Namespace* createNamespace (const String& newName) - { - namespaces.add (Namespace (newName, fullName + "::" + newName)); - return findNamespace (newName); - } - - Namespace* getOrCreateNamespace (const String& newName) - { - if (auto* existing = findNamespace (newName)) - return existing; - - return createNamespace (newName); - } - - void addInstantiableClasses (SortedSet& classes) const - { - for (const auto& c : components) - if (c.getInstantiationFlags().canBeInstantiated()) - classes.add (c); - - for (const auto& n : namespaces) - n.addInstantiableClasses (classes); - } - - void swapWith (Namespace& other) noexcept - { - name.swapWith (other.name); - components.swapWith (other.components); - namespaces.swapWith (other.namespaces); - } - - void nudgeAllCodeRanges (const String& file, int index, int delta) - { - for (int i = 0; i < components.size(); ++i) - components.getReference (i).nudgeAllCodeRanges (file, index, delta); - - for (int i = 0; i < namespaces.size(); ++i) - namespaces.getReference (i).nudgeAllCodeRanges (file, index, delta); - } - - void fileContentChanged (const String& file) - { - for (int i = 0; i < components.size(); ++i) - components.getReference (i).fileContentChanged (file); - - for (int i = 0; i < namespaces.size(); ++i) - namespaces.getReference (i).fileContentChanged (file); - } - - bool matches (const Namespace& other) const - { - if (name == other.name - && components == other.components - && namespaces.size() == other.namespaces.size()) - { - for (int i = namespaces.size(); --i >= 0;) - if (! namespaces.getReference (i).matches (other.namespaces.getReference (i))) - return false; - - return true; - } - - return false; - } - - void getAllClassNames (StringArray& results, const InstantiationFlags& disallowedFlags) const - { - for (const auto& c : components) - if (c.getInstantiationFlags().isDisallowed (disallowedFlags)) - results.add (c.getName()); - - for (const auto& n : namespaces) - n.getAllClassNames (results, disallowedFlags); - } - - ValueTree toValueTree() const - { - ValueTree v (Ids::CLASSLIST); - - v.setProperty (Ids::name, name, nullptr); - - for (const auto& c : components) v.appendChild (c.toValueTree(), nullptr); - for (const auto& n : namespaces) v.appendChild (n.toValueTree(), nullptr); - - return v; - } - - void loadFromValueTree (const ValueTree& v) - { - name = v[Ids::name]; - - for (int i = 0; i < v.getNumChildren(); ++i) - { - const ValueTree c (v.getChild(i)); - - if (c.hasType (Ids::CLASS)) - components.add (Class (c)); - else if (c.hasType (Ids::CLASSLIST)) - createNamespace (c[Ids::name])->loadFromValueTree (c); - } - } - - bool operator== (const Namespace& other) const noexcept { return name == other.name; } - bool operator!= (const Namespace& other) const noexcept { return ! operator== (other); } - bool operator< (const Namespace& other) const noexcept { return name < other.name; } - - String name, fullName; - SortedSet components; - SortedSet namespaces; - - JUCE_LEAK_DETECTOR (Namespace) - }; - - struct ClassList - { - ClassList() {} - - void clear() - { - Namespace newNamespace; - globalNamespace.swapWith (newNamespace); - } - - void registerComp (const Class& comp) - { - globalNamespace.add (comp, comp.getName().getCharPointer()); - } - - void merge (const ClassList& other) - { - globalNamespace.merge (other.globalNamespace); - } - - void swapWith (ClassList& other) noexcept - { - globalNamespace.swapWith (other.globalNamespace); - } - - //============================================================================== - ValueTree toValueTree() const - { - return globalNamespace.toValueTree(); - } - - static ClassList fromValueTree (const ValueTree& v) - { - ClassList l; - l.globalNamespace.loadFromValueTree (v); - return l; - } - - Namespace globalNamespace; - - bool operator== (const ClassList& other) const noexcept { return globalNamespace.matches (other.globalNamespace); } - bool operator!= (const ClassList& other) const noexcept { return ! operator== (other); } - - private: - JUCE_LEAK_DETECTOR (ClassList) - }; -}; diff --git a/extras/Projucer/Source/LiveBuildEngine/jucer_ClientServerMessages.h b/extras/Projucer/Source/LiveBuildEngine/jucer_ClientServerMessages.h deleted file mode 100644 index 2fa64228cf..0000000000 --- a/extras/Projucer/Source/LiveBuildEngine/jucer_ClientServerMessages.h +++ /dev/null @@ -1,295 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2020 - Raw Material Software Limited - - JUCE is an open source library subject to commercial or open-source - licensing. - - By using JUCE, you agree to the terms of both the JUCE 6 End-User License - Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). - - End User License Agreement: www.juce.com/juce-6-licence - Privacy Policy: www.juce.com/juce-privacy-policy - - Or: You may also use this code under the terms of the GPL v3 (see - www.gnu.org/licenses). - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -#pragma once - - -//============================================================================== -struct MessageHandler -{ - virtual ~MessageHandler() {} - virtual bool sendMessage (const ValueTree&) = 0; - - static MemoryBlock convertMessage (const ValueTree& tree) - { - MemoryOutputStream out; - tree.writeToStream (out); - return out.getMemoryBlock(); - } - - static ValueTree convertMessage (const MemoryBlock& rawData) - { - return ValueTree::readFromData (rawData.getData(), rawData.getSize()); - } -}; - -//============================================================================== -static inline Rectangle varToRect (const var& v) -{ - if (const Array* obj = v.getArray()) - { - if (obj->size() == 4) - { - int intArray[4]; - - for (int i = 0; i < 4; ++i) - { - const var& p = obj->getReference (i); - - if (p.isInt() || p.isDouble() || p.isInt64()) - intArray[i] = static_cast (p); - else - return Rectangle(); - } - - return Rectangle (intArray[0], intArray[1], intArray[2], intArray[3]); - } - } - - return Rectangle(); -} - -static inline var rectToVar (const Rectangle& rect) -{ - Array retval; - - retval.add (var (rect.getX())); - retval.add (var (rect.getY())); - retval.add (var (rect.getWidth())); - retval.add (var (rect.getHeight())); - - return var (retval); -} - -//============================================================================== -namespace MessageTypes -{ - inline bool send (MessageHandler& target, const ValueTree& v) - { - bool result = target.sendMessage (v); - - if (! result) - Logger::outputDebugString ("*** Message failed: " + v.getType().toString()); - - return result; - } - - inline bool sendPing (MessageHandler& target) - { - return send (target, ValueTree (PING)); - } - - //============================================================================== - // client -> server - - inline void sendOpenPreview (MessageHandler& target, const ClassDatabase::Class& comp, Rectangle mainWindowRect) - { - ValueTree v (OPEN_PREVIEW); - v.setProperty (Ids::name, comp.getName(), nullptr); - v.setProperty (Ids::bounds, rectToVar (mainWindowRect), nullptr); - send (target, v); - } - - inline void sendReinstantiate (MessageHandler& target) - { - send (target, ValueTree (RELOAD)); - } - - inline void sendFileChanges (MessageHandler& target, const Array& changes, const File& file) - { - ValueTree changesMessage (MessageTypes::LIVE_FILE_CHANGES); - changesMessage.setProperty (Ids::file, file.getFullPathName(), nullptr); - - for (const CodeChange& change : changes) - { - ValueTree v (CHANGE); - v.setProperty (Ids::start, change.range.getStart(), nullptr); - v.setProperty (Ids::end, change.range.getEnd(), nullptr); - v.setProperty (Ids::text, change.text, nullptr); - changesMessage.appendChild (v, nullptr); - } - - send (target, changesMessage); - } - - inline Array getChangeArray (const ValueTree& changes) - { - Array result; - - for (int i = 0; i < changes.getNumChildren(); ++i) - { - const ValueTree& v = changes.getChild (i); - result.add (CodeChange (Range (v[Ids::start], v[Ids::end]), v[Ids::text])); - } - - return result; - } - - inline void sendFileContentFullUpdate (MessageHandler& target, const File& file, const String& text) - { - ValueTree v (LIVE_FILE_UPDATE); - v.setProperty (Ids::file, file.getFullPathName(), nullptr); - v.setProperty (Ids::text, text, nullptr); - send (target, v); - } - - inline void sendHandleFileReset (MessageHandler& target, const File& file) - { - ValueTree v (LIVE_FILE_RESET); - v.setProperty (Ids::file, file.getFullPathName(), nullptr); - send (target, v); - } - - inline void sendNewBuild (MessageHandler& target, const ProjectBuildInfo& build) - { - send (target, build.tree); - } - - inline void sendCleanAll (MessageHandler& target) - { - send (target, ValueTree (CLEAN_ALL)); - } - - inline void sendNewDiagnosticList (MessageHandler& target, const ValueTree& list) - { - send (target, list); - } - - inline void sendEmptyDiagnosticList (MessageHandler& target) - { - send (target, ValueTree (MessageTypes::DIAGNOSTIC_LIST)); - } - - inline void sendProcessActivationState (MessageHandler& target, bool isNowActive) - { - ValueTree v (FOREGROUND); - v.setProperty (Ids::parentActive, isNowActive, nullptr); - send (target, v); - } - - inline void sendLaunchApp (MessageHandler& target) { send (target, ValueTree (LAUNCH_APP)); } - inline void sendQuit (MessageHandler& target) { send (target, ValueTree (QUIT_SERVER)); } - inline void sendShouldCloseIDE (MessageHandler& target) { send (target, ValueTree (QUIT_IDE)); } - - //============================================================================== - // server -> client - - inline void sendNewClassList (MessageHandler& target, const ClassDatabase::ClassList& classes) - { - send (target, classes.toValueTree()); - } - - inline void sendCrash (MessageHandler& target, const String& message) - { - ValueTree v (CRASH); - v.setProperty (Ids::message, message, nullptr); - send (target, v); - } - - inline void sendSystemHeadersMissing (MessageHandler& target) - { - send (target, ValueTree (MISSING_SYSTEM_HEADERS)); - } - - inline void sendBuildFailed (MessageHandler& target) - { - send (target, ValueTree (BUILD_FAILED)); - } - - inline void sendNewActivityList (MessageHandler& target, const StringArray& list) - { - ValueTree v (ACTIVITY_LIST); - v.setProperty (Ids::list, concatenateListOfStrings (list), nullptr); - send (target, v); - } - - inline void sendChangeCode (MessageHandler& target, const String& location, const String& newText) - { - if (location.isNotEmpty()) - { - ValueTree v (CHANGE_CODE); - v.setProperty (Ids::position, location, nullptr); - v.setProperty (Ids::text, newText, nullptr); - send (target, v); - } - } - - inline void sendHighlightCode (MessageHandler& target, const String& location) - { - if (location.isNotEmpty()) - { - ValueTree v (HIGHLIGHT_CODE); - v.setProperty (Ids::position, location, nullptr); - send (target, v); - } - } - - inline void sendAppLaunched (MessageHandler& target) { send (target, ValueTree (LAUNCHED)); } - inline void sendAppQuit (MessageHandler& target) { send (target, ValueTree (APPQUIT)); } - - inline void sendKeyPress (MessageHandler& target, const String& className, const String& keyDesc) - { - ValueTree v (KEY); - v.setProperty (Ids::class_, className, nullptr); - v.setProperty (Ids::key, keyDesc, nullptr); - send (target, v); - } - - //============================================================================== - template - static void dispatchToClient (MessageHandlerType& target, const ValueTree& v) - { - if (v.hasType (DIAGNOSTIC_LIST)) target.handleNewDiagnosticList (v); - else if (v.hasType (ACTIVITY_LIST)) target.handleActivityListChanged (separateJoinedStrings (v [Ids::list])); - else if (v.hasType (Ids::CLASSLIST)) target.handleClassListChanged (v); - else if (v.hasType (BUILD_FAILED)) target.handleBuildFailed(); - else if (v.hasType (CHANGE_CODE)) target.handleChangeCode (v [Ids::position].toString(), v [Ids::text]); - else if (v.hasType (HIGHLIGHT_CODE)) target.handleHighlightCode (v [Ids::position].toString()); - else if (v.hasType (LAUNCHED)) target.handleAppLaunched(); - else if (v.hasType (APPQUIT)) target.handleAppQuit(); - else if (v.hasType (PING)) target.handlePing(); - else if (v.hasType (CRASH)) target.handleCrash (v [Ids::message]); - else if (v.hasType (KEY)) target.handleKeyPress (v[Ids::class_], KeyPress::createFromDescription (v[Ids::key])); - else if (v.hasType (QUIT_IDE)) target.handleCloseIDE(); - else if (v.hasType (MISSING_SYSTEM_HEADERS)) target.handleMissingSystemHeaders(); - else jassertfalse; - } - - template - static void dispatchToServer (MessageHandlerType& target, const ValueTree& v) - { - if (v.hasType (CLEAN_ALL)) target.handleCleanAll(); - else if (v.hasType (BUILDINFO)) target.handleNewBuildSettings (ProjectBuildInfo (v)); - else if (v.hasType (OPEN_PREVIEW)) target.handleOpenPreview (v[Ids::name], varToRect (v[Ids::bounds])); - else if (v.hasType (RELOAD)) target.handleReinstantiatePreviews(); - else if (v.hasType (LAUNCH_APP)) target.handleLaunchApp(); - else if (v.hasType (LIVE_FILE_CHANGES)) target.handleLiveFileChanges (v[Ids::file].toString(), getChangeArray (v)); - else if (v.hasType (LIVE_FILE_UPDATE)) target.handleLiveFileFullUpdate (v[Ids::file].toString(), v[Ids::text]); - else if (v.hasType (LIVE_FILE_RESET)) target.handleResetLiveFileContent (v[Ids::file].toString()); - else if (v.hasType (FOREGROUND)) target.handleProcessActivationState (v[Ids::parentActive]); - else if (v.hasType (PING)) target.handlePing(); - else jassertfalse; - } -} diff --git a/extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineClient.cpp b/extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineClient.cpp deleted file mode 100644 index 1ce5ba57a1..0000000000 --- a/extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineClient.cpp +++ /dev/null @@ -1,907 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2020 - Raw Material Software Limited - - JUCE is an open source library subject to commercial or open-source - licensing. - - By using JUCE, you agree to the terms of both the JUCE 6 End-User License - Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). - - End User License Agreement: www.juce.com/juce-6-licence - Privacy Policy: www.juce.com/juce-privacy-policy - - Or: You may also use this code under the terms of the GPL v3 (see - www.gnu.org/licenses). - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -#include "../Application/jucer_Headers.h" -#include "../Application/jucer_Application.h" -#include "../ProjectSaving/jucer_ProjectExporter.h" -#include "jucer_MessageIDs.h" -#include "jucer_CppHelpers.h" -#include "jucer_SourceCodeRange.h" -#include "jucer_ClassDatabase.h" -#include "jucer_DiagnosticMessage.h" -#include "jucer_ProjectBuildInfo.h" -#include "jucer_ClientServerMessages.h" -#include "jucer_CompileEngineClient.h" -#include "jucer_CompileEngineServer.h" -#include "jucer_CompileEngineSettings.h" -#include "../Project/UI/jucer_ProjectContentComponent.h" - -#ifndef RUN_CLANG_IN_CHILD_PROCESS - #error -#endif - -//============================================================================== -static File getProjucerTempFolder() noexcept -{ - #if JUCE_MAC - return { "~/Library/Caches/com.juce.projucer" }; - #else - return File::getSpecialLocation (File::tempDirectory).getChildFile ("com.juce.projucer"); - #endif -} - -static File getCacheLocationForProject (Project& project) noexcept -{ - auto cacheFolderName = project.getProjectFilenameRootString() + "_" + project.getProjectUIDString(); - - #if JUCE_DEBUG - cacheFolderName += "_debug"; - #endif - - return getProjucerTempFolder().getChildFile ("Intermediate Files").getChildFile (cacheFolderName); -} - -//============================================================================== -class ClientIPC : public MessageHandler, - private InterprocessConnection, - private Timer -{ -public: - explicit ClientIPC (CompileEngineChildProcess& cp) - : InterprocessConnection (true), owner (cp) - { - launchServer(); - } - - ~ClientIPC() - { - #if RUN_CLANG_IN_CHILD_PROCESS - if (childProcess.isRunning()) - { - #if JUCE_DEBUG - killServerPolitely(); - #else - // in release builds we don't want to wait - // for the server to clean up and shut down - killServerWithoutMercy(); - #endif - } - #endif - } - - void launchServer() - { - DBG ("Client: Launching Server..."); - - auto pipeName = "ipc_" + String::toHexString (Random().nextInt64()); - auto command = createCommandLineForLaunchingServer (pipeName, owner.project.getProjectUIDString(), - getCacheLocationForProject (owner.project)); - - #if RUN_CLANG_IN_CHILD_PROCESS - if (! childProcess.start (command)) - jassertfalse; - #else - server = createClangServer (command); - #endif - - for (int i = 0; i < 20; ++i) - { - if (connectToPipe (pipeName, 10000)) - { - MessageTypes::sendPing (*this); - break; - } - - Thread::sleep (50); - } - - jassert (isConnected()); - - startTimer (serverKeepAliveTimeout); - } - - void killServerPolitely() - { - DBG ("Client: Killing Server..."); - MessageTypes::sendQuit (*this); - - disconnect(); - stopTimer(); - - #if RUN_CLANG_IN_CHILD_PROCESS - childProcess.waitForProcessToFinish (5000); - #endif - - killServerWithoutMercy(); - } - - void killServerWithoutMercy() - { - disconnect(); - stopTimer(); - - #if RUN_CLANG_IN_CHILD_PROCESS - childProcess.kill(); - #else - destroyClangServer (server); - server = nullptr; - #endif - } - - void connectionMade() - { - DBG ("Client: connected"); - stopTimer(); - } - - void connectionLost() - { - DBG ("Client: disconnected"); - startTimer (100); - } - - bool sendMessage (const ValueTree& m) - { - return InterprocessConnection::sendMessage (MessageHandler::convertMessage (m)); - } - - void messageReceived (const MemoryBlock& message) - { - #if RUN_CLANG_IN_CHILD_PROCESS - startTimer (serverKeepAliveTimeout); - #else - stopTimer(); - #endif - MessageTypes::dispatchToClient (owner, MessageHandler::convertMessage (message)); - } - - enum { serverKeepAliveTimeout = 10000 }; - -private: - CompileEngineChildProcess& owner; - - #if RUN_CLANG_IN_CHILD_PROCESS - ChildProcess childProcess; - #else - void* server; - #endif - - void timerCallback() - { - stopTimer(); - owner.handleCrash (String()); - } -}; - -//============================================================================== -class CompileEngineChildProcess::ChildProcess : private ValueTree::Listener, - private Timer -{ -public: - ChildProcess (CompileEngineChildProcess& proc, Project& p) - : owner (proc), project (p) - { - projectRoot = project.getProjectRoot(); - - restartServer(); - projectRoot.addListener (this); - openedOk = true; - } - - ~ChildProcess() override - { - projectRoot.removeListener (this); - - if (isRunningApp && server != nullptr) - server->killServerWithoutMercy(); - } - - void restartServer() - { - server.reset (new ClientIPC (owner)); - sendRebuild(); - } - - void sendRebuild() - { - stopTimer(); - - ProjectBuildInfo build; - - if (! doesProjectMatchSavedHeaderState (project)) - { - MessageTypes::sendNewBuild (*server, build); - - owner.errorList.resetToError ("Project structure does not match the saved headers! " - "Please re-save your project to enable compilation"); - return; - } - - if (areAnyModulesMissing (project)) - { - MessageTypes::sendNewBuild (*server, build); - - owner.errorList.resetToError ("Some of your JUCE modules can't be found! " - "Please check that all the module paths are correct"); - return; - } - - build.setSystemIncludes (getSystemIncludePaths()); - build.setUserIncludes (getUserIncludes()); - - build.setGlobalDefs (getGlobalDefs()); - build.setCompileFlags (project.getCompileEngineSettings().getExtraCompilerFlagsString()); - build.setExtraDLLs (getExtraDLLs()); - build.setJuceModulesFolder (project.getEnabledModules().getDefaultModulesFolder().getFullPathName()); - - build.setUtilsCppInclude (project.getAppIncludeFile().getFullPathName()); - - build.setWindowsTargetPlatformVersion (project.getCompileEngineSettings().getWindowsTargetPlatformVersionString()); - - scanForProjectFiles (project, build); - - owner.updateAllEditors(); - - MessageTypes::sendNewBuild (*server, build); - } - - void cleanAll() - { - MessageTypes::sendCleanAll (*server); - sendRebuild(); - } - - void reinstantiatePreviews() - { - MessageTypes::sendReinstantiate (*server); - } - - bool launchApp() - { - MessageTypes::sendLaunchApp (*server); - return true; - } - - std::unique_ptr server; - - bool openedOk = false; - bool isRunningApp = false; - -private: - CompileEngineChildProcess& owner; - Project& project; - ValueTree projectRoot; - - void projectStructureChanged() - { - startTimer (100); - } - - void timerCallback() override - { - sendRebuild(); - } - - void valueTreePropertyChanged (ValueTree&, const Identifier&) override { projectStructureChanged(); } - void valueTreeChildAdded (ValueTree&, ValueTree&) override { projectStructureChanged(); } - void valueTreeChildRemoved (ValueTree&, ValueTree&, int) override { projectStructureChanged(); } - void valueTreeParentChanged (ValueTree&) override { projectStructureChanged(); } - - String getGlobalDefs() - { - auto mergeDefs = [] (const StringPairArray& inDefs) -> String - { - StringArray outDefs; - - for (int i = 0; i < inDefs.size(); ++i) - { - auto def = inDefs.getAllKeys()[i]; - auto value = inDefs.getAllValues()[i]; - - if (value.isNotEmpty()) - def << "=" << value; - - outDefs.add (def); - } - - return outDefs.joinIntoString (" "); - }; - - StringArray defs; - - if (! project.shouldUseAppConfig()) - defs.add (mergeDefs (project.getAppConfigDefs())); - - defs.add (project.getCompileEngineSettings().getExtraPreprocessorDefsString()); - defs.add (mergeDefs (project.getPreprocessorDefs())); - - for (Project::ExporterIterator exporter (project); exporter.next();) - if (exporter->canLaunchProject()) - defs.add (exporter->getExporterIdentifierMacro() + "=1"); - - defs.removeEmptyStrings(); - - return defs.joinIntoString (" "); - } - - static void scanProjectItem (const Project::Item& projectItem, Array& compileUnits, Array& userFiles) - { - if (projectItem.isGroup()) - { - for (int i = 0; i < projectItem.getNumChildren(); ++i) - scanProjectItem (projectItem.getChild(i), compileUnits, userFiles); - - return; - } - - if (projectItem.shouldBeCompiled()) - { - auto f = projectItem.getFile(); - - if (f.exists()) - compileUnits.add (f); - } - - if (projectItem.shouldBeAddedToTargetProject() && ! projectItem.shouldBeAddedToBinaryResources()) - { - auto f = projectItem.getFile(); - - if (f.exists()) - userFiles.add (f); - } - } - - void scanForProjectFiles (Project& proj, ProjectBuildInfo& build) - { - Array compileUnits, userFiles; - scanProjectItem (proj.getMainGroup(), compileUnits, userFiles); - - { - auto isVSTHost = project.getEnabledModules().isModuleEnabled ("juce_audio_processors") - && (project.isConfigFlagEnabled ("JUCE_PLUGINHOST_VST3", false) || project.isConfigFlagEnabled ("JUCE_PLUGINHOST_VST", false)); - - auto isPluginProject = proj.isAudioPluginProject(); - - OwnedArray modules; - proj.getEnabledModules().createRequiredModules (modules); - - for (Project::ExporterIterator exporter (proj); exporter.next();) - { - if (exporter->canLaunchProject()) - { - for (auto* m : modules) - { - auto copyLocally = proj.getEnabledModules().shouldCopyModuleFilesLocally (m->moduleInfo.getID()); - - auto localModuleFolder = copyLocally ? proj.getLocalModuleFolder (m->moduleInfo.getID()) - : m->moduleInfo.getFolder(); - - m->findAndAddCompiledUnits (*exporter, nullptr, compileUnits, - isPluginProject || isVSTHost ? build_tools::ProjectType::Target::SharedCodeTarget - : build_tools::ProjectType::Target::unspecified); - - if (isPluginProject || isVSTHost) - m->findAndAddCompiledUnits (*exporter, nullptr, compileUnits, - build_tools::ProjectType::Target::StandalonePlugIn); - } - - break; - } - } - } - - for (int i = 0; ; ++i) - { - auto binaryDataCpp = proj.getBinaryDataCppFile (i); - if (! binaryDataCpp.exists()) - break; - - compileUnits.add (binaryDataCpp); - } - - for (auto i = compileUnits.size(); --i >= 0;) - if (compileUnits.getReference(i).hasFileExtension (".r")) - compileUnits.remove (i); - - build.setFiles (compileUnits, userFiles); - } - - static bool doesProjectMatchSavedHeaderState (Project& project) - { - auto liveModules = project.getProjectRoot().getChildWithName (Ids::MODULES); - - if (auto xml = parseXMLIfTagMatches (project.getFile(), Ids::JUCERPROJECT.toString())) - { - auto diskModules = ValueTree::fromXml (*xml).getChildWithName (Ids::MODULES); - return liveModules.isEquivalentTo (diskModules); - } - - return false; - } - - static bool areAnyModulesMissing (Project& project) - { - OwnedArray modules; - project.getEnabledModules().createRequiredModules (modules); - - for (auto* module : modules) - if (! module->getFolder().isDirectory()) - return true; - - return false; - } - - StringArray getUserIncludes() - { - StringArray paths; - paths.add (project.getGeneratedCodeFolder().getFullPathName()); - paths.addArray (getSearchPathsFromString (project.getCompileEngineSettings().getUserHeaderPathString())); - - return convertSearchPathsToAbsolute (paths); - } - - StringArray getSystemIncludePaths() - { - StringArray paths; - paths.add (project.getGeneratedCodeFolder().getFullPathName()); - paths.addArray (getSearchPathsFromString (project.getCompileEngineSettings().getSystemHeaderPathString())); - - auto isVSTHost = project.getEnabledModules().isModuleEnabled ("juce_audio_processors") - && (project.isConfigFlagEnabled ("JUCE_PLUGINHOST_VST3", false) - || project.isConfigFlagEnabled ("JUCE_PLUGINHOST_VST", false)); - - OwnedArray modules; - project.getEnabledModules().createRequiredModules (modules); - - for (auto* module : modules) - { - paths.addIfNotAlreadyThere (module->getFolder().getParentDirectory().getFullPathName()); - - if (module->getID() == "juce_audio_processors" && ((project.isAudioPluginProject() || isVSTHost) - && ! project.isConfigFlagEnabled ("JUCE_CUSTOM_VST3_SDK"))) - { - paths.addIfNotAlreadyThere (module->getFolder().getChildFile ("format_types").getChildFile ("VST3_SDK").getFullPathName()); - } - } - - return convertSearchPathsToAbsolute (paths); - } - - StringArray convertSearchPathsToAbsolute (const StringArray& paths) const - { - StringArray s; - const File root (project.getProjectFolder()); - - for (String p : paths) - s.add (root.getChildFile (p).getFullPathName()); - - return s; - } - - StringArray getExtraDLLs() - { - auto dlls = StringArray::fromTokens (project.getCompileEngineSettings().getExtraDLLsString(), "\n\r,", {}); - dlls.trim(); - dlls.removeEmptyStrings(); - - return dlls; - } - - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChildProcess) -}; - -//============================================================================== -CompileEngineChildProcess::CompileEngineChildProcess (Project& p) - : project (p) -{ - ProjucerApplication::getApp().openDocumentManager.addListener (this); - createProcess(); - errorList.setWarningsEnabled (project.getCompileEngineSettings().areWarningsEnabled()); -} - -CompileEngineChildProcess::~CompileEngineChildProcess() -{ - ProjucerApplication::getApp().openDocumentManager.removeListener (this); -} - -void CompileEngineChildProcess::createProcess() -{ - jassert (process == nullptr); - process.reset (new ChildProcess (*this, project)); - - if (! process->openedOk) - process.reset(); - - updateAllEditors(); -} - -void CompileEngineChildProcess::cleanAll() -{ - if (process != nullptr) - process->cleanAll(); -} - -void CompileEngineChildProcess::openPreview (const ClassDatabase::Class& comp) -{ - if (process != nullptr) - { - MainWindow* projectWindow = nullptr; - OwnedArray& windows = ProjucerApplication::getApp().mainWindowList.windows; - - for (int i = 0; i < windows.size(); ++i) - { - if (MainWindow* w = windows[i]) - { - if (w->getProject() == &project) - { - projectWindow = w; - break; - } - } - } - - Rectangle mainWindowRect; - - if (projectWindow != nullptr) - mainWindowRect = projectWindow->getBounds(); - - MessageTypes::sendOpenPreview (*process->server, comp, mainWindowRect); - } -} - -void CompileEngineChildProcess::reinstantiatePreviews() -{ - if (process != nullptr) - process->reinstantiatePreviews(); -} - -void CompileEngineChildProcess::processActivationChanged (bool isForeground) -{ - if (process != nullptr) - MessageTypes::sendProcessActivationState (*process->server, isForeground); -} - -//============================================================================== -bool CompileEngineChildProcess::canLaunchApp() const -{ - return process != nullptr - && runningAppProcess == nullptr - && activityList.getNumActivities() == 0 - && errorList.getNumErrors() == 0 - && project.getProjectType().isGUIApplication(); -} - -void CompileEngineChildProcess::launchApp() -{ - if (process != nullptr) - process->launchApp(); -} - -bool CompileEngineChildProcess::canKillApp() const -{ - return runningAppProcess != nullptr; -} - -void CompileEngineChildProcess::killApp() -{ - runningAppProcess.reset(); -} - -void CompileEngineChildProcess::handleAppLaunched() -{ - runningAppProcess.reset (process.release()); - runningAppProcess->isRunningApp = true; - createProcess(); -} - -void CompileEngineChildProcess::handleAppQuit() -{ - DBG ("handleAppQuit"); - runningAppProcess.reset(); -} - -bool CompileEngineChildProcess::isAppRunning() const noexcept -{ - return runningAppProcess != nullptr && runningAppProcess->isRunningApp; -} - -//============================================================================== -struct CompileEngineChildProcess::Editor : private CodeDocument::Listener, - private Timer -{ - Editor (CompileEngineChildProcess& ccp, const File& f, CodeDocument& doc) - : owner (ccp), file (f), document (doc), transactionTimer (doc) - { - sendFullUpdate(); - document.addListener (this); - } - - ~Editor() override - { - document.removeListener (this); - } - - void codeDocumentTextInserted (const String& newText, int insertIndex) override - { - CodeChange (Range (insertIndex, insertIndex), newText).addToList (pendingChanges); - startEditorChangeTimer(); - transactionTimer.stopTimer(); - - owner.lastComponentList.globalNamespace - .nudgeAllCodeRanges (file.getFullPathName(), insertIndex, newText.length()); - } - - void codeDocumentTextDeleted (int start, int end) override - { - CodeChange (Range (start, end), String()).addToList (pendingChanges); - startEditorChangeTimer(); - transactionTimer.stopTimer(); - - owner.lastComponentList.globalNamespace - .nudgeAllCodeRanges (file.getFullPathName(), start, start - end); - } - - void sendFullUpdate() - { - reset(); - - if (owner.process != nullptr) - MessageTypes::sendFileContentFullUpdate (*owner.process->server, file, document.getAllContent()); - } - - bool flushEditorChanges() - { - if (pendingChanges.size() > 0) - { - if (owner.process != nullptr && owner.process->server != nullptr) - MessageTypes::sendFileChanges (*owner.process->server, pendingChanges, file); - - reset(); - return true; - } - - stopTimer(); - return false; - } - - void reset() - { - stopTimer(); - pendingChanges.clear(); - } - - void startTransactionTimer() - { - transactionTimer.startTimer (1000); - } - - void startEditorChangeTimer() - { - startTimer (200); - } - - CompileEngineChildProcess& owner; - File file; - CodeDocument& document; - -private: - Array pendingChanges; - - void timerCallback() override - { - if (owner.project.getCompileEngineSettings().isContinuousRebuildEnabled()) - flushEditorChanges(); - else - stopTimer(); - } - - struct TransactionTimer : public Timer - { - explicit TransactionTimer (CodeDocument& doc) : document (doc) {} - - void timerCallback() override - { - stopTimer(); - document.newTransaction(); - } - - CodeDocument& document; - }; - - TransactionTimer transactionTimer; -}; - -void CompileEngineChildProcess::editorOpened (const File& file, CodeDocument& document) -{ - editors.add (new Editor (*this, file, document)); -} - -bool CompileEngineChildProcess::documentAboutToClose (OpenDocumentManager::Document* document) -{ - for (int i = editors.size(); --i >= 0;) - { - if (document->getFile() == editors.getUnchecked(i)->file) - { - const File f (editors.getUnchecked(i)->file); - editors.remove (i); - - if (process != nullptr) - MessageTypes::sendHandleFileReset (*process->server, f); - } - } - - return true; -} - -void CompileEngineChildProcess::updateAllEditors() -{ - for (int i = editors.size(); --i >= 0;) - editors.getUnchecked(i)->sendFullUpdate(); -} - -//============================================================================== -void CompileEngineChildProcess::handleCrash (const String& message) -{ - Logger::writeToLog ("*** Child process crashed: " + message); - - if (crashHandler != nullptr) - crashHandler (message); -} - -void CompileEngineChildProcess::handleNewDiagnosticList (const ValueTree& l) { errorList.setList (l); } -void CompileEngineChildProcess::handleActivityListChanged (const StringArray& l) { activityList.setList (l); } - -void CompileEngineChildProcess::handleCloseIDE() -{ - if (JUCEApplication* app = JUCEApplication::getInstance()) - app->systemRequestedQuit(); -} - -void CompileEngineChildProcess::handleMissingSystemHeaders() -{ - if (ProjectContentComponent* p = findProjectContentComponent()) - p->handleMissingSystemHeaders(); -} - -void CompileEngineChildProcess::handleKeyPress (const String& className, const KeyPress& key) -{ - ApplicationCommandManager& commandManager = ProjucerApplication::getCommandManager(); - - CommandID command = commandManager.getKeyMappings()->findCommandForKeyPress (key); - - if (command == StandardApplicationCommandIDs::undo) - { - handleUndoInEditor (className); - } - else if (command == StandardApplicationCommandIDs::redo) - { - handleRedoInEditor (className); - } - else if (ApplicationCommandTarget* const target = ApplicationCommandManager::findTargetForComponent (findProjectContentComponent())) - { - commandManager.setFirstCommandTarget (target); - commandManager.getKeyMappings()->keyPressed (key, findProjectContentComponent()); - commandManager.setFirstCommandTarget (nullptr); - } -} - -void CompileEngineChildProcess::handleUndoInEditor (const String& /*className*/) -{ -} - -void CompileEngineChildProcess::handleRedoInEditor (const String& /*className*/) -{ -} - -void CompileEngineChildProcess::handleClassListChanged (const ValueTree& newList) -{ - lastComponentList = ClassDatabase::ClassList::fromValueTree (newList); - activityList.sendClassListChangedMessage (lastComponentList); -} - -void CompileEngineChildProcess::handleBuildFailed() -{ - ProjucerApplication::getCommandManager().commandStatusChanged(); -} - -void CompileEngineChildProcess::handleChangeCode (const SourceCodeRange& location, const String& newText) -{ - if (Editor* ed = getOrOpenEditorFor (location.file)) - { - if (ed->flushEditorChanges()) - return; // client-side editor changes were pending, so deal with them first, and discard - // the incoming change, whose position may now be wrong. - - ed->document.deleteSection (location.range.getStart(), location.range.getEnd()); - ed->document.insertText (location.range.getStart(), newText); - - // deliberately clear the messages that we just added, to avoid these changes being - // sent to the server (which will already have processed the same ones locally) - ed->reset(); - ed->startTransactionTimer(); - } -} - -void CompileEngineChildProcess::handlePing() -{ -} - -//============================================================================== -void CompileEngineChildProcess::flushEditorChanges() -{ - for (Editor* ed : editors) - ed->flushEditorChanges(); -} - -ProjectContentComponent* CompileEngineChildProcess::findProjectContentComponent() const -{ - for (MainWindow* mw : ProjucerApplication::getApp().mainWindowList.windows) - if (mw->getProject() == &project) - return mw->getProjectContentComponent(); - - return nullptr; -} - -CompileEngineChildProcess::Editor* CompileEngineChildProcess::getOrOpenEditorFor (const File& file) -{ - for (Editor* ed : editors) - if (ed->file == file) - return ed; - - if (ProjectContentComponent* pcc = findProjectContentComponent()) - if (pcc->showEditorForFile (file, false)) - return getOrOpenEditorFor (file); - - return nullptr; -} - -void CompileEngineChildProcess::handleHighlightCode (const SourceCodeRange& location) -{ - ProjectContentComponent* pcc = findProjectContentComponent(); - - if (pcc != nullptr && pcc->showEditorForFile (location.file, false)) - { - SourceCodeEditor* sce = dynamic_cast (pcc->getEditorComponent()); - - if (sce != nullptr && sce->editor != nullptr) - { - sce->highlight (location.range, true); - - Process::makeForegroundProcess(); - - CodeEditorComponent& ed = *sce->editor; - ed.getTopLevelComponent()->toFront (false); - ed.grabKeyboardFocus(); - } - } -} - -void CompileEngineChildProcess::cleanAllCachedFilesForProject (Project& p) -{ - File cacheFolder (getCacheLocationForProject (p)); - - if (cacheFolder.isDirectory()) - cacheFolder.deleteRecursively(); -} diff --git a/extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineClient.h b/extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineClient.h deleted file mode 100644 index bce7b5ea66..0000000000 --- a/extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineClient.h +++ /dev/null @@ -1,155 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2020 - Raw Material Software Limited - - JUCE is an open source library subject to commercial or open-source - licensing. - - By using JUCE, you agree to the terms of both the JUCE 6 End-User License - Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). - - End User License Agreement: www.juce.com/juce-6-licence - Privacy Policy: www.juce.com/juce-privacy-policy - - Or: You may also use this code under the terms of the GPL v3 (see - www.gnu.org/licenses). - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -#pragma once - -#include "jucer_ActivityList.h" -#include "jucer_ErrorList.h" -class Project; - -//============================================================================== -class CompileEngineChildProcess : public ReferenceCountedObject, - private OpenDocumentManager::DocumentCloseListener -{ -public: - CompileEngineChildProcess (Project&); - ~CompileEngineChildProcess() override; - - //============================================================================== - bool openedOk() const { return process != nullptr; } - - void editorOpened (const File& file, CodeDocument& document); - bool documentAboutToClose (OpenDocumentManager::Document*) override; - - //============================================================================== - void cleanAll(); - void openPreview (const ClassDatabase::Class&); - void reinstantiatePreviews(); - void processActivationChanged (bool isForeground); - - //============================================================================== - bool canLaunchApp() const; - void launchApp(); - bool canKillApp() const; - void killApp(); - bool isAppRunning() const noexcept; - - //============================================================================== - const ClassDatabase::ClassList& getComponentList() const { return lastComponentList; } - - //============================================================================== - void flushEditorChanges(); - static void cleanAllCachedFilesForProject (Project&); - - //============================================================================== - Project& project; - ActivityList activityList; - ErrorList errorList; - - //============================================================================== - std::function crashHandler; - - //============================================================================== - // from server.. - void handleNewDiagnosticList (const ValueTree& newList); - void handleClearErrors(); - void handleActivityListChanged (const StringArray&); - void handleClassListChanged (const ValueTree& newList); - void handleBuildFailed(); - void handleChangeCode (const SourceCodeRange& location, const String& newText); - void handleAppLaunched(); - void handleAppQuit(); - void handleHighlightCode (const SourceCodeRange& location); - void handlePing(); - void handleCrash (const String& message); - void handleCloseIDE(); - void handleKeyPress (const String& className, const KeyPress& key); - void handleUndoInEditor (const String& className); - void handleRedoInEditor (const String& className); - void handleMissingSystemHeaders(); - - using Ptr = ReferenceCountedObjectPtr; - -private: - //============================================================================== - class ChildProcess; - std::unique_ptr process, runningAppProcess; - ClassDatabase::ClassList lastComponentList; - - struct Editor; - OwnedArray editors; - void updateAllEditors(); - - void createProcess(); - Editor* getOrOpenEditorFor (const File&); - ProjectContentComponent* findProjectContentComponent() const; - - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CompileEngineChildProcess) -}; - -//============================================================================== -struct ChildProcessCache -{ - ChildProcessCache() {} - - CompileEngineChildProcess::Ptr getExisting (Project& project) const noexcept - { - for (auto& p : processes) - if (&(p->project) == &project) - return *p; - - return {}; - } - - CompileEngineChildProcess::Ptr getOrCreate (Project& project) - { - if (auto p = getExisting (project)) - return p; - - auto p = new CompileEngineChildProcess (project); - tellNewProcessAboutExistingEditors (*p); - processes.add (p); - return *p; - } - - static void tellNewProcessAboutExistingEditors (CompileEngineChildProcess& process) - { - auto& odm = ProjucerApplication::getApp().openDocumentManager; - - for (int i = odm.getNumOpenDocuments(); --i >= 0;) - if (auto d = dynamic_cast (odm.getOpenDocument (i))) - process.editorOpened (d->getFile(), d->getCodeDocument()); - } - - void removeOrphans() - { - processes.clear(); - } - -private: - ReferenceCountedArray processes; - - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChildProcessCache) -}; diff --git a/extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineDLL.h b/extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineDLL.h deleted file mode 100644 index cdcd8d0877..0000000000 --- a/extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineDLL.h +++ /dev/null @@ -1,201 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2020 - Raw Material Software Limited - - JUCE is an open source library subject to commercial or open-source - licensing. - - By using JUCE, you agree to the terms of both the JUCE 6 End-User License - Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). - - End User License Agreement: www.juce.com/juce-6-licence - Privacy Policy: www.juce.com/juce-privacy-policy - - Or: You may also use this code under the terms of the GPL v3 (see - www.gnu.org/licenses). - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -#pragma once - -#include "jucer_LiveCodeBuilderDLL.h" - -//============================================================================== -struct CompileEngineDLL : private DeletedAtShutdown -{ - CompileEngineDLL() - { - tryLoadDll(); - } - - ~CompileEngineDLL() - { - shutdown(); - clearSingletonInstance(); - } - - bool tryLoadDll() - { - // never load the dynamic lib multiple times - if (! isLoaded()) - { - auto f = findDLLFile(); - - if (f != File() && dll.open (f.getLinkedTarget().getFullPathName())) - { - #define INIT_LIVE_DLL_FN(name, returnType, params) name = (name##_type) dll.getFunction (#name); - LIVE_DLL_FUNCTIONS (INIT_LIVE_DLL_FN); - #undef INIT_LIVE_DLL_FN - - return true; - } - - return false; - } - - return true; - } - - void initialise (CrashCallbackFunction crashFn, QuitCallbackFunction quitFn, bool setupSignals) - { - if (isLoaded()) - projucer_initialise (crashFn, quitFn, setPropertyCallback, getPropertyCallback, setupSignals); - } - - void shutdown() - { - if (isLoaded()) - projucer_shutdown(); - } - - bool isLoaded() const - { - #define CHECK_LIVE_DLL_FN(name, returnType, params) if (name == nullptr) return false; - LIVE_DLL_FUNCTIONS (CHECK_LIVE_DLL_FN); - #undef CHECK_LIVE_DLL_FN - - return projucer_getVersion() == requiredVersion; - } - - #define DECLARE_LIVE_DLL_FN(name, returnType, params) \ - typedef returnType (*name##_type) params; \ - name##_type name = nullptr; - - LIVE_DLL_FUNCTIONS (DECLARE_LIVE_DLL_FN) - - #undef DECLARE_LIVE_DLL_FN - - static String getDLLName() - { - #if JUCE_MAC - return "JUCECompileEngine.dylib"; - #elif JUCE_LINUX || JUCE_BSD - return "JUCECompileEngine.so"; - #elif JUCE_WINDOWS - return "JUCECompileEngine.dll"; - #else - #error - return "JUCECompileEngine.so"; - #endif - } - - static File getVersionedUserAppSupportFolder() - { - auto userAppData = File::getSpecialLocation (File::userApplicationDataDirectory); - - #if JUCE_MAC - userAppData = userAppData.getChildFile ("Application Support"); - #endif - - return userAppData.getChildFile ("Projucer").getChildFile (String ("CompileEngine-") + ProjectInfo::versionString); - } - - JUCE_DECLARE_SINGLETON (CompileEngineDLL, false) - -private: - DynamicLibrary dll; - - enum { requiredVersion = 2 }; - - static File findDLLFile() - { - auto dllFile = File(); - - if (tryFindDLLFileInAppFolder (dllFile)) - return dllFile; - - #if JUCE_MAC - if (tryFindDLLFileInAppBundle(dllFile)) - return dllFile; - #endif - - if (tryFindDLLFileInAppConfigFolder (dllFile)) - return dllFile; - - return {}; - } - - #if JUCE_MAC - static bool tryFindDLLFileInAppBundle (File& outFile) - { - File currentAppFile (File::getSpecialLocation (File::currentApplicationFile)); - return tryFindDLLFileInFolder (currentAppFile.getChildFile ("Contents"), outFile); - } - #endif - - static bool tryFindDLLFileInAppFolder (File& outFile) - { - auto currentAppFile = File::getSpecialLocation (File::currentApplicationFile); - return tryFindDLLFileInFolder (currentAppFile.getParentDirectory(), outFile); - } - - static bool tryFindDLLFileInAppConfigFolder (File& outFile) - { - auto userAppDataFolder = getVersionedUserAppSupportFolder(); - return tryFindDLLFileInFolder (userAppDataFolder, outFile); - } - - static bool tryFindDLLFileInFolder(File folder, File& outFile) - { - auto file = folder.getChildFile (getDLLName()); - if (isDLLFile (file)) - { - outFile = file; - return true; - } - - return false; - } - - static bool isDLLFile (const File& f) - { - return f.getFileName().equalsIgnoreCase (getDLLName()) && f.exists(); - } - - static void setPropertyCallback (const char* key, const char* value) - { - auto keyStr = String (key); - if (keyStr.isNotEmpty()) - getGlobalProperties().setValue (key, value); - else - jassertfalse; - } - - static void getPropertyCallback (const char* key, char* value, size_t size) - { - jassert (getGlobalProperties().getValue (key).getNumBytesAsUTF8() < size); - - value[0] = 0; - getGlobalProperties().getValue (key).copyToUTF8 (value, size); - } - - static void crashCallback (const char*) {} - static void quitCallback() {} -}; diff --git a/extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineServer.cpp b/extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineServer.cpp deleted file mode 100644 index 15d6c86636..0000000000 --- a/extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineServer.cpp +++ /dev/null @@ -1,307 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2020 - Raw Material Software Limited - - JUCE is an open source library subject to commercial or open-source - licensing. - - By using JUCE, you agree to the terms of both the JUCE 6 End-User License - Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). - - End User License Agreement: www.juce.com/juce-6-licence - Privacy Policy: www.juce.com/juce-privacy-policy - - Or: You may also use this code under the terms of the GPL v3 (see - www.gnu.org/licenses). - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -#include "../Application/jucer_Headers.h" -#include "../Application/jucer_Application.h" -#include "jucer_CompileEngineServer.h" -#include "jucer_CompileEngineDLL.h" -#include "jucer_MessageIDs.h" -#include "jucer_CppHelpers.h" -#include "jucer_SourceCodeRange.h" -#include "jucer_ClassDatabase.h" -#include "jucer_DiagnosticMessage.h" -#include "jucer_ProjectBuildInfo.h" -#include "jucer_ClientServerMessages.h" - -#if JUCE_LINUX || JUCE_BSD - #include - #include -#endif - -#ifndef RUN_CLANG_IN_CHILD_PROCESS - #error -#endif - -#if RUN_CLANG_IN_CHILD_PROCESS - static bool parentProcessHasExited(); -#endif - -#if JUCE_WINDOWS - static void setParentProcessID (int); - static int getCurrentProcessID(); -#else - #include -#endif - -//============================================================================== -/** Detects whether this process has hung, and kills it if so. */ -struct ZombiePatrol : private Thread, - private AsyncUpdater, - private Timer -{ - explicit ZombiePatrol (MessageHandler& mh) - : Thread ("Ping"), owner (mh) - { - startThread (2); - startTimer (1000); - } - - ~ZombiePatrol() override - { - stopThread (1000); - } - -private: - MessageHandler& owner; - int failedPings = 0; - - void run() override - { - while (! threadShouldExit()) - { - #if RUN_CLANG_IN_CHILD_PROCESS - if (parentProcessHasExited()) - { - killProcess(); - break; - } - #endif - - wait (1000); - } - } - - void handleAsyncUpdate() override - { - DBG ("Server: quitting"); - stopTimer(); - ProjucerApplication::getApp().systemRequestedQuit(); - } - - void timerCallback() override - { - if (! MessageTypes::sendPing (owner)) - { - if (++failedPings == 10) - { - killProcess(); - return; - } - } - else - { - failedPings = 0; - } - } - - void killProcess() - { - triggerAsyncUpdate(); // give the messagequeue a chance to do things cleanly. - static UnstoppableKillerThread* k = new UnstoppableKillerThread(); // (allowed to leak, but static so only one is created) - ignoreUnused (k); - } - - struct UnstoppableKillerThread : public Thread - { - UnstoppableKillerThread() : Thread ("Killer") { startThread(); } - - void run() override - { - wait (15000); - - if (! threadShouldExit()) - Process::terminate(); - } - }; -}; - -//============================================================================== -class ServerIPC : public InterprocessConnection, - public MessageHandler -{ -public: - explicit ServerIPC (const StringArray& info) - : InterprocessConnection (true), liveCodeBuilder (nullptr) - { - if (! createPipe (info[0], -1)) - { - Logger::writeToLog ("*** Couldn't create pipe!"); - ProjucerApplication::getApp().systemRequestedQuit(); - return; - } - - if (dll.isLoaded()) - liveCodeBuilder = dll.projucer_createBuilder (sendMessageCallback, this, info[1].toRawUTF8(), info[2].toRawUTF8()); - - #if JUCE_WINDOWS - setParentProcessID (info[3].getHexValue32()); - #endif - - zombieKiller.reset (new ZombiePatrol (*this)); - } - - ~ServerIPC() override - { - zombieKiller.reset(); - - if (dll.isLoaded()) - dll.projucer_deleteBuilder (liveCodeBuilder); - - dll.shutdown(); - - DBG ("Server: finished closing down"); - } - - void connectionMade() override - { - DBG ("Server: client connected"); - } - - void connectionLost() override - { - Logger::writeToLog ("Server: client lost"); - JUCEApplication::quit(); - } - - void sendQuitMessageToIDE() - { - MessageTypes::sendShouldCloseIDE (*this); - } - - bool sendMessage (const ValueTree& m) override - { - return InterprocessConnection::sendMessage (MessageHandler::convertMessage (m)); - } - - void messageReceived (const MemoryBlock& message) override - { - jassert (dll.isLoaded()); - dll.projucer_sendMessage (liveCodeBuilder, message.getData(), message.getSize()); - } - - static bool sendMessageCallback (void* userInfo, const void* data, size_t dataSize) - { - return static_cast (static_cast (userInfo)) - ->sendMessage (MemoryBlock (data, dataSize)); - } - - CompileEngineDLL dll; - LiveCodeBuilder liveCodeBuilder; - std::unique_ptr zombieKiller; -}; - -//============================================================================== -const char* commandPrefix = "--server:"; -const char* commandTokenSeparator = "\x01"; - -String createCommandLineForLaunchingServer (const String& pipeName, const String& projectUID, const File& cacheLocation) -{ - StringArray info; - info.add (pipeName); - info.add (projectUID); - info.add (cacheLocation.getFullPathName()); - - #if JUCE_WINDOWS - info.add (String::toHexString (getCurrentProcessID())); - #endif - - const File exe (File::getSpecialLocation (File::currentExecutableFile).getFullPathName()); - - return "\"" + exe.getFullPathName() + "\" " + commandPrefix + info.joinIntoString (commandTokenSeparator); -} - -static ServerIPC* currentServer = nullptr; - -static void crashCallback (const char* message) -{ - if (currentServer != nullptr) - { - #if RUN_CLANG_IN_CHILD_PROCESS - MessageTypes::sendCrash (*currentServer, message); - Logger::writeToLog ("*** Crashed! " + String (message)); - #else - ignoreUnused (message); - jassertfalse; - #endif - - currentServer->disconnect(); - } -} - -static void quitCallback() -{ - ProjucerApplication::getApp().systemRequestedQuit(); -} - -void* createClangServer (const String& commandLine) -{ - StringArray info; - info.addTokens (commandLine.fromFirstOccurrenceOf (commandPrefix, false, false), commandTokenSeparator, ""); - - std::unique_ptr ipc (new ServerIPC (info)); - - if (ipc->dll.isLoaded()) - { - ipc->dll.initialise (crashCallback, quitCallback, (bool) RUN_CLANG_IN_CHILD_PROCESS); - - currentServer = ipc.release(); - return currentServer; - } - - return nullptr; -} - -void destroyClangServer (void* server) -{ - currentServer = nullptr; - delete static_cast (server); -} - -void sendQuitMessageToIDE (void* server) -{ - static_cast (server)->sendQuitMessageToIDE(); -} - -//============================================================================== -#if JUCE_WINDOWS - #define STRICT 1 - #define WIN32_LEAN_AND_MEAN 1 - #include - - static HANDLE parentProcessHandle = nullptr; - static void setParentProcessID (int pid) { parentProcessHandle = OpenProcess (SYNCHRONIZE, FALSE, (DWORD) pid); } - static int getCurrentProcessID() { return (int) GetCurrentProcessId(); } -#endif - -#if RUN_CLANG_IN_CHILD_PROCESS -bool parentProcessHasExited() -{ - #if JUCE_WINDOWS - return WaitForSingleObject (parentProcessHandle, 0) == WAIT_OBJECT_0; - #else - return getppid() == 1; - #endif -} -#endif diff --git a/extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineServer.h b/extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineServer.h deleted file mode 100644 index a78cab13ee..0000000000 --- a/extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineServer.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2020 - Raw Material Software Limited - - JUCE is an open source library subject to commercial or open-source - licensing. - - By using JUCE, you agree to the terms of both the JUCE 6 End-User License - Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). - - End User License Agreement: www.juce.com/juce-6-licence - Privacy Policy: www.juce.com/juce-privacy-policy - - Or: You may also use this code under the terms of the GPL v3 (see - www.gnu.org/licenses). - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -#pragma once - - -//============================================================================== -// These functions are called by our child process on startup, to launch -// the compilation server - -String createCommandLineForLaunchingServer (const String& pipeName, - const String& projectUID, - const File& cacheLocation); - -void* createClangServer (const String& commandLine); -void destroyClangServer (void*); - -// Called if our child process is asked to shutdown by the user, so it can pass -// that shutdown event up to the parent (IDE) process.. -void sendQuitMessageToIDE (void*); diff --git a/extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineSettings.h b/extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineSettings.h deleted file mode 100644 index 7a99ce002b..0000000000 --- a/extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineSettings.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2020 - Raw Material Software Limited - - JUCE is an open source library subject to commercial or open-source - licensing. - - By using JUCE, you agree to the terms of both the JUCE 6 End-User License - Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). - - End User License Agreement: www.juce.com/juce-6-licence - Privacy Policy: www.juce.com/juce-privacy-policy - - Or: You may also use this code under the terms of the GPL v3 (see - www.gnu.org/licenses). - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -#pragma once - - -//============================================================================== -class CompileEngineSettings -{ -public: - CompileEngineSettings (ValueTree& projectRoot) - : tree (projectRoot.getOrCreateChildWithName ("LIVE_SETTINGS", nullptr) - .getOrCreateChildWithName (getLiveSettingsSubType(), nullptr)), - buildEnabledValue (tree, Ids::buildEnabled, nullptr, false), - continuousRebuildEnabledValue (tree, Ids::continuousRebuildEnabled, nullptr, false), - warningsEnabledValue (tree, Ids::warningsEnabled, nullptr, true), - userHeaderPathValue (tree, Ids::headerPath, nullptr), - systemHeaderPathValue (tree, Ids::systemHeaderPath, nullptr), - extraDLLsValue (tree, Ids::extraDLLs, nullptr), - extraCompilerFlagsValue (tree, Ids::extraCompilerFlags, nullptr), - extraPreprocessorDefsValue (tree, Ids::defines, nullptr), - windowsTargetPlatformValue (tree, Ids::windowsTargetPlatformVersion, nullptr, "10.0.16299.0") - { - } - - //============================================================================== - void setBuildEnabled (bool enabled) noexcept { buildEnabledValue = enabled; } - void setContinuousRebuildEnabled (bool enabled) noexcept { continuousRebuildEnabledValue = enabled; } - void setWarningsEnabled (bool enabled) { warningsEnabledValue = enabled; } - - bool isBuildEnabled() const noexcept { return buildEnabledValue.get(); } - bool isContinuousRebuildEnabled() const noexcept { return continuousRebuildEnabledValue.get(); } - bool areWarningsEnabled() const noexcept { return warningsEnabledValue.get(); } - - String getUserHeaderPathString() const noexcept { return userHeaderPathValue.get(); } - String getSystemHeaderPathString() const noexcept { return systemHeaderPathValue.get(); } - String getExtraDLLsString() const noexcept { return extraDLLsValue.get(); } - String getExtraCompilerFlagsString() const noexcept { return extraCompilerFlagsValue.get(); } - String getExtraPreprocessorDefsString() const noexcept { return extraPreprocessorDefsValue.get(); } - String getWindowsTargetPlatformVersionString() const noexcept { return windowsTargetPlatformValue.get(); } - - //============================================================================== - void getLiveSettings (PropertyListBuilder& props) - { - props.addSearchPathProperty (userHeaderPathValue, "User Header Paths", "User header search paths."); - props.addSearchPathProperty (systemHeaderPathValue, "System Header Paths", "System header search paths."); - - props.add (new TextPropertyComponent (extraPreprocessorDefsValue, "Preprocessor Definitions", 32768, true), - "Extra preprocessor definitions. Use the form \"NAME1=value NAME2=value\", using whitespace or commas " - "to separate the items - to include a space or comma in a definition, precede it with a backslash."); - - props.add (new TextPropertyComponent (extraCompilerFlagsValue, "Extra Compiler Flags", 2048, true), - "Extra command-line flags to be passed to the compiler. This string can contain references to preprocessor" - " definitions in the form ${NAME_OF_DEFINITION}, which will be replaced with their values."); - - props.add (new TextPropertyComponent (extraDLLsValue, "Extra Dynamic Libraries", 2048, true), - "Extra dynamic libs that the running code may require. Use new-lines or commas to separate the items."); - - props.add (new TextPropertyComponent (windowsTargetPlatformValue, "Windows Target Platform", 256, false), - "The Windows target platform to use."); - } - -private: - ValueTree tree; - - ValueWithDefault buildEnabledValue, continuousRebuildEnabledValue, warningsEnabledValue, userHeaderPathValue, systemHeaderPathValue, - extraDLLsValue, extraCompilerFlagsValue, extraPreprocessorDefsValue, windowsTargetPlatformValue; - - //============================================================================== - String getLiveSettingsSubType() const noexcept - { - #if JUCE_MAC - return "OSX"; - #elif JUCE_WINDOWS - return "WINDOWS"; - #elif JUCE_LINUX || JUCE_BSD - return "LINUX"; - #else - // unknown platform?! - jassertfalse; - return {}; - #endif - } - - //============================================================================== - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CompileEngineSettings) -}; diff --git a/extras/Projucer/Source/LiveBuildEngine/jucer_CppHelpers.h b/extras/Projucer/Source/LiveBuildEngine/jucer_CppHelpers.h deleted file mode 100644 index 9fc2e51051..0000000000 --- a/extras/Projucer/Source/LiveBuildEngine/jucer_CppHelpers.h +++ /dev/null @@ -1,283 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2020 - Raw Material Software Limited - - JUCE is an open source library subject to commercial or open-source - licensing. - - By using JUCE, you agree to the terms of both the JUCE 6 End-User License - Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). - - End User License Agreement: www.juce.com/juce-6-licence - Privacy Policy: www.juce.com/juce-privacy-policy - - Or: You may also use this code under the terms of the GPL v3 (see - www.gnu.org/licenses). - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -#pragma once - - -//============================================================================== -struct CppParserHelpers -{ - static bool parseHexInt (const String& text, int64& result) - { - CppTokeniserFunctions::StringIterator i (text); - - if (CppTokeniserFunctions::parseHexLiteral (i)) - { - result = text.fromFirstOccurrenceOf ("x", false, true).getHexValue64(); - return true; - } - - return false; - } - - static bool parseOctalInt (const String& text, int64& result) - { - CppTokeniserFunctions::StringIterator it (text); - - if (CppTokeniserFunctions::parseOctalLiteral (it)) - { - result = 0; - - for (int i = 0; i < text.length(); ++i) - { - const auto digit = (int) (text[i] - '0'); - - if (digit < 0 || digit > 7) - break; - - result = result * 8 + digit; - } - - return true; - } - - return false; - } - - static bool parseDecimalInt (const String& text, int64& result) - { - CppTokeniserFunctions::StringIterator i (text); - - if (CppTokeniserFunctions::parseDecimalLiteral (i)) - { - result = text.getLargeIntValue(); - return true; - } - - return false; - } - - static bool parseInt (const String& text, int64& result) - { - return parseHexInt (text, result) - || parseOctalInt (text, result) - || parseDecimalInt (text, result); - } - - static bool parseFloat (const String& text, double& result) - { - CppTokeniserFunctions::StringIterator i (text); - - if (CppTokeniserFunctions::parseFloatLiteral (i)) - { - result = text.getDoubleValue(); - return true; - } - - return false; - } - - static int parseSingleToken (const String& text) - { - if (text.isEmpty()) - return CPlusPlusCodeTokeniser::tokenType_error; - - CppTokeniserFunctions::StringIterator i (text); - i.skipWhitespace(); - const int tok = CppTokeniserFunctions::readNextToken (i); - i.skipWhitespace(); - i.skip(); - return i.isEOF() ? tok : CPlusPlusCodeTokeniser::tokenType_error; - } - - static String getIntegerSuffix (const String& s) { return s.retainCharacters ("lLuU"); } - static String getFloatSuffix (const String& s) { return s.retainCharacters ("fF"); } - - static String getReplacementStringInSameFormat (const String& old, double newValue) - { - { - CppTokeniserFunctions::StringIterator i (old); - - if (CppTokeniserFunctions::parseFloatLiteral (i)) - { - String s (newValue); - - if (! s.containsChar ('.')) - s += ".0"; - - return s + getFloatSuffix (old); - } - } - - return getReplacementStringInSameFormat (old, (int64) newValue); - } - - static String getReplacementStringInSameFormat (const String& old, int64 newValue) - { - { - CppTokeniserFunctions::StringIterator i (old); - - if (CppTokeniserFunctions::parseHexLiteral (i)) - { - String s ("0x" + String::toHexString (newValue) + getIntegerSuffix (old)); - - if (old.toUpperCase() == old) - s = s.toUpperCase(); - - return s; - } - } - - { - CppTokeniserFunctions::StringIterator i (old); - - if (CppTokeniserFunctions::parseDecimalLiteral (i)) - return String (newValue) + getIntegerSuffix (old); - } - - return old; - } - - // Given a type name which could be a smart pointer or other pointer/ref, this extracts - // the essential class name of the thing that it points to. - static String getSignificantClass (String cls) - { - int firstAngleBracket = cls.indexOfChar ('<'); - - if (firstAngleBracket > 0) - cls = cls.substring (firstAngleBracket + 1).upToLastOccurrenceOf (">", false, false).trim(); - - while (cls.endsWithChar ('*') || cls.endsWithChar ('&')) - cls = cls.dropLastCharacters (1).trim(); - - return cls; - } - - //============================================================================== - struct ValidCppIdentifierRestriction : public TextEditor::InputFilter - { - ValidCppIdentifierRestriction (bool allowTemplatesAndNamespaces) - : className (allowTemplatesAndNamespaces) {} - - String filterNewText (TextEditor& ed, const String& text) - { - String allowedChars ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_"); - if (className) - allowedChars += "<>:"; - - if (ed.getHighlightedRegion().getStart() > 0) - allowedChars += "0123456789"; - - String s = text.retainCharacters (allowedChars); - - if (CPlusPlusCodeTokeniser::isReservedKeyword (ed.getText().replaceSection (ed.getHighlightedRegion().getStart(), - ed.getHighlightedRegion().getLength(), - s))) - return String(); - - return s; - } - - bool className; - - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ValidCppIdentifierRestriction) - }; -}; - -//============================================================================== -struct CodeChange -{ - CodeChange (Range r, const String& t) : range (r), text (t) - { - } - - bool mergeWith (const CodeChange& next) - { - if (text.isEmpty()) - { - if (next.text.isNotEmpty() - && next.range.isEmpty() - && next.range.getStart() == range.getStart()) - { - text = next.text; - return true; - } - - if (next.text.isEmpty()) - { - Range nextRange (next.range); - - if (nextRange.getStart() >= range.getStart()) - nextRange += range.getLength(); - else if (nextRange.getEnd() > range.getStart()) - nextRange.setEnd (nextRange.getEnd() + range.getLength()); - - if (range.intersects (nextRange) - || range.getEnd() == nextRange.getStart() - || range.getStart() == nextRange.getEnd()) - { - range = range.getUnionWith (nextRange); - return true; - } - } - } - else if (next.text.isEmpty()) - { - if (next.range.getEnd() == range.getStart()) - { - range.setStart (next.range.getStart()); - return true; - } - - if (next.range.getStart() == range.getStart() + text.length()) - { - range.setLength (range.getLength() + next.range.getLength()); - return true; - } - } - - return false; - } - - void addToList (Array& list) const - { - if (list.size() == 0 || ! list.getReference (list.size() - 1).mergeWith (*this)) - list.add (*this); - } - - Range range; - String text; -}; - -//============================================================================== -static inline String concatenateListOfStrings (const StringArray& s) -{ - return s.joinIntoString ("\x01"); -} - -static inline StringArray separateJoinedStrings (const String& s) -{ - return StringArray::fromTokens (s, "\x01", juce::StringRef()); -} diff --git a/extras/Projucer/Source/LiveBuildEngine/jucer_DiagnosticMessage.h b/extras/Projucer/Source/LiveBuildEngine/jucer_DiagnosticMessage.h deleted file mode 100644 index a62fe1cea3..0000000000 --- a/extras/Projucer/Source/LiveBuildEngine/jucer_DiagnosticMessage.h +++ /dev/null @@ -1,208 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2020 - Raw Material Software Limited - - JUCE is an open source library subject to commercial or open-source - licensing. - - By using JUCE, you agree to the terms of both the JUCE 6 End-User License - Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). - - End User License Agreement: www.juce.com/juce-6-licence - Privacy Policy: www.juce.com/juce-privacy-policy - - Or: You may also use this code under the terms of the GPL v3 (see - www.gnu.org/licenses). - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -#pragma once - - -//============================================================================== -struct DiagnosticMessage -{ - DiagnosticMessage() = default; - - DiagnosticMessage (const DiagnosticMessage& other) - : associatedDiagnostic (createCopyIfNotNull (other.associatedDiagnostic.get())), - message (other.message), - mainFile (other.mainFile), - range (other.range), - type (other.type) - { - } - - DiagnosticMessage& operator= (const DiagnosticMessage& other) - { - associatedDiagnostic.reset (createCopyIfNotNull (other.associatedDiagnostic.get())); - message = other.message; - mainFile = other.mainFile; - range = other.range; - type = other.type; - - return *this; - } - - enum Type - { - error = 0, - warning = 1, - note = 2 - }; - - std::unique_ptr associatedDiagnostic; - String message; - String mainFile; - SourceCodeRange range; - Type type; - - bool isError() const noexcept { return type == error; } - bool isWarning() const noexcept { return type == warning; } - bool isNote() const noexcept { return type == note; } - - String toString() const - { - // todo: copy recursively from root - String res; - - switch (type) - { - case error: res << "error: "; break; - case warning: res << "warning: "; break; - case note: res << "note: "; break; - default: break; - }; - - res << mainFile << ": "; - res << message << "\n"; - - return res; - } - - ValueTree toValueTree() const - { - ValueTree v (MessageTypes::DIAGNOSTIC); - v.setProperty (Ids::text, message, nullptr); - v.setProperty (Ids::file, mainFile, nullptr); - v.setProperty (Ids::range, range.toString(), nullptr); - v.setProperty (Ids::type, (int) type, nullptr); - - if (associatedDiagnostic != nullptr) - v.addChild (associatedDiagnostic->toValueTree(), 0, nullptr); - - return v; - } - - static DiagnosticMessage fromValueTree (const ValueTree& v) - { - DiagnosticMessage d; - d.message = v[Ids::text]; - d.mainFile = v[Ids::file]; - d.range = SourceCodeRange (v [Ids::range]); - d.type = (Type) static_cast (v[Ids::type]); - - auto associated = v.getChild (0); - - if (associated.isValid()) - d.associatedDiagnostic.reset (new DiagnosticMessage (fromValueTree (associated))); - - return d; - } - - bool operator== (const DiagnosticMessage& other) const noexcept - { - return range == other.range - && message == other.message - && mainFile == other.mainFile; - } - - bool operator!= (const DiagnosticMessage& other) const noexcept { return ! operator== (other); } -}; - -//============================================================================== -struct DiagnosticList -{ - // after some research, it seems that notes never come on their own - // i.e. they always have a warning / error preceding them - // so we can keep notes and their associated diagnostics - // together by keeping track of the last message - DiagnosticMessage lastMessage; - - ValueTree list { MessageTypes::DIAGNOSTIC_LIST }; - - void clear() - { - list = ValueTree { MessageTypes::DIAGNOSTIC_LIST }; - lastMessage = DiagnosticMessage(); - } - - void add (DiagnosticMessage m) - { - if (m.isNote()) - { - if (lastMessage.message.isEmpty()) - return; // seems to happen sometimes, but with seemingly duplicated messages (?) - - m.associatedDiagnostic.reset (new DiagnosticMessage (lastMessage)); - } - else - { - lastMessage = m; - } - - list.appendChild (m.toValueTree(), nullptr); - } - - void add (const DiagnosticList& l) - { - jassert (l.list != list); - - for (int i = 0; i < l.list.getNumChildren(); ++i) - list.appendChild (l.list.getChild(i).createCopy(), nullptr); - } - - void remove (DiagnosticMessage m) - { - auto n = m.toValueTree(); - - for (int i = 0; i < list.getNumChildren(); ++i) - { - if (list.getChild (i).isEquivalentTo (n)) - { - list.removeChild (i, nullptr); - return; - } - } - - jassertfalse; - } - - bool hasRecoveryWarning (DiagnosticMessage m) const - { - auto n = m.toValueTree(); - - for (int i = 0; i < list.getNumChildren(); ++i) - if (list.getChild (i).isEquivalentTo (n)) - return true; - - return false; - } - - const ValueTree& toValueTree() const noexcept - { - return list; - } - - void loadFromChildOfValueTree (ValueTree& parent) - { - list = parent.getChildWithName (MessageTypes::DIAGNOSTIC_LIST).createCopy(); - } -}; diff --git a/extras/Projucer/Source/LiveBuildEngine/jucer_DownloadCompileEngineThread.cpp b/extras/Projucer/Source/LiveBuildEngine/jucer_DownloadCompileEngineThread.cpp deleted file mode 100644 index 1cb63f68d6..0000000000 --- a/extras/Projucer/Source/LiveBuildEngine/jucer_DownloadCompileEngineThread.cpp +++ /dev/null @@ -1,166 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2020 - Raw Material Software Limited - - JUCE is an open source library subject to commercial or open-source - licensing. - - By using JUCE, you agree to the terms of both the JUCE 6 End-User License - Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). - - End User License Agreement: www.juce.com/juce-6-licence - Privacy Policy: www.juce.com/juce-privacy-policy - - Or: You may also use this code under the terms of the GPL v3 (see - www.gnu.org/licenses). - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -#include "../Application/jucer_Headers.h" -#include "jucer_DownloadCompileEngineThread.h" -#include "../LiveBuildEngine/jucer_CompileEngineDLL.h" -#include "../Utility/Helpers/jucer_VersionInfo.h" - -//============================================================================== -bool DownloadCompileEngineThread::downloadAndInstall() -{ - DownloadCompileEngineThread d; - - if (d.runThread()) - { - if (d.result.failed()) - return withError (d.result.getErrorMessage()); - - return true; - } - - if (d.cancelledByUser) - return false; - - return withError (d.result.getErrorMessage()); -} - -DownloadCompileEngineThread::DownloadCompileEngineThread() - : ThreadWithProgressWindow ("Downloading live-build engine", true, true), - result (Result::ok()), cancelledByUser (false) -{ -} - -void DownloadCompileEngineThread::threadComplete (bool userPressedCancel) -{ - cancelledByUser = userPressedCancel; -} - -void DownloadCompileEngineThread::run() -{ - setProgress (-1.0); - setStatusMessage ("Downloading..."); - - MemoryBlock zipData; - result = download (zipData); - - if (result.failed()) - return; - - setStatusMessage ("Installing..."); - - File installFolder = getInstallFolder(); - if (! installFolder.createDirectory()) - { - result = Result::fail ("Install error: cannot create target directory"); - return; - } - - result = install (zipData, installFolder); -} - -Result DownloadCompileEngineThread::download (MemoryBlock& dest) -{ - auto info = VersionInfo::fetchFromUpdateServer (ProjectInfo::versionString); - - if (info == nullptr) - return Result::fail ("Download error: cannot communicate with server"); - - auto requiredAssetName = [] - { - String name ("JUCECompileEngine_"); - - #if JUCE_MAC - name << "osx_"; - #elif JUCE_WINDOWS - name << "windows_"; - #else - jassertfalse; - #endif - - return name + ProjectInfo::versionString + ".zip"; - }(); - - for (auto& asset : info->assets) - { - if (asset.name == requiredAssetName) - { - int statusCode = 0; - auto in = VersionInfo::createInputStreamForAsset (asset, statusCode); - - if (in == nullptr || statusCode != 200) - return Result::fail ("Download error: cannot establish connection"); - - MemoryOutputStream mo (dest, true); - - int64 size = in->getTotalLength(); - int64 bytesReceived = -1; - String msg("Downloading... (123)"); - - for (int64 pos = 0; pos < size; pos += bytesReceived) - { - setStatusMessage (msg.replace ("123", File::descriptionOfSizeInBytes (pos))); - - if (threadShouldExit()) - return Result::fail ("Download error: operation interrupted"); - - bytesReceived = mo.writeFromInputStream (*in, 8192); - - if (bytesReceived == 0) - return Result::fail ("Download error: lost connection"); - } - - return Result::ok(); - } - } - - return Result::fail ("Download error: no downloads available"); -} - -Result DownloadCompileEngineThread::install (const MemoryBlock& data, File& targetFolder) -{ - MemoryInputStream input (data, false); - ZipFile zip (input); - - if (zip.getNumEntries() == 0) - return Result::fail ("Install error: downloaded file is corrupt"); - - if (threadShouldExit()) - return Result::fail ("Install error: operation interrupted"); - - return zip.uncompressTo (targetFolder); -} - -File DownloadCompileEngineThread::getInstallFolder() -{ - return CompileEngineDLL::getVersionedUserAppSupportFolder(); -} - -bool DownloadCompileEngineThread::withError(const String& msg) -{ - AlertWindow::showMessageBox (AlertWindow::WarningIcon, - "Download and install", msg); - return false; -} diff --git a/extras/Projucer/Source/LiveBuildEngine/jucer_DownloadCompileEngineThread.h b/extras/Projucer/Source/LiveBuildEngine/jucer_DownloadCompileEngineThread.h deleted file mode 100644 index b8b146030f..0000000000 --- a/extras/Projucer/Source/LiveBuildEngine/jucer_DownloadCompileEngineThread.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2020 - Raw Material Software Limited - - JUCE is an open source library subject to commercial or open-source - licensing. - - By using JUCE, you agree to the terms of both the JUCE 6 End-User License - Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). - - End User License Agreement: www.juce.com/juce-6-licence - Privacy Policy: www.juce.com/juce-privacy-policy - - Or: You may also use this code under the terms of the GPL v3 (see - www.gnu.org/licenses). - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -#pragma once - - -//============================================================================== -class DownloadCompileEngineThread : public ThreadWithProgressWindow -{ -public: - static bool downloadAndInstall(); - -protected: - void run() override; - void threadComplete (bool userPressedCancel) override; - -private: - DownloadCompileEngineThread(); - - Result download (MemoryBlock& dest); - Result install (const MemoryBlock& data, File& targetFolder); - - static URL getDownloadUrl(); - static File getInstallFolder(); - static bool withError(const String& msg); - - Result result; - bool cancelledByUser; - - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DownloadCompileEngineThread) -}; diff --git a/extras/Projucer/Source/LiveBuildEngine/jucer_ErrorList.h b/extras/Projucer/Source/LiveBuildEngine/jucer_ErrorList.h deleted file mode 100644 index a3b8d80825..0000000000 --- a/extras/Projucer/Source/LiveBuildEngine/jucer_ErrorList.h +++ /dev/null @@ -1,120 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2020 - Raw Material Software Limited - - JUCE is an open source library subject to commercial or open-source - licensing. - - By using JUCE, you agree to the terms of both the JUCE 6 End-User License - Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). - - End User License Agreement: www.juce.com/juce-6-licence - Privacy Policy: www.juce.com/juce-privacy-policy - - Or: You may also use this code under the terms of the GPL v3 (see - www.gnu.org/licenses). - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -#pragma once - - -//============================================================================== -struct ErrorList : public ChangeBroadcaster -{ - ErrorList() : warningsEnabled (true) {} - - void takeCopy (Array& dest) const - { - checkThread(); - - if (warningsEnabled) - { - dest = messages; - } - else - { - for (auto& d : messages) - if (d.isError()) - dest.add (d); - } - } - - void resetToError (const String& message) - { - DiagnosticMessage m; - m.message = message; - m.type = DiagnosticMessage::error; - - DiagnosticList list; - list.add (m); - setList (list.toValueTree()); - } - - void setList (const ValueTree& newList) - { - checkThread(); - messages.clear(); - - for (int i = 0; i < newList.getNumChildren(); ++i) - messages.add (DiagnosticMessage::fromValueTree (newList.getChild(i))); - - sendChangeMessage(); - } - - bool isEmpty() const noexcept { return messages.size() == 0; } - - int getNumErrors() const - { - checkThread(); - - int num = 0; - for (const auto& m : messages) - if (m.isError()) - ++num; - - return num; - } - - int getNumWarnings() const - { - checkThread(); - - int num = 0; - - for (const auto& m : messages) - if (m.isWarning()) - ++num; - - return num; - } - - void setWarningsEnabled (bool enabled) - { - if (warningsEnabled != enabled) - { - warningsEnabled = enabled; - - if (messages.size() > 0) - sendChangeMessage(); - } - } - -private: - Array messages; - bool warningsEnabled; - - static void checkThread() - { - JUCE_ASSERT_MESSAGE_THREAD - } - - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ErrorList) -}; diff --git a/extras/Projucer/Source/LiveBuildEngine/jucer_LiveCodeBuilderDLL.h b/extras/Projucer/Source/LiveBuildEngine/jucer_LiveCodeBuilderDLL.h deleted file mode 100644 index b29517f63e..0000000000 --- a/extras/Projucer/Source/LiveBuildEngine/jucer_LiveCodeBuilderDLL.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2020 - Raw Material Software Limited - - JUCE is an open source library subject to commercial or open-source - licensing. - - By using JUCE, you agree to the terms of both the JUCE 6 End-User License - Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). - - End User License Agreement: www.juce.com/juce-6-licence - Privacy Policy: www.juce.com/juce-privacy-policy - - Or: You may also use this code under the terms of the GPL v3 (see - www.gnu.org/licenses). - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -#pragma once - - -extern "C" -{ - typedef void* LiveCodeBuilder; - typedef bool (*SendMessageFunction) (void* userInfo, const void* data, size_t dataSize); - typedef void (*CrashCallbackFunction) (const char* crashDescription); - typedef void (*QuitCallbackFunction)(); - typedef void (*SetPropertyFunction) (const char* key, const char* value); - typedef void (*GetPropertyFunction) (const char* key, char* value, size_t size); - - // We've used an X macro to define the DLL functions rather than just declaring them, so that - // we can load the DLL and its functions dynamically and cope with it not being there. - // The CompileEngineDLL class is a wrapper that manages finding/loading the DLL and exposing - // these as callable functions. - #define LIVE_DLL_FUNCTIONS(X) \ - X (projucer_getVersion, int, ()) \ - X (projucer_initialise, void, (CrashCallbackFunction, QuitCallbackFunction, SetPropertyFunction, GetPropertyFunction, bool setupSignals)) \ - X (projucer_shutdown, void, ()) \ - X (projucer_createBuilder, LiveCodeBuilder, (SendMessageFunction, void* userInfo, const char* projectID, const char* cacheFolder)) \ - X (projucer_sendMessage, void, (LiveCodeBuilder, const void* messageData, size_t messageDataSize)) \ - X (projucer_deleteBuilder, void, (LiveCodeBuilder)) - -} diff --git a/extras/Projucer/Source/LiveBuildEngine/jucer_MessageIDs.h b/extras/Projucer/Source/LiveBuildEngine/jucer_MessageIDs.h deleted file mode 100644 index bd8040feba..0000000000 --- a/extras/Projucer/Source/LiveBuildEngine/jucer_MessageIDs.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2020 - Raw Material Software Limited - - JUCE is an open source library subject to commercial or open-source - licensing. - - By using JUCE, you agree to the terms of both the JUCE 6 End-User License - Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). - - End User License Agreement: www.juce.com/juce-6-licence - Privacy Policy: www.juce.com/juce-privacy-policy - - Or: You may also use this code under the terms of the GPL v3 (see - www.gnu.org/licenses). - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -#pragma once - - -namespace MessageTypes -{ - #define DECLARE_ID(name) const Identifier name (#name) - - DECLARE_ID (PING); - DECLARE_ID (BUILDINFO); - DECLARE_ID (COMPILEUNIT); - DECLARE_ID (USERFILE); - DECLARE_ID (DIAGNOSTIC); - DECLARE_ID (DIAGNOSTIC_LIST); - - DECLARE_ID (ACTIVITY_LIST); - DECLARE_ID (MISSING_SYSTEM_HEADERS); - DECLARE_ID (BUILD_FAILED); - DECLARE_ID (CHANGE_CODE); - DECLARE_ID (HIGHLIGHT_CODE); - DECLARE_ID (CRASH); - DECLARE_ID (LAUNCHED); - DECLARE_ID (APPQUIT); - DECLARE_ID (KEY); - DECLARE_ID (QUIT_IDE); - - DECLARE_ID (CLEAN_ALL); - DECLARE_ID (OPEN_PREVIEW); - DECLARE_ID (RELOAD); - DECLARE_ID (LIVE_FILE_CHANGES); - DECLARE_ID (CHANGE); - DECLARE_ID (LIVE_FILE_UPDATE); - DECLARE_ID (LIVE_FILE_RESET); - DECLARE_ID (LAUNCH_APP); - DECLARE_ID (FOREGROUND); - DECLARE_ID (QUIT_SERVER); - - #undef DECLARE_ID -} diff --git a/extras/Projucer/Source/LiveBuildEngine/jucer_ProjectBuildInfo.h b/extras/Projucer/Source/LiveBuildEngine/jucer_ProjectBuildInfo.h deleted file mode 100644 index 6daaf87fb7..0000000000 --- a/extras/Projucer/Source/LiveBuildEngine/jucer_ProjectBuildInfo.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2020 - Raw Material Software Limited - - JUCE is an open source library subject to commercial or open-source - licensing. - - By using JUCE, you agree to the terms of both the JUCE 6 End-User License - Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). - - End User License Agreement: www.juce.com/juce-6-licence - Privacy Policy: www.juce.com/juce-privacy-policy - - Or: You may also use this code under the terms of the GPL v3 (see - www.gnu.org/licenses). - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -#pragma once - - -//============================================================================== -struct ProjectBuildInfo -{ - ProjectBuildInfo() : tree (MessageTypes::BUILDINFO) {} - ProjectBuildInfo (const ValueTree& t) : tree (t) {} - - Array getCompileUnits() const - { - Array files; - - for (int i = 0; i < tree.getNumChildren(); ++i) - if (tree.getChild(i).hasType (MessageTypes::COMPILEUNIT)) - files.add (File (tree.getChild(i) [Ids::file].toString())); - - return files; - } - - // This is a list of all cpp and header files that are actually "user" code - // rather than system or internal files - Array getUserFiles() const - { - Array files; - - for (int i = 0; i < tree.getNumChildren(); ++i) - if (tree.getChild(i).hasType (MessageTypes::USERFILE)) - files.add (File (tree.getChild(i) [Ids::file].toString())); - - return files; - } - - void setFiles (const Array& compileUnits, const Array& allUserFiles) - { - for (const File& f : compileUnits) - { - ValueTree file (MessageTypes::COMPILEUNIT); - file.setProperty (Ids::file, f.getFullPathName(), nullptr); - tree.appendChild (file, nullptr); - } - - for (const File& f : allUserFiles) - { - ValueTree file (MessageTypes::USERFILE); - file.setProperty (Ids::file, f.getFullPathName(), nullptr); - tree.appendChild (file, nullptr); - } - } - - StringArray getSystemIncludes() const { return separateJoinedStrings (tree [Ids::systempath]); } - StringArray getUserIncludes() const { return separateJoinedStrings (tree [Ids::userpath]); } - - void setSystemIncludes (const StringArray& s) { tree.setProperty (Ids::systempath, concatenateListOfStrings (s), nullptr); } - void setUserIncludes (const StringArray& s) { tree.setProperty (Ids::userpath, concatenateListOfStrings (s), nullptr); } - - String getGlobalDefs() const { return tree [Ids::defines]; } - void setGlobalDefs (const String& defs) { tree.setProperty (Ids::defines, defs, nullptr); } - - String getCompileFlags() const { return tree [Ids::extraCompilerFlags]; } - void setCompileFlags (const String& f) { tree.setProperty (Ids::extraCompilerFlags, f, nullptr); } - - String getUtilsCppInclude() const { return tree [Ids::utilsCppInclude]; } - void setUtilsCppInclude (const String& s) { tree.setProperty (Ids::utilsCppInclude, s, nullptr); } - - String getJuceModulesFolder() const { return tree [Ids::juceModulesFolder]; } - void setJuceModulesFolder (const String& s) { tree.setProperty (Ids::juceModulesFolder, s, nullptr); } - - StringArray getExtraDLLs() const { return separateJoinedStrings (tree [Ids::extraDLLs]); } - void setExtraDLLs (const StringArray& s) { tree.setProperty (Ids::extraDLLs, concatenateListOfStrings (s), nullptr); } - - String getWindowsTargetPlatformVersion() const { return tree [Ids::liveWindowsTargetPlatformVersion]; } - void setWindowsTargetPlatformVersion (const String& s) { tree.setProperty (Ids::liveWindowsTargetPlatformVersion, s, nullptr); } - - ValueTree tree; -}; diff --git a/extras/Projucer/Source/LiveBuildEngine/jucer_SourceCodeRange.h b/extras/Projucer/Source/LiveBuildEngine/jucer_SourceCodeRange.h deleted file mode 100644 index 5596252e8b..0000000000 --- a/extras/Projucer/Source/LiveBuildEngine/jucer_SourceCodeRange.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2020 - Raw Material Software Limited - - JUCE is an open source library subject to commercial or open-source - licensing. - - By using JUCE, you agree to the terms of both the JUCE 6 End-User License - Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). - - End User License Agreement: www.juce.com/juce-6-licence - Privacy Policy: www.juce.com/juce-privacy-policy - - Or: You may also use this code under the terms of the GPL v3 (see - www.gnu.org/licenses). - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -#pragma once - - -//============================================================================== -struct SourceCodeRange -{ - SourceCodeRange() = default; - - SourceCodeRange (const String& f, int start, int end) - : file (f), range (start, end) - { - #if JUCE_WINDOWS - file = file.replaceCharacter ('/', '\\'); - #endif - } - - SourceCodeRange (const String& s) - { - String::CharPointerType colon1 (nullptr), colon2 (nullptr); - - for (auto p = s.getCharPointer(); ! p.isEmpty(); ++p) - { - if (*p == ':') - { - colon1 = colon2; - colon2 = p; - } - } - - if (colon1.getAddress() != nullptr && colon2.getAddress() != nullptr) - { - file = String (s.getCharPointer(), colon1); - range = Range ((colon1 + 1).getIntValue32(), - (colon2 + 1).getIntValue32()); - } - } - - String file; - Range range; - - bool isValid() const noexcept { return file.isNotEmpty() && range != Range(); } - - void nudge (const String& changedFile, const int insertPoint, const int delta) noexcept - { - if (range.getEnd() >= insertPoint && file == changedFile) - { - const int newEnd = range.getEnd() + delta; - int newStart = range.getStart(); - if (newStart > insertPoint) - newStart += delta; - - range = Range (newStart, newEnd); - } - } - - void fileContentChanged (const String& changedFile) noexcept - { - if (file == changedFile) - range = Range(); - } - - String toString() const - { - if (file.isEmpty() && range.isEmpty()) - return String(); - - return file + ":" + String (range.getStart()) + ":" + String (range.getEnd()); - } - - void writeToValueTree (ValueTree& v, const Identifier& prop) const - { - const String s (toString()); - - if (s.isNotEmpty()) - v.setProperty (prop, s, nullptr); - } - - bool operator== (const SourceCodeRange& other) const noexcept { return range == other.range && file == other.file; } - bool operator!= (const SourceCodeRange& other) const noexcept { return ! operator== (other); } -}; diff --git a/extras/Projucer/Source/Project/UI/Sidebar/jucer_LiveBuildTab.h b/extras/Projucer/Source/Project/UI/Sidebar/jucer_LiveBuildTab.h deleted file mode 100644 index 6ce902beeb..0000000000 --- a/extras/Projucer/Source/Project/UI/Sidebar/jucer_LiveBuildTab.h +++ /dev/null @@ -1,277 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2020 - Raw Material Software Limited - - JUCE is an open source library subject to commercial or open-source - licensing. - - By using JUCE, you agree to the terms of both the JUCE 6 End-User License - Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). - - End User License Agreement: www.juce.com/juce-6-licence - Privacy Policy: www.juce.com/juce-privacy-policy - - Or: You may also use this code under the terms of the GPL v3 (see - www.gnu.org/licenses). - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -#pragma once - - -//============================================================================== -struct LiveBuildSettingsComponent : public Component -{ - LiveBuildSettingsComponent (Project& p) - { - addAndMakeVisible (&group); - - PropertyListBuilder props; - p.getCompileEngineSettings().getLiveSettings (props); - - group.setProperties (props); - group.setName ("Live Build Settings"); - } - - void resized() override - { - group.updateSize (12, 0, getWidth() - 24); - group.setBounds (getLocalBounds().reduced (12, 0)); - } - - void parentSizeChanged() override - { - auto width = jmax (550, getParentWidth()); - auto y = group.updateSize (12, 0, width - 12); - - y = jmax (getParentHeight(), y); - - setSize (width, y); - } - - PropertyGroupComponent group { "Live Build Settings", Icon (getIcons().settings, Colours::transparentBlack) }; - - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LiveBuildSettingsComponent) -}; - -//============================================================================== -class LiveBuildTab : public Component, - private ChangeListener -{ -public: - LiveBuildTab (const CompileEngineChildProcess::Ptr& child, String lastErrorMessage) - { - addAndMakeVisible (settingsButton); - settingsButton.onClick = [this] - { - if (auto* pcc = findParentComponentOfClass()) - pcc->showLiveBuildSettings(); - }; - - if (child != nullptr) - { - addAndMakeVisible (concertinaPanel); - buildConcertina (*child); - isEnabled = true; - } - else - { - errorMessage = getErrorMessage(); - errorMessageLabel.reset (new Label ("Error", errorMessage)); - errorMessageLabel->setJustificationType (Justification::centred); - errorMessageLabel->setFont (Font (12.0f)); - errorMessageLabel->setMinimumHorizontalScale (1.0f); - - addAndMakeVisible (errorMessageLabel.get()); - - if (showDownloadButton) - { - downloadButton.reset (new TextButton ("Download")); - addAndMakeVisible (downloadButton.get()); - downloadButton->onClick = [this] { downloadDLL(); }; - } - - if (showEnableButton) - { - String buttonText ("Enable Now"); - - if (! lastErrorMessage.isEmpty()) - { - errorMessageLabel->setText (lastErrorMessage, dontSendNotification); - buttonText = "Re-enable"; - } - - enableButton.reset (new TextButton (buttonText)); - addAndMakeVisible (enableButton.get()); - enableButton->onClick = [this] - { - if (auto* pcc = findParentComponentOfClass()) - pcc->setBuildEnabled (true); - }; - } - } - } - - void paint (Graphics& g) override - { - g.fillAll (findColour (secondaryBackgroundColourId)); - } - - void resized() override - { - auto bounds = getLocalBounds(); - - settingsButton.setBounds (bounds.removeFromBottom (25) - .removeFromRight (25) - .reduced (3)); - - if (errorMessageLabel != nullptr) - { - bounds.removeFromTop ((bounds.getHeight() / 2) - 40); - - errorMessageLabel->setBounds (bounds.removeFromTop (80)); - - if (downloadButton != nullptr) - downloadButton->setBounds (bounds.removeFromTop (20).reduced (20, 0)); - - if (enableButton != nullptr) - enableButton->setBounds (bounds.removeFromTop (20).reduced (20, 0)); - } - else - { - concertinaPanel.setBounds (bounds); - - for (auto h : headers) - if (h->getName() == "Activities") - h->yPosition = getHeight() - CurrentActivitiesComp::getMaxPanelHeight() - 55; - } - } - - bool isEnabled = false; - String errorMessage; - Component::SafePointer errorListComp; - -private: - OwnedArray headers; - ConcertinaPanel concertinaPanel; - IconButton settingsButton { "Settings", getIcons().settings }; - - std::unique_ptr downloadButton, enableButton; - std::unique_ptr