source: tspsg/INSTALL.md @ 6221a58c7c

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

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

  • Property mode set to 100644
File size: 9.4 KB
RevLine 
[50b202f04d]1TSPSG Installation Guide
2========================
[e9db3e216b]3
[6221a58c7c]4Thank you for trying **TSPSG**. This document will guide you through the
5steps necessary to compile and run **TSPSG**.
6
[e9db3e216b]7
[6221a58c7c]81. Requirements
9---------------
[e9db3e216b]10
[6221a58c7c]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.
[e9db3e216b]14
[6221a58c7c]15**NOTE**: Please, note that there will be some regressions in
16functionality if your version of *Qt* is lower than the recommended.
[e9db3e216b]17
18
[6221a58c7c]192. Assumptions
[50b202f04d]20--------------
[e9db3e216b]21
[6221a58c7c]22This guide assumes that you already have *Qt* libraries and all
23necessary prerequisites installed.
[e9db3e216b]24
25Also, the following assumptions are made:
26
[6221a58c7c]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.
[e9db3e216b]35
36
[6221a58c7c]373. Supported Platforms
[50b202f04d]38----------------------
[e9db3e216b]39
[6221a58c7c]40**TSPSG** is oficially supported and tested on the following platforms:
[e9db3e216b]41
[6221a58c7c]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*.
[e9db3e216b]45
46
[6221a58c7c]474. Building and Installation
[50b202f04d]48----------------------------
[e9db3e216b]49
[6221a58c7c]50### 4.1. Common Information ###
[7fd1756f1e]51
[6221a58c7c]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.
[7fd1756f1e]57
[6221a58c7c]58If you want to build **TSPSG** without **SVG** support add `nosvg` to
59*qmake* `CONFIG` parameter, so that *qmake* command will typically be:
[7fd1756f1e]60
61    qmake CONFIG+=release CONFIG+=nosvg
62
[6221a58c7c]63This way you will not depend on *QtSvg* module but will not be able to
64export solution graph in **SVG** format.
[7fd1756f1e]65
66
[6221a58c7c]67**TSPSG** uses *qmake* `PREFIX` parameter to determine installation path
68for make install command. If you don't specify it when running qmake, it
[7fd1756f1e]69will be assigned the default value depending on the platform:
70
[6221a58c7c]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\>*                           |
[7fd1756f1e]77
[6221a58c7c]78\* - usually, it is `C:\Program Files`.
[7fd1756f1e]79
[6221a58c7c]80**NOTE**: Please, note that there are no installation and/or packaging
81rules for **MacOS** and other platforms not mentioned in this table.
[7fd1756f1e]82
83
[6221a58c7c]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.
[7fd1756f1e]87
[e9db3e216b]88
[6221a58c7c]89### 4.2. General Procedure ###
[e9db3e216b]90
[6221a58c7c]91On most platforms the general building and installation procedure is:
[e9db3e216b]92
[6221a58c7c]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.
[e9db3e216b]99
[6221a58c7c]100NOTE: It is important to run `lrelease` before `qmake`, or `qmake` will
101not "pick up" the translations when generating installation rules.
[e9db3e216b]102
103
[6221a58c7c]104### 4.3. Linux/UNIX/BSD ###
[e9db3e216b]105
[6221a58c7c]106Open a shell, navigate to the directory where you have **TSPSG** source
[e9db3e216b]107downloaded and type
108
109    tar xvjf tspsg-<VERSION>-src.tar.bz2
110    cd tspsg-<VERSION>-src
111
[6221a58c7c]112where *\<VERSION\>* is the version of **TSPSG** you downloaded. Now run
[e9db3e216b]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
[6221a58c7c]134The executable goes to `<PREFIX>/bin`; *COPYING*, *ChangeLog.md*,
135*README.md* and *INSTALL.md* go to `<PREFIX>/share/doc/TSPSG-<VERSION>`.
[e9db3e216b]136
137
[6221a58c7c]138### 4.4. Windows ###
[e9db3e216b]139
[7fd1756f1e]140TSPSG will be installed to <PREFIX>\TSPSG folder.
141
[e9db3e216b]142NOTE: Please, read the Section 7 after reading this Section.
143
[50b202f04d]144
[6221a58c7c]145#### 4.4.1. Using MinGW ####
[e9db3e216b]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
[6221a58c7c]163#### 4.4.2. Using Visual Studio ####
[e9db3e216b]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
[6221a58c7c]179### 4.5. Windows CE/Mobile ###
[e9db3e216b]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
[6221a58c7c]209### 4.6. Symbian ###
[e9db3e216b]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
[6221a58c7c]249### 4.7. Other Platforms, Supported by Qt ###
[e9db3e216b]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
[6221a58c7c]2585. Uninstallation
[50b202f04d]259-----------------
[e9db3e216b]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
[6221a58c7c]2676. Troubleshooting
[50b202f04d]268------------------
[e9db3e216b]269
[50b202f04d]270
[6221a58c7c]271### 6.1. WINDRES.EXE Crash ###
[e9db3e216b]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
[6221a58c7c]2967. Notes
[50b202f04d]297--------
[e9db3e216b]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
[6221a58c7c]3068. References
[50b202f04d]307-------------
[e9db3e216b]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
[6221a58c7c]313<!--
[7ba743d983]314$Id: $Format:%h %ai %an$ $
315$URL: http://tspsg.info/ $
[6221a58c7c]316-->
Note: See TracBrowser for help on using the repository browser.