[159] | 1 | diff -Naur -x '*.qm' -x geoip.dat -x conf.pri E:\trees\qbittorrent\trunk\..\vendor\current/build_os2.cmd E:\trees\qbittorrent\trunk/build_os2.cmd
|
---|
| 2 | --- E:\trees\qbittorrent\trunk\..\vendor\current/build_os2.cmd 1970-01-01 01:00:00.000000000 +0100
|
---|
[161] | 3 | +++ E:\trees\qbittorrent\trunk/build_os2.cmd 2014-05-09 12:17:56.000000000 +0200
|
---|
| 4 | @@ -0,0 +1,293 @@
|
---|
[159] | 5 | +/* qbittorrent Build Script */
|
---|
| 6 | +/* version history */
|
---|
| 7 | +/* version 0.1.0 from 26.11.2013 Silvan (first edition) */
|
---|
[161] | 8 | +/* version 0.1.1 from 09.05.2014 Silvan (add message about TORRENT_* defines) */
|
---|
[159] | 9 | +
|
---|
| 10 | +/* init the version string (don't forget to change) */
|
---|
[161] | 11 | +version = "0.1.1"
|
---|
| 12 | +version_date = "09.05.2014"
|
---|
[159] | 13 | +'@echo off'
|
---|
| 14 | +
|
---|
| 15 | +parse arg command option
|
---|
| 16 | +parse source . . scriptFile
|
---|
| 17 | +
|
---|
| 18 | +/* init the required vars */
|
---|
| 19 | +qRC = 0
|
---|
| 20 | +mRC = 0
|
---|
| 21 | +buildDir = strip(directory(),'T','\') /* Make sure we have no trailing backslash */
|
---|
| 22 | +sourceDir = FixDir(filespec('D', scriptFile) || filespec('P', scriptFile))
|
---|
| 23 | +vendorDir = sourceDir || '\..\vendor\current'
|
---|
| 24 | +diffDir = sourceDir || '\..\'
|
---|
| 25 | +srcDir = sourceDir
|
---|
| 26 | +OS2Dir = sourceDir
|
---|
| 27 | +installDir = buildDir || '\install'
|
---|
| 28 | +qErrorFile = buildDir||'\qmake.err'
|
---|
| 29 | +qOutFile = buildDir||'\qmake.out'
|
---|
| 30 | +mErrorFile = buildDir||'\make.err'
|
---|
| 31 | +mOutFile = buildDir||'\make.out'
|
---|
| 32 | +
|
---|
| 33 | +/* get the Qbittorrent version */
|
---|
| 34 | +Qbittorrent_version = '0.0.0'
|
---|
| 35 | +Qbittorrent_build = ' '
|
---|
| 36 | +call version
|
---|
| 37 | +internal_build = translate(Qbittorrent_version, '_', '.')
|
---|
| 38 | +
|
---|
| 39 | +title = "QBittorrent for eCS (OS/2) build script v" || version || " from " || version_date
|
---|
| 40 | +say title
|
---|
| 41 | +say
|
---|
| 42 | +say "Build directory :" buildDir
|
---|
| 43 | +say "Source directory :" sourceDir
|
---|
| 44 | +say
|
---|
| 45 | +say "QBittorrent version :" Qbittorrent_version
|
---|
| 46 | +say " build :" Qbittorrent_build
|
---|
| 47 | +say
|
---|
[161] | 48 | +say "WARNING: TORRENT_* defines in os2conf.pri must match those in libtorrent"
|
---|
| 49 | +say
|
---|
[159] | 50 | +
|
---|
| 51 | +/* translate command to all upercase */
|
---|
| 52 | +command = translate(command)
|
---|
| 53 | +
|
---|
| 54 | +if command = "" then signal help
|
---|
| 55 | +
|
---|
| 56 | +
|
---|
| 57 | +if command = "INSTALL" then do
|
---|
| 58 | + if option \== "" then do
|
---|
| 59 | + Qbittorrent_build = option
|
---|
| 60 | + end
|
---|
| 61 | + select
|
---|
| 62 | + when Qbittorrent_build \== "" then do
|
---|
| 63 | + zipFile = installDir || '\qbit-' || internal_build || '-' || Qbittorrent_build || '.zip'
|
---|
| 64 | + end
|
---|
| 65 | + otherwise do
|
---|
| 66 | + signal help
|
---|
| 67 | + end
|
---|
| 68 | + end
|
---|
| 69 | +end
|
---|
| 70 | +
|
---|
| 71 | +/* now we translate also the option */
|
---|
| 72 | +option = translate(option)
|
---|
| 73 | +
|
---|
| 74 | +if sourceDir \== buildDir then do
|
---|
| 75 | + say "Shadow build in progress ..."
|
---|
| 76 | + say
|
---|
| 77 | +end
|
---|
| 78 | +
|
---|
| 79 | +say "Executing command: "command option
|
---|
| 80 | +
|
---|
| 81 | +select
|
---|
| 82 | + when command = "MAKE" & option = "CLEAN" then do
|
---|
| 83 | +
|
---|
| 84 | + say "cleaning the tree"
|
---|
| 85 | + call make 'distclean'
|
---|
| 86 | +
|
---|
| 87 | + say "please execute this script again with 'make' to build QBittorrent"
|
---|
| 88 | +
|
---|
| 89 | + end
|
---|
| 90 | + when command = "MAKE" then do
|
---|
| 91 | +
|
---|
| 92 | + say "creating QBittorrent makefile"
|
---|
| 93 | + call qmake
|
---|
| 94 | +
|
---|
| 95 | + if qRC = 0 then do
|
---|
| 96 | + say "building QBittorrent"
|
---|
| 97 | + if option = "" then do
|
---|
| 98 | + call make
|
---|
| 99 | + end
|
---|
| 100 | + else do
|
---|
| 101 | + call make 'debug'
|
---|
| 102 | + end
|
---|
| 103 | + end
|
---|
| 104 | +
|
---|
| 105 | + end
|
---|
| 106 | +
|
---|
| 107 | + when command = "INSTALL" then do
|
---|
| 108 | +
|
---|
| 109 | +/* first delete everything */
|
---|
| 110 | + call deleteall
|
---|
| 111 | +
|
---|
| 112 | +/* create the installDir */
|
---|
| 113 | + ok = SysMkDir(installDir)
|
---|
| 114 | +
|
---|
| 115 | +/* copy the exe */
|
---|
| 116 | + ok = SysCopyObject(buildDir||'\src\Qbittorrent.exe',installDir)
|
---|
| 117 | +
|
---|
| 118 | +/* copy all dll */
|
---|
| 119 | + ok = SysFileTree(buildDir||'\src\*.dll', rm.,'FOS')
|
---|
| 120 | + do i = 1 to rm.0
|
---|
| 121 | + ok = SysCopyObject(rm.i, installDir)
|
---|
| 122 | + end
|
---|
| 123 | +
|
---|
| 124 | +/* copy the readme */
|
---|
| 125 | + rm.0 = 1
|
---|
| 126 | + rm.1 = 'install.os2'
|
---|
| 127 | + do i = 1 to rm.0
|
---|
| 128 | + cmdtorun = 'sed "s;_VERSION_;' || Qbittorrent_version || ';g" ' || OS2Dir || '\' || rm.i || ' | sed "s;_BUILD_;' || Qbittorrent_build || ';g" >' || installDir || '\' || rm.i
|
---|
| 129 | + address cmd cmdtorun
|
---|
| 130 | + end
|
---|
| 131 | +
|
---|
| 132 | +/* copy different stuff */
|
---|
| 133 | + rm.0 = 3
|
---|
| 134 | + rm.1 = 'changelog'
|
---|
| 135 | + frmDir.1 = OS2Dir
|
---|
| 136 | + toDir.1 = installDir
|
---|
| 137 | + rm.2 = 'COPYING'
|
---|
| 138 | + frmDir.2 = OS2Dir
|
---|
| 139 | + toDir.2 = installDir
|
---|
| 140 | + rm.3 = 'AUTHORS'
|
---|
| 141 | + frmDir.3 = OS2Dir
|
---|
| 142 | + toDir.3 = installDir
|
---|
| 143 | + do i = 1 to rm.0
|
---|
| 144 | + cmdtorun = 'copy ' || frmDir.i || '\' || rm.i || ' ' || toDir.i
|
---|
| 145 | + address cmd cmdtorun
|
---|
| 146 | + end
|
---|
| 147 | +
|
---|
| 148 | +/* zip all dynamic stuff */
|
---|
| 149 | + ok = directory(installDir)
|
---|
| 150 | + cmdtorun = 'zip -r ' || zipFile || ' * -x *.zip'
|
---|
| 151 | + address cmd cmdtorun
|
---|
| 152 | + ok = directory(buildDir)
|
---|
| 153 | +
|
---|
| 154 | +/* zip all icons */
|
---|
| 155 | +
|
---|
| 156 | + end
|
---|
| 157 | +
|
---|
| 158 | + when command = "UNINSTALL" then do
|
---|
| 159 | +
|
---|
| 160 | + call deleteall
|
---|
| 161 | +
|
---|
| 162 | + end
|
---|
| 163 | +
|
---|
| 164 | + when command = "DIFF" then do
|
---|
| 165 | +
|
---|
| 166 | + address cmd 'diff -Naur ' || vendorDir || ' ' || sourceDir || ' -x *.qm -x geoip.dat -x conf.pri > ' || diffDir || 'qbittorrent_' || Qbittorrent_version || '_' || Qbittorrent_build || '.diff'
|
---|
| 167 | +
|
---|
| 168 | + end
|
---|
| 169 | +
|
---|
| 170 | + otherwise do
|
---|
| 171 | + say 'Unknown parameter "'command'" - aborting...'
|
---|
| 172 | + exit 1
|
---|
| 173 | + end
|
---|
| 174 | +end
|
---|
| 175 | +
|
---|
| 176 | +/* cleanup the mess */
|
---|
| 177 | +error:
|
---|
| 178 | +
|
---|
| 179 | +if qRC = 0 & mRC = 0 then do
|
---|
| 180 | + ok = SysFileDelete(mOutFile)
|
---|
| 181 | + ok = SysFileDelete(mErrorFile)
|
---|
| 182 | + ok = SysFileDelete(qOutFile)
|
---|
| 183 | + ok = SysFileDelete(qErrorFile)
|
---|
| 184 | +end
|
---|
| 185 | +else do
|
---|
| 186 | + if mRC <> 0 then do
|
---|
| 187 | + say "Alarm! Make errors occured! Look at "mOutFile" and "mErrorFile
|
---|
| 188 | + end
|
---|
| 189 | + if qRC <> 0 then do
|
---|
| 190 | + say "Alarm! qMake errors occured! Look at "qOutFile" and "qErrorFile
|
---|
| 191 | + end
|
---|
| 192 | +end
|
---|
| 193 | +
|
---|
| 194 | +exit 0
|
---|
| 195 | +
|
---|
| 196 | +qmake:
|
---|
| 197 | + sourceFile = sourceDir || '/qbittorrent.pro'
|
---|
| 198 | + address cmd 'qmake ' sourceFile ' 2>'qErrorFile' 1>'qOutFile
|
---|
| 199 | +
|
---|
| 200 | + qRC = RC
|
---|
| 201 | + if qRC <> 0 then do
|
---|
| 202 | + call beep 880, 20
|
---|
| 203 | + say "Alarm! qmake RC="RC
|
---|
| 204 | + end
|
---|
| 205 | +return
|
---|
| 206 | +
|
---|
| 207 | +make:
|
---|
| 208 | + makeparm = arg(1)
|
---|
| 209 | + address cmd 'make 'makeparm' 2>'mErrorFile' 1>'mOutFile
|
---|
| 210 | + mRC = RC
|
---|
| 211 | + if mRC <> 0 then do
|
---|
| 212 | + call beep 880, 20
|
---|
| 213 | + say "Alarm! make RC="RC
|
---|
| 214 | + end
|
---|
| 215 | +return
|
---|
| 216 | +
|
---|
| 217 | +
|
---|
| 218 | +deleteall: /* delete installDir (including subdirs) except zip files */
|
---|
| 219 | +
|
---|
| 220 | + say "Delete all files except *zip in " installDir
|
---|
| 221 | + ok = SysFileTree(installDir||'\*', rm.,'FOS')
|
---|
| 222 | + do i = 1 to rm.0
|
---|
| 223 | + if translate(right(rm.i, 3)) \== 'ZIP' then do
|
---|
| 224 | + ok = SysFileDelete(rm.i)
|
---|
| 225 | + end
|
---|
| 226 | + end
|
---|
| 227 | +
|
---|
| 228 | + say "Delete zip file " zipFile
|
---|
| 229 | + ok = SysFileDelete(zipFile)
|
---|
| 230 | +
|
---|
| 231 | + say "Removing subdirs from " || installDir
|
---|
| 232 | + ok = SysFileTree(installDir||'\*', rm.,'OS')
|
---|
| 233 | + do i = 1 to rm.0
|
---|
| 234 | + ok = SysRmDir(rm.i)
|
---|
| 235 | + end
|
---|
| 236 | +
|
---|
| 237 | + call SysSleep(5)
|
---|
| 238 | +return
|
---|
| 239 | +
|
---|
| 240 | +/**
|
---|
| 241 | + * Fixes the directory path by a) converting all slashes to back
|
---|
| 242 | + * slashes and b) ensuring that the trailing slash is present if
|
---|
| 243 | + * the directory is the root directory, and absent otherwise.
|
---|
| 244 | + *
|
---|
| 245 | + * @param dir the directory path
|
---|
| 246 | + * @param noslash
|
---|
| 247 | + * optional argument. If 1, the path returned will not have a
|
---|
| 248 | + * trailing slash anyway. Useful for concatenating it with a
|
---|
| 249 | + * file name.
|
---|
| 250 | + */
|
---|
| 251 | +FixDir: procedure expose (Globals)
|
---|
| 252 | + parse arg dir, noslash
|
---|
| 253 | + noslash = (noslash = 1)
|
---|
| 254 | + dir = translate(dir, '\', '/')
|
---|
| 255 | + if (right(dir, 1) == '\' &,
|
---|
| 256 | + (noslash | \(length(dir) == 3 & (substr(dir, 2, 1) == ':')))) then
|
---|
| 257 | + dir = substr(dir, 1, length(dir) - 1)
|
---|
| 258 | + return dir
|
---|
| 259 | +
|
---|
| 260 | +/**
|
---|
| 261 | + * reads the version.cpp and gets the Qbittorrent version from there
|
---|
| 262 | + */
|
---|
| 263 | +version: procedure expose Qbittorrent_version Qbittorrent_build srcDir
|
---|
| 264 | +
|
---|
| 265 | + QbittorrentVer = ' '
|
---|
| 266 | + /* Qbittorrent Version file */
|
---|
| 267 | + Version = srcDir || "\version.pri"
|
---|
| 268 | +
|
---|
| 269 | + do until lines(Version) = 0
|
---|
| 270 | + verline = linein(Version)
|
---|
| 271 | + if substr(Verline,1,15) = "PROJECT_VERSION" then do
|
---|
| 272 | + parse var verline . ' '. ' ' QbittorrentVer
|
---|
| 273 | + end
|
---|
| 274 | + end
|
---|
| 275 | +
|
---|
| 276 | + ok = stream(Version,'c','close')
|
---|
| 277 | + if QbittorrentVer \== ' ' then do
|
---|
| 278 | + QbittorrentVer = strip(QbittorrentVer,,'"')
|
---|
| 279 | + parse var QbittorrentVer ver '.' maj '.' min '.' Qbittorrent_build
|
---|
| 280 | + Qbittorrent_version = ver || '.'|| maj || '.' || min
|
---|
| 281 | + end
|
---|
| 282 | +
|
---|
| 283 | + if Qbittorrent_build == '' then do
|
---|
| 284 | + Qbittorrent_build = 'GA'
|
---|
| 285 | + end
|
---|
| 286 | +
|
---|
| 287 | + return
|
---|
| 288 | +
|
---|
| 289 | +help:
|
---|
| 290 | + say "Parameters:"
|
---|
| 291 | + say " make"
|
---|
| 292 | + say " make debug"
|
---|
| 293 | + say " make clean"
|
---|
| 294 | + say " install build (build overwrites what this script finds)"
|
---|
| 295 | + say " uninstall"
|
---|
| 296 | + say " diff (creates a diff from vendor to trunk)"
|
---|
| 297 | +exit 255
|
---|
| 298 | diff -Naur -x '*.qm' -x geoip.dat -x conf.pri E:\trees\qbittorrent\trunk\..\vendor\current/install.os2 E:\trees\qbittorrent\trunk/install.os2
|
---|
| 299 | --- E:\trees\qbittorrent\trunk\..\vendor\current/install.os2 2013-11-05 23:10:18.000000000 +0100
|
---|
| 300 | +++ E:\trees\qbittorrent\trunk/install.os2 2014-04-30 15:50:08.000000000 +0200
|
---|
| 301 | @@ -1,4 +1,4 @@
|
---|
| 302 | -QBittorrent installation
|
---|
| 303 | +QBittorrent _VERSION_ _BUILD_ installation
|
---|
| 304 |
|
---|
| 305 |
|
---|
| 306 |
|
---|
| 307 | @@ -23,7 +23,7 @@
|
---|
| 308 | 1. INTRODUCTION
|
---|
| 309 | ===============
|
---|
| 310 |
|
---|
| 311 | -Welcome to QBittorrent port for OS/2 and eComStation.
|
---|
| 312 | +Welcome to QBittorrent _VERSION_ _BUILD_ port for OS/2 and eComStation.
|
---|
| 313 |
|
---|
| 314 |
|
---|
| 315 | 2. REQUIREMENTS
|
---|
| 316 | @@ -51,16 +51,21 @@
|
---|
| 317 | GCC4Core
|
---|
| 318 | --------
|
---|
| 319 |
|
---|
| 320 | - 1. yum install libgcc
|
---|
| 321 | - 2. yum install gcc-stack-protector
|
---|
| 322 | - 3. yum install gcc-stdc++-shared-library
|
---|
| 323 | - 4. yum install gcc-supc++-shared-library
|
---|
| 324 | + 1. yum install libgcc4*
|
---|
| 325 | + 2. yum install libssp
|
---|
| 326 | + 3. yum install libstdc++6
|
---|
| 327 | + 4. yum install libsupc++6
|
---|
| 328 |
|
---|
| 329 | Qt4 dll
|
---|
| 330 | -------
|
---|
| 331 |
|
---|
| 332 | 1. yum install libqt4
|
---|
| 333 |
|
---|
| 334 | +zlib
|
---|
| 335 | +----
|
---|
| 336 | +
|
---|
| 337 | + 1. yum install zlib
|
---|
| 338 | +
|
---|
| 339 |
|
---|
| 340 | ZIP Installation:
|
---|
| 341 |
|
---|
| 342 | @@ -85,7 +90,7 @@
|
---|
| 343 | GCC4Core
|
---|
| 344 | --------
|
---|
| 345 |
|
---|
| 346 | - 1. Download GCC4Core 1.2.1 or better from http://ftp.netlabs.org/pub/gcc
|
---|
| 347 | + 1. Download GCC4Core 1.2.2 or better from http://ftp.netlabs.org/pub/gcc
|
---|
| 348 | 2. Install the files to your libpath eg. x:\ecs\dll
|
---|
| 349 |
|
---|
| 350 | Qt4 dll
|
---|
| 351 | @@ -94,6 +99,12 @@
|
---|
| 352 | 1. Download Qt4 4.7.3 or better (see http://svn.netlabs.org/qt4 for more information)
|
---|
| 353 | 2. Install the files according to the readme
|
---|
| 354 |
|
---|
| 355 | +zlib
|
---|
| 356 | +----
|
---|
| 357 | +
|
---|
| 358 | + 1. Download the zip file from http://rpm.netlabs.org/release/00/zip
|
---|
| 359 | + 2. Install the files to your libpath eg. x:\ecs\dll
|
---|
| 360 | +
|
---|
| 361 |
|
---|
| 362 | 3. INSTALLATION
|
---|
| 363 | ===============
|
---|
| 364 | @@ -123,7 +134,7 @@
|
---|
| 365 |
|
---|
| 366 | Thanks go to:
|
---|
| 367 |
|
---|
| 368 | - * Dmitry A. Kuminov
|
---|
| 369 | + * Dmitriy Kuminov
|
---|
| 370 |
|
---|
| 371 | They either helped me when I had some nasty questions or did some testing for
|
---|
| 372 | me.
|
---|
| 373 | @@ -146,6 +157,24 @@
|
---|
| 374 | 7. HISTORY
|
---|
| 375 | ==========
|
---|
| 376 |
|
---|
| 377 | +2014-04-23 (Happy Birthday Jason)
|
---|
| 378 | +
|
---|
| 379 | + * updated to 3.1.9 code level of QBittorrent
|
---|
| 380 | +
|
---|
| 381 | +2014-02-18
|
---|
| 382 | +
|
---|
| 383 | + * updated to 3.1.8 code level of QBittorrent
|
---|
| 384 | +
|
---|
| 385 | +2013-11-12
|
---|
| 386 | +
|
---|
| 387 | + * updated to 3.1.2 code level of QBittorrent
|
---|
| 388 | + * updated to libtorrent 0.16.12 level
|
---|
| 389 | +
|
---|
| 390 | +2013-08-14
|
---|
| 391 | +
|
---|
| 392 | + * updated to 3.0.11 code level of QBittorrent
|
---|
| 393 | + * updated to libtorrent 0.16.9 level
|
---|
| 394 | +
|
---|
| 395 | 2012-09-19
|
---|
| 396 |
|
---|
| 397 | * updated to 3.0.4 code level of QBittorrent
|
---|
| 398 | diff -Naur -x '*.qm' -x geoip.dat -x conf.pri E:\trees\qbittorrent\trunk\..\vendor\current/os2conf.pri E:\trees\qbittorrent\trunk/os2conf.pri
|
---|
| 399 | --- E:\trees\qbittorrent\trunk\..\vendor\current/os2conf.pri 2013-11-05 23:10:18.000000000 +0100
|
---|
[161] | 400 | +++ E:\trees\qbittorrent\trunk/os2conf.pri 2014-05-09 09:43:22.000000000 +0200
|
---|
| 401 | @@ -7,13 +7,20 @@
|
---|
[159] | 402 | -lboost_thread \
|
---|
| 403 | -lboost_system \
|
---|
| 404 | -lboost_filesystem \
|
---|
| 405 | - -lssl -lcrypto -lidn -lpthread -lz
|
---|
| 406 | + -lssl -lcrypto -lpthread -lz
|
---|
| 407 |
|
---|
| 408 | RC_FILE = qbittorrent_os2.rc
|
---|
| 409 |
|
---|
[161] | 410 | # LIBTORRENT DEFINES
|
---|
| 411 | DEFINES += WITH_SHIPPED_GEOIP_H
|
---|
| 412 | DEFINES += BOOST_ASIO_DYN_LINK
|
---|
| 413 | +DEFINES += TORRENT_USE_OPENSSL
|
---|
| 414 | +
|
---|
| 415 | +CONFIG(debug, debug|release) {
|
---|
| 416 | + DEFINES += TORRENT_DEBUG
|
---|
| 417 | +} else {
|
---|
| 418 | + DEFINES += NDEBUG
|
---|
| 419 | +}
|
---|
| 420 |
|
---|
| 421 | DEFINES += WITH_GEOIP_EMBEDDED
|
---|
| 422 | message("On eCS(OS/2), GeoIP database must be embedded.")
|
---|