diff options
author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2017-09-08 14:59:07 +0300 |
---|---|---|
committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2018-08-27 11:51:31 +0000 |
commit | c3da57cf0c7213120803fe63003d0cc14d14f871 (patch) | |
tree | e2029b7effa373e84d327ea3ee9c67f95c24be9b | |
parent | 9597934087e395659aedb7735e1fc233a3407fd7 (diff) | |
download | qtivi-5.11.tar.gz |
Add SDK Creation Instructions to Qt AS documentation5.11
Add instructions how to create an online SDK.
In case of online SDK, Qt Installer Framework manual
is referred.
Task-number: QTAUTO-389
Change-Id: I1dfd3a97d942c42686859e120382656600edaa70
Reviewed-by: Antti Kokko <antti.kokko@qt.io>
Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
-rw-r--r-- | src/doc/qtautomotivesuite/src/external-resources.qdoc | 141 | ||||
-rw-r--r-- | src/doc/qtautomotivesuite/src/images/ifw-overview.png | bin | 0 -> 41080 bytes | |||
-rw-r--r-- | src/doc/qtautomotivesuite/src/images/qtas-sdk-tools.png | bin | 0 -> 37749 bytes | |||
-rw-r--r-- | src/doc/qtautomotivesuite/src/images/qtas_sdk.png | bin | 0 -> 25900 bytes | |||
-rw-r--r-- | src/doc/qtautomotivesuite/src/qtautomotivesuite-create-sdk.qdoc | 167 | ||||
-rw-r--r-- | src/doc/qtautomotivesuite/src/qtautomotivesuite-sdk-build-ifw.qdoc | 215 | ||||
-rw-r--r-- | src/doc/qtautomotivesuite/src/qtautomotivesuite-sdk-repositories.qdoc | 346 |
7 files changed, 849 insertions, 20 deletions
diff --git a/src/doc/qtautomotivesuite/src/external-resources.qdoc b/src/doc/qtautomotivesuite/src/external-resources.qdoc index 91160f0..feeb87e 100644 --- a/src/doc/qtautomotivesuite/src/external-resources.qdoc +++ b/src/doc/qtautomotivesuite/src/external-resources.qdoc @@ -26,12 +26,12 @@ ****************************************************************************/ /*! - \externalpage http://www.genivi.org/ + \externalpage https://www.genivi.org/ \title GENIVI */ /*! - \externalpage http://doc.qt.io/ + \externalpage https://doc.qt.io/ \title Qt Reference Documentation */ @@ -127,92 +127,92 @@ */ /*! - \externalpage http://doc.qt.io/QtForDeviceCreation/qtee-supported-platforms.html#supported-target-device-groups + \externalpage https://doc.qt.io/QtForDeviceCreation/qtee-supported-platforms.html#supported-target-device-groups \title Supported Target Devices */ /*! - \externalpage http://doc.qt.io/QtForDeviceCreation/qtee-supported-platforms.html#supported-development-hosts + \externalpage https://doc.qt.io/QtForDeviceCreation/qtee-supported-platforms.html#supported-development-hosts \title Supported Development Hosts */ /*! - \externalpage http://doc.qt.io/QtForDeviceCreation/qtee-requirements-x11.html + \externalpage https://doc.qt.io/QtForDeviceCreation/qtee-requirements-x11.html \title Requirements for Linux/X11 */ /*! - \externalpage http://doc.qt.io/QtForDeviceCreation/qtee-requirements-windows.html + \externalpage https://doc.qt.io/QtForDeviceCreation/qtee-requirements-windows.html \title Requirements for Windows */ /*! - \externalpage http://doc.qt.io/QtForDeviceCreation/qtee-building-and-running.html#building-and-running-an-example + \externalpage https://doc.qt.io/QtForDeviceCreation/qtee-building-and-running.html#building-and-running-an-example \title Building and Running an Example */ /*! - \externalpage http://doc.qt.io/QtForDeviceCreation/qtee-custom-embedded-linux-image.html + \externalpage https://doc.qt.io/QtForDeviceCreation/qtee-custom-embedded-linux-image.html \title Building Your Own Embedded Linux Image */ /*! - \externalpage http://doc.qt.io/QtForDeviceCreation/qtee-about-b2qt.html + \externalpage https://doc.qt.io/QtForDeviceCreation/qtee-about-b2qt.html \title About Boot to Qt */ /*! - \externalpage http://doc.qt.io/QtForDeviceCreation/qtee-custom-embedded-linux-image.html#configuring-qt-creator + \externalpage https://doc.qt.io/QtForDeviceCreation/qtee-custom-embedded-linux-image.html#configuring-qt-creator \title Configuring Qt Creator */ /*! - \externalpage http://doc.qt.io/QtForDeviceCreation/qtee-custom-embedded-linux-image.html#using-toolchain-without-qt-creator + \externalpage https://doc.qt.io/QtForDeviceCreation/qtee-custom-embedded-linux-image.html#using-toolchain-without-qt-creator \title Using Toolchain without Qt Creator */ /*! - \externalpage http://www.yoctoproject.org/ + \externalpage https://www.yoctoproject.org/ \title Yocto Project */ /*! - \externalpage http://www.yoctoproject.org/documentation/current + \externalpage https://www.yoctoproject.org/documentation/current \title Yocto Project Documentation for the Latest Release */ /*! - \externalpage http://www.nvidia.com/object/drive-cx-request.html + \externalpage https://www.nvidia.com/object/drive-cx-request.html \title NVIDIA DRIVE⢠CX */ /*! - \externalpage http://doc.qt.io/emulator/ + \externalpage https://doc.qt.io/emulator/ \title Emulator */ /*! - \externalpage http://doc.qt.io/qtcreator/creator-overview-qtasam.html + \externalpage https://doc.qt.io/qtcreator/creator-overview-qtasam.html \title Qt Creator Application Manager Plugin */ /*! - \externalpage http://doc.qt.io/archives/qt-5.9-devicecreation/qtee-requirements-x11.html#setting-up-usb-access-to-embedded-devices + \externalpage https://doc.qt.io/archives/qt-5.9-devicecreation/qtee-requirements-x11.html#setting-up-usb-access-to-embedded-devices \title Setting Up USB Access to Embedded Devices */ /*! - \externalpage http://doc.qt.io/QtForDeviceCreation/b2qt-deploying-b2qt.html + \externalpage https://doc.qt.io/QtForDeviceCreation/b2qt-deploying-b2qt.html \title Deploying Qt Projects with Boot to Qt */ /*! - \externalpage http://doc.qt.io/qtcreator/quick-projects.html#creating-qt-quick-applications + \externalpage https://doc.qt.io/qtcreator/quick-projects.html#creating-qt-quick-applications \title Creating Qt Quick Applications */ /*! - \externalpage http://doc.qt.io/qt-5/all-examples.html + \externalpage https://doc.qt.io/qt-5/all-examples.html \title Qt Examples */ @@ -250,3 +250,104 @@ \externalpage https://doc.qt.io/QtForDeviceCreation/qtee-preparing-hardware-jetsontx1.html \title NVIDIA Jetson TX2 */ + +/*! + \externalpage https://doc.qt.io/qtinstallerframework/ + \title Qt Installer Framework +*/ + +/*! + \externalpage https://doc.qt.io/qtinstallerframework/ifw-overview.html + \title Qt Installer Framework Overview +*/ + +/*! + \externalpage https://doc.qt.io/qtinstallerframework/ifw-globalconfig.html + \title Configuration File +*/ + +/*! + \externalpage https://doc.qt.io/qtinstallerframework/ifw-tools.html + \title Qt Installer Framework Tools +*/ + +/*! + \externalpage https://doc.qt.io/qtinstallerframework/ifw-creating-installers.html + \title Creating Installers +*/ + +/*! + \externalpage https://doc.qt.io/qtinstallerframework/ifw-online-installers.html + \title Creating Online Installers +*/ + +/*! + \externalpage https://doc.qt.io/qtinstallerframework/ifw-getting-started.html + \title Getting Started with Qt IFW +*/ + +/*! + \externalpage https://doc.qt.io/qtinstallerframework/ifw-updates.html + \title Promoting Updates +*/ + +/*! + \externalpage https://doc.qt.io/qtinstallerframework/ifw-component-description.html + \title Package Directory +*/ + +/*! + \externalpage https://doc.qt.io/qtinstallerframework/ifw-updates.html#partially-updating-repositories + \title Partially Updating Repositories +*/ + +/*! + \externalpage https://code.qt.io/cgit/qtsdk/qtsdk.git/ + \title Qt SDK Git Repository +*/ + +/*! + \externalpage https://code.qt.io/cgit/qtsdk/qtsdk.git/tree/packaging-tools + \title Packaging Tools Directory +*/ + +/*! + \externalpage https://code.qt.io/cgit/qtsdk/qtsdk.git/tree/packaging-tools/build_wrapper.py + \title Build Wrapper Script +*/ + +/*! + \externalpage https://code.qt.io/cgit/qtsdk/qtsdk.git/tree/packaging-tools/localbuild.ini + \title Local Build INI file +*/ + +/*! + \externalpage https://code.qt.io/cgit/qtsdk/qtsdk.git/tree/packaging-tools/bld_ifw_tools.py + \title Build Installer Framework Tools Script +*/ + +/*! + \externalpage https://code.qt.io/cgit/qtsdk/qtsdk.git/tree/packaging-tools/create_installer.py + \title Create Installer Script +*/ + +/*! + \externalpage https://www.python.org/download/releases/2.7/ + \title Python 2.7 +*/ + +/*! + \externalpage https://www.7-zip.org/ + \title 7-Zip +*/ + +/*! + \externalpage https://wiki.qt.io/Building_Qt_5_from_Git + \title Building Qt 5 from Git +*/ + +/*! + \externalpage https://wiki.qt.io/Building_Qt_Creator_from_Git + \title Building Qt Creator from Git +*/ + diff --git a/src/doc/qtautomotivesuite/src/images/ifw-overview.png b/src/doc/qtautomotivesuite/src/images/ifw-overview.png Binary files differnew file mode 100644 index 0000000..fa13c0a --- /dev/null +++ b/src/doc/qtautomotivesuite/src/images/ifw-overview.png diff --git a/src/doc/qtautomotivesuite/src/images/qtas-sdk-tools.png b/src/doc/qtautomotivesuite/src/images/qtas-sdk-tools.png Binary files differnew file mode 100644 index 0000000..388fe93 --- /dev/null +++ b/src/doc/qtautomotivesuite/src/images/qtas-sdk-tools.png diff --git a/src/doc/qtautomotivesuite/src/images/qtas_sdk.png b/src/doc/qtautomotivesuite/src/images/qtas_sdk.png Binary files differnew file mode 100644 index 0000000..702bdf5 --- /dev/null +++ b/src/doc/qtautomotivesuite/src/images/qtas_sdk.png diff --git a/src/doc/qtautomotivesuite/src/qtautomotivesuite-create-sdk.qdoc b/src/doc/qtautomotivesuite/src/qtautomotivesuite-create-sdk.qdoc new file mode 100644 index 0000000..32b495f --- /dev/null +++ b/src/doc/qtautomotivesuite/src/qtautomotivesuite-create-sdk.qdoc @@ -0,0 +1,167 @@ +/**************************************************************************** +** +** Copyright (C) 2018 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Automotive Suite. +** +** $QT_BEGIN_LICENSE:FDL-QTAS$ +** Commercial License Usage +** Licensees holding valid commercial Qt Automotive Suite licenses may use +** this file in accordance with the commercial license agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and The Qt Company. For +** licensing terms and conditions see https://www.qt.io/terms-conditions. +** For further information use the contact form at https://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ +/*! + \page qtas-sdk-creation.html + \title Creating Qt SDK + \nextpage qtas-sdk-prerequisities.html + + Typically, some parts of system functionality are delivered by second + and third parties. Also, third parties may want to develop applications + specifically for your platform. With \QAS and the included Qt tools, you can build + a redistributable Qt online or offline software development kit (SDK) that contains your + specific UI assets, middleware components, and the Qt tools. Third parties + can use the SDK to build and test their applications. + + In this topic, we focus on different aspects of online SDK. We describe + general workflow of creating online SDK with Qt tools and provide + common guidelines and best practices that facilitate your daily work with SDK. + We use Qt online installer and its build scripts as a concrete example of the + online SDK repository structure and the build process. In case of an offline SDK, + we refer to the \l{Qt Installer Framework} manual and its information about + creating installers. + + \section1 Online SDK Structure + + Qt online SDK consists of installers, servers, online repositories, and + a maintenance tool. + + \image ifw-overview.png + + For the end user, the online SDK provides the following high level use cases: + + \list + \li With the online installer, you can install software components + from online repositories to your local host. + \li When you do your first installation via the online installer, a + maintenance tool is automatically installed to your local host. + \li With the maintenance tool, you can add new components to your + installation. For the installed components on your local host, you get + updates via the maintenance tool. + \endlist + + In general, the maintainer of the online SDK must take care of the following + issues: + + \list 1 + \li Building the content that is provided to end users via + online repositories. For example, the Qt modules and the Qt tools like Qt Creator. + \li Planning a repository structure for the content. + \note It is essential that the maintenance tool has its own component in + the repository. Otherwise, it is not possible to update the maintenance + tool itself and it does not get new updates from the online repositories. + \li Building the Qt Installer Framework. + \li Building an online installer. + \li Building online repositories for the content and the maintenance tool. + \endlist + + You can create the online SDK by using the tools provided by + Qt Installer Framework (IFW). See \l{Qt Installer Framework Overview} for + general information about the online and offline installers, the maintenance tool, + and working with the repositories. + + \section1 Guidelines and Best Practices + + You can create an SDK as instructed in the \l {Qt Installer Framework} manual. + Alternatively, there are scripts available in the + \l{Qt SDK Git Repository}{Qt SDK Git repository} that help you to automate + the SDK creation. The following topics go through the phases in the SDK creation + introducing both ways of working. The Qt release is used as an example + of creating the SDK with scripts: + + \list 1 + \li \l{Prerequisities} + \li \l{Online SDK Workflow} + \li Online Repositories + \list 1 + \li \l{Planning Repository Structure} + \li \l{Working with Online Repositories} + \li \l{Troubleshooting and Best Practices} + \endlist + \endlist +*/ + +/*! + \page qtas-sdk-prerequisities.html + \title Prerequisities + \previouspage qtas-sdk-creation.html + \nextpage qtas-sdk-workflow.html + + Before you create an SDK, you must have the appropriate tools and other + dependencies installed. If you use the scripts in the + \l{Qt SDK Git Repository}{Qt SDK Git} repository for creating the SDK, + install the following tools and Git repositories: + + \table + \header + \li Requirement + \li Description + \row + \li Qt SDK Git Repository + \li Clone the \l{Qt SDK Git Repository}{Qt SDK Git} repository. + The repository contains all the scripts required for creating an SDK. + \row + \li Python 2.7 + \li The scripts in Qt SDK Git repository have been written with Python. + For more information, see \l{Python 2.7}. + \row + \li 7-Zip + \li A compression format that is used by the scripts in + \l{Qt SDK Git Repository}{Qt SDK Git}. You must add 7-Zip to + the PATH environment variable. For more information, see \l{7-Zip}. + \row + \li Direct SSH access + \li If you use a network storage for backing up the built content, you + must enable direct SSH access for the network storage. + \endtable + + \section1 Build Scripts in Qt SDK Git Repository + + After you have cloned the \l{Qt SDK Git Repository}{Qt SDK Git} repository, + you find the following files under the path <qtsdk directory>/packaging-tools: + + \table + \header + \li File Name + \li Description + \row + \li \l{http://code.qt.io/cgit/qtsdk/qtsdk.git/tree/packaging-tools/bld_ifw_tools.py} {bld_ifw_tools.py} + \li Builds static IFW libraries and tools. + \row + \li \l{http://code.qt.io/cgit/qtsdk/qtsdk.git/tree/packaging-tools/create_installer.py} {create_installer.py} + \li Creates offline installers, online installers, and online + repositories. The script depends on the libraries and the tools created + by \e{bld_ifw_tools.py}. + \endtable + + \note You can get more information about the tools by using the command line + arguments \c{--help} or \c{/?}. For example, you can use \c{--help} as follows: + + \badcode + python create_installer.py --help + \endcode +*/ + diff --git a/src/doc/qtautomotivesuite/src/qtautomotivesuite-sdk-build-ifw.qdoc b/src/doc/qtautomotivesuite/src/qtautomotivesuite-sdk-build-ifw.qdoc new file mode 100644 index 0000000..962937a --- /dev/null +++ b/src/doc/qtautomotivesuite/src/qtautomotivesuite-sdk-build-ifw.qdoc @@ -0,0 +1,215 @@ +/**************************************************************************** +** +** Copyright (C) 2018 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Automotive Suite. +** +** $QT_BEGIN_LICENSE:FDL-QTAS$ +** Commercial License Usage +** Licensees holding valid commercial Qt Automotive Suite licenses may use +** this file in accordance with the commercial license agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and The Qt Company. For +** licensing terms and conditions see https://www.qt.io/terms-conditions. +** For further information use the contact form at https://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \page qtas-sdk-workflow.html + \title Online SDK Workflow + \previouspage qtas-sdk-prerequisities.html + \nextpage qtas-sdk-repository-structure.html + + \section1 Building Content for SDK + + The installable content in your online SDK can contain any kind of applications + and tools. What ever your content is, it is important that you build the + content before building the online repositories for the content. + + The following topics instruct how you can build the Qt related content: + + \list + \li \l{Building Qt 5 from Git} instructs how to build Qt from sources. + \li \l{Building Qt Creator from Git} instructs how to build + Qt Creator from sources. + \endlist + + \section1 Working with Online SDK + + After you have the content available, you can publish your content to the + web server. The following picture illustrates the required steps in a high level: + + \image qtas_sdk.png + + The following topics describe how you can build the Qt Installer Framework, + the online installer, and repositories with scripts that are available in + the \l{Qt SDK Git Repository}{Qt SDK Git repository}. You must clone the + repository before you can use the scripts. + + \section1 Building Qt Installer Framework + + You can build the Qt Installer Framework with \l{Build Installer Framework Tools Script} + by running the following command in a terminal: + + \badcode + python bld_ifw_tools.py --qt_archive_uri=<path of <Qt source package>.tar.gz> --ifw_uri=<Qt Installer Framework source path> + \endcode + + \e{--qt_archive_uri} defines a path of Qt sources that are used in the Qt + Installer Framework build. The Qt sources must be available as a \e{.tar.gz} package. + + \e{--ifw_uri} defines a path of Qt Installer Framework sources. The path + can be a Git repository address or a path of a \e{.tar.gz} source package. + + If you clone the Qt Installer Framework sources via Git, you need add + the related branch as follows: + + \badcode + python bld_ifw_tools.py --qt_archive_uri=<path of <Qt source package>.tar.gz> --ifw_uri=<Qt Installer Framework source path> --ifw_branch=<branch> --openssl_dir =<OpenSSL path in your system> + \endcode + + \e{--ifw_branch} defines the Git branch of Qt Installer Framework. + + \section2 Build Outputs + + A successful Qt Installer Framework build generates target platform + specific .7z files that you need to copy to your local network drive under some + base directory (1). For example, Qt Installer Framework build may generate the + following files for Linux: + + \table + \header + \li Generated IFW file + \li Path where to copy the file in a local server + \row + \li installer-framework-linux.7z + \li http://my.local.server/base_directory/tools/ifw/ + \row + \li installerbase-linux-x64.7z + \li http://my.local.server/base_directory/tools/ifw/ + \endtable + + \section1 Building Online Installer + + As mentioned in \l{Creating Installers}, you need to have a configuration file + called \e{config.xml} that contains information about how to build the + online installer binaries and the repositories. See + \l{http://code.qt.io/cgit/qtsdk/qtsdk.git/tree/packaging-tools/configurations/linux/config.xml.template.linux-x64.qt5-sdk} + for an example of the config.xml in the Qt release. + You should note that the <Url> element in the config.xml must contain a URL + that points to a server that is used in your SDK environment. + + You can use \l{Create Installer Script} for building the online installer. + You should note that the script uses the Qt Installer Framework that you + have built and copied under some base directory on your local network drive (1). + The script has the following command line arguments: + + \table + \header + \li A command line argument + \li Description + \row + \li --online + \li An online installer is created. + \row + \li -c + \li A directory of the installer configurations. For example, + \l{http://code.qt.io/cgit/qtsdk/qtsdk.git/tree/packaging-tools/configurations}. + \row + \li -f + \li A path of the installer configuration file. For example, + \l{http://code.qt.io/cgit/qtsdk/qtsdk.git/tree/packaging-tools/configurations/online_installer_jobs/opensource/linux_x64_online}. + \row + \li --ifw-tools + \li A path of the prebuilt Qt Installer Framework tools (.7z). + See \l{Building Qt Installer Framework}. + \row + \li -u + \li A server URL of the archives (.7z). + \row + \li --preferred-installer-name + \li A full installer name. The name includes a file extension (.run, .exe, .app). + \row + \li --create-repo + \li Creates a new repository. + \endtable + + The following code provides an example of how to use \e{create_installer.py} + for building an online installer: + + \badcode + python create_installer.py --online + -c=/user/builder/myinstaller_configs + -f=/user/builder/myinstaller_configs/online_installer_main_conf_file + --ifw-tools=http://my.local.server/base_directory/tools/ifw/installer-framework-linux.7z + -u http://my.local.server/some/basedir + --preferred-installer-name=myinstallername + \endcode + + \section1 Building Online Repository + + With \l{Create Installer Script}, you can also build the online repositories. + See \l{Building Online Installer} for information about the command line arguments. + The following code provides an example of how to use \e{create_installer.py} + for creating a new repository: + + \badcode + python create_installer.py --create-repo + -c=/user/builder/myinstaller_configs + -f=/user/builder/myinstaller_configs/online_installer_main_conf_file + --ifw-tools=http://my.local.server/some/basedir/tools/ifw/installer-framework-linux.7z + -u http://my.local.server/some/basedir + \endcode + + As an output, a new repository is created under a directory called + \e{/repository}. For example, the repository content can be as follows: + + \badcode + repository/qt.595.gcc_64/<version>meta.7z + repository/qt.595.src/<version>meta.7z + repository/qt.595.doc/<version>meta.7z + repository/qt.595.examples/<version>meta.7z + \endcode + + The \e{<version>} (2) is defined in the component's \e{package.xml} file + (see \l{Package Directory}). + + \section1 Updating Content to Web Server + + Before you update the existing repositories in the web server, you must + ensure that you have updated the version number (2) in the component's + \e{package.xml} file (see \l{Package Directory}). This version number is + used in the generated file name of the .7z content file. For example, see the <Version> element in + \l{http://code.qt.io/cgit/qtsdk/qtsdk.git/tree/packaging-tools/configurations/pkg_templates/pkg_593/qt.593.gcc_64/meta/package.xml}. + + In case you do not remember to update the version numbers, the online installer + gives a checksum failure error for the end user during the installation. + + Updating the content to the online server has the following steps: + + \list 1 + \li Update the new content to the web server. Note that the version number + of the content differs from the version of old content. Thus both the + old and the new content can exist at the same time in the server. + \li Wait until all the new content has been synchronized to the online server. + \li Make new repositories available to end users by overwriting + the \e{Updates.xml} file in the root of the repository directory. All the + new content should nwo be available in the server as Updates.xml directly + refers to it. + \li Wait for example one day and delete the old content (.7z files) from + the online server. + \endlist + +*/ + diff --git a/src/doc/qtautomotivesuite/src/qtautomotivesuite-sdk-repositories.qdoc b/src/doc/qtautomotivesuite/src/qtautomotivesuite-sdk-repositories.qdoc new file mode 100644 index 0000000..c18fc74 --- /dev/null +++ b/src/doc/qtautomotivesuite/src/qtautomotivesuite-sdk-repositories.qdoc @@ -0,0 +1,346 @@ +/**************************************************************************** +** +** Copyright (C) 2018 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Automotive Suite. +** +** $QT_BEGIN_LICENSE:FDL-QTAS$ +** Commercial License Usage +** Licensees holding valid commercial Qt Automotive Suite licenses may use +** this file in accordance with the commercial license agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and The Qt Company. For +** licensing terms and conditions see https://www.qt.io/terms-conditions. +** For further information use the contact form at https://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \page qtas-sdk-repository-structure.html + \title Planning Repository Structure + \previouspage qtas-sdk-workflow.html + \nextpage qtas-sdk-build-repositories.html + + You should carefully plan an online repository structure before building + the repositories. Consider the following items when you implement your SDK: + + \section1 Amount of Updated Content + + A full update of a very large repository might not be optimal, because + uploading the repository content would take a long time. + See \l{Partially Updating Repositories} for practical tips + how to update repositories partially. + + \section1 Flexible Repository Structure + + You can keep the online repository structure flexible if you do not hard + code the repository addresses into the online installer. Instead of hard + coding the addresses, you can make the online installer point to a + single repository. + + For example, define a remote repository in your \e{config.xml} as follows: + + \badcode + <RemoteRepositories> + <Repository> + <Url>https://mycompany.com/myonlinerepository/linux-x86_64/root</Url> + <Enabled>1</Enabled> + <DisplayName>MyCompany Linux-x64 root online repository</DisplayName> + </Repository> + </RemoteRepositories> + \endcode + + In the configuration file structure demonstrated in \l{Building Online Installer}, + the remote repository is defined in + \l{http://code.qt.io/cgit/qtsdk/qtsdk.git/tree/packaging-tools/configurations/linux/config.xml.template.linux-x64.qt5-sdk}. + + For more information about the configuration file elements, see \l{Configuration File}. + + In \e{https://mycompany.com/myonlinerepository/linux-x86_64/root/Updates.xml} + under your root directory, define a list of updated repositories as follows: + + \badcode + <Updates> + <ApplicationName>{AnyApplication}</ApplicationName> + <ApplicationVersion>IFW_REPOSITORY_FORMAT_VERSION</ApplicationVersion> + <Checksum>true</Checksum> + <RepositoryUpdate> + <Repository action="add" url="https://mycompany.com/myonlinerepository/linux-x86_64/desktop/qtcreator" displayname="description..."/> + <Repository action="add" url="https://mycompany.com/myonlinerepository/linux-x86_64/desktop/another_cool_tool" displayname="description..."/> + <Repository action="add" url="https://mycompany.com/myonlinerepository/linux-x86_64/desktop/qt58" displayname="description..."/> + ... + </RepositoryUpdate> + </Updates> + \endcode + + Now you can make new repositories available to end users simply by adding a + new line into the root repository \e{Updates.xml}. You can add repositories + to any \e{Updates.xml} using the same syntax. + + For general information about online repositories, see + \l{Creating Online Installers}. + + \section1 File Structure in Qt Releases + + A Qt release provides a concrete example of a tree structure of an online + repository. The tree structure corresponds to the structure that an end user + sees in the Qt installer wizard's \uicontrol{Select component} page. + + For example, the online installer contains the following tree structure: + + \badcode + qt + 57 + msvc2013 32-bit + msvc2013 64-bit + ... + Android x86 + 58 + msvc2015 32-bit + msvc2015 64-bit + ... + ... + Tools + Qt Creator 4.1.0 + MinGW 5.3.0 + ... + \endcode + + You find a similar structure under the Qt release configuration directories + in the \l{Qt SDK Git Repository}{Qt SDK Git repository}. For example, + see \e{pkg_<Qt version>} directories under + \l{http://code.qt.io/cgit/qtsdk/qtsdk.git/tree/packaging-tools/configurations/pkg_templates}. + + A particular package is included into an online repository via configuration + files. For example, see + \l{http://code.qt.io/cgit/qtsdk/qtsdk.git/tree/packaging-tools/configurations/linux/x64/58/x86_64-qt58-gcc-conf}. + + \section1 Qt Configuration Files + + The following syntax is used in the Qt configuration files: + + \table + \header + \li Property name + \li Description + \li Example + \row + \li archives + \li A comma-separated list of values that will be specified in a detailed + level later in the file. + \li + archives: 58.gcc_64.qtbase, + 58.gcc_64.qtconnectivity + \row + \li target_install_base + \li A common base directory for all archives in a component + \li + target_install_base: /%QT_VERSION_MINOR%/gcc_64 + \row + \li archive_url + \li The location from where an archived content is fetched. The location can + be an absolute file system path or a URL. By default, the path or the URL + is appended to a base directory defined in \e{target_install_base}. + \li + archive_uri: /qt/%QT_VERSION_MINOR%/latest/qtbase/qtbase-Linux-RHEL_6_6-GCC-Linux-RHEL_6_6-X86_64.7z + \row + \li package_strip_dirs + \li Can get numerical values, for example 0, 1 or 3. The value defines + the number of unnecessary directories that are stripped away from the path. + \li \e{package_strip_dirs} is set as \e{3} and an archive path is + \e{/home/qtbuilder/build/<actual content>}. After you have run \e{build_wrapper.py}, + the archive is repackaged so that it has only <actual content> + in the repository root directory. If the path is not stripped, + an unnecessary directory structure is created in the end user host + when they install the component. + \row + \li target_install_dir + \li Defines a subdirectory for archive installation. + \li target_install_dir: /lib + \endtable + + A configuration file can refer to other configuration files. For example, + see the \e{[PackageConfigurationFiles]} section in + \l{http://code.qt.io/cgit/qtsdk/qtsdk.git/tree/packaging-tools/configurations/offline_installer_jobs/5.8/linux_x64}. + It lists the included configuration files: + + \badcode + [PackageConfigurationFiles] + file_list: qt-conf, + qt-license-conf, + qt-installer-changelog, + qt58-src-conf, + qt58-doc-examples-conf, + x86_64-qt58-gcc-conf, + x86_64-tools-qtcreator-qt58x-conf + \endcode + + See \l{Package Directory} for general information about the package + directory structure. +*/ + +/*! + \page qtas-sdk-build-repositories.html + \title Working with Online Repositories + \previouspage qtas-sdk-repository-structure.html + \nextpage qtas-sdk-troubleshooting-repositories.html + + You need to build online repositories when you add a new repository to + a server or when you update an existing repository. + + \section1 Creating New Repository + + When you create an online repository that does not yet exist in the server, + you can upload the repository content and add it to the root repository as + instructed in \l{Flexible Repository Structure}. + + \section1 Updating Repository + + \l{Promoting Updates} describes the steps required for updating online repositories. + + Updating an online repository can vary greatly depending on the used online + server system. Typically, updating contains the following steps: + + \list 1 + \li Uploading content files to the server. See \l{Uploading Content Files}. + \li Uploading \e{Updates.xml} to the server. See \l{Uploading Updates.xml}. + \endlist + + \section2 Uploading Content Files + + For example, a maintenance tool update could contain the following content files: + + \badcode + mycompany.tools.maintenancetool/2.0.4-0meta.7z + mycompany.tools.maintenancetool/2.0.4-0maintenancetool.7z + mycompany.tools.maintenancetool/2.0.4-0maintenancetool.7z.sha1 + \endcode + + Each content file is prepended with a version number set in the \c{<Version>} element + in the component's \e{package.xml} file. Thus you can copy the updated + files to a same directory that contains current file versions. It is just + important to remember to update the version numbers. For example, the + maintenance tool directory could contain the following files: + + \badcode + mycompany.tools.maintenancetool/2.0.2-0meta.7z + mycompany.tools.maintenancetool/2.0.2-0maintenancetool.7z + mycompany.tools.maintenancetool/2.0.2-0maintenancetool.7z.sha1 + mycompany.tools.maintenancetool/2.0.3-0meta.7z + mycompany.tools.maintenancetool/2.0.3-0maintenancetool.7z + mycompany.tools.maintenancetool/2.0.3-0maintenancetool.7z.sha1 + mycompany.tools.maintenancetool/2.0.4-0meta.7z + mycompany.tools.maintenancetool/2.0.4-0maintenancetool.7z + mycompany.tools.maintenancetool/2.0.4-0maintenancetool.7z.sha1 + \endcode + + \section2 Uploading Updates.xml + + If your online server uses mirroring, it is important to ensure that all + content is synchronized to the server before you update \e{Updates.xml}. + + You can set a cache expiration time as zero for \e{Updates.xml} in order to + reduce delay in synchronization. + + \section1 Maintenance Tool + + A maintenance tool is built when you build the + \l{Building Qt Installer Framework} {Qt Installer Framework}. Usually, + the maintenance tool is included in online repositories. It is installed to + the end user host from the online repository with other installed content. + + Online repositories should always provide the latest version of the + maintenance tool. We recommend that you build both an online installer and + the maintenance tool with the Qt Installer Framework version with the same + SHA-1. Otherwise, end users can install an old version of the maintenance + tool via the online installer. Then, if some updates on the server side are + available only via the latest maintenance tool version, the end users with + the old maintenance tool cannot access them. + + For example, the maintenance tool online repository could be as follows: + + \badcode + linux_x64/desktop/tools_maintenancetool/Updates.xml + mycompany.tools.maintenancetool/2.0.4-0meta.7z + mycompany.tools.maintenancetool/2.0.4-0maintenancetool.7z + mycompany.tools.maintenancetool/2.0.4-0maintenancetool.7z.sha1 + \endcode +*/ + +/*! + \page qtas-sdk-troubleshooting-repositories.html + \title Troubleshooting and Best Practices + \previouspage qtas-sdk-build-repositories.html + \nextpage qtas-sdk-creation.html + + When you work with online repositories, it is important to understand + how different actions affect the repositories. \l{Troubleshooting} + lists use cases that should be handled carefully so they do not lead to + errors in end user host. \l{Best Practices} lists some useful + practices that might be helpful in your daily work with online repositories. + + \section1 Troubleshooting + + \section2 Dependencies to Online Repository + + Immediately after an end user installs something from an online repository + via an online installer or a maintenance tool, a local dependency from the + end user host to the online repository is established. Thus you should + follow the following quidelines: + + \list + \li Do not remove repositories from the online server simply by deleting + the repositories. Instead, you should add the following setting in the + root repository: + \badcode + <Repository action="remove" url="..."> + \endcode + \li Do not manually change content in online repositories as it causes + a SHA-1 checksum mismatch. + \li If you push an update for a component in an online repository, you + must always remember to increase the version number of the updated component. + See \l{Updating Repository}. + \endlist + + \section2 Unsuccessful Updates + + If something goes wrong while you are uploading either + \l{Uploading Content Files}{content} or \l{Uploading Updates.xml}{Updates.xml}, + do not upload the previous versions from your own backup-files. + The Qt Installer Framework does not support roll-back functionality. Thus the + maintenance tool does not allow end users to install again the previous + version that is known to work. + + You should create a new version of the broken component and upload it + to the online repository. End users need to uninstall the broken component + and install the fixed one instead. + + \section2 Mirroring and File Caching + + If the web server uses mirroring or file caching, it is important to ensure + that all content has been uploaded to the server before you upload a new version + of \e{Updates.xml}. + + Some web servers support setting cache expiration time to zero for some + files. In this case, you could set the cache expiration time to zero for + \e{Updates.xml}. + + \section1 Best Practices + + \section2 Uploading to Test Server + + You can use a test server where you upload the repository builds for testing + purposes. After you have verified the content, you can upload it publicly + available to the web server that is used by online installers. + +*/ |