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 --- E:\trees\qbittorrent\trunk\..\vendor\current/build_os2.cmd 1970-01-01 01:00:00.000000000 +0100 +++ E:\trees\qbittorrent\trunk/build_os2.cmd 2013-11-28 12:14:02.000000000 +0100 @@ -0,0 +1,290 @@ +/* qbittorrent Build Script */ +/* version history */ +/* version 0.1.0 from 26.11.2013 Silvan (first edition) */ + +/* init the version string (don't forget to change) */ +version = "0.1.0" +version_date = "26.11.2013" +'@echo off' + +parse arg command option +parse source . . scriptFile + +/* init the required vars */ +qRC = 0 +mRC = 0 +buildDir = strip(directory(),'T','\') /* Make sure we have no trailing backslash */ +sourceDir = FixDir(filespec('D', scriptFile) || filespec('P', scriptFile)) +vendorDir = sourceDir || '\..\vendor\current' +diffDir = sourceDir || '\..\' +srcDir = sourceDir +OS2Dir = sourceDir +installDir = buildDir || '\install' +qErrorFile = buildDir||'\qmake.err' +qOutFile = buildDir||'\qmake.out' +mErrorFile = buildDir||'\make.err' +mOutFile = buildDir||'\make.out' + +/* get the Qbittorrent version */ +Qbittorrent_version = '0.0.0' +Qbittorrent_build = ' ' +call version +internal_build = translate(Qbittorrent_version, '_', '.') + +title = "QBittorrent for eCS (OS/2) build script v" || version || " from " || version_date +say title +say +say "Build directory :" buildDir +say "Source directory :" sourceDir +say +say "QBittorrent version :" Qbittorrent_version +say " build :" Qbittorrent_build +say + +/* translate command to all upercase */ +command = translate(command) + +if command = "" then signal help + + +if command = "INSTALL" then do + if option \== "" then do + Qbittorrent_build = option + end + select + when Qbittorrent_build \== "" then do + zipFile = installDir || '\qbit-' || internal_build || '-' || Qbittorrent_build || '.zip' + end + otherwise do + signal help + end + end +end + +/* now we translate also the option */ +option = translate(option) + +if sourceDir \== buildDir then do + say "Shadow build in progress ..." + say +end + +say "Executing command: "command option + +select + when command = "MAKE" & option = "CLEAN" then do + + say "cleaning the tree" + call make 'distclean' + + say "please execute this script again with 'make' to build QBittorrent" + + end + when command = "MAKE" then do + + say "creating QBittorrent makefile" + call qmake + + if qRC = 0 then do + say "building QBittorrent" + if option = "" then do + call make + end + else do + call make 'debug' + end + end + + end + + when command = "INSTALL" then do + +/* first delete everything */ + call deleteall + +/* create the installDir */ + ok = SysMkDir(installDir) + +/* copy the exe */ + ok = SysCopyObject(buildDir||'\src\Qbittorrent.exe',installDir) + +/* copy all dll */ + ok = SysFileTree(buildDir||'\src\*.dll', rm.,'FOS') + do i = 1 to rm.0 + ok = SysCopyObject(rm.i, installDir) + end + +/* copy the readme */ + rm.0 = 1 + rm.1 = 'install.os2' + do i = 1 to rm.0 + cmdtorun = 'sed "s;_VERSION_;' || Qbittorrent_version || ';g" ' || OS2Dir || '\' || rm.i || ' | sed "s;_BUILD_;' || Qbittorrent_build || ';g" >' || installDir || '\' || rm.i + address cmd cmdtorun + end + +/* copy different stuff */ + rm.0 = 3 + rm.1 = 'changelog' + frmDir.1 = OS2Dir + toDir.1 = installDir + rm.2 = 'COPYING' + frmDir.2 = OS2Dir + toDir.2 = installDir + rm.3 = 'AUTHORS' + frmDir.3 = OS2Dir + toDir.3 = installDir + do i = 1 to rm.0 + cmdtorun = 'copy ' || frmDir.i || '\' || rm.i || ' ' || toDir.i + address cmd cmdtorun + end + +/* zip all dynamic stuff */ + ok = directory(installDir) + cmdtorun = 'zip -r ' || zipFile || ' * -x *.zip' + address cmd cmdtorun + ok = directory(buildDir) + +/* zip all icons */ + + end + + when command = "UNINSTALL" then do + + call deleteall + + end + + when command = "DIFF" then do + + address cmd 'diff -Naur ' || vendorDir || ' ' || sourceDir || ' -x *.qm -x geoip.dat -x conf.pri > ' || diffDir || 'qbittorrent_' || Qbittorrent_version || '_' || Qbittorrent_build || '.diff' + + end + + otherwise do + say 'Unknown parameter "'command'" - aborting...' + exit 1 + end +end + +/* cleanup the mess */ +error: + +if qRC = 0 & mRC = 0 then do + ok = SysFileDelete(mOutFile) + ok = SysFileDelete(mErrorFile) + ok = SysFileDelete(qOutFile) + ok = SysFileDelete(qErrorFile) +end +else do + if mRC <> 0 then do + say "Alarm! Make errors occured! Look at "mOutFile" and "mErrorFile + end + if qRC <> 0 then do + say "Alarm! qMake errors occured! Look at "qOutFile" and "qErrorFile + end +end + +exit 0 + +qmake: + sourceFile = sourceDir || '/qbittorrent.pro' + address cmd 'qmake ' sourceFile ' 2>'qErrorFile' 1>'qOutFile + + qRC = RC + if qRC <> 0 then do + call beep 880, 20 + say "Alarm! qmake RC="RC + end +return + +make: + makeparm = arg(1) + address cmd 'make 'makeparm' 2>'mErrorFile' 1>'mOutFile + mRC = RC + if mRC <> 0 then do + call beep 880, 20 + say "Alarm! make RC="RC + end +return + + +deleteall: /* delete installDir (including subdirs) except zip files */ + + say "Delete all files except *zip in " installDir + ok = SysFileTree(installDir||'\*', rm.,'FOS') + do i = 1 to rm.0 + if translate(right(rm.i, 3)) \== 'ZIP' then do + ok = SysFileDelete(rm.i) + end + end + + say "Delete zip file " zipFile + ok = SysFileDelete(zipFile) + + say "Removing subdirs from " || installDir + ok = SysFileTree(installDir||'\*', rm.,'OS') + do i = 1 to rm.0 + ok = SysRmDir(rm.i) + end + + call SysSleep(5) +return + +/** + * Fixes the directory path by a) converting all slashes to back + * slashes and b) ensuring that the trailing slash is present if + * the directory is the root directory, and absent otherwise. + * + * @param dir the directory path + * @param noslash + * optional argument. If 1, the path returned will not have a + * trailing slash anyway. Useful for concatenating it with a + * file name. + */ +FixDir: procedure expose (Globals) + parse arg dir, noslash + noslash = (noslash = 1) + dir = translate(dir, '\', '/') + if (right(dir, 1) == '\' &, + (noslash | \(length(dir) == 3 & (substr(dir, 2, 1) == ':')))) then + dir = substr(dir, 1, length(dir) - 1) + return dir + +/** + * reads the version.cpp and gets the Qbittorrent version from there + */ +version: procedure expose Qbittorrent_version Qbittorrent_build srcDir + + QbittorrentVer = ' ' + /* Qbittorrent Version file */ + Version = srcDir || "\version.pri" + + do until lines(Version) = 0 + verline = linein(Version) + if substr(Verline,1,15) = "PROJECT_VERSION" then do + parse var verline . ' '. ' ' QbittorrentVer + end + end + + ok = stream(Version,'c','close') + if QbittorrentVer \== ' ' then do + QbittorrentVer = strip(QbittorrentVer,,'"') + parse var QbittorrentVer ver '.' maj '.' min '.' Qbittorrent_build + Qbittorrent_version = ver || '.'|| maj || '.' || min + end + + if Qbittorrent_build == '' then do + Qbittorrent_build = 'GA' + end + + return + +help: + say "Parameters:" + say " make" + say " make debug" + say " make clean" + say " install build (build overwrites what this script finds)" + say " uninstall" + say " diff (creates a diff from vendor to trunk)" +exit 255 diff -Naur -x '*.qm' -x geoip.dat -x conf.pri E:\trees\qbittorrent\trunk\..\vendor\current/install.os2 E:\trees\qbittorrent\trunk/install.os2 --- E:\trees\qbittorrent\trunk\..\vendor\current/install.os2 2013-11-05 23:10:18.000000000 +0100 +++ E:\trees\qbittorrent\trunk/install.os2 2013-11-26 16:09:48.000000000 +0100 @@ -1,4 +1,4 @@ -QBittorrent installation +QBittorrent _VERSION_ _BUILD_ installation @@ -23,7 +23,7 @@ 1. INTRODUCTION =============== -Welcome to QBittorrent port for OS/2 and eComStation. +Welcome to QBittorrent _VERSION_ _BUILD_ port for OS/2 and eComStation. 2. REQUIREMENTS @@ -123,7 +123,7 @@ Thanks go to: - * Dmitry A. Kuminov + * Dmitriy Kuminov They either helped me when I had some nasty questions or did some testing for me. @@ -146,6 +146,16 @@ 7. HISTORY ========== +2013-11-12 + + * updated to 3.1.2 code level of QBittorrent + * updated to libtorrent 0.16.12 level + +2013-08-14 + + * updated to 3.0.11 code level of QBittorrent + * updated to libtorrent 0.16.9 level + 2012-09-19 * updated to 3.0.4 code level of QBittorrent diff -Naur -x '*.qm' -x geoip.dat -x conf.pri E:\trees\qbittorrent\trunk\..\vendor\current/os2conf.pri E:\trees\qbittorrent\trunk/os2conf.pri --- E:\trees\qbittorrent\trunk\..\vendor\current/os2conf.pri 2013-11-05 23:10:18.000000000 +0100 +++ E:\trees\qbittorrent\trunk/os2conf.pri 2013-11-20 11:35:02.000000000 +0100 @@ -7,7 +7,7 @@ -lboost_thread \ -lboost_system \ -lboost_filesystem \ - -lssl -lcrypto -lidn -lpthread -lz + -lssl -lcrypto -lpthread -lz RC_FILE = qbittorrent_os2.rc