mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
parent
bc3d1ca7d6
commit
f321759eff
5 changed files with 7 additions and 7 deletions
|
|
@ -215,7 +215,7 @@ Image* BinaryResources::getImageFromCache (const String& name) const
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BinaryResources::loadFromCpp (const String& cppFile)
|
void BinaryResources::loadFromCpp (const File& cppFileLocation, const String& cppFile)
|
||||||
{
|
{
|
||||||
StringArray cpp;
|
StringArray cpp;
|
||||||
cpp.addLines (cppFile);
|
cpp.addLines (cppFile);
|
||||||
|
|
@ -233,7 +233,7 @@ void BinaryResources::loadFromCpp (const String& cppFile)
|
||||||
|
|
||||||
const String resourceName (tokens[0]);
|
const String resourceName (tokens[0]);
|
||||||
const int size = tokens[1].getIntValue();
|
const int size = tokens[1].getIntValue();
|
||||||
const String originalFileName (tokens[2].unquoted());
|
const String originalFileName (cppFileLocation.getSiblingFile (tokens[2].unquoted()).getFullPathName());
|
||||||
|
|
||||||
jassert (resourceName.isNotEmpty() && size > 0);
|
jassert (resourceName.isNotEmpty() && size > 0);
|
||||||
|
|
||||||
|
|
@ -302,7 +302,7 @@ void BinaryResources::fillInGeneratedCode (GeneratedCode& code) const
|
||||||
const MemoryBlock& mb = resources[i]->data;
|
const MemoryBlock& mb = resources[i]->data;
|
||||||
|
|
||||||
defs << "// JUCER_RESOURCE: " << name << ", " << mb.getSize()
|
defs << "// JUCER_RESOURCE: " << name << ", " << mb.getSize()
|
||||||
<< ", \"" << resources[i]->originalFilename << "\"\n";
|
<< ", \"" << File (resources[i]->originalFilename).getRelativePathFrom (code.document->getFile()) << "\"\n";
|
||||||
|
|
||||||
String line1;
|
String line1;
|
||||||
line1 << "static const unsigned char resource_"
|
line1 << "static const unsigned char resource_"
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ public:
|
||||||
|
|
||||||
const BinaryResources& operator= (const BinaryResources& other);
|
const BinaryResources& operator= (const BinaryResources& other);
|
||||||
|
|
||||||
void loadFromCpp (const String& cpp);
|
void loadFromCpp (const File& cppFileLocation, const String& cpp);
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
struct BinaryResource
|
struct BinaryResource
|
||||||
|
|
|
||||||
|
|
@ -420,7 +420,7 @@ const String JucerDocument::loadDocument (const File& file)
|
||||||
|
|
||||||
const String cppFileString (cppFile.loadFileAsString());
|
const String cppFileString (cppFile.loadFileAsString());
|
||||||
|
|
||||||
resources.loadFromCpp (cppFileString);
|
resources.loadFromCpp (file, cppFileString);
|
||||||
|
|
||||||
XmlElement* const xml = pullMetaDataFromCppFile (cppFileString);
|
XmlElement* const xml = pullMetaDataFromCppFile (cppFileString);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
|
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
|
||||||
and re-saved.
|
and re-saved.
|
||||||
|
|
||||||
Jucer version: 1.10
|
Jucer version: 1.11
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
|
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
|
||||||
and re-saved.
|
and re-saved.
|
||||||
|
|
||||||
Jucer version: 1.10
|
Jucer version: 1.11
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue