[50b202f04d] | 1 | TSPSG Installation Guide |
---|
| 2 | ======================== |
---|
[e9db3e216b] | 3 | |
---|
[6221a58c7c] | 4 | Thank you for trying **TSPSG**. This document will guide you through the |
---|
| 5 | steps necessary to compile and run **TSPSG**. |
---|
| 6 | |
---|
[e9db3e216b] | 7 | |
---|
[6221a58c7c] | 8 | 1. Requirements |
---|
| 9 | --------------- |
---|
[e9db3e216b] | 10 | |
---|
[6221a58c7c] | 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. |
---|
[e9db3e216b] | 14 | |
---|
[6221a58c7c] | 15 | **NOTE**: Please, note that there will be some regressions in |
---|
| 16 | functionality if your version of *Qt* is lower than the recommended. |
---|
[e9db3e216b] | 17 | |
---|
| 18 | |
---|
[6221a58c7c] | 19 | 2. Assumptions |
---|
[50b202f04d] | 20 | -------------- |
---|
[e9db3e216b] | 21 | |
---|
[6221a58c7c] | 22 | This guide assumes that you already have *Qt* libraries and all |
---|
| 23 | necessary prerequisites installed. |
---|
[e9db3e216b] | 24 | |
---|
| 25 | Also, 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] | 37 | 3. 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] | 47 | 4. Building and Installation |
---|
[50b202f04d] | 48 | ---------------------------- |
---|
[e9db3e216b] | 49 | |
---|
[6221a58c7c] | 50 | ### 4.1. Common Information ### |
---|
[7fd1756f1e] | 51 | |
---|
[6221a58c7c] | 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. |
---|
[7fd1756f1e] | 57 | |
---|
[6221a58c7c] | 58 | If 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] | 63 | This way you will not depend on *QtSvg* module but will not be able to |
---|
| 64 | export solution graph in **SVG** format. |
---|
[7fd1756f1e] | 65 | |
---|
| 66 | |
---|
[6221a58c7c] | 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 |
---|
[7fd1756f1e] | 69 | will 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 |
---|
| 81 | rules for **MacOS** and other platforms not mentioned in this table. |
---|
[7fd1756f1e] | 82 | |
---|
| 83 | |
---|
[6221a58c7c] | 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. |
---|
[7fd1756f1e] | 87 | |
---|
[e9db3e216b] | 88 | |
---|
[6221a58c7c] | 89 | ### 4.2. General Procedure ### |
---|
[e9db3e216b] | 90 | |
---|
[6221a58c7c] | 91 | On 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] | 100 | NOTE: It is important to run `lrelease` before `qmake`, or `qmake` will |
---|
| 101 | not "pick up" the translations when generating installation rules. |
---|
[e9db3e216b] | 102 | |
---|
| 103 | |
---|
[6221a58c7c] | 104 | ### 4.3. Linux/UNIX/BSD ### |
---|
[e9db3e216b] | 105 | |
---|
[6221a58c7c] | 106 | Open a shell, navigate to the directory where you have **TSPSG** source |
---|
[e9db3e216b] | 107 | downloaded and type |
---|
| 108 | |
---|
| 109 | tar xvjf tspsg-<VERSION>-src.tar.bz2 |
---|
| 110 | cd tspsg-<VERSION>-src |
---|
| 111 | |
---|
[6221a58c7c] | 112 | where *\<VERSION\>* is the version of **TSPSG** you downloaded. Now run |
---|
[e9db3e216b] | 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 | |
---|
[6221a58c7c] | 134 | The 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] | 140 | TSPSG will be installed to <PREFIX>\TSPSG folder. |
---|
| 141 | |
---|
[e9db3e216b] | 142 | NOTE: Please, read the Section 7 after reading this Section. |
---|
| 143 | |
---|
[50b202f04d] | 144 | |
---|
[6221a58c7c] | 145 | #### 4.4.1. Using MinGW #### |
---|
[e9db3e216b] | 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 | |
---|
[6221a58c7c] | 163 | #### 4.4.2. Using Visual Studio #### |
---|
[e9db3e216b] | 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 | |
---|
[6221a58c7c] | 179 | ### 4.5. Windows CE/Mobile ### |
---|
[e9db3e216b] | 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 | |
---|
[6221a58c7c] | 209 | ### 4.6. Symbian ### |
---|
[e9db3e216b] | 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 | |
---|
[6221a58c7c] | 249 | ### 4.7. Other Platforms, Supported by Qt ### |
---|
[e9db3e216b] | 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 | |
---|
[6221a58c7c] | 258 | 5. Uninstallation |
---|
[50b202f04d] | 259 | ----------------- |
---|
[e9db3e216b] | 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 | |
---|
[6221a58c7c] | 267 | 6. Troubleshooting |
---|
[50b202f04d] | 268 | ------------------ |
---|
[e9db3e216b] | 269 | |
---|
[50b202f04d] | 270 | |
---|
[6221a58c7c] | 271 | ### 6.1. WINDRES.EXE Crash ### |
---|
[e9db3e216b] | 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 | |
---|
[6221a58c7c] | 296 | 7. Notes |
---|
[50b202f04d] | 297 | -------- |
---|
[e9db3e216b] | 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 | |
---|
[6221a58c7c] | 306 | 8. 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 | --> |
---|