summaryrefslogtreecommitdiffstats
path: root/installerbuilder
diff options
context:
space:
mode:
authorAlexander Lenhardt <alexander.lenhardt@nokia.com>2011-11-21 17:32:29 +0100
committerAlexander Lenhardt <alexander.lenhardt@nokia.com>2011-11-22 16:15:53 +0100
commit7cff235802b79170225ccfa3286660c4fd9c655d (patch)
tree0675b0e49640d565b3b0b2af573bdbf7a9cfd5b2 /installerbuilder
parentffdf9802b26f4c201ed3e279cc547707c2a1bdbf (diff)
added command-line help
Change-Id: I034430cef3104ffcb6898eefdb5c421e15c5fa66 Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com> Reviewed-by: Niels Weber <niels.2.weber@nokia.com>
Diffstat (limited to 'installerbuilder')
-rw-r--r--installerbuilder/installerbase/installerbase.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/installerbuilder/installerbase/installerbase.cpp b/installerbuilder/installerbase/installerbase.cpp
index 30db02292..08292e97e 100644
--- a/installerbuilder/installerbase/installerbase.cpp
+++ b/installerbuilder/installerbase/installerbase.cpp
@@ -57,6 +57,7 @@
#include <QtNetwork/QNetworkProxyFactory>
#include <iostream>
+#include <iomanip>
#define QUOTE_(x) #x
#define QUOTE(x) QUOTE_(x)
@@ -80,6 +81,42 @@ static QSet<Repository> repositories(const QStringList &arguments, const int ind
return set;
}
+void usage()
+{
+ std::cout << "Usage: SDKMaintenanceTool [OPTIONS]" << std::endl << std::endl;
+ std::cout << "User:"<<std::endl;
+ std::cout << std::setw(55) << std::setiosflags(std::ios::left)
+ << " --help" << std::setw(40) << "Show commandline usage" << std::endl;
+ std::cout << std::setw(55) << std::setiosflags(std::ios::left)
+ << " --checkupdates" << std::setw(40) << "Check for updates and return an XML file of the available updates"
+ << std::endl;
+ std::cout << std::setw(55) << std::setiosflags(std::ios::left)
+ << " --proxy" << std::setw(40) << "Set system proxy on Win and Mac. This option has no effect on Linux" << std::endl;
+ std::cout << std::setw(55) << std::setiosflags(std::ios::left) << " --verbose" << std::setw(40)
+ << "Show debug output on the console" << std::endl;
+
+ std::cout << "Developer:"<< std::endl;
+ std::cout << std::setw(55) << std::setiosflags(std::ios::left)
+ << " --runoperation [operationName] [arguments...]" << std::setw(40)
+ << "Perform an operation with a list of arguments" << std::endl;
+ std::cout << std::setw(55) << std::setiosflags(std::ios::left)
+ << " --undooperation [operationName] [arguments...]" << std::setw(40)
+ << "Undo an operation with a list of arguments" <<std::endl;
+ std::cout << std::setw(55) << std::setiosflags(std::ios::left)
+ << " --script [scriptName]" << std::setw(40) << "Execute a script" << std::endl;
+ std::cout << std::setw(55) << std::setiosflags(std::ios::left) << " --no-force-installations"
+ << std::setw(40) << "Enable deselection of forced components" << std::endl;
+ std::cout << std::setw(55) << std::setiosflags(std::ios::left) << " --addTempRepository [URI]"
+ << std::setw(40) << "Add a local or remote repo to the list of available repos." << std::endl;
+ std::cout << std::setw(55) << std::setiosflags(std::ios::left) << " --setTempRepository [URI]"
+ << std::setw(40) << "Set the update URL to an arbitrary local or remote URI. URI must be prefixed with the protocol, i.e. file:// or http://" << std::endl;
+ std::cout << std::setw(55) << std::setiosflags(std::ios::left) << " --show-virtual-components"
+ << std::setw(40) << "Show virtual components in package manager and updater" << std::endl;
+ std::cout << std::setw(55) << std::setiosflags(std::ios::left)
+ << " --update-installerbase [path/to/new/installerbase]" << std::setw(40)
+ << "Patch a full installer with a new installer base" << std::endl;
+}
+
int main(int argc, char *argv[])
{
qsrand(QDateTime::currentDateTime().toTime_t());
@@ -250,6 +287,7 @@ int main(int argc, char *argv[])
|| argument == QLatin1String("ManagePackages")) && core.isUninstaller()) {
core.setPackageManager();
} else if (argument == QLatin1String("--help") || argument == QLatin1String("-h")) {
+ usage();
return PackageManagerCore::Success;
} else if (argument == QLatin1String("--addTempRepository")
|| argument == QLatin1String("--setTempRepository")) {
@@ -272,6 +310,8 @@ int main(int argc, char *argv[])
PackageManagerCore::setNoForceInstallation(true);
} else {
std::cerr << "Unknown option: " << argument << std::endl;
+ usage();
+ return PackageManagerCore::Failure;
}
}