mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Projucer: Made the "Custom Launch Storyboard" setting in the iOS exporter take a path to the .storyboard file to be used relative to the project root folder and add this file as an Xcode resource directly
This commit is contained in:
parent
bbe49f6b36
commit
2fd7c587ad
1 changed files with 23 additions and 9 deletions
|
|
@ -217,9 +217,9 @@ public:
|
|||
"a launch storyboard from being used.");
|
||||
|
||||
props.add (new TextPropertyComponent (customLaunchStoryboardValue, "Custom Launch Storyboard", 256, false),
|
||||
"If this field is not empty then the specified launch storyboard will be used for the app's launch screen, "
|
||||
"otherwise a default blank launch storyboard will be generated. This should be the filename without the "
|
||||
"\".storyboard\" extension and the file should be added to the project's Xcode resources.");
|
||||
"If this field is not empty then the specified launch storyboard file will be added to the project as an Xcode "
|
||||
"resource and will be used for the app's launch screen, otherwise a default blank launch storyboard will be used. "
|
||||
"The file path should be relative to the project folder.");
|
||||
}
|
||||
|
||||
props.add (new TextPropertyComponent (customXcodeResourceFoldersValue, "Custom Xcode Resource Folders", 8192, true),
|
||||
|
|
@ -1442,7 +1442,8 @@ public:
|
|||
{
|
||||
auto customStoryboard = owner.getCustomLaunchStoryboardString();
|
||||
|
||||
addPlistDictionaryKey (dict, "UILaunchStoryboardName", customStoryboard.isNotEmpty() ? customStoryboard
|
||||
addPlistDictionaryKey (dict, "UILaunchStoryboardName", customStoryboard.isNotEmpty() ? customStoryboard.fromLastOccurrenceOf ("/", false, false)
|
||||
.upToLastOccurrenceOf (".storyboard", false, false)
|
||||
: owner.getDefaultLaunchStoryboardName());
|
||||
}
|
||||
}
|
||||
|
|
@ -1911,8 +1912,17 @@ private:
|
|||
{
|
||||
addXcassets();
|
||||
|
||||
if (getCustomXcassetsFolderString().isEmpty() && getCustomLaunchStoryboardString().isEmpty())
|
||||
writeDefaultLaunchStoryboardFile();
|
||||
if (getCustomXcassetsFolderString().isEmpty())
|
||||
{
|
||||
auto customLaunchStoryboard = getCustomLaunchStoryboardString();
|
||||
|
||||
if (customLaunchStoryboard.isEmpty())
|
||||
writeDefaultLaunchStoryboardFile();
|
||||
else if (getProject().getProjectFolder().getChildFile (customLaunchStoryboard).existsAsFile())
|
||||
addLaunchStoryboardFileReference (RelativePath (customLaunchStoryboard, RelativePath::projectFolder)
|
||||
.rebased (getProject().getProjectFolder(), getTargetFolder(), RelativePath::buildTargetFolder)
|
||||
.toUnixStyle());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -3515,9 +3525,13 @@ private:
|
|||
|
||||
overwriteFileIfDifferentOrThrow (storyboardFile, mo);
|
||||
|
||||
auto path = RelativePath (storyboardFile, getTargetFolder(), RelativePath::buildTargetFolder).toUnixStyle();
|
||||
auto refID = addFileReference (path);
|
||||
auto fileID = addBuildFile (path, refID, false, false);
|
||||
addLaunchStoryboardFileReference (RelativePath (storyboardFile, getTargetFolder(), RelativePath::buildTargetFolder).toUnixStyle());
|
||||
}
|
||||
|
||||
void addLaunchStoryboardFileReference (const String& relativePath) const
|
||||
{
|
||||
auto refID = addFileReference (relativePath);
|
||||
auto fileID = addBuildFile (relativePath, refID, false, false);
|
||||
|
||||
resourceIDs.add (fileID);
|
||||
resourceFileRefs.add (refID);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue