| @@ -149,7 +149,7 @@ public: | |||||
| { | { | ||||
| name = getName(); | name = getName(); | ||||
| targetLocationValue.setDefault (getDefaultBuildsRootFolder() + "Android"); | |||||
| targetLocationValue.setDefault (getDefaultBuildsRootFolder() + getTargetFolderForExporter (getValueTreeTypeName())); | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -74,7 +74,7 @@ public: | |||||
| { | { | ||||
| name = getName(); | name = getName(); | ||||
| targetLocationValue.setDefault (getDefaultBuildsRootFolder() + "CLion"); | |||||
| targetLocationValue.setDefault (getDefaultBuildsRootFolder() + getTargetFolderForExporter (getValueTreeTypeName())); | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -62,17 +62,6 @@ public: | |||||
| return "CODEBLOCKS_UNKNOWN_OS"; | return "CODEBLOCKS_UNKNOWN_OS"; | ||||
| } | } | ||||
| //============================================================================== | |||||
| static String getTargetFolderName (CodeBlocksOS os) | |||||
| { | |||||
| if (os == windowsTarget) return "CodeBlocksWindows"; | |||||
| if (os == linuxTarget) return "CodeBlocksLinux"; | |||||
| // currently no other OSes supported by Codeblocks exporter! | |||||
| jassertfalse; | |||||
| return "CodeBlocksUnknownOS"; | |||||
| } | |||||
| //============================================================================== | //============================================================================== | ||||
| static CodeBlocksProjectExporter* createForSettings (Project& project, const ValueTree& settings) | static CodeBlocksProjectExporter* createForSettings (Project& project, const ValueTree& settings) | ||||
| { | { | ||||
| @@ -93,7 +82,7 @@ public: | |||||
| { | { | ||||
| name = getName (os); | name = getName (os); | ||||
| targetLocationValue.setDefault (getDefaultBuildsRootFolder() + getTargetFolderName (os)); | |||||
| targetLocationValue.setDefault (getDefaultBuildsRootFolder() + getTargetFolderForExporter (getValueTreeTypeName (os))); | |||||
| if (isWindows()) | if (isWindows()) | ||||
| targetPlatformValue.referTo (settings, Ids::codeBlocksWindowsTarget, getUndoManager()); | targetPlatformValue.referTo (settings, Ids::codeBlocksWindowsTarget, getUndoManager()); | ||||
| @@ -31,7 +31,7 @@ | |||||
| class MSVCProjectExporterBase : public ProjectExporter | class MSVCProjectExporterBase : public ProjectExporter | ||||
| { | { | ||||
| public: | public: | ||||
| MSVCProjectExporterBase (Project& p, const ValueTree& t, const char* const folderName) | |||||
| MSVCProjectExporterBase (Project& p, const ValueTree& t, String folderName) | |||||
| : ProjectExporter (p, t), | : ProjectExporter (p, t), | ||||
| IPPLibraryValue (settings, Ids::IPPLibrary, getUndoManager()), | IPPLibraryValue (settings, Ids::IPPLibrary, getUndoManager()), | ||||
| platformToolsetValue (settings, Ids::toolset, getUndoManager()), | platformToolsetValue (settings, Ids::toolset, getUndoManager()), | ||||
| @@ -1810,7 +1810,7 @@ class MSVCProjectExporterVC2013 : public MSVCProjectExporterBase | |||||
| { | { | ||||
| public: | public: | ||||
| MSVCProjectExporterVC2013 (Project& p, const ValueTree& t) | MSVCProjectExporterVC2013 (Project& p, const ValueTree& t) | ||||
| : MSVCProjectExporterBase (p, t, "VisualStudio2013") | |||||
| : MSVCProjectExporterBase (p, t, getTargetFolderForExporter (getValueTreeTypeName())) | |||||
| { | { | ||||
| name = getName(); | name = getName(); | ||||
| @@ -1856,7 +1856,7 @@ class MSVCProjectExporterVC2015 : public MSVCProjectExporterBase | |||||
| { | { | ||||
| public: | public: | ||||
| MSVCProjectExporterVC2015 (Project& p, const ValueTree& t) | MSVCProjectExporterVC2015 (Project& p, const ValueTree& t) | ||||
| : MSVCProjectExporterBase (p, t, "VisualStudio2015") | |||||
| : MSVCProjectExporterBase (p, t, getTargetFolderForExporter (getValueTreeTypeName())) | |||||
| { | { | ||||
| name = getName(); | name = getName(); | ||||
| @@ -1901,7 +1901,7 @@ class MSVCProjectExporterVC2017 : public MSVCProjectExporterBase | |||||
| { | { | ||||
| public: | public: | ||||
| MSVCProjectExporterVC2017 (Project& p, const ValueTree& t) | MSVCProjectExporterVC2017 (Project& p, const ValueTree& t) | ||||
| : MSVCProjectExporterBase (p, t, "VisualStudio2017") | |||||
| : MSVCProjectExporterBase (p, t, getTargetFolderForExporter (getValueTreeTypeName())) | |||||
| { | { | ||||
| name = getName(); | name = getName(); | ||||
| @@ -328,7 +328,7 @@ public: | |||||
| { | { | ||||
| name = getNameLinux(); | name = getNameLinux(); | ||||
| targetLocationValue.setDefault (getDefaultBuildsRootFolder() + "LinuxMakefile"); | |||||
| targetLocationValue.setDefault (getDefaultBuildsRootFolder() + getTargetFolderForExporter (getValueTreeTypeName())); | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -89,7 +89,7 @@ public: | |||||
| { | { | ||||
| name = iOS ? getNameiOS() : getNameMac(); | name = iOS ? getNameiOS() : getNameMac(); | ||||
| targetLocationValue.setDefault (getDefaultBuildsRootFolder() + (iOS ? "iOS" : "MacOSX")); | |||||
| targetLocationValue.setDefault (getDefaultBuildsRootFolder() + getTargetFolderForExporter (getValueTreeTypeName (isIOS))); | |||||
| } | } | ||||
| static XcodeProjectExporter* createForSettings (Project& project, const ValueTree& settings) | static XcodeProjectExporter* createForSettings (Project& project, const ValueTree& settings) | ||||
| @@ -292,7 +292,7 @@ bool fileNeedsCppSyntaxHighlighting (const File& file) | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| bool isJUCEModule (const String& moduleID) noexcept | |||||
| StringArray getJUCEModules() noexcept | |||||
| { | { | ||||
| static StringArray juceModuleIds = | static StringArray juceModuleIds = | ||||
| { | { | ||||
| @@ -319,12 +319,12 @@ bool isJUCEModule (const String& moduleID) noexcept | |||||
| "juce_video" | "juce_video" | ||||
| }; | }; | ||||
| return juceModuleIds.contains (moduleID); | |||||
| return juceModuleIds; | |||||
| } | } | ||||
| bool isValidExporterName (const String& exporterName) noexcept | |||||
| StringArray getJUCEExporters (bool lowerCase) noexcept | |||||
| { | { | ||||
| static StringArray validExporters = | |||||
| static StringArray validExportersUpper = | |||||
| { | { | ||||
| "XCODE_MAC", | "XCODE_MAC", | ||||
| "XCODE_IPHONE", | "XCODE_IPHONE", | ||||
| @@ -334,10 +334,38 @@ bool isValidExporterName (const String& exporterName) noexcept | |||||
| "LINUX_MAKE", | "LINUX_MAKE", | ||||
| "ANDROIDSTUDIO", | "ANDROIDSTUDIO", | ||||
| "CODEBLOCKS_WINDOWS", | "CODEBLOCKS_WINDOWS", | ||||
| "CODEBLOCKS_LINUX" | |||||
| "CODEBLOCKS_LINUX", | |||||
| "CLION" | |||||
| }; | }; | ||||
| return validExporters.contains (exporterName); | |||||
| static StringArray validExportersLower = | |||||
| { | |||||
| "xcode_mac", | |||||
| "xcode_iphone", | |||||
| "vs2013", | |||||
| "vs2015", | |||||
| "vs2017", | |||||
| "linux_make", | |||||
| "androidstudio", | |||||
| "codeblocks_windows", | |||||
| "codeblocks_linux", | |||||
| "clion" | |||||
| }; | |||||
| if (lowerCase) | |||||
| return validExportersLower; | |||||
| return validExportersUpper; | |||||
| } | |||||
| bool isJUCEModule (const String& moduleID) noexcept | |||||
| { | |||||
| return getJUCEModules().contains (moduleID); | |||||
| } | |||||
| bool isValidExporterName (const String& exporterName) noexcept | |||||
| { | |||||
| return getJUCEExporters().contains (exporterName); | |||||
| } | } | ||||
| String getTargetFolderForExporter (const String& exporterName) noexcept | String getTargetFolderForExporter (const String& exporterName) noexcept | ||||
| @@ -351,6 +379,7 @@ String getTargetFolderForExporter (const String& exporterName) noexcept | |||||
| if (exporterName == "ANDROIDSTUDIO") return "Android"; | if (exporterName == "ANDROIDSTUDIO") return "Android"; | ||||
| if (exporterName == "CODEBLOCKS_WINDOWS") return "CodeBlocksWindows"; | if (exporterName == "CODEBLOCKS_WINDOWS") return "CodeBlocksWindows"; | ||||
| if (exporterName == "CODEBLOCKS_LINUX") return "CodeBlocksLinux"; | if (exporterName == "CODEBLOCKS_LINUX") return "CodeBlocksLinux"; | ||||
| if (exporterName == "CLION") return "CLion"; | |||||
| return {}; | return {}; | ||||
| } | } | ||||
| @@ -58,6 +58,9 @@ void addPlistDictionaryKeyInt (XmlElement* xml, const String& key, int value); | |||||
| bool fileNeedsCppSyntaxHighlighting (const File& file); | bool fileNeedsCppSyntaxHighlighting (const File& file); | ||||
| StringArray getJUCEModules() noexcept; | |||||
| StringArray getJUCEExporters (bool lowerCase = false) noexcept; | |||||
| bool isJUCEModule (const String& moduleID) noexcept; | bool isJUCEModule (const String& moduleID) noexcept; | ||||
| bool isValidExporterName (const String& exporterName) noexcept; | bool isValidExporterName (const String& exporterName) noexcept; | ||||
| String getTargetFolderForExporter (const String& exporterName) noexcept; | String getTargetFolderForExporter (const String& exporterName) noexcept; | ||||