Integrate call parameter -V (= --extended-version) to show extended
version (including last git commit)
This commit is contained in:
parent
3a83efbd3f
commit
53639b55c9
12
main.cpp
12
main.cpp
@ -112,14 +112,24 @@ int main(int argc, char *argv[]) {
|
||||
QCoreApplication::translate("main", "Start ATBUpdateTool in dry-run-mode. No actual actions."));
|
||||
parser.addOption(dryRunOption);
|
||||
|
||||
QCommandLineOption extendedVersionOption(QStringList() << "V" << "extended-version",
|
||||
QCoreApplication::translate("main", "Show extended version (including last git commit)."));
|
||||
parser.addOption(extendedVersionOption);
|
||||
|
||||
// Process the actual command line arguments given by the user
|
||||
parser.process(a);
|
||||
QString plugInDir = parser.value(pluginDirectoryOption);
|
||||
QString plugInName = parser.value(pluginNameOption);
|
||||
QString workingDir = parser.value(workingDirectoryOption);
|
||||
bool dryRun = parser.isSet(dryRunOption);
|
||||
bool const dryRun = parser.isSet(dryRunOption);
|
||||
bool const showExtendedVersion = parser.isSet(extendedVersionOption);
|
||||
QString const rtPath = QCoreApplication::applicationDirPath();
|
||||
|
||||
if (showExtendedVersion) {
|
||||
printf(APP_EXTENDED_VERSION"\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!QDir(plugInDir).exists()) {
|
||||
qCritical() << plugInDir
|
||||
<< "does not exists, but has to contain dc-library";
|
||||
|
Loading…
Reference in New Issue
Block a user