1 | TSPSG Installation Guide |
---|
2 | ======================== |
---|
3 | |
---|
4 | Thank you for trying **TSPSG**. This document will guide you through the |
---|
5 | steps necessary to compile and run **TSPSG**. |
---|
6 | |
---|
7 | |
---|
8 | 1. Requirements |
---|
9 | --------------- |
---|
10 | |
---|
11 | To be able compile **TSPSG** you need to have |
---|
12 | *[Qt libraries](http://qt-project.org/)*. The minimum supported version |
---|
13 | of *Qt* is **4.5.0**. The recommended version is **4.6.x** or higher. |
---|
14 | |
---|
15 | **NOTE**: Please, note that there will be some regressions in |
---|
16 | functionality if your version of *Qt* is lower than the recommended. |
---|
17 | |
---|
18 | |
---|
19 | 2. Assumptions |
---|
20 | -------------- |
---|
21 | |
---|
22 | This guide assumes that you already have *Qt* libraries and all |
---|
23 | necessary prerequisites installed. |
---|
24 | |
---|
25 | Also, the following assumptions are made: |
---|
26 | |
---|
27 | - For **Linux/UNIX/BSD**: `lrelease` and `qmake` are avilable in |
---|
28 | `$PATH`. |
---|
29 | - For **Windows** (*MinGW*) and **Symbian**: you have installed *Qt |
---|
30 | SDK* or prebuilt libraries and have Start Menu items for Qt tools. |
---|
31 | - For **Windows** (*Visual Studio*) and **Windows Mobile**: the *Qt* |
---|
32 | libraries reside in `C:\Qt\`. |
---|
33 | - For **Windows Mobile**: *Windows Mobile 5.0 Pocket PC SDK* or later |
---|
34 | is installed. |
---|
35 | |
---|
36 | |
---|
37 | 3. Supported Platforms |
---|
38 | ---------------------- |
---|
39 | |
---|
40 | **TSPSG** is oficially supported and tested on the following platforms: |
---|
41 | |
---|
42 | - **Linux**: *Gentoo AMD64* and *Kubuntu 9.10 64-bit AMD*. |
---|
43 | - **Windows**: *Windows XP 32-bit* and *Windows 7 64-bit*. |
---|
44 | - **Windows Mobile**: *Windows Mobile 6.5 Professional Edition*. |
---|
45 | |
---|
46 | |
---|
47 | 4. Building and Installation |
---|
48 | ---------------------------- |
---|
49 | |
---|
50 | ### 4.1. Common Information ### |
---|
51 | |
---|
52 | To be able ot build **TSPSG** you need to have the following *Qt* |
---|
53 | modules: *QtCore*, *QtGui* and *QtSvg*. The first two are required, the |
---|
54 | last one is optional. To get support for additional image formats (i.e., |
---|
55 | **JPEG** and **TIFF**) you'll additionally need corresponding *Qt |
---|
56 | imageformats* plugins. |
---|
57 | |
---|
58 | If you want to build **TSPSG** without **SVG** support add `nosvg` to |
---|
59 | *qmake* `CONFIG` parameter, so that *qmake* command will typically be: |
---|
60 | |
---|
61 | qmake CONFIG+=release CONFIG+=nosvg |
---|
62 | |
---|
63 | This way you will not depend on *QtSvg* module but will not be able to |
---|
64 | export solution graph in **SVG** format. |
---|
65 | |
---|
66 | |
---|
67 | **TSPSG** uses *qmake* `PREFIX` parameter to determine installation path |
---|
68 | for make install command. If you don't specify it when running qmake, it |
---|
69 | will be assigned the default value depending on the platform: |
---|
70 | |
---|
71 | | Platform | Default `PREFIX` value | |
---|
72 | |-----------------------|-----------------------------------------| |
---|
73 | | **Linux/UNIX/BSD** | `/usr` | |
---|
74 | | **Windows** | `%PROGRAMFILES%` environment variable\* | |
---|
75 | | **Windows CE/Mobile** | `\Program Files` | |
---|
76 | | **Symbian** | *\<ignored\>* | |
---|
77 | |
---|
78 | \* - usually, it is `C:\Program Files`. |
---|
79 | |
---|
80 | **NOTE**: Please, note that there are no installation and/or packaging |
---|
81 | rules for **MacOS** and other platforms not mentioned in this table. |
---|
82 | |
---|
83 | |
---|
84 | By default, **TSPSG** uses precompiled header when being built. If you |
---|
85 | experience problems with it you may add `CONFIG+=nopch` parameter to |
---|
86 | *qmake* to disable the generation and use of the precompiled header. |
---|
87 | |
---|
88 | |
---|
89 | ### 4.2. General Procedure ### |
---|
90 | |
---|
91 | On most platforms the general building and installation procedure is: |
---|
92 | |
---|
93 | 1. Run `lrelease` to generate binary translation files (*.qm*) from |
---|
94 | the source (*.ts*). |
---|
95 | 2. Run `qmake` with `CONFIG+=release` parameter to generate makefiles. |
---|
96 | 3. Run `make` utility (e.g., *make*, *nmake*, *mingw32-make*) to build |
---|
97 | **TSPSG**. |
---|
98 | 4. Run `make` utility with `install` parameter. |
---|
99 | |
---|
100 | NOTE: It is important to run `lrelease` before `qmake`, or `qmake` will |
---|
101 | not "pick up" the translations when generating installation rules. |
---|
102 | |
---|
103 | |
---|
104 | ### 4.3. Linux/UNIX/BSD ### |
---|
105 | |
---|
106 | Open a shell, navigate to the directory where you have **TSPSG** source |
---|
107 | downloaded and type |
---|
108 | |
---|
109 | tar xvjf tspsg-<VERSION>-src.tar.bz2 |
---|
110 | cd tspsg-<VERSION>-src |
---|
111 | |
---|
112 | where *\<VERSION\>* is the version of **TSPSG** you downloaded. Now run |
---|
113 | |
---|
114 | lrelease tspsg.pro |
---|
115 | qmake tspsg.pro |
---|
116 | make |
---|
117 | |
---|
118 | In some cases you may need to type |
---|
119 | |
---|
120 | qmake tspsg.pro CONFIG+=release |
---|
121 | |
---|
122 | |
---|
123 | If make step finished without errors you can install TSPSG by running |
---|
124 | |
---|
125 | sudo make install |
---|
126 | |
---|
127 | or |
---|
128 | |
---|
129 | su |
---|
130 | make install |
---|
131 | |
---|
132 | depending on your distribution. |
---|
133 | |
---|
134 | The executable goes to `<PREFIX>/bin`; *COPYING*, *ChangeLog.md*, |
---|
135 | *README.md* and *INSTALL.md* go to `<PREFIX>/share/doc/TSPSG-<VERSION>`. |
---|
136 | |
---|
137 | |
---|
138 | ### 4.4. Windows ### |
---|
139 | |
---|
140 | TSPSG will be installed to <PREFIX>\TSPSG folder. |
---|
141 | |
---|
142 | NOTE: Please, read the Section 7 after reading this Section. |
---|
143 | |
---|
144 | |
---|
145 | #### 4.4.1. Using MinGW #### |
---|
146 | |
---|
147 | Unpack the downloaded source code of TSPSG with your favourite |
---|
148 | compression software. Now launch the Qt Command Prompt from the Start |
---|
149 | Menu, navigate to the directory where you unpacked the source and run |
---|
150 | |
---|
151 | lrelease tspsg.pro |
---|
152 | qmake tspsg.pro CONFIG+=release |
---|
153 | mingw32-make |
---|
154 | |
---|
155 | NOTE: Make process may fail with a crash of windres.exe. If you've run |
---|
156 | into this issue, please, read the Section 6.1. |
---|
157 | |
---|
158 | If make step finished without errors you can install TSPSG by running |
---|
159 | |
---|
160 | mingw32-make install |
---|
161 | |
---|
162 | |
---|
163 | #### 4.4.2. Using Visual Studio #### |
---|
164 | |
---|
165 | Unpack the downloaded source code of TSPSG with your favourite |
---|
166 | compression software. Now launch the Visual Studio Command Prompt from |
---|
167 | the Start Menu, navigate to the directory where you unpacked the source |
---|
168 | and run |
---|
169 | |
---|
170 | C:\Qt\bin\lrelease tspsg.pro |
---|
171 | C:\Qt\bin\qmake tspsg.pro CONFIG+=release |
---|
172 | nmake |
---|
173 | |
---|
174 | If make step finished without errors you can install TSPSG by running |
---|
175 | |
---|
176 | nmake install |
---|
177 | |
---|
178 | |
---|
179 | ### 4.5. Windows CE/Mobile ### |
---|
180 | |
---|
181 | Unpack the downloaded source code of TSPSG with your favourite |
---|
182 | compression software. Now launch the Visual Studio Command Prompt from |
---|
183 | the Start Menu and run |
---|
184 | |
---|
185 | set PATH=C:\Qt\bin;%PATH% |
---|
186 | setcepaths wincewm50pocket-msvc2008 |
---|
187 | |
---|
188 | Now navigate to the directory where you unpacked the source and run |
---|
189 | |
---|
190 | lrelease tspsg.pro |
---|
191 | qmake tspsg.pro CONFIG+=release |
---|
192 | nmake |
---|
193 | |
---|
194 | There is no automated installation process for Windows Mobile build. To |
---|
195 | install TSPSG on your PDA you need to create a folder on your device |
---|
196 | and copy the following files to it: |
---|
197 | |
---|
198 | - tspsg.exe from release folder in the source directory. |
---|
199 | |
---|
200 | - QtCore4.dll and QtGui4.dll from C:\Qt\bin folder. |
---|
201 | |
---|
202 | - msvcr90.dll from |
---|
203 | C:\Program Files\Microsoft Visual Studio 9.0\VC\ce\dll\armv4i folder. |
---|
204 | |
---|
205 | - all *.qm files from l10n folder in the source directory to l10n |
---|
206 | subfolder. |
---|
207 | |
---|
208 | |
---|
209 | ### 4.6. Symbian ### |
---|
210 | |
---|
211 | Unpack the downloaded source code of TSPSG with your favourite |
---|
212 | compression software. Now launch the Qt for Symbian Command Prompt from |
---|
213 | the Start Menu, navigate to the directory where you unpacked the source |
---|
214 | and run |
---|
215 | |
---|
216 | lrelease tspsg.pro |
---|
217 | qmake tspsg.pro CONFIG+=release |
---|
218 | make release-gcce |
---|
219 | |
---|
220 | WARNING: You need to unpack the source to the same drive as Symbian SDK |
---|
221 | and the path must not contain any spaces or TSPSG won't build. |
---|
222 | |
---|
223 | If make step finished without errors you can generate sis installation |
---|
224 | file by running |
---|
225 | |
---|
226 | make sis |
---|
227 | |
---|
228 | You'll get tspsg.sis file in the source directory. Copy it to your |
---|
229 | phone and run or install using Nokia PC Suite. |
---|
230 | |
---|
231 | NOTE: You need to install Qt libraries on your device before installing |
---|
232 | TSPSG. Usually, it should be enough to install qt_installer.sis from |
---|
233 | the Qt installation directory. |
---|
234 | |
---|
235 | Alternatively, if you have installed Nokia Smart Installer you can run |
---|
236 | |
---|
237 | make installer_sis |
---|
238 | |
---|
239 | You'll get an tspsg_installer.sis that will automatically download and |
---|
240 | install the required Qt libraries on TSPSG installation. |
---|
241 | |
---|
242 | NOTE: Please, be aware that you have to sign the sis file to be able to |
---|
243 | install it on your device. You can use Open Signed Online[2] to quickly |
---|
244 | sign the sis file for your device. Alternatively, you can try to enable |
---|
245 | the installation of self-signed files in the phone settings. Please, |
---|
246 | reffer to your phone manual on the instructions how to do this. |
---|
247 | |
---|
248 | |
---|
249 | ### 4.7. Other Platforms, Supported by Qt ### |
---|
250 | |
---|
251 | While TSPSG is oficially supported only on Linux, Windows and Windows |
---|
252 | Mobile it should be possible to compile it on any platform, supported |
---|
253 | by Qt. To do so, please, refer to the Section 4.1 for the general build |
---|
254 | and installation procedure. |
---|
255 | |
---|
256 | |
---|
257 | |
---|
258 | 5. Uninstallation |
---|
259 | ----------------- |
---|
260 | |
---|
261 | Usually, it is enough to replace 'install' parameter with 'uninstall' |
---|
262 | in the installation command from the Section 4. Also, you can manually |
---|
263 | delete all installed TSPSG files and directories. |
---|
264 | |
---|
265 | |
---|
266 | |
---|
267 | 6. Troubleshooting |
---|
268 | ------------------ |
---|
269 | |
---|
270 | |
---|
271 | ### 6.1. WINDRES.EXE Crash ### |
---|
272 | |
---|
273 | When building under Windows using minGW toolchain make process may fail |
---|
274 | with windres.exe crash (access violation). This is a known bug in |
---|
275 | windres.exe regarding processing resource files with UTF-8 (cp65001) |
---|
276 | encoding [1]. To be able to successfully build TSPSG you will need to |
---|
277 | download and replace windres.exe with a fixed version. To do this: |
---|
278 | |
---|
279 | 1. Open https://sourceforge.net/projects/mingw/files/ in your |
---|
280 | favourite browser. |
---|
281 | |
---|
282 | 2. Find and download the latest version of GNU Binutils. At the time |
---|
283 | of writing this guide it was binutils-2.20.1-2-mingw32-bin.tar.gz. |
---|
284 | |
---|
285 | 3. Unpack the file bin\windres.exe from the downloaded archive to |
---|
286 | <Your Qt installation path>\mingw\bin\ replacing the existing one. |
---|
287 | |
---|
288 | 4. Now run |
---|
289 | |
---|
290 | mingw32-make distclean |
---|
291 | |
---|
292 | in the TSPSG directory and repeat the installation process. |
---|
293 | |
---|
294 | |
---|
295 | |
---|
296 | 7. Notes |
---|
297 | -------- |
---|
298 | |
---|
299 | qmake doesn't always enclose installation paths in quotes. This may |
---|
300 | cause some files not to be installed or removed when their path |
---|
301 | contains spaces. In this case it is safe to delete these files and |
---|
302 | TSPSG installation directory manually. |
---|
303 | |
---|
304 | |
---|
305 | |
---|
306 | 8. References |
---|
307 | ------------- |
---|
308 | |
---|
309 | [1] http://sourceware.org/bugzilla/show_bug.cgi?id=10165 |
---|
310 | [2] https://www.symbiansigned.com/app/page/public/openSignedOnline.do |
---|
311 | |
---|
312 | |
---|
313 | <!-- |
---|
314 | $Id: $Format:%h %ai %an$ $ |
---|
315 | $URL: http://tspsg.info/ $ |
---|
316 | --> |
---|