diff options
author | Tim Jenssen <tim.jenssen@digia.com> | 2013-09-09 15:31:56 +0200 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@digia.com> | 2013-09-09 15:32:37 +0200 |
commit | 5cc89ac1eab55dfbd8a1ad754cbb2c8f7c424abc (patch) | |
tree | 4ceabf59d7c97e5f3c1ad33edc09110b7b29b10b /src | |
parent | d8d93f85d6362e8cfb24a076e3df0504cb93957f (diff) | |
parent | dc3a3ec7fe2bd0393684d75419a2f502e836a749 (diff) |
Merge remote-tracking branch 'origin/1.4'
Change-Id: I202b1babf4b8ff16b6f28f0499e76a15724ed0dd
Diffstat (limited to 'src')
-rw-r--r-- | src/libs/installer/binaryformat.cpp | 2 | ||||
-rw-r--r-- | src/libs/installer/resources/files-to-patch-linux-emb-arm | 3 | ||||
-rw-r--r-- | src/libs/installer/resources/files-to-patch-macx-emb-arm | 9 | ||||
-rw-r--r-- | src/libs/installer/resources/files-to-patch-windows-emb-arm | 3 | ||||
-rw-r--r-- | src/libs/installer/resources/patch_file_lists.qrc | 1 | ||||
-rw-r--r-- | src/libs/kdtools/kdupdaterfiledownloader.cpp | 6 | ||||
-rw-r--r-- | src/sdk/installerbase_p.cpp | 90 |
7 files changed, 73 insertions, 41 deletions
diff --git a/src/libs/installer/binaryformat.cpp b/src/libs/installer/binaryformat.cpp index 1d257a1b4..b07cc90de 100644 --- a/src/libs/installer/binaryformat.cpp +++ b/src/libs/installer/binaryformat.cpp @@ -855,7 +855,7 @@ BinaryContent BinaryContent::readFromApplicationFile() { #ifdef Q_OS_MAC // On Mac, data is always in a separate file so that the binary can be signed - QDir dataPath(QCoreApplication::applicationFilePath()); + QDir dataPath(QCoreApplication::applicationDirPath()); dataPath.cdUp(); dataPath.cd(QLatin1String("Resources")); return BinaryContent::readFromBinary(dataPath.filePath(QLatin1String("installer.dat"))); diff --git a/src/libs/installer/resources/files-to-patch-linux-emb-arm b/src/libs/installer/resources/files-to-patch-linux-emb-arm index c01fe17a1..f6a4b59b7 100644 --- a/src/libs/installer/resources/files-to-patch-linux-emb-arm +++ b/src/libs/installer/resources/files-to-patch-linux-emb-arm @@ -1,6 +1,9 @@ bin/qmake bin/lrelease bin/qdoc +host-bin/qmake +host-bin/lrelease +host-bin/qdoc %% *.la *.prl diff --git a/src/libs/installer/resources/files-to-patch-macx-emb-arm b/src/libs/installer/resources/files-to-patch-macx-emb-arm new file mode 100644 index 000000000..c01fe17a1 --- /dev/null +++ b/src/libs/installer/resources/files-to-patch-macx-emb-arm @@ -0,0 +1,9 @@ +bin/qmake +bin/lrelease +bin/qdoc +%% +*.la +*.prl +*.pc + + diff --git a/src/libs/installer/resources/files-to-patch-windows-emb-arm b/src/libs/installer/resources/files-to-patch-windows-emb-arm index f0c1c3c73..674adaff6 100644 --- a/src/libs/installer/resources/files-to-patch-windows-emb-arm +++ b/src/libs/installer/resources/files-to-patch-windows-emb-arm @@ -1,6 +1,9 @@ bin/qmake.exe bin/lrelease.exe bin/qdoc.exe +host-bin/qmake.exe +host-bin/lrelease.exe +host-bin/qdoc.exe %% *.la *.prl diff --git a/src/libs/installer/resources/patch_file_lists.qrc b/src/libs/installer/resources/patch_file_lists.qrc index fe4b77046..e898b9b23 100644 --- a/src/libs/installer/resources/patch_file_lists.qrc +++ b/src/libs/installer/resources/patch_file_lists.qrc @@ -8,5 +8,6 @@ <file>files-to-patch-macx-qt5</file> <file>files-to-patch-linux-emb-arm</file> <file>files-to-patch-windows-emb-arm</file> + <file>files-to-patch-macx-emb-arm</file> </qresource> </RCC> diff --git a/src/libs/kdtools/kdupdaterfiledownloader.cpp b/src/libs/kdtools/kdupdaterfiledownloader.cpp index 19ba204c0..95b574b2f 100644 --- a/src/libs/kdtools/kdupdaterfiledownloader.cpp +++ b/src/libs/kdtools/kdupdaterfiledownloader.cpp @@ -979,6 +979,12 @@ void KDUpdater::HttpDownloader::httpReqFinished() void KDUpdater::HttpDownloader::httpReadProgress(qint64 done, qint64 total) { + if (d->http) { + const QUrl redirectUrl = d->http->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl(); + if (followRedirects() && redirectUrl.isValid()) + return; // if we are a redirection, do not emit the progress + } + setProgress(done, total); emit downloadProgress(calcProgress(done, total)); } diff --git a/src/sdk/installerbase_p.cpp b/src/sdk/installerbase_p.cpp index 0d59e541e..6e4002f30 100644 --- a/src/sdk/installerbase_p.cpp +++ b/src/sdk/installerbase_p.cpp @@ -298,59 +298,69 @@ int InstallerBase::replaceMaintenanceToolBinary(QStringList arguments) /* static*/ void InstallerBase::showUsage() { +#define WIDTH1 46 +#define WIDTH2 40 MyApplicationConsole c; 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) + std::cout << std::setw(WIDTH1) << std::setiosflags(std::ios::left) << " --help" << std::setw(WIDTH2) << "Show commandline usage" << std::endl; - std::cout << std::setw(55) << std::setiosflags(std::ios::left) << " --version" << std::setw(40) + std::cout << std::setw(WIDTH1) << std::setiosflags(std::ios::left) << " --version" << std::setw(WIDTH2) << "Show current version" << 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) + std::cout << std::setw(WIDTH1) << std::setiosflags(std::ios::left) << " --checkupdates" << std::setw(WIDTH2) + << "Check for updates and return an XML file describing" << std::endl + << std::setw(WIDTH1) << " " << std::setw(WIDTH2) << "the available updates" << std::endl; + std::cout << std::setw(WIDTH1) << std::setiosflags(std::ios::left) << " --updater" << std::setw(WIDTH2) + << "Start in updater mode." << std::endl; + std::cout << std::setw(WIDTH1) << std::setiosflags(std::ios::left) << " --manage-packages" << std::setw(WIDTH2) + << "Start in packagemanager mode." << std::endl; + std::cout << std::setw(WIDTH1) << std::setiosflags(std::ios::left) << " --proxy" << std::setw(WIDTH2) + << "Set system proxy on Win and Mac." << std::endl + << std::setw(WIDTH1) << " " << std::setw(WIDTH2) << "This option has no effect on Linux." << std::endl; + std::cout << std::setw(WIDTH1) << std::setiosflags(std::ios::left) << " --verbose" << std::setw(WIDTH2) << "Show debug output on the console" << std::endl; - std::cout << std::setw(55) << std::setiosflags(std::ios::left) << " --create-offline-repository" - << std::setw(40) << "Offline installer only: Create a local repository inside the installation " - "directory based on the offline installer's content" << std::endl; + std::cout << std::setw(WIDTH1) << std::setiosflags(std::ios::left) << " --create-offline-repository" + << std::setw(WIDTH2) << "Offline installer only: Create a local repository inside the" << std::endl + << std::setw(WIDTH1) << " " << std::setw(WIDTH2) << "installation directory based on the offline" << std::endl + << std::setw(WIDTH1) << " " << std::setw(WIDTH2) << "installer's content." << std::endl; std::cout << "\nDeveloper:"<< std::endl; - std::cout << std::setw(55) << std::setiosflags(std::ios::left) - << " --runoperation [operationName] [arguments...]" << std::setw(40) + std::cout << std::setw(WIDTH1) << std::setiosflags(std::ios::left) + << " --runoperation [OPERATION] [arguments...]" << std::setw(WIDTH2) << "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) + std::cout << std::setw(WIDTH1) << std::setiosflags(std::ios::left) + << " --undooperation [OPERATION] [arguments...]" << std::setw(WIDTH2) << "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) << " --addRepository [URI]" - << std::setw(40) << "Add a local or remote repo to the list of user defined repos." << 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 temporary available repos." - << std::endl; - std::cout << std::setw(55) << std::setiosflags(std::ios::left) << " --setTempRepository [URI]" - << std::setw(40) << "Set a local or remote repo as tmp repo, it is the only one used during fetch." - << std::endl; - std::cout << std::setw(55) << std::setiosflags(std::ios::left) << " " << std::setw(40) << "Note: URI " - "must be prefixed with the protocol, i.e. file:/// , http:// or ftp://" << 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) - << " --binarydatafile [path/to/binary/data/file]" << std::setw(40) << "Use the binary data of " + std::cout << std::setw(WIDTH1) << std::setiosflags(std::ios::left) + << " --script [scriptName]" << std::setw(WIDTH2) << "Execute a script" << std::endl; + std::cout << std::setw(WIDTH1) << std::setiosflags(std::ios::left) << " --no-force-installations" + << std::setw(WIDTH2) << "Enable deselection of forced components" << std::endl; + std::cout << std::setw(WIDTH1) << std::setiosflags(std::ios::left) << " --addRepository [URI]" + << std::setw(WIDTH2) << "Add a local or remote repo to the list of user defined repos." << std::endl; + std::cout << std::setw(WIDTH1) << std::setiosflags(std::ios::left) << " --addTempRepository [URI]" + << std::setw(WIDTH2) << "Add a local or remote repo to the list of temporary available" << std::endl + << std::setw(WIDTH1) << " " << std::setw(WIDTH2) << "repos." << std::endl; + std::cout << std::setw(WIDTH1) << std::setiosflags(std::ios::left) << " --setTempRepository [URI]" + << std::setw(WIDTH2) << "Set a local or remote repo as tmp repo, it is the only one" << std::endl + << std::setw(WIDTH1) << " " << std::setw(WIDTH2) << "used during fetch." << std::endl; + std::cout << std::setw(WIDTH1) << std::setiosflags(std::ios::left) << " " << std::setw(WIDTH2) << "Note: URI " + "must be prefixed with the protocol, i.e. file:///" << std::endl + << std::setw(WIDTH1) << " " << std::setw(WIDTH2) << "http:// or ftp://. It can consist of multiple" << std::endl + << std::setw(WIDTH1) << " " << std::setw(WIDTH2) << "addresses separated by comma only." << std::endl; + std::cout << std::setw(WIDTH1) << std::setiosflags(std::ios::left) << " --show-virtual-components" + << std::setw(WIDTH2) << "Show virtual components in package manager and updater" << std::endl; + std::cout << std::setw(WIDTH1) << std::setiosflags(std::ios::left) + << " --binarydatafile [binary_data_file]" << std::setw(WIDTH2) << "Use the binary data of " "another installer or maintenance tool." << std::endl; - std::cout << std::setw(55) << std::setiosflags(std::ios::left) - << " --update-installerbase [path/to/new/installerbase]" << std::setw(40) + std::cout << std::setw(WIDTH1) << std::setiosflags(std::ios::left) + << " --update-installerbase [new_installerbase]" << std::setw(WIDTH2) << "Patch a full installer with a new installer base" << std::endl; - std::cout << std::setw(55) << std::setiosflags(std::ios::left) << " --dump-binary-data [OPTION...] -o " - "path" << std::setw(40) << "Dumps the binary content into specified path (offline installer only)" - << std::endl; - std::cout << std::setw(55) << std::setiosflags(std::ios::left) << " -i " - << std::setw(40) << "Path to binary data file, otherwise the current application is assumed to be " - "the input file." << std::endl; + std::cout << std::setw(WIDTH1) << std::setiosflags(std::ios::left) << " --dump-binary-data -i [PATH] -o [PATH]" + << std::setw(WIDTH2) << "Dumps the binary content into specified output path (offline" << std::endl + << std::setw(WIDTH1) << " " << std::setw(WIDTH2) << "installer only)." << std::endl + << std::setw(WIDTH1) << " " << std::setw(WIDTH2) << "Input path pointing to binary data file, if omitted" << std::endl + << std::setw(WIDTH1) << " " << std::setw(WIDTH2) << "the current application is used as input." << std::endl; } /* static*/ |