Browse Source

GIF decoding fix. Introjucer refactoring work.

tags/2021-05-28
Julian Storer 14 years ago
parent
commit
2dff4cd3fa
33 changed files with 463 additions and 231 deletions
  1. +6
    -0
      extras/Introjucer/Builds/Linux/Makefile
  2. +10
    -4
      extras/Introjucer/Builds/MacOSX/The Introjucer.xcodeproj/project.pbxproj
  3. +4
    -2
      extras/Introjucer/Builds/VisualStudio2005/The Introjucer.vcproj
  4. +4
    -2
      extras/Introjucer/Builds/VisualStudio2008/The Introjucer.vcproj
  5. +3
    -1
      extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj
  6. +9
    -3
      extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj.filters
  7. +8
    -4
      extras/Introjucer/Introjucer.jucer
  8. +16
    -25
      extras/Introjucer/Source/Project/jucer_NewProjectWizard.cpp
  9. +1
    -1
      extras/Introjucer/Source/Project/jucer_NewProjectWizard.h
  10. +63
    -52
      extras/Introjucer/Source/Project/jucer_Project.cpp
  11. +13
    -23
      extras/Introjucer/Source/Project/jucer_Project.h
  12. +1
    -1
      extras/Introjucer/Source/Project/jucer_ProjectExport_Android.h
  13. +28
    -28
      extras/Introjucer/Source/Project/jucer_ProjectExport_MSVC.h
  14. +5
    -5
      extras/Introjucer/Source/Project/jucer_ProjectExport_Make.h
  15. +28
    -28
      extras/Introjucer/Source/Project/jucer_ProjectExport_XCode.h
  16. +4
    -4
      extras/Introjucer/Source/Project/jucer_ProjectExporter.cpp
  17. +7
    -6
      extras/Introjucer/Source/Project/jucer_ProjectExporter.h
  18. +2
    -2
      extras/Introjucer/Source/Project/jucer_ProjectInformationComponent.cpp
  19. +6
    -6
      extras/Introjucer/Source/Project/jucer_ProjectSaver.h
  20. +87
    -0
      extras/Introjucer/Source/Project/jucer_ProjectType.cpp
  21. +111
    -0
      extras/Introjucer/Source/Project/jucer_ProjectType.h
  22. +2
    -3
      extras/Introjucer/Source/Project/jucer_TreeViewTypes.cpp
  23. +9
    -9
      extras/Introjucer/Source/Utility/jucer_MiscUtilities.cpp
  24. +9
    -9
      extras/Introjucer/Source/Utility/jucer_MiscUtilities.h
  25. +1
    -1
      extras/Introjucer/Source/Utility/jucer_RelativePath.h
  26. +1
    -1
      extras/Introjucer/Source/Utility/jucer_StoredSettings.cpp
  27. +1
    -1
      extras/Introjucer/Source/Utility/jucer_StoredSettings.h
  28. +11
    -4
      juce_amalgamated.cpp
  29. +1
    -1
      juce_amalgamated.h
  30. +2
    -0
      src/audio/audio_file_formats/juce_QuickTimeAudioFormat.cpp
  31. +1
    -1
      src/core/juce_StandardHeader.h
  32. +7
    -3
      src/gui/components/code_editor/juce_CPlusPlusCodeTokeniser.cpp
  33. +2
    -1
      src/gui/graphics/imaging/image_file_formats/juce_GIFLoader.cpp

+ 6
- 0
extras/Introjucer/Builds/Linux/Makefile View File

@@ -58,6 +58,7 @@ OBJECTS := \
$(OBJDIR)/jucer_ProjectExporter_eed6e04b.o \ $(OBJDIR)/jucer_ProjectExporter_eed6e04b.o \
$(OBJDIR)/jucer_ProjectInformationComponent_4746e69b.o \ $(OBJDIR)/jucer_ProjectInformationComponent_4746e69b.o \
$(OBJDIR)/jucer_ProjectTreeViewBase_63c2bdbe.o \ $(OBJDIR)/jucer_ProjectTreeViewBase_63c2bdbe.o \
$(OBJDIR)/jucer_ProjectType_1bc27a24.o \
$(OBJDIR)/jucer_ResourceFile_7e7734e3.o \ $(OBJDIR)/jucer_ResourceFile_7e7734e3.o \
$(OBJDIR)/jucer_TreeViewTypes_4a765287.o \ $(OBJDIR)/jucer_TreeViewTypes_4a765287.o \
$(OBJDIR)/jucer_CodeHelpers_c317179c.o \ $(OBJDIR)/jucer_CodeHelpers_c317179c.o \
@@ -161,6 +162,11 @@ $(OBJDIR)/jucer_ProjectTreeViewBase_63c2bdbe.o: ../../Source/Project/jucer_Proje
@echo "Compiling jucer_ProjectTreeViewBase.cpp" @echo "Compiling jucer_ProjectTreeViewBase.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/jucer_ProjectType_1bc27a24.o: ../../Source/Project/jucer_ProjectType.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling jucer_ProjectType.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/jucer_ResourceFile_7e7734e3.o: ../../Source/Project/jucer_ResourceFile.cpp $(OBJDIR)/jucer_ResourceFile_7e7734e3.o: ../../Source/Project/jucer_ResourceFile.cpp
-@mkdir -p $(OBJDIR) -@mkdir -p $(OBJDIR)
@echo "Compiling jucer_ResourceFile.cpp" @echo "Compiling jucer_ResourceFile.cpp"


+ 10
- 4
extras/Introjucer/Builds/MacOSX/The Introjucer.xcodeproj/project.pbxproj View File

@@ -33,6 +33,7 @@
379C4FA4F9F4F856A245D8F1 = { isa = PBXBuildFile; fileRef = 296E0498784BF03FA18B164B; }; 379C4FA4F9F4F856A245D8F1 = { isa = PBXBuildFile; fileRef = 296E0498784BF03FA18B164B; };
A70571C45ECEB18061181367 = { isa = PBXBuildFile; fileRef = 6746790735D492AB157E5F26; }; A70571C45ECEB18061181367 = { isa = PBXBuildFile; fileRef = 6746790735D492AB157E5F26; };
7B65A9D3D6D5798649D90FA0 = { isa = PBXBuildFile; fileRef = EB49FFAB3424D162D2105B2D; }; 7B65A9D3D6D5798649D90FA0 = { isa = PBXBuildFile; fileRef = EB49FFAB3424D162D2105B2D; };
257C8841AC7634499B0B3D0A = { isa = PBXBuildFile; fileRef = 1328E38A600B515CD2CFBB7A; };
85572197E35546BB69861758 = { isa = PBXBuildFile; fileRef = 41C18D8743BCACB15D27EE21; }; 85572197E35546BB69861758 = { isa = PBXBuildFile; fileRef = 41C18D8743BCACB15D27EE21; };
0E22757B983B4F600F1B7916 = { isa = PBXBuildFile; fileRef = 7D678D4FD5505D7FCE7DCC7F; }; 0E22757B983B4F600F1B7916 = { isa = PBXBuildFile; fileRef = 7D678D4FD5505D7FCE7DCC7F; };
1501CEE9D0FD3C1185F6413B = { isa = PBXBuildFile; fileRef = 169DB589B861F57CDF896A02; }; 1501CEE9D0FD3C1185F6413B = { isa = PBXBuildFile; fileRef = 169DB589B861F57CDF896A02; };
@@ -86,17 +87,19 @@
8CD4ABA478205AA127FB9BE1 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_Project.h"; path = "../../Source/Project/jucer_Project.h"; sourceTree = "SOURCE_ROOT"; }; 8CD4ABA478205AA127FB9BE1 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_Project.h"; path = "../../Source/Project/jucer_Project.h"; sourceTree = "SOURCE_ROOT"; };
8E44AB32AEDABC7E1D3FC49F = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_ProjectContentComponent.cpp"; path = "../../Source/Project/jucer_ProjectContentComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; 8E44AB32AEDABC7E1D3FC49F = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_ProjectContentComponent.cpp"; path = "../../Source/Project/jucer_ProjectContentComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
F2F98DA41146390D05A44EAD = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ProjectContentComponent.h"; path = "../../Source/Project/jucer_ProjectContentComponent.h"; sourceTree = "SOURCE_ROOT"; }; F2F98DA41146390D05A44EAD = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ProjectContentComponent.h"; path = "../../Source/Project/jucer_ProjectContentComponent.h"; sourceTree = "SOURCE_ROOT"; };
296E0498784BF03FA18B164B = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_ProjectExporter.cpp"; path = "../../Source/Project/jucer_ProjectExporter.cpp"; sourceTree = "SOURCE_ROOT"; };
5DE419991013E7C0F203E99F = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ProjectExporter.h"; path = "../../Source/Project/jucer_ProjectExporter.h"; sourceTree = "SOURCE_ROOT"; };
AB9EE4734D894FBF1CF62C5F = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ProjectExport_Android.h"; path = "../../Source/Project/jucer_ProjectExport_Android.h"; sourceTree = "SOURCE_ROOT"; }; AB9EE4734D894FBF1CF62C5F = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ProjectExport_Android.h"; path = "../../Source/Project/jucer_ProjectExport_Android.h"; sourceTree = "SOURCE_ROOT"; };
889715B0152919B2EAA1F5F9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ProjectExport_Make.h"; path = "../../Source/Project/jucer_ProjectExport_Make.h"; sourceTree = "SOURCE_ROOT"; }; 889715B0152919B2EAA1F5F9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ProjectExport_Make.h"; path = "../../Source/Project/jucer_ProjectExport_Make.h"; sourceTree = "SOURCE_ROOT"; };
907F302BB89308CDB2C5FD0E = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ProjectExport_MSVC.h"; path = "../../Source/Project/jucer_ProjectExport_MSVC.h"; sourceTree = "SOURCE_ROOT"; }; 907F302BB89308CDB2C5FD0E = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ProjectExport_MSVC.h"; path = "../../Source/Project/jucer_ProjectExport_MSVC.h"; sourceTree = "SOURCE_ROOT"; };
D250274734D729D2E0389A20 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ProjectExport_XCode.h"; path = "../../Source/Project/jucer_ProjectExport_XCode.h"; sourceTree = "SOURCE_ROOT"; }; D250274734D729D2E0389A20 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ProjectExport_XCode.h"; path = "../../Source/Project/jucer_ProjectExport_XCode.h"; sourceTree = "SOURCE_ROOT"; };
296E0498784BF03FA18B164B = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_ProjectExporter.cpp"; path = "../../Source/Project/jucer_ProjectExporter.cpp"; sourceTree = "SOURCE_ROOT"; };
5DE419991013E7C0F203E99F = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ProjectExporter.h"; path = "../../Source/Project/jucer_ProjectExporter.h"; sourceTree = "SOURCE_ROOT"; };
6746790735D492AB157E5F26 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_ProjectInformationComponent.cpp"; path = "../../Source/Project/jucer_ProjectInformationComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; 6746790735D492AB157E5F26 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_ProjectInformationComponent.cpp"; path = "../../Source/Project/jucer_ProjectInformationComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
4727C2C16D17BE642A3F5838 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ProjectInformationComponent.h"; path = "../../Source/Project/jucer_ProjectInformationComponent.h"; sourceTree = "SOURCE_ROOT"; }; 4727C2C16D17BE642A3F5838 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ProjectInformationComponent.h"; path = "../../Source/Project/jucer_ProjectInformationComponent.h"; sourceTree = "SOURCE_ROOT"; };
ADF962F14A1FCBB05B499E6C = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ProjectSaver.h"; path = "../../Source/Project/jucer_ProjectSaver.h"; sourceTree = "SOURCE_ROOT"; }; ADF962F14A1FCBB05B499E6C = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ProjectSaver.h"; path = "../../Source/Project/jucer_ProjectSaver.h"; sourceTree = "SOURCE_ROOT"; };
EB49FFAB3424D162D2105B2D = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_ProjectTreeViewBase.cpp"; path = "../../Source/Project/jucer_ProjectTreeViewBase.cpp"; sourceTree = "SOURCE_ROOT"; }; EB49FFAB3424D162D2105B2D = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_ProjectTreeViewBase.cpp"; path = "../../Source/Project/jucer_ProjectTreeViewBase.cpp"; sourceTree = "SOURCE_ROOT"; };
27D0B6991943D6AD88E42FE5 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ProjectTreeViewBase.h"; path = "../../Source/Project/jucer_ProjectTreeViewBase.h"; sourceTree = "SOURCE_ROOT"; }; 27D0B6991943D6AD88E42FE5 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ProjectTreeViewBase.h"; path = "../../Source/Project/jucer_ProjectTreeViewBase.h"; sourceTree = "SOURCE_ROOT"; };
1328E38A600B515CD2CFBB7A = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_ProjectType.cpp"; path = "../../Source/Project/jucer_ProjectType.cpp"; sourceTree = "SOURCE_ROOT"; };
D39F212C819794FECD373008 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ProjectType.h"; path = "../../Source/Project/jucer_ProjectType.h"; sourceTree = "SOURCE_ROOT"; };
41C18D8743BCACB15D27EE21 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_ResourceFile.cpp"; path = "../../Source/Project/jucer_ResourceFile.cpp"; sourceTree = "SOURCE_ROOT"; }; 41C18D8743BCACB15D27EE21 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_ResourceFile.cpp"; path = "../../Source/Project/jucer_ResourceFile.cpp"; sourceTree = "SOURCE_ROOT"; };
05564317BD19EBC8416976DD = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ResourceFile.h"; path = "../../Source/Project/jucer_ResourceFile.h"; sourceTree = "SOURCE_ROOT"; }; 05564317BD19EBC8416976DD = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ResourceFile.h"; path = "../../Source/Project/jucer_ResourceFile.h"; sourceTree = "SOURCE_ROOT"; };
7D678D4FD5505D7FCE7DCC7F = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_TreeViewTypes.cpp"; path = "../../Source/Project/jucer_TreeViewTypes.cpp"; sourceTree = "SOURCE_ROOT"; }; 7D678D4FD5505D7FCE7DCC7F = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_TreeViewTypes.cpp"; path = "../../Source/Project/jucer_TreeViewTypes.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -166,17 +169,19 @@
8CD4ABA478205AA127FB9BE1, 8CD4ABA478205AA127FB9BE1,
8E44AB32AEDABC7E1D3FC49F, 8E44AB32AEDABC7E1D3FC49F,
F2F98DA41146390D05A44EAD, F2F98DA41146390D05A44EAD,
296E0498784BF03FA18B164B,
5DE419991013E7C0F203E99F,
AB9EE4734D894FBF1CF62C5F, AB9EE4734D894FBF1CF62C5F,
889715B0152919B2EAA1F5F9, 889715B0152919B2EAA1F5F9,
907F302BB89308CDB2C5FD0E, 907F302BB89308CDB2C5FD0E,
D250274734D729D2E0389A20, D250274734D729D2E0389A20,
296E0498784BF03FA18B164B,
5DE419991013E7C0F203E99F,
6746790735D492AB157E5F26, 6746790735D492AB157E5F26,
4727C2C16D17BE642A3F5838, 4727C2C16D17BE642A3F5838,
ADF962F14A1FCBB05B499E6C, ADF962F14A1FCBB05B499E6C,
EB49FFAB3424D162D2105B2D, EB49FFAB3424D162D2105B2D,
27D0B6991943D6AD88E42FE5, 27D0B6991943D6AD88E42FE5,
1328E38A600B515CD2CFBB7A,
D39F212C819794FECD373008,
41C18D8743BCACB15D27EE21, 41C18D8743BCACB15D27EE21,
05564317BD19EBC8416976DD, 05564317BD19EBC8416976DD,
7D678D4FD5505D7FCE7DCC7F, 7D678D4FD5505D7FCE7DCC7F,
@@ -332,6 +337,7 @@
379C4FA4F9F4F856A245D8F1, 379C4FA4F9F4F856A245D8F1,
A70571C45ECEB18061181367, A70571C45ECEB18061181367,
7B65A9D3D6D5798649D90FA0, 7B65A9D3D6D5798649D90FA0,
257C8841AC7634499B0B3D0A,
85572197E35546BB69861758, 85572197E35546BB69861758,
0E22757B983B4F600F1B7916, 0E22757B983B4F600F1B7916,
1501CEE9D0FD3C1185F6413B, 1501CEE9D0FD3C1185F6413B,


+ 4
- 2
extras/Introjucer/Builds/VisualStudio2005/The Introjucer.vcproj View File

@@ -160,17 +160,19 @@
<File RelativePath="..\..\Source\Project\jucer_Project.h"/> <File RelativePath="..\..\Source\Project\jucer_Project.h"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectContentComponent.cpp"/> <File RelativePath="..\..\Source\Project\jucer_ProjectContentComponent.cpp"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectContentComponent.h"/> <File RelativePath="..\..\Source\Project\jucer_ProjectContentComponent.h"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectExporter.cpp"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectExporter.h"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectExport_Android.h"/> <File RelativePath="..\..\Source\Project\jucer_ProjectExport_Android.h"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectExport_Make.h"/> <File RelativePath="..\..\Source\Project\jucer_ProjectExport_Make.h"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectExport_MSVC.h"/> <File RelativePath="..\..\Source\Project\jucer_ProjectExport_MSVC.h"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectExport_XCode.h"/> <File RelativePath="..\..\Source\Project\jucer_ProjectExport_XCode.h"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectExporter.cpp"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectExporter.h"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectInformationComponent.cpp"/> <File RelativePath="..\..\Source\Project\jucer_ProjectInformationComponent.cpp"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectInformationComponent.h"/> <File RelativePath="..\..\Source\Project\jucer_ProjectInformationComponent.h"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectSaver.h"/> <File RelativePath="..\..\Source\Project\jucer_ProjectSaver.h"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectTreeViewBase.cpp"/> <File RelativePath="..\..\Source\Project\jucer_ProjectTreeViewBase.cpp"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectTreeViewBase.h"/> <File RelativePath="..\..\Source\Project\jucer_ProjectTreeViewBase.h"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectType.cpp"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectType.h"/>
<File RelativePath="..\..\Source\Project\jucer_ResourceFile.cpp"/> <File RelativePath="..\..\Source\Project\jucer_ResourceFile.cpp"/>
<File RelativePath="..\..\Source\Project\jucer_ResourceFile.h"/> <File RelativePath="..\..\Source\Project\jucer_ResourceFile.h"/>
<File RelativePath="..\..\Source\Project\jucer_TreeViewTypes.cpp"/> <File RelativePath="..\..\Source\Project\jucer_TreeViewTypes.cpp"/>


+ 4
- 2
extras/Introjucer/Builds/VisualStudio2008/The Introjucer.vcproj View File

@@ -160,17 +160,19 @@
<File RelativePath="..\..\Source\Project\jucer_Project.h"/> <File RelativePath="..\..\Source\Project\jucer_Project.h"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectContentComponent.cpp"/> <File RelativePath="..\..\Source\Project\jucer_ProjectContentComponent.cpp"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectContentComponent.h"/> <File RelativePath="..\..\Source\Project\jucer_ProjectContentComponent.h"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectExporter.cpp"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectExporter.h"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectExport_Android.h"/> <File RelativePath="..\..\Source\Project\jucer_ProjectExport_Android.h"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectExport_Make.h"/> <File RelativePath="..\..\Source\Project\jucer_ProjectExport_Make.h"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectExport_MSVC.h"/> <File RelativePath="..\..\Source\Project\jucer_ProjectExport_MSVC.h"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectExport_XCode.h"/> <File RelativePath="..\..\Source\Project\jucer_ProjectExport_XCode.h"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectExporter.cpp"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectExporter.h"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectInformationComponent.cpp"/> <File RelativePath="..\..\Source\Project\jucer_ProjectInformationComponent.cpp"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectInformationComponent.h"/> <File RelativePath="..\..\Source\Project\jucer_ProjectInformationComponent.h"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectSaver.h"/> <File RelativePath="..\..\Source\Project\jucer_ProjectSaver.h"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectTreeViewBase.cpp"/> <File RelativePath="..\..\Source\Project\jucer_ProjectTreeViewBase.cpp"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectTreeViewBase.h"/> <File RelativePath="..\..\Source\Project\jucer_ProjectTreeViewBase.h"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectType.cpp"/>
<File RelativePath="..\..\Source\Project\jucer_ProjectType.h"/>
<File RelativePath="..\..\Source\Project\jucer_ResourceFile.cpp"/> <File RelativePath="..\..\Source\Project\jucer_ResourceFile.cpp"/>
<File RelativePath="..\..\Source\Project\jucer_ResourceFile.h"/> <File RelativePath="..\..\Source\Project\jucer_ResourceFile.h"/>
<File RelativePath="..\..\Source\Project\jucer_TreeViewTypes.cpp"/> <File RelativePath="..\..\Source\Project\jucer_TreeViewTypes.cpp"/>


+ 3
- 1
extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj View File

@@ -137,6 +137,7 @@
<ClCompile Include="..\..\Source\Project\jucer_ProjectExporter.cpp"/> <ClCompile Include="..\..\Source\Project\jucer_ProjectExporter.cpp"/>
<ClCompile Include="..\..\Source\Project\jucer_ProjectInformationComponent.cpp"/> <ClCompile Include="..\..\Source\Project\jucer_ProjectInformationComponent.cpp"/>
<ClCompile Include="..\..\Source\Project\jucer_ProjectTreeViewBase.cpp"/> <ClCompile Include="..\..\Source\Project\jucer_ProjectTreeViewBase.cpp"/>
<ClCompile Include="..\..\Source\Project\jucer_ProjectType.cpp"/>
<ClCompile Include="..\..\Source\Project\jucer_ResourceFile.cpp"/> <ClCompile Include="..\..\Source\Project\jucer_ResourceFile.cpp"/>
<ClCompile Include="..\..\Source\Project\jucer_TreeViewTypes.cpp"/> <ClCompile Include="..\..\Source\Project\jucer_TreeViewTypes.cpp"/>
<ClCompile Include="..\..\Source\Utility\jucer_CodeHelpers.cpp"/> <ClCompile Include="..\..\Source\Utility\jucer_CodeHelpers.cpp"/>
@@ -166,14 +167,15 @@
<ClInclude Include="..\..\Source\Project\jucer_NewProjectWizard.h"/> <ClInclude Include="..\..\Source\Project\jucer_NewProjectWizard.h"/>
<ClInclude Include="..\..\Source\Project\jucer_Project.h"/> <ClInclude Include="..\..\Source\Project\jucer_Project.h"/>
<ClInclude Include="..\..\Source\Project\jucer_ProjectContentComponent.h"/> <ClInclude Include="..\..\Source\Project\jucer_ProjectContentComponent.h"/>
<ClInclude Include="..\..\Source\Project\jucer_ProjectExporter.h"/>
<ClInclude Include="..\..\Source\Project\jucer_ProjectExport_Android.h"/> <ClInclude Include="..\..\Source\Project\jucer_ProjectExport_Android.h"/>
<ClInclude Include="..\..\Source\Project\jucer_ProjectExport_Make.h"/> <ClInclude Include="..\..\Source\Project\jucer_ProjectExport_Make.h"/>
<ClInclude Include="..\..\Source\Project\jucer_ProjectExport_MSVC.h"/> <ClInclude Include="..\..\Source\Project\jucer_ProjectExport_MSVC.h"/>
<ClInclude Include="..\..\Source\Project\jucer_ProjectExport_XCode.h"/> <ClInclude Include="..\..\Source\Project\jucer_ProjectExport_XCode.h"/>
<ClInclude Include="..\..\Source\Project\jucer_ProjectExporter.h"/>
<ClInclude Include="..\..\Source\Project\jucer_ProjectInformationComponent.h"/> <ClInclude Include="..\..\Source\Project\jucer_ProjectInformationComponent.h"/>
<ClInclude Include="..\..\Source\Project\jucer_ProjectSaver.h"/> <ClInclude Include="..\..\Source\Project\jucer_ProjectSaver.h"/>
<ClInclude Include="..\..\Source\Project\jucer_ProjectTreeViewBase.h"/> <ClInclude Include="..\..\Source\Project\jucer_ProjectTreeViewBase.h"/>
<ClInclude Include="..\..\Source\Project\jucer_ProjectType.h"/>
<ClInclude Include="..\..\Source\Project\jucer_ResourceFile.h"/> <ClInclude Include="..\..\Source\Project\jucer_ResourceFile.h"/>
<ClInclude Include="..\..\Source\Project\jucer_TreeViewTypes.h"/> <ClInclude Include="..\..\Source\Project\jucer_TreeViewTypes.h"/>
<ClInclude Include="..\..\Source\Utility\jucer_CodeHelpers.h"/> <ClInclude Include="..\..\Source\Utility\jucer_CodeHelpers.h"/>


+ 9
- 3
extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj.filters View File

@@ -70,6 +70,9 @@
<ClCompile Include="..\..\Source\Project\jucer_ProjectTreeViewBase.cpp"> <ClCompile Include="..\..\Source\Project\jucer_ProjectTreeViewBase.cpp">
<Filter>The Introjucer\Project</Filter> <Filter>The Introjucer\Project</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\Source\Project\jucer_ProjectType.cpp">
<Filter>The Introjucer\Project</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\Project\jucer_ResourceFile.cpp"> <ClCompile Include="..\..\Source\Project\jucer_ResourceFile.cpp">
<Filter>The Introjucer\Project</Filter> <Filter>The Introjucer\Project</Filter>
</ClCompile> </ClCompile>
@@ -180,9 +183,6 @@
<ClInclude Include="..\..\Source\Project\jucer_ProjectContentComponent.h"> <ClInclude Include="..\..\Source\Project\jucer_ProjectContentComponent.h">
<Filter>The Introjucer\Project</Filter> <Filter>The Introjucer\Project</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\Source\Project\jucer_ProjectExporter.h">
<Filter>The Introjucer\Project</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\Project\jucer_ProjectExport_Android.h"> <ClInclude Include="..\..\Source\Project\jucer_ProjectExport_Android.h">
<Filter>The Introjucer\Project</Filter> <Filter>The Introjucer\Project</Filter>
</ClInclude> </ClInclude>
@@ -195,6 +195,9 @@
<ClInclude Include="..\..\Source\Project\jucer_ProjectExport_XCode.h"> <ClInclude Include="..\..\Source\Project\jucer_ProjectExport_XCode.h">
<Filter>The Introjucer\Project</Filter> <Filter>The Introjucer\Project</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\Source\Project\jucer_ProjectExporter.h">
<Filter>The Introjucer\Project</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\Project\jucer_ProjectInformationComponent.h"> <ClInclude Include="..\..\Source\Project\jucer_ProjectInformationComponent.h">
<Filter>The Introjucer\Project</Filter> <Filter>The Introjucer\Project</Filter>
</ClInclude> </ClInclude>
@@ -204,6 +207,9 @@
<ClInclude Include="..\..\Source\Project\jucer_ProjectTreeViewBase.h"> <ClInclude Include="..\..\Source\Project\jucer_ProjectTreeViewBase.h">
<Filter>The Introjucer\Project</Filter> <Filter>The Introjucer\Project</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\Source\Project\jucer_ProjectType.h">
<Filter>The Introjucer\Project</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\Project\jucer_ResourceFile.h"> <ClInclude Include="..\..\Source\Project\jucer_ResourceFile.h">
<Filter>The Introjucer\Project</Filter> <Filter>The Introjucer\Project</Filter>
</ClInclude> </ClInclude>


+ 8
- 4
extras/Introjucer/Introjucer.jucer View File

@@ -88,10 +88,6 @@
resource="0" file="Source/Project/jucer_ProjectContentComponent.cpp"/> resource="0" file="Source/Project/jucer_ProjectContentComponent.cpp"/>
<FILE id="mIJMR08" name="jucer_ProjectContentComponent.h" compile="0" <FILE id="mIJMR08" name="jucer_ProjectContentComponent.h" compile="0"
resource="0" file="Source/Project/jucer_ProjectContentComponent.h"/> resource="0" file="Source/Project/jucer_ProjectContentComponent.h"/>
<FILE id="h6J3UPy" name="jucer_ProjectExporter.cpp" compile="1" resource="0"
file="Source/Project/jucer_ProjectExporter.cpp"/>
<FILE id="KFY4Re5" name="jucer_ProjectExporter.h" compile="0" resource="0"
file="Source/Project/jucer_ProjectExporter.h"/>
<FILE id="N0uQAr" name="jucer_ProjectExport_Android.h" compile="0" <FILE id="N0uQAr" name="jucer_ProjectExport_Android.h" compile="0"
resource="0" file="Source/Project/jucer_ProjectExport_Android.h"/> resource="0" file="Source/Project/jucer_ProjectExport_Android.h"/>
<FILE id="b8ouh7s" name="jucer_ProjectExport_Make.h" compile="0" resource="0" <FILE id="b8ouh7s" name="jucer_ProjectExport_Make.h" compile="0" resource="0"
@@ -100,6 +96,10 @@
file="Source/Project/jucer_ProjectExport_MSVC.h"/> file="Source/Project/jucer_ProjectExport_MSVC.h"/>
<FILE id="ymhtjf" name="jucer_ProjectExport_XCode.h" compile="0" resource="0" <FILE id="ymhtjf" name="jucer_ProjectExport_XCode.h" compile="0" resource="0"
file="Source/Project/jucer_ProjectExport_XCode.h"/> file="Source/Project/jucer_ProjectExport_XCode.h"/>
<FILE id="h6J3UPy" name="jucer_ProjectExporter.cpp" compile="1" resource="0"
file="Source/Project/jucer_ProjectExporter.cpp"/>
<FILE id="KFY4Re5" name="jucer_ProjectExporter.h" compile="0" resource="0"
file="Source/Project/jucer_ProjectExporter.h"/>
<FILE id="5I09Gpe" name="jucer_ProjectInformationComponent.cpp" compile="1" <FILE id="5I09Gpe" name="jucer_ProjectInformationComponent.cpp" compile="1"
resource="0" file="Source/Project/jucer_ProjectInformationComponent.cpp"/> resource="0" file="Source/Project/jucer_ProjectInformationComponent.cpp"/>
<FILE id="nvEyCt5" name="jucer_ProjectInformationComponent.h" compile="0" <FILE id="nvEyCt5" name="jucer_ProjectInformationComponent.h" compile="0"
@@ -110,6 +110,10 @@
resource="0" file="Source/Project/jucer_ProjectTreeViewBase.cpp"/> resource="0" file="Source/Project/jucer_ProjectTreeViewBase.cpp"/>
<FILE id="UwhAsi1" name="jucer_ProjectTreeViewBase.h" compile="0" resource="0" <FILE id="UwhAsi1" name="jucer_ProjectTreeViewBase.h" compile="0" resource="0"
file="Source/Project/jucer_ProjectTreeViewBase.h"/> file="Source/Project/jucer_ProjectTreeViewBase.h"/>
<FILE id="WQ6fWQ" name="jucer_ProjectType.cpp" compile="1" resource="0"
file="Source/Project/jucer_ProjectType.cpp"/>
<FILE id="davId" name="jucer_ProjectType.h" compile="0" resource="0"
file="Source/Project/jucer_ProjectType.h"/>
<FILE id="pIeJPuR" name="jucer_ResourceFile.cpp" compile="1" resource="0" <FILE id="pIeJPuR" name="jucer_ResourceFile.cpp" compile="1" resource="0"
file="Source/Project/jucer_ResourceFile.cpp"/> file="Source/Project/jucer_ResourceFile.cpp"/>
<FILE id="Bvb3uEg" name="jucer_ResourceFile.h" compile="0" resource="0" <FILE id="Bvb3uEg" name="jucer_ResourceFile.h" compile="0" resource="0"


+ 16
- 25
extras/Introjucer/Source/Project/jucer_NewProjectWizard.cpp View File

@@ -24,14 +24,13 @@
*/ */
#include "jucer_NewProjectWizard.h" #include "jucer_NewProjectWizard.h"
#include "jucer_ProjectType.h"
//============================================================================== //==============================================================================
class GUIAppWizard : public NewProjectWizard class GUIAppWizard : public NewProjectWizard
{ {
public: public:
GUIAppWizard() {} GUIAppWizard() {}
~GUIAppWizard() {}
String getName() { return "GUI Application"; } String getName() { return "GUI Application"; }
String getDescription() { return "Creates a standard application"; } String getDescription() { return "Creates a standard application"; }
@@ -70,11 +69,9 @@ public:
File mainWindowH = mainWindowCpp.withFileExtension (".h"); File mainWindowH = mainWindowCpp.withFileExtension (".h");
String windowClassName = "MainAppWindow"; String windowClassName = "MainAppWindow";
project.getProjectType() = Project::application;
project.getProjectTypeValue() = ProjectType_GUIApp::getTypeName();
Project::Item group (project.createNewGroup());
project.getMainGroup().addChild (group, 0);
group.getName() = "Source";
Project::Item sourceGroup (project.getMainGroup().addNewSubGroup ("Source", 0));
for (int i = project.getNumConfigurations(); --i >= 0;) for (int i = project.getNumConfigurations(); --i >= 0;)
project.getConfiguration(i).getTargetBinaryName() = File::createLegalFileName (appTitle); project.getConfiguration(i).getTargetBinaryName() = File::createLegalFileName (appTitle);
@@ -104,8 +101,8 @@ public:
if (! FileHelpers::overwriteFileWithNewDataIfDifferent (mainWindowCpp, windowCpp)) if (! FileHelpers::overwriteFileWithNewDataIfDifferent (mainWindowCpp, windowCpp))
failedFiles.add (mainWindowCpp.getFullPathName()); failedFiles.add (mainWindowCpp.getFullPathName());
group.addFile (mainWindowCpp, -1);
group.addFile (mainWindowH, -1);
sourceGroup.addFile (mainWindowCpp, -1);
sourceGroup.addFile (mainWindowH, -1);
} }
if (createMainCpp) if (createMainCpp)
@@ -125,7 +122,7 @@ public:
if (! FileHelpers::overwriteFileWithNewDataIfDifferent (mainCppFile, mainCpp)) if (! FileHelpers::overwriteFileWithNewDataIfDifferent (mainCppFile, mainCpp))
failedFiles.add (mainCppFile.getFullPathName()); failedFiles.add (mainCppFile.getFullPathName());
group.addFile (mainCppFile, -1);
sourceGroup.addFile (mainCppFile, -1);
} }
return true; return true;
@@ -140,7 +137,6 @@ class ConsoleAppWizard : public NewProjectWizard
{ {
public: public:
ConsoleAppWizard() {} ConsoleAppWizard() {}
~ConsoleAppWizard() {}
String getName() { return "Console Application"; } String getName() { return "Console Application"; }
String getDescription() { return "Creates a command-line application with no GUI features"; } String getDescription() { return "Creates a command-line application with no GUI features"; }
@@ -174,11 +170,9 @@ public:
File mainCppFile = getSourceFilesFolder().getChildFile ("Main.cpp"); File mainCppFile = getSourceFilesFolder().getChildFile ("Main.cpp");
project.getProjectType() = Project::commandLineApp;
project.getProjectTypeValue() = ProjectType_ConsoleApp::getTypeName();
Project::Item group (project.createNewGroup());
project.getMainGroup().addChild (group, 0);
group.getName() = "Source";
Project::Item sourceGroup (project.getMainGroup().addNewSubGroup ("Source", 0));
for (int i = project.getNumConfigurations(); --i >= 0;) for (int i = project.getNumConfigurations(); --i >= 0;)
project.getConfiguration(i).getTargetBinaryName() = File::createLegalFileName (appTitle); project.getConfiguration(i).getTargetBinaryName() = File::createLegalFileName (appTitle);
@@ -193,7 +187,7 @@ public:
if (! FileHelpers::overwriteFileWithNewDataIfDifferent (mainCppFile, mainCpp)) if (! FileHelpers::overwriteFileWithNewDataIfDifferent (mainCppFile, mainCpp))
failedFiles.add (mainCppFile.getFullPathName()); failedFiles.add (mainCppFile.getFullPathName());
group.addFile (mainCppFile, -1);
sourceGroup.addFile (mainCppFile, -1);
} }
return true; return true;
@@ -208,7 +202,6 @@ class AudioPluginAppWizard : public NewProjectWizard
{ {
public: public:
AudioPluginAppWizard() {} AudioPluginAppWizard() {}
~AudioPluginAppWizard() {}
String getName() { return "Audio Plug-In"; } String getName() { return "Audio Plug-In"; }
String getDescription() { return "Creates an audio plugin project"; } String getDescription() { return "Creates an audio plugin project"; }
@@ -236,11 +229,9 @@ public:
File editorCppFile = getSourceFilesFolder().getChildFile ("PluginEditor.cpp"); File editorCppFile = getSourceFilesFolder().getChildFile ("PluginEditor.cpp");
File editorHFile = editorCppFile.withFileExtension (".h"); File editorHFile = editorCppFile.withFileExtension (".h");
project.getProjectType() = Project::audioPlugin;
project.getProjectTypeValue() = ProjectType_AudioPlugin::getTypeName();
Project::Item group (project.createNewGroup());
project.getMainGroup().addChild (group, 0);
group.getName() = "Source";
Project::Item sourceGroup (project.getMainGroup().addNewSubGroup ("Source", 0));
project.getJuceConfigFlag ("JUCE_QUICKTIME") = Project::configFlagDisabled; // disabled because it interferes with RTAS build on PC project.getJuceConfigFlag ("JUCE_QUICKTIME") = Project::configFlagDisabled; // disabled because it interferes with RTAS build on PC
for (int i = project.getNumConfigurations(); --i >= 0;) for (int i = project.getNumConfigurations(); --i >= 0;)
@@ -284,10 +275,10 @@ public:
if (! FileHelpers::overwriteFileWithNewDataIfDifferent (editorHFile, editorH)) if (! FileHelpers::overwriteFileWithNewDataIfDifferent (editorHFile, editorH))
failedFiles.add (editorHFile.getFullPathName()); failedFiles.add (editorHFile.getFullPathName());
group.addFile (filterCppFile, -1);
group.addFile (filterHFile, -1);
group.addFile (editorCppFile, -1);
group.addFile (editorHFile, -1);
sourceGroup.addFile (filterCppFile, -1);
sourceGroup.addFile (filterHFile, -1);
sourceGroup.addFile (editorCppFile, -1);
sourceGroup.addFile (editorHFile, -1);
return true; return true;
} }
@@ -328,7 +319,7 @@ NewProjectWizard::~NewProjectWizard()
{ {
} }
const StringArray NewProjectWizard::getWizards()
StringArray NewProjectWizard::getWizards()
{ {
StringArray s; StringArray s;


+ 1
- 1
extras/Introjucer/Source/Project/jucer_NewProjectWizard.h View File

@@ -37,7 +37,7 @@ public:
virtual ~NewProjectWizard(); virtual ~NewProjectWizard();
//============================================================================== //==============================================================================
static const StringArray getWizards();
static StringArray getWizards();
static int getNumWizards(); static int getNumWizards();
static NewProjectWizard* createWizard (int index); static NewProjectWizard* createWizard (int index);


+ 63
- 52
extras/Introjucer/Source/Project/jucer_Project.cpp View File

@@ -24,6 +24,7 @@
*/ */
#include "jucer_Project.h" #include "jucer_Project.h"
#include "jucer_ProjectType.h"
#include "jucer_ProjectExporter.h" #include "jucer_ProjectExporter.h"
#include "jucer_ResourceFile.h" #include "jucer_ResourceFile.h"
#include "jucer_ProjectSaver.h" #include "jucer_ProjectSaver.h"
@@ -105,7 +106,7 @@ void Project::setMissingDefaultValues()
setTitle ("Juce Project"); setTitle ("Juce Project");
if (! projectRoot.hasProperty (Ids::projectType)) if (! projectRoot.hasProperty (Ids::projectType))
getProjectType() = application;
getProjectTypeValue() = ProjectType_GUIApp::getTypeName();
if (! projectRoot.hasProperty (Ids::version)) if (! projectRoot.hasProperty (Ids::version))
getVersion() = "1.0.0"; getVersion() = "1.0.0";
@@ -211,7 +212,7 @@ void Project::setLastDocumentOpened (const File& file)
//============================================================================== //==============================================================================
void Project::valueTreePropertyChanged (ValueTree& tree, const Identifier& property) void Project::valueTreePropertyChanged (ValueTree& tree, const Identifier& property)
{ {
if (isLibrary())
if (getProjectType().isLibrary())
getJuceLinkageModeValue() = notLinkedToJuce; getJuceLinkageModeValue() = notLinkedToJuce;
changed(); changed();
@@ -281,18 +282,26 @@ bool Project::shouldBeAddedToBinaryResourcesByDefault (const File& file)
return ! file.hasFileExtension (sourceOrHeaderFileExtensions); return ! file.hasFileExtension (sourceOrHeaderFileExtensions);
} }
bool Project::shouldAddVSTFolderToPath()
{
return (getProjectType().isAudioPlugin()
&& (bool) shouldBuildVST().getValue()) || getJuceConfigFlag ("JUCE_PLUGINHOST_VST").toString() == configFlagEnabled;
}
//============================================================================== //==============================================================================
const char* const Project::application = "guiapp";
const char* const Project::commandLineApp = "consoleapp";
const char* const Project::audioPlugin = "audioplug";
const char* const Project::library = "library";
const char* const Project::browserPlugin = "browserplug";
bool Project::isLibrary() const { return getProjectType().toString() == library; }
bool Project::isGUIApplication() const { return getProjectType().toString() == application; }
bool Project::isCommandLineApp() const { return getProjectType().toString() == commandLineApp; }
bool Project::isAudioPlugin() const { return getProjectType().toString() == audioPlugin; }
bool Project::isBrowserPlugin() const { return getProjectType().toString() == browserPlugin; }
const ProjectType& Project::getProjectType() const
{
const ProjectType* type = ProjectType::findType (getProjectTypeValue().toString());
jassert (type != nullptr);
if (type == nullptr)
{
type = ProjectType::findType (ProjectType_GUIApp::getTypeName());
jassert (type != nullptr);
}
return *type;
}
const char* const Project::notLinkedToJuce = "none"; const char* const Project::notLinkedToJuce = "none";
const char* const Project::useLinkedJuce = "static"; const char* const Project::useLinkedJuce = "static";
@@ -324,9 +333,20 @@ void Project::createPropertyEditors (Array <PropertyComponent*>& props)
props.add (new TextPropertyComponent (getVersion(), "Project Version", 16, false)); props.add (new TextPropertyComponent (getVersion(), "Project Version", 16, false));
props.getLast()->setTooltip ("The project's version number, This should be in the format major.minor.point"); props.getLast()->setTooltip ("The project's version number, This should be in the format major.minor.point");
const char* projectTypes[] = { "Application (GUI)", "Application (Non-GUI)", "Audio Plug-in", "Static Library", 0 };
const char* projectTypeValues[] = { application, commandLineApp, audioPlugin, library, 0 };
props.add (new ChoicePropertyComponent (getProjectType(), "Project Type", StringArray (projectTypes), Array<var> (projectTypeValues)));
{
StringArray projectTypeNames;
Array<var> projectTypeCodes;
const Array<ProjectType*>& types = ProjectType::getAllTypes();
for (int i = 0; i < types.size(); ++i)
{
projectTypeNames.add (types.getUnchecked(i)->getDescription());
projectTypeCodes.add (types.getUnchecked(i)->getType());
}
props.add (new ChoicePropertyComponent (getProjectTypeValue(), "Project Type", projectTypeNames, projectTypeCodes));
}
const char* linkageTypes[] = { "Not linked to Juce", "Linked to Juce Static Library", "Include Juce Amalgamated Files", "Include Juce Source Code Directly (In a single file)", "Include Juce Source Code Directly (Split across several files)", 0 }; const char* linkageTypes[] = { "Not linked to Juce", "Linked to Juce Static Library", "Include Juce Amalgamated Files", "Include Juce Source Code Directly (In a single file)", "Include Juce Source Code Directly (Split across several files)", 0 };
const char* linkageTypeValues[] = { notLinkedToJuce, useLinkedJuce, useAmalgamatedJuce, useAmalgamatedJuceViaSingleTemplate, useAmalgamatedJuceViaMultipleTemplates, 0 }; const char* linkageTypeValues[] = { notLinkedToJuce, useLinkedJuce, useAmalgamatedJuce, useAmalgamatedJuceViaSingleTemplate, useAmalgamatedJuceViaMultipleTemplates, 0 };
@@ -361,7 +381,7 @@ void Project::createPropertyEditors (Array <PropertyComponent*>& props)
props.getLast()->setTooltip ("Sets an icon to use for the executable."); props.getLast()->setTooltip ("Sets an icon to use for the executable.");
} }
if (isAudioPlugin())
if (getProjectType().isAudioPlugin())
{ {
props.add (new BooleanPropertyComponent (shouldBuildVST(), "Build VST", "Enabled")); props.add (new BooleanPropertyComponent (shouldBuildVST(), "Build VST", "Enabled"));
props.getLast()->setTooltip ("Whether the project should produce a VST plugin."); props.getLast()->setTooltip ("Whether the project should produce a VST plugin.");
@@ -371,7 +391,7 @@ void Project::createPropertyEditors (Array <PropertyComponent*>& props)
props.getLast()->setTooltip ("Whether the project should produce an RTAS plugin."); props.getLast()->setTooltip ("Whether the project should produce an RTAS plugin.");
} }
if (isAudioPlugin())
if (getProjectType().isAudioPlugin())
{ {
props.add (new TextPropertyComponent (getPluginName(), "Plugin Name", 128, false)); props.add (new TextPropertyComponent (getPluginName(), "Plugin Name", 128, false));
props.getLast()->setTooltip ("The name of your plugin (keep it short!)"); props.getLast()->setTooltip ("The name of your plugin (keep it short!)");
@@ -497,24 +517,6 @@ Project::Item Project::getMainGroup()
return Item (*this, projectRoot.getChildWithName (Tags::projectMainGroup)); return Item (*this, projectRoot.getChildWithName (Tags::projectMainGroup));
} }
Project::Item Project::createNewGroup()
{
Item item (*this, ValueTree (Tags::group));
item.initialiseNodeValues();
item.getName() = "New Group";
return item;
}
Project::Item Project::createNewItem (const File& file)
{
Item item (*this, ValueTree (Tags::file));
item.initialiseNodeValues();
item.getName() = file.getFileName();
item.getShouldCompileValue() = file.hasFileExtension ("cpp;mm;c;m;cc;cxx");
item.getShouldAddToResourceValue() = shouldBeAddedToBinaryResourcesByDefault (file);
return item;
}
static void findImages (const Project::Item& item, OwnedArray<Project::Item>& found) static void findImages (const Project::Item& item, OwnedArray<Project::Item>& found)
{ {
if (item.isImageFile()) if (item.isImageFile())
@@ -621,7 +623,7 @@ Value Project::Item::getShouldAddToResourceValue() const
File Project::Item::getFile() const File Project::Item::getFile() const
{ {
if (isFile()) if (isFile())
return project->resolveFilename (node [Ids::file].toString());
return getProject().resolveFilename (node [Ids::file].toString());
else else
return File::nonexistent; return File::nonexistent;
} }
@@ -629,7 +631,7 @@ File Project::Item::getFile() const
void Project::Item::setFile (const File& file) void Project::Item::setFile (const File& file)
{ {
jassert (isFile()); jassert (isFile());
node.setProperty (Ids::file, project->getRelativePathForFile (file), getUndoManager());
node.setProperty (Ids::file, getProject().getRelativePathForFile (file), getUndoManager());
node.setProperty (Ids::name, file.getFileName(), getUndoManager()); node.setProperty (Ids::name, file.getFileName(), getUndoManager());
jassert (getFile() == file); jassert (getFile() == file);
@@ -665,7 +667,7 @@ Project::Item Project::Item::findItemForFile (const File& file) const
} }
} }
return Item (*project, ValueTree::invalid);
return Item (getProject(), ValueTree::invalid);
} }
File Project::Item::determineGroupFolder() const File Project::Item::determineGroupFolder() const
@@ -691,7 +693,7 @@ File Project::Item::determineGroupFolder() const
} }
else else
{ {
f = project->getFile().getParentDirectory();
f = getProject().getFile().getParentDirectory();
if (f.getChildFile ("Source").isDirectory()) if (f.getChildFile ("Source").isDirectory())
f = f.getChildFile ("Source"); f = f.getChildFile ("Source");
@@ -736,7 +738,7 @@ Project::Item Project::Item::getParent() const
if (isMainGroup() || ! isGroup()) if (isMainGroup() || ! isGroup())
return *this; return *this;
return Item (*project, node.getParent());
return Item (getProject(), node.getParent());
} }
struct ItemSorter struct ItemSorter
@@ -753,6 +755,17 @@ void Project::Item::sortAlphabetically()
node.sort (sorter, getUndoManager(), true); node.sort (sorter, getUndoManager(), true);
} }
Project::Item Project::Item::addNewSubGroup (const String& name, int insertIndex)
{
Item group (getProject(), ValueTree (Tags::group));
group.initialiseNodeValues();
group.getName() = name;
jassert (canContain (group));
addChild (group, insertIndex);
return group;
}
bool Project::Item::addFile (const File& file, int insertIndex) bool Project::Item::addFile (const File& file, int insertIndex)
{ {
if (file == File::nonexistent || file.isHidden() || file.getFileName().startsWithChar ('.')) if (file == File::nonexistent || file.isHidden() || file.getFileName().startsWithChar ('.'))
@@ -760,18 +773,12 @@ bool Project::Item::addFile (const File& file, int insertIndex)
if (file.isDirectory()) if (file.isDirectory())
{ {
Item group (project->createNewGroup());
group.getName() = file.getFileNameWithoutExtension();
jassert (canContain (group));
addChild (group, insertIndex);
//group.setFile (file);
Item group (addNewSubGroup (file.getFileNameWithoutExtension(), insertIndex));
DirectoryIterator iter (file, false, "*", File::findFilesAndDirectories); DirectoryIterator iter (file, false, "*", File::findFilesAndDirectories);
while (iter.next()) while (iter.next())
{ {
if (! project->getMainGroup().findItemForFile (iter.getFile()).isValid())
if (! getProject().getMainGroup().findItemForFile (iter.getFile()).isValid())
group.addFile (iter.getFile(), -1); group.addFile (iter.getFile(), -1);
} }
@@ -779,9 +786,13 @@ bool Project::Item::addFile (const File& file, int insertIndex)
} }
else if (file.existsAsFile()) else if (file.existsAsFile())
{ {
if (! project->getMainGroup().findItemForFile (file).isValid())
if (! getProject().getMainGroup().findItemForFile (file).isValid())
{ {
Item item (project->createNewItem (file));
Item item (getProject(), ValueTree (Tags::file));
item.initialiseNodeValues();
item.getName() = file.getFileName();
item.getShouldCompileValue() = file.hasFileExtension ("cpp;mm;c;m;cc;cxx");
item.getShouldAddToResourceValue() = getProject().shouldBeAddedToBinaryResourcesByDefault (file);
if (canContain (item)) if (canContain (item))
{ {
@@ -1066,7 +1077,7 @@ StringPairArray Project::BuildConfiguration::getAllPreprocessorDefs() const
parsePreprocessorDefs (getBuildConfigPreprocessorDefs().toString())); parsePreprocessorDefs (getBuildConfigPreprocessorDefs().toString()));
} }
const StringArray Project::BuildConfiguration::getHeaderSearchPaths() const
StringArray Project::BuildConfiguration::getHeaderSearchPaths() const
{ {
StringArray s; StringArray s;
s.addTokens (getHeaderSearchPath().toString(), ";", String::empty); s.addTokens (getHeaderSearchPath().toString(), ";", String::empty);


+ 13
- 23
extras/Introjucer/Source/Project/jucer_Project.h View File

@@ -28,6 +28,7 @@
#include "../jucer_Headers.h" #include "../jucer_Headers.h"
class ProjectExporter; class ProjectExporter;
class ProjectType;
//============================================================================== //==============================================================================
class Project : public FileBasedDocument, class Project : public FileBasedDocument,
@@ -65,19 +66,8 @@ public:
//============================================================================== //==============================================================================
// project types // project types
static const char* const application;
static const char* const commandLineApp;
static const char* const audioPlugin;
static const char* const library;
static const char* const browserPlugin;
Value getProjectType() const { return getProjectValue ("projectType"); }
bool isLibrary() const;
bool isGUIApplication() const;
bool isCommandLineApp() const;
bool isAudioPlugin() const;
bool isBrowserPlugin() const;
const ProjectType& getProjectType() const;
Value getProjectTypeValue() const { return getProjectValue ("projectType"); }
Value getVersion() const { return getProjectValue ("version"); } Value getVersion() const { return getProjectValue ("version"); }
Value getBundleIdentifier() const { return getProjectValue ("bundleIdentifier"); } Value getBundleIdentifier() const { return getProjectValue ("bundleIdentifier"); }
@@ -100,7 +90,7 @@ public:
bool isUsingMultipleTemplateFiles() const { return getJuceLinkageMode() == useAmalgamatedJuceViaMultipleTemplates; } bool isUsingMultipleTemplateFiles() const { return getJuceLinkageMode() == useAmalgamatedJuceViaMultipleTemplates; }
//============================================================================== //==============================================================================
Value getProjectValue (const Identifier& name) const { return projectRoot.getPropertyAsValue (name, getUndoManagerFor (projectRoot)); }
Value getProjectValue (const Identifier& name) const { return projectRoot.getPropertyAsValue (name, getUndoManagerFor (projectRoot)); }
Value getProjectPreprocessorDefs() const { return getProjectValue (Ids::defines); } Value getProjectPreprocessorDefs() const { return getProjectValue (Ids::defines); }
StringPairArray getPreprocessorDefs() const; StringPairArray getPreprocessorDefs() const;
@@ -114,7 +104,7 @@ public:
Value shouldBuildVST() const { return getProjectValue ("buildVST"); } Value shouldBuildVST() const { return getProjectValue ("buildVST"); }
Value shouldBuildRTAS() const { return getProjectValue ("buildRTAS"); } Value shouldBuildRTAS() const { return getProjectValue ("buildRTAS"); }
Value shouldBuildAU() const { return getProjectValue ("buildAU"); } Value shouldBuildAU() const { return getProjectValue ("buildAU"); }
bool shouldAddVSTFolderToPath() { return (isAudioPlugin() && (bool) shouldBuildVST().getValue()) || getJuceConfigFlag ("JUCE_PLUGINHOST_VST").toString() == configFlagEnabled; }
bool shouldAddVSTFolderToPath();
Value getPluginName() const { return getProjectValue ("pluginName"); } Value getPluginName() const { return getProjectValue ("pluginName"); }
Value getPluginDesc() const { return getProjectValue ("pluginDesc"); } Value getPluginDesc() const { return getProjectValue ("pluginDesc"); }
@@ -133,9 +123,9 @@ public:
Value getPluginRTASCategory() const { return getProjectValue ("pluginRTASCategory"); } Value getPluginRTASCategory() const { return getProjectValue ("pluginRTASCategory"); }
//============================================================================== //==============================================================================
File getAppIncludeFile() const { return getWrapperFolder().getChildFile (getJuceSourceHFilename()); }
File getWrapperFolder() const { return getFile().getSiblingFile ("JuceLibraryCode"); }
File getPluginCharacteristicsFile() const { return getWrapperFolder().getChildFile (getPluginCharacteristicsFilename()); }
File getAppIncludeFile() const { return getWrapperFolder().getChildFile (getJuceSourceHFilename()); }
File getWrapperFolder() const { return getFile().getSiblingFile ("JuceLibraryCode"); }
File getPluginCharacteristicsFile() const { return getWrapperFolder().getChildFile (getPluginCharacteristicsFilename()); }
//============================================================================== //==============================================================================
String getAmalgamatedHeaderFileName() const { return "juce_amalgamated.h"; } String getAmalgamatedHeaderFileName() const { return "juce_amalgamated.h"; }
@@ -195,7 +185,9 @@ public:
//============================================================================== //==============================================================================
bool canContain (const Item& child) const; bool canContain (const Item& child) const;
int getNumChildren() const { return node.getNumChildren(); } int getNumChildren() const { return node.getNumChildren(); }
Item getChild (int index) const { return Item (*project, node.getChild (index)); }
Item getChild (int index) const { return Item (getProject(), node.getChild (index)); }
Item addNewSubGroup (const String& name, int insertIndex);
void addChild (const Item& newChild, int insertIndex); void addChild (const Item& newChild, int insertIndex);
bool addFile (const File& file, int insertIndex); bool addFile (const File& file, int insertIndex);
void removeItemFromProject(); void removeItemFromProject();
@@ -211,12 +203,10 @@ public:
Project* project; Project* project;
ValueTree node; ValueTree node;
UndoManager* getUndoManager() const { return project->getUndoManagerFor (node); }
UndoManager* getUndoManager() const { return getProject().getUndoManagerFor (node); }
}; };
Item getMainGroup(); Item getMainGroup();
Item createNewGroup();
Item createNewItem (const File& file);
void findAllImageItems (OwnedArray<Item>& items); void findAllImageItems (OwnedArray<Item>& items);
@@ -244,7 +234,7 @@ public:
Value getBuildConfigPreprocessorDefs() const { return getValue (Ids::defines); } Value getBuildConfigPreprocessorDefs() const { return getValue (Ids::defines); }
StringPairArray getAllPreprocessorDefs() const; // includes inherited definitions StringPairArray getAllPreprocessorDefs() const; // includes inherited definitions
Value getHeaderSearchPath() const { return getValue (Ids::headerPath); } Value getHeaderSearchPath() const { return getValue (Ids::headerPath); }
const StringArray getHeaderSearchPaths() const;
StringArray getHeaderSearchPaths() const;
static const char* const osxVersionDefault; static const char* const osxVersionDefault;
static const char* const osxVersion10_4; static const char* const osxVersion10_4;


+ 1
- 1
extras/Introjucer/Source/Project/jucer_ProjectExport_Android.h View File

@@ -74,7 +74,7 @@ public:
#endif #endif
} }
bool isPossibleForCurrentProject() { return project.isGUIApplication(); }
bool isPossibleForCurrentProject() { return project.getProjectType().isGUIApplication(); }
bool usesMMFiles() const { return false; } bool usesMMFiles() const { return false; }
void launchProject() void launchProject()


+ 28
- 28
extras/Introjucer/Source/Project/jucer_ProjectExport_MSVC.h View File

@@ -60,7 +60,7 @@ public:
{ {
ProjectExporter::createPropertyEditors (props); ProjectExporter::createPropertyEditors (props);
if (project.isLibrary())
if (project.getProjectType().isLibrary())
{ {
const char* const libTypes[] = { "Static Library (.lib)", "Dynamic Library (.dll)", 0 }; const char* const libTypes[] = { "Static Library (.lib)", "Dynamic Library (.dll)", 0 };
const int libTypeValues[] = { 1, 2, 0 }; const int libTypeValues[] = { 1, 2, 0 };
@@ -82,7 +82,7 @@ protected:
File getProjectFile (const String& extension) const { return getTargetFolder().getChildFile (project.getProjectFilenameRoot()).withFileExtension (extension); } File getProjectFile (const String& extension) const { return getTargetFolder().getChildFile (project.getProjectFilenameRoot()).withFileExtension (extension); }
Value getLibraryType() const { return getSetting (Ids::libraryType); } Value getLibraryType() const { return getSetting (Ids::libraryType); }
bool isLibraryDLL() const { return project.isLibrary() && getLibraryType() == 2; }
bool isLibraryDLL() const { return project.getProjectType().isLibrary() && getLibraryType() == 2; }
//============================================================================== //==============================================================================
const Array<RelativePath> getRTASFilesRequired() const const Array<RelativePath> getRTASFilesRequired() const
@@ -123,11 +123,11 @@ protected:
String getTargetBinarySuffix() const String getTargetBinarySuffix() const
{ {
if (project.isLibrary())
if (project.getProjectType().isLibrary())
return ".lib"; return ".lib";
else if (isRTAS()) else if (isRTAS())
return ".dpm"; return ".dpm";
else if (project.isAudioPlugin() || project.isBrowserPlugin())
else if (project.getProjectType().isAudioPlugin() || project.getProjectType().isBrowserPlugin())
return ".dll"; return ".dll";
return ".exe"; return ".exe";
@@ -149,10 +149,10 @@ protected:
defines.set ("NDEBUG", ""); defines.set ("NDEBUG", "");
} }
if (project.isCommandLineApp())
if (project.getProjectType().isCommandLineApp())
defines.set ("_CONSOLE", ""); defines.set ("_CONSOLE", "");
if (project.isLibrary())
if (project.getProjectType().isLibrary())
defines.set ("_LIB", ""); defines.set ("_LIB", "");
if (isRTAS()) if (isRTAS())
@@ -179,14 +179,14 @@ protected:
return result.joinIntoString (joinString); return result.joinIntoString (joinString);
} }
const StringArray getHeaderSearchPaths (const Project::BuildConfiguration& config) const
StringArray getHeaderSearchPaths (const Project::BuildConfiguration& config) const
{ {
StringArray searchPaths (config.getHeaderSearchPaths()); StringArray searchPaths (config.getHeaderSearchPaths());
if (project.shouldAddVSTFolderToPath() && getVSTFolder().toString().isNotEmpty()) if (project.shouldAddVSTFolderToPath() && getVSTFolder().toString().isNotEmpty())
searchPaths.add (rebaseFromProjectFolderToBuildTarget (RelativePath (getVSTFolder().toString(), RelativePath::projectFolder)).toWindowsStyle()); searchPaths.add (rebaseFromProjectFolderToBuildTarget (RelativePath (getVSTFolder().toString(), RelativePath::projectFolder)).toWindowsStyle());
if (project.isAudioPlugin())
if (project.getProjectType().isAudioPlugin())
searchPaths.add (juceWrapperFolder.toWindowsStyle()); searchPaths.add (juceWrapperFolder.toWindowsStyle());
if (isRTAS()) if (isRTAS())
@@ -599,8 +599,8 @@ protected:
xml.setAttribute ("Name", createConfigName (config)); xml.setAttribute ("Name", createConfigName (config));
xml.setAttribute ("OutputDirectory", FileHelpers::windowsStylePath (binariesPath)); xml.setAttribute ("OutputDirectory", FileHelpers::windowsStylePath (binariesPath));
xml.setAttribute ("IntermediateDirectory", FileHelpers::windowsStylePath (intermediatesPath)); xml.setAttribute ("IntermediateDirectory", FileHelpers::windowsStylePath (intermediatesPath));
xml.setAttribute ("ConfigurationType", (project.isAudioPlugin() || project.isBrowserPlugin() || isLibraryDLL())
? "2" : (project.isLibrary() ? "4" : "1"));
xml.setAttribute ("ConfigurationType", (project.getProjectType().isAudioPlugin() || project.getProjectType().isBrowserPlugin() || isLibraryDLL())
? "2" : (project.getProjectType().isLibrary() ? "4" : "1"));
xml.setAttribute ("UseOfMFC", "0"); xml.setAttribute ("UseOfMFC", "0");
xml.setAttribute ("ATLMinimizesCRunTimeLibraryUsage", "false"); xml.setAttribute ("ATLMinimizesCRunTimeLibraryUsage", "false");
xml.setAttribute ("CharacterSet", "2"); xml.setAttribute ("CharacterSet", "2");
@@ -623,7 +623,7 @@ protected:
createToolElement (xml, "VCXMLDataGeneratorTool"); createToolElement (xml, "VCXMLDataGeneratorTool");
createToolElement (xml, "VCWebServiceProxyGeneratorTool"); createToolElement (xml, "VCWebServiceProxyGeneratorTool");
if (! project.isLibrary())
if (! project.getProjectType().isLibrary())
{ {
XmlElement* midl = createToolElement (xml, "VCMIDLTool"); XmlElement* midl = createToolElement (xml, "VCMIDLTool");
midl->setAttribute ("PreprocessorDefinitions", isDebug ? "_DEBUG" : "NDEBUG"); midl->setAttribute ("PreprocessorDefinitions", isDebug ? "_DEBUG" : "NDEBUG");
@@ -643,7 +643,7 @@ protected:
if (isDebug) if (isDebug)
{ {
compiler->setAttribute ("BufferSecurityCheck", ""); compiler->setAttribute ("BufferSecurityCheck", "");
compiler->setAttribute ("DebugInformationFormat", project.isLibrary() ? "3" : "4");
compiler->setAttribute ("DebugInformationFormat", project.getProjectType().isLibrary() ? "3" : "4");
} }
else else
{ {
@@ -680,7 +680,7 @@ protected:
const String outputFileName (getBinaryFileForConfig (config)); const String outputFileName (getBinaryFileForConfig (config));
if (! project.isLibrary())
if (! project.getProjectType().isLibrary())
{ {
XmlElement* linker = createToolElement (xml, "VCLinkerTool"); XmlElement* linker = createToolElement (xml, "VCLinkerTool");
@@ -693,7 +693,7 @@ protected:
linker->setAttribute ("IgnoreDefaultLibraryNames", isDebug ? "libcmt.lib, msvcrt.lib" : ""); linker->setAttribute ("IgnoreDefaultLibraryNames", isDebug ? "libcmt.lib, msvcrt.lib" : "");
linker->setAttribute ("GenerateDebugInformation", isDebug ? "true" : "false"); linker->setAttribute ("GenerateDebugInformation", isDebug ? "true" : "false");
linker->setAttribute ("ProgramDatabaseFile", FileHelpers::windowsStylePath (intermediatesPath + "/" + binaryName + ".pdb")); linker->setAttribute ("ProgramDatabaseFile", FileHelpers::windowsStylePath (intermediatesPath + "/" + binaryName + ".pdb"));
linker->setAttribute ("SubSystem", project.isCommandLineApp() ? "1" : "2");
linker->setAttribute ("SubSystem", project.getProjectType().isCommandLineApp() ? "1" : "2");
if (! isDebug) if (! isDebug)
{ {
@@ -752,7 +752,7 @@ protected:
createToolElement (xml, "VCFxCopTool"); createToolElement (xml, "VCFxCopTool");
if (! project.isLibrary())
if (! project.getProjectType().isLibrary())
createToolElement (xml, "VCAppVerifierTool"); createToolElement (xml, "VCAppVerifierTool");
createToolElement (xml, "VCPostBuildEventTool"); createToolElement (xml, "VCPostBuildEventTool");
@@ -873,13 +873,13 @@ private:
{ {
const String defaultConfigName (createConfigName (project.getConfiguration (0))); const String defaultConfigName (createConfigName (project.getConfiguration (0)));
const bool isDLL = project.isAudioPlugin() || project.isBrowserPlugin();
const bool isDLL = project.getProjectType().isAudioPlugin() || project.getProjectType().isBrowserPlugin();
String targetType, targetCode; String targetType, targetCode;
if (isDLL) { targetType = "\"Win32 (x86) Dynamic-Link Library\""; targetCode = "0x0102"; }
else if (project.isLibrary()) { targetType = "\"Win32 (x86) Static Library\""; targetCode = "0x0104"; }
else if (project.isCommandLineApp()) { targetType = "\"Win32 (x86) Console Application\""; targetCode = "0x0103"; }
else { targetType = "\"Win32 (x86) Application\""; targetCode = "0x0101"; }
if (isDLL) { targetType = "\"Win32 (x86) Dynamic-Link Library\""; targetCode = "0x0102"; }
else if (project.getProjectType().isLibrary()) { targetType = "\"Win32 (x86) Static Library\""; targetCode = "0x0104"; }
else if (project.getProjectType().isCommandLineApp()) { targetType = "\"Win32 (x86) Console Application\""; targetCode = "0x0103"; }
else { targetType = "\"Win32 (x86) Application\""; targetCode = "0x0101"; }
out << "# Microsoft Developer Studio Project File - Name=\"" << project.getProjectName() out << "# Microsoft Developer Studio Project File - Name=\"" << project.getProjectName()
<< "\" - Package Owner=<4>" << newLine << "\" - Package Owner=<4>" << newLine
@@ -950,7 +950,7 @@ private:
if (! isDebug) if (! isDebug)
out << "# SUBTRACT CPP /YX" << newLine; out << "# SUBTRACT CPP /YX" << newLine;
if (! project.isLibrary())
if (! project.getProjectType().isLibrary())
out << "# ADD BASE MTL /nologo /D " << defines << " /mktyplib203 /win32" << newLine out << "# ADD BASE MTL /nologo /D " << defines << " /mktyplib203 /win32" << newLine
<< "# ADD MTL /nologo /D " << defines << " /mktyplib203 /win32" << newLine; << "# ADD MTL /nologo /D " << defines << " /mktyplib203 /win32" << newLine;
@@ -960,7 +960,7 @@ private:
<< "# ADD BASE BSC32 /nologo" << newLine << "# ADD BASE BSC32 /nologo" << newLine
<< "# ADD BSC32 /nologo" << newLine; << "# ADD BSC32 /nologo" << newLine;
if (project.isLibrary())
if (project.getProjectType().isLibrary())
{ {
out << "LIB32=link.exe -lib" << newLine out << "LIB32=link.exe -lib" << newLine
<< "# ADD BASE LIB32 /nologo" << newLine << "# ADD BASE LIB32 /nologo" << newLine
@@ -974,8 +974,8 @@ private:
<< "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib " << "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib "
<< (isDebug ? " /debug" : "") << (isDebug ? " /debug" : "")
<< " /nologo /machine:I386 /out:\"" << targetBinary << "\" " << " /nologo /machine:I386 /out:\"" << targetBinary << "\" "
<< (isDLL ? "/dll" : (project.isCommandLineApp() ? "/subsystem:console "
: "/subsystem:windows "))
<< (isDLL ? "/dll" : (project.getProjectType().isCommandLineApp() ? "/subsystem:console "
: "/subsystem:windows "))
<< replacePreprocessorTokens (config, getExtraLinkerFlags().toString()).trim() << newLine; << replacePreprocessorTokens (config, getExtraLinkerFlags().toString()).trim() << newLine;
} }
} }
@@ -1309,7 +1309,7 @@ protected:
: "%(IgnoreSpecificDefaultLibraries)"); : "%(IgnoreSpecificDefaultLibraries)");
link->createNewChildElement ("GenerateDebugInformation")->addTextElement (isDebug ? "true" : "false"); link->createNewChildElement ("GenerateDebugInformation")->addTextElement (isDebug ? "true" : "false");
link->createNewChildElement ("ProgramDatabaseFile")->addTextElement (FileHelpers::windowsStylePath (intermediatesPath + "/" + binaryName + ".pdb")); link->createNewChildElement ("ProgramDatabaseFile")->addTextElement (FileHelpers::windowsStylePath (intermediatesPath + "/" + binaryName + ".pdb"));
link->createNewChildElement ("SubSystem")->addTextElement (project.isCommandLineApp() ? "Console" : "Windows");
link->createNewChildElement ("SubSystem")->addTextElement (project.getProjectType().isCommandLineApp() ? "Console" : "Windows");
link->createNewChildElement ("TargetMachine")->addTextElement ("MachineX86"); link->createNewChildElement ("TargetMachine")->addTextElement ("MachineX86");
if (! isDebug) if (! isDebug)
@@ -1369,9 +1369,9 @@ protected:
String getProjectType() const String getProjectType() const
{ {
if (project.isGUIApplication() || project.isCommandLineApp()) return "Application";
else if (project.isAudioPlugin() || project.isBrowserPlugin()) return "DynamicLibrary";
else if (project.isLibrary()) return "StaticLibrary";
if (project.getProjectType().isGUIApplication() || project.getProjectType().isCommandLineApp()) return "Application";
else if (project.getProjectType().isAudioPlugin() || project.getProjectType().isBrowserPlugin()) return "DynamicLibrary";
else if (project.getProjectType().isLibrary()) return "StaticLibrary";
jassertfalse; jassertfalse;
return String::empty; return String::empty;


+ 5
- 5
extras/Introjucer/Source/Project/jucer_ProjectExport_Make.h View File

@@ -164,7 +164,7 @@ private:
{ {
out << " LDFLAGS += -L$(BINDIR) -L$(LIBDIR)"; out << " LDFLAGS += -L$(BINDIR) -L$(LIBDIR)";
if (project.isAudioPlugin())
if (project.getProjectType().isAudioPlugin())
out << " -shared"; out << " -shared";
{ {
@@ -214,7 +214,7 @@ private:
if (config.isDebug().getValue()) if (config.isDebug().getValue())
out << " -g -ggdb"; out << " -g -ggdb";
if (project.isAudioPlugin())
if (project.getProjectType().isAudioPlugin())
out << " -fPIC"; out << " -fPIC";
out << " -O" << config.getGCCOptimisationFlag() << newLine; out << " -O" << config.getGCCOptimisationFlag() << newLine;
@@ -231,14 +231,14 @@ private:
String targetName (config.getTargetBinaryName().getValue().toString()); String targetName (config.getTargetBinaryName().getValue().toString());
if (project.isLibrary())
if (project.getProjectType().isLibrary())
targetName = getLibbedFilename (targetName); targetName = getLibbedFilename (targetName);
else if (isVST()) else if (isVST())
targetName = targetName.upToLastOccurrenceOf (".", false, false) + ".so"; targetName = targetName.upToLastOccurrenceOf (".", false, false) + ".so";
out << " TARGET := " << escapeSpaces (targetName) << newLine; out << " TARGET := " << escapeSpaces (targetName) << newLine;
if (project.isLibrary())
if (project.getProjectType().isLibrary())
out << " BLDCMD = ar -rcs $(OUTDIR)/$(TARGET) $(OBJECTS) $(TARGET_ARCH)" << newLine; out << " BLDCMD = ar -rcs $(OUTDIR)/$(TARGET) $(OBJECTS) $(TARGET_ARCH)" << newLine;
else else
out << " BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH)" << newLine; out << " BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH)" << newLine;
@@ -268,7 +268,7 @@ private:
<< "endif" << newLine << "endif" << newLine
<< newLine; << newLine;
if (! project.isLibrary())
if (! project.getProjectType().isLibrary())
out << "ifeq ($(TARGET_ARCH),)" << newLine out << "ifeq ($(TARGET_ARCH),)" << newLine
<< " TARGET_ARCH := -march=native" << newLine << " TARGET_ARCH := -march=native" << newLine
<< "endif" << newLine << newLine; << "endif" << newLine << newLine;


+ 28
- 28
extras/Introjucer/Source/Project/jucer_ProjectExport_XCode.h View File

@@ -91,7 +91,7 @@ public:
#endif #endif
} }
bool isPossibleForCurrentProject() { return project.isGUIApplication() || ! iPhone; }
bool isPossibleForCurrentProject() { return project.getProjectType().isGUIApplication() || ! iPhone; }
bool usesMMFiles() const { return true; } bool usesMMFiles() const { return true; }
void createPropertyEditors (Array <PropertyComponent*>& props) void createPropertyEditors (Array <PropertyComponent*>& props)
@@ -102,7 +102,7 @@ public:
props.getLast()->setTooltip ("Because objective-C linkage is done by string-matching, you can get horrible linkage mix-ups when different modules containing the " props.getLast()->setTooltip ("Because objective-C linkage is done by string-matching, you can get horrible linkage mix-ups when different modules containing the "
"same class-names are loaded simultaneously. This setting lets you provide a unique string that will be used in naming the obj-C classes in your executable to avoid this."); "same class-names are loaded simultaneously. This setting lets you provide a unique string that will be used in naming the obj-C classes in your executable to avoid this.");
if (project.isGUIApplication() && ! iPhone)
if (project.getProjectType().isGUIApplication() && ! iPhone)
{ {
props.add (new TextPropertyComponent (getSetting ("documentExtensions"), "Document file extensions", 128, false)); props.add (new TextPropertyComponent (getSetting ("documentExtensions"), "Document file extensions", 128, false));
props.getLast()->setTooltip ("A comma-separated list of file extensions for documents that your app can open."); props.getLast()->setTooltip ("A comma-separated list of file extensions for documents that your app can open.");
@@ -163,22 +163,22 @@ private:
File getProjectBundle() const { return getTargetFolder().getChildFile (project.getProjectFilenameRoot()).withFileExtension (".xcodeproj"); } File getProjectBundle() const { return getTargetFolder().getChildFile (project.getProjectFilenameRoot()).withFileExtension (".xcodeproj"); }
bool hasPList() const { return ! (project.isLibrary() || project.isCommandLineApp()); }
bool hasPList() const { return ! (project.getProjectType().isLibrary() || project.getProjectType().isCommandLineApp()); }
String getAudioPluginBundleExtension() const { return "component"; } String getAudioPluginBundleExtension() const { return "component"; }
//============================================================================== //==============================================================================
void createObjects() void createObjects()
{ {
if (! project.isLibrary())
if (! project.getProjectType().isLibrary())
addFrameworks(); addFrameworks();
const String productName (project.getConfiguration (0).getTargetBinaryName().toString()); const String productName (project.getConfiguration (0).getTargetBinaryName().toString());
if (project.isGUIApplication()) addBuildProduct ("wrapper.application", productName + ".app");
else if (project.isCommandLineApp()) addBuildProduct ("compiled.mach-o.executable", productName);
else if (project.isLibrary()) addBuildProduct ("archive.ar", getLibbedFilename (productName));
else if (project.isAudioPlugin()) addBuildProduct ("wrapper.cfbundle", productName + "." + getAudioPluginBundleExtension());
else if (project.isBrowserPlugin()) addBuildProduct ("wrapper.cfbundle", productName + ".plugin");
if (project.getProjectType().isGUIApplication()) addBuildProduct ("wrapper.application", productName + ".app");
else if (project.getProjectType().isCommandLineApp()) addBuildProduct ("compiled.mach-o.executable", productName);
else if (project.getProjectType().isLibrary()) addBuildProduct ("archive.ar", getLibbedFilename (productName));
else if (project.getProjectType().isAudioPlugin()) addBuildProduct ("wrapper.cfbundle", productName + "." + getAudioPluginBundleExtension());
else if (project.getProjectType().isBrowserPlugin()) addBuildProduct ("wrapper.cfbundle", productName + ".plugin");
else jassert (productName.isEmpty()); else jassert (productName.isEmpty());
if (hasPList()) if (hasPList())
@@ -209,7 +209,7 @@ private:
addConfigList (projectConfigs, createID ("__projList")); addConfigList (projectConfigs, createID ("__projList"));
addConfigList (targetConfigs, createID ("__configList")); addConfigList (targetConfigs, createID ("__configList"));
if (! project.isLibrary())
if (! project.getProjectType().isLibrary())
addBuildPhase ("PBXResourcesBuildPhase", resourceIDs); addBuildPhase ("PBXResourcesBuildPhase", resourceIDs);
if (rezFileIDs.size() > 0) if (rezFileIDs.size() > 0)
@@ -217,10 +217,10 @@ private:
addBuildPhase ("PBXSourcesBuildPhase", sourceIDs); addBuildPhase ("PBXSourcesBuildPhase", sourceIDs);
if (! project.isLibrary())
if (! project.getProjectType().isLibrary())
addBuildPhase ("PBXFrameworksBuildPhase", frameworkIDs); addBuildPhase ("PBXFrameworksBuildPhase", frameworkIDs);
if (project.isAudioPlugin())
if (project.getProjectType().isAudioPlugin())
addPluginShellScriptPhase(); addPluginShellScriptPhase();
addTargetObject(); addTargetObject();
@@ -346,7 +346,7 @@ private:
addPlistDictionaryKey (dict, "CFBundleIdentifier", project.getBundleIdentifier().toString()); addPlistDictionaryKey (dict, "CFBundleIdentifier", project.getBundleIdentifier().toString());
addPlistDictionaryKey (dict, "CFBundleName", project.getProjectName().toString()); addPlistDictionaryKey (dict, "CFBundleName", project.getProjectName().toString());
if (project.isAudioPlugin())
if (project.getProjectType().isAudioPlugin())
{ {
addPlistDictionaryKey (dict, "CFBundlePackageType", "TDMw"); addPlistDictionaryKey (dict, "CFBundlePackageType", "TDMw");
addPlistDictionaryKey (dict, "CFBundleSignature", "PTul"); addPlistDictionaryKey (dict, "CFBundleSignature", "PTul");
@@ -397,14 +397,14 @@ private:
overwriteFileIfDifferentOrThrow (infoPlistFile, mo); overwriteFileIfDifferentOrThrow (infoPlistFile, mo);
} }
const StringArray getHeaderSearchPaths (const Project::BuildConfiguration& config)
StringArray getHeaderSearchPaths (const Project::BuildConfiguration& config)
{ {
StringArray searchPaths (config.getHeaderSearchPaths()); StringArray searchPaths (config.getHeaderSearchPaths());
if (project.shouldAddVSTFolderToPath() && getVSTFolder().toString().isNotEmpty()) if (project.shouldAddVSTFolderToPath() && getVSTFolder().toString().isNotEmpty())
searchPaths.add (rebaseFromProjectFolderToBuildTarget (RelativePath (getVSTFolder().toString(), RelativePath::projectFolder)).toUnixStyle()); searchPaths.add (rebaseFromProjectFolderToBuildTarget (RelativePath (getVSTFolder().toString(), RelativePath::projectFolder)).toUnixStyle());
if (project.isAudioPlugin())
if (project.getProjectType().isAudioPlugin())
{ {
if (isAU()) if (isAU())
{ {
@@ -471,7 +471,7 @@ private:
void getLinkerFlags (const Project::BuildConfiguration& config, StringArray& flags, StringArray& librarySearchPaths) void getLinkerFlags (const Project::BuildConfiguration& config, StringArray& flags, StringArray& librarySearchPaths)
{ {
if (project.isAudioPlugin())
if (project.getProjectType().isAudioPlugin())
{ {
flags.add ("-bundle"); flags.add ("-bundle");
@@ -495,7 +495,7 @@ private:
flags.removeEmptyStrings (true); flags.removeEmptyStrings (true);
} }
const StringArray getProjectSettings (const Project::BuildConfiguration& config)
StringArray getProjectSettings (const Project::BuildConfiguration& config)
{ {
StringArray s; StringArray s;
s.add ("ALWAYS_SEARCH_USER_PATHS = NO"); s.add ("ALWAYS_SEARCH_USER_PATHS = NO");
@@ -509,7 +509,7 @@ private:
s.add ("WARNING_CFLAGS = -Wreorder"); s.add ("WARNING_CFLAGS = -Wreorder");
s.add ("GCC_MODEL_TUNING = G5"); s.add ("GCC_MODEL_TUNING = G5");
if (project.isLibrary() || project.getJuceLinkageMode() == Project::useLinkedJuce)
if (project.getProjectType().isLibrary() || project.getJuceLinkageMode() == Project::useLinkedJuce)
{ {
s.add ("GCC_INLINES_ARE_PRIVATE_EXTERN = NO"); s.add ("GCC_INLINES_ARE_PRIVATE_EXTERN = NO");
s.add ("GCC_SYMBOLS_PRIVATE_EXTERN = NO"); s.add ("GCC_SYMBOLS_PRIVATE_EXTERN = NO");
@@ -535,7 +535,7 @@ private:
return s; return s;
} }
const StringArray getTargetSettings (const Project::BuildConfiguration& config)
StringArray getTargetSettings (const Project::BuildConfiguration& config)
{ {
StringArray s; StringArray s;
@@ -554,11 +554,11 @@ private:
if (extraFlags.isNotEmpty()) if (extraFlags.isNotEmpty())
s.add ("OTHER_CPLUSPLUSFLAGS = " + extraFlags); s.add ("OTHER_CPLUSPLUSFLAGS = " + extraFlags);
if (project.isGUIApplication())
if (project.getProjectType().isGUIApplication())
{ {
s.add ("INSTALL_PATH = \"$(HOME)/Applications\""); s.add ("INSTALL_PATH = \"$(HOME)/Applications\"");
} }
else if (project.isAudioPlugin())
else if (project.getProjectType().isAudioPlugin())
{ {
s.add ("LIBRARY_STYLE = Bundle"); s.add ("LIBRARY_STYLE = Bundle");
s.add ("INSTALL_PATH = \"$(HOME)/Library/Audio/Plug-Ins/Components/\""); s.add ("INSTALL_PATH = \"$(HOME)/Library/Audio/Plug-Ins/Components/\"");
@@ -568,12 +568,12 @@ private:
" -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers" " -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers"
" -I \\\"$(DEVELOPER_DIR)/Extras/CoreAudio/AudioUnits/AUPublic/AUBase\\\"\""); " -I \\\"$(DEVELOPER_DIR)/Extras/CoreAudio/AudioUnits/AUPublic/AUBase\\\"\"");
} }
else if (project.isBrowserPlugin())
else if (project.getProjectType().isBrowserPlugin())
{ {
s.add ("LIBRARY_STYLE = Bundle"); s.add ("LIBRARY_STYLE = Bundle");
s.add ("INSTALL_PATH = \"/Library/Internet Plug-Ins/\""); s.add ("INSTALL_PATH = \"/Library/Internet Plug-Ins/\"");
} }
else if (project.isLibrary())
else if (project.getProjectType().isLibrary())
{ {
if (config.getTargetBinaryRelativePath().toString().isNotEmpty()) if (config.getTargetBinaryRelativePath().toString().isNotEmpty())
{ {
@@ -587,7 +587,7 @@ private:
s.add ("CONFIGURATION_BUILD_DIR = \"$(BUILD_DIR)\""); s.add ("CONFIGURATION_BUILD_DIR = \"$(BUILD_DIR)\"");
s.add ("DEPLOYMENT_LOCATION = YES"); s.add ("DEPLOYMENT_LOCATION = YES");
} }
else if (project.isCommandLineApp())
else if (project.getProjectType().isCommandLineApp())
{ {
} }
else else
@@ -1016,22 +1016,22 @@ private:
v->setProperty ("productName", project.getDocumentTitle(), 0); v->setProperty ("productName", project.getDocumentTitle(), 0);
v->setProperty ("productReference", createID ("__productFileID"), 0); v->setProperty ("productReference", createID ("__productFileID"), 0);
if (project.isGUIApplication())
if (project.getProjectType().isGUIApplication())
{ {
v->setProperty ("productInstallPath", "$(HOME)/Applications", 0); v->setProperty ("productInstallPath", "$(HOME)/Applications", 0);
v->setProperty ("productType", "com.apple.product-type.application", 0); v->setProperty ("productType", "com.apple.product-type.application", 0);
} }
else if (project.isCommandLineApp())
else if (project.getProjectType().isCommandLineApp())
{ {
v->setProperty ("productInstallPath", "/usr/bin", 0); v->setProperty ("productInstallPath", "/usr/bin", 0);
v->setProperty ("productType", "com.apple.product-type.tool", 0); v->setProperty ("productType", "com.apple.product-type.tool", 0);
} }
else if (project.isAudioPlugin() || project.isBrowserPlugin())
else if (project.getProjectType().isAudioPlugin() || project.getProjectType().isBrowserPlugin())
{ {
v->setProperty ("productInstallPath", "$(HOME)/Library/Audio/Plug-Ins/Components/", 0); v->setProperty ("productInstallPath", "$(HOME)/Library/Audio/Plug-Ins/Components/", 0);
v->setProperty ("productType", "com.apple.product-type.bundle", 0); v->setProperty ("productType", "com.apple.product-type.bundle", 0);
} }
else if (project.isLibrary())
else if (project.getProjectType().isLibrary())
{ {
v->setProperty ("productType", "com.apple.product-type.library.static", 0); v->setProperty ("productType", "com.apple.product-type.library.static", 0);
} }


+ 4
- 4
extras/Introjucer/Source/Project/jucer_ProjectExporter.cpp View File

@@ -46,7 +46,7 @@ int ProjectExporter::getNumExporters()
return 6; return 6;
} }
const StringArray ProjectExporter::getExporterNames()
StringArray ProjectExporter::getExporterNames()
{ {
StringArray s; StringArray s;
s.add (XCodeProjectExporter::getNameMac()); s.add (XCodeProjectExporter::getNameMac());
@@ -150,12 +150,12 @@ String ProjectExporter::getIncludePathForFileInJuceFolder (const String& pathFro
} }
} }
const RelativePath ProjectExporter::getJucePathFromTargetFolder() const
RelativePath ProjectExporter::getJucePathFromTargetFolder() const
{ {
return rebaseFromProjectFolderToBuildTarget (RelativePath (getJuceFolder().toString(), RelativePath::projectFolder)); return rebaseFromProjectFolderToBuildTarget (RelativePath (getJuceFolder().toString(), RelativePath::projectFolder));
} }
const RelativePath ProjectExporter::rebaseFromProjectFolderToBuildTarget (const RelativePath& path) const
RelativePath ProjectExporter::rebaseFromProjectFolderToBuildTarget (const RelativePath& path) const
{ {
return path.rebased (project.getFile().getParentDirectory(), getTargetFolder(), RelativePath::buildTargetFolder); return path.rebased (project.getFile().getParentDirectory(), getTargetFolder(), RelativePath::buildTargetFolder);
} }
@@ -173,7 +173,7 @@ void ProjectExporter::createPropertyEditors (Array <PropertyComponent*>& props)
props.add (new TextPropertyComponent (getJuceFolder(), "Juce Location", 1024, false)); props.add (new TextPropertyComponent (getJuceFolder(), "Juce Location", 1024, false));
props.getLast()->setTooltip ("The location of the Juce library folder that the " + name + " project will use to when compiling. This can be an absolute path, or relative to the jucer project folder, but it must be valid on the filesystem of the machine you use to actually do the compiling."); props.getLast()->setTooltip ("The location of the Juce library folder that the " + name + " project will use to when compiling. This can be an absolute path, or relative to the jucer project folder, but it must be valid on the filesystem of the machine you use to actually do the compiling.");
if (project.isAudioPlugin())
if (project.getProjectType().isAudioPlugin())
{ {
if (project.shouldAddVSTFolderToPath()) if (project.shouldAddVSTFolderToPath())
{ {


+ 7
- 6
extras/Introjucer/Source/Project/jucer_ProjectExporter.h View File

@@ -28,6 +28,7 @@
#include "../jucer_Headers.h" #include "../jucer_Headers.h"
#include "jucer_Project.h" #include "jucer_Project.h"
#include "jucer_ProjectType.h"
//============================================================================== //==============================================================================
@@ -41,7 +42,7 @@ public:
virtual ~ProjectExporter(); virtual ~ProjectExporter();
static int getNumExporters(); static int getNumExporters();
static const StringArray getExporterNames();
static StringArray getExporterNames();
static ProjectExporter* createNewExporter (Project& project, const int index); static ProjectExporter* createNewExporter (Project& project, const int index);
static ProjectExporter* createExporter (Project& project, const ValueTree& settings); static ProjectExporter* createExporter (Project& project, const ValueTree& settings);
@@ -71,9 +72,9 @@ public:
Value getRTASFolder() const { return getSetting (Ids::rtasFolder); } Value getRTASFolder() const { return getSetting (Ids::rtasFolder); }
Value getAUFolder() const { return getSetting (Ids::auFolder); } Value getAUFolder() const { return getSetting (Ids::auFolder); }
bool isVST() const { return (bool) project.isAudioPlugin() && (bool) project.shouldBuildVST().getValue(); }
bool isRTAS() const { return (bool) project.isAudioPlugin() && (bool) project.shouldBuildRTAS().getValue(); }
bool isAU() const { return (bool) project.isAudioPlugin() && (bool) project.shouldBuildAU().getValue(); }
bool isVST() const { return (bool) project.getProjectType().isAudioPlugin() && (bool) project.shouldBuildVST().getValue(); }
bool isRTAS() const { return (bool) project.getProjectType().isAudioPlugin() && (bool) project.shouldBuildRTAS().getValue(); }
bool isAU() const { return (bool) project.getProjectType().isAudioPlugin() && (bool) project.shouldBuildAU().getValue(); }
Value getExtraCompilerFlags() const { return getSetting (Ids::extraCompilerFlags); } Value getExtraCompilerFlags() const { return getSetting (Ids::extraCompilerFlags); }
Value getExtraLinkerFlags() const { return getSetting (Ids::extraLinkerFlags); } Value getExtraLinkerFlags() const { return getSetting (Ids::extraLinkerFlags); }
@@ -120,7 +121,7 @@ protected:
ValueTree settings; ValueTree settings;
String name; String name;
const RelativePath getJucePathFromTargetFolder() const;
RelativePath getJucePathFromTargetFolder() const;
static String getDefaultBuildsRootFolder() { return "Builds/"; } static String getDefaultBuildsRootFolder() { return "Builds/"; }
@@ -135,7 +136,7 @@ protected:
return name; return name;
} }
const RelativePath rebaseFromProjectFolderToBuildTarget (const RelativePath& path) const;
RelativePath rebaseFromProjectFolderToBuildTarget (const RelativePath& path) const;
//============================================================================== //==============================================================================
static void overwriteFileIfDifferentOrThrow (const File& file, const MemoryOutputStream& newData) static void overwriteFileIfDifferentOrThrow (const File& file, const MemoryOutputStream& newData)


+ 2
- 2
extras/Introjucer/Source/Project/jucer_ProjectInformationComponent.cpp View File

@@ -248,13 +248,13 @@ void ProjectInformationComponent::rebuildConfigTabs()
} }
} }
lastProjectType = project.getProjectType().getValue();
lastProjectType = project.getProjectTypeValue().getValue();
} }
void ProjectInformationComponent::updateConfigTabs() void ProjectInformationComponent::updateConfigTabs()
{ {
if (configTabBox.getNumTabs() != project.getNumConfigurations() + project.getNumExporters() + 2 if (configTabBox.getNumTabs() != project.getNumConfigurations() + project.getNumExporters() + 2
|| lastProjectType != project.getProjectType().getValue())
|| lastProjectType != project.getProjectTypeValue().getValue())
{ {
rebuildConfigTabs(); rebuildConfigTabs();
} }


+ 6
- 6
extras/Introjucer/Source/Project/jucer_ProjectSaver.h View File

@@ -36,7 +36,7 @@ public:
{ {
} }
const String save()
String save()
{ {
const File oldFile (project.getFile()); const File oldFile (project.getFile());
project.setFile (projectFile); project.setFile (projectFile);
@@ -45,7 +45,7 @@ public:
if (linkageMode == Project::notLinkedToJuce) if (linkageMode == Project::notLinkedToJuce)
{ {
hasAppHeaderFile = ! project.isLibrary();
hasAppHeaderFile = ! project.getProjectType().isLibrary();
hasAppConfigFile = false; hasAppConfigFile = false;
numJuceSourceFiles = 0; numJuceSourceFiles = 0;
} }
@@ -303,7 +303,7 @@ private:
return maxVal; return maxVal;
} }
static const String createVersionCode (const String& version)
static String createVersionCode (const String& version)
{ {
StringArray configs; StringArray configs;
configs.addTokens (version, ",.", String::empty); configs.addTokens (version, ",.", String::empty);
@@ -410,7 +410,7 @@ private:
binaryDataCpp.withFileExtension ("h").deleteFile(); binaryDataCpp.withFileExtension ("h").deleteFile();
} }
if (project.isLibrary())
if (project.getProjectType().isLibrary())
return; return;
if (! wrapperFolder.createDirectory()) if (! wrapperFolder.createDirectory())
@@ -430,7 +430,7 @@ private:
appConfigFile.deleteFile(); appConfigFile.deleteFile();
} }
if (project.isAudioPlugin())
if (project.getProjectType().isAudioPlugin())
{ {
MemoryOutputStream mem; MemoryOutputStream mem;
writePluginCharacteristics (mem); writePluginCharacteristics (mem);
@@ -512,7 +512,7 @@ private:
} }
} }
if (project.isAudioPlugin())
if (project.getProjectType().isAudioPlugin())
exporter->juceWrapperFiles.add (RelativePath (pluginCharacteristicsFile, targetFolder, RelativePath::buildTargetFolder)); exporter->juceWrapperFiles.add (RelativePath (pluginCharacteristicsFile, targetFolder, RelativePath::buildTargetFolder));
try try


+ 87
- 0
extras/Introjucer/Source/Project/jucer_ProjectType.cpp View File

@@ -0,0 +1,87 @@
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-10 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.
==============================================================================
*/
#include "jucer_ProjectType.h"
//==============================================================================
static ProjectType_GUIApp guiType;
static ProjectType_ConsoleApp consoleType;
static ProjectType_StaticLibrary staticLibType;
static ProjectType_AudioPlugin audioPluginType;
//==============================================================================
ProjectType::ProjectType (const String& type_, const String& desc_)
: type (type_), desc (desc_)
{
getAllTypes().add (this);
}
ProjectType::~ProjectType()
{
getAllTypes().removeValue (this);
}
Array<ProjectType*>& ProjectType::getAllTypes()
{
static Array<ProjectType*> types;
return types;
}
const ProjectType* ProjectType::findType (const String& typeCode)
{
const Array<ProjectType*>& types = getAllTypes();
for (int i = types.size(); --i >= 0;)
if (types.getUnchecked(i)->getType() == typeCode)
return types.getUnchecked(i);
jassertfalse;
return nullptr;
}
//==============================================================================
Result ProjectType_GUIApp::createRequiredFiles (Project::Item& projectRoot, Array<File>& filesCreated) const
{
return Result::ok();
}
//==============================================================================
Result ProjectType_ConsoleApp::createRequiredFiles (Project::Item& projectRoot, Array<File>& filesCreated) const
{
return Result::ok();
}
//==============================================================================
Result ProjectType_StaticLibrary::createRequiredFiles (Project::Item& projectRoot, Array<File>& filesCreated) const
{
return Result::ok();
}
//==============================================================================
Result ProjectType_AudioPlugin::createRequiredFiles (Project::Item& projectRoot, Array<File>& filesCreated) const
{
return Result::ok();
}

+ 111
- 0
extras/Introjucer/Source/Project/jucer_ProjectType.h View File

@@ -0,0 +1,111 @@
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-10 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.
==============================================================================
*/
#ifndef __JUCER_PROJECTTYPE_JUCEHEADER__
#define __JUCER_PROJECTTYPE_JUCEHEADER__
#include "../jucer_Headers.h"
#include "jucer_Project.h"
//==============================================================================
class ProjectType
{
public:
//==============================================================================
virtual ~ProjectType();
const String& getType() const noexcept { return type; }
const String& getDescription() const noexcept { return desc; }
//==============================================================================
static Array<ProjectType*>& getAllTypes();
static const ProjectType* findType (const String& typeCode);
//==============================================================================
virtual bool isLibrary() const { return false; }
virtual bool isGUIApplication() const { return false; }
virtual bool isCommandLineApp() const { return false; }
virtual bool isAudioPlugin() const { return false; }
virtual bool isBrowserPlugin() const { return false; }
virtual Result createRequiredFiles (Project::Item& projectRoot,
Array<File>& filesCreated) const = 0;
protected:
ProjectType (const String& type, const String& desc);
private:
const String type, desc;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ProjectType);
};
//==============================================================================
class ProjectType_GUIApp : public ProjectType
{
public:
static const char* getTypeName() noexcept { return "guiapp"; }
ProjectType_GUIApp() : ProjectType (getTypeName(), "Application (GUI)") {}
bool isGUIApplication() const { return true; }
Result createRequiredFiles (Project::Item& projectRoot, Array<File>& filesCreated) const;
};
//==============================================================================
class ProjectType_ConsoleApp : public ProjectType
{
public:
static const char* getTypeName() noexcept { return "consoleapp"; }
ProjectType_ConsoleApp() : ProjectType (getTypeName(), "Application (Non-GUI)") {}
Result createRequiredFiles (Project::Item& projectRoot, Array<File>& filesCreated) const;
bool isCommandLineApp() const { return true; }
};
//==============================================================================
class ProjectType_StaticLibrary : public ProjectType
{
public:
static const char* getTypeName() noexcept { return "library"; }
ProjectType_StaticLibrary() : ProjectType (getTypeName(), "Static Library") {}
bool isLibrary() const { return true; }
Result createRequiredFiles (Project::Item& projectRoot, Array<File>& filesCreated) const;
};
//==============================================================================
class ProjectType_AudioPlugin : public ProjectType
{
public:
static const char* getTypeName() noexcept { return "library"; }
ProjectType_AudioPlugin() : ProjectType (getTypeName(), "Audio Plug-in") {}
bool isAudioPlugin() const { return true; }
Result createRequiredFiles (Project::Item& projectRoot, Array<File>& filesCreated) const;
};
#endif // __JUCE_PROJECTTYPE_H_C1C6BC3E__

+ 2
- 3
extras/Introjucer/Source/Project/jucer_TreeViewTypes.cpp View File

@@ -43,9 +43,8 @@ GroupTreeViewItem::~GroupTreeViewItem()
void GroupTreeViewItem::addNewGroup() void GroupTreeViewItem::addNewGroup()
{ {
Project::Item group (item.getProject().createNewGroup());
item.addChild (group, 0);
triggerAsyncRename (group);
Project::Item newGroup (item.addNewSubGroup ("New Group", 0));
triggerAsyncRename (newGroup);
} }
bool GroupTreeViewItem::acceptsDragItems (const OwnedArray <Project::Item>& selectedNodes) bool GroupTreeViewItem::acceptsDragItems (const OwnedArray <Project::Item>& selectedNodes)


+ 9
- 9
extras/Introjucer/Source/Utility/jucer_MiscUtilities.cpp View File

@@ -27,12 +27,12 @@
//============================================================================== //==============================================================================
const int64 hashCode64 (const String& s)
int64 hashCode64 (const String& s)
{ {
return s.hashCode64() + s.length() * s.hashCode() + s.toUpperCase().hashCode(); return s.hashCode64() + s.length() * s.hashCode() + s.toUpperCase().hashCode();
} }
const String createAlphaNumericUID()
String createAlphaNumericUID()
{ {
String uid; String uid;
static const char chars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; static const char chars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
@@ -49,7 +49,7 @@ const String createAlphaNumericUID()
return uid; return uid;
} }
const String randomHexString (Random& random, int numChars)
String randomHexString (Random& random, int numChars)
{ {
String s; String s;
const char hexChars[] = "0123456789ABCDEF"; const char hexChars[] = "0123456789ABCDEF";
@@ -60,12 +60,12 @@ const String randomHexString (Random& random, int numChars)
return s; return s;
} }
const String hexString8Digits (int value)
String hexString8Digits (int value)
{ {
return String::toHexString (value).paddedLeft ('0', 8); return String::toHexString (value).paddedLeft ('0', 8);
} }
const String createGUID (const String& seed)
String createGUID (const String& seed)
{ {
String guid; String guid;
Random r (hashCode64 (seed + "_jucersalt")); Random r (hashCode64 (seed + "_jucersalt"));
@@ -77,7 +77,7 @@ const String createGUID (const String& seed)
return guid; return guid;
} }
const String escapeSpaces (const String& s)
String escapeSpaces (const String& s)
{ {
return s.replace (" ", "\\ "); return s.replace (" ", "\\ ");
} }
@@ -134,7 +134,7 @@ StringPairArray mergePreprocessorDefs (StringPairArray inheritedDefs, const Stri
return inheritedDefs; return inheritedDefs;
} }
const String createGCCPreprocessorFlags (const StringPairArray& defs)
String createGCCPreprocessorFlags (const StringPairArray& defs)
{ {
String s; String s;
@@ -151,7 +151,7 @@ const String createGCCPreprocessorFlags (const StringPairArray& defs)
return s; return s;
} }
const String replacePreprocessorDefs (const StringPairArray& definitions, String sourceString)
String replacePreprocessorDefs (const StringPairArray& definitions, String sourceString)
{ {
for (int i = 0; i < definitions.size(); ++i) for (int i = 0; i < definitions.size(); ++i)
{ {
@@ -287,7 +287,7 @@ void PropertyPanelWithTooltips::timerCallback()
} }
} }
const String PropertyPanelWithTooltips::findTip (Component* c)
String PropertyPanelWithTooltips::findTip (Component* c)
{ {
while (c != nullptr && c != this) while (c != nullptr && c != this)
{ {


+ 9
- 9
extras/Introjucer/Source/Utility/jucer_MiscUtilities.h View File

@@ -26,19 +26,19 @@
//============================================================================== //==============================================================================
// String::hashCode64 actually hit some dupes, so this is a more powerful version. // String::hashCode64 actually hit some dupes, so this is a more powerful version.
const int64 hashCode64 (const String& s);
const String randomHexString (Random& random, int numChars);
const String hexString8Digits (int value);
int64 hashCode64 (const String& s);
String randomHexString (Random& random, int numChars);
String hexString8Digits (int value);
const String createAlphaNumericUID();
const String createGUID (const String& seed); // Turns a seed into a windows GUID
String createAlphaNumericUID();
String createGUID (const String& seed); // Turns a seed into a windows GUID
const String escapeSpaces (const String& text); // replaces spaces with blackslash-space
String escapeSpaces (const String& text); // replaces spaces with blackslash-space
StringPairArray parsePreprocessorDefs (const String& defs); StringPairArray parsePreprocessorDefs (const String& defs);
StringPairArray mergePreprocessorDefs (StringPairArray inheritedDefs, const StringPairArray& overridingDefs); StringPairArray mergePreprocessorDefs (StringPairArray inheritedDefs, const StringPairArray& overridingDefs);
const String createGCCPreprocessorFlags (const StringPairArray& defs);
const String replacePreprocessorDefs (const StringPairArray& definitions, String sourceString);
String createGCCPreprocessorFlags (const StringPairArray& defs);
String replacePreprocessorDefs (const StringPairArray& definitions, String sourceString);
//============================================================================== //==============================================================================
int indexOfLineStartingWith (const StringArray& lines, const String& text, int startIndex); int indexOfLineStartingWith (const StringArray& lines, const String& text, int startIndex);
@@ -69,7 +69,7 @@ private:
Component* lastComp; Component* lastComp;
String lastTip; String lastTip;
const String findTip (Component* c);
String findTip (Component* c);
}; };
//============================================================================== //==============================================================================


+ 1
- 1
extras/Introjucer/Source/Utility/jucer_RelativePath.h View File

@@ -69,7 +69,7 @@ public:
bool hasFileExtension (const String& extension) const { return getFakeFile().hasFileExtension (extension); } bool hasFileExtension (const String& extension) const { return getFakeFile().hasFileExtension (extension); }
bool isAbsolute() const { return isAbsolute (path); } bool isAbsolute() const { return isAbsolute (path); }
const RelativePath withFileExtension (const String& extension) const
RelativePath withFileExtension (const String& extension) const
{ {
return RelativePath (path.upToLastOccurrenceOf (".", ! extension.startsWithChar ('.'), false) + extension, root); return RelativePath (path.upToLastOccurrenceOf (".", ! extension.startsWithChar ('.'), false) + extension, root);
} }


+ 1
- 1
extras/Introjucer/Source/Utility/jucer_StoredSettings.cpp View File

@@ -122,7 +122,7 @@ void StoredSettings::flush()
} }
} }
const Array<File> StoredSettings::getLastProjects() const
Array<File> StoredSettings::getLastProjects() const
{ {
StringArray s; StringArray s;
s.addTokens (props->getValue ("lastProjects"), "|", ""); s.addTokens (props->getValue ("lastProjects"), "|", "");


+ 1
- 1
extras/Introjucer/Source/Utility/jucer_StoredSettings.h View File

@@ -47,7 +47,7 @@ public:
//============================================================================== //==============================================================================
RecentlyOpenedFilesList recentFiles; RecentlyOpenedFilesList recentFiles;
const Array<File> getLastProjects() const;
Array<File> getLastProjects() const;
void setLastProjects (const Array<File>& files); void setLastProjects (const Array<File>& files);
File getLastKnownJuceFolder() const; File getLastKnownJuceFolder() const;


+ 11
- 4
juce_amalgamated.cpp View File

@@ -23654,11 +23654,13 @@ END_JUCE_NAMESPACE
#if JUCE_QUICKTIME && ! (JUCE_64BIT || JUCE_IOS) #if JUCE_QUICKTIME && ! (JUCE_64BIT || JUCE_IOS)


#if ! JUCE_WINDOWS #if ! JUCE_WINDOWS
#define Point CarbonDummyPointName // (workaround to avoid definition of "Point" by old Carbon headers)
#include <QuickTime/Movies.h> #include <QuickTime/Movies.h>
#include <QuickTime/QTML.h> #include <QuickTime/QTML.h>
#include <QuickTime/QuickTimeComponents.h> #include <QuickTime/QuickTimeComponents.h>
#include <QuickTime/MediaHandlers.h> #include <QuickTime/MediaHandlers.h>
#include <QuickTime/ImageCodec.h> #include <QuickTime/ImageCodec.h>
#undef Point
#else #else
#if JUCE_MSVC #if JUCE_MSVC
#pragma warning (push) #pragma warning (push)
@@ -48559,10 +48561,13 @@ namespace CppTokeniser
"friend", "inline", "not_eq", "public", "sizeof", "static", "signed", "friend", "inline", "not_eq", "public", "sizeof", "static", "signed",
"switch", "typeid", "wchar_t", "xor_eq", 0}; "switch", "typeid", "wchar_t", "xor_eq", 0};


static const char* const keywords7Char[] =
{ "default", "mutable", "private", "typedef", "nullptr", "virtual", 0 };

static const char* const keywordsOther[] = static const char* const keywordsOther[] =
{ "const_cast", "continue", "default", "explicit", "mutable", "namespace",
"operator", "private", "protected", "register", "reinterpret_cast", "static_cast",
"template", "typedef", "typename", "unsigned", "virtual", "volatile",
{ "noexcept", "const_cast", "continue", "explicit", "namespace",
"operator", "protected", "register", "reinterpret_cast", "static_cast",
"template", "typename", "unsigned", "volatile", "constexpr",
"@implementation", "@interface", "@end", "@synthesize", "@dynamic", "@public", "@implementation", "@interface", "@end", "@synthesize", "@dynamic", "@public",
"@private", "@property", "@protected", "@class", 0 }; "@private", "@property", "@protected", "@class", 0 };


@@ -48575,6 +48580,7 @@ namespace CppTokeniser
case 4: k = keywords4Char; break; case 4: k = keywords4Char; break;
case 5: k = keywords5Char; break; case 5: k = keywords5Char; break;
case 6: k = keywords6Char; break; case 6: k = keywords6Char; break;
case 7: k = keywords7Char; break;


default: default:
if (tokenLength < 2 || tokenLength > 16) if (tokenLength < 2 || tokenLength > 16)
@@ -99015,6 +99021,7 @@ private:


const Image::BitmapData destData (image, Image::BitmapData::writeOnly); const Image::BitmapData destData (image, Image::BitmapData::writeOnly);
uint8* p = destData.getPixelPointer (0, 0); uint8* p = destData.getPixelPointer (0, 0);
const bool hasAlpha = image.hasAlphaChannel();


for (;;) for (;;)
{ {
@@ -99022,7 +99029,7 @@ private:
if (index < 0) if (index < 0)
break; break;


if (transparent >= 0)
if (hasAlpha)
((PixelARGB*) p)->set (palette [index]); ((PixelARGB*) p)->set (palette [index]);
else else
((PixelRGB*) p)->set (palette [index]); ((PixelRGB*) p)->set (palette [index]);


+ 1
- 1
juce_amalgamated.h View File

@@ -73,7 +73,7 @@ namespace JuceDummyNamespace {}
*/ */
#define JUCE_MAJOR_VERSION 1 #define JUCE_MAJOR_VERSION 1
#define JUCE_MINOR_VERSION 54 #define JUCE_MINOR_VERSION 54
#define JUCE_BUILDNUMBER 14
#define JUCE_BUILDNUMBER 15


/** Current Juce version number. /** Current Juce version number.




+ 2
- 0
src/audio/audio_file_formats/juce_QuickTimeAudioFormat.cpp View File

@@ -29,11 +29,13 @@
#if JUCE_QUICKTIME && ! (JUCE_64BIT || JUCE_IOS) #if JUCE_QUICKTIME && ! (JUCE_64BIT || JUCE_IOS)
#if ! JUCE_WINDOWS #if ! JUCE_WINDOWS
#define Point CarbonDummyPointName // (workaround to avoid definition of "Point" by old Carbon headers)
#include <QuickTime/Movies.h> #include <QuickTime/Movies.h>
#include <QuickTime/QTML.h> #include <QuickTime/QTML.h>
#include <QuickTime/QuickTimeComponents.h> #include <QuickTime/QuickTimeComponents.h>
#include <QuickTime/MediaHandlers.h> #include <QuickTime/MediaHandlers.h>
#include <QuickTime/ImageCodec.h> #include <QuickTime/ImageCodec.h>
#undef Point
#else #else
#if JUCE_MSVC #if JUCE_MSVC
#pragma warning (push) #pragma warning (push)


+ 1
- 1
src/core/juce_StandardHeader.h View File

@@ -33,7 +33,7 @@
*/ */
#define JUCE_MAJOR_VERSION 1 #define JUCE_MAJOR_VERSION 1
#define JUCE_MINOR_VERSION 54 #define JUCE_MINOR_VERSION 54
#define JUCE_BUILDNUMBER 14
#define JUCE_BUILDNUMBER 15
/** Current Juce version number. /** Current Juce version number.


+ 7
- 3
src/gui/components/code_editor/juce_CPlusPlusCodeTokeniser.cpp View File

@@ -75,10 +75,13 @@ namespace CppTokeniser
"friend", "inline", "not_eq", "public", "sizeof", "static", "signed", "friend", "inline", "not_eq", "public", "sizeof", "static", "signed",
"switch", "typeid", "wchar_t", "xor_eq", 0}; "switch", "typeid", "wchar_t", "xor_eq", 0};
static const char* const keywords7Char[] =
{ "default", "mutable", "private", "typedef", "nullptr", "virtual", 0 };
static const char* const keywordsOther[] = static const char* const keywordsOther[] =
{ "const_cast", "continue", "default", "explicit", "mutable", "namespace",
"operator", "private", "protected", "register", "reinterpret_cast", "static_cast",
"template", "typedef", "typename", "unsigned", "virtual", "volatile",
{ "noexcept", "const_cast", "continue", "explicit", "namespace",
"operator", "protected", "register", "reinterpret_cast", "static_cast",
"template", "typename", "unsigned", "volatile", "constexpr",
"@implementation", "@interface", "@end", "@synthesize", "@dynamic", "@public", "@implementation", "@interface", "@end", "@synthesize", "@dynamic", "@public",
"@private", "@property", "@protected", "@class", 0 }; "@private", "@property", "@protected", "@class", 0 };
@@ -91,6 +94,7 @@ namespace CppTokeniser
case 4: k = keywords4Char; break; case 4: k = keywords4Char; break;
case 5: k = keywords5Char; break; case 5: k = keywords5Char; break;
case 6: k = keywords6Char; break; case 6: k = keywords6Char; break;
case 7: k = keywords7Char; break;
default: default:
if (tokenLength < 2 || tokenLength > 16) if (tokenLength < 2 || tokenLength > 16)


+ 2
- 1
src/gui/graphics/imaging/image_file_formats/juce_GIFLoader.cpp View File

@@ -372,6 +372,7 @@ private:
const Image::BitmapData destData (image, Image::BitmapData::writeOnly); const Image::BitmapData destData (image, Image::BitmapData::writeOnly);
uint8* p = destData.getPixelPointer (0, 0); uint8* p = destData.getPixelPointer (0, 0);
const bool hasAlpha = image.hasAlphaChannel();
for (;;) for (;;)
{ {
@@ -379,7 +380,7 @@ private:
if (index < 0) if (index < 0)
break; break;
if (transparent >= 0)
if (hasAlpha)
((PixelARGB*) p)->set (palette [index]); ((PixelARGB*) p)->set (palette [index]);
else else
((PixelRGB*) p)->set (palette [index]); ((PixelRGB*) p)->set (palette [index]);


Loading…
Cancel
Save