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