diff --git a/extras/Projucer/Builds/LinuxMakefile/Makefile b/extras/Projucer/Builds/LinuxMakefile/Makefile
index a282a48029..2026e23824 100644
--- a/extras/Projucer/Builds/LinuxMakefile/Makefile
+++ b/extras/Projucer/Builds/LinuxMakefile/Makefile
@@ -71,7 +71,6 @@ OBJECTS_APP := \
$(JUCE_OBJDIR)/jucer_CommandLine_f35de107.o \
$(JUCE_OBJDIR)/jucer_DocumentEditorComponent_695dff1d.o \
$(JUCE_OBJDIR)/jucer_DownloadCompileEngineThread_8a38703f.o \
- $(JUCE_OBJDIR)/jucer_GlobalPreferences_b0f1bd3d.o \
$(JUCE_OBJDIR)/jucer_Main_f8488f5b.o \
$(JUCE_OBJDIR)/jucer_MainWindow_1e163aeb.o \
$(JUCE_OBJDIR)/jucer_OpenDocumentManager_4c72d210.o \
@@ -126,6 +125,8 @@ OBJECTS_APP := \
.PHONY: clean all
+all : $(JUCE_OUTDIR)/$(JUCE_TARGET_APP)
+
$(JUCE_OUTDIR)/$(JUCE_TARGET_APP) : check-pkg-config $(OBJECTS_APP) $(RESOURCES)
@echo Linking "Projucer - App"
-$(V_AT)mkdir -p $(JUCE_BINDIR)
@@ -158,11 +159,6 @@ $(JUCE_OBJDIR)/jucer_DownloadCompileEngineThread_8a38703f.o: ../../Source/Applic
@echo "Compiling jucer_DownloadCompileEngineThread.cpp"
$(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<"
-$(JUCE_OBJDIR)/jucer_GlobalPreferences_b0f1bd3d.o: ../../Source/Application/jucer_GlobalPreferences.cpp
- -$(V_AT)mkdir -p $(JUCE_OBJDIR)
- @echo "Compiling jucer_GlobalPreferences.cpp"
- $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<"
-
$(JUCE_OBJDIR)/jucer_Main_f8488f5b.o: ../../Source/Application/jucer_Main.cpp
-$(V_AT)mkdir -p $(JUCE_OBJDIR)
@echo "Compiling jucer_Main.cpp"
diff --git a/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj b/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj
index e8970d656f..82ced36bc0 100644
--- a/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj
+++ b/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj
@@ -29,7 +29,6 @@
954A036F5DDB375DB23FFB3E = {isa = PBXBuildFile; fileRef = 0400CB0E056A1D840304D2DE; };
3EB3D569250C4BA4CA9AF578 = {isa = PBXBuildFile; fileRef = C7608A3967D9AB9481848F2B; };
636D21BF846031A6A1A7476A = {isa = PBXBuildFile; fileRef = 11EB44786085029106099D01; };
- 3C3B0ED6C43FDA3AF76DEE2E = {isa = PBXBuildFile; fileRef = 84DE44680C9D37CDDCD127FF; };
95B44E6C74B1DED31DBE37EB = {isa = PBXBuildFile; fileRef = 8C52A3DDA62A746AA7A68535; };
AA9D0B8E23F3D87A23DE9F8A = {isa = PBXBuildFile; fileRef = 9069981E414A631B036CC9AC; };
244BA1BDA5FAA465EA3F9C6D = {isa = PBXBuildFile; fileRef = 2247EE920DF0610CAF9F4513; };
@@ -115,7 +114,6 @@
1B9B5A37F079FE3B3CF8FAB6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_graphics.mm"; path = "../../JuceLibraryCode/include_juce_graphics.mm"; sourceTree = "SOURCE_ROOT"; };
1C216FE9B7A5209C5CCF2517 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_PaintElement.cpp"; path = "../../Source/ComponentEditor/paintelements/jucer_PaintElement.cpp"; sourceTree = "SOURCE_ROOT"; };
1C73D7591E63E8018E279716 = {isa = PBXFileReference; lastKnownFileType = file.svg; name = "export_android.svg"; path = "../../Source/BinaryData/export_android.svg"; sourceTree = "SOURCE_ROOT"; };
- 1C81C5501BE7F2C912250711 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_GlobalPreferences.h"; path = "../../Source/Application/jucer_GlobalPreferences.h"; sourceTree = "SOURCE_ROOT"; };
1D3D6A19A60F0B03DE2F1C14 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_PaintElementPath.h"; path = "../../Source/ComponentEditor/paintelements/jucer_PaintElementPath.h"; sourceTree = "SOURCE_ROOT"; };
1D99EA99F946D665FE583414 = {isa = PBXFileReference; lastKnownFileType = file.svg; name = "wizard_Highlight.svg"; path = "../../Source/BinaryData/wizard_Highlight.svg"; sourceTree = "SOURCE_ROOT"; };
1DE5BBC777FB64798D823002 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_data_structures.mm"; path = "../../JuceLibraryCode/include_juce_data_structures.mm"; sourceTree = "SOURCE_ROOT"; };
@@ -165,6 +163,7 @@
472F9A90F685220D730EBF6C = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = BinaryData.cpp; path = ../../JuceLibraryCode/BinaryData.cpp; sourceTree = "SOURCE_ROOT"; };
47B49049B85EED74D29C9906 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ProjectTree_File.h"; path = "../../Source/Project/jucer_ProjectTree_File.h"; sourceTree = "SOURCE_ROOT"; };
47DD50A5A9091F9900E0EAD9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_JucerTreeViewBase.cpp"; path = "../../Source/Utility/jucer_JucerTreeViewBase.cpp"; sourceTree = "SOURCE_ROOT"; };
+ 4856DA6706D794E2D89DAB63 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_GlobalSearchPathsWindowComponent.h"; path = "../../Source/Utility/jucer_GlobalSearchPathsWindowComponent.h"; sourceTree = "SOURCE_ROOT"; };
4A035FB6A8D93BF154C08C3F = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "projucer_BuildTabStatusComp.h"; path = "../../Source/LiveBuildEngine/projucer_BuildTabStatusComp.h"; sourceTree = "SOURCE_ROOT"; };
4A41FD3066D0979DB48691E5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_MiscUtilities.h"; path = "../../Source/Utility/jucer_MiscUtilities.h"; sourceTree = "SOURCE_ROOT"; };
4A4EBDAD8D098F72CE053235 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ProjectWizard_AudioPlugin.h"; path = "../../Source/Wizards/jucer_ProjectWizard_AudioPlugin.h"; sourceTree = "SOURCE_ROOT"; };
@@ -233,7 +232,6 @@
8138A55052E9FC27284B74DD = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_FontPropertyComponent.h"; path = "../../Source/ComponentEditor/properties/jucer_FontPropertyComponent.h"; sourceTree = "SOURCE_ROOT"; };
820291543BF93243B718F0EE = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_JucerTreeViewBase.h"; path = "../../Source/Utility/jucer_JucerTreeViewBase.h"; sourceTree = "SOURCE_ROOT"; };
842427CFE565F3FCE5B99174 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiscRecording.framework; path = System/Library/Frameworks/DiscRecording.framework; sourceTree = SDKROOT; };
- 84DE44680C9D37CDDCD127FF = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_GlobalPreferences.cpp"; path = "../../Source/Application/jucer_GlobalPreferences.cpp"; sourceTree = "SOURCE_ROOT"; };
86E468DE6556BB2AD76A3D80 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_ProjectContentComponent.cpp"; path = "../../Source/Project/jucer_ProjectContentComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
86E8A40E5A83781A8478454D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_MainTemplate_Window.cpp"; path = "../../Source/BinaryData/jucer_MainTemplate_Window.cpp"; sourceTree = "SOURCE_ROOT"; };
8702F43110E4CCA5E5F827F5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppConfig.h; path = ../../JuceLibraryCode/AppConfig.h; sourceTree = "SOURCE_ROOT"; };
@@ -314,6 +312,7 @@
C00793A0D4A59BDADC62EEF7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "projucer_CompileEngineClient.h"; path = "../../Source/LiveBuildEngine/projucer_CompileEngineClient.h"; sourceTree = "SOURCE_ROOT"; };
C094F3B6A65A79A6DF87C9C2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_PaintElementGroup.h"; path = "../../Source/ComponentEditor/paintelements/jucer_PaintElementGroup.h"; sourceTree = "SOURCE_ROOT"; };
C09BBB58CA45B66D693E8C31 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_TemplateThumbnailsComponent.h"; path = "../../Source/Wizards/jucer_TemplateThumbnailsComponent.h"; sourceTree = "SOURCE_ROOT"; };
+ C15220EDA1A8315DA3255E87 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_EditorColourSchemeWindowComponent.h"; path = "../../Source/Utility/jucer_EditorColourSchemeWindowComponent.h"; sourceTree = "SOURCE_ROOT"; };
C187718F7B9EBA88584B43F3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_PaintRoutine.cpp"; path = "../../Source/ComponentEditor/jucer_PaintRoutine.cpp"; sourceTree = "SOURCE_ROOT"; };
C22791DB75870C4F102AA8A3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_SlidingPanelComponent.h"; path = "../../Source/Utility/jucer_SlidingPanelComponent.h"; sourceTree = "SOURCE_ROOT"; };
C2990A8D054BC230E7C637C3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_NewProjectWizardClasses.h"; path = "../../Source/Wizards/jucer_NewProjectWizardClasses.h"; sourceTree = "SOURCE_ROOT"; };
@@ -396,8 +395,6 @@
11EB44786085029106099D01,
B7307A82D9EB1EDBA91EE43D,
D526C38D581425949BA0E4AC,
- 84DE44680C9D37CDDCD127FF,
- 1C81C5501BE7F2C912250711,
F03E2BDD36E6F4F53AB767A8,
8C52A3DDA62A746AA7A68535,
9069981E414A631B036CC9AC,
@@ -569,10 +566,12 @@
914ADDB50ED7365F08BA91F9,
DF78EF6242D82F912534A277,
188D03A4247F4BC0539F5C49,
+ C15220EDA1A8315DA3255E87,
1729AEDC34001C31B8CC357C,
553725A0E3A391651ED1731E,
35A36102EAD2D2620EE99E7E,
E382C78A1D837DD98916E86A,
+ 4856DA6706D794E2D89DAB63,
CF21D9DB3AEC0A4DCAB36A99,
515FF6E74826E3E3F7273621,
47DD50A5A9091F9900E0EAD9,
@@ -839,7 +838,6 @@
954A036F5DDB375DB23FFB3E,
3EB3D569250C4BA4CA9AF578,
636D21BF846031A6A1A7476A,
- 3C3B0ED6C43FDA3AF76DEE2E,
95B44E6C74B1DED31DBE37EB,
AA9D0B8E23F3D87A23DE9F8A,
244BA1BDA5FAA465EA3F9C6D,
diff --git a/extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj b/extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj
index a483f0f93d..84805596e6 100644
--- a/extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj
+++ b/extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj
@@ -16,6 +16,7 @@
{E4CFCE31-1AF5-C360-751D-9682E333BE4D}
v120
+ 10.0.14393.0
false
v120
v120
+ 10.0.14393.0
@@ -32,6 +34,7 @@
true
v120
v120
+ 10.0.14393.0
@@ -42,6 +45,7 @@
v120
+ 10.0.14393.0
<_ProjectFileVersion>10.0.30319.1
@@ -55,6 +59,7 @@
Projucer
true
v120
+ 10.0.14393.0
@@ -146,7 +151,6 @@
-
@@ -1376,7 +1380,6 @@
-
@@ -1496,9 +1499,11 @@
+
+
diff --git a/extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj.filters b/extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj.filters
index 93c1efae21..23c4138f6e 100644
--- a/extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj.filters
+++ b/extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj.filters
@@ -286,9 +286,6 @@
Projucer\Application
-
- Projucer\Application
-
Projucer\Application
@@ -1719,9 +1716,6 @@
Projucer\Application
-
- Projucer\Application
-
Projucer\Application
@@ -2079,6 +2073,9 @@
Projucer\Utility
+
+ Projucer\Utility
+
Projucer\Utility
@@ -2088,6 +2085,9 @@
Projucer\Utility
+
+ Projucer\Utility
+
Projucer\Utility
diff --git a/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj b/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj
index 27eeee228e..6ab5cda091 100644
--- a/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj
+++ b/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj
@@ -16,6 +16,7 @@
{E4CFCE31-1AF5-C360-751D-9682E333BE4D}
v140
+ 10.0.14393.0
false
v140
v140
+ 10.0.14393.0
@@ -32,6 +34,7 @@
true
v140
v140
+ 10.0.14393.0
@@ -42,6 +45,7 @@
v140
+ 10.0.14393.0
<_ProjectFileVersion>10.0.30319.1
@@ -55,6 +59,7 @@
Projucer
true
v140
+ 10.0.14393.0
@@ -146,7 +151,6 @@
-
@@ -1376,7 +1380,6 @@
-
@@ -1496,9 +1499,11 @@
+
+
diff --git a/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters b/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters
index 3dc4f36a97..f0e3759050 100644
--- a/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters
+++ b/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters
@@ -286,9 +286,6 @@
Projucer\Application
-
- Projucer\Application
-
Projucer\Application
@@ -1719,9 +1716,6 @@
Projucer\Application
-
- Projucer\Application
-
Projucer\Application
@@ -2079,6 +2073,9 @@
Projucer\Utility
+
+ Projucer\Utility
+
Projucer\Utility
@@ -2088,6 +2085,9 @@
Projucer\Utility
+
+ Projucer\Utility
+
Projucer\Utility
diff --git a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj
index a375503921..2d061f1949 100644
--- a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj
+++ b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj
@@ -16,6 +16,7 @@
{E4CFCE31-1AF5-C360-751D-9682E333BE4D}
v141
+ 10.0.14393.0
false
v141
v141
+ 10.0.14393.0
@@ -32,6 +34,7 @@
true
v141
v141
+ 10.0.14393.0
@@ -42,6 +45,7 @@
v141
+ 10.0.14393.0
<_ProjectFileVersion>10.0.30319.1
@@ -55,6 +59,7 @@
Projucer
true
v141
+ 10.0.14393.0
@@ -146,7 +151,6 @@
-
@@ -1376,7 +1380,6 @@
-
@@ -1496,9 +1499,11 @@
+
+
diff --git a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters
index 3f85ff3d3e..351952b98a 100644
--- a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters
+++ b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters
@@ -286,9 +286,6 @@
Projucer\Application
-
- Projucer\Application
-
Projucer\Application
@@ -1719,9 +1716,6 @@
Projucer\Application
-
- Projucer\Application
-
Projucer\Application
@@ -2079,6 +2073,9 @@
Projucer\Utility
+
+ Projucer\Utility
+
Projucer\Utility
@@ -2088,6 +2085,9 @@
Projucer\Utility
+
+ Projucer\Utility
+
Projucer\Utility
diff --git a/extras/Projucer/JuceLibraryCode/AppConfig.h b/extras/Projucer/JuceLibraryCode/AppConfig.h
index 6c4c3718ac..13c2efc550 100644
--- a/extras/Projucer/JuceLibraryCode/AppConfig.h
+++ b/extras/Projucer/JuceLibraryCode/AppConfig.h
@@ -74,7 +74,7 @@
// juce_core flags:
#ifndef JUCE_FORCE_DEBUG
- //#define JUCE_FORCE_DEBUG
+ //#define JUCE_FORCE_DEBUG 1
#endif
#ifndef JUCE_LOG_ASSERTIONS
@@ -82,15 +82,15 @@
#endif
#ifndef JUCE_CHECK_MEMORY_LEAKS
- //#define JUCE_CHECK_MEMORY_LEAKS
+ //#define JUCE_CHECK_MEMORY_LEAKS 1
#endif
#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
- //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
+ //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1
#endif
#ifndef JUCE_INCLUDE_ZLIB_CODE
- //#define JUCE_INCLUDE_ZLIB_CODE
+ //#define JUCE_INCLUDE_ZLIB_CODE 1
#endif
#ifndef JUCE_USE_CURL
@@ -98,59 +98,59 @@
#endif
#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS
- //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS
+ //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1
#endif
#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES
- //#define JUCE_ALLOW_STATIC_NULL_VARIABLES
+ //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1
#endif
//==============================================================================
// juce_events flags:
#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK
- //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK
+ //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1
#endif
//==============================================================================
// juce_graphics flags:
#ifndef JUCE_USE_COREIMAGE_LOADER
- //#define JUCE_USE_COREIMAGE_LOADER
+ //#define JUCE_USE_COREIMAGE_LOADER 1
#endif
#ifndef JUCE_USE_DIRECTWRITE
- //#define JUCE_USE_DIRECTWRITE
+ //#define JUCE_USE_DIRECTWRITE 1
#endif
//==============================================================================
// juce_gui_basics flags:
#ifndef JUCE_ENABLE_REPAINT_DEBUGGING
- //#define JUCE_ENABLE_REPAINT_DEBUGGING
+ //#define JUCE_ENABLE_REPAINT_DEBUGGING 1
#endif
#ifndef JUCE_USE_XSHM
- //#define JUCE_USE_XSHM
+ //#define JUCE_USE_XSHM 1
#endif
#ifndef JUCE_USE_XRENDER
- //#define JUCE_USE_XRENDER
+ //#define JUCE_USE_XRENDER 1
#endif
#ifndef JUCE_USE_XCURSOR
- //#define JUCE_USE_XCURSOR
+ //#define JUCE_USE_XCURSOR 1
#endif
//==============================================================================
// juce_gui_extra flags:
#ifndef JUCE_WEB_BROWSER
- //#define JUCE_WEB_BROWSER
+ //#define JUCE_WEB_BROWSER 1
#endif
#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR
- //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR
+ //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1
#endif
//==============================================================================
#ifndef JUCE_STANDALONE_APPLICATION
diff --git a/extras/Projucer/Projucer.jucer b/extras/Projucer/Projucer.jucer
index 4db0c29131..3e22b2be99 100644
--- a/extras/Projucer/Projucer.jucer
+++ b/extras/Projucer/Projucer.jucer
@@ -136,10 +136,6 @@
resource="0" file="Source/Application/jucer_DownloadCompileEngineThread.h"/>
-
-
+
+
& ownerPointer,
- bool showCodeEditorTab = false);
-
static const char* getSchemeFileSuffix() { return ".scheme"; }
static const char* getSchemeFileWildCard() { return "*.scheme"; }
diff --git a/extras/Projucer/Source/Application/jucer_Application.cpp b/extras/Projucer/Source/Application/jucer_Application.cpp
index 75b195c78d..f4874dad8b 100644
--- a/extras/Projucer/Source/Application/jucer_Application.cpp
+++ b/extras/Projucer/Source/Application/jucer_Application.cpp
@@ -196,11 +196,11 @@ void ProjucerApplication::shutdown()
}
versionChecker = nullptr;
- appearanceEditorWindow = nullptr;
- globalPreferencesWindow = nullptr;
utf8Window = nullptr;
svgPathWindow = nullptr;
aboutWindow = nullptr;
+ pathsWindow = nullptr;
+ editorColourSchemeWindow = nullptr;
if (licenseController != nullptr)
{
@@ -386,7 +386,7 @@ void ProjucerApplication::createFileMenu (PopupMenu& menu)
#if ! JUCE_MAC
menu.addCommandItem (commandManager, CommandIDs::showAboutWindow);
menu.addCommandItem (commandManager, CommandIDs::showAppUsageWindow);
- menu.addCommandItem (commandManager, CommandIDs::showGlobalPreferences);
+ menu.addCommandItem (commandManager, CommandIDs::showGlobalPathsWindow);
menu.addSeparator();
menu.addCommandItem (commandManager, StandardApplicationCommandIDs::quit);
#endif
@@ -463,7 +463,7 @@ void ProjucerApplication::createColourSchemeItems (PopupMenu& menu)
for (auto s : schemes)
{
editorColourSchemes.addItem (codeEditorColourSchemeBaseID + i, s,
- globalPreferencesWindow == nullptr,
+ editorColourSchemeWindow == nullptr,
selectedEditorColourSchemeIndex == i);
++i;
}
@@ -472,7 +472,7 @@ void ProjucerApplication::createColourSchemeItems (PopupMenu& menu)
editorColourSchemes.addSeparator();
editorColourSchemes.addItem (codeEditorColourSchemeBaseID + numEditorColourSchemes,
- "Create...", globalPreferencesWindow == nullptr);
+ "Create...", editorColourSchemeWindow == nullptr);
menu.addSubMenu ("Editor Colour Scheme", editorColourSchemes);
}
@@ -511,7 +511,7 @@ void ProjucerApplication::createExtraAppleMenuItems (PopupMenu& menu)
menu.addCommandItem (commandManager, CommandIDs::showAboutWindow);
menu.addCommandItem (commandManager, CommandIDs::showAppUsageWindow);
menu.addSeparator();
- menu.addCommandItem (commandManager, CommandIDs::showGlobalPreferences);
+ menu.addCommandItem (commandManager, CommandIDs::showGlobalPathsWindow);
}
void ProjucerApplication::handleMainMenuCommand (int menuItemID)
@@ -539,7 +539,7 @@ void ProjucerApplication::handleMainMenuCommand (int menuItemID)
}
else if (menuItemID == (codeEditorColourSchemeBaseID + numEditorColourSchemes))
{
- AppearanceSettings::showGlobalPreferences (globalPreferencesWindow, true);
+ showEditorColourSchemeWindow();
}
else
{
@@ -556,7 +556,7 @@ void ProjucerApplication::getAllCommands (Array & commands)
CommandIDs::open,
CommandIDs::closeAllDocuments,
CommandIDs::saveAll,
- CommandIDs::showGlobalPreferences,
+ CommandIDs::showGlobalPathsWindow,
CommandIDs::showUTF8Tool,
CommandIDs::showSVGPathTool,
CommandIDs::showAboutWindow,
@@ -580,9 +580,10 @@ void ProjucerApplication::getCommandInfo (CommandID commandID, ApplicationComman
result.defaultKeypresses.add (KeyPress ('o', ModifierKeys::commandModifier, 0));
break;
- case CommandIDs::showGlobalPreferences:
- result.setInfo ("Preferences...", "Shows the preferences window.", CommandCategories::general, 0);
- result.defaultKeypresses.add (KeyPress (',', ModifierKeys::commandModifier, 0));
+ case CommandIDs::showGlobalPathsWindow:
+ result.setInfo ("Global Search Paths...",
+ "Shows the window to change the global search paths.",
+ CommandCategories::general, 0);
break;
case CommandIDs::closeAllDocuments:
@@ -646,7 +647,7 @@ bool ProjucerApplication::perform (const InvocationInfo& info)
case CommandIDs::closeAllDocuments: closeAllDocuments (true); break;
case CommandIDs::showUTF8Tool: showUTF8ToolWindow(); break;
case CommandIDs::showSVGPathTool: showSVGPathDataToolWindow(); break;
- case CommandIDs::showGlobalPreferences: AppearanceSettings::showGlobalPreferences (globalPreferencesWindow); break;
+ case CommandIDs::showGlobalPathsWindow: showPathsWindow(); break;
case CommandIDs::showAboutWindow: showAboutWindow(); break;
case CommandIDs::showAppUsageWindow: showApplicationUsageDataAgreementPopup(); break;
case CommandIDs::loginLogout: doLogout(); break;
@@ -742,6 +743,32 @@ void ProjucerApplication::dismissApplicationUsageDataAgreementPopup()
applicationUsageDataWindow = nullptr;
}
+void ProjucerApplication::showPathsWindow()
+{
+ if (pathsWindow != nullptr)
+ pathsWindow->toFront (true);
+ else
+ new FloatingToolWindow ("Global Search Paths",
+ "pathsWindowPos",
+ new GlobalSearchPathsWindowComponent(), pathsWindow, false,
+ 600, 500, 600, 500, 600, 500);
+}
+
+void ProjucerApplication::showEditorColourSchemeWindow()
+{
+ if (editorColourSchemeWindow != nullptr)
+ editorColourSchemeWindow->toFront (true);
+ else
+ {
+ new FloatingToolWindow ("Editor Colour Scheme",
+ "editorColourSchemeWindowPos",
+ new EditorColourSchemeWindowComponent(),
+ editorColourSchemeWindow,
+ false,
+ 500, 500, 500, 500, 500, 500);
+ }
+}
+
//==============================================================================
struct FileWithTime
{
@@ -846,9 +873,10 @@ void ProjucerApplication::setColourScheme (int index, bool saveSetting)
if (utf8Window != nullptr) utf8Window->sendLookAndFeelChange();
if (svgPathWindow != nullptr) svgPathWindow->sendLookAndFeelChange();
- if (globalPreferencesWindow != nullptr) globalPreferencesWindow->sendLookAndFeelChange();
if (aboutWindow != nullptr) aboutWindow->sendLookAndFeelChange();
if (applicationUsageDataWindow != nullptr) applicationUsageDataWindow->sendLookAndFeelChange();
+ if (pathsWindow != nullptr) pathsWindow->sendLookAndFeelChange();
+ if (editorColourSchemeWindow != nullptr) editorColourSchemeWindow->sendLookAndFeelChange();
auto* mcm = ModalComponentManager::getInstance();
for (auto i = 0; i < mcm->getNumModalComponents(); ++i)
diff --git a/extras/Projucer/Source/Application/jucer_Application.h b/extras/Projucer/Source/Application/jucer_Application.h
index 6559c88279..559edaf85a 100644
--- a/extras/Projucer/Source/Application/jucer_Application.h
+++ b/extras/Projucer/Source/Application/jucer_Application.h
@@ -102,6 +102,9 @@ public:
void showApplicationUsageDataAgreementPopup();
void dismissApplicationUsageDataAgreementPopup();
+ void showPathsWindow();
+ void showEditorColourSchemeWindow();
+
void updateAllBuildTabs();
LatestVersionChecker* createVersionChecker() const;
@@ -129,8 +132,8 @@ public:
OpenDocumentManager openDocumentManager;
ScopedPointer commandManager;
- ScopedPointer appearanceEditorWindow, globalPreferencesWindow, utf8Window,
- svgPathWindow, aboutWindow, applicationUsageDataWindow;
+ ScopedPointer utf8Window, svgPathWindow, aboutWindow, applicationUsageDataWindow,
+ pathsWindow, editorColourSchemeWindow;
ScopedPointer logger;
diff --git a/extras/Projucer/Source/Application/jucer_AutoUpdater.cpp b/extras/Projucer/Source/Application/jucer_AutoUpdater.cpp
index 1b4e9e4076..6e55fb0174 100644
--- a/extras/Projucer/Source/Application/jucer_AutoUpdater.cpp
+++ b/extras/Projucer/Source/Application/jucer_AutoUpdater.cpp
@@ -745,7 +745,7 @@ void LatestVersionChecker::modalStateFinished (int result,
void LatestVersionChecker::askUserForLocationToDownload (URL& newVersionToDownload, const String& extraHeaders)
{
- File targetFolder (findDefaultModulesFolder());
+ File targetFolder (EnabledModuleList::findGlobalModulesFolder());
if (isJuceModulesFolder (targetFolder))
targetFolder = targetFolder.getParentDirectory();
diff --git a/extras/Projucer/Source/Application/jucer_CommandIDs.h b/extras/Projucer/Source/Application/jucer_CommandIDs.h
index 3046977511..175ac31701 100644
--- a/extras/Projucer/Source/Application/jucer_CommandIDs.h
+++ b/extras/Projucer/Source/Application/jucer_CommandIDs.h
@@ -45,7 +45,7 @@ namespace CommandIDs
createNewExporter = 0x300015,
showUTF8Tool = 0x300020,
- showGlobalPreferences = 0x300021,
+ showGlobalPathsWindow = 0x300021,
showTranslationTool = 0x300022,
showSVGPathTool = 0x300023,
showAboutWindow = 0x300024,
diff --git a/extras/Projucer/Source/Application/jucer_GlobalPreferences.cpp b/extras/Projucer/Source/Application/jucer_GlobalPreferences.cpp
deleted file mode 100644
index f7adcf1c76..0000000000
--- a/extras/Projucer/Source/Application/jucer_GlobalPreferences.cpp
+++ /dev/null
@@ -1,465 +0,0 @@
-/*
- ==============================================================================
-
- This file is part of the JUCE library.
- Copyright (c) 2017 - ROLI Ltd.
-
- 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 5 End-User License
- Agreement and JUCE 5 Privacy Policy (both updated and effective as of the
- 27th April 2017).
-
- End User License Agreement: www.juce.com/juce-5-licence
- Privacy Policy: www.juce.com/juce-5-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 "../jucer_Headers.h"
-#include "jucer_GlobalPreferences.h"
-#include "../Utility/jucer_FloatingToolWindow.h"
-#include "../Utility/jucer_ColourPropertyComponent.h"
-#include "jucer_Application.h"
-
-//==============================================================================
-PathSettingsTab::PathSettingsTab (DependencyPathOS os)
-{
- const int maxChars = 1024;
-
- auto& settings = getAppSettings();
-
- vst3PathComponent = pathComponents.add (new TextPropertyComponent (settings.getGlobalPath (Ids::vst3Path, os), "VST3 SDK", maxChars, false));
-
- #if ! JUCE_LINUX
- rtasPathComponent = pathComponents.add (new TextPropertyComponent (settings.getGlobalPath (Ids::rtasPath, os), "RTAS SDK", maxChars, false));
- aaxPathComponent = pathComponents.add (new TextPropertyComponent (settings.getGlobalPath (Ids::aaxPath, os), "AAX SDK", maxChars, false));
- #endif
-
- androidSdkPathComponent = pathComponents.add (new TextPropertyComponent (settings.getGlobalPath (Ids::androidSDKPath, os), "Android SDK", maxChars, false));
- androidNdkPathComponent = pathComponents.add (new TextPropertyComponent (settings.getGlobalPath (Ids::androidNDKPath, os), "Android NDK", maxChars, false));
-
- for (auto component : pathComponents)
- {
- addAndMakeVisible (component);
- component->addListener (this);
- textPropertyComponentChanged (component);
- }
-}
-
-PathSettingsTab::~PathSettingsTab()
-{
-}
-
-void PathSettingsTab::textPropertyComponentChanged (TextPropertyComponent* textPropertyComponent)
-{
- auto keyName = getKeyForPropertyComponent (textPropertyComponent);
-
- auto textColour = getAppSettings().isGlobalPathValid (File::getCurrentWorkingDirectory(), keyName, textPropertyComponent->getText())
- ? findColour (widgetTextColourId)
- : Colours::red;
-
- textPropertyComponent->setColour (TextPropertyComponent::textColourId, textColour);
-}
-
-Identifier PathSettingsTab::getKeyForPropertyComponent (TextPropertyComponent* component) const
-{
- if (component == vst3PathComponent) return Ids::vst3Path;
- if (component == rtasPathComponent) return Ids::rtasPath;
- if (component == aaxPathComponent) return Ids::aaxPath;
- if (component == androidSdkPathComponent) return Ids::androidSDKPath;
- if (component == androidNdkPathComponent) return Ids::androidNDKPath;
-
- // this property component does not have a key associated to it!
- jassertfalse;
- return {};
-}
-
-Component* PathSettingsTab::getContent()
-{
- return this;
-}
-
-String PathSettingsTab::getName() const noexcept
-{
- return "Paths";
-}
-
-void PathSettingsTab::resized()
-{
- const int componentHeight = 25;
-
- for (auto component : pathComponents)
- {
- const auto elementNumber = pathComponents.indexOf (component);
- component->setBounds (10, componentHeight * elementNumber, getWidth() - 20, componentHeight);
- }
-}
-
-void PathSettingsTab::lookAndFeelChanged()
-{
- for (auto* comp : pathComponents)
- textPropertyComponentChanged (comp);
-}
-
-//==============================================================================
-struct AppearanceEditor
-{
- struct FontScanPanel : public Component,
- private Timer
- {
- FontScanPanel()
- {
- fontsToScan = Font::findAllTypefaceNames();
- startTimer (1);
- }
-
- void paint (Graphics& g) override
- {
- g.fillAll (findColour (backgroundColourId));
-
- g.setFont (14.0f);
- g.setColour (findColour (defaultTextColourId));
- g.drawFittedText ("Scanning for fonts..", getLocalBounds(), Justification::centred, 2);
-
- const auto size = 30;
- getLookAndFeel().drawSpinningWaitAnimation (g, Colours::white, (getWidth() - size) / 2, getHeight() / 2 - 50, size, size);
- }
-
- void timerCallback() override
- {
- repaint();
-
- if (fontsToScan.size() == 0)
- {
- getAppSettings().monospacedFontNames = fontsFound;
-
- if (auto* tab = findParentComponentOfClass())
- tab->changeContent (new EditorPanel());
- }
- else
- {
- if (isMonospacedTypeface (fontsToScan[0]))
- fontsFound.add (fontsToScan[0]);
-
- fontsToScan.remove (0);
- }
- }
-
- // A rather hacky trick to select only the fixed-pitch fonts..
- // This is unfortunately a bit slow, but will work on all platforms.
- static bool isMonospacedTypeface (const String& name)
- {
- const Font font (name, 20.0f, Font::plain);
-
- const auto width = font.getStringWidth ("....");
-
- return width == font.getStringWidth ("WWWW")
- && width == font.getStringWidth ("0000")
- && width == font.getStringWidth ("1111")
- && width == font.getStringWidth ("iiii");
- }
-
- StringArray fontsToScan, fontsFound;
- };
-
- //==============================================================================
- struct EditorPanel : public Component,
- private ButtonListener
- {
- EditorPanel()
- : loadButton ("Load Scheme..."),
- saveButton ("Save Scheme...")
- {
- rebuildProperties();
- addAndMakeVisible (panel);
-
- addAndMakeVisible (loadButton);
- addAndMakeVisible (saveButton);
-
- loadButton.addListener (this);
- saveButton.addListener (this);
-
- lookAndFeelChanged();
-
- saveSchemeState();
- }
-
- ~EditorPanel()
- {
- if (hasSchemeBeenModifiedSinceSave())
- saveScheme (true);
- }
-
- void rebuildProperties()
- {
- auto& scheme = getAppSettings().appearance;
-
- Array props;
- auto fontValue = scheme.getCodeFontValue();
- props.add (FontNameValueSource::createProperty ("Code Editor Font", fontValue));
- props.add (FontSizeValueSource::createProperty ("Font Size", fontValue));
-
- const auto colourNames = scheme.getColourNames();
-
- for (int i = 0; i < colourNames.size(); ++i)
- props.add (new ColourPropertyComponent (nullptr, colourNames[i],
- scheme.getColourValue (colourNames[i]),
- Colours::white, false));
-
- panel.clear();
- panel.addProperties (props);
- }
-
- void resized() override
- {
- auto r = getLocalBounds();
- panel.setBounds (r.removeFromTop (getHeight() - 28).reduced (10, 2));
- loadButton.setBounds (r.removeFromLeft (getWidth() / 2).reduced (10, 1));
- saveButton.setBounds (r.reduced (10, 1));
- }
-
- private:
- PropertyPanel panel;
- TextButton loadButton, saveButton;
-
- Font codeFont;
- Array colourValues;
-
- void buttonClicked (Button* b) override
- {
- if (b == &loadButton)
- loadScheme();
- else
- saveScheme (false);
- }
-
- void saveScheme (bool isExit)
- {
- FileChooser fc ("Select a file in which to save this colour-scheme...",
- getAppSettings().appearance.getSchemesFolder()
- .getNonexistentChildFile ("Scheme", AppearanceSettings::getSchemeFileSuffix()),
- AppearanceSettings::getSchemeFileWildCard());
-
- if (fc.browseForFileToSave (true))
- {
- File file (fc.getResult().withFileExtension (AppearanceSettings::getSchemeFileSuffix()));
- getAppSettings().appearance.writeToFile (file);
- getAppSettings().appearance.refreshPresetSchemeList();
-
- saveSchemeState();
- ProjucerApplication::getApp().selectEditorColourSchemeWithName (file.getFileNameWithoutExtension());
- }
- else if (isExit)
- {
- restorePreviousScheme();
- }
- }
-
- void loadScheme()
- {
- FileChooser fc ("Please select a colour-scheme file to load...",
- getAppSettings().appearance.getSchemesFolder(),
- AppearanceSettings::getSchemeFileWildCard());
-
- if (fc.browseForFileToOpen())
- {
- if (getAppSettings().appearance.readFromFile (fc.getResult()))
- {
- rebuildProperties();
- saveSchemeState();
- }
- }
- }
-
- void lookAndFeelChanged() override
- {
- loadButton.setColour (TextButton::buttonColourId,
- findColour (secondaryButtonBackgroundColourId));
- }
-
- void saveSchemeState()
- {
- auto& appearance = getAppSettings().appearance;
- const auto colourNames = appearance.getColourNames();
-
- codeFont = appearance.getCodeFont();
-
- colourValues.clear();
- for (int i = 0; i < colourNames.size(); ++i)
- colourValues.add (appearance.getColourValue (colourNames[i]).getValue());
- }
-
- bool hasSchemeBeenModifiedSinceSave()
- {
- auto& appearance = getAppSettings().appearance;
- const auto colourNames = appearance.getColourNames();
-
- if (codeFont != appearance.getCodeFont())
- return true;
-
- for (int i = 0; i < colourNames.size(); ++i)
- if (colourValues[i] != appearance.getColourValue (colourNames[i]).getValue())
- return true;
-
- return false;
- }
-
- void restorePreviousScheme()
- {
- auto& appearance = getAppSettings().appearance;
- const auto colourNames = appearance.getColourNames();
-
- appearance.getCodeFontValue().setValue (codeFont.toString());
-
- for (int i = 0; i < colourNames.size(); ++i)
- appearance.getColourValue (colourNames[i]).setValue (colourValues[i]);
- }
-
-
- JUCE_DECLARE_NON_COPYABLE (EditorPanel)
- };
-
- //==============================================================================
- struct FontNameValueSource : public ValueSourceFilter
- {
- FontNameValueSource (const Value& source) : ValueSourceFilter (source) {}
-
- var getValue() const override
- {
- return Font::fromString (sourceValue.toString()).getTypefaceName();
- }
-
- void setValue (const var& newValue) override
- {
- auto font = Font::fromString (sourceValue.toString());
- font.setTypefaceName (newValue.toString().isEmpty() ? Font::getDefaultMonospacedFontName()
- : newValue.toString());
- sourceValue = font.toString();
- }
-
- static ChoicePropertyComponent* createProperty (const String& title, const Value& value)
- {
- auto fontNames = getAppSettings().monospacedFontNames;
-
- Array values;
- values.add (Font::getDefaultMonospacedFontName());
- values.add (var());
-
- for (int i = 0; i < fontNames.size(); ++i)
- values.add (fontNames[i]);
-
- StringArray names;
- names.add ("");
- names.add (String());
- names.addArray (getAppSettings().monospacedFontNames);
-
- return new ChoicePropertyComponent (Value (new FontNameValueSource (value)),
- title, names, values);
- }
- };
-
- //==============================================================================
- struct FontSizeValueSource : public ValueSourceFilter
- {
- FontSizeValueSource (const Value& source) : ValueSourceFilter (source) {}
-
- var getValue() const override
- {
- return Font::fromString (sourceValue.toString()).getHeight();
- }
-
- void setValue (const var& newValue) override
- {
- sourceValue = Font::fromString (sourceValue.toString()).withHeight (newValue).toString();
- }
-
- static PropertyComponent* createProperty (const String& title, const Value& value)
- {
- return new SliderPropertyComponent (Value (new FontSizeValueSource (value)),
- title, 5.0, 40.0, 0.1, 0.5);
- }
- };
-};
-
-void AppearanceSettings::showGlobalPreferences (ScopedPointer& ownerPointer, bool showCodeEditorTab)
-{
- if (ownerPointer != nullptr)
- ownerPointer->toFront (true);
- else
- {
- auto* prefs = new GlobalPreferencesComponent();
-
- new FloatingToolWindow ("Preferences",
- "globalPreferencesEditorPos",
- prefs,
- ownerPointer, false,
- 500, 500, 500, 500, 500, 500);
-
- if (showCodeEditorTab)
- prefs->setCurrentTabIndex (1);
- }
-}
-
-//==============================================================================
-AppearanceSettingsTab::AppearanceSettingsTab()
-{
- if (getAppSettings().monospacedFontNames.size() == 0)
- content = new AppearanceEditor::FontScanPanel();
- else
- content = new AppearanceEditor::EditorPanel();
-
- changeContent (content);
-}
-
-Component* AppearanceSettingsTab::getContent()
-{
- return this;
-}
-
-void AppearanceSettingsTab::changeContent (Component* newContent)
-{
- content = newContent;
- addAndMakeVisible (content);
- content->setBounds (getLocalBounds());
-}
-
-String AppearanceSettingsTab::getName() const noexcept
-{
- return "Code Editor";
-}
-
-void AppearanceSettingsTab::resized()
-{
- content->setBounds (getLocalBounds());
-}
-
-//==============================================================================
-GlobalPreferencesComponent::GlobalPreferencesComponent()
- : TabbedComponent (TabbedButtonBar::TabsAtTop)
-{
- preferenceTabs.add (new PathSettingsTab (TargetOS::getThisOS()));
- preferenceTabs.add (new AppearanceSettingsTab);
-
- for (GlobalPreferencesTab** tab = preferenceTabs.begin(); tab != preferenceTabs.end(); ++tab)
- addTab ((*tab)->getName(), findColour (backgroundColourId, true), (*tab)->getContent(), true);
-}
-
-void GlobalPreferencesComponent::paint (Graphics& g)
-{
- g.fillAll (findColour (backgroundColourId));
-}
-
-void GlobalPreferencesComponent::lookAndFeelChanged()
-{
- for (auto* tab : preferenceTabs)
- tab->getContent()->sendLookAndFeelChange();
-}
diff --git a/extras/Projucer/Source/Application/jucer_GlobalPreferences.h b/extras/Projucer/Source/Application/jucer_GlobalPreferences.h
deleted file mode 100644
index 4689936a09..0000000000
--- a/extras/Projucer/Source/Application/jucer_GlobalPreferences.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- ==============================================================================
-
- This file is part of the JUCE library.
- Copyright (c) 2017 - ROLI Ltd.
-
- 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 5 End-User License
- Agreement and JUCE 5 Privacy Policy (both updated and effective as of the
- 27th April 2017).
-
- End User License Agreement: www.juce.com/juce-5-licence
- Privacy Policy: www.juce.com/juce-5-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 "../Project/jucer_DependencyPathPropertyComponent.h"
-
-
-class GlobalPreferencesTab
-{
-public:
- virtual ~GlobalPreferencesTab() {}
-
- virtual Component* getContent() = 0;
- virtual String getName() const noexcept = 0;
-};
-
-//==============================================================================
-/** This component implements the "Paths" tab in the global preferences window,
- which defines the default paths for dependencies like third-party SDKs
- for this machine.
-*/
-class PathSettingsTab : public GlobalPreferencesTab,
- public Component,
- private TextPropertyComponent::Listener
-{
-public:
- PathSettingsTab (DependencyPathOS);
- ~PathSettingsTab();
-
- Component* getContent() override;
- String getName() const noexcept override;
-
- void resized() override;
-
-private:
- void textPropertyComponentChanged (TextPropertyComponent*) override;
-
- Identifier getKeyForPropertyComponent (TextPropertyComponent*) const;
-
- void lookAndFeelChanged() override;
-
- OwnedArray pathComponents;
-
- TextPropertyComponent* vst3PathComponent;
- TextPropertyComponent* rtasPathComponent;
- TextPropertyComponent* aaxPathComponent;
- TextPropertyComponent* androidSdkPathComponent;
- TextPropertyComponent* androidNdkPathComponent;
-
- JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PathSettingsTab)
-};
-
-//==============================================================================
-/** This component implements the "Code Editor" tab in the global preferences window,
- which sets font sizes and colours for the Projucer's code editor.
- The content is either an EditorPanel (the actual settings tab) or a FontScanPanel
- (shown if the tab is scanning for available fonts before showing the EditorPanel).
-*/
-class AppearanceSettingsTab : public GlobalPreferencesTab,
- public Component
-{
-public:
- AppearanceSettingsTab();
-
- Component* getContent() override;
- void changeContent (Component* newContent);
- String getName() const noexcept override;
-
- void resized() override;
-
-private:
- ScopedPointer content;
-
- JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AppearanceSettingsTab)
-};
-
-//==============================================================================
-class GlobalPreferencesComponent : public TabbedComponent
-{
-public:
- GlobalPreferencesComponent();
- void paint (Graphics&) override;
-
-private:
- void lookAndFeelChanged() override;
-
- OwnedArray preferenceTabs;
-
- JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GlobalPreferencesComponent)
-};
diff --git a/extras/Projucer/Source/Application/jucer_Main.cpp b/extras/Projucer/Source/Application/jucer_Main.cpp
index 1f68447cd2..d858fed6c7 100644
--- a/extras/Projucer/Source/Application/jucer_Main.cpp
+++ b/extras/Projucer/Source/Application/jucer_Main.cpp
@@ -35,6 +35,8 @@
#include "../Utility/jucer_SVGPathDataComponent.h"
#include "../Utility/jucer_AboutWindowComponent.h"
#include "../Utility/jucer_ApplicationUsageDataWindowComponent.h"
+#include "../Utility/jucer_EditorColourSchemeWindowComponent.h"
+#include "../Utility/jucer_GlobalSearchPathsWindowComponent.h"
#include "../Utility/jucer_FloatingToolWindow.h"
#include "../LiveBuildEngine/projucer_MessageIDs.h"
diff --git a/extras/Projucer/Source/Application/jucer_MainWindow.cpp b/extras/Projucer/Source/Application/jucer_MainWindow.cpp
index e0be5970d9..5adcde5fe0 100644
--- a/extras/Projucer/Source/Application/jucer_MainWindow.cpp
+++ b/extras/Projucer/Source/Application/jucer_MainWindow.cpp
@@ -580,39 +580,3 @@ Project* MainWindowList::getFrontmostProject()
return nullptr;
}
-
-File findDefaultModulesFolder (bool mustContainJuceCoreModule)
-{
- auto& windows = ProjucerApplication::getApp().mainWindowList;
-
- for (int i = windows.windows.size(); --i >= 0;)
- {
- if (auto* p = windows.windows.getUnchecked (i)->getProject())
- {
- const File f (EnabledModuleList::findDefaultModulesFolder (*p));
-
- if (isJuceModulesFolder (f) || (f.isDirectory() && ! mustContainJuceCoreModule))
- return f;
- }
- }
-
- if (mustContainJuceCoreModule)
- return findDefaultModulesFolder (false);
-
- auto f = File::getSpecialLocation (File::currentApplicationFile);
-
- for (;;)
- {
- auto parent = f.getParentDirectory();
-
- if (parent == f || ! parent.isDirectory())
- break;
-
- if (isJuceFolder (parent))
- return parent.getChildFile ("modules");
-
- f = parent;
- }
-
- return {};
-}
diff --git a/extras/Projucer/Source/ComponentEditor/ui/jucer_JucerDocumentEditor.cpp b/extras/Projucer/Source/ComponentEditor/ui/jucer_JucerDocumentEditor.cpp
index 010fb0be7e..f638ecda18 100644
--- a/extras/Projucer/Source/ComponentEditor/ui/jucer_JucerDocumentEditor.cpp
+++ b/extras/Projucer/Source/ComponentEditor/ui/jucer_JucerDocumentEditor.cpp
@@ -26,7 +26,6 @@
#include "../../jucer_Headers.h"
#include "../../Application/jucer_AppearanceSettings.h"
-#include "../../Application/jucer_GlobalPreferences.h"
#include "../../Application/jucer_Application.h"
#include "jucer_JucerDocumentEditor.h"
#include "jucer_TestComponent.h"
diff --git a/extras/Projucer/Source/LiveBuildEngine/projucer_CompileEngineClient.cpp b/extras/Projucer/Source/LiveBuildEngine/projucer_CompileEngineClient.cpp
index 252143f327..74f6de5883 100644
--- a/extras/Projucer/Source/LiveBuildEngine/projucer_CompileEngineClient.cpp
+++ b/extras/Projucer/Source/LiveBuildEngine/projucer_CompileEngineClient.cpp
@@ -519,9 +519,7 @@ private:
paths.addArray (getSearchPathsFromString (ProjectProperties::getSystemHeaderPathString (project)));
if (project.getProjectType().isAudioPlugin())
- {
- paths.add (getAppSettings().getGlobalPath (Ids::vst3Path, TargetOS::getThisOS()).toString());
- }
+ paths.add (getAppSettings().getStoredPath (Ids::vst3Path).toString());
OwnedArray modules;
project.getModules().createRequiredModules (modules);
diff --git a/extras/Projucer/Source/Project Saving/jucer_ProjectExporter.cpp b/extras/Projucer/Source/Project Saving/jucer_ProjectExporter.cpp
index 0d0f2a99f4..212c2f2c3a 100644
--- a/extras/Projucer/Source/Project Saving/jucer_ProjectExporter.cpp
+++ b/extras/Projucer/Source/Project Saving/jucer_ProjectExporter.cpp
@@ -493,8 +493,26 @@ Value ProjectExporter::getPathForModuleValue (const String& moduleID)
String ProjectExporter::getPathForModuleString (const String& moduleID) const
{
- return settings.getChildWithName (Ids::MODULEPATHS)
- .getChildWithProperty (Ids::ID, moduleID) [Ids::path].toString();
+ auto exporterPath = settings.getChildWithName (Ids::MODULEPATHS)
+ .getChildWithProperty (Ids::ID, moduleID) [Ids::path].toString();
+
+ if (exporterPath.isEmpty() || project.getModules().shouldUseGlobalPath (moduleID).getValue())
+ {
+ auto id = EnabledModuleList::isJuceModule (moduleID) ? Ids::defaultJuceModulePath
+ : Ids::defaultUserModulePath;
+
+ if (TargetOS::getThisOS() != getTargetOSForExporter())
+ return getAppSettings().getFallbackPathForOS (id, getTargetOSForExporter()).toString();
+
+ if (id == Ids::defaultJuceModulePath)
+ return getAppSettings().getStoredPath (Ids::defaultJuceModulePath).toString();
+
+ return EnabledModuleList::findUserModuleFolder (moduleID,
+ getAppSettings().getStoredPath (Ids::defaultUserModulePath).toString(),
+ project).getFullPathName();
+ }
+
+ return exporterPath;
}
void ProjectExporter::removePathForModule (const String& moduleID)
@@ -504,6 +522,18 @@ void ProjectExporter::removePathForModule (const String& moduleID)
paths.removeChild (m, project.getUndoManagerFor (settings));
}
+TargetOS::OS ProjectExporter::getTargetOSForExporter() const
+{
+ auto targetOS = TargetOS::unknown;
+
+ if (isWindows()) targetOS = TargetOS::windows;
+ else if (isOSX() || isiOS()) targetOS = TargetOS::osx;
+ else if (isLinux()) targetOS = TargetOS::linux;
+ else if (isAndroid()) targetOS = TargetOS::getThisOS();
+
+ return targetOS;
+}
+
RelativePath ProjectExporter::getModuleFolderRelativeToProject (const String& moduleID) const
{
if (project.getModules().shouldCopyModuleFilesLocally (moduleID).getValue())
diff --git a/extras/Projucer/Source/Project Saving/jucer_ProjectExporter.h b/extras/Projucer/Source/Project Saving/jucer_ProjectExporter.h
index 8d249b6773..bc97d44d79 100644
--- a/extras/Projucer/Source/Project Saving/jucer_ProjectExporter.h
+++ b/extras/Projucer/Source/Project Saving/jucer_ProjectExporter.h
@@ -28,7 +28,7 @@
#include "../Project/jucer_Project.h"
#include "../Project/jucer_ProjectType.h"
-#include "../Application/jucer_GlobalPreferences.h"
+#include "../Project/jucer_DependencyPathPropertyComponent.h"
class ProjectSaver;
@@ -160,6 +160,8 @@ public:
String getPathForModuleString (const String& moduleID) const;
void removePathForModule (const String& moduleID);
+ TargetOS::OS getTargetOSForExporter() const;
+
RelativePath getLegacyModulePath (const String& moduleID) const;
String getLegacyModulePath() const;
diff --git a/extras/Projucer/Source/Project/jucer_ConfigTree_Base.h b/extras/Projucer/Source/Project/jucer_ConfigTree_Base.h
index 512010188d..cc9cb29728 100644
--- a/extras/Projucer/Source/Project/jucer_ConfigTree_Base.h
+++ b/extras/Projucer/Source/Project/jucer_ConfigTree_Base.h
@@ -28,24 +28,11 @@
class InfoButton : public Button
{
public:
- InfoButton (PropertyComponent& comp)
- : Button (String()),
- associatedComponent (comp)
+ InfoButton (const String& infoToDisplay = String())
+ : Button (String())
{
- tooltip = associatedComponent.getTooltip();
- auto stringWidth = Font (14.0f).getStringWidthFloat (tooltip);
-
- int maxWidth = 300;
-
- if (stringWidth > maxWidth)
- {
- width = maxWidth;
- numLines += static_cast (stringWidth / width);
- }
- else
- {
- width = roundToInt (stringWidth);
- }
+ if (infoToDisplay.isNotEmpty())
+ setInfoToDisplay (infoToDisplay);
}
void paintButton (Graphics& g, bool isMouseOverButton, bool isButtonDown) override
@@ -64,23 +51,38 @@ public:
void clicked() override
{
- auto* w = new InfoWindow (tooltip);
+ auto* w = new InfoWindow (info);
w->setSize (width, w->getHeight() * numLines + 10);
CallOutBox::launchAsynchronously (w, getScreenBounds(), nullptr);
}
- PropertyComponent& associatedComponent;
+ void setInfoToDisplay (const String& infoToDisplay)
+ {
+ if (infoToDisplay.isNotEmpty())
+ {
+ info = infoToDisplay;
+
+ auto stringWidth = roundToInt (Font (14.0f).getStringWidthFloat (info));
+ width = jmin (300, stringWidth);
+
+ numLines += static_cast (stringWidth / width);
+ }
+ }
+
+ void setAssociatedComponent (Component* comp) { associatedComponent = comp; }
+ Component* getAssociatedComponent() { return associatedComponent; }
private:
- String tooltip;
+ String info;
+ Component* associatedComponent = nullptr;
int width;
int numLines = 1;
//==============================================================================
struct InfoWindow : public Component
{
- InfoWindow (String s)
+ InfoWindow (const String& s)
: stringToDisplay (s)
{
setSize (150, 14);
@@ -125,7 +127,8 @@ public:
if (! prop->getTooltip().isEmpty())
{
- addAndMakeVisible (infoButtons.add (new InfoButton (*prop)));
+ addAndMakeVisible (infoButtons.add (new InfoButton (prop->getTooltip())));
+ infoButtons.getLast()->setAssociatedComponent (prop);
prop->setTooltip (String()); // set the tooltip to empty so it only displays when its button is clicked
}
}
@@ -145,7 +148,7 @@ public:
InfoButton* buttonToUse = nullptr;
for (auto* b : infoButtons)
- if (&b->associatedComponent == pp)
+ if (b->getAssociatedComponent() == pp)
buttonToUse = b;
if (buttonToUse != nullptr)
@@ -189,11 +192,12 @@ public:
if (pp->getName() == "Dependencies")
return;
- if (auto* propertyChild = pp->getChildComponent (0))
+ for (int i = pp->getNumChildComponents() - 1; i >= 0; --i)
{
- auto bounds = propertyChild->getBounds();
+ auto* child = pp->getChildComponent (i);
- propertyChild->setBounds (bounds.withSizeKeepingCentre (propertyChild->getWidth(), pp->getPreferredHeight()));
+ auto bounds = child->getBounds();
+ child->setBounds (bounds.withSizeKeepingCentre (child->getWidth(), pp->getPreferredHeight()));
}
}
diff --git a/extras/Projucer/Source/Project/jucer_ConfigTree_Modules.h b/extras/Projucer/Source/Project/jucer_ConfigTree_Modules.h
index e4d08513a8..d60f7694db 100644
--- a/extras/Projucer/Source/Project/jucer_ConfigTree_Modules.h
+++ b/extras/Projucer/Source/Project/jucer_ConfigTree_Modules.h
@@ -30,12 +30,16 @@ public:
ModuleItem (Project& p, const String& modID)
: project (p), moduleID (modID)
{
+ auto moduleVersionNum = project.getModules().getModuleInfo (moduleID).getVersion();
+
+ if (moduleVersionNum != ProjucerApplication::getApp().getApplicationVersion())
+ moduleVersion = moduleVersionNum;
}
bool canBeSelected() const override { return true; }
bool mightContainSubItems() override { return false; }
String getUniqueName() const override { return "module_" + moduleID; }
- String getDisplayName() const override { return moduleID; }
+ String getDisplayName() const override { return moduleID + (moduleVersion.isNotEmpty() ? String (" (" + moduleVersion + ")") : ""); }
String getRenamingName() const override { return getDisplayName(); }
void setName (const String&) override {}
bool isMissing() const override { return hasMissingDependencies(); }
@@ -86,6 +90,7 @@ public:
Project& project;
String moduleID;
+ String moduleVersion;
private:
bool hasMissingDependencies() const
@@ -94,7 +99,8 @@ private:
}
//==============================================================================
- class ModuleSettingsPanel : public Component
+ class ModuleSettingsPanel : public Component,
+ private Value::Listener
{
public:
ModuleSettingsPanel (Project& p, const String& modID)
@@ -102,37 +108,72 @@ private:
project (p),
moduleID (modID)
{
+ defaultJuceModulePathValue.referTo (getAppSettings().getStoredPath (Ids::defaultJuceModulePath));
+ defaultUserModulePathValue.referTo (getAppSettings().getStoredPath (Ids::defaultUserModulePath));
+
+ defaultJuceModulePathValue.addListener (this);
+ defaultUserModulePathValue.addListener (this);
+
addAndMakeVisible (group);
refresh();
}
void refresh()
{
- setEnabled (project.getModules().isModuleEnabled (moduleID));
+ auto& modules = project.getModules();
+ const auto& isUsingGlobalPathValue = modules.shouldUseGlobalPath (moduleID);
+
+ setEnabled (modules.isModuleEnabled (moduleID));
PropertyListBuilder props;
props.add (new ModuleInfoComponent (project, moduleID));
- if (project.getModules().getExtraDependenciesNeeded (moduleID).size() > 0)
+ if (modules.getExtraDependenciesNeeded (moduleID).size() > 0)
props.add (new MissingDependenciesComponent (project, moduleID));
+ modulePathValueSources.clear();
+
for (Project::ExporterIterator exporter (project); exporter.next();)
- props.add (new FilePathPropertyComponent (exporter->getPathForModuleValue (moduleID),
- "Path for " + exporter->getName().quoted(),
- true, "*", project.getProjectFolder()),
+ {
+ auto key = modules.isJuceModule (moduleID) ? Ids::defaultJuceModulePath
+ : Ids::defaultUserModulePath;
+
+ Value src (modulePathValueSources.add (new DependencyPathValueSource (exporter->getPathForModuleValue (moduleID),
+ key, exporter->getTargetOSForExporter())));
+
+ auto* pathComponent = new DependencyFilePathPropertyComponent (src, "Path for " + exporter->getName().quoted(),
+ true, "*", project.getProjectFolder());
+
+ props.add (pathComponent,
"A path to the folder that contains the " + moduleID + " module when compiling the "
- + exporter->getName().quoted() + " target. "
+ + exporter->getName().quoted() + " target. "
"This can be an absolute path, or relative to the jucer project folder, but it "
- "must be valid on the filesystem of the target machine that will be performing this build.");
+ "must be valid on the filesystem of the target machine that will be performing this build. If this "
+ "is empty then the global path will be used.");
- props.add (new BooleanPropertyComponent (project.getModules().shouldCopyModuleFilesLocally (moduleID),
+ pathComponent->setEnabled (! isUsingGlobalPathValue.getValue());
+ }
+
+ globalPathValue.referTo (isUsingGlobalPathValue);
+
+ auto menuItemString = (TargetOS::getThisOS() == TargetOS::osx ? "\"Projucer->Global Search Paths...\""
+ : "\"File->Global Search Paths...\"");
+
+ props.add (new BooleanPropertyComponent (globalPathValue,
+ "Use global path", "Use global path for this module"),
+ String ("If this is enabled, then the locally-stored global path (set in the ") + menuItemString + " menu item) "
+ "will be used as the path to this module. "
+ "This means that if this Projucer project is opened on another machine it will use that machine's global path as the path to this module.");
+ globalPathValue.addListener (this);
+
+ props.add (new BooleanPropertyComponent (modules.shouldCopyModuleFilesLocally (moduleID),
"Create local copy", "Copy the module into the project folder"),
"If this is enabled, then a local copy of the entire module will be made inside your project (in the auto-generated JuceLibraryFiles folder), "
"so that your project will be self-contained, and won't need to contain any references to files in other folders. "
"This also means that you can check the module into your source-control system to make sure it is always in sync with your own code.");
- props.add (new BooleanPropertyComponent (project.getModules().shouldShowAllModuleFilesInProject (moduleID),
+ props.add (new BooleanPropertyComponent (modules.shouldShowAllModuleFilesInProject (moduleID),
"Add source to project", "Make module files browsable in projects"),
"If this is enabled, then the entire source tree from this module will be shown inside your project, "
"making it easy to browse/edit the module's classes. If disabled, then only the minimum number of files "
@@ -148,7 +189,7 @@ private:
mappings.add (Project::configFlagEnabled);
mappings.add (Project::configFlagDisabled);
- ModuleDescription info (project.getModules().getModuleInfo (moduleID));
+ ModuleDescription info (modules.getModuleInfo (moduleID));
if (info.isValid())
{
@@ -177,6 +218,28 @@ private:
PropertyGroupComponent group;
Project& project;
String moduleID;
+ Value globalPathValue;
+ Value defaultJuceModulePathValue, defaultUserModulePathValue;
+
+ ReferenceCountedArray modulePathValueSources;
+
+ //==============================================================================
+ void valueChanged (Value& v) override
+ {
+ if (v == globalPathValue)
+ {
+ auto useGlobalPath = globalPathValue.getValue();
+
+ for (auto prop : group.properties)
+ {
+ if (auto* pathPropertyComponent = dynamic_cast (prop))
+ pathPropertyComponent->setEnabled (! useGlobalPath);
+ }
+ }
+
+ if (auto* moduleInfo = dynamic_cast (group.properties.getUnchecked (0)))
+ moduleInfo->refresh();
+ }
//==============================================================================
class ModuleInfoComponent : public PropertyComponent,
@@ -193,13 +256,13 @@ private:
refresh();
}
- private:
void refresh() override
{
info = project.getModules().getModuleInfo (moduleID);
repaint();
}
+ private:
void paint (Graphics& g) override
{
auto bounds = getLocalBounds().reduced (10);
@@ -207,15 +270,17 @@ private:
if (info.isValid())
{
- auto topSlice = bounds.removeFromTop (bounds.getHeight() / 3);
+ auto topSlice = bounds.removeFromTop (bounds.getHeight() / 2);
bounds.removeFromTop (bounds.getHeight() / 6);
auto bottomSlice = bounds;
g.setColour (findColour (defaultTextColourId));
- g.drawFittedText (info.getName(), topSlice.removeFromTop (topSlice.getHeight() / 3), Justification::centredLeft, 1);
- g.drawFittedText ("Version: " + info.getVersion(), topSlice.removeFromTop (topSlice.getHeight() / 2), Justification::centredLeft, 1);
- g.drawFittedText ("License: " + info.getLicense(), topSlice.removeFromTop (topSlice.getHeight()), Justification::centredLeft, 1);
+ g.drawFittedText (info.getName(), topSlice.removeFromTop (topSlice.getHeight() / 4), Justification::centredLeft, 1);
+ g.drawFittedText ("Version: " + info.getVersion(), topSlice.removeFromTop (topSlice.getHeight() / 3), Justification::centredLeft, 1);
+ g.drawFittedText ("License: " + info.getLicense(), topSlice.removeFromTop (topSlice.getHeight() / 2), Justification::centredLeft, 1);
+ g.drawFittedText ("Location: " + info.getFolder().getParentDirectory().getFullPathName(),
+ topSlice.removeFromTop (topSlice.getHeight()), Justification::centredLeft, 1);
g.drawFittedText (info.getDescription(), bottomSlice, Justification::topLeft, 3, 1.0f);
}
@@ -270,23 +335,22 @@ private:
void buttonClicked (Button*) override
{
- bool anyFailed = false;
-
ModuleList list;
- list.scanAllKnownFolders (project);
- for (int i = missingDependencies.size(); --i >= 0;)
- {
- if (const ModuleDescription* info = list.getModuleWithID (missingDependencies[i]))
- project.getModules().addModule (info->moduleFolder, project.getModules().areMostModulesCopiedLocally());
- else
- anyFailed = true;
- }
+ list.scanGlobalJuceModulePath();
+
+ if (! tryToFix (list))
+ list.scanGlobalUserModulePath();
+
+ if (! tryToFix (list))
+ list.scanProjectExporterModulePaths (project);
+
+ bool fixed = tryToFix (list);
if (ModuleSettingsPanel* p = findParentComponentOfClass())
p->refresh();
- if (anyFailed)
+ if (! fixed)
AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon,
"Adding Missing Dependencies",
"Couldn't locate some of these modules - you'll need to find their "
@@ -304,6 +368,26 @@ private:
StringArray missingDependencies;
TextButton fixButton;
+ bool tryToFix (ModuleList& list)
+ {
+ auto& modules = project.getModules();
+ auto copyLocally = modules.areMostModulesCopiedLocally();
+ auto useGlobalPath = modules.areMostModulesUsingGlobalPath();
+
+ StringArray missing;
+
+ for (auto missingModule : missingDependencies)
+ {
+ if (auto* info = list.getModuleWithID (missingModule))
+ modules.addModule (info->moduleFolder, copyLocally, useGlobalPath);
+ else
+ missing.add (missingModule);
+ }
+
+ missingDependencies.swapWith (missing);
+ return (missingDependencies.size() == 0);
+ }
+
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MissingDependenciesComponent)
};
};
@@ -370,7 +454,8 @@ public:
for (int i = 0; i < modules.size(); ++i)
project.getModules().addModule (modules.getReference(i).moduleFolder,
- project.getModules().areMostModulesCopiedLocally());
+ project.getModules().areMostModulesCopiedLocally(),
+ project.getModules().areMostModulesUsingGlobalPath());
}
void addSubItems() override
@@ -381,12 +466,36 @@ public:
void showPopupMenu() override
{
- PopupMenu menu, knownModules, copyModeMenu;
+ auto& modules = project.getModules();
+ PopupMenu knownModules, jucePathModules, userPathModules, exporterPathsModules;
- const StringArray modules (getAvailableModules());
- for (int i = 0; i < modules.size(); ++i)
- knownModules.addItem (1 + i, modules[i], ! project.getModules().isModuleEnabled (modules[i]));
+ auto index = 100;
+ auto globalJucePathModules = getAvailableModulesInGlobalJucePath();
+ for (auto m : globalJucePathModules)
+ jucePathModules.addItem (index++, m, ! modules.isModuleEnabled (m));
+
+ knownModules.addSubMenu ("Global JUCE modules path", jucePathModules);
+
+ index = 200;
+ auto globalUserPathModules = getAvailableModulesInGlobalUserPath();
+ for (auto m : getAvailableModulesInGlobalUserPath())
+ {
+ if (! globalJucePathModules.contains (m))
+ userPathModules.addItem (index++, m, ! modules.isModuleEnabled (m));
+ }
+ knownModules.addSubMenu ("Global user modules path", userPathModules);
+
+ index = 300;
+ for (auto m : getAvailableModulesInExporterPaths())
+ {
+ if (! globalJucePathModules.contains (m) && ! globalUserPathModules.contains (m))
+ exporterPathsModules.addItem (index++, m, ! modules.isModuleEnabled (m));
+ }
+
+ knownModules.addSubMenu ("Exporter paths", exporterPathsModules);
+
+ PopupMenu menu;
menu.addSubMenu ("Add a module", knownModules);
menu.addSeparator();
menu.addItem (1001, "Add a module from a specified folder...");
@@ -396,16 +505,51 @@ public:
void handlePopupMenuResult (int resultCode) override
{
+ auto& modules = project.getModules();
+
if (resultCode == 1001)
- project.getModules().addModuleFromUserSelectedFile();
+ {
+ modules.addModuleFromUserSelectedFile();
+ }
else if (resultCode > 0)
- project.getModules().addModuleInteractive (getAvailableModules() [resultCode - 1]);
+ {
+ if (resultCode < 200)
+ modules.addModuleInteractive (getAvailableModulesInGlobalJucePath() [resultCode - 100]);
+ else if (resultCode < 300)
+ modules.addModuleInteractive (getAvailableModulesInGlobalUserPath() [resultCode - 200]);
+ else if (resultCode < 400)
+ modules.addModuleInteractive (getAvailableModulesInExporterPaths() [resultCode - 300]);
+ }
+ }
+
+ StringArray getAvailableModulesInExporterPaths()
+ {
+ ModuleList list;
+ list.scanProjectExporterModulePaths (project);
+
+ return list.getIDs();
+ }
+
+ StringArray getAvailableModulesInGlobalJucePath()
+ {
+ ModuleList list;
+ list.addAllModulesInFolder ({ getAppSettings().getStoredPath (Ids::defaultJuceModulePath).toString() });
+
+ return list.getIDs();
}
- StringArray getAvailableModules()
+ StringArray getAvailableModulesInGlobalUserPath()
{
ModuleList list;
- list.scanAllKnownFolders (project);
+ auto paths = StringArray::fromTokens (getAppSettings().getStoredPath (Ids::defaultUserModulePath).toString(), ";", {});
+
+ for (auto p : paths)
+ {
+ auto f = File::createFileWithoutCheckingPath (p.trim());
+ if (f.exists())
+ list.addAllModulesInFolder (f);
+ }
+
return list.getIDs();
}
diff --git a/extras/Projucer/Source/Project/jucer_DependencyPathPropertyComponent.cpp b/extras/Projucer/Source/Project/jucer_DependencyPathPropertyComponent.cpp
index 5dc2f9a675..e5e4433502 100644
--- a/extras/Projucer/Source/Project/jucer_DependencyPathPropertyComponent.cpp
+++ b/extras/Projucer/Source/Project/jucer_DependencyPathPropertyComponent.cpp
@@ -26,8 +26,6 @@
#include "../jucer_Headers.h"
#include "jucer_DependencyPathPropertyComponent.h"
-#include "../Application/jucer_GlobalPreferences.h"
-
//==============================================================================
DependencyPathValueSource::DependencyPathValueSource (const Value& projectSettingsPath,
@@ -36,10 +34,11 @@ DependencyPathValueSource::DependencyPathValueSource (const Value& projectSettin
: projectSettingsValue (projectSettingsPath),
globalKey (globalSettingsKey),
os (osThisSettingAppliesTo),
- globalSettingsValue (getAppSettings().getGlobalPath (globalKey, os)),
- fallbackValue (getAppSettings().getFallbackPath (globalKey, os))
+ globalSettingsValue (getAppSettings().getStoredPath (globalKey)),
+ fallbackValue (getAppSettings().getFallbackPathForOS (globalKey, os))
{
globalSettingsValue.addListener (this);
+ fallbackValue.addListener (this);
}
bool DependencyPathValueSource::isValidPath (const File& relativeTo) const
@@ -135,3 +134,153 @@ void DependencyPathPropertyComponent::lookAndFeelChanged()
{
textWasEdited();
}
+
+//==============================================================================
+DependencyFilePathPropertyComponent::DependencyFilePathPropertyComponent (Value& value,
+ const String& propertyDescription,
+ bool isDir,
+ const String& wc,
+ const File& rootToUseForRelativePaths)
+try : TextPropertyComponent (propertyDescription, 1024, false),
+ pathRelativeTo (rootToUseForRelativePaths),
+ pathValue (value),
+ pathValueSource (dynamic_cast (pathValue.getValueSource())),
+ browseButton ("..."),
+ isDirectory (isDir),
+ wildcards (wc)
+{
+ auto initialValueIsEmpty = ! pathValueSource.isUsingProjectSettings();
+
+ getValue().referTo (pathValue);
+
+ if (initialValueIsEmpty)
+ getValue().setValue (String());
+
+ getValue().addListener (this);
+
+ if (auto* label = dynamic_cast