mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-23 01:44:22 +00:00
Introjucer: App icons are now specified per-exporter type rather than globally for the project.
This commit is contained in:
parent
767ff27307
commit
4e77678299
11 changed files with 138 additions and 103 deletions
|
|
@ -111,6 +111,8 @@ void Project::setMissingDefaultValues()
|
|||
getVersion() = "1.0.0";
|
||||
|
||||
updateOldStyleConfigList();
|
||||
moveOldPropertyFromProjectToAllExporters (Ids::bigIcon);
|
||||
moveOldPropertyFromProjectToAllExporters (Ids::smallIcon);
|
||||
|
||||
for (Project::ExporterIterator exporter (*this); exporter.next();)
|
||||
if (exporter->getNumConfigurations() == 0)
|
||||
|
|
@ -160,6 +162,17 @@ void Project::updateOldStyleConfigList()
|
|||
}
|
||||
}
|
||||
|
||||
void Project::moveOldPropertyFromProjectToAllExporters (Identifier name)
|
||||
{
|
||||
if (projectRoot.hasProperty (name))
|
||||
{
|
||||
for (Project::ExporterIterator exporter (*this); exporter.next();)
|
||||
exporter->settings.setProperty (name, projectRoot [name], nullptr);
|
||||
|
||||
projectRoot.removeProperty (name, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
void Project::addDefaultModules (bool shouldCopyFilesLocally)
|
||||
{
|
||||
addModule ("juce_core", shouldCopyFilesLocally);
|
||||
|
|
@ -337,32 +350,7 @@ void Project::createPropertyEditors (PropertyListBuilder& props)
|
|||
props.add (new TextPropertyComponent (getBundleIdentifier(), "Bundle Identifier", 256, false),
|
||||
"A unique identifier for this product, mainly for use in Mac builds. It should be something like 'com.yourcompanyname.yourproductname'");
|
||||
|
||||
{
|
||||
OwnedArray<Project::Item> images;
|
||||
findAllImageItems (images);
|
||||
|
||||
StringArray choices;
|
||||
Array<var> ids;
|
||||
|
||||
choices.add ("<None>");
|
||||
ids.add (var::null);
|
||||
choices.add (String::empty);
|
||||
ids.add (var::null);
|
||||
|
||||
for (int i = 0; i < images.size(); ++i)
|
||||
{
|
||||
choices.add (images.getUnchecked(i)->getName().toString());
|
||||
ids.add (images.getUnchecked(i)->getID());
|
||||
}
|
||||
|
||||
props.add (new ChoicePropertyComponent (getSmallIconImageItemID(), "Icon (small)", choices, ids),
|
||||
"Sets an icon to use for the executable.");
|
||||
|
||||
props.add (new ChoicePropertyComponent (getBigIconImageItemID(), "Icon (large)", choices, ids),
|
||||
"Sets an icon to use for the executable.");
|
||||
}
|
||||
|
||||
getProjectType().createPropertyEditors(*this, props);
|
||||
getProjectType().createPropertyEditors (*this, props);
|
||||
|
||||
props.add (new TextPropertyComponent (getProjectPreprocessorDefs(), "Preprocessor definitions", 32768, false),
|
||||
"Extra preprocessor definitions. Use the form \"NAME1=value NAME2=value\", using whitespace or commas to separate the items - to include a space or comma in a definition, precede it with a backslash.");
|
||||
|
|
@ -385,16 +373,6 @@ String Project::getVersionAsHex() const
|
|||
return "0x" + String::toHexString (value);
|
||||
}
|
||||
|
||||
Image Project::getBigIcon()
|
||||
{
|
||||
return getMainGroup().findItemWithID (getBigIconImageItemID().toString()).loadAsImageFile();
|
||||
}
|
||||
|
||||
Image Project::getSmallIcon()
|
||||
{
|
||||
return getMainGroup().findItemWithID (getSmallIconImageItemID().toString()).loadAsImageFile();
|
||||
}
|
||||
|
||||
StringPairArray Project::getPreprocessorDefs() const
|
||||
{
|
||||
return parsePreprocessorDefs (getProjectPreprocessorDefs().toString());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue