Browse Source

Introjucer: tidied up optimisation level descriptions.

tags/2021-05-28
jules 13 years ago
parent
commit
84e87f7391
8 changed files with 46 additions and 18 deletions
  1. +1
    -1
      extras/Introjucer/Builds/VisualStudio2005/The Introjucer.vcproj
  2. +1
    -1
      extras/Introjucer/Builds/VisualStudio2008/The Introjucer.vcproj
  3. +1
    -1
      extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj
  4. +2
    -2
      extras/Introjucer/JuceLibraryCode/BinaryData.cpp
  5. +1
    -1
      extras/Introjucer/JuceLibraryCode/BinaryData.h
  6. +23
    -7
      extras/Introjucer/Source/Project Saving/jucer_ProjectExport_MSVC.h
  7. +9
    -5
      extras/Introjucer/Source/Project Saving/jucer_ProjectExporter.cpp
  8. +8
    -0
      extras/Introjucer/Source/Project Saving/jucer_ProjectExporter.h

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

@@ -86,7 +86,7 @@
TypeLibraryName="$(IntDir)\Introjucer.tlb"
HeaderFileName=""/>
<Tool Name="VCCLCompilerTool"
Optimization="2"
Optimization="3"
InlineFunctionExpansion="1"
StringPooling="true"
AdditionalIncludeDirectories="..\..\JuceLibraryCode"


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

@@ -86,7 +86,7 @@
TypeLibraryName="$(IntDir)\Introjucer.tlb"
HeaderFileName=""/>
<Tool Name="VCCLCompilerTool"
Optimization="2"
Optimization="3"
InlineFunctionExpansion="1"
StringPooling="true"
AdditionalIncludeDirectories="..\..\JuceLibraryCode"


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

@@ -93,7 +93,7 @@
<HeaderFileName/>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<Optimization>Full</Optimization>
<AdditionalIncludeDirectories>..\..\JuceLibraryCode;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;JUCER_VS2010_78A501D=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>


+ 2
- 2
extras/Introjucer/JuceLibraryCode/BinaryData.cpp View File

@@ -19,7 +19,7 @@ static const unsigned char temp_43731c40[] =
"copyAU=`nm -g \"$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH\" | grep -i 'AudioUnit' | wc -l`\r\n"
"copyVST=`nm -g \"$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH\" | grep -i 'VSTPlugin' | wc -l`\r\n"
"copyRTAS=`nm -g \"$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH\" | grep -i 'CProcess' | wc -l`\r\n"
"copyAAX=`nm -g \"$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH\" | grep -i 'GetEffectDescriptions' | wc -l`\r\n"
"copyAAX=`nm -g \"$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH\" | grep -i 'ACFStartup' | wc -l`\r\n"
"\r\n"
"if [ $copyAU -gt 0 ]; then\r\n"
" echo \"Copying to AudioUnit folder...\"\r\n"
@@ -1011,7 +1011,7 @@ const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) throw
switch (hash)
{
case 0x44be9398: numBytes = 2112; return AudioPluginXCodeScript_txt;
case 0x44be9398: numBytes = 2101; return AudioPluginXCodeScript_txt;
case 0x4a0cfd09: numBytes = 151; return background_tile_png;
case 0x763d39dc: numBytes = 1050; return colourscheme_dark_xml;
case 0xe8b08520: numBytes = 1050; return colourscheme_light_xml;


+ 1
- 1
extras/Introjucer/JuceLibraryCode/BinaryData.h View File

@@ -7,7 +7,7 @@
namespace BinaryData
{
extern const char* AudioPluginXCodeScript_txt;
const int AudioPluginXCodeScript_txtSize = 2112;
const int AudioPluginXCodeScript_txtSize = 2101;
extern const char* background_tile_png;
const int background_tile_pngSize = 151;


+ 23
- 7
extras/Introjucer/Source/Project Saving/jucer_ProjectExport_MSVC.h View File

@@ -745,8 +745,7 @@ protected:
{
XmlElement* compiler = createToolElement (xml, "VCCLCompilerTool");
const int optimiseLevel = config.getOptimisationLevelInt();
compiler->setAttribute ("Optimization", optimiseLevel <= 1 ? "0" : (optimiseLevel == 2 ? "1" : "3"));
compiler->setAttribute ("Optimization", getOptimisationLevelString (config.getOptimisationLevelInt()));
if (isDebug)
{
@@ -883,6 +882,16 @@ protected:
dynamic_cast <const MSVCBuildConfiguration&> (*config));
}
static const char* getOptimisationLevelString (int level)
{
switch (level)
{
case optimiseMaxSpeed: return "3";
case optimiseMinSize: return "1";
default: return "0";
}
}
//==============================================================================
JUCE_DECLARE_NON_COPYABLE (MSVCProjectExporterVC2008)
};
@@ -1164,12 +1173,9 @@ protected:
{
XmlElement* cl = group->createNewChildElement ("ClCompile");
const int optimiseLevel = config.getOptimisationLevelInt();
cl->createNewChildElement ("Optimization")->addTextElement (optimiseLevel <= 1 ? "Disabled"
: optimiseLevel == 2 ? "MinSpace"
: "Full");
cl->createNewChildElement ("Optimization")->addTextElement (getOptimisationLevelString (config.getOptimisationLevelInt()));
if (isDebug && optimiseLevel <= 1)
if (isDebug && config.getOptimisationLevelInt() <= optimisationOff)
cl->createNewChildElement ("DebugInformationFormat")->addTextElement (is64Bit (config) ? "ProgramDatabase"
: "EditAndContinue");
@@ -1310,6 +1316,16 @@ protected:
return String::empty;
}
static const char* getOptimisationLevelString (int level)
{
switch (level)
{
case optimiseMaxSpeed: return "Full";
case optimiseMinSize: return "MinSpace";
default: return "Disabled";
}
}
//==============================================================================
void addFilesToCompile (const Project::Item& projectItem, XmlElement& cpps, XmlElement& headers, XmlElement& otherFiles) const
{


+ 9
- 5
extras/Introjucer/Source/Project Saving/jucer_ProjectExporter.cpp View File

@@ -403,7 +403,7 @@ void ProjectExporter::createDefaultConfigs()
config->getNameValue() = debugConfig ? "Debug" : "Release";
config->isDebugValue() = debugConfig;
config->getOptimisationLevel() = debugConfig ? 1 : 2;
config->getOptimisationLevel() = debugConfig ? optimisationOff : optimiseMinSize;
config->getTargetBinaryName() = project.getProjectFilenameRoot();
}
}
@@ -508,8 +508,12 @@ ProjectExporter::BuildConfiguration::~BuildConfiguration()
String ProjectExporter::BuildConfiguration::getGCCOptimisationFlag() const
{
const int level = getOptimisationLevelInt();
return String (level <= 1 ? "0" : (level == 2 ? "s" : "3"));
switch (getOptimisationLevelInt())
{
case optimiseMaxSpeed: return "3";
case optimiseMinSize: return "s";
default: return "0";
}
}
void ProjectExporter::BuildConfiguration::createPropertyEditors (PropertyListBuilder& props)
@@ -520,8 +524,8 @@ void ProjectExporter::BuildConfiguration::createPropertyEditors (PropertyListBui
props.add (new BooleanPropertyComponent (isDebugValue(), "Debug mode", "Debugging enabled"),
"If enabled, this means that the configuration should be built with debug synbols.");
const char* optimisationLevels[] = { "No optimisation", "Optimise for size and speed", "Optimise for maximum speed", 0 };
const int optimisationLevelValues[] = { 1, 2, 3, 0 };
const char* optimisationLevels[] = { "No optimisation", "Minimise size", "Maximise speed", 0 };
const int optimisationLevelValues[] = { optimisationOff, optimiseMinSize, optimiseMaxSpeed, 0 };
props.add (new ChoicePropertyComponent (getOptimisationLevel(), "Optimisation",
StringArray (optimisationLevels), Array<var> (optimisationLevelValues)),
"The optimisation level for this configuration");


+ 8
- 0
extras/Introjucer/Source/Project Saving/jucer_ProjectExporter.h View File

@@ -276,6 +276,14 @@ public:
ValueTree settings;
//==============================================================================
enum OptimisationLevel
{
optimisationOff = 1,
optimiseMinSize = 2,
optimiseMaxSpeed = 3
};
protected:
//==============================================================================
String name;


Loading…
Cancel
Save