Browse Source

Added the ability to set a custom BinaryData namespace in the Projucer

tags/2021-05-28
tpoole 8 years ago
parent
commit
8cd578b0c6
4 changed files with 10 additions and 1 deletions
  1. +5
    -1
      extras/Projucer/Source/Project Saving/jucer_ProjectSaver.h
  2. +3
    -0
      extras/Projucer/Source/Project/jucer_Project.cpp
  3. +1
    -0
      extras/Projucer/Source/Project/jucer_Project.h
  4. +1
    -0
      extras/Projucer/Source/Utility/jucer_PresetIDs.h

+ 5
- 1
extras/Projucer/Source/Project Saving/jucer_ProjectSaver.h View File

@@ -554,7 +554,11 @@ private:
if (resourceFile.getNumFiles() > 0)
{
resourceFile.setClassName ("BinaryData");
auto dataNamespace = project.binaryDataNamespace().toString().trim();
if (dataNamespace.isEmpty())
dataNamespace = "BinaryData";
resourceFile.setClassName (dataNamespace);
Array<File> binaryDataFiles;


+ 3
- 0
extras/Projucer/Source/Project/jucer_Project.cpp View File

@@ -502,6 +502,9 @@ void Project::createPropertyEditors (PropertyListBuilder& props)
props.add (new BooleanPropertyComponent (shouldIncludeBinaryInAppConfig(), "Include Binary",
"Include BinaryData.h in the AppConfig.h file"));
props.add (new TextPropertyComponent (binaryDataNamespace(), "BinaryData Namespace", 256, false),
"The namespace containing the binary assests. If left empty this defaults to \"BinaryData\".");
props.add (new TextPropertyComponent (getProjectPreprocessorDefs(), "Preprocessor definitions", 32768, true),
"Global preprocessor definitions. Use the form \"NAME1=value NAME2=value\", using whitespace, commas, or "
"new-lines to separate the items - to include a space or comma in a definition, precede it with a backslash.");


+ 1
- 0
extras/Projucer/Source/Project/jucer_Project.h View File

@@ -113,6 +113,7 @@ public:
File getBinaryDataHeaderFile() const { return getBinaryDataCppFile (0).withFileExtension (".h"); }
Value getMaxBinaryFileSize() { return getProjectValue (Ids::maxBinaryFileSize); }
Value shouldIncludeBinaryInAppConfig() { return getProjectValue (Ids::includeBinaryInAppConfig); }
Value binaryDataNamespace() { return getProjectValue (Ids::binaryDataNamespace); }
//==============================================================================
String getAppConfigFilename() const { return "AppConfig.h"; }


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

@@ -182,6 +182,7 @@ namespace Ids
DECLARE_ID (userNotes);
DECLARE_ID (maxBinaryFileSize);
DECLARE_ID (includeBinaryInAppConfig);
DECLARE_ID (binaryDataNamespace);
DECLARE_ID (characterSet);
DECLARE_ID (JUCERPROJECT);
DECLARE_ID (MAINGROUP);


Loading…
Cancel
Save