-rw-r--r-- | docs/start.doc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/start.doc b/docs/start.doc index 9745d9a..01b6ab1 100644 --- a/docs/start.doc +++ b/docs/start.doc | |||
@@ -1,191 +1,191 @@ | |||
1 | /*! | 1 | /*! |
2 | 2 | ||
3 | \page start.html | 3 | \page start.html |
4 | 4 | ||
5 | \title Getting Started | 5 | \title Getting Started |
6 | 6 | ||
7 | <html> | 7 | <html> |
8 | <title>Qtopia - The Qt palmtop environment</title> | 8 | <title>Qtopia - The Qt palmtop environment</title> |
9 | 9 | ||
10 | <body> | 10 | <body> |
11 | <h1><i>Qtopia</i> - The Qt palmtop environment</h1> | 11 | <h1><i>Qtopia</i> - The Qt palmtop environment</h1> |
12 | 12 | ||
13 | <p> | 13 | <p> |
14 | <i>Qtopia</i> is a windowing system for handheld devices. It offers | 14 | <i>Qtopia</i> is a windowing system for handheld devices. It offers |
15 | developers the powerful Qt API, and provides users with fast and | 15 | developers the powerful Qt API, and provides users with fast and |
16 | intuitive interaction. | 16 | intuitive interaction. |
17 | 17 | ||
18 | <h2>Developing for <i>Qtopia</i></h2> | 18 | <h2>Developing for <i>Qtopia</i></h2> |
19 | 19 | ||
20 | <p> | 20 | <p> |
21 | The Qt API includes rich GUI functionality, and is suitable for | 21 | The Qt API includes rich GUI functionality, and is suitable for |
22 | both large and small applications. | 22 | both large and small applications. |
23 | 23 | ||
24 | <p> | 24 | <p> |
25 | Since <i>Qtopia</i> offers the complete Qt API, you can do much of | 25 | Since <i>Qtopia</i> offers the complete Qt API, you can do much of |
26 | your development on any of the other platforms for which Qt is | 26 | your development on any of the other platforms for which Qt is |
27 | available - Windows, Unix/X11, or Mac OS X. However, for optimal | 27 | available - Windows, Unix/X11, or Mac OS X. However, for optimal |
28 | tailoring of your application to the smaller screen and other | 28 | tailoring of your application to the smaller screen and other |
29 | demands of a handheld environment, you should use the <i>Qtopia | 29 | demands of a handheld environment, you should use the <i>Qtopia |
30 | SDK</i>. | 30 | SDK</i>. |
31 | 31 | ||
32 | <p> | 32 | <p> |
33 | The <i>Qtopia SDK</i> allows you to develop <i>Qtopia</i> | 33 | The <i>Qtopia SDK</i> allows you to develop <i>Qtopia</i> |
34 | applications under the Linux desktop environment using the Qt Virtual | 34 | applications under the Linux desktop environment using the Qt Virtual |
35 | Framebuffer, which completely emulates the handheld <i>Qtopia</i> | 35 | Framebuffer, which completely emulates the handheld <i>Qtopia</i> |
36 | environment. It also includes cross-compiler software so that you can | 36 | environment. It also includes cross-compiler software so that you can |
37 | compile your application to run on the target handheld device. | 37 | compile your application to run on the target handheld device. |
38 | If you do not already have the Qtopia SDK (this document is normally | 38 | If you do not already have the Qtopia SDK (this document is normally |
39 | part of the SDK), contact info@trolltech.com, or see the | 39 | part of the SDK), contact info@trolltech.com, or see the |
40 | <a href=http://www.trolltech.com>Trolltech</a> web site. | 40 | <a href=http://www.trolltech.com>Trolltech</a> web site. |
41 | 41 | ||
42 | <p>To build applications for the SHARP SL5000 or similar StrongARM-based devices, | 42 | <p>To build applications for the SHARP SL5000 or similar StrongARM-based devices, |
43 | you will also need a StrongARM cross compiler. Entrants in the programming | 43 | you will also need a StrongARM cross compiler. Entrants in the programming |
44 | contest for this device will have received both the SDK and a cross-compiler. | 44 | contest for this device will have received both the SDK and a cross-compiler. |
45 | 45 | ||
46 | <p> | 46 | <p> |
47 | The SDK includes an example program. We recommend that you compile and | 47 | The SDK includes an example program. We recommend that you compile and |
48 | run this example to learn how things work, before tackling your own | 48 | run this example to learn how things work, before tackling your own |
49 | projects. | 49 | projects. |
50 | 50 | ||
51 | <p> | 51 | <p> |
52 | To compile the example program for running on the Linux desktop: | 52 | To compile the example program for running on the Linux desktop: |
53 | 53 | ||
54 | <ol> | 54 | <ol> |
55 | <li> | 55 | <li> |
56 | <p> | 56 | <p> |
57 | Check the environment is correct: | 57 | Check the environment is correct: |
58 | 58 | ||
59 | <p> | 59 | <p> |
60 | <pre> | 60 | <pre> |
61 | export QPEDIR=/opt/Qtopia | 61 | export OPIEDIR=/opt/Qtopia |
62 | export QTDIR=/opt/Qtopia | 62 | export QTDIR=/opt/Qtopia |
63 | export PATH=$QTDIR/bin:$PATH | 63 | export PATH=$QTDIR/bin:$PATH |
64 | export TMAKEPATH=/opt/Qtopia/tmake/lib/qws/linux-generic-g++ | 64 | export TMAKEPATH=/opt/Qtopia/tmake/lib/qws/linux-generic-g++ |
65 | export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH | 65 | export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH |
66 | </pre> | 66 | </pre> |
67 | 67 | ||
68 | <li> Take a copy of the example: | 68 | <li> Take a copy of the example: |
69 | 69 | ||
70 | <pre> | 70 | <pre> |
71 | cd somewhere | 71 | cd somewhere |
72 | cp -r $QPEDIR/example . | 72 | cp -r $OPIEDIR/example . |
73 | cd example | 73 | cd example |
74 | </pre> | 74 | </pre> |
75 | 75 | ||
76 | <li> Generate a Makefile: | 76 | <li> Generate a Makefile: |
77 | 77 | ||
78 | <pre> | 78 | <pre> |
79 | tmake -o Makefile example.pro | 79 | tmake -o Makefile example.pro |
80 | </pre> | 80 | </pre> |
81 | 81 | ||
82 | <li> Build the example: | 82 | <li> Build the example: |
83 | 83 | ||
84 | <pre> | 84 | <pre> |
85 | make | 85 | make |
86 | </pre> | 86 | </pre> |
87 | 87 | ||
88 | <li> Install it: | 88 | <li> Install it: |
89 | 89 | ||
90 | <pre> | 90 | <pre> |
91 | su # root privileges required to install | 91 | su # root privileges required to install |
92 | cp example.desktop $QPEDIR/apps/Applications | 92 | cp example.desktop $OPIEDIR/apps/Applications |
93 | cp Example.png $QPEDIR/pics | 93 | cp Example.png $OPIEDIR/pics |
94 | cp example $QPEDIR/bin | 94 | cp example $OPIEDIR/bin |
95 | exit # no need to be root anymore | 95 | exit # no need to be root anymore |
96 | </pre> | 96 | </pre> |
97 | 97 | ||
98 | <li> To run it, first run the Qt Virtual Framebuffer: | 98 | <li> To run it, first run the Qt Virtual Framebuffer: |
99 | 99 | ||
100 | <pre> | 100 | <pre> |
101 | qvfb & | 101 | qvfb & |
102 | </pre> | 102 | </pre> |
103 | 103 | ||
104 | <li> Then run the <i>Qtopia</i> environment: | 104 | <li> Then run the <i>Qtopia</i> environment: |
105 | 105 | ||
106 | <pre> | 106 | <pre> |
107 | qpe | 107 | qpe |
108 | </pre> | 108 | </pre> |
109 | 109 | ||
110 | <p> | 110 | <p> |
111 | Your application should be available in the Applications tab visible | 111 | Your application should be available in the Applications tab visible |
112 | inside the Qt Virtual Framebuffer window. | 112 | inside the Qt Virtual Framebuffer window. |
113 | </p> | 113 | </p> |
114 | 114 | ||
115 | <li> If you want to distribute your applications to others, build an RPM package, e.g.: | 115 | <li> If you want to distribute your applications to others, build an RPM package, e.g.: |
116 | <pre> | 116 | <pre> |
117 | mkipks -rpm -arch i386 example.control | 117 | mkipks -rpm -arch i386 example.control |
118 | </pre> | 118 | </pre> |
119 | </ol> | 119 | </ol> |
120 | 120 | ||
121 | <p> | 121 | <p> |
122 | To make your own application, use the example program as a model. Make sure that | 122 | To make your own application, use the example program as a model. Make sure that |
123 | when you add files to your project, you also add them | 123 | when you add files to your project, you also add them |
124 | to your project file (e.g. <tt>example.pro</tt>) and rerun the | 124 | to your project file (e.g. <tt>example.pro</tt>) and rerun the |
125 | <tt>tmake</tt> command to update the <tt>Makefile</tt>. | 125 | <tt>tmake</tt> command to update the <tt>Makefile</tt>. |
126 | 126 | ||
127 | <p> | 127 | <p> |
128 | To build you application for the SHARP SL5000 rather than just running | 128 | To build you application for the SHARP SL5000 rather than just running |
129 | on the desktop, the process is similar: | 129 | on the desktop, the process is similar: |
130 | 130 | ||
131 | <ol> | 131 | <ol> |
132 | <li> | 132 | <li> |
133 | <p> | 133 | <p> |
134 | Check the environment is correctly set for the SHARP SL5000: | 134 | Check the environment is correctly set for the SHARP SL5000: |
135 | 135 | ||
136 | <p> | 136 | <p> |
137 | <pre> | 137 | <pre> |
138 | export QPEDIR=/opt/Qtopia/sharp | 138 | export OPIEDIR=/opt/Qtopia/sharp |
139 | export QTDIR=/opt/Qtopia/sharp | 139 | export QTDIR=/opt/Qtopia/sharp |
140 | export PATH=$QTDIR/bin:/usr/local/arm/bin:$PATH | 140 | export PATH=$QTDIR/bin:/usr/local/arm/bin:$PATH |
141 | export TMAKEPATH=/opt/Qtopia/tmake/lib/qws/linux-sharp-g++ | 141 | export TMAKEPATH=/opt/Qtopia/tmake/lib/qws/linux-sharp-g++ |
142 | </pre> | 142 | </pre> |
143 | 143 | ||
144 | <li> Build and install exactly the same as you did for the desktop | 144 | <li> Build and install exactly the same as you did for the desktop |
145 | (note that the generated Makefile is different): | 145 | (note that the generated Makefile is different): |
146 | <pre> | 146 | <pre> |
147 | make clean | 147 | make clean |
148 | tmake -o Makefile example.pro | 148 | tmake -o Makefile example.pro |
149 | ... <i>etc.</i> | 149 | ... <i>etc.</i> |
150 | </pre> | 150 | </pre> |
151 | 151 | ||
152 | <li> To install it on a device, build an ipk package file (you should be root | 152 | <li> To install it on a device, build an ipk package file (you should be root |
153 | to do this, since then it will strip the executable for you): | 153 | to do this, since then it will strip the executable for you): |
154 | <pre> | 154 | <pre> |
155 | mkipks example.control | 155 | mkipks example.control |
156 | </pre> | 156 | </pre> |
157 | 157 | ||
158 | <p> | 158 | <p> |
159 | The resulting <tt>example-1.0.0.ipk</tt> can be installed on the | 159 | The resulting <tt>example-1.0.0.ipk</tt> can be installed on the |
160 | SL5000 by using <i>Qtopia Desktop</i>. | 160 | SL5000 by using <i>Qtopia Desktop</i>. |
161 | </p> | 161 | </p> |
162 | 162 | ||
163 | </ol> | 163 | </ol> |
164 | 164 | ||
165 | <h3>Building Your Own Applications</h3> | 165 | <h3>Building Your Own Applications</h3> |
166 | 166 | ||
167 | Once you have built the example, you can proceed with writing | 167 | Once you have built the example, you can proceed with writing |
168 | your own applicatons. If you are not familiar with Qt, you should | 168 | your own applicatons. If you are not familiar with Qt, you should |
169 | consult the Qt documentation by pointing your web browser at | 169 | consult the Qt documentation by pointing your web browser at |
170 | <a href=file:/opt/Qtopia/doc/html/index.html><tt>/opt/Qtopia/doc/html/index.html</tt></a> | 170 | <a href=file:/opt/Qtopia/doc/html/index.html><tt>/opt/Qtopia/doc/html/index.html</tt></a> |
171 | when you have installed the SDK, or use the online | 171 | when you have installed the SDK, or use the online |
172 | <a href=http://doc.trolltech.com/>Trolltech Documentation Site</a>. | 172 | <a href=http://doc.trolltech.com/>Trolltech Documentation Site</a>. |
173 | The <a href="http://www.trolltech.com/products/qt/whitepaper.html">Qt | 173 | The <a href="http://www.trolltech.com/products/qt/whitepaper.html">Qt |
174 | Whitepaper</a> provides a good overview of, and introduction to, the | 174 | Whitepaper</a> provides a good overview of, and introduction to, the |
175 | Qt API. | 175 | Qt API. |
176 | 176 | ||
177 | <p> | 177 | <p> |
178 | When you add more files to your application, just edit the project | 178 | When you add more files to your application, just edit the project |
179 | file (e.g. <tt>example.pro</tt>) and rerun the <tt>tmake</tt> | 179 | file (e.g. <tt>example.pro</tt>) and rerun the <tt>tmake</tt> |
180 | command. | 180 | command. |
181 | 181 | ||
182 | <p> | 182 | <p> |
183 | The <tt>.ui</tt> files are <i>Qt Designer</i> user interface files. | 183 | The <tt>.ui</tt> files are <i>Qt Designer</i> user interface files. |
184 | You can create and edit these using <i>Qt Designer</i>: | 184 | You can create and edit these using <i>Qt Designer</i>: |
185 | <pre> | 185 | <pre> |
186 | designer example.ui | 186 | designer example.ui |
187 | </pre> | 187 | </pre> |
188 | <i>Qt Designer</i>'s online documentation includes a complete | 188 | <i>Qt Designer</i>'s online documentation includes a complete |
189 | tutorial. | 189 | tutorial. |
190 | 190 | ||
191 | */ | 191 | */ |