| @@ -648,14 +648,15 @@ | |||
| D4E56676E2EF83404EDCBA8C = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_TextEditor.cpp"; path = "../../../../modules/juce_gui_basics/widgets/juce_TextEditor.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| D4F2D42C58F4D86E00E76F31 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ApplicationCommandID.h"; path = "../../../../modules/juce_gui_basics/commands/juce_ApplicationCommandID.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| D503780AB98993E8F0BA1311 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ImageComponent.cpp"; path = "../../../../modules/juce_gui_basics/widgets/juce_ImageComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| D5057D7B18ABD5E810A6F830 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_DirectWriteTypeface.cpp"; path = "../../../../modules/juce_graphics/native/juce_win32_DirectWriteTypeface.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| D526C38D581425949BA0E4AC = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_FilePreviewComponent.h"; path = "../../Source/Application/jucer_FilePreviewComponent.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| D53B54D1786A1FFC024BF064 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_cryptography.mm"; path = "../../../../modules/juce_cryptography/juce_cryptography.mm"; sourceTree = "SOURCE_ROOT"; }; | |||
| D5A6D00DEFDC650AF432A698 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Initialisation.h"; path = "../../../../modules/juce_gui_basics/application/juce_Initialisation.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| D678882D133090214AF681BC = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ThreadLocalValue.h"; path = "../../../../modules/juce_core/threads/juce_ThreadLocalValue.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| D6C91E2BF537F75A80F5C1DB = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ListBox.h"; path = "../../../../modules/juce_gui_basics/widgets/juce_ListBox.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| D75EAC16FAECCC51E3669193 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ApplicationCommandInfo.h"; path = "../../../../modules/juce_gui_basics/commands/juce_ApplicationCommandInfo.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| D782DA091AD3ECE158FC6A5F = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ButtonPropertyComponent.h"; path = "../../../../modules/juce_gui_basics/properties/juce_ButtonPropertyComponent.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| D7A7F1AA9F313B0CCAAA73A0 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MathsFunctions.h"; path = "../../../../modules/juce_core/maths/juce_MathsFunctions.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| D95D7B49EC6C6BDCB5A1B988 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_ios_MessageManager.mm"; path = "../../../../modules/juce_events/native/juce_ios_MessageManager.mm"; sourceTree = "SOURCE_ROOT"; }; | |||
| DB20268A566DABEAE3F2CBEE = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_RectanglePlacement.cpp"; path = "../../../../modules/juce_graphics/placement/juce_RectanglePlacement.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| DBE0CDE1B017190ABBFF557C = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ProjectExport_CodeBlocks.h"; path = "../../Source/Project Saving/jucer_ProjectExport_CodeBlocks.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| DC5E7FF30B01118F6DAEC38F = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Time.cpp"; path = "../../../../modules/juce_core/time/juce_Time.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| DD00494140C86144306A9356 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Array.h"; path = "../../../../modules/juce_core/containers/juce_Array.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| DE8DF5D263F40F65581CFDE4 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ChildProcess.cpp"; path = "../../../../modules/juce_core/threads/juce_ChildProcess.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| @@ -667,20 +668,19 @@ | |||
| E5D6C36496F5BC84D7213BE8 = { isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; | |||
| E65A820D34BF39478B7C5925 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_DocumentEditorComponent.h"; path = "../../Source/Application/jucer_DocumentEditorComponent.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| E6F5CEC32EDC917B054467EF = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ReadWriteLock.cpp"; path = "../../../../modules/juce_core/threads/juce_ReadWriteLock.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| E720FBCD836FF3AA466C31B6 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_HighResolutionTimer.cpp"; path = "../../../../modules/juce_core/threads/juce_HighResolutionTimer.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| E7F7033084AC10FB77B0F77A = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_ConfigPage.cpp"; path = "../../Source/Project/jucer_ConfigPage.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| E96597BBC6A98255B51B94DC = { isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; | |||
| 25F52316D256B4534BED16D1 = { isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Introjucer.app; sourceTree = "BUILT_PRODUCTS_DIR"; }; | |||
| CF0615A1AF1A514A60322B50 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MouseCursor.h"; path = "../../../../modules/juce_gui_basics/mouse/juce_MouseCursor.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| D253F74B7F5734984E568CA7 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_linux_Files.cpp"; path = "../../../../modules/juce_core/native/juce_linux_Files.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| D376B9B54EC944E766AFEC45 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_PopupMenu.cpp"; path = "../../../../modules/juce_gui_basics/menus/juce_PopupMenu.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| D5A6D00DEFDC650AF432A698 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Initialisation.h"; path = "../../../../modules/juce_gui_basics/application/juce_Initialisation.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| D5057D7B18ABD5E810A6F830 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_DirectWriteTypeface.cpp"; path = "../../../../modules/juce_graphics/native/juce_win32_DirectWriteTypeface.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| D6C91E2BF537F75A80F5C1DB = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ListBox.h"; path = "../../../../modules/juce_gui_basics/widgets/juce_ListBox.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| D780ED33573AED5AD383A036 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CaretComponent.h"; path = "../../../../modules/juce_gui_basics/keyboard/juce_CaretComponent.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| D7A7F1AA9F313B0CCAAA73A0 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MathsFunctions.h"; path = "../../../../modules/juce_core/maths/juce_MathsFunctions.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| D782DA091AD3ECE158FC6A5F = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ButtonPropertyComponent.h"; path = "../../../../modules/juce_gui_basics/properties/juce_ButtonPropertyComponent.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| D800DE818BEDBF4579D15B1D = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_mac_AppleRemote.mm"; path = "../../../../modules/juce_gui_extra/native/juce_mac_AppleRemote.mm"; sourceTree = "SOURCE_ROOT"; }; | |||
| D926E13AB5AD647A7A00F486 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_linux_Network.cpp"; path = "../../../../modules/juce_core/native/juce_linux_Network.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| D9342535EA61901A1AD816C6 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_linux_WebBrowserComponent.cpp"; path = "../../../../modules/juce_gui_extra/native/juce_linux_WebBrowserComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| D95D7B49EC6C6BDCB5A1B988 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_ios_MessageManager.mm"; path = "../../../../modules/juce_events/native/juce_ios_MessageManager.mm"; sourceTree = "SOURCE_ROOT"; }; | |||
| D9B077E2ECDDA94961E134D7 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_StringPairArray.h"; path = "../../../../modules/juce_core/text/juce_StringPairArray.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| D9E59DE07A815AB303A297D9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_data_structures.mm"; path = "../../../../modules/juce_data_structures/juce_data_structures.mm"; sourceTree = "SOURCE_ROOT"; }; | |||
| DB876F7873F42DC685A58CA7 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_JPEGLoader.cpp"; path = "../../../../modules/juce_graphics/image_formats/juce_JPEGLoader.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| @@ -704,6 +704,7 @@ | |||
| E642193A9990C48CFB6479A9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FileListComponent.h"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_FileListComponent.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| E654E3A3CD45A888C5F773DF = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MenuBarModel.h"; path = "../../../../modules/juce_gui_basics/menus/juce_MenuBarModel.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| E70CA21960A64CCB835725FF = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_ProjectType.cpp"; path = "../../Source/Project/jucer_ProjectType.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| E720FBCD836FF3AA466C31B6 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_HighResolutionTimer.cpp"; path = "../../../../modules/juce_core/threads/juce_HighResolutionTimer.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| E73C7E17116F6085765622E3 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Drawable.h"; path = "../../../../modules/juce_gui_basics/drawables/juce_Drawable.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| E7A4604F766ABC8BE26C94A1 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_RelativeParallelogram.cpp"; path = "../../../../modules/juce_gui_basics/positioning/juce_RelativeParallelogram.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| E7B6A0CBA0D27A095E83F5B7 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_WebBrowserComponent.cpp"; path = "../../../../modules/juce_gui_extra/native/juce_win32_WebBrowserComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| @@ -810,6 +811,7 @@ | |||
| BBA6060656F685ED7FA52045 ); name = Project; sourceTree = "<group>"; }; | |||
| E345840128627D533DF908AC = { isa = PBXGroup; children = ( | |||
| 6E7353DFEA8825B515049ABB, | |||
| DBE0CDE1B017190ABBFF557C, | |||
| 05076CDF1511A5F8A8E18F1D, | |||
| C8A229ACD244F402C57286CD, | |||
| 974B862C51DA9A16CBBB3A29, | |||
| @@ -172,6 +172,7 @@ | |||
| </Filter> | |||
| <Filter Name="Project Saving"> | |||
| <File RelativePath="..\..\Source\Project Saving\jucer_ProjectExport_Android.h"/> | |||
| <File RelativePath="..\..\Source\Project Saving\jucer_ProjectExport_CodeBlocks.h"/> | |||
| <File RelativePath="..\..\Source\Project Saving\jucer_ProjectExport_Make.h"/> | |||
| <File RelativePath="..\..\Source\Project Saving\jucer_ProjectExport_MSVC.h"/> | |||
| <File RelativePath="..\..\Source\Project Saving\jucer_ProjectExport_XCode.h"/> | |||
| @@ -172,6 +172,7 @@ | |||
| </Filter> | |||
| <Filter Name="Project Saving"> | |||
| <File RelativePath="..\..\Source\Project Saving\jucer_ProjectExport_Android.h"/> | |||
| <File RelativePath="..\..\Source\Project Saving\jucer_ProjectExport_CodeBlocks.h"/> | |||
| <File RelativePath="..\..\Source\Project Saving\jucer_ProjectExport_Make.h"/> | |||
| <File RelativePath="..\..\Source\Project Saving\jucer_ProjectExport_MSVC.h"/> | |||
| <File RelativePath="..\..\Source\Project Saving\jucer_ProjectExport_XCode.h"/> | |||
| @@ -1005,6 +1005,7 @@ | |||
| <ClInclude Include="..\..\Source\Project\jucer_ProjectType.h"/> | |||
| <ClInclude Include="..\..\Source\Project\jucer_TreeViewTypes.h"/> | |||
| <ClInclude Include="..\..\Source\Project Saving\jucer_ProjectExport_Android.h"/> | |||
| <ClInclude Include="..\..\Source\Project Saving\jucer_ProjectExport_CodeBlocks.h"/> | |||
| <ClInclude Include="..\..\Source\Project Saving\jucer_ProjectExport_Make.h"/> | |||
| <ClInclude Include="..\..\Source\Project Saving\jucer_ProjectExport_MSVC.h"/> | |||
| <ClInclude Include="..\..\Source\Project Saving\jucer_ProjectExport_XCode.h"/> | |||
| @@ -1281,6 +1281,9 @@ | |||
| <ClInclude Include="..\..\Source\Project Saving\jucer_ProjectExport_Android.h"> | |||
| <Filter>The Introjucer\Project Saving</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\Project Saving\jucer_ProjectExport_CodeBlocks.h"> | |||
| <Filter>The Introjucer\Project Saving</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\Project Saving\jucer_ProjectExport_Make.h"> | |||
| <Filter>The Introjucer\Project Saving</Filter> | |||
| </ClInclude> | |||
| @@ -147,6 +147,8 @@ | |||
| <GROUP id="{579C9644-D5C2-8469-9439-F91C81337531}" name="Project Saving"> | |||
| <FILE id="TtXohM" name="jucer_ProjectExport_Android.h" compile="0" | |||
| resource="0" file="Source/Project Saving/jucer_ProjectExport_Android.h"/> | |||
| <FILE id="EkBkj1" name="jucer_ProjectExport_CodeBlocks.h" compile="0" | |||
| resource="0" file="Source/Project Saving/jucer_ProjectExport_CodeBlocks.h"/> | |||
| <FILE id="mVXrLi" name="jucer_ProjectExport_Make.h" compile="0" resource="0" | |||
| file="Source/Project Saving/jucer_ProjectExport_Make.h"/> | |||
| <FILE id="ILeTrs" name="jucer_ProjectExport_MSVC.h" compile="0" resource="0" | |||
| @@ -23,13 +23,7 @@ | |||
| ============================================================================== | |||
| */ | |||
| #ifndef __JUCER_PROJECTEXPORT_ANDROID_JUCEHEADER__ | |||
| #define __JUCER_PROJECTEXPORT_ANDROID_JUCEHEADER__ | |||
| #include "jucer_ProjectExporter.h" | |||
| //============================================================================== | |||
| class AndroidProjectExporter : public ProjectExporter | |||
| { | |||
| public: | |||
| @@ -639,6 +633,3 @@ private: | |||
| //============================================================================== | |||
| JUCE_DECLARE_NON_COPYABLE (AndroidProjectExporter) | |||
| }; | |||
| #endif // __JUCER_PROJECTEXPORT_ANDROID_JUCEHEADER__ | |||
| @@ -0,0 +1,325 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
| Copyright 2004-11 by Raw Material Software Ltd. | |||
| ------------------------------------------------------------------------------ | |||
| JUCE can be redistributed and/or modified under the terms of the GNU General | |||
| Public License (Version 2), as published by the Free Software Foundation. | |||
| A copy of the license is included in the JUCE distribution, or can be found | |||
| online at www.gnu.org/licenses. | |||
| JUCE is distributed in the hope that it will be useful, but WITHOUT ANY | |||
| WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | |||
| A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||
| ------------------------------------------------------------------------------ | |||
| To release a closed-source product which uses JUCE, commercial licenses are | |||
| available: visit www.rawmaterialsoftware.com/juce for more information. | |||
| ============================================================================== | |||
| */ | |||
| class CodeBlocksProjectExporter : public ProjectExporter | |||
| { | |||
| public: | |||
| //============================================================================== | |||
| static const char* getNameCodeBlocks() { return "Code::Blocks project"; } | |||
| static const char* getValueTreeTypeName() { return "CODEBLOCKS"; } | |||
| static CodeBlocksProjectExporter* createForSettings (Project& project, const ValueTree& settings) | |||
| { | |||
| if (settings.hasType (getValueTreeTypeName())) | |||
| return new CodeBlocksProjectExporter (project, settings); | |||
| return nullptr; | |||
| } | |||
| //============================================================================== | |||
| CodeBlocksProjectExporter (Project& p, const ValueTree& t) : ProjectExporter (p, t) | |||
| { | |||
| name = getNameCodeBlocks(); | |||
| if (getTargetLocationString().isEmpty()) | |||
| getTargetLocationValue() = getDefaultBuildsRootFolder() + "CodeBlocks"; | |||
| } | |||
| //============================================================================== | |||
| bool launchProject() { return false; } | |||
| bool isCodeBlocks() const { return true; } | |||
| bool isWindows() const { return true; } | |||
| bool usesMMFiles() const { return false; } | |||
| bool canCopeWithDuplicateFiles() { return false; } | |||
| void createExporterProperties (PropertyListBuilder&) | |||
| { | |||
| } | |||
| //============================================================================== | |||
| void create (const OwnedArray<LibraryModule>&) const | |||
| { | |||
| Array<RelativePath> files; | |||
| for (int i = 0; i < getAllGroups().size(); ++i) | |||
| findAllFilesToCompile (getAllGroups().getReference(i), files); | |||
| const File cbpFile (getTargetFolder().getChildFile (project.getProjectFilenameRoot()) | |||
| .withFileExtension (".cbp")); | |||
| XmlElement xml ("CodeBlocks_project_file"); | |||
| addVersion (xml); | |||
| createProject (*xml.createNewChildElement ("Project"), files); | |||
| writeXmlOrThrow (xml, cbpFile, "UTF-8", 10); | |||
| } | |||
| private: | |||
| //============================================================================== | |||
| class CodeBlocksBuildConfiguration : public BuildConfiguration | |||
| { | |||
| public: | |||
| CodeBlocksBuildConfiguration (Project& p, const ValueTree& settings) | |||
| : BuildConfiguration (p, settings) | |||
| { | |||
| } | |||
| void createConfigProperties (PropertyListBuilder&) | |||
| { | |||
| } | |||
| }; | |||
| BuildConfiguration::Ptr createBuildConfig (const ValueTree& tree) const | |||
| { | |||
| return new CodeBlocksBuildConfiguration (project, tree); | |||
| } | |||
| //============================================================================== | |||
| void findAllFilesToCompile (const Project::Item& projectItem, Array<RelativePath>& results) const | |||
| { | |||
| if (projectItem.isGroup()) | |||
| { | |||
| for (int i = 0; i < projectItem.getNumChildren(); ++i) | |||
| findAllFilesToCompile (projectItem.getChild(i), results); | |||
| } | |||
| else | |||
| { | |||
| if (projectItem.shouldBeCompiled()) | |||
| results.add (RelativePath (projectItem.getFile(), getTargetFolder(), RelativePath::buildTargetFolder)); | |||
| } | |||
| } | |||
| void addVersion (XmlElement& xml) const | |||
| { | |||
| XmlElement* fileVersion = xml.createNewChildElement ("FileVersion"); | |||
| fileVersion->setAttribute ("major", 1); | |||
| fileVersion->setAttribute ("minor", 6); | |||
| } | |||
| void addOptions (XmlElement& xml) const | |||
| { | |||
| xml.createNewChildElement ("Option")->setAttribute ("title", project.getTitle()); | |||
| xml.createNewChildElement ("Option")->setAttribute ("pch_mode", 2); | |||
| xml.createNewChildElement ("Option")->setAttribute ("compiler", "gcc"); | |||
| } | |||
| static StringArray cleanArray (StringArray s) | |||
| { | |||
| s.trim(); | |||
| s.removeDuplicates (false); | |||
| s.removeEmptyStrings (true); | |||
| return s; | |||
| } | |||
| StringArray getDefines (const BuildConfiguration& config) const | |||
| { | |||
| StringPairArray defines; | |||
| defines.set ("__MINGW__", "1"); | |||
| defines.set ("__MINGW_EXTENSION", String::empty); | |||
| defines = mergePreprocessorDefs (defines, getAllPreprocessorDefs (config)); | |||
| StringArray defs; | |||
| for (int i = 0; i < defines.size(); ++i) | |||
| defs.add (defines.getAllKeys()[i] + "=" + defines.getAllValues()[i]); | |||
| return cleanArray (defs); | |||
| } | |||
| StringArray getCompilerFlags (const BuildConfiguration& config) const | |||
| { | |||
| StringArray flags; | |||
| flags.add ("-O" + config.getGCCOptimisationFlag()); | |||
| flags.add ("-std=gnu++0x"); | |||
| flags.add ("-march=pentium4"); | |||
| flags.addTokens (replacePreprocessorTokens (config, getExtraCompilerFlagsString()).trim(), | |||
| " \n", "\"'"); | |||
| { | |||
| const StringArray defines (getDefines (config)); | |||
| for (int i = 0; i < defines.size(); ++i) | |||
| { | |||
| String def (defines[i]); | |||
| if (! def.containsChar ('=')) | |||
| def << '='; | |||
| flags.add ("-D" + def); | |||
| } | |||
| } | |||
| return cleanArray (flags); | |||
| } | |||
| StringArray getLinkerFlags (const BuildConfiguration& config) const | |||
| { | |||
| StringArray flags; | |||
| if (! config.isDebug()) | |||
| flags.add ("-s"); | |||
| flags.addTokens (replacePreprocessorTokens (config, getExtraLinkerFlagsString()).trim(), | |||
| " \n", "\"'"); | |||
| return cleanArray (flags); | |||
| } | |||
| StringArray getIncludePaths (const BuildConfiguration& config) const | |||
| { | |||
| StringArray paths; | |||
| paths.add ("."); | |||
| paths.add (RelativePath (project.getGeneratedCodeFolder(), | |||
| getTargetFolder(), RelativePath::buildTargetFolder).toWindowsStyle()); | |||
| paths.addArray (config.getHeaderSearchPaths()); | |||
| return cleanArray (paths); | |||
| } | |||
| static int getTypeIndex (const ProjectType& type) | |||
| { | |||
| if (type.isGUIApplication()) return 0; | |||
| if (type.isCommandLineApp()) return 1; | |||
| if (type.isStaticLibrary()) return 2; | |||
| if (type.isDynamicLibrary()) return 3; | |||
| return 0; | |||
| } | |||
| void createBuildTarget (XmlElement& xml, const BuildConfiguration& config) const | |||
| { | |||
| xml.setAttribute ("title", config.getName()); | |||
| { | |||
| XmlElement* output = xml.createNewChildElement ("Option"); | |||
| String outputPath; | |||
| if (config.getTargetBinaryRelativePathString().isNotEmpty()) | |||
| { | |||
| RelativePath binaryPath (config.getTargetBinaryRelativePathString(), RelativePath::projectFolder); | |||
| binaryPath = binaryPath.rebased (projectFolder, getTargetFolder(), RelativePath::buildTargetFolder); | |||
| outputPath = config.getTargetBinaryRelativePathString(); | |||
| } | |||
| else | |||
| { | |||
| outputPath ="bin/" + File::createLegalFileName (config.getName().trim()); | |||
| } | |||
| output->setAttribute ("output", outputPath + "/" + config.getTargetBinaryNameString()); | |||
| output->setAttribute ("prefix_auto", 1); | |||
| output->setAttribute ("extension_auto", 1); | |||
| } | |||
| xml.createNewChildElement ("Option") | |||
| ->setAttribute ("object_output", "obj/" + File::createLegalFileName (config.getName().trim())); | |||
| xml.createNewChildElement ("Option")->setAttribute ("type", getTypeIndex (project.getProjectType())); | |||
| xml.createNewChildElement ("Option")->setAttribute ("compiler", "gcc"); | |||
| { | |||
| XmlElement* const compiler = xml.createNewChildElement ("Compiler"); | |||
| { | |||
| const StringArray compilerFlags (getCompilerFlags (config)); | |||
| for (int i = 0; i < compilerFlags.size(); ++i) | |||
| setAddOption (*compiler, "option", compilerFlags[i]); | |||
| } | |||
| { | |||
| const StringArray includePaths (getIncludePaths (config)); | |||
| for (int i = 0; i < includePaths.size(); ++i) | |||
| setAddOption (*compiler, "directory", includePaths[i]); | |||
| } | |||
| } | |||
| { | |||
| XmlElement* const linker = xml.createNewChildElement ("Linker"); | |||
| const StringArray linkerFlags (getLinkerFlags (config)); | |||
| for (int i = 0; i < linkerFlags.size(); ++i) | |||
| setAddOption (*linker, "option", linkerFlags[i]); | |||
| for (int i = 0; i < mingwLibs.size(); ++i) | |||
| setAddOption (*linker, "library", mingwLibs[i]); | |||
| } | |||
| } | |||
| void addBuild (XmlElement& xml) const | |||
| { | |||
| XmlElement* const build = xml.createNewChildElement ("Build"); | |||
| for (ConstConfigIterator config (*this); config.next();) | |||
| createBuildTarget (*build->createNewChildElement ("Target"), *config); | |||
| } | |||
| void addProjectCompilerOptions (XmlElement& xml) const | |||
| { | |||
| XmlElement* const compiler = xml.createNewChildElement ("Compiler"); | |||
| setAddOption (*compiler, "option", "-Wall"); | |||
| } | |||
| void addProjectLinkerOptions (XmlElement& xml) const | |||
| { | |||
| XmlElement* const linker = xml.createNewChildElement ("Linker"); | |||
| const char* defaultLibs[] = { "gdi32", "user32", "kernel32", "comctl32" }; | |||
| StringArray libs (defaultLibs, numElementsInArray (defaultLibs)); | |||
| libs.addTokens (getExternalLibrariesString(), ";\n", "\"'"); | |||
| libs = cleanArray (libs); | |||
| for (int i = 0; i < libs.size(); ++i) | |||
| setAddOption (*linker, "library", replacePreprocessorDefs (getAllPreprocessorDefs(), libs[i])); | |||
| } | |||
| void addCompileUnits (XmlElement& xml, const Array<RelativePath>& files) const | |||
| { | |||
| for (int i = 0; i < files.size(); ++i) | |||
| { | |||
| const RelativePath& file = files.getReference(i); | |||
| xml.createNewChildElement ("Unit")->setAttribute ("filename", file.toUnixStyle()); | |||
| } | |||
| } | |||
| void createProject (XmlElement& xml, const Array<RelativePath>& files) const | |||
| { | |||
| addOptions (xml); | |||
| addBuild (xml); | |||
| addProjectCompilerOptions (xml); | |||
| addProjectLinkerOptions (xml); | |||
| addCompileUnits (xml, files); | |||
| } | |||
| void setAddOption (XmlElement& xml, const String& name, const String& value) const | |||
| { | |||
| xml.createNewChildElement ("Add")->setAttribute (name, value); | |||
| } | |||
| JUCE_DECLARE_NON_COPYABLE (CodeBlocksProjectExporter) | |||
| }; | |||
| @@ -23,13 +23,7 @@ | |||
| ============================================================================== | |||
| */ | |||
| #ifndef __JUCER_PROJECTEXPORT_MSVC_JUCEHEADER__ | |||
| #define __JUCER_PROJECTEXPORT_MSVC_JUCEHEADER__ | |||
| #include "jucer_ProjectExporter.h" | |||
| #include "jucer_ProjectSaver.h" | |||
| //============================================================================== | |||
| class MSVCProjectExporterBase : public ProjectExporter | |||
| { | |||
| public: | |||
| @@ -44,9 +38,10 @@ public: | |||
| } | |||
| //============================================================================== | |||
| bool usesMMFiles() const { return false; } | |||
| bool isVisualStudio() const { return true; } | |||
| bool canCopeWithDuplicateFiles() { return false; } | |||
| bool usesMMFiles() const { return false; } | |||
| bool isVisualStudio() const { return true; } | |||
| bool isWindows() const { return true; } | |||
| bool canCopeWithDuplicateFiles() { return false; } | |||
| bool launchProject() | |||
| { | |||
| @@ -1523,6 +1518,3 @@ private: | |||
| JUCE_DECLARE_NON_COPYABLE (MSVCProjectExporterVC2012) | |||
| }; | |||
| #endif // __JUCER_PROJECTEXPORT_MSVC_JUCEHEADER__ | |||
| @@ -23,13 +23,7 @@ | |||
| ============================================================================== | |||
| */ | |||
| #ifndef __JUCER_PROJECTEXPORT_MAKE_JUCEHEADER__ | |||
| #define __JUCER_PROJECTEXPORT_MAKE_JUCEHEADER__ | |||
| #include "jucer_ProjectExporter.h" | |||
| //============================================================================== | |||
| class MakefileProjectExporter : public ProjectExporter | |||
| { | |||
| public: | |||
| @@ -340,6 +334,3 @@ private: | |||
| JUCE_DECLARE_NON_COPYABLE (MakefileProjectExporter) | |||
| }; | |||
| #endif // __JUCER_PROJECTEXPORT_MAKE_JUCEHEADER__ | |||
| @@ -23,11 +23,6 @@ | |||
| ============================================================================== | |||
| */ | |||
| #ifndef __JUCER_PROJECTEXPORT_XCODE_JUCEHEADER__ | |||
| #define __JUCER_PROJECTEXPORT_XCODE_JUCEHEADER__ | |||
| #include "jucer_ProjectExporter.h" | |||
| namespace | |||
| { | |||
| const char* const osxVersionDefault = "default"; | |||
| @@ -1238,6 +1233,3 @@ private: | |||
| return file.hasFileExtension (sourceFileExtensions); | |||
| } | |||
| }; | |||
| #endif // __JUCER_PROJECTEXPORT_XCODE_JUCEHEADER__ | |||
| @@ -24,11 +24,13 @@ | |||
| */ | |||
| #include "jucer_ProjectExporter.h" | |||
| #include "jucer_ProjectSaver.h" | |||
| #include "jucer_ProjectExport_Make.h" | |||
| #include "jucer_ProjectExport_MSVC.h" | |||
| #include "jucer_ProjectExport_XCode.h" | |||
| #include "jucer_ProjectExport_Android.h" | |||
| #include "jucer_ProjectExport_CodeBlocks.h" | |||
| //============================================================================== | |||
| StringArray ProjectExporter::getExporterNames() | |||
| @@ -42,6 +44,7 @@ StringArray ProjectExporter::getExporterNames() | |||
| s.add (MSVCProjectExporterVC2012::getName()); | |||
| s.add (MakefileProjectExporter::getNameLinux()); | |||
| s.add (AndroidProjectExporter::getNameAndroid()); | |||
| s.add (CodeBlocksProjectExporter::getNameCodeBlocks()); | |||
| return s; | |||
| } | |||
| @@ -72,6 +75,8 @@ ProjectExporter* ProjectExporter::createNewExporter (Project& project, const int | |||
| case 5: exp = new MSVCProjectExporterVC2012 (project, ValueTree (MSVCProjectExporterVC2012::getValueTreeTypeName())); break; | |||
| case 6: exp = new MakefileProjectExporter (project, ValueTree (MakefileProjectExporter ::getValueTreeTypeName())); break; | |||
| case 7: exp = new AndroidProjectExporter (project, ValueTree (AndroidProjectExporter ::getValueTreeTypeName())); break; | |||
| case 8: exp = new CodeBlocksProjectExporter (project, ValueTree (CodeBlocksProjectExporter::getValueTreeTypeName())); break; | |||
| default: jassertfalse; return 0; | |||
| } | |||
| @@ -102,6 +107,7 @@ ProjectExporter* ProjectExporter::createExporter (Project& project, const ValueT | |||
| if (exp == nullptr) exp = XCodeProjectExporter ::createForSettings (project, settings); | |||
| if (exp == nullptr) exp = MakefileProjectExporter ::createForSettings (project, settings); | |||
| if (exp == nullptr) exp = AndroidProjectExporter ::createForSettings (project, settings); | |||
| if (exp == nullptr) exp = CodeBlocksProjectExporter::createForSettings (project, settings); | |||
| jassert (exp != nullptr); | |||
| return exp; | |||
| @@ -163,28 +169,6 @@ File ProjectExporter::getTargetFolder() const | |||
| return project.resolveFilename (getTargetLocationString()); | |||
| } | |||
| String ProjectExporter::getIncludePathForFileInJuceFolder (const String& pathFromJuceFolder, const File& targetIncludeFile) const | |||
| { | |||
| String juceFolderPath (getJuceFolderString()); | |||
| if (juceFolderPath.startsWithChar ('<')) | |||
| { | |||
| juceFolderPath = FileHelpers::unixStylePath (File::addTrailingSeparator (juceFolderPath.substring (1).dropLastCharacters(1))); | |||
| if (juceFolderPath == "/") | |||
| juceFolderPath = String::empty; | |||
| return "<" + juceFolderPath + pathFromJuceFolder + ">"; | |||
| } | |||
| else | |||
| { | |||
| const RelativePath juceFromProject (juceFolderPath, RelativePath::projectFolder); | |||
| const RelativePath fileFromProject (juceFromProject.getChildFile (pathFromJuceFolder)); | |||
| const RelativePath fileFromHere (fileFromProject.rebased (project.getFile().getParentDirectory(), | |||
| targetIncludeFile.getParentDirectory(), RelativePath::unknown)); | |||
| return fileFromHere.toUnixStyle().quoted(); | |||
| } | |||
| } | |||
| RelativePath ProjectExporter::getJucePathFromProjectFolder() const | |||
| { | |||
| return RelativePath (getJuceFolderString(), RelativePath::projectFolder); | |||
| @@ -581,7 +565,7 @@ String ProjectExporter::BuildConfiguration::getGCCLibraryPathFlags() const | |||
| String ProjectExporter::getExternalLibraryFlags (const BuildConfiguration& config) const | |||
| { | |||
| StringArray libraries; | |||
| libraries.addTokens (getExternalLibrariesString(), ";", "\"'"); | |||
| libraries.addTokens (getExternalLibrariesString(), ";\n", "\"'"); | |||
| libraries.removeEmptyStrings (true); | |||
| if (libraries.size() != 0) | |||
| @@ -57,10 +57,12 @@ public: | |||
| virtual bool isXcode() const { return false; } | |||
| virtual bool isVisualStudio() const { return false; } | |||
| virtual bool isWindows() const { return false; } | |||
| virtual int getVisualStudioVersion() const { return 0; } | |||
| virtual bool isLinux() const { return false; } | |||
| virtual bool isOSX() const { return false; } | |||
| virtual bool isAndroid() const { return false; } | |||
| virtual bool isCodeBlocks() const { return false; } | |||
| //============================================================================== | |||
| String getName() const { return name; } | |||
| @@ -89,9 +91,6 @@ public: | |||
| Value getUserNotes() { return getSetting (Ids::userNotes); } | |||
| // This adds the quotes, and may return angle-brackets, eg: <foo/bar.h> or normal quotes. | |||
| String getIncludePathForFileInJuceFolder (const String& pathFromJuceFolder, const File& targetIncludeFile) const; | |||
| RelativePath rebaseFromProjectFolderToBuildTarget (const RelativePath& path) const; | |||
| void addToExtraSearchPaths (const RelativePath& pathFromProjectFolder); | |||
| @@ -151,6 +150,7 @@ public: | |||
| StringPairArray msvcExtraPreprocessorDefs; | |||
| bool msvcIsDLL, msvcIsWindowsSubsystem; | |||
| String msvcDelayLoadedDLLs; | |||
| StringArray mingwLibs; | |||
| //============================================================================== | |||
| StringArray extraSearchPaths; | |||
| @@ -228,8 +228,8 @@ namespace VSTHelpers | |||
| static void fixMissingVSTValues (ProjectExporter& exporter) | |||
| { | |||
| if (getVSTFolder(exporter).toString().isEmpty()) | |||
| getVSTFolder(exporter) = (exporter.isVisualStudio() ? "c:\\SDKs\\vstsdk2.4" | |||
| : "~/SDKs/vstsdk2.4"); | |||
| getVSTFolder(exporter) = (exporter.isWindows() ? "c:\\SDKs\\vstsdk2.4" | |||
| : "~/SDKs/vstsdk2.4"); | |||
| fixMissingXcodePostBuildScript (exporter); | |||
| } | |||
| @@ -249,7 +249,7 @@ namespace VSTHelpers | |||
| addVSTFolderToPath (exporter, exporter.extraSearchPaths); | |||
| if (exporter.isVisualStudio()) | |||
| if (exporter.isWindows()) | |||
| exporter.extraSearchPaths.add (juceWrapperFolder.toWindowsStyle()); | |||
| else if (exporter.isLinux()) | |||
| exporter.extraSearchPaths.add (juceWrapperFolder.toUnixStyle()); | |||
| @@ -518,6 +518,14 @@ void LibraryModule::prepareExporter (ProjectExporter& exporter, ProjectSaver& pr | |||
| exporter.linuxLibs.sort (false); | |||
| exporter.linuxLibs.removeDuplicates (false); | |||
| } | |||
| else if (exporter.isCodeBlocks()) | |||
| { | |||
| const String libs (moduleInfo ["mingwLibs"].toString()); | |||
| exporter.mingwLibs.addTokens (libs, ", ", String::empty); | |||
| exporter.mingwLibs.trim(); | |||
| exporter.mingwLibs.sort (false); | |||
| exporter.mingwLibs.removeDuplicates (false); | |||
| } | |||
| if (isPluginClient()) | |||
| { | |||
| @@ -605,9 +613,10 @@ static bool exporterTargetMatches (const String& test, String target) | |||
| bool LibraryModule::fileTargetMatches (ProjectExporter& exporter, const String& target) | |||
| { | |||
| if (exporter.isXcode()) return exporterTargetMatches ("xcode", target); | |||
| if (exporter.isVisualStudio()) return exporterTargetMatches ("msvc", target); | |||
| if (exporter.isWindows()) return exporterTargetMatches ("msvc", target); | |||
| if (exporter.isLinux()) return exporterTargetMatches ("linux", target); | |||
| if (exporter.isAndroid()) return exporterTargetMatches ("android", target); | |||
| if (exporter.isCodeBlocks()) return exporterTargetMatches ("mingw", target); | |||
| return target.isEmpty(); | |||
| } | |||
| @@ -23,5 +23,6 @@ | |||
| "OSXFrameworks": "CoreAudio CoreMIDI DiscRecording", | |||
| "iOSFrameworks": "AudioToolbox CoreMIDI", | |||
| "LinuxLibs": "asound" | |||
| "LinuxLibs": "asound", | |||
| "mingwLibs": "winmm" | |||
| } | |||
| @@ -33,5 +33,6 @@ | |||
| "OSXFrameworks": "Cocoa IOKit", | |||
| "iOSFrameworks": "Foundation", | |||
| "LinuxLibs": "rt dl pthread" | |||
| "LinuxLibs": "rt dl pthread", | |||
| "mingwLibs": "uuid wsock32 wininet version ole32 ws2_32 oleaut32 imm32 comdlg32 shlwapi" | |||
| } | |||
| @@ -18,5 +18,6 @@ | |||
| "OSXFrameworks": "OpenGL", | |||
| "iOSFrameworks": "OpenGLES", | |||
| "LinuxLibs": "GL" | |||
| "LinuxLibs": "GL", | |||
| "mingwLibs": "opengl32" | |||
| } | |||