Namespaces
Variants
Actions
Revision as of 09:11, 17 October 2012 by hamishwillee (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Using the DEPLOYMENT keyword in a Qt package file

Jump to: navigation, search

This code snippet demonstrates how to use the DEPLOYMENT keyword in a Qt project (.pro) file.

Article Metadata

Tested with
Devices(s): Nokia 5800 XpressMusic

Compatibility
Platform(s): S60 3rd Edition FP1, FP2
S60 5th Edition

Article
Keywords: DEPLOYMENT, pro, project
Created: tepaa (12 May 2009)
Last edited: hamishwillee (17 Oct 2012)

Contents

Overview

DEPLOYMENT specifies which additional files will be deployed. On Symbian, DEPLOYMENT can be used to add additional data/resouce files to the PKG file. Deployment means the transfer of files from the development system to the target device.

Note.png
Note: Deploying a Qt Application on Symbian contains a lot more useful information, as does the Qt reference

Qt app project file (.pro)

Use the DEPLOYMENT keyword to copy files into the package file and to the device. All the files from the images folder are copied into the package. When the package is installed on the device, the files are stored on the device's c:\data\images folder.

myFiles.sources = images\*
myFiles.path = c:\data\images
DEPLOYMENT += myFiles

Instead of using a hardcoded drive letter (such as c:), !: should be used to allow the user to select the drive where the application will be installed.

myFiles.path = !:\data\images


Qt-generated Symbian package file (.pkg)

This is a part of a package file that is generated via qmake. Pictures are coming from QMyApp to the device.

; DEPLOYMENT
"c:\QMyApp\images\picture1.jpg" - "c:\data\images\picture1.jpg"
"c:\QMyApp\images\picture2.jpg" - "c:\data\images\picture2.jpg"
"c:\QMyApp\images\picture3.jpg" - "c:\data\images\picture3.jpg"
"c:\QMyApp\images\picture4.jpg" - "c:\data\images\picture4.jpg"
"c:\QMyApp\images\picture5.jpg" - "c:\data\images\picture5.jpg"


Generate package file

Call qmake to generate the package file.

qmake


Postconditions

The package file is generated with additional picture files that are copied to the device.

222 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved