//============================================================================== Result Project::loadDocument (const File& file) { ScopedPointer<XmlElement> xml (XmlDocument::parse (file)); if (xml == nullptr || ! xml->hasTagName (Ids::JUCERPROJECT.toString())) return Result::fail ("Not a valid Jucer project!"); ValueTree newTree (ValueTree::fromXml (*xml)); if (! newTree.hasType (Ids::JUCERPROJECT)) return Result::fail ("The document contains errors and couldn't be parsed!"); registerRecentFile (file); enabledModulesList = nullptr; projectRoot = newTree; removeDefunctExporters(); setMissingDefaultValues(); updateOldModulePaths(); setChangedFlag (false); if (! ProjucerApplication::getApp().isRunningCommandLine) warnAboutOldProjucerVersion(); return Result::ok(); }
Result Project::saveProject (const File& file, bool isCommandLineApp) { updateProjectSettings(); sanitiseConfigFlags(); if (! isCommandLineApp) registerRecentFile (file); ProjectSaver saver (*this, file); return saver.save (! isCommandLineApp); }
Result Project::saveProject (const File& file, bool isCommandLineApp) { if (isSaving) return Result::ok(); updateProjectSettings(); sanitiseConfigFlags(); if (! isCommandLineApp) registerRecentFile (file); const ScopedValueSetter<bool> vs (isSaving, true, false); ProjectSaver saver (*this, file); return saver.save (! isCommandLineApp); }
Result Project::loadDocument (const File& file) { ScopedPointer <XmlElement> xml (XmlDocument::parse (file)); if (xml == nullptr || ! xml->hasTagName (Tags::projectRoot.toString())) return Result::fail ("Not a valid Jucer project!"); ValueTree newTree (ValueTree::fromXml (*xml)); if (! newTree.hasType (Tags::projectRoot)) return Result::fail ("The document contains errors and couldn't be parsed!"); registerRecentFile (file); projectRoot = newTree; removeDefunctExporters(); setMissingDefaultValues(); setChangedFlag (false); return Result::ok(); }