diff --git a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Android.h b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Android.h index d807384f2f..9b186c6454 100644 --- a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Android.h +++ b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Android.h @@ -78,10 +78,8 @@ public: bool usesMMFiles() const { return false; } bool canCopeWithDuplicateFiles() { return false; } - void createPropertyEditors (PropertyListBuilder& props) + void createExporterProperties (PropertyListBuilder& props) { - ProjectExporter::createPropertyEditors (props); - props.add (new TextPropertyComponent (getActivityClassPathValue(), "Android Activity class name", 256, false), "The full java class name to use for the app's Activity class."); @@ -225,10 +223,8 @@ protected: Value getArchitecturesValue() { return getValue (Ids::androidArchitectures); } String getArchitectures() const { return config [Ids::androidArchitectures]; } - void createPropertyEditors (PropertyListBuilder& props) + void createConfigProperties (PropertyListBuilder& props) { - createBasicPropertyEditors (props); - props.add (new TextPropertyComponent (getArchitecturesValue(), "Architectures", 256, false), "A list of the ARM architectures to build (for a fat binary)."); } diff --git a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_MSVC.h b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_MSVC.h index 04118c4429..f4106d45f5 100644 --- a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_MSVC.h +++ b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_MSVC.h @@ -61,10 +61,8 @@ public: #endif } - void createPropertyEditors (PropertyListBuilder& props) + void createExporterProperties (PropertyListBuilder& props) { - ProjectExporter::createPropertyEditors (props); - if (projectType.isLibrary()) { const char* const libTypes[] = { "Static Library (.lib)", "Dynamic Library (.dll)", 0 }; @@ -165,10 +163,8 @@ protected: return target; } - void createPropertyEditors (PropertyListBuilder& props) + void createConfigProperties (PropertyListBuilder& props) { - createBasicPropertyEditors (props); - const char* const warningLevelNames[] = { "Low", "Medium", "High", nullptr }; const int warningLevels[] = { 2, 3, 4, 0 }; @@ -959,9 +955,9 @@ protected: bool is64Bit() const { return config [Ids::winArchitecture].toString() == get64BitArchName(); } //============================================================================== - void createPropertyEditors (PropertyListBuilder& props) + void createConfigProperties (PropertyListBuilder& props) { - MSVCBuildConfiguration::createPropertyEditors (props); + MSVCBuildConfiguration::createConfigProperties (props); const char* const archTypes[] = { get32BitArchName(), get64BitArchName(), nullptr }; props.add (new ChoicePropertyComponent (getArchitectureType(), "Architecture", diff --git a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Make.h b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Make.h index 4c63fc9818..5ae099396e 100644 --- a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Make.h +++ b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Make.h @@ -62,9 +62,8 @@ public: bool isLinux() const { return true; } bool canCopeWithDuplicateFiles() { return false; } - void createPropertyEditors (PropertyListBuilder& props) + void createExporterProperties (PropertyListBuilder&) { - ProjectExporter::createPropertyEditors (props); } //============================================================================== @@ -91,9 +90,8 @@ protected: setValueIfVoid (getLibrarySearchPathValue(), "/usr/X11R6/lib/"); } - void createPropertyEditors (PropertyListBuilder& props) + void createConfigProperties (PropertyListBuilder&) { - createBasicPropertyEditors (props); } }; diff --git a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h index 519282431e..71f82034b2 100644 --- a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h +++ b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h @@ -97,10 +97,8 @@ public: bool isOSX() const { return ! iOS; } bool canCopeWithDuplicateFiles() { return true; } - void createPropertyEditors (PropertyListBuilder& props) + void createExporterProperties (PropertyListBuilder& props) { - ProjectExporter::createPropertyEditors (props); - if (projectType.isGUIApplication() && ! iOS) { props.add (new TextPropertyComponent (getSetting ("documentExtensions"), "Document file extensions", 128, false), @@ -212,10 +210,8 @@ protected: Value getCppLibTypeValue() { return getValue (Ids::cppLibType); } String getCppLibType() const { return config [Ids::cppLibType]; } - void createPropertyEditors (PropertyListBuilder& props) + void createConfigProperties (PropertyListBuilder& props) { - createBasicPropertyEditors (props); - if (iOS) { const char* iosVersions[] = { "Use Default", "3.2", "4.0", "4.1", "4.2", "4.3", "5.0", "5.1", 0 }; diff --git a/extras/Introjucer/Source/Project Saving/jucer_ProjectExporter.cpp b/extras/Introjucer/Source/Project Saving/jucer_ProjectExporter.cpp index b7368c6b0c..8d3629d97c 100644 --- a/extras/Introjucer/Source/Project Saving/jucer_ProjectExporter.cpp +++ b/extras/Introjucer/Source/Project Saving/jucer_ProjectExporter.cpp @@ -250,6 +250,11 @@ void ProjectExporter::createPropertyEditors (PropertyListBuilder& props) props.add (new ChoicePropertyComponent (getBigIconImageItemID(), "Icon (large)", choices, ids), "Sets an icon to use for the executable."); } + + createExporterProperties (props); + + props.add (new TextPropertyComponent (getUserNotes(), "Notes", 32768, true), + "Extra comments: This field is not used for code or project generation, it's just a space where you can express your thoughts."); } StringPairArray ProjectExporter::getAllPreprocessorDefs (const ProjectExporter::BuildConfiguration& config) const @@ -494,7 +499,7 @@ String ProjectExporter::BuildConfiguration::getGCCOptimisationFlag() const return String (level <= 1 ? "0" : (level == 2 ? "s" : "3")); } -void ProjectExporter::BuildConfiguration::createBasicPropertyEditors (PropertyListBuilder& props) +void ProjectExporter::BuildConfiguration::createPropertyEditors (PropertyListBuilder& props) { props.add (new TextPropertyComponent (getNameValue(), "Name", 96, false), "The name of this configuration."); @@ -522,6 +527,11 @@ void ProjectExporter::BuildConfiguration::createBasicPropertyEditors (PropertyLi props.add (new TextPropertyComponent (getBuildConfigPreprocessorDefs(), "Preprocessor definitions", 32768, true), "Extra preprocessor definitions. Use the form \"NAME1=value NAME2=value\", using whitespace, commas, or " "new-lines to separate the items - to include a space or comma in a definition, precede it with a backslash."); + + createConfigProperties (props); + + props.add (new TextPropertyComponent (getUserNotes(), "Notes", 32768, true), + "Extra comments: This field is not used for code or project generation, it's just a space where you can express your thoughts."); } StringPairArray ProjectExporter::BuildConfiguration::getAllPreprocessorDefs() const diff --git a/extras/Introjucer/Source/Project Saving/jucer_ProjectExporter.h b/extras/Introjucer/Source/Project Saving/jucer_ProjectExporter.h index e4b97ebd08..69d3a3c6fa 100644 --- a/extras/Introjucer/Source/Project Saving/jucer_ProjectExporter.h +++ b/extras/Introjucer/Source/Project Saving/jucer_ProjectExporter.h @@ -49,7 +49,7 @@ public: //============================================================================= virtual bool usesMMFiles() const = 0; - virtual void createPropertyEditors (PropertyListBuilder&); + virtual void createExporterProperties (PropertyListBuilder&) = 0; virtual bool launchProject() = 0; virtual void create (const OwnedArray&) const = 0; // may throw a SaveError virtual bool shouldFileBeCompiledByDefault (const RelativePath& path) const; @@ -84,6 +84,8 @@ public: Value getExtraLinkerFlags() { return getSetting (Ids::extraLinkerFlags); } String getExtraLinkerFlagsString() const { return getSettingString (Ids::extraLinkerFlags).replaceCharacters ("\r\n", " "); } + Value getUserNotes() { return getSetting (Ids::userNotes); } + // This adds the quotes, and may return angle-brackets, eg: or normal quotes. String getIncludePathForFileInJuceFolder (const String& pathFromJuceFolder, const File& targetIncludeFile) const; @@ -119,6 +121,8 @@ public: RelativePath getJucePathFromTargetFolder() const; RelativePath getJucePathFromProjectFolder() const; + void createPropertyEditors (PropertyListBuilder& props); + //============================================================================== void copyMainGroupFromProject(); Array& getAllGroups() noexcept { jassert (itemGroups.size() > 0); return itemGroups; } @@ -158,7 +162,7 @@ public: typedef ReferenceCountedObjectPtr Ptr; //============================================================================== - virtual void createPropertyEditors (PropertyListBuilder&) = 0; + virtual void createConfigProperties (PropertyListBuilder&) = 0; //============================================================================== Value getNameValue() { return getValue (Ids::name); } @@ -191,9 +195,12 @@ public: StringArray getLibrarySearchPaths() const; String getGCCLibraryPathFlags() const; + Value getUserNotes() { return getValue (Ids::userNotes); } + Value getValue (const Identifier& name) { return config.getPropertyAsValue (name, getUndoManager()); } UndoManager* getUndoManager() const { return project.getUndoManagerFor (config); } + void createPropertyEditors (PropertyListBuilder&); void removeFromExporter(); //============================================================================== @@ -201,7 +208,6 @@ public: Project& project; protected: - void createBasicPropertyEditors (PropertyListBuilder&); private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (BuildConfiguration); diff --git a/extras/Introjucer/Source/Project/jucer_Project.cpp b/extras/Introjucer/Source/Project/jucer_Project.cpp index d4e38377db..6c8c7bcb56 100644 --- a/extras/Introjucer/Source/Project/jucer_Project.cpp +++ b/extras/Introjucer/Source/Project/jucer_Project.cpp @@ -376,6 +376,9 @@ void Project::createPropertyEditors (PropertyListBuilder& props) props.add (new TextPropertyComponent (getProjectPreprocessorDefs(), "Preprocessor definitions", 32768, false), "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 (getProjectUserNotes(), "Notes", 32768, true), + "Extra comments: This field is not used for code or project generation, it's just a space where you can express your thoughts."); } String Project::getVersionAsHex() const diff --git a/extras/Introjucer/Source/Project/jucer_Project.h b/extras/Introjucer/Source/Project/jucer_Project.h index 92332c7cee..3963a30895 100644 --- a/extras/Introjucer/Source/Project/jucer_Project.h +++ b/extras/Introjucer/Source/Project/jucer_Project.h @@ -98,6 +98,8 @@ public: Value getProjectPreprocessorDefs() { return getProjectValue (Ids::defines); } StringPairArray getPreprocessorDefs() const; + Value getProjectUserNotes() { return getProjectValue (Ids::userNotes); } + //============================================================================== File getGeneratedCodeFolder() const { return getFile().getSiblingFile ("JuceLibraryCode"); } File getAppIncludeFile() const { return getGeneratedCodeFolder().getChildFile (getJuceSourceHFilename()); } diff --git a/extras/Introjucer/Source/Utility/jucer_PresetIDs.h b/extras/Introjucer/Source/Utility/jucer_PresetIDs.h index b2a31d8e3c..133a0b3bca 100644 --- a/extras/Introjucer/Source/Utility/jucer_PresetIDs.h +++ b/extras/Introjucer/Source/Utility/jucer_PresetIDs.h @@ -126,6 +126,7 @@ namespace Ids DECLARE_ID (androidKeyAliasPass); DECLARE_ID (font); DECLARE_ID (colour); + DECLARE_ID (userNotes); const Identifier ID ("id"); const Identifier class_ ("class");