summaryrefslogtreecommitdiff
path: root/docs
authorkergoth <kergoth>2002-01-31 18:35:48 (UTC)
committer kergoth <kergoth>2002-01-31 18:35:48 (UTC)
commit2802e5a2b474101a50bf95e707061ca5542876fd (patch) (side-by-side diff)
treea1015514ef9e48df091903cccf0d3174e272f663 /docs
parent48a922e687e82dc8ebe2bc3cb17dcaa8dcae62bd (diff)
downloadopie-2802e5a2b474101a50bf95e707061ca5542876fd.zip
opie-2802e5a2b474101a50bf95e707061ca5542876fd.tar.gz
opie-2802e5a2b474101a50bf95e707061ca5542876fd.tar.bz2
*** empty log message ***
Diffstat (limited to 'docs') (more/less context) (show whitespace changes)
-rw-r--r--docs/start.doc37
1 files changed, 26 insertions, 11 deletions
diff --git a/docs/start.doc b/docs/start.doc
index 01b6ab1..53a4e36 100644
--- a/docs/start.doc
+++ b/docs/start.doc
@@ -37,143 +37,158 @@ environment. It also includes cross-compiler software so that you can
compile your application to run on the target handheld device.
If you do not already have the Qtopia SDK (this document is normally
part of the SDK), contact info@trolltech.com, or see the
<a href=http://www.trolltech.com>Trolltech</a> web site.
<p>To build applications for the SHARP SL5000 or similar StrongARM-based devices,
you will also need a StrongARM cross compiler. Entrants in the programming
contest for this device will have received both the SDK and a cross-compiler.
<p>
The SDK includes an example program. We recommend that you compile and
run this example to learn how things work, before tackling your own
projects.
<p>
To compile the example program for running on the Linux desktop:
<ol>
<li>
<p>
Check the environment is correct:
<p>
<pre>
- export OPIEDIR=/opt/Qtopia
+ export QPEDIR=/opt/Qtopia
export QTDIR=/opt/Qtopia
export PATH=$QTDIR/bin:$PATH
export TMAKEPATH=/opt/Qtopia/tmake/lib/qws/linux-generic-g++
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
</pre>
<li> Take a copy of the example:
<pre>
cd somewhere
- cp -r $OPIEDIR/example .
+ cp -r $QPEDIR/example .
cd example
</pre>
<li> Generate a Makefile:
<pre>
tmake -o Makefile example.pro
</pre>
<li> Build the example:
<pre>
make
</pre>
<li> Install it:
<pre>
su # root privileges required to install
- cp example.desktop $OPIEDIR/apps/Applications
- cp Example.png $OPIEDIR/pics
- cp example $OPIEDIR/bin
+ cp example.desktop $QPEDIR/apps/Applications
+ cp Example.png $QPEDIR/pics
+ cp example $QPEDIR/bin
exit # no need to be root anymore
</pre>
<li> To run it, first run the Qt Virtual Framebuffer:
<pre>
qvfb &amp;
</pre>
<li> Then run the <i>Qtopia</i> environment:
<pre>
qpe
</pre>
<p>
Your application should be available in the Applications tab visible
inside the Qt Virtual Framebuffer window.
</p>
<li> If you want to distribute your applications to others, build an RPM package, e.g.:
<pre>
mkipks -rpm -arch i386 example.control
</pre>
</ol>
<p>
To make your own application, use the example program as a model. Make sure that
when you add files to your project, you also add them
to your project file (e.g. <tt>example.pro</tt>) and rerun the
<tt>tmake</tt> command to update the <tt>Makefile</tt>.
<p>
To build you application for the SHARP SL5000 rather than just running
on the desktop, the process is similar:
<ol>
<li>
<p>
Check the environment is correctly set for the SHARP SL5000:
<p>
<pre>
- export OPIEDIR=/opt/Qtopia/sharp
+ export QPEDIR=/opt/Qtopia/sharp
export QTDIR=/opt/Qtopia/sharp
export PATH=$QTDIR/bin:/usr/local/arm/bin:$PATH
export TMAKEPATH=/opt/Qtopia/tmake/lib/qws/linux-sharp-g++
</pre>
- <li> Build and install exactly the same as you did for the desktop
- (note that the generated Makefile is different):
+ <li> Rebuild the makefile ($TMAKEPATH has changed) above:
<pre>
make clean
tmake -o Makefile example.pro
- ... <i>etc.</i>
</pre>
- <li> To install it on a device, build an ipk package file (you should be root
- to do this, since then it will strip the executable for you):
+ <li> Build it:
<pre>
+ make
+</pre>
+
+ <li> Install it (note that this is now going into the /opt/Qtopia/sharp/ directory):
+<pre>
+ su # root privileges required to install
+ cp example.desktop $QPEDIR/apps/Applications
+ cp Example.png $QPEDIR/pics
+ cp example $QPEDIR/bin
+ exit # no need to be root anymore
+</pre>
+
+</pre>
+
+ <li> To install it on a device, build an ipk package file:
+<pre>
+ su # root privileges required to strip the executable
mkipks example.control
+ exit # no need to be root anymore
</pre>
<p>
The resulting <tt>example-1.0.0.ipk</tt> can be installed on the
SL5000 by using <i>Qtopia Desktop</i>.
</p>
</ol>
<h3>Building Your Own Applications</h3>
Once you have built the example, you can proceed with writing
your own applicatons. If you are not familiar with Qt, you should
consult the Qt documentation by pointing your web browser at
<a href=file:/opt/Qtopia/doc/html/index.html><tt>/opt/Qtopia/doc/html/index.html</tt></a>
when you have installed the SDK, or use the online
<a href=http://doc.trolltech.com/>Trolltech Documentation Site</a>.
The <a href="http://www.trolltech.com/products/qt/whitepaper.html">Qt
Whitepaper</a> provides a good overview of, and introduction to, the
Qt API.
<p>
When you add more files to your application, just edit the project
file (e.g. <tt>example.pro</tt>) and rerun the <tt>tmake</tt>