summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/constants.h
diff options
context:
space:
mode:
authorArttu Tarkiainen <arttu.tarkiainen@qt.io>2020-03-11 18:35:05 +0200
committerArttu Tarkiainen <arttu.tarkiainen@qt.io>2020-03-19 06:56:52 +0200
commit8878f49cc00a5dcd0a8acd89cd5c9d8b89505941 (patch)
tree3db628af65c8f88067f8f49dcdedac1375fc1d38 /src/libs/installer/constants.h
parentea8f8f2d8c9170dcf8c087786125db09c8d18dec (diff)
Refactor naming and usage of CLI commands
- Rename and alter the description of some command line options according to validation results from task QTIFW-1635. The suggested additions are not added in this change. - Remove options "framework-version" and "silentUpdate", these should not be needed anymore. - Combine options "installPackages" and "installDefault" into single "install" command. - Change command line syntax from "binary [options]" to "binary [options] command <arguments>". - Re-order & group known option variables and "--help" printing order based on their topic. - Move CommandLineParser class files under src/libs/installer and add private class for future options extension. Short versions of command line options should be added in a follow-up commit. Task-number: QTIFW-1671 Change-Id: Ie0d393368b5275c8ffa1ab8833885b149af3178e Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Diffstat (limited to 'src/libs/installer/constants.h')
-rw-r--r--src/libs/installer/constants.h72
1 files changed, 42 insertions, 30 deletions
diff --git a/src/libs/installer/constants.h b/src/libs/installer/constants.h
index ad97227dc..1dd36a9b0 100644
--- a/src/libs/installer/constants.h
+++ b/src/libs/installer/constants.h
@@ -99,49 +99,61 @@ const char scRelocatable[] = "@RELOCATABLE_PATH@";
namespace CommandLineOptions {
+// Help & version information
const char HelpShort[] = "h";
const char HelpLong[] = "help";
const char Version[] = "version";
-const char FrameworkVersion[] = "framework-version";
+
+// Output related options
const char VerboseShort[] = "v";
const char VerboseLong[] = "verbose";
-const char Proxy[] = "proxy";
+const char LoggingRules[] = "logging-rules";
+
+// Consumer commands
+const char Install[] = "install";
+const char CheckUpdates[] = "check-updates";
+const char Update[] = "update";
+const char Remove[] = "remove";
+const char List[] = "list";
+const char Search[] = "search";
+
+// Repository management options
+const char AddRepository[] = "add-repository";
+const char AddTmpRepository[] = "add-temp-repository";
+const char SetTmpRepository[] = "set-temp-repository";
+
+// Proxy options
+const char SystemProxy[] = "system-proxy";
const char NoProxy[] = "no-proxy";
-const char Script[] = "script";
-const char CheckUpdates[] = "checkupdates";
-const char Updater[] = "updater";
-const char ManagePackages[] = "manage-packages";
-const char Uninstaller[] = "uninstaller";
+
+// Starting mode options
+const char StartUpdater[] = "start-updater";
+const char StartPackageManager[] = "start-package-manager";
+const char StartUninstaller[] = "start-uninstaller";
+
+// Misc installation options
+const char Root[] = "root";
+const char Platform[] = "platform";
const char NoForceInstallation[] = "no-force-installations";
const char NoSizeChecking[] = "no-size-checking";
const char ShowVirtualComponents[] = "show-virtual-components";
-const char LoggingRules[] = "logging-rules";
+const char InstallCompressedRepository[] = "install-compressed-repository";
const char CreateLocalRepository[] = "create-local-repository";
-const char AddRepository[] = "addRepository";
-const char AddTmpRepository[] = "addTempRepository";
-const char SetTmpRepository[] = "setTempRepository";
-const char StartServer[] = "startserver";
-const char StartClient[] = "startclient";
-const char InstallCompressedRepository[] = "installCompressedRepository";
-const char SilentUpdate[] = "silentUpdate";
-const char UpdatePackages[] = "updatePackages";
-const char ListInstalledPackages[] = "listInstalledPackages";
-const char ListPackages[] = "listPackages";
-const char InstallPackages[] = "installPackages";
-const char InstallDefault[] = "installDefault";
-const char TargetDir[] = "targetDir";
-const char UninstallSelectedPackages[] = "uninstallPackages";
-const char Platform[] = "platform";
+
+// Developer options
+const char Script[] = "script";
+const char StartServer[] = "start-server";
+const char StartClient[] = "start-client";
const char SquishPort[] = "squish-port";
+// Options supposed to be used without graphical interface
static const QStringList scCommandLineInterfaceOptions = {
- QLatin1String(ListInstalledPackages),
- QLatin1String(ListPackages),
- QLatin1String(UpdatePackages),
- QLatin1String(InstallPackages),
- QLatin1String(InstallDefault),
- QLatin1String(UninstallSelectedPackages),
- QLatin1String(CheckUpdates)
+ QLatin1String(Install),
+ QLatin1String(CheckUpdates),
+ QLatin1String(Update),
+ QLatin1String(Remove),
+ QLatin1String(List),
+ QLatin1String(Search)
};
} // namespace CommandLineOptions