Browse Source

Even more introjucer refactoring.

tags/2021-05-28
Julian Storer 14 years ago
parent
commit
6392cdabcc
28 changed files with 418 additions and 334 deletions
  1. +2
    -2
      extras/Introjucer/Builds/MacOSX/The Introjucer.xcodeproj/project.pbxproj
  2. +1
    -1
      extras/Introjucer/Builds/VisualStudio2005/The Introjucer.vcproj
  3. +1
    -1
      extras/Introjucer/Builds/VisualStudio2008/The Introjucer.vcproj
  4. +1
    -1
      extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj
  5. +2
    -2
      extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj.filters
  6. +3
    -3
      extras/Introjucer/JuceLibraryCode/JuceHeader.h
  7. +13
    -12
      extras/Introjucer/Source/Project/jucer_NewFileWizard.cpp
  8. +1
    -1
      extras/Introjucer/Source/Project/jucer_Project.cpp
  9. +1
    -1
      extras/Introjucer/Source/Project/jucer_ProjectExport_XCode.h
  10. +113
    -277
      extras/Introjucer/Source/Project/jucer_ProjectSaver.h
  11. +238
    -0
      extras/Introjucer/Source/Project/jucer_ProjectType.cpp
  12. +3
    -0
      extras/Introjucer/Source/Project/jucer_ProjectType.h
  13. +6
    -1
      extras/Introjucer/Source/Utility/jucer_CodeHelpers.cpp
  14. +1
    -0
      extras/Introjucer/Source/Utility/jucer_CodeHelpers.h
  15. +2
    -2
      extras/JuceDemo/Builds/MacOSX/Juce Demo.xcodeproj/project.pbxproj
  16. +1
    -1
      extras/JuceDemo/Builds/VisualStudio2005/Juce Demo.vcproj
  17. +1
    -1
      extras/JuceDemo/Builds/VisualStudio2008/Juce Demo.vcproj
  18. +1
    -1
      extras/JuceDemo/Builds/VisualStudio2010/Juce Demo.vcxproj
  19. +2
    -2
      extras/JuceDemo/Builds/VisualStudio2010/Juce Demo.vcxproj.filters
  20. +2
    -2
      extras/JuceDemo/Builds/iOS/Juce Demo.xcodeproj/project.pbxproj
  21. +3
    -3
      extras/JuceDemo/JuceLibraryCode/JuceHeader.h
  22. +3
    -3
      extras/amalgamator/JuceLibraryCode/JuceHeader.h
  23. +3
    -3
      extras/audio plugin host/JuceLibraryCode/JuceHeader.h
  24. +3
    -3
      extras/audio plugins/demo/JuceLibraryCode/JuceHeader.h
  25. +3
    -3
      extras/audio plugins/demo/JuceLibraryCode/JucePluginCharacteristics.h
  26. +3
    -3
      extras/binarybuilder/JuceLibraryCode/JuceHeader.h
  27. +3
    -3
      extras/example projects/JuceLibraryCode/JuceHeader.h
  28. +2
    -2
      juce_amalgamated.cpp

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

@@ -132,9 +132,9 @@
1C26D9DA0B2D0FF8F2CEC721 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_WindowTemplate.h"; path = "../../Source/BinaryData/jucer_WindowTemplate.h"; sourceTree = "SOURCE_ROOT"; };
31B5EB3CEA43BE4B473DCC85 = { isa = PBXFileReference; lastKnownFileType = image.png; name = "juce_icon.png"; path = "../../Source/BinaryData/juce_icon.png"; sourceTree = "SOURCE_ROOT"; };
C86084A495B96EA215958914 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppConfig.h; path = ../../JuceLibraryCode/AppConfig.h; sourceTree = "SOURCE_ROOT"; };
8FEC5B519774920289A1FD73 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JuceHeader.h; path = ../../JuceLibraryCode/JuceHeader.h; sourceTree = "SOURCE_ROOT"; };
D02830A908A07FD46F7387DA = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = BinaryData.cpp; path = ../../JuceLibraryCode/BinaryData.cpp; sourceTree = "SOURCE_ROOT"; };
A6A79D303B85B7C9D673ECD5 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = BinaryData.h; path = ../../JuceLibraryCode/BinaryData.h; sourceTree = "SOURCE_ROOT"; };
8FEC5B519774920289A1FD73 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JuceHeader.h; path = ../../JuceLibraryCode/JuceHeader.h; sourceTree = "SOURCE_ROOT"; };
933DADF4F3906510EA714CC0 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = JuceLibraryCode1.mm; path = ../../JuceLibraryCode/JuceLibraryCode1.mm; sourceTree = "SOURCE_ROOT"; };
DD6476FF0F8BE833CD54C01F = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = JuceLibraryCode2.mm; path = ../../JuceLibraryCode/JuceLibraryCode2.mm; sourceTree = "SOURCE_ROOT"; };
268B4FFB1C675B679138545F = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = JuceLibraryCode3.mm; path = ../../JuceLibraryCode/JuceLibraryCode3.mm; sourceTree = "SOURCE_ROOT"; };
@@ -217,9 +217,9 @@
31B5EB3CEA43BE4B473DCC85 ); name = BinaryData; sourceTree = "<group>"; };
265749F75DBA86EC3F19FE34 = { isa = PBXGroup; children = (
C86084A495B96EA215958914,
8FEC5B519774920289A1FD73,
D02830A908A07FD46F7387DA,
A6A79D303B85B7C9D673ECD5,
8FEC5B519774920289A1FD73,
933DADF4F3906510EA714CC0,
DD6476FF0F8BE833CD54C01F,
268B4FFB1C675B679138545F,


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

@@ -329,9 +329,9 @@
</Filter>
<Filter Name="Juce Library Code">
<File RelativePath="..\..\JuceLibraryCode\AppConfig.h"/>
<File RelativePath="..\..\JuceLibraryCode\JuceHeader.h"/>
<File RelativePath="..\..\JuceLibraryCode\BinaryData.cpp"/>
<File RelativePath="..\..\JuceLibraryCode\BinaryData.h"/>
<File RelativePath="..\..\JuceLibraryCode\JuceHeader.h"/>
<File RelativePath="..\..\JuceLibraryCode\JuceLibraryCode1.cpp"/>
<File RelativePath="..\..\JuceLibraryCode\JuceLibraryCode2.cpp"/>
<File RelativePath="..\..\JuceLibraryCode\JuceLibraryCode3.cpp"/>


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

@@ -329,9 +329,9 @@
</Filter>
<Filter Name="Juce Library Code">
<File RelativePath="..\..\JuceLibraryCode\AppConfig.h"/>
<File RelativePath="..\..\JuceLibraryCode\JuceHeader.h"/>
<File RelativePath="..\..\JuceLibraryCode\BinaryData.cpp"/>
<File RelativePath="..\..\JuceLibraryCode\BinaryData.h"/>
<File RelativePath="..\..\JuceLibraryCode\JuceHeader.h"/>
<File RelativePath="..\..\JuceLibraryCode\JuceLibraryCode1.cpp"/>
<File RelativePath="..\..\JuceLibraryCode\JuceLibraryCode2.cpp"/>
<File RelativePath="..\..\JuceLibraryCode\JuceLibraryCode3.cpp"/>


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

@@ -192,8 +192,8 @@
<ClInclude Include="..\..\Source\BinaryData\jucer_NewCppFileTemplate.h"/>
<ClInclude Include="..\..\Source\BinaryData\jucer_WindowTemplate.h"/>
<ClInclude Include="..\..\JuceLibraryCode\AppConfig.h"/>
<ClInclude Include="..\..\JuceLibraryCode\JuceHeader.h"/>
<ClInclude Include="..\..\JuceLibraryCode\BinaryData.h"/>
<ClInclude Include="..\..\JuceLibraryCode\JuceHeader.h"/>
</ItemGroup>
<ItemGroup>
<None Include=".\icon.ico"/>


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

@@ -258,10 +258,10 @@
<ClInclude Include="..\..\JuceLibraryCode\AppConfig.h">
<Filter>Juce Library Code</Filter>
</ClInclude>
<ClInclude Include="..\..\JuceLibraryCode\JuceHeader.h">
<ClInclude Include="..\..\JuceLibraryCode\BinaryData.h">
<Filter>Juce Library Code</Filter>
</ClInclude>
<ClInclude Include="..\..\JuceLibraryCode\BinaryData.h">
<ClInclude Include="..\..\JuceLibraryCode\JuceHeader.h">
<Filter>Juce Library Code</Filter>
</ClInclude>
</ItemGroup>


+ 3
- 3
extras/Introjucer/JuceLibraryCode/JuceHeader.h View File

@@ -10,8 +10,8 @@
*/
#ifndef __APPHEADERFILE_BD73378F__
#define __APPHEADERFILE_BD73378F__
#ifndef __APPHEADERFILE_M70QFTRRK__
#define __APPHEADERFILE_M70QFTRRK__
#include "AppConfig.h"
#include "../../../juce_amalgamated.h"
@@ -24,4 +24,4 @@ namespace ProjectInfo
const int versionNumber = 0x30000;
}
#endif // __APPHEADERFILE_BD73378F__
#endif // __APPHEADERFILE_M70QFTRRK__

+ 13
- 12
extras/Introjucer/Source/Project/jucer_NewFileWizard.cpp View File

@@ -27,23 +27,28 @@
//==============================================================================
static bool fillInNewCppFileTemplate (const File& file, const Project::Item& item, const char* templateName)
namespace
{
String s = item.getProject().getFileTemplate (templateName)
.replace ("FILENAME", file.getFileName(), false)
.replace ("DATE", Time::getCurrentTime().toString (true, true, true), false)
.replace ("AUTHOR", SystemStats::getFullUserName(), false)
.replace ("HEADERGUARD", CodeHelpers::makeHeaderGuardName (file), false);
bool fillInNewCppFileTemplate (const File& file, const Project::Item& item, const char* templateName)
{
String s = item.getProject().getFileTemplate (templateName)
.replace ("FILENAME", file.getFileName(), false)
.replace ("DATE", Time::getCurrentTime().toString (true, true, true), false)
.replace ("AUTHOR", SystemStats::getFullUserName(), false)
.replace ("HEADERGUARD", CodeHelpers::makeHeaderGuardName (file), false);
return FileHelpers::overwriteFileWithNewDataIfDifferent (file, s);
}
return FileHelpers::overwriteFileWithNewDataIfDifferent (file, s);
const int menuBaseID = 0x12d83f0;
}
//==============================================================================
class NewCppFileWizard : public NewFileWizard::Type
{
public:
NewCppFileWizard() {}
~NewCppFileWizard() {}
String getName() { return "CPP File"; }
@@ -73,7 +78,6 @@ class NewHeaderFileWizard : public NewFileWizard::Type
{
public:
NewHeaderFileWizard() {}
~NewHeaderFileWizard() {}
String getName() { return "Header File"; }
@@ -103,7 +107,6 @@ class NewCppAndHeaderFileWizard : public NewFileWizard::Type
{
public:
NewCppAndHeaderFileWizard() {}
~NewCppAndHeaderFileWizard() {}
String getName() { return "CPP & Header File"; }
@@ -157,8 +160,6 @@ NewFileWizard::~NewFileWizard()
juce_ImplementSingleton_SingleThreaded (NewFileWizard)
static const int menuBaseID = 0x12d83f0;
void NewFileWizard::addWizardsToMenu (PopupMenu& m) const
{
for (int i = 0; i < wizards.size(); ++i)


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

@@ -501,7 +501,7 @@ Image Project::getBestIconForSize (int size, bool returnNullIfNothingBigEnough)
if (returnNullIfNothingBigEnough && im.getWidth() < size && im.getHeight() < size)
return Image::null;
Image newIm (Image::ARGB, size, size, true);
Image newIm (Image::ARGB, size, size, true, Image::SoftwareImage);
Graphics g (newIm);
g.drawImageWithin (im, 0, 0, size, size,
RectanglePlacement::centred | RectanglePlacement::onlyReduceInSize, false);


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

@@ -236,7 +236,7 @@ private:
if (w != h || (w != 16 && w != 32 && w != 48 && w != 64))
{
const int newSize = w >= 128 ? 128 : (w >= 64 ? 64 : (w >= 32 ? 32 : 16));
Image newIm (Image::ARGB, newSize, newSize, true);
Image newIm (Image::ARGB, newSize, newSize, true, Image::SoftwareImage);
Graphics g (newIm);
g.drawImageWithin (image, 0, 0, newSize, newSize,
RectanglePlacement::centred | RectanglePlacement::onlyReduceInSize, false);


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

@@ -26,62 +26,42 @@
#ifndef __JUCER_PROJECTSAVER_JUCEHEADER__
#define __JUCER_PROJECTSAVER_JUCEHEADER__
#include "jucer_ResourceFile.h"
//==============================================================================
class ProjectSaver
{
public:
ProjectSaver (Project& project_, const File& projectFile_)
: project (project_), projectFile (projectFile_), resourceFile (project_),
generatedCodeFolder (project.getGeneratedCodeFolder())
: project (project_), projectFile (projectFile_),
generatedFilesGroup (Project::Item::createGroup (project, project.getJuceCodeGroupName()))
{
generatedFilesGroup.setID ("__jucelibfiles");
}
Project& getProject() noexcept { return project; }
String save()
{
jassert (generatedFilesGroup.getNumChildren() == 0); // this method can't be called more than once!
const File oldFile (project.getFile());
project.setFile (projectFile);
const String linkageMode (project.getJuceLinkageMode());
if (linkageMode == Project::notLinkedToJuce)
{
hasAppHeaderFile = ! project.getProjectType().isLibrary();
numJuceSourceFiles = 0;
}
else if (linkageMode == Project::useAmalgamatedJuce
|| linkageMode == Project::useAmalgamatedJuceViaSingleTemplate)
{
hasAppHeaderFile = true;
numJuceSourceFiles = 1;
}
else if (linkageMode == Project::useAmalgamatedJuceViaMultipleTemplates)
{
hasAppHeaderFile = true;
numJuceSourceFiles = project.getNumSeparateAmalgamatedFiles();
}
else if (linkageMode == Project::useLinkedJuce)
{
hasAppHeaderFile = true;
numJuceSourceFiles = 0;
}
else
{
jassertfalse;
}
hasResources = (resourceFile.getNumFiles() > 0);
writeMainProjectFile();
if (! generatedCodeFolder.createDirectory())
errors.add ("Couldn't create folder: " + generatedCodeFolder.getFullPathName());
if (! project.getGeneratedCodeFolder().createDirectory())
errors.add ("Couldn't create folder: " + project.getGeneratedCodeFolder().getFullPathName());
if (errors.size() == 0)
writeAppConfigFile();
if (errors.size() == 0)
writeJuceSourceWrappers();
writeBinaryDataFiles();
if (errors.size() == 0)
writeAppHeader();
if (errors.size() == 0)
writeProjects();
@@ -94,19 +74,34 @@ public:
bool saveGeneratedFile (const String& filePath, const MemoryOutputStream& newData)
{
return replaceFileIfDifferent (generatedCodeFolder.getChildFile (filePath), newData);
const File file (project.getGeneratedCodeFolder().getChildFile (filePath));
if (replaceFileIfDifferent (file, newData))
{
if (! generatedFilesGroup.findItemForFile (file).isValid())
generatedFilesGroup.addFile (file, -1);
return true;
}
return false;
}
static void writeAutoGenWarningComment (OutputStream& out)
{
out << "/*" << newLine << newLine
<< " IMPORTANT! This file is auto-generated each time you save your" << newLine
<< " project - if you alter its contents, your changes may be overwritten!" << newLine
<< newLine;
}
private:
Project& project;
const File& projectFile;
ResourceFile resourceFile;
File generatedCodeFolder;
const File projectFile;
Project::Item generatedFilesGroup;
StringArray errors;
File appConfigFile, juceHeaderFile, binaryDataCpp, pluginCharacteristicsFile;
bool hasAppHeaderFile, hasResources;
int numJuceSourceFiles;
File appConfigFile, binaryDataCpp;
void writeMainProjectFile()
{
@@ -137,17 +132,9 @@ private:
}
}
static void writeJucerComment (OutputStream& out)
{
out << "/*" << newLine << newLine
<< " IMPORTANT! This file is auto-generated each time you save your" << newLine
<< " project - if you alter its contents, your changes may be overwritten!" << newLine
<< newLine;
}
bool writeAppConfig (OutputStream& out)
{
writeJucerComment (out);
writeAutoGenWarningComment (out);
out << " If you want to change any of these values, use the Introjucer to do so, rather than" << newLine
<< " editing this file directly!" << newLine
<< newLine
@@ -192,29 +179,21 @@ private:
return flags.size() > 0;
}
void writeSourceWrapper (OutputStream& out, int fileNumber)
void writeAppConfigFile()
{
writeJucerComment (out);
out << " This file pulls in all the Juce source code, and builds it using the settings" << newLine
<< " defined in " << appConfigFile.getFileName() << "." << newLine
<< newLine
<< " If you want to change the method by which Juce is linked into your app, use the" << newLine
<< " Jucer to change it, rather than trying to edit this file directly." << newLine
<< newLine
<< "*/"
<< newLine << newLine
<< CodeHelpers::createIncludeStatement (appConfigFile, appConfigFile) << newLine;
appConfigFile = project.getGeneratedCodeFolder().getChildFile (project.getAppConfigFilename());
if (fileNumber == 0)
writeInclude (out, project.isUsingFullyAmalgamatedFile() ? "juce_amalgamated.cpp"
: "amalgamation/juce_amalgamated_template.cpp");
MemoryOutputStream mem;
if (writeAppConfig (mem))
saveGeneratedFile (project.getAppConfigFilename(), mem);
else
writeInclude (out, "amalgamation/juce_amalgamated" + String (fileNumber) + ".cpp");
appConfigFile.deleteFile();
}
void writeAppHeader (OutputStream& out)
{
writeJucerComment (out);
writeAutoGenWarningComment (out);
out << " This is the header file that your files should include in order to get all the" << newLine
<< " Juce library headers. You should NOT include juce.h or juce_amalgamated.h directly in" << newLine
<< " your own source files, because that wouldn't pick up the correct Juce configuration" << newLine
@@ -222,20 +201,52 @@ private:
<< newLine
<< "*/" << newLine << newLine;
String headerGuard ("__APPHEADERFILE_" + String::toHexString (juceHeaderFile.hashCode()).toUpperCase() + "__");
String headerGuard ("__APPHEADERFILE_" + project.getProjectUID().toUpperCase() + "__");
out << "#ifndef " << headerGuard << newLine
<< "#define " << headerGuard << newLine << newLine;
if (appConfigFile.exists())
out << CodeHelpers::createIncludeStatement (appConfigFile, appConfigFile) << newLine;
out << CodeHelpers::createIncludeStatement (project.getAppConfigFilename()) << newLine;
if (project.getJuceLinkageMode() != Project::notLinkedToJuce)
{
writeInclude (out, (project.isUsingSingleTemplateFile() || project.isUsingMultipleTemplateFiles())
? "juce_amalgamated.h" // could use "amalgamation/juce_amalgamated_template.h", but it's slower..
: (project.isUsingFullyAmalgamatedFile()
? "juce_amalgamated.h"
: "juce.h"));
OwnedArray<LibraryModule> modules;
project.getProjectType().createRequiredModules (project, modules);
StringArray paths, guards;
for (int i = 0; i < modules.size(); ++i)
modules.getUnchecked(i)->getHeaderFiles (project, paths, guards);
StringArray uniquePaths (paths);
uniquePaths.removeDuplicates (false);
if (uniquePaths.size() == 1)
{
out << "#include " << paths[0] << newLine;
}
else
{
int i = paths.size();
for (; --i >= 0;)
{
for (int j = i; --j >= 0;)
{
if (paths[i] == paths[j] && guards[i] == guards[j])
{
paths.remove (i);
guards.remove (i);
}
}
}
for (i = 0; i < paths.size(); ++i)
{
out << (i == 0 ? "#if " : "#elif ") << guards[i] << newLine
<< " #include " << paths[i] << newLine;
}
out << "#endif" << newLine;
}
}
if (binaryDataCpp.exists())
@@ -252,119 +263,21 @@ private:
<< "#endif // " << headerGuard << newLine;
}
void writeInclude (OutputStream& out, const String& pathFromJuceFolder)
void writeAppHeader()
{
StringArray paths, guards;
for (int i = project.getNumExporters(); --i >= 0;)
if (project.getJuceLinkageMode() != Project::notLinkedToJuce
|| ! project.getProjectType().isLibrary())
{
ScopedPointer <ProjectExporter> exporter (project.createExporter (i));
if (exporter != nullptr)
{
paths.add (exporter->getIncludePathForFileInJuceFolder (pathFromJuceFolder, juceHeaderFile));
guards.add ("defined (" + exporter->getExporterIdentifierMacro() + ")");
}
}
StringArray uniquePaths (paths);
uniquePaths.removeDuplicates (false);
if (uniquePaths.size() == 1)
{
out << "#include " << paths[0] << newLine;
MemoryOutputStream mem;
writeAppHeader (mem);
saveGeneratedFile (project.getJuceSourceHFilename(), mem);
}
else
{
int i = paths.size();
for (; --i >= 0;)
{
for (int j = i; --j >= 0;)
{
if (paths[i] == paths[j] && guards[i] == guards[j])
{
paths.remove (i);
guards.remove (i);
}
}
}
for (i = 0; i < paths.size(); ++i)
{
out << (i == 0 ? "#if " : "#elif ") << guards[i] << newLine
<< " #include " << paths[i] << newLine;
}
out << "#endif" << newLine;
project.getAppIncludeFile().deleteFile();
}
}
static int countMaxPluginChannels (const String& configString, bool isInput)
{
StringArray configs;
configs.addTokens (configString, ", {}", String::empty);
configs.trim();
configs.removeEmptyStrings();
jassert ((configs.size() & 1) == 0); // looks like a syntax error in the configs?
int maxVal = 0;
for (int i = (isInput ? 0 : 1); i < configs.size(); i += 2)
maxVal = jmax (maxVal, configs[i].getIntValue());
return maxVal;
}
static void writePluginCharacteristics (const File& destFile, Project& project, OutputStream& out)
{
String headerGuard ("__PLUGINCHARACTERISTICS_" + String::toHexString (destFile.hashCode()).toUpperCase() + "__");
writeJucerComment (out);
out << " This header file contains configuration options for the plug-in. If you need to change any of" << newLine
<< " these, it'd be wise to do so using the Jucer, rather than editing this file directly..." << newLine
<< newLine
<< "*/" << newLine
<< newLine
<< "#ifndef " << headerGuard << newLine
<< "#define " << headerGuard << newLine
<< newLine
<< "#define JucePlugin_Build_VST " << ((bool) project.shouldBuildVST().getValue() ? 1 : 0) << " // (If you change this value, you'll also need to re-export the projects using the Jucer)" << newLine
<< "#define JucePlugin_Build_AU " << ((bool) project.shouldBuildAU().getValue() ? 1 : 0) << " // (If you change this value, you'll also need to re-export the projects using the Jucer)" << newLine
<< "#define JucePlugin_Build_RTAS " << ((bool) project.shouldBuildRTAS().getValue() ? 1 : 0) << " // (If you change this value, you'll also need to re-export the projects using the Jucer)" << newLine
<< newLine
<< "#define JucePlugin_Name " << project.getPluginName().toString().quoted() << newLine
<< "#define JucePlugin_Desc " << project.getPluginDesc().toString().quoted() << newLine
<< "#define JucePlugin_Manufacturer " << project.getPluginManufacturer().toString().quoted() << newLine
<< "#define JucePlugin_ManufacturerCode '" << project.getPluginManufacturerCode().toString().trim().substring (0, 4) << "'" << newLine
<< "#define JucePlugin_PluginCode '" << project.getPluginCode().toString().trim().substring (0, 4) << "'" << newLine
<< "#define JucePlugin_MaxNumInputChannels " << countMaxPluginChannels (project.getPluginChannelConfigs().toString(), true) << newLine
<< "#define JucePlugin_MaxNumOutputChannels " << countMaxPluginChannels (project.getPluginChannelConfigs().toString(), false) << newLine
<< "#define JucePlugin_PreferredChannelConfigurations " << project.getPluginChannelConfigs().toString() << newLine
<< "#define JucePlugin_IsSynth " << ((bool) project.getPluginIsSynth().getValue() ? 1 : 0) << newLine
<< "#define JucePlugin_WantsMidiInput " << ((bool) project.getPluginWantsMidiInput().getValue() ? 1 : 0) << newLine
<< "#define JucePlugin_ProducesMidiOutput " << ((bool) project.getPluginProducesMidiOut().getValue() ? 1 : 0) << newLine
<< "#define JucePlugin_SilenceInProducesSilenceOut " << ((bool) project.getPluginSilenceInProducesSilenceOut().getValue() ? 1 : 0) << newLine
<< "#define JucePlugin_TailLengthSeconds " << (double) project.getPluginTailLengthSeconds().getValue() << newLine
<< "#define JucePlugin_EditorRequiresKeyboardFocus " << ((bool) project.getPluginEditorNeedsKeyFocus().getValue() ? 1 : 0) << newLine
<< "#define JucePlugin_VersionCode " << project.getVersionAsHex() << newLine
<< "#define JucePlugin_VersionString " << project.getVersion().toString().quoted() << newLine
<< "#define JucePlugin_VSTUniqueID JucePlugin_PluginCode" << newLine
<< "#define JucePlugin_VSTCategory " << ((bool) project.getPluginIsSynth().getValue() ? "kPlugCategSynth" : "kPlugCategEffect") << newLine
<< "#define JucePlugin_AUMainType " << ((bool) project.getPluginIsSynth().getValue() ? "kAudioUnitType_MusicDevice" : "kAudioUnitType_Effect") << newLine
<< "#define JucePlugin_AUSubType JucePlugin_PluginCode" << newLine
<< "#define JucePlugin_AUExportPrefix " << project.getPluginAUExportPrefix().toString() << newLine
<< "#define JucePlugin_AUExportPrefixQuoted " << project.getPluginAUExportPrefix().toString().quoted() << newLine
<< "#define JucePlugin_AUManufacturerCode JucePlugin_ManufacturerCode" << newLine
<< "#define JucePlugin_CFBundleIdentifier " << project.getBundleIdentifier().toString() << newLine
<< "#define JucePlugin_AUCocoaViewClassName " << project.getPluginAUCocoaViewClassName().toString() << newLine
<< "#define JucePlugin_RTASCategory " << ((bool) project.getPluginIsSynth().getValue() ? "ePlugInCategory_SWGenerators" : "ePlugInCategory_None") << newLine
<< "#define JucePlugin_RTASManufacturerCode JucePlugin_ManufacturerCode" << newLine
<< "#define JucePlugin_RTASProductId JucePlugin_PluginCode" << newLine;
out << "#define JUCE_USE_VSTSDK_2_4 1" << newLine
<< newLine
<< "#endif // " << headerGuard << newLine;
}
bool replaceFileIfDifferent (const File& f, const MemoryOutputStream& newData)
{
if (! FileHelpers::overwriteFileWithNewDataIfDifferent (f, newData))
@@ -376,117 +289,31 @@ private:
return true;
}
void writeAppConfigFile()
void writeBinaryDataFiles()
{
appConfigFile = project.getGeneratedCodeFolder().getChildFile (project.getAppConfigFilename());
binaryDataCpp = project.getGeneratedCodeFolder().getChildFile ("BinaryData.cpp");
MemoryOutputStream mem;
if (writeAppConfig (mem))
replaceFileIfDifferent (appConfigFile, mem);
else
appConfigFile.deleteFile();
}
void writeJuceSourceWrappers()
{
juceHeaderFile = project.getAppIncludeFile();
binaryDataCpp = generatedCodeFolder.getChildFile ("BinaryData.cpp");
ResourceFile resourceFile (project);
if (resourceFile.getNumFiles() > 0)
{
//resourceFile.setJuceHeaderToInclude (juceHeaderFile);
resourceFile.setClassName ("BinaryData");
if (! resourceFile.write (binaryDataCpp))
errors.add ("Can't create binary resources file: " + binaryDataCpp.getFullPathName());
}
else
{
binaryDataCpp.deleteFile();
binaryDataCpp.withFileExtension ("h").deleteFile();
}
if (project.getProjectType().isLibrary())
return;
if (project.getProjectType().isAudioPlugin())
{
MemoryOutputStream mem;
pluginCharacteristicsFile = generatedCodeFolder.getChildFile (project.getPluginCharacteristicsFilename());
writePluginCharacteristics (pluginCharacteristicsFile, project, mem);
replaceFileIfDifferent (pluginCharacteristicsFile, mem);
}
for (int i = 0; i <= project.getNumSeparateAmalgamatedFiles(); ++i)
{
const File sourceWrapperCpp (getSourceWrapperCpp (i));
const File sourceWrapperMM (sourceWrapperCpp.withFileExtension (".mm"));
if (numJuceSourceFiles > 0
&& ((i == 0 && numJuceSourceFiles == 1) || (i != 0 && numJuceSourceFiles > 1)))
if (resourceFile.write (binaryDataCpp))
{
MemoryOutputStream mem;
writeSourceWrapper (mem, i);
replaceFileIfDifferent (sourceWrapperCpp, mem);
replaceFileIfDifferent (sourceWrapperMM, mem);
generatedFilesGroup.addFile (binaryDataCpp, -1);
generatedFilesGroup.addFile (binaryDataCpp.withFileExtension (".h"), -1);
}
else
{
sourceWrapperMM.deleteFile();
sourceWrapperCpp.deleteFile();
errors.add ("Can't create binary resources file: " + binaryDataCpp.getFullPathName());
}
}
if (hasAppHeaderFile)
{
MemoryOutputStream mem;
writeAppHeader (mem);
replaceFileIfDifferent (juceHeaderFile, mem);
}
else
{
juceHeaderFile.deleteFile();
}
}
Project::Item createLibraryFilesGroup (ProjectExporter& exporter)
{
Project::Item libraryFiles (Project::Item::createGroup (project, project.getJuceCodeGroupName()));
if (appConfigFile.exists())
libraryFiles.addFile (appConfigFile, -1);
if (hasAppHeaderFile)
libraryFiles.addFile (juceHeaderFile, -1);
if (hasResources)
{
libraryFiles.addFile (binaryDataCpp, -1);
libraryFiles.addFile (binaryDataCpp.withFileExtension (".h"), -1);
}
if (numJuceSourceFiles > 0)
{
for (int j = 0; j <= project.getNumSeparateAmalgamatedFiles(); ++j)
{
const File sourceWrapperCpp (getSourceWrapperCpp (j));
const File sourceWrapperMM (sourceWrapperCpp.withFileExtension (".mm"));
if ((j == 0 && numJuceSourceFiles == 1) || (j != 0 && numJuceSourceFiles > 1))
{
if (exporter.usesMMFiles())
libraryFiles.addFile (sourceWrapperMM, -1);
else
libraryFiles.addFile (sourceWrapperCpp, -1);
}
}
binaryDataCpp.deleteFile();
binaryDataCpp.withFileExtension ("h").deleteFile();
}
if (project.getProjectType().isAudioPlugin())
libraryFiles.addFile (pluginCharacteristicsFile, -1);
libraryFiles.setID ("__jucelibfiles");
return libraryFiles;
}
void writeProjects()
@@ -500,9 +327,16 @@ private:
if (targetFolder.createDirectory())
{
exporter->generatedGroups.add (createLibraryFilesGroup (*exporter));
// start with a copy of the basic files, as each exporter may modify it.
const ValueTree generatedGroupCopy (generatedFilesGroup.getNode().createCopy());
int j;
for (j = 0; j < exporter->libraryModules.size(); ++j)
exporter->libraryModules.getUnchecked(j)->createFiles (*exporter, *this);
for (int j = 0; j < exporter->libraryModules.size(); ++j)
exporter->generatedGroups.add (generatedFilesGroup);
for (j = 0; j < exporter->libraryModules.size(); ++j)
exporter->libraryModules.getUnchecked(j)->addExtraCodeGroups (*exporter, exporter->generatedGroups);
try
@@ -513,6 +347,8 @@ private:
{
errors.add (error.message);
}
generatedFilesGroup.getNode() = generatedGroupCopy;
}
else
{


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

@@ -25,6 +25,8 @@
#include "jucer_ProjectType.h"
#include "jucer_ProjectExporter.h"
#include "jucer_ProjectSaver.h"
//==============================================================================
LibraryModule::LibraryModule()
@@ -54,6 +56,80 @@ namespace
props.add (new TextPropertyComponent (exporter.getVSTFolder(), "VST Folder", 1024, false));
props.getLast()->setTooltip ("If you're building a VST, this must be the folder containing the VST SDK. This should be an absolute path.");
}
static int countMaxPluginChannels (const String& configString, bool isInput)
{
StringArray configs;
configs.addTokens (configString, ", {}", String::empty);
configs.trim();
configs.removeEmptyStrings();
jassert ((configs.size() & 1) == 0); // looks like a syntax error in the configs?
int maxVal = 0;
for (int i = (isInput ? 0 : 1); i < configs.size(); i += 2)
maxVal = jmax (maxVal, configs[i].getIntValue());
return maxVal;
}
static void writePluginCharacteristics (Project& project, OutputStream& out)
{
String headerGuard ("__PLUGINCHARACTERISTICS_" + project.getProjectUID().toUpperCase() + "__");
ProjectSaver::writeAutoGenWarningComment (out);
out << " This header file contains configuration options for the plug-in. If you need to change any of" << newLine
<< " these, it'd be wise to do so using the Jucer, rather than editing this file directly..." << newLine
<< newLine
<< "*/" << newLine
<< newLine
<< "#ifndef " << headerGuard << newLine
<< "#define " << headerGuard << newLine
<< newLine
<< "#define JucePlugin_Build_VST " << ((bool) project.shouldBuildVST().getValue() ? 1 : 0) << " // (If you change this value, you'll also need to re-export the projects using the Jucer)" << newLine
<< "#define JucePlugin_Build_AU " << ((bool) project.shouldBuildAU().getValue() ? 1 : 0) << " // (If you change this value, you'll also need to re-export the projects using the Jucer)" << newLine
<< "#define JucePlugin_Build_RTAS " << ((bool) project.shouldBuildRTAS().getValue() ? 1 : 0) << " // (If you change this value, you'll also need to re-export the projects using the Jucer)" << newLine
<< newLine
<< "#define JucePlugin_Name " << project.getPluginName().toString().quoted() << newLine
<< "#define JucePlugin_Desc " << project.getPluginDesc().toString().quoted() << newLine
<< "#define JucePlugin_Manufacturer " << project.getPluginManufacturer().toString().quoted() << newLine
<< "#define JucePlugin_ManufacturerCode '" << project.getPluginManufacturerCode().toString().trim().substring (0, 4) << "'" << newLine
<< "#define JucePlugin_PluginCode '" << project.getPluginCode().toString().trim().substring (0, 4) << "'" << newLine
<< "#define JucePlugin_MaxNumInputChannels " << countMaxPluginChannels (project.getPluginChannelConfigs().toString(), true) << newLine
<< "#define JucePlugin_MaxNumOutputChannels " << countMaxPluginChannels (project.getPluginChannelConfigs().toString(), false) << newLine
<< "#define JucePlugin_PreferredChannelConfigurations " << project.getPluginChannelConfigs().toString() << newLine
<< "#define JucePlugin_IsSynth " << ((bool) project.getPluginIsSynth().getValue() ? 1 : 0) << newLine
<< "#define JucePlugin_WantsMidiInput " << ((bool) project.getPluginWantsMidiInput().getValue() ? 1 : 0) << newLine
<< "#define JucePlugin_ProducesMidiOutput " << ((bool) project.getPluginProducesMidiOut().getValue() ? 1 : 0) << newLine
<< "#define JucePlugin_SilenceInProducesSilenceOut " << ((bool) project.getPluginSilenceInProducesSilenceOut().getValue() ? 1 : 0) << newLine
<< "#define JucePlugin_TailLengthSeconds " << (double) project.getPluginTailLengthSeconds().getValue() << newLine
<< "#define JucePlugin_EditorRequiresKeyboardFocus " << ((bool) project.getPluginEditorNeedsKeyFocus().getValue() ? 1 : 0) << newLine
<< "#define JucePlugin_VersionCode " << project.getVersionAsHex() << newLine
<< "#define JucePlugin_VersionString " << project.getVersion().toString().quoted() << newLine
<< "#define JucePlugin_VSTUniqueID JucePlugin_PluginCode" << newLine
<< "#define JucePlugin_VSTCategory " << ((bool) project.getPluginIsSynth().getValue() ? "kPlugCategSynth" : "kPlugCategEffect") << newLine
<< "#define JucePlugin_AUMainType " << ((bool) project.getPluginIsSynth().getValue() ? "kAudioUnitType_MusicDevice" : "kAudioUnitType_Effect") << newLine
<< "#define JucePlugin_AUSubType JucePlugin_PluginCode" << newLine
<< "#define JucePlugin_AUExportPrefix " << project.getPluginAUExportPrefix().toString() << newLine
<< "#define JucePlugin_AUExportPrefixQuoted " << project.getPluginAUExportPrefix().toString().quoted() << newLine
<< "#define JucePlugin_AUManufacturerCode JucePlugin_ManufacturerCode" << newLine
<< "#define JucePlugin_CFBundleIdentifier " << project.getBundleIdentifier().toString() << newLine
<< "#define JucePlugin_AUCocoaViewClassName " << project.getPluginAUCocoaViewClassName().toString() << newLine
<< "#define JucePlugin_RTASCategory " << ((bool) project.getPluginIsSynth().getValue() ? "ePlugInCategory_SWGenerators" : "ePlugInCategory_None") << newLine
<< "#define JucePlugin_RTASManufacturerCode JucePlugin_ManufacturerCode" << newLine
<< "#define JucePlugin_RTASProductId JucePlugin_PluginCode" << newLine;
out << "#define JUCE_USE_VSTSDK_2_4 1" << newLine
<< newLine
<< "#endif // " << headerGuard << newLine;
}
void writePluginCharacteristicsFile (ProjectSaver& projectSaver)
{
MemoryOutputStream mem;
writePluginCharacteristics (projectSaver.getProject(), mem);
projectSaver.saveGeneratedFile (projectSaver.getProject().getPluginCharacteristicsFilename(), mem);
}
}
@@ -63,6 +139,64 @@ class JuceLibraryModule : public LibraryModule
public:
JuceLibraryModule() {}
void getHeaderFiles (Project& project, StringArray& includePaths, StringArray& headerGuards)
{
if (project.getJuceLinkageMode() != Project::notLinkedToJuce)
{
if (project.isUsingSingleTemplateFile()
|| project.isUsingMultipleTemplateFiles()
|| project.isUsingFullyAmalgamatedFile())
createMultipleIncludes (project, "juce_amalgamated.h", includePaths, headerGuards);
else
createMultipleIncludes (project, "juce.h", includePaths, headerGuards);
}
}
void createFiles (const ProjectExporter& exporter, ProjectSaver& projectSaver) const
{
const Project& project = exporter.getProject();
const String linkageMode (project.getJuceLinkageMode());
int numJuceSourceFiles = 0;
if (linkageMode == Project::useAmalgamatedJuce
|| linkageMode == Project::useAmalgamatedJuceViaSingleTemplate)
{
numJuceSourceFiles = 1;
}
else if (linkageMode == Project::useAmalgamatedJuceViaMultipleTemplates)
{
numJuceSourceFiles = project.getNumSeparateAmalgamatedFiles();
}
else
{
jassert (linkageMode == Project::notLinkedToJuce
|| linkageMode == Project::useLinkedJuce);
}
for (int i = 0; i <= project.getNumSeparateAmalgamatedFiles(); ++i)
{
String sourceWrapper (project.getJuceSourceFilenameRoot());
if (i != 0)
sourceWrapper << i;
sourceWrapper << (exporter.usesMMFiles() ? ".mm" : ".cpp");
if (numJuceSourceFiles > 0
&& ((i == 0 && numJuceSourceFiles == 1) || (i != 0 && numJuceSourceFiles > 1)))
{
MemoryOutputStream mem;
writeSourceWrapper (mem, const_cast<Project&> (project), i);
projectSaver.saveGeneratedFile (sourceWrapper, mem);
}
else
{
project.getGeneratedCodeFolder().getChildFile (sourceWrapper).deleteFile();
}
}
}
void addExtraCodeGroups (const ProjectExporter& exporter, Array<Project::Item>& groups) const
{
}
@@ -114,6 +248,83 @@ public:
}
}
}
private:
static void writeSourceWrapper (OutputStream& out, Project& project, int fileNumber)
{
const String appConfigFileName (project.getAppConfigFilename());
ProjectSaver::writeAutoGenWarningComment (out);
out << " This file pulls in all the Juce source code, and builds it using the settings" << newLine
<< " defined in " << appConfigFileName << "." << newLine
<< newLine
<< " If you want to change the method by which Juce is linked into your app, use the" << newLine
<< " Jucer to change it, rather than trying to edit this file directly." << newLine
<< newLine
<< "*/"
<< newLine
<< newLine
<< CodeHelpers::createIncludeStatement (appConfigFileName) << newLine;
if (fileNumber == 0)
writeInclude (project, out, project.isUsingFullyAmalgamatedFile() ? "juce_amalgamated.cpp"
: "amalgamation/juce_amalgamated_template.cpp");
else
writeInclude (project, out, "amalgamation/juce_amalgamated" + String (fileNumber) + ".cpp");
}
static void createMultipleIncludes (Project& project, const String& pathFromLibraryFolder,
StringArray& paths, StringArray& guards)
{
for (int i = project.getNumExporters(); --i >= 0;)
{
ScopedPointer <ProjectExporter> exporter (project.createExporter (i));
if (exporter != nullptr)
{
paths.add (exporter->getIncludePathForFileInJuceFolder (pathFromLibraryFolder, project.getAppIncludeFile()));
guards.add ("defined (" + exporter->getExporterIdentifierMacro() + ")");
}
}
}
static void writeInclude (Project& project, OutputStream& out, const String& pathFromJuceFolder)
{
StringArray paths, guards;
createMultipleIncludes (project, pathFromJuceFolder, paths, guards);
StringArray uniquePaths (paths);
uniquePaths.removeDuplicates (false);
if (uniquePaths.size() == 1)
{
out << "#include " << paths[0] << newLine;
}
else
{
int i = paths.size();
for (; --i >= 0;)
{
for (int j = i; --j >= 0;)
{
if (paths[i] == paths[j] && guards[i] == guards[j])
{
paths.remove (i);
guards.remove (i);
}
}
}
for (i = 0; i < paths.size(); ++i)
{
out << (i == 0 ? "#if " : "#elif ") << guards[i] << newLine
<< " #include " << paths[i] << newLine;
}
out << "#endif" << newLine;
}
}
};
//==============================================================================
@@ -122,6 +333,15 @@ class VSTLibraryModule : public LibraryModule
public:
VSTLibraryModule() {}
void createFiles (const ProjectExporter& exporter, ProjectSaver& projectSaver) const
{
writePluginCharacteristicsFile (projectSaver);
}
void getHeaderFiles (Project& project, StringArray& includePaths, StringArray& headerGuards)
{
}
void addExtraCodeGroups (const ProjectExporter& exporter, Array<Project::Item>& groups) const
{
Project::Item group (Project::Item::createGroup (const_cast<ProjectExporter&> (exporter).getProject(), "Juce VST Wrapper"));
@@ -167,6 +387,15 @@ class RTASLibraryModule : public LibraryModule
public:
RTASLibraryModule() {}
void createFiles (const ProjectExporter& exporter, ProjectSaver& projectSaver) const
{
writePluginCharacteristicsFile (projectSaver);
}
void getHeaderFiles (Project& project, StringArray& includePaths, StringArray& headerGuards)
{
}
void addExtraCodeGroups (const ProjectExporter& exporter, Array<Project::Item>& groups) const
{
if (exporter.isXcode() || exporter.isVisualStudio())
@@ -297,6 +526,15 @@ class AULibraryModule : public LibraryModule
public:
AULibraryModule() {}
void createFiles (const ProjectExporter& exporter, ProjectSaver& projectSaver) const
{
writePluginCharacteristicsFile (projectSaver);
}
void getHeaderFiles (Project& project, StringArray& includePaths, StringArray& headerGuards)
{
}
void addExtraCodeGroups (const ProjectExporter& exporter, Array<Project::Item>& groups) const
{
if (exporter.isXcode())


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

@@ -29,6 +29,7 @@
#include "../jucer_Headers.h"
#include "jucer_Project.h"
class ProjectExporter;
class ProjectSaver;
//==============================================================================
class LibraryModule
@@ -38,6 +39,8 @@ public:
virtual ~LibraryModule() {}
virtual void addExtraCodeGroups (const ProjectExporter& exporter, Array<Project::Item>& groups) const = 0;
virtual void createFiles (const ProjectExporter& exporter, ProjectSaver& projectSaver) const = 0;
virtual void getHeaderFiles (Project& project, StringArray& includePaths, StringArray& headerGuards) = 0;
virtual void addExtraSearchPaths (const ProjectExporter& exporter, StringArray& paths) const = 0;
virtual void createPropertyEditors (const ProjectExporter& exporter, Array <PropertyComponent*>& props) const = 0;
virtual void getConfigFlags (Project& project, OwnedArray<Project::ConfigFlag>& flags) = 0;


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

@@ -175,7 +175,12 @@ namespace CodeHelpers
String createIncludeStatement (const File& includeFile, const File& targetFile)
{
return "#include \"" + FileHelpers::unixStylePath (includeFile.getRelativePathFrom (targetFile.getParentDirectory())) + "\"";
return createIncludeStatement (FileHelpers::unixStylePath (includeFile.getRelativePathFrom (targetFile.getParentDirectory())));
}
String createIncludeStatement (const String& includePath)
{
return "#include \"" + includePath + "\"";
}
String makeHeaderGuardName (const File& file)


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

@@ -34,6 +34,7 @@ namespace CodeHelpers
String makeValidIdentifier (String s, bool capitalise, bool removeColons, bool allowTemplates);
String addEscapeChars (const String& text);
String createIncludeStatement (const File& includeFile, const File& targetFile);
String createIncludeStatement (const String& includePath);
String makeHeaderGuardName (const File& file);
String makeBinaryDataIdentifierName (const File& file);


+ 2
- 2
extras/JuceDemo/Builds/MacOSX/Juce Demo.xcodeproj/project.pbxproj View File

@@ -97,9 +97,9 @@
3369CDF7AFD79D6F3B3744B1 = { isa = PBXFileReference; lastKnownFileType = image.png; name = "juce_icon.png"; path = "../../Binary Data/juce_icon.png"; sourceTree = "SOURCE_ROOT"; };
C7327AD5191A22C1FBD4F5F9 = { isa = PBXFileReference; lastKnownFileType = file.xml; name = treedemo.xml; path = "../../Binary Data/treedemo.xml"; sourceTree = "SOURCE_ROOT"; };
EE37A0ECE471A928C6170F9B = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppConfig.h; path = ../../JuceLibraryCode/AppConfig.h; sourceTree = "SOURCE_ROOT"; };
A6B37799E63CCE882A3383FB = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JuceHeader.h; path = ../../JuceLibraryCode/JuceHeader.h; sourceTree = "SOURCE_ROOT"; };
E6EF5CE04768BA5B10050D51 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = BinaryData.cpp; path = ../../JuceLibraryCode/BinaryData.cpp; sourceTree = "SOURCE_ROOT"; };
CC7EB9777A4DE3408705625C = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = BinaryData.h; path = ../../JuceLibraryCode/BinaryData.h; sourceTree = "SOURCE_ROOT"; };
A6B37799E63CCE882A3383FB = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JuceHeader.h; path = ../../JuceLibraryCode/JuceHeader.h; sourceTree = "SOURCE_ROOT"; };
BA05C84C3258A1978AF3D357 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = JuceLibraryCode1.mm; path = ../../JuceLibraryCode/JuceLibraryCode1.mm; sourceTree = "SOURCE_ROOT"; };
F42C91375F3314CA6EE65697 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = JuceLibraryCode2.mm; path = ../../JuceLibraryCode/JuceLibraryCode2.mm; sourceTree = "SOURCE_ROOT"; };
4D526A336B2E97ED42CADAD7 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = JuceLibraryCode3.mm; path = ../../JuceLibraryCode/JuceLibraryCode3.mm; sourceTree = "SOURCE_ROOT"; };
@@ -148,9 +148,9 @@
7B2518B268DCBBF7B74F2B1D ); name = Source; sourceTree = "<group>"; };
4C2E644EAC72C263D09C74BB = { isa = PBXGroup; children = (
EE37A0ECE471A928C6170F9B,
A6B37799E63CCE882A3383FB,
E6EF5CE04768BA5B10050D51,
CC7EB9777A4DE3408705625C,
A6B37799E63CCE882A3383FB,
BA05C84C3258A1978AF3D357,
F42C91375F3314CA6EE65697,
4D526A336B2E97ED42CADAD7,


+ 1
- 1
extras/JuceDemo/Builds/VisualStudio2005/Juce Demo.vcproj View File

@@ -219,9 +219,9 @@
</Filter>
<Filter Name="Juce Library Code">
<File RelativePath="..\..\JuceLibraryCode\AppConfig.h"/>
<File RelativePath="..\..\JuceLibraryCode\JuceHeader.h"/>
<File RelativePath="..\..\JuceLibraryCode\BinaryData.cpp"/>
<File RelativePath="..\..\JuceLibraryCode\BinaryData.h"/>
<File RelativePath="..\..\JuceLibraryCode\JuceHeader.h"/>
<File RelativePath="..\..\JuceLibraryCode\JuceLibraryCode1.cpp"/>
<File RelativePath="..\..\JuceLibraryCode\JuceLibraryCode2.cpp"/>
<File RelativePath="..\..\JuceLibraryCode\JuceLibraryCode3.cpp"/>


+ 1
- 1
extras/JuceDemo/Builds/VisualStudio2008/Juce Demo.vcproj View File

@@ -219,9 +219,9 @@
</Filter>
<Filter Name="Juce Library Code">
<File RelativePath="..\..\JuceLibraryCode\AppConfig.h"/>
<File RelativePath="..\..\JuceLibraryCode\JuceHeader.h"/>
<File RelativePath="..\..\JuceLibraryCode\BinaryData.cpp"/>
<File RelativePath="..\..\JuceLibraryCode\BinaryData.h"/>
<File RelativePath="..\..\JuceLibraryCode\JuceHeader.h"/>
<File RelativePath="..\..\JuceLibraryCode\JuceLibraryCode1.cpp"/>
<File RelativePath="..\..\JuceLibraryCode\JuceLibraryCode2.cpp"/>
<File RelativePath="..\..\JuceLibraryCode\JuceLibraryCode3.cpp"/>


+ 1
- 1
extras/JuceDemo/Builds/VisualStudio2010/Juce Demo.vcxproj View File

@@ -161,8 +161,8 @@
<ClInclude Include="..\..\Source\demos\AudioDemoTabComponent.h"/>
<ClInclude Include="..\..\Source\demos\RenderingTestComponent.h"/>
<ClInclude Include="..\..\JuceLibraryCode\AppConfig.h"/>
<ClInclude Include="..\..\JuceLibraryCode\JuceHeader.h"/>
<ClInclude Include="..\..\JuceLibraryCode\BinaryData.h"/>
<ClInclude Include="..\..\JuceLibraryCode\JuceHeader.h"/>
</ItemGroup>
<ItemGroup>
<None Include=".\icon.ico"/>


+ 2
- 2
extras/JuceDemo/Builds/VisualStudio2010/Juce Demo.vcxproj.filters View File

@@ -150,10 +150,10 @@
<ClInclude Include="..\..\JuceLibraryCode\AppConfig.h">
<Filter>Juce Library Code</Filter>
</ClInclude>
<ClInclude Include="..\..\JuceLibraryCode\JuceHeader.h">
<ClInclude Include="..\..\JuceLibraryCode\BinaryData.h">
<Filter>Juce Library Code</Filter>
</ClInclude>
<ClInclude Include="..\..\JuceLibraryCode\BinaryData.h">
<ClInclude Include="..\..\JuceLibraryCode\JuceHeader.h">
<Filter>Juce Library Code</Filter>
</ClInclude>
</ItemGroup>


+ 2
- 2
extras/JuceDemo/Builds/iOS/Juce Demo.xcodeproj/project.pbxproj View File

@@ -89,9 +89,9 @@
3369CDF7AFD79D6F3B3744B1 = { isa = PBXFileReference; lastKnownFileType = image.png; name = "juce_icon.png"; path = "../../Binary Data/juce_icon.png"; sourceTree = "SOURCE_ROOT"; };
C7327AD5191A22C1FBD4F5F9 = { isa = PBXFileReference; lastKnownFileType = file.xml; name = treedemo.xml; path = "../../Binary Data/treedemo.xml"; sourceTree = "SOURCE_ROOT"; };
EE37A0ECE471A928C6170F9B = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppConfig.h; path = ../../JuceLibraryCode/AppConfig.h; sourceTree = "SOURCE_ROOT"; };
A6B37799E63CCE882A3383FB = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JuceHeader.h; path = ../../JuceLibraryCode/JuceHeader.h; sourceTree = "SOURCE_ROOT"; };
E6EF5CE04768BA5B10050D51 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = BinaryData.cpp; path = ../../JuceLibraryCode/BinaryData.cpp; sourceTree = "SOURCE_ROOT"; };
CC7EB9777A4DE3408705625C = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = BinaryData.h; path = ../../JuceLibraryCode/BinaryData.h; sourceTree = "SOURCE_ROOT"; };
A6B37799E63CCE882A3383FB = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JuceHeader.h; path = ../../JuceLibraryCode/JuceHeader.h; sourceTree = "SOURCE_ROOT"; };
BA05C84C3258A1978AF3D357 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = JuceLibraryCode1.mm; path = ../../JuceLibraryCode/JuceLibraryCode1.mm; sourceTree = "SOURCE_ROOT"; };
F42C91375F3314CA6EE65697 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = JuceLibraryCode2.mm; path = ../../JuceLibraryCode/JuceLibraryCode2.mm; sourceTree = "SOURCE_ROOT"; };
4D526A336B2E97ED42CADAD7 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = JuceLibraryCode3.mm; path = ../../JuceLibraryCode/JuceLibraryCode3.mm; sourceTree = "SOURCE_ROOT"; };
@@ -140,9 +140,9 @@
7B2518B268DCBBF7B74F2B1D ); name = Source; sourceTree = "<group>"; };
4C2E644EAC72C263D09C74BB = { isa = PBXGroup; children = (
EE37A0ECE471A928C6170F9B,
A6B37799E63CCE882A3383FB,
E6EF5CE04768BA5B10050D51,
CC7EB9777A4DE3408705625C,
A6B37799E63CCE882A3383FB,
BA05C84C3258A1978AF3D357,
F42C91375F3314CA6EE65697,
4D526A336B2E97ED42CADAD7,


+ 3
- 3
extras/JuceDemo/JuceLibraryCode/JuceHeader.h View File

@@ -10,8 +10,8 @@
*/
#ifndef __APPHEADERFILE_C6E440F8__
#define __APPHEADERFILE_C6E440F8__
#ifndef __APPHEADERFILE_SLVVV6J__
#define __APPHEADERFILE_SLVVV6J__
#include "AppConfig.h"
#include "../../../juce_amalgamated.h"
@@ -24,4 +24,4 @@ namespace ProjectInfo
const int versionNumber = 0x10000;
}
#endif // __APPHEADERFILE_C6E440F8__
#endif // __APPHEADERFILE_SLVVV6J__

+ 3
- 3
extras/amalgamator/JuceLibraryCode/JuceHeader.h View File

@@ -10,8 +10,8 @@
*/
#ifndef __APPHEADERFILE_F6BAAE14__
#define __APPHEADERFILE_F6BAAE14__
#ifndef __APPHEADERFILE_TVOT0OBQ__
#define __APPHEADERFILE_TVOT0OBQ__
#include "AppConfig.h"
#include "../../../juce_amalgamated.h"
@@ -23,4 +23,4 @@ namespace ProjectInfo
const int versionNumber = 0x10000;
}
#endif // __APPHEADERFILE_F6BAAE14__
#endif // __APPHEADERFILE_TVOT0OBQ__

+ 3
- 3
extras/audio plugin host/JuceLibraryCode/JuceHeader.h View File

@@ -10,8 +10,8 @@
*/
#ifndef __APPHEADERFILE_F44361BB__
#define __APPHEADERFILE_F44361BB__
#ifndef __APPHEADERFILE_NTE0XB0IJ__
#define __APPHEADERFILE_NTE0XB0IJ__
#include "AppConfig.h"
#include "../../../juce_amalgamated.h"
@@ -23,4 +23,4 @@ namespace ProjectInfo
const int versionNumber = 0x10000;
}
#endif // __APPHEADERFILE_F44361BB__
#endif // __APPHEADERFILE_NTE0XB0IJ__

+ 3
- 3
extras/audio plugins/demo/JuceLibraryCode/JuceHeader.h View File

@@ -10,8 +10,8 @@
*/
#ifndef __APPHEADERFILE_9C46E6CC__
#define __APPHEADERFILE_9C46E6CC__
#ifndef __APPHEADERFILE_0NRD9LLGO__
#define __APPHEADERFILE_0NRD9LLGO__
#include "AppConfig.h"
#include "../../../../juce_amalgamated.h"
@@ -23,4 +23,4 @@ namespace ProjectInfo
const int versionNumber = 0x10000;
}
#endif // __APPHEADERFILE_9C46E6CC__
#endif // __APPHEADERFILE_0NRD9LLGO__

+ 3
- 3
extras/audio plugins/demo/JuceLibraryCode/JucePluginCharacteristics.h View File

@@ -8,8 +8,8 @@
*/
#ifndef __PLUGINCHARACTERISTICS_D4EFFF1A__
#define __PLUGINCHARACTERISTICS_D4EFFF1A__
#ifndef __PLUGINCHARACTERISTICS_0NRD9LLGO__
#define __PLUGINCHARACTERISTICS_0NRD9LLGO__
#define JucePlugin_Build_VST 1 // (If you change this value, you'll also need to re-export the projects using the Jucer)
#define JucePlugin_Build_AU 1 // (If you change this value, you'll also need to re-export the projects using the Jucer)
@@ -45,4 +45,4 @@
#define JucePlugin_RTASProductId JucePlugin_PluginCode
#define JUCE_USE_VSTSDK_2_4 1
#endif // __PLUGINCHARACTERISTICS_D4EFFF1A__
#endif // __PLUGINCHARACTERISTICS_0NRD9LLGO__

+ 3
- 3
extras/binarybuilder/JuceLibraryCode/JuceHeader.h View File

@@ -10,8 +10,8 @@
*/
#ifndef __APPHEADERFILE_AC205C4C__
#define __APPHEADERFILE_AC205C4C__
#ifndef __APPHEADERFILE_3T6YQETY1__
#define __APPHEADERFILE_3T6YQETY1__
#include "AppConfig.h"
#include "../../../juce_amalgamated.h"
@@ -23,4 +23,4 @@ namespace ProjectInfo
const int versionNumber = 0x10000;
}
#endif // __APPHEADERFILE_AC205C4C__
#endif // __APPHEADERFILE_3T6YQETY1__

+ 3
- 3
extras/example projects/JuceLibraryCode/JuceHeader.h View File

@@ -10,8 +10,8 @@
*/
#ifndef __APPHEADERFILE_D9639818__
#define __APPHEADERFILE_D9639818__
#ifndef __APPHEADERFILE_TTAKTK1S__
#define __APPHEADERFILE_TTAKTK1S__
#include "AppConfig.h"
#include "../../../juce_amalgamated.h"
@@ -23,4 +23,4 @@ namespace ProjectInfo
const int versionNumber = 0x10000;
}
#endif // __APPHEADERFILE_D9639818__
#endif // __APPHEADERFILE_TTAKTK1S__

+ 2
- 2
juce_amalgamated.cpp View File

@@ -281982,8 +281982,8 @@ bool NSViewComponentPeer::handleKeyEvent (NSEvent* ev, bool isKeyDown)
String unmodified (nsStringToJuce ([ev charactersIgnoringModifiers]));
int keyCode = getKeyCodeFromEvent (ev);

//DBG ("unicode: " + unicode + " " + String::toHexString ((int) unicode[0]));
//DBG ("unmodified: " + unmodified + " " + String::toHexString ((int) unmodified[0]));
DBG ("unicode: " + unicode + " " + String::toHexString ((int) unicode[0]));
DBG ("unmodified: " + unmodified + " " + String::toHexString ((int) unmodified[0]));

if (unicode.isNotEmpty() || keyCode != 0)
{


Loading…
Cancel
Save