diff options
author | Katja Marttila <katja.marttila@qt.io> | 2022-09-22 15:40:14 +0300 |
---|---|---|
committer | Katja Marttila <katja.marttila@qt.io> | 2022-10-20 12:07:51 +0300 |
commit | f5dff60486e4d6ef355e1420226f1d059b0e441d (patch) | |
tree | 63bde6b764d7887f59382ee550551508531d0926 /tools | |
parent | a9b7904472b8172f82e751999837b16082731a76 (diff) |
Allow generation and signing of MT in macos
Previously maintenance tool could be updated from online repository
placing installerbase to repository and setting setInstallerBaseBinary()
in install script. The maintenancetool app bundle was written in the
code and installerbase placed under .app/Contents/MacOS/. This prevented
the maintenancetool app bundle to be signed and notarized.
Fixed so that the whole app bundle can be placed to repository. This
does not break the signing nor notarization as the whole bundle is
copied as it is. The setInstallerBaseBinary() is still needed in the
install script so that the installer knows which bundle is the
maintenance tool. Old way of updating maintenancetool still exists, if
the installerbaseBinary does not contain the ending 'app' installer
assumes that the maintenance tool is the executable itself instead of
whole app bundle.
This change also adds a new binarycreator switch
--create-maintenancetool, which can be used in macos to create the app
bundle for maintenance tool.
Task-number: QTIFW-2750
Change-Id: I3483ddb815d035644e826559947f6f9de4af9361
Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/binarycreator/main.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/binarycreator/main.cpp b/tools/binarycreator/main.cpp index d74644670..1840d4c2a 100644 --- a/tools/binarycreator/main.cpp +++ b/tools/binarycreator/main.cpp @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2021 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -72,6 +72,9 @@ static void printUsage() << std::endl; std::cout << " 'update.rcc' in the current path." << std::endl; #ifdef Q_OS_MACOS + std::cout << " --mt|--create-maintenancetool " << std::endl; + std::cout << " Creates maintenance tool app bundle. Target option is omitted, bundle name "<<std::endl; + std::cout << " can be configured in the config.xml using element <MaintenanceToolName>." << std::endl; std::cout << " -s|--sign identity Sign generated app bundle using the given code " << std::endl; std::cout << " signing identity" << std::endl; #endif @@ -99,6 +102,11 @@ static void printUsage() std::cout << "Example update.rcc:" << std::endl; std::cout << " " << appName << " -c installer-config" << sep << "config.xml -p packages-directory " "-rcc" << std::endl; +#ifdef Q_OS_MACOS + std::cout << "Example (maintenance tool bundle):" << std::endl; + std::cout << " " << appName << " -c installer-config" << sep << "config.xml" << " --mt" << std::endl; + std::cout << std::endl; +#endif } static int printErrorAndUsageAndExit(const QString &err) @@ -206,6 +214,9 @@ int main(int argc, char **argv) } parsedArgs.compression = static_cast<AbstractArchive::CompressionLevel>(value); #ifdef Q_OS_MACOS + } else if (*it == QLatin1String("--mt") || *it == QLatin1String("--create-maintenancetool")) { + parsedArgs.createMaintenanceTool = true; + } else if (*it == QLatin1String("-s") || *it == QLatin1String("--sign")) { ++it; if (it == args.end() || it->startsWith(QLatin1String("-"))) |