1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

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

This commit is contained in:
tpoole 2016-12-06 10:10:21 +00:00
parent 4d48dfed9d
commit 8cd578b0c6
4 changed files with 10 additions and 1 deletions

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;

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.");

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"; }

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);