Compile and Run Example Application
Compile and Build the Example
This section describes how to compile and build the Example application. A list of the commands used to create the Example application sources is available at: Creating the Example application.
To compile and build the example, follow these steps:
- Create a copy of the example:
cd somewhere
cp -r $QTOPIA_DEPOT_PATH/examples/application .
chmod +w application/*
cd application
- Generate a Makefile:
$QPEDIR/bin/qtopiamake
- Build the Example:
make
Install and Run the Example
There are two ways that you can install the example application, or indeed any Qtopia application that you create:
- Install directly into an existing Qtopia image. This installs the example as a normal Qtopia application - the same way that applications in the Qtopia source tree are installed. Applications installed in this way can be updated (by installing again), but cannot be uninstalled. This method is the best choice for applications that will always be shipped with a particular Qtopia device and when developing an application on a desktop workstation using Qtopia under qvfb.
- Create an installable package. This makes a package file that can be downloaded from a web server and installed into a running Qtopia image by using Qtopia's Settings->Software Packages application. Applications installed in this way can also be upgraded and uninstalled by using the Software Packages application. This method in the best choice for optional and third-party applications.
Installing into a Qtopia Image
To install and run the example against an existing Qtopia build image, follow these steps:
- Install the example using:
make install
- To run the example:
The application should now be available in the Applications menu under Qtopia's application launcher.
Creating an Installable Package.
To make a package suitable for installing via the Software Packages application, use the following command:
make packages
Using the Example Program to Make a New Application
To make an application using the example program as a model:
- ensure that files added to the project are also added to the project file, application.pro
- run make qmake to update the Makefile whenever the .pro file is updated.
Note: The make qmake step is not always required as the Makefile will automatically be re-built when the .pro file has changed.