source: tspsg/INSTALL.md @ 6221a58c7c

readme
Last change on this file since 6221a58c7c was 6221a58c7c, checked in by Oleksii Serdiuk, 11 years ago

Some formatting changes to README, INSTALL and ChangeLog? files.

  • Property mode set to 100644
File size: 9.4 KB
Line 
1TSPSG Installation Guide
2========================
3
4Thank you for trying **TSPSG**. This document will guide you through the
5steps necessary to compile and run **TSPSG**.
6
7
81. Requirements
9---------------
10
11To be able compile **TSPSG** you need to have
12*[Qt libraries](http://qt-project.org/)*. The minimum supported version
13of *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
16functionality if your version of *Qt* is lower than the recommended.
17
18
192. Assumptions
20--------------
21
22This guide assumes that you already have *Qt* libraries and all
23necessary prerequisites installed.
24
25Also, 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
373. 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
474. Building and Installation
48----------------------------
49
50### 4.1. Common Information ###
51
52To be able ot build **TSPSG** you need to have the following *Qt*
53modules: *QtCore*, *QtGui* and *QtSvg*. The first two are required, the
54last one is optional. To get support for additional image formats (i.e.,
55**JPEG** and **TIFF**) you'll additionally need corresponding *Qt
56imageformats* plugins.
57
58If 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
63This way you will not depend on *QtSvg* module but will not be able to
64export solution graph in **SVG** format.
65
66
67**TSPSG** uses *qmake* `PREFIX` parameter to determine installation path
68for make install command. If you don't specify it when running qmake, it
69will 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
81rules for **MacOS** and other platforms not mentioned in this table.
82
83
84By default, **TSPSG** uses precompiled header when being built. If you
85experience 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
91On 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
100NOTE: It is important to run `lrelease` before `qmake`, or `qmake` will
101not "pick up" the translations when generating installation rules.
102
103
104### 4.3. Linux/UNIX/BSD ###
105
106Open a shell, navigate to the directory where you have **TSPSG** source
107downloaded and type
108
109    tar xvjf tspsg-<VERSION>-src.tar.bz2
110    cd tspsg-<VERSION>-src
111
112where *\<VERSION\>* is the version of **TSPSG** you downloaded. Now run
113
114    lrelease tspsg.pro
115    qmake tspsg.pro
116    make
117
118In some cases you may need to type
119
120    qmake tspsg.pro CONFIG+=release
121
122
123If make step finished without errors you can install TSPSG by running
124
125    sudo make install
126
127or
128
129    su
130    make install
131
132depending on your distribution.
133
134The 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
140TSPSG will be installed to <PREFIX>\TSPSG folder.
141
142NOTE: Please, read the Section 7 after reading this Section.
143
144
145#### 4.4.1. Using MinGW ####
146
147Unpack the downloaded source code of TSPSG with your favourite
148compression software. Now launch the Qt Command Prompt from the Start
149Menu, 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
155NOTE: Make process may fail with a crash of windres.exe. If you've run
156into this issue, please, read the Section 6.1.
157
158If 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
165Unpack the downloaded source code of TSPSG with your favourite
166compression software. Now launch the Visual Studio Command Prompt from
167the Start Menu, navigate to the directory where you unpacked the source
168and run
169
170    C:\Qt\bin\lrelease tspsg.pro
171    C:\Qt\bin\qmake tspsg.pro CONFIG+=release
172    nmake
173
174If make step finished without errors you can install TSPSG by running
175
176    nmake install
177
178
179### 4.5. Windows CE/Mobile ###
180
181Unpack the downloaded source code of TSPSG with your favourite
182compression software. Now launch the Visual Studio Command Prompt from
183the Start Menu and run
184
185    set PATH=C:\Qt\bin;%PATH%
186    setcepaths wincewm50pocket-msvc2008
187
188Now 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
194There is no automated installation process for Windows Mobile build. To
195install TSPSG on your PDA you need to create a folder on your device
196and 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
211Unpack the downloaded source code of TSPSG with your favourite
212compression software. Now launch the Qt for Symbian Command Prompt from
213the Start Menu, navigate to the directory where you unpacked the source
214and run
215
216    lrelease tspsg.pro
217    qmake tspsg.pro CONFIG+=release
218    make release-gcce
219
220WARNING: You need to unpack the source to the same drive as Symbian SDK
221and the path must not contain any spaces or TSPSG won't build.
222
223If make step finished without errors you can generate sis installation
224file by running
225
226    make sis
227
228You'll get tspsg.sis file in the source directory. Copy it to your
229phone and run or install using Nokia PC Suite.
230
231NOTE: You need to install Qt libraries on your device before installing
232TSPSG. Usually, it should be enough to install qt_installer.sis from
233the Qt installation directory.
234
235Alternatively, if you have installed Nokia Smart Installer you can run
236
237    make installer_sis
238
239You'll get an tspsg_installer.sis that will automatically download and
240install the required Qt libraries on TSPSG installation.
241
242NOTE: Please, be aware that you have to sign the sis file to be able to
243install it on your device. You can use Open Signed Online[2] to quickly
244sign the sis file for your device. Alternatively, you can try to enable
245the installation of self-signed files in the phone settings. Please,
246reffer to your phone manual on the instructions how to do this.
247
248
249### 4.7. Other Platforms, Supported by Qt ###
250
251While TSPSG is oficially supported only on Linux, Windows and Windows
252Mobile it should be possible to compile it on any platform, supported
253by Qt. To do so, please, refer to the Section 4.1 for the general build
254and installation procedure.
255
256
257
2585. Uninstallation
259-----------------
260
261Usually, it is enough to replace 'install' parameter with 'uninstall'
262in the installation command from the Section 4. Also, you can manually
263delete all installed TSPSG files and directories.
264
265
266
2676. Troubleshooting
268------------------
269
270
271### 6.1. WINDRES.EXE Crash ###
272
273When building under Windows using minGW toolchain make process may fail
274with windres.exe crash (access violation). This is a known bug in
275windres.exe regarding processing resource files with UTF-8 (cp65001)
276encoding [1]. To be able to successfully build TSPSG you will need to
277download 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
2967. Notes
297--------
298
299qmake doesn't always enclose installation paths in quotes. This may
300cause some files not to be installed or removed when their path
301contains spaces. In this case it is safe to delete these files and
302TSPSG installation directory manually.
303
304
305
3068. 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-->
Note: See TracBrowser for help on using the repository browser.