Qt

Deploying Applications to Linux-Based Devices

You can specify settings for deploying applications to Linux-based devices (Embedded Linux, MeeGo Harmattan, and Maemo 5) in the project .pro file. You can view the settings in the Run Settings.

"Deploy to device"

The files to be installed are listed in the Deployment step, the Files to install for subproject field. The Local File Path field displays the location of the file on the development PC. The Remote Directory field displays the folder where the file is installed on the device. Text in red color indicates that the information is missing. Edit the qmake INSTALLS variable in the project .pro file to add the missing files.

When you run the application, Qt Creator copies the necessary files to the device and starts the application on it.

For example, adding

target.path = /root
INSTALLS += target

to the project .pro file will copy the binary of your project to /root on the remote device. Additional files can be deployed by adding them to further targets and adding those to INSTALLS as well.

Deploying on Embedded Linux

"Deploy to embedded Linux"

When you run the application on the Embedded Linux device, Qt Creator deploys the application as specified by the deploy steps. By default, Qt Creator copies the application files to the device by using the SSH file transfer protocol (SFTP), as specified by the Upload files via SFTP step.

If you have a lot of data to copy, select Details in the Upload Files via SFTP step, and then select the Incremental deployment check box. Qt Creator takes note of the deployment time and only copies files that have changed since the last deployment. However, when you make major changes on the device, such as removing files from the device manually or flashing a new disk image, or when you use another device with the same IP address, deselect the check box once, to have Qt Creator deploy all files again.

To only create a tarball and not copy the files to the device, select Add Deploy Step > Create tarball. Then remove all other deploy steps.

The Deploy tarball via SFTP upload step specifies that Qt Creator uploads the tarball to the device and extracts it.

Note: If the SFTP upload fails, make sure that the remote device has SFTP enabled in its SSH daemon. Some versions of Dropbear that come without SFTP support will crash when an SFTP upload is being attempted. This is not a bug in Qt Creator.

Deploying on MeeGo Harmattan and Maemo 5

You can use desktop files to display icons on the home screen of the device. To add desktop files to the project file, select Add Desktop File. To specify the icon file to display, select Add Launcher Icon. To remove desktop files and icons, delete the definitions from the project file.

If you develop your own libraries, Qt Creator needs to be able to find them when you compile projects depending on them. When you install MADDE, an instance of the device file system, called sysroot, is installed to the development PC. Libraries are copied to sysroot during the Install Debian package to sysroot step.

Creating Debian Installation Packages

When you run the application on the Maemo5 or Harmattan device, Qt Creator generates a Debian installation package in the build directory by default. You can deliver the installation package to users for installation on devices that are of the same type and run the same firmware as the connected device.

"Create installation package"

The name of the installation package is displayed in the Package name field in the Create Package step. You can change the version number in the Package version field.

You can specify information that users see on a delivery channel, such as Nokia Store or Maemo.org. You can specify a short description of the application, package name, and application icon.

The Debian control file contains an application icon in encoded form. To add the application icon to the file, select it in the Icon to be displayed in Package Manager field. For more information about icon files and adding them manually, see Displaying an icon in the Application Manager next to your package.

Note: Qt Creator automates this process for you.

Qt Creator provides templates for a set of files that must be included in Debian packages. When you start using a kit with Maemo5 or Harmattan device type for a project, Qt Creator asks whether packaging files are to be added to the project and to version control. If you plan to edit the packaging files, add them to version control.

To edit the files, select a file in Adapt Debian file and click Edit. The file opens in the text editor.