Running Qt Extended
|
package | location |
---|---|
SDK package | /opt/Qtopia/SDK/scripts/runqtopia |
Source package | <qtextended-root-dir>/bin/runqtopia |
where <qtextended-root-dir> is the install location of the source package.
The runqtopia script is designed to ease the burden of running multiple Qt Extended versions on a single machine. It launches QVFb and ensures that Qt Extended can talk to it by setting QWS_DISPLAY. It also changes the value of HOME since running multiple Qt Extended versions with the same HOME directory can cause problems.
To quit Qt Extended and close all Qt Extended applications close the virtual framebuffer.
QVFb is run using a skin to make it feel more like a real device. A skin is simply a set of XML files that define the look and feel of QVFb. You may use a different skin, or create your own to replicate your target device. If you are not familiar with QVFb please refer to: Qt Extended QVFb before continuing.
In practice the runqtopia script can be used in all cases to conveniently start Qt Extended. In cases where the script does not perform as expected, it is is advisable to take the script as the starting point and modify the procedure to meet your specific requirements.
For further information and a description of environment variables used by the script, use the command:
runqtopia -help
For your convenience the options are reproduced here.
Note:
This section describes the procedure to run Qt Extended on a device and is the same for all Qt Extended builds.
Note: The $QWS_DISPLAY environment variable must specify a value for mmWidth and mmHeight so that the screen DPI can be correctly calculated.
Qt Extended can made available into the device in the following ways:
This section describes how to run Qt Extended on a device using an NFS mount partition.
To use an NFS mount partition your device requires a network connection with the desktop machine and accesses Qt Extended binaries on the desktop machine. The binaries must be cross-compiled for the device-type (e.g. ARM) and you control the start/stop of Qt Extended through a terminal connection to the device.
This approach is ideal for some debugging and testing on a real device. The binaries can be quickly modified and re-built and the application under test can be restarted almost instantly. It provides an efficient work process when compared with the delays introduced by building packages and the usually very slow upload and flash process required to run Qt Extended from a standalone device. Performance debugging should not be made using this technique, as the lag in network operations will hinder performace.
To setup the device, use command line tools (or whatever is available on the device) to setup the network configuration and use ifconfig to determine the IP address. Note: Network settings in Qt Extended can be used, however, you would need to exit that Qt Extended in order to run over the network.
To export the Qt Extended image directory to the device, execute the following commands on the desktop machine:
ps aux | grep nfs
Output will be something like this:
tester@desk:~> ps aux | grep nfs root 10661 0.0 0.0 0 0 ? SW 16:20 0:00 [nfsd] root 10662 0.0 0.0 0 0 ? SW 16:20 0:00 [nfsd] tester 10554 0.0 0.1 3540 564 pts/8 S 16:12 0:00 grep nfs
If you only get the bottom line, then NFS is NOT running and needs to be started.
To start NFS use /etc/init.d/nfsserver start (or similar command) as root.
/path/to/image/ *(ro)
This exports the /path/to/image directory (and all subdirectories), and gives read-only access from any computer. In this procedure it is assumed this is the directory you want to export.
exportfs -a
The Qt Extended binaries in /path/to/image/Qtopia/bin are now accessible from the network.
mkdir -p /opt/Qtopia
mount hostip:<path to Qt Extended image> -orsize=8192,wsize=8192,ro,nolock,tcp /opt/Qtopia
This is the ultimate goal and is mentioned here for completeness. However, this option is device specific and not within the scope of this introduction.
As a general rule Qt Extended (or any other application) can be flashed onto a device using a CF or SD card or can be uploaded onto the device using a serial connection. Usually this means the image (for example, <path to Qt Extended image>) must first be packed into a special file such as initrd.bin. This file is uploaded and flashed into the device flash memory. The correct procedure is entirely dependent on the device used and cannot be described here. Please refer to the device manufacturers documentation for details of installing to the device.
Once the software is installed on the device the general rule is to reboot the device and the Linux boot script will ensure that Qt Extended is started automatically. If this doesn't work it is a system integration task to modify the relevant boot scripts.
From a Qt Extended perspective, running Qt Extended on a device means: power on the device and off you go!
For more information about system integration refer to System Customization.
When building Qt Extended for a touchscreen device, the touchscreen must be calibrated manually as Calibration is not run automatically. With Qt Extended running, enter the following command to start calibration:
qcop service send Launcher "execute(QString)" "calibrate"
This outputs calibration information to the /etc/pointercal file.
See also: System Customization.
Qt Extended provides the GUI software that runs on a mobile phone. To make a real phone call the electronics need to connect to a phone network. These electronics are assumed to be in the phone device itself. This section describes how the Qt Extended Phone software can be connected to the phone device hardware.
The phone simulator is an internal tool used to test part of the Qt Extended Phone functionality. It simulates part of the modem functionality and is the first step in debugging software. The simulator has been included in the package because it is well suited to illustrating the capabilities of Qt Extended. Please be advised however that the phone simulator is an unsupported tool.
Connect Qt Extended to the simulator using the following command:
export QTOPIA_PHONE_DEVICE=sim:localhost
This must be set before either Qt Extended or the simulator are started. If the runqtopia script is used, the default value for the environment variable QTOPIA_PHONE_DEVICE is sim:localhost. It is possible to run Qt Extended on one machine (embedded device) and the phone simulator on another machine. To do this replace localhost with the name of the machine on which the phonesim is running.
Note: The phone simulator can be build for either the development host or the target.
Further phone simulator information is available in the Tools section of the reference documentation.
Qt Extended can be connected to a real phone device using a serial connection. Please be advised that the phone device must support the standard AT commands. To connect use the following command:
export QTOPIA_PHONE_DEVICE=/dev/ttyS1:115200 export QTOPIA_PHONE_VENDOR=wavecom
where:
When using Qt Extended connect to a modem the environment variables QTOPIA_PHONE_DEVICE and QTOPIA_PHONE_VENDOR must be set before Qt Extended is started. Entering a baud rate after the serial port name is optional and depends on the modem being used. It is not necessary to start the phonesim application.
If you wish to start Qt Extended with multiplexing disabled then use the following command before starting Qt Extended:
export QTOPIA_PHONE_MUX=no
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt qtextended4.4 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com