source: diffs/qbittorrent_3.1.9_GA.diff@ 168

Last change on this file since 168 was 161, checked in by Silvan Scherrer, 11 years ago

Qbit fix

File size: 11.2 KB
  • E:\trees\qbittorrent\trunk

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

    diff -Naur -x '*.qm' -x geoip.dat -x conf.pri E:\trees\qbittorrent\trunk\..\vendor\current/install.os2 E:\trees\qbittorrent\trunk/install.os2
    old new  
    1 QBittorrent installation
     1QBittorrent _VERSION_ _BUILD_ installation
    22
    33
    44
     
    23231. INTRODUCTION
    2424===============
    2525
    26 Welcome to QBittorrent port for OS/2 and eComStation.
     26Welcome to QBittorrent _VERSION_ _BUILD_ port for OS/2 and eComStation.
    2727
    2828
    29292. REQUIREMENTS
     
    5151GCC4Core
    5252--------
    5353
    54   1. yum install libgcc
    55   2. yum install gcc-stack-protector
    56   3. yum install gcc-stdc++-shared-library
    57   4. yum install gcc-supc++-shared-library
     54  1. yum install libgcc4*
     55  2. yum install libssp
     56  3. yum install libstdc++6
     57  4. yum install libsupc++6
    5858
    5959Qt4 dll
    6060-------
    6161
    6262  1. yum install libqt4
    6363
     64zlib
     65----
     66
     67  1. yum install zlib
     68
    6469
    6570ZIP Installation:
    6671
     
    8590GCC4Core
    8691--------
    8792
    88   1. Download GCC4Core 1.2.1 or better from http://ftp.netlabs.org/pub/gcc
     93  1. Download GCC4Core 1.2.2 or better from http://ftp.netlabs.org/pub/gcc
    8994  2. Install the files to your libpath eg. x:\ecs\dll
    9095
    9196Qt4 dll
     
    9499  1. Download Qt4 4.7.3 or better (see http://svn.netlabs.org/qt4 for more information)
    95100  2. Install the files according to the readme
    96101
     102zlib
     103----
     104
     105  1. Download the zip file from http://rpm.netlabs.org/release/00/zip
     106  2. Install the files to your libpath eg. x:\ecs\dll
     107
    97108
    981093. INSTALLATION
    99110===============
     
    123134
    124135Thanks go to:
    125136
    126   * Dmitry A. Kuminov
     137  * Dmitriy Kuminov
    127138
    128139They either helped me when I had some nasty questions or did some testing for
    129140me.
     
    1461577. HISTORY
    147158==========
    148159
     1602014-04-23 (Happy Birthday Jason)
     161
     162  * updated to 3.1.9 code level of QBittorrent
     163
     1642014-02-18
     165
     166  * updated to 3.1.8 code level of QBittorrent
     167
     1682013-11-12
     169
     170  * updated to 3.1.2 code level of QBittorrent
     171  * updated to libtorrent 0.16.12 level
     172
     1732013-08-14
     174
     175  * updated to 3.0.11 code level of QBittorrent
     176  * updated to libtorrent 0.16.9 level
     177
    1491782012-09-19
    150179
    151180  * updated to 3.0.4 code level of QBittorrent
  • E:\trees\qbittorrent\trunk

    diff -Naur -x '*.qm' -x geoip.dat -x conf.pri E:\trees\qbittorrent\trunk\..\vendor\current/os2conf.pri E:\trees\qbittorrent\trunk/os2conf.pri
    old new  
    77        -lboost_thread \
    88        -lboost_system \
    99        -lboost_filesystem \
    10         -lssl -lcrypto -lidn -lpthread -lz
     10        -lssl -lcrypto -lpthread -lz
    1111
    1212RC_FILE = qbittorrent_os2.rc
    1313
    1414# LIBTORRENT DEFINES
    1515DEFINES += WITH_SHIPPED_GEOIP_H
    1616DEFINES += BOOST_ASIO_DYN_LINK
     17DEFINES += TORRENT_USE_OPENSSL
     18
     19CONFIG(debug, debug|release) {
     20  DEFINES += TORRENT_DEBUG
     21} else {
     22  DEFINES += NDEBUG
     23}
    1724
    1825DEFINES += WITH_GEOIP_EMBEDDED
    1926message("On eCS(OS/2), GeoIP database must be embedded.")
Note: See TracBrowser for help on using the repository browser.