Implements switch (--help and --resources), and copying defaultfilters.omwaddon.project. Seems to work.

This commit is contained in:
Marek Kochanowicz 2013-10-17 18:21:41 +02:00
parent 3000386443
commit a7002e8a09
6 changed files with 23 additions and 27 deletions

View file

@ -2146,10 +2146,8 @@ void CSMDoc::Document::createBase()
}
}
CSMDoc::Document::Document (const Files::ConfigurationManager& configuration,
const std::vector<boost::filesystem::path>& files,
const boost::filesystem::path& savePath, bool new_)
: mSavePath (savePath), mContentFiles (files), mTools (mData),
CSMDoc::Document::Document (const Files::ConfigurationManager& configuration, const std::vector< boost::filesystem::path >& files, const boost::filesystem::path& savePath, const boost::filesystem::path& resDir, bool new_)
: mSavePath (savePath), mContentFiles (files), mTools (mData), mResDir(resDir),
mProjectPath ((configuration.getUserPath() / "projects") /
(savePath.filename().string() + ".project")),
mSaving (*this, mProjectPath)
@ -2183,7 +2181,9 @@ CSMDoc::Document::Document (const Files::ConfigurationManager& configuration,
}
else
{
/// \todo create new project file with default filters
boost::filesystem::path filters = mResDir;
filters /= "defaultfilters.omwaddon.project";
boost::filesystem::copy_file(mResDir, mProjectPath);
}
}