diff --git a/extras/the jucer/src/model/jucer_BinaryResources.cpp b/extras/the jucer/src/model/jucer_BinaryResources.cpp index 4e04a8a654..0adfbdd447 100644 --- a/extras/the jucer/src/model/jucer_BinaryResources.cpp +++ b/extras/the jucer/src/model/jucer_BinaryResources.cpp @@ -215,7 +215,7 @@ Image* BinaryResources::getImageFromCache (const String& name) const return 0; } -void BinaryResources::loadFromCpp (const String& cppFile) +void BinaryResources::loadFromCpp (const File& cppFileLocation, const String& cppFile) { StringArray cpp; cpp.addLines (cppFile); @@ -233,7 +233,7 @@ void BinaryResources::loadFromCpp (const String& cppFile) const String resourceName (tokens[0]); 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); @@ -302,7 +302,7 @@ void BinaryResources::fillInGeneratedCode (GeneratedCode& code) const const MemoryBlock& mb = resources[i]->data; defs << "// JUCER_RESOURCE: " << name << ", " << mb.getSize() - << ", \"" << resources[i]->originalFilename << "\"\n"; + << ", \"" << File (resources[i]->originalFilename).getRelativePathFrom (code.document->getFile()) << "\"\n"; String line1; line1 << "static const unsigned char resource_" diff --git a/extras/the jucer/src/model/jucer_BinaryResources.h b/extras/the jucer/src/model/jucer_BinaryResources.h index 6ecfeb45ca..e1eac4fea3 100644 --- a/extras/the jucer/src/model/jucer_BinaryResources.h +++ b/extras/the jucer/src/model/jucer_BinaryResources.h @@ -49,7 +49,7 @@ public: const BinaryResources& operator= (const BinaryResources& other); - void loadFromCpp (const String& cpp); + void loadFromCpp (const File& cppFileLocation, const String& cpp); //============================================================================== struct BinaryResource diff --git a/extras/the jucer/src/model/jucer_JucerDocument.cpp b/extras/the jucer/src/model/jucer_JucerDocument.cpp index f829bf1415..98cd408a07 100644 --- a/extras/the jucer/src/model/jucer_JucerDocument.cpp +++ b/extras/the jucer/src/model/jucer_JucerDocument.cpp @@ -420,7 +420,7 @@ const String JucerDocument::loadDocument (const File& file) const String cppFileString (cppFile.loadFileAsString()); - resources.loadFromCpp (cppFileString); + resources.loadFromCpp (file, cppFileString); XmlElement* const xml = pullMetaDataFromCppFile (cppFileString); diff --git a/extras/the jucer/src/templates/jucer_ComponentTemplate.cpp b/extras/the jucer/src/templates/jucer_ComponentTemplate.cpp index 20b460c974..e28a59b218 100644 --- a/extras/the jucer/src/templates/jucer_ComponentTemplate.cpp +++ b/extras/the jucer/src/templates/jucer_ComponentTemplate.cpp @@ -9,7 +9,7 @@ the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded and re-saved. - Jucer version: 1.10 + Jucer version: 1.11 ------------------------------------------------------------------------------ diff --git a/extras/the jucer/src/templates/jucer_ComponentTemplate.h b/extras/the jucer/src/templates/jucer_ComponentTemplate.h index c5f38c7a5f..e7027396cc 100644 --- a/extras/the jucer/src/templates/jucer_ComponentTemplate.h +++ b/extras/the jucer/src/templates/jucer_ComponentTemplate.h @@ -9,7 +9,7 @@ the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded and re-saved. - Jucer version: 1.10 + Jucer version: 1.11 ------------------------------------------------------------------------------