diff options
author | Topi Reinio <topi.reinio@digia.com> | 2014-03-31 14:13:26 +0200 |
---|---|---|
committer | Topi Reiniƶ <topi.reinio@digia.com> | 2014-04-01 11:46:11 +0300 |
commit | 42834a50796fdbd563c6f4449a3bd57ce8aaac91 (patch) | |
tree | 1ed254d9f523b1ec16b474b1c2fcc45d85a97d4e /src/doc/src/b2qt.qdoc | |
parent | f864b6bdccb31225b490dd2c53117cf3a53ec383 (diff) |
Doc: Improve instructions for deploying existing projects
- Mention Widget applications
- Simplify the .pro file code snippets and make them
copy-pastable
- Discuss deploying application resources
- Link to Qt Resource System docs in Qt Core
Task-number: QTEE-399
Change-Id: I0bcc38a188b848800e79c9c4a5fde7bd9f536fbd
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Reviewed-by: Kalle Viironen <kalle.viironen@digia.com>
Diffstat (limited to 'src/doc/src/b2qt.qdoc')
-rw-r--r-- | src/doc/src/b2qt.qdoc | 44 |
1 files changed, 29 insertions, 15 deletions
diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 896f4b6..433ea37 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -747,7 +747,7 @@ \list 1 \li Make sure that your device is powered on and connected to the development host. - \li In Qt Creator, select \b{File > New File or Project} > + \li In Qt Creator, select \b File > \b {New File or Project} > \b Applications > \b{Qt Quick Application} > \b{Choose}. \li Choose a location for your new project. \li In the \b{Qt Quick Component Set} dialog, select \b{Qt Quick 2.0}. @@ -755,7 +755,7 @@ devices. You can also select the emulator kit to test running the project in the emulator. \li Click \b{Next} and finish the wizard. - \li In \b{Projects > Build & Run}, select the correct kit for your + \li In \b Projects > \b {Build & Run}, select the correct kit for your connected device. \li To build and run the project, click \inlineimage qtcreator-run.png \endlist @@ -768,7 +768,7 @@ \li Go to \b Welcome > \b Examples. \li Select a \e Boot2Qt Qt version from the drop-down list. \li Select a demo you want to build. - \li In \b{Projects > Build & Run}, select the correct kit for your + \li In \b Projects > \b {Build & Run}, select the correct kit for your connected device or emulator. \li To build and run the project, click \inlineimage qtcreator-run.png \endlist @@ -776,27 +776,41 @@ \section1 Setting Up an Already Existing Project for Deployment New Qt Quick application projects generated by Qt Creator always have the correct - settings for deployment on the device or emulator. However, other projects may - need some changes. + settings for deployment on the device or emulator. However, other projects need + some changes. This includes projects created using the + \b File > \b {New File or Project} > \b Applications > \b{Qt Widget Application} + template. - As a general rule, application binaries and resources (such as QML files and - images) are deployed to the \c {/data/user/qt/<APPLICATION_NAME>} directory. - Therefore, the \c path variable for the \c INSTALLS targets needs to be adjusted - accordingly in .pro files. + As a general rule, application binaries and resources are deployed to the + \c {/data/user/qt/<APPLICATION_NAME>} directory. Therefore, the \c path variable for + the \c INSTALLS targets needs to be adjusted accordingly in .pro files. - For example, change the following \c target.path value: + Open the .pro file and define the \c target.path and \c INSTALLS variables as follows: \code - target.path = ... - INSTALLS += target + target.path = /data/user/qt/$$TARGET + INSTALLS += target \endcode - to: + Above, \c {$$TARGET} expands to the application target (executable) name. + + \section2 Deploying Application Resources + + If the application depends on additional resources (such as QML files and + images), you need to deploy them as well. For example: \code - target.path = /data/user/qt/<APPLICATION_NAME> - INSTALLS += target + appFiles.files = *.png qml + appFiles.path = /data/user/qt/$$TARGET + INSTALLS += appFiles \endcode + + Above, all PNG images from the application source directory, and the entire + \e qml subdirectory are included in the deployment. + + Alternatively, the files used by the application can be stored into the application + executable using the \l{The Qt Resource System}{Qt resource system}. This way, simply + deploying the application binary is all that's required. */ /*! |