mirror of
https://github.com/etlegacy/Update-Installer.git
synced 2024-11-26 22:01:39 +00:00
Add methods to UpdateScript to retrieve the path which the script was parsed from
This commit is contained in:
parent
3548f36e8c
commit
2e285f11a8
2 changed files with 8 additions and 0 deletions
|
@ -14,6 +14,8 @@ void UpdateScript::parse(const std::string& path)
|
|||
TiXmlDocument document(path);
|
||||
if (document.LoadFile())
|
||||
{
|
||||
m_path = path;
|
||||
|
||||
LOG(Info,"Loaded script from " + path);
|
||||
|
||||
const TiXmlElement* updateNode = document.RootElement();
|
||||
|
@ -118,4 +120,8 @@ const std::vector<std::string>& UpdateScript::filesToUninstall() const
|
|||
return m_filesToUninstall;
|
||||
}
|
||||
|
||||
const std::string UpdateScript::path() const
|
||||
{
|
||||
return m_path;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ class UpdateScript
|
|||
|
||||
void parse(const std::string& path);
|
||||
|
||||
const std::string path() const;
|
||||
const std::vector<std::string>& dependencies() const;
|
||||
const std::vector<UpdateScriptPackage>& packages() const;
|
||||
const std::vector<UpdateScriptFile>& filesToInstall() const;
|
||||
|
@ -47,6 +48,7 @@ class UpdateScript
|
|||
UpdateScriptFile parseFile(const TiXmlElement* element);
|
||||
UpdateScriptPackage parsePackage(const TiXmlElement* element);
|
||||
|
||||
std::string m_path;
|
||||
std::vector<std::string> m_dependencies;
|
||||
std::vector<UpdateScriptPackage> m_packages;
|
||||
std::vector<UpdateScriptFile> m_filesToInstall;
|
||||
|
|
Loading…
Reference in a new issue