mirror of
https://github.com/etlegacy/Update-Installer.git
synced 2025-02-24 20:01:17 +00:00
Rename UpdaterOptions::script to UpdaterOptions::scriptPath for clarity
This commit is contained in:
parent
214f2273b9
commit
e294c35965
4 changed files with 7 additions and 7 deletions
|
@ -70,7 +70,7 @@ void UpdaterOptions::parseOldFormatArgs(int argc, char** argv)
|
||||||
}
|
}
|
||||||
else if (key == "UpdateScriptFileName")
|
else if (key == "UpdateScriptFileName")
|
||||||
{
|
{
|
||||||
script = value;
|
scriptPath = value;
|
||||||
}
|
}
|
||||||
else if (key == "AppFileName")
|
else if (key == "AppFileName")
|
||||||
{
|
{
|
||||||
|
@ -116,7 +116,7 @@ void UpdaterOptions::parse(int argc, char** argv)
|
||||||
}
|
}
|
||||||
if (parser.getValue("script"))
|
if (parser.getValue("script"))
|
||||||
{
|
{
|
||||||
script = parser.getValue("script");
|
scriptPath = parser.getValue("script");
|
||||||
}
|
}
|
||||||
if (parser.getValue("wait"))
|
if (parser.getValue("wait"))
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,7 +12,7 @@ class UpdaterOptions
|
||||||
UpdateInstaller::Mode mode;
|
UpdateInstaller::Mode mode;
|
||||||
std::string installDir;
|
std::string installDir;
|
||||||
std::string packageDir;
|
std::string packageDir;
|
||||||
std::string script;
|
std::string scriptPath;
|
||||||
long long waitPid;
|
long long waitPid;
|
||||||
std::string logFile;
|
std::string logFile;
|
||||||
|
|
||||||
|
|
|
@ -49,15 +49,15 @@ int main(int argc, char** argv)
|
||||||
UpdateInstaller installer;
|
UpdateInstaller installer;
|
||||||
UpdateScript script;
|
UpdateScript script;
|
||||||
|
|
||||||
if (!options.script.empty())
|
if (!options.scriptPath.empty())
|
||||||
{
|
{
|
||||||
script.parse(options.script);
|
script.parse(options.scriptPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG(Info,"started updater. install-dir: " + options.installDir
|
LOG(Info,"started updater. install-dir: " + options.installDir
|
||||||
+ ", package-dir: " + options.packageDir
|
+ ", package-dir: " + options.packageDir
|
||||||
+ ", wait-pid: " + intToStr(options.waitPid)
|
+ ", wait-pid: " + intToStr(options.waitPid)
|
||||||
+ ", script-path: " + options.script
|
+ ", script-path: " + options.scriptPath
|
||||||
+ ", mode: " + intToStr(options.mode));
|
+ ", mode: " + intToStr(options.mode));
|
||||||
|
|
||||||
installer.setMode(options.mode);
|
installer.setMode(options.mode);
|
||||||
|
|
|
@ -20,7 +20,7 @@ void TestUpdaterOptions::testOldFormatArgs()
|
||||||
TEST_COMPARE(options.mode,UpdateInstaller::Setup);
|
TEST_COMPARE(options.mode,UpdateInstaller::Setup);
|
||||||
TEST_COMPARE(options.installDir,"/path/to/app");
|
TEST_COMPARE(options.installDir,"/path/to/app");
|
||||||
TEST_COMPARE(options.packageDir,"/tmp/updater");
|
TEST_COMPARE(options.packageDir,"/tmp/updater");
|
||||||
TEST_COMPARE(options.script,"/tmp/updater/file_list.xml");
|
TEST_COMPARE(options.scriptPath,"/tmp/updater/file_list.xml");
|
||||||
TEST_COMPARE(options.waitPid,123456);
|
TEST_COMPARE(options.waitPid,123456);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue