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(), 0); // Create main file group if missing if (! projectRoot.getChildWithName (Tags::projectMainGroup).isValid()) { Item mainGroup (*this, ValueTree (Tags::projectMainGroup)); projectRoot.addChild (mainGroup.getNode(), 0, 0); } getMainGroup().initialiseNodeValues(); if (getDocumentTitle().isEmpty()) setTitle ("Juce Project"); if (! projectRoot.hasProperty (Ids::projectType)) getProjectType() = application; if (! projectRoot.hasProperty (Ids::version)) getVersion() = "1.0.0"; if (! projectRoot.hasProperty (Ids::juceLinkage)) getJuceLinkageModeValue() = useAmalgamatedJuceViaMultipleTemplates; const String juceFolderPath (getRelativePathForFile (StoredSettings::getInstance()->getLastKnownJuceFolder())); // Create configs group if (! projectRoot.getChildWithName (Tags::configurations).isValid()) { projectRoot.addChild (ValueTree (Tags::configurations), 0, 0); createDefaultConfigs(); } if (! projectRoot.getChildWithName (Tags::exporters).isValid()) createDefaultExporters(); const String sanitisedProjectName (CodeHelpers::makeValidIdentifier (getProjectName().toString(), false, true, false)); if (! projectRoot.hasProperty (Ids::buildVST)) { shouldBuildVST() = true; shouldBuildRTAS() = false; shouldBuildAU() = true; getPluginName() = getProjectName().toString(); getPluginDesc() = getProjectName().toString(); getPluginManufacturer() = "yourcompany"; getPluginManufacturerCode() = "Manu"; getPluginCode() = "Plug"; getPluginChannelConfigs() = "{1, 1}, {2, 2}"; getPluginIsSynth() = false; getPluginWantsMidiInput() = false; getPluginProducesMidiOut() = false; getPluginSilenceInProducesSilenceOut() = false; getPluginTailLengthSeconds() = 0; getPluginEditorNeedsKeyFocus() = false; getPluginAUExportPrefix() = sanitisedProjectName + "AU"; getPluginAUCocoaViewClassName() = sanitisedProjectName + "AU_V1"; getPluginRTASCategory() = String::empty; } if (! projectRoot.hasProperty (Ids::bundleIdentifier)) setBundleIdentifierToDefault(); }