Browse Source

Introjucer: Character type setting for MSVC export

tags/2021-05-28
jules 12 years ago
parent
commit
5d353d4dec
2 changed files with 22 additions and 1 deletions
  1. +21
    -1
      extras/Introjucer/Source/Project Saving/jucer_ProjectExport_MSVC.h
  2. +1
    -0
      extras/Introjucer/Source/Utility/jucer_PresetIDs.h

+ 21
- 1
extras/Introjucer/Source/Project Saving/jucer_ProjectExport_MSVC.h View File

@@ -144,6 +144,18 @@ protected:
String getIntermediatesPath() const { return config [Ids::intermediatesPath].toString(); }
Value getIntermediatesPathValue() { return getValue (Ids::intermediatesPath); }
String getCharacterSet() const
{
String charSet (config [Ids::characterSet].toString());
if (charSet.isEmpty())
charSet = "MultiByte";
return charSet;
}
Value getCharacterSetValue() { return getValue (Ids::characterSet); }
String getOutputFilename (const String& suffix, bool forceSuffix) const
{
const String target (File::createLegalFileName (getTargetBinaryNameString().trim()));
@@ -190,6 +202,14 @@ protected:
props.add (new TextPropertyComponent (getPrebuildCommand(), "Pre-build Command", 2048, false));
props.add (new TextPropertyComponent (getPostbuildCommand(), "Post-build Command", 2048, false));
props.add (new BooleanPropertyComponent (shouldGenerateManifestValue(), "Manifest", "Generate Manifest"));
{
const char* const characterSetNames[] = { "Default", "MultiByte", "Unicode", nullptr };
const var charSets[] = { var::null, "MultiByte", "Unicode", };
props.add (new ChoicePropertyComponent (getCharacterSetValue(), "Character Set",
StringArray (characterSetNames), Array<var> (charSets, numElementsInArray (charSets))));
}
}
};
@@ -1065,7 +1085,7 @@ protected:
e->setAttribute ("Label", "Configuration");
e->createNewChildElement ("ConfigurationType")->addTextElement (getProjectType());
e->createNewChildElement ("UseOfMfc")->addTextElement ("false");
e->createNewChildElement ("CharacterSet")->addTextElement ("MultiByte");
e->createNewChildElement ("CharacterSet")->addTextElement (config.getCharacterSet());
if (! (config.isDebug() || config.shouldDisableWholeProgramOpt()))
e->createNewChildElement ("WholeProgramOptimization")->addTextElement ("true");


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

@@ -135,6 +135,7 @@ namespace Ids
DECLARE_ID (colour);
DECLARE_ID (userNotes);
DECLARE_ID (maxBinaryFileSize);
DECLARE_ID (characterSet);
const Identifier ID ("id");
const Identifier class_ ("class");


Loading…
Cancel
Save