void Project::setMissingDefaultValues() { if (! projectRoot.hasProperty (ComponentBuilder::idProperty)) projectRoot.setProperty (ComponentBuilder::idProperty, createAlphaNumericUID(), nullptr); // Create main file group if missing if (! projectRoot.getChildWithName (Tags::projectMainGroup).isValid()) { Item mainGroup (*this, ValueTree (Tags::projectMainGroup)); projectRoot.addChild (mainGroup.state, 0, 0); } getMainGroup().initialiseMissingProperties(); if (getDocumentTitle().isEmpty()) setTitle ("Juce Project"); if (! projectRoot.hasProperty (Ids::projectType)) getProjectTypeValue() = ProjectType::getGUIAppTypeName(); if (! projectRoot.hasProperty (Ids::version)) getVersionValue() = "1.0.0"; updateOldStyleConfigList(); moveOldPropertyFromProjectToAllExporters (Ids::bigIcon); moveOldPropertyFromProjectToAllExporters (Ids::smallIcon); for (Project::ExporterIterator exporter (*this); exporter.next();) if (exporter->getNumConfigurations() == 0) exporter->createDefaultConfigs(); if (! projectRoot.getChildWithName (Tags::exporters).isValid()) createDefaultExporters(); getProjectType().setMissingProjectProperties (*this); if (! projectRoot.hasProperty (Ids::bundleIdentifier)) setBundleIdentifierToDefault(); if (! projectRoot.getChildWithName (Tags::modulesGroup).isValid()) addDefaultModules (false); }
void Project::setMissingDefaultValues() { if (! projectRoot.hasProperty (Ids::ID)) projectRoot.setProperty (Ids::ID, createAlphaNumericUID(), nullptr); // Create main file group if missing if (! projectRoot.getChildWithName (Ids::MAINGROUP).isValid()) { Item mainGroup (*this, ValueTree (Ids::MAINGROUP), false); projectRoot.addChild (mainGroup.state, 0, 0); } getMainGroup().initialiseMissingProperties(); if (getDocumentTitle().isEmpty()) setTitle ("JUCE Project"); if (! projectRoot.hasProperty (Ids::projectType)) getProjectTypeValue() = ProjectType_GUIApp::getTypeName(); if (! projectRoot.hasProperty (Ids::version)) getVersionValue() = "1.0.0"; updateOldStyleConfigList(); moveOldPropertyFromProjectToAllExporters (Ids::bigIcon); moveOldPropertyFromProjectToAllExporters (Ids::smallIcon); if (getProjectType().isAudioPlugin()) setMissingAudioPluginDefaultValues(); getModules().sortAlphabetically(); if (getBundleIdentifier().toString().isEmpty()) getBundleIdentifier() = getDefaultBundleIdentifier(); if (shouldIncludeBinaryInAppConfig() == var::null) shouldIncludeBinaryInAppConfig() = true; ProjucerApplication::getApp().updateNewlyOpenedProject (*this); }
void Project::setMissingDefaultValues() { if (! projectRoot.hasProperty (Ids::ID)) projectRoot.setProperty (Ids::ID, createAlphaNumericUID(), nullptr); // Create main file group if missing if (! projectRoot.getChildWithName (Tags::projectMainGroup).isValid()) { Item mainGroup (*this, ValueTree (Tags::projectMainGroup)); projectRoot.addChild (mainGroup.state, 0, 0); } getMainGroup().initialiseMissingProperties(); if (getDocumentTitle().isEmpty()) setTitle ("JUCE Project"); if (! projectRoot.hasProperty (Ids::projectType)) getProjectTypeValue() = ProjectType::getGUIAppTypeName(); if (! projectRoot.hasProperty (Ids::version)) getVersionValue() = "1.0.0"; updateOldStyleConfigList(); moveOldPropertyFromProjectToAllExporters (Ids::bigIcon); moveOldPropertyFromProjectToAllExporters (Ids::smallIcon); getProjectType().setMissingProjectProperties (*this); if (! projectRoot.getChildWithName (Tags::modulesGroup).isValid()) addDefaultModules (false); if (getBundleIdentifier().toString().isEmpty()) getBundleIdentifier() = getDefaultBundleIdentifier(); IntrojucerApp::getApp().updateNewlyOpenedProject (*this); }