Ticket #7293: 7293-w32pkg_upd22.patch

File 7293-w32pkg_upd22.patch, 42.5 KB (added by Jeff Lu <jll544@…>, 11 years ago)
  • win32-packager.pl

     
    4343$SIG{INT} = sub { die "Interrupted\n"; };
    4444$| = 1; # autoflush stdout;
    4545
     46# NOTE: QT3 removed - 0.21 builds are no longer possible using this script.
    4647# this script was last tested to work with this version, on other versions YMMV.
    47 #my $SVNRELEASE = '16789'; # This is the last version that was Qt 3 based.
    48                            # Qt 4 merges began immediately after.
    49 #my $SVNRELEASE = '18442'; # Recent 0-21-fixes
    50 my $SVNRELEASE = '21995'; # Recent trunk
     48my $SVNRELEASE = '22349'; # Recent trunk
    5149#my $SVNRELEASE = 'HEAD'; # If you are game, go forth and test the latest!
    5250
    5351
     
    7270my $NOISY   = 1;            # Set to 0 for less output to the screen
    7371my $version = '0.22';       # Main mythtv version - used to name dlls
    7472my $package = 0;            # Create a Win32 Distribution package? 1 for yes
    75 my $update  = 0;            # Revert instead of checkout.
    76                             #  Careful, will destruct local copy!
    7773my $compile_type = "profile"; # compile options: debug, profile or release
    7874my $tickets = 0;            # Apply specific win32 tickets -
    7975                            #  usually those not merged into SVN
     
    8177                            #  Required only for testing
    8278my $makeclean = 0;          # Flag to make clean
    8379my $svnlocation = "trunk";  # defaults to trunk unless -b specified
    84 my $qtver = 3;              # default to 3 until we can test otherwise below,
    85                             #  do not change this here.
     80my $qtver = 4;              # default to 4 until we can test otherwise
    8681my $continuous = 0 ;        # by default the app pauses to notify you what
    8782                            #  it's about to do, -y overrides for batch usage.
    88 
    8983##############################################################################
    9084# get command line options
    91 my $opt_string = 'vhu:kp:r:c:tldby';
     85my $opt_string = 'vhogkp:r:c:tldby';
    9286my %opt = ();
    9387getopts( "$opt_string", \%opt );
    9488usage() if $opt{h};
    9589
    96 $update     = 1       if defined $opt{u};
    9790$package    = 1       if defined $opt{k};
    9891$NOISY      = 1       if defined $opt{v};
    9992$tickets    = 1       if defined $opt{t};
     
    112105if (defined $opt{b}) {
    113106    my @num = split /\./, $version;
    114107    $svnlocation = "branches/release-$num[0]-$num[1]-fixes";
    115     print "NOT using SVN 'trunk', using '$svnlocation'\n";
    116 
    117     print "\nWARNING: This is unlikely to build successfully.\n\n";
    118     print "SVN trunk changes frequently, and this version of the\n";
    119     print "build script has had many changes to keep up with it.\n";
    120     print "Maybe try the version from the branch instead! e.g.\n";
    121     print "http://svn.mythtv.org/svn/branches/release-0-21-fixes/mythtv/contrib/Win32/win32-packager.pl\n\n";
    122 #    [ pause => 'press [enter] to continue !'],
    123     print 'Press [enter] to continue !';
    124     my $temp = getc();
    125108} else {
    126109    $svnlocation = "trunk";
    127110}
    128111
    129 # force QT4 if we are on trunk above the point where QT4 patches were merged
    130 if ( $svnlocation eq 'trunk' &&
    131      ($SVNRELEASE =~ m/^HEAD$/i || $SVNRELEASE > 16789) )
    132 {   $qtver = 4   }
    133 
    134 # 0.22-fixes doesn't exist yet.
    135 if ($svnlocation eq "branches/release-0-22-fixes") {
    136     $version = '0.21';
    137     $svnlocation = "branches/release-0-21-fixes";
    138     $qtver = 3;
    139 }
    140 
    141112# Try to use parallel make
    142113my $numCPU = $ENV{'NUMBER_OF_PROCESSORS'} or 1;
    143114my $parallelMake = 'make';
     
    146117    $parallelMake = 'make -j '. ($numCPU + 1);
    147118}
    148119
     120# this list defines the components to build
     121my @components = ( 'mythtv', 'packaging', 'myththemes' );
     122push @components, 'oldthemes' if defined $opt{o};
     123push @components, 'mythplugins' unless defined $opt{g};
    149124
    150125print "Config:\n\tQT version: $qtver\n\tDLLs will be labeled as: $version\n";
    151126if ( $numCPU gt 1 ) {
    152127    print "\tBuilding with ", $numCPU, " processors\n";
    153128}
    154 print "\tSVN location is: $svnlocation\n\tSVN revision is: $SVNRELEASE\n\n";
    155 print "Press [enter] to continue, or [ctrl]-c to exit now....\n";
     129print "\tSVN location is: $svnlocation\n\tSVN revision is: $SVNRELEASE\n";
     130print "\tComponents to build: ";
     131foreach my $comp( @components ) { print "$comp " }
     132print "\n\nPress [enter] to continue, or [ctrl]-c to exit now....\n";
    156133getc() unless $continuous;
    157134
    158135# this will be used to test if we the same
     
    160137my $is_same = "$compile_type-$svnlocation-$qtver.same";
    161138$is_same =~ s#/#-#g; # don't put dir slashes in a filename!
    162139
    163 # this list defines the components to build , to build everything, leave as-is
    164 my @components = ( 'mythtv', 'oldthemes', 'mythplugins', 'packaging' );
    165140
    166 
    167141# TODO - we should try to autodetect these paths, rather than assuming
    168142#        the defaults - perhaps from environment variables like this:
    169143#  die "must have env variable SOURCES pointing to your sources folder"
     
    219193my $unixbuild   = perl2unix($build);
    220194
    221195# The installer for MinGW:
    222 my $MinGWinstaller = 'MinGW-5.1.4.exe';
     196my $MinGWinstaller = 'MinGW-5.1.6.exe';
    223197my $installMinGW   = $dossources.$MinGWinstaller;
    224198
    225199# Qt4 directory
     
    350324[ file    => $mingw."bin/gcc.exe",
    351325  exec    => $installMinGW,
    352326  comment => 'unable to find a gcc.exe where expected, '.
    353              'rerunning MinGW installer!' ];
     327             'rerunning MinGW installer!' ] ,
    354328
    355 # sanity check - building 0.21 with mingwrt != 3.14 is guaranteed FAIL
    356 if ($version == '0.21') {
    357    push @{$expect},
    358      [grep    => ['runtime=mingw-runtime-3.14.tar.gz',$mingw.'installed.ini'],
    359       Died_Because_Wrong_MinGW_Version => 'Intentional script failure',
    360       comment => $version.' must be built with (old) MinGW runtime 3.14. '.
    361                  '"Current" MinGW releases will NOT work. If the script '.
    362                  'dies here, uninstall MinGW and next time, choose the '.
    363                  '"Previous" MinGW package in the Automated Installer.'];
    364 }
    365 
    366 push @{$expect},
    367 
    368329[ archive => $sources.'MSYS-1.0.10.exe',
    369330  'fetch' => 'http://'.$sourceforge.'/sourceforge/mingw/MSYS-1.0.10.exe',
    370331  comment => 'Get the MSYS and addons:' ] ,
     
    454415  mkdirs  => $sources.'unzip',
    455416  comment => 'unzip.exe - Get a precompiled '.
    456417             'native Win32 version from InfoZip' ],
    457 [ archive => $sources.'unzip/unz552xN.exe',
    458   'fetch' => 'ftp://tug.ctan.org/tex-archive'.
    459              '/tools/zip/info-zip/WIN32/unz552xN.exe'],
     418[ archive => $sources.'unzip/unz600xn.exe',
     419  'fetch' => 'ftp://ftp.info-zip.org/pub/infozip/win32/unz600xn.exe'],
    460420[ file    => $sources.'unzip/unzip.exe',
    461421  exec    => 'chdir '.$dossources.'unzip && '.
    462              $dossources.'unzip/unz552xN.exe' ],
     422             $dossources.'unzip/unz600xn.exe' ],
    463423# we could probably put the unzip.exe into the path...
    464424
    465425
     
    472432[ dir     => $sources.'svn-win32-1.5.1',
    473433  extract => $sources.'svn-win32-1.5.1.zip' ],
    474434
    475 
    476 [ file    => $msys.'bin/svn151_.exe',
    477   shell   => [ "cp -R $unixsources/svn-win32-1.5.1/* ".$unixmsys,
    478                "cp $unixsources/svn-win32-1.5.1/bin/svn.exe ".
    479                    $unixmsys."bin/svn151.exe",
    480                "cp $unixsources/svn-win32-1.5.1/bin/svn.exe ".
    481                    $unixmsys."bin/svn151_.exe",
    482                "cp $unixsources/svn-win32-1.5.1/bin/intl3_svn.dll ".
    483                    $unixmsys."bin"
    484              ],
    485   comment => 'put the svn.exe executable into the path, '.
     435# link to svn instead of installing it, to avoid packaging its dlls later
     436[ always  => $msys.'bin/svn.bat',
     437  write   => [$msys.'bin/svn.bat',
     438  '@'.$dossources.'svn-win32-1.5.1\bin\svn.exe %*' ],
     439  comment => 'put svn.bat into the path, '.
    486440             'so we can use it easily later!' ],
    487441
     442[ always  => $msys.'bin/svnversion',
     443  write   => [$msys.'bin/svnversion',
     444'#!/bin/sh
     445'.$unixsources.'svn-win32-1.5.1/bin/svnversion.exe $*' ],
     446  comment => 'put svnversion into the path, '.
     447             'so mythtv can use it later!' ],
     448
    488449# :
    489450[ dir     => $sources."zlib",
    490451  mkdirs  => $sources.'zlib',
     
    500461[ file    => $msys.'include/zlib.h',
    501462  exec    => ["copy /Y ".$dossources.'zlib\usr\include\* '.
    502463              $dosmsys."include"] ],
    503 # taglib also requires zlib in /mingw , so we'll put it there too, why not!
    504 [ file    => $mingw.'lib/libz.a',
    505   exec    => ["copy /Y ".$dossources.'zlib\usr\lib\* '.$dosmingw."lib"] ],
    506 [ file    => $mingw.'bin/msys-z.dll',
    507   exec    => ["copy /Y ".$dossources.'zlib\usr\bin\* '. $dosmingw."bin"] ],
    508 [ file    => $mingw.'include/zlib.h',
    509   exec    => ["copy /Y ".$dossources.'zlib\usr\include\* '.
    510               $dosmingw."include"] ],
    511464
    512465# fetch mysql
    513466# primary server site is:
     
    515468#     mysql-essential-5.1.30-win32.msi/from/http://mysql.mirrors.ilisys.com.au/
    516469# alternate: http://mysql.mirrors.ilisys.com.au/Downloads/MySQL-5.1/
    517470#     mysql-essential-5.1.30-win32.msi
    518 [ archive => $sources.'mysql-essential-5.1.36-win32.msi',
     471[ archive => $sources.'mysql-essential-5.1.39-win32.msi',
    519472  'fetch' => 'http://mysql.mirrors.ilisys.com.au/Downloads/'.
    520              'MySQL-5.1/mysql-essential-5.1.36-win32.msi',
     473             'MySQL-5.1/mysql-essential-5.1.39-win32.msi',
    521474  comment => 'fetch mysql binaries - this is a big download(35MB) '.
    522475             'so it might take a while' ],
    523476[ file    => $mysql.'bin/libmySQL.dll',
    524   exec    => $dossources.'mysql-essential-5.1.36-win32.msi INSTALLLEVEL=2',
     477  exec    => $dossources.'mysql-essential-5.1.39-win32.msi',
    525478  comment => 'Install mysql - be sure to choose to do a "COMPLETE" install. '.
    526479             'You should also choose NOT to "configure the server now" ' ],
    527480
     
    737690[ dir     => $sources.'freetype-2.3.5',
    738691  extract => $sources.'freetype-2.3.5.tar' ],
    739692# caution... freetype comes with a Makefile in the .tar.gz, so work around it!
    740 [ file    => $sources.'freetype-2.3.5/Makefile_',
     693[ file    => $sources.'freetype-2.3.5/Makefile__',
    741694  shell   => ["cd $unixsources/freetype-2.3.5",
    742               "./configure --prefix=/mingw",
    743               "touch $unixsources/freetype-2.3.5/Makefile_"],
     695              "./configure --prefix=/usr",
     696              "touch $unixsources/freetype-2.3.5/Makefile__"],
    744697  comment => 'building freetype' ],
    745698             
    746699# here's an example of specifying the make and make install steps separately,
     
    749702  shell   => ["cd $unixsources/freetype-2.3.5",
    750703              "make"],
    751704  comment => 'checking freetype' ],
    752 [ file    => $mingw.'lib/libfreetype.a',
     705[ file    => $msys.'lib/libfreetype.a',
    753706  shell   => ["cd $unixsources/freetype-2.3.5",
    754707              "make install"],
    755708  comment => 'installing freetype' ],
    756 [ file    => $mingw.'bin/libfreetype-6.dll',
     709[ file    => $msys.'bin/libfreetype-6.dll',
    757710  shell   => ["cp $unixsources/freetype-2.3.5/objs/.libs/libfreetype-6.dll ".
    758               "$mingw/bin/"] ],
     711              "$msys/bin/"] ],
    759712
    760713#eg: http://transact.dl.sourceforge.net/sourceforge/lame/lame-398-2.tar.gz
    761714[ archive => $sources.'lame-398-2.tar.gz', 
    762715  fetch   => 'http://'.$sourceforge.'/sourceforge/lame/lame-398-2.tar.gz'],
    763716[ dir     => $sources.'lame-398-2',
    764717  extract => $sources.'lame-398-2.tar' ],
    765 [ file    => $mingw.'lib/libmp3lame.a',
    766   shell   => ["cd $unixsources/lame-398-2",
    767               "./configure --prefix=/mingw",
    768               "make",
    769               "make install"],
    770   comment => 'building and installing: mingw lame' ],
    771718[ file    => $msys.'lib/libmp3lame.a',
    772719  shell   => ["cd $unixsources/lame-398-2",
    773720              "./configure --prefix=/usr",
    774721              "make",
    775722              "make install"],
    776723  comment => 'building and installing: msys lame' ],
     724;
    777725
     726if ( grep m/mythplugins/, @components ) {
     727push @{$expect},
    778728# confirmed latest version as at 26-12-2008:
    779729[ archive => $sources.'libmad-0.15.1b.tar.gz', 
    780730  fetch   => 'http://'.$sourceforge.'/sourceforge/mad/libmad-0.15.1b.tar.gz'],
     
    787737             "make install"],
    788738  comment => 'building and installing: msys libmad' ],
    789739
    790 [ archive => $sources.'libmad-0.15.1b.tar.gz', 
    791   fetch   => 'http://'.$sourceforge.'/sourceforge/mad/libmad-0.15.1b.tar.gz'],
    792 [ dir     => $sources.'libmad-0.15.1b',
    793   extract => $sources.'libmad-0.15.1b.tar' ],
    794 [ file    => $mingw.'lib/libmad.a',
    795   shell   => ["cd $unixsources/libmad-0.15.1b",
    796               "./configure --prefix=/mingw",
    797               "make",
    798               "make install"],
    799   comment => 'building and installing: mingw libmad' ],
    800              
    801740# taglib 1.5 sources changed it's build system under win32 to use 'cmake',
    802741# which we don't have, however pre-compiled mingw 1.5 binaries are available:
    803742[ archive => $sources.'taglib-1.5-mingw-bin.zip', 
     
    805744             '/users/luks/taglib/taglib-1.5-mingw-bin.zip'],
    806745[ dir     => $sources.'taglib-1.5-mingw-bin',
    807746  extract => $sources.'taglib-1.5-mingw-bin.zip' ],
    808 [ file    => $mingw.'lib/libtag.dll.a',
    809   shell   => ['cd '.$sources.'taglib-1.5-mingw-bin',
    810               "cp -vr * $unixmingw"],
    811   comment => 'installing: mingw taglib' ],
    812747[ file    => $msys.'lib/libtag.dll.a',
    813748  shell   => ['cd '.$sources.'taglib-1.5-mingw-bin',
    814749              "cp -vr * $unixmsys"],
     
    845780              "make install"],
    846781  comment => 'building and installing: msys libogg' ],
    847782
    848 #  need msys version of ogg for msys version of vorbis!
    849 [ archive => $sources.'libogg-1.1.3.tar.gz', 
    850   fetch   => 'http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz'],
    851 [ dir     => $sources.'libogg-1.1.3',
    852   extract => $sources.'libogg-1.1.3.tar' ],
    853 [ file    => $mingw.'bin/libogg-0.dll',
    854   shell   => ["cd $unixsources/libogg-1.1.3",
    855               "./configure --prefix=/mingw",
    856               "make",
    857               "make install"],
    858   comment => 'building and installing: mingw libogg' ],
    859 
    860783# confirmed latest version as at 26-12-2008:
    861784[ archive => $sources.'libvorbis-1.2.0.tar.gz', 
    862785  fetch   => 'http://downloads.xiph.org/releases/'.
     
    870793              "make install"],
    871794  comment => 'building and installing: msys libvorbis' ],
    872795
    873 # definitely need mingw version for mythtv plugins to build
    874 [ archive => $sources.'libvorbis-1.2.0.tar.gz', 
    875   fetch   => 'http://downloads.xiph.org/releases/'.
    876              'vorbis/libvorbis-1.2.0.tar.gz'],
    877 [ dir     => $sources.'libvorbis-1.2.0',
    878   extract => $sources.'libvorbis-1.2.0.tar' ],
    879 [ file    => $mingw.'lib/libvorbis.a',
    880   shell   => ["cd $unixsources/libvorbis-1.2.0",
    881               "./configure --prefix=/mingw --disable-shared",
    882               "make",
    883               "make install"],
    884   comment => 'building and installing: mingw libvorbis' ],
    885 
    886796# confirmed latest source version as at 26-12-2008
    887797#( flac-win binary packages are unsuitable in this case)
    888798[ archive => $sources.'flac-1.2.1.tar.gz', 
     
    891801  extract => $sources.'flac-1.2.1.tar' ],
    892802[ grep    => ['\#define SIZE_T_MAX UINT_MAX',$mingw.'include/limits.h'],
    893803  shell   => "echo \\#define SIZE_T_MAX UINT_MAX >> $mingw/include/limits.h" ],
    894 [ file    => $mingw.'lib/libFLAC.a',
    895   shell   => ["cd $unixsources/flac-1.2.1",
    896               "./configure --prefix=/mingw",
    897               "make",
    898               "make install"],
    899   comment => 'building and installing: mingw flac/FLAC' ],
    900804[ file    => $msys.'lib/libFLAC.a',
    901805  shell   => ["cd $unixsources/flac-1.2.1",
    902806              "./configure --prefix=/usr",
     
    926830#              "make",
    927831#              "make install"],
    928832#  comment => 'building and installing:  msys libcdaudio' ], 
    929 #
    930 ## mingw version is needed, or mythmusic won't build
    931 #[ file    => $mingw.'bin/libcdaudio-config',
    932 #  shell   => ["cd ".$unixsources."libcdaudio-0.99.12p2",
    933 #              "./configure --prefix=/mingw",
    934 #              "make",
    935 #              "make install"],
    936 #  comment => 'building and installing:  mingw libcdaudio' ], 
    937833 
    938834#[ pause => 'flac, taglib, lame all done.... press [enter] to continue !'],
    939835
    940 # skip doing pthreads from source, we use binaries that were fetched earlier:
    941 #[ archive => $sources.'pthreads-w32-2-8-0-release.tar.gz', 
    942 #  fetch => 'ftp://sourceware.org/pub/pthreads-win32/'.
    943 #           'pthreads-w32-2-8-0-release.tar.gz'],
    944 #[ dir => $sources.'pthreads-w32-2-8-0-release',
    945 #  extract => $sources.'pthreads-w32-2-8-0-release.tar' ],
    946 
    947836# confirmed latest source version as at 26-12-2008:
    948837[ archive => $sources.'SDL-devel-1.2.13-mingw32.tar.gz', 
    949838  fetch   => 'http://www.libsdl.org/release/SDL-devel-1.2.13-mingw32.tar.gz'],
     
    1035924             "make",
    1036925             "make install"],
    1037926  comment => 'building and installing: msys fftw' ],
    1038 [ file    => $mingw.'lib/libfftw3.a',
    1039   shell  => ["cd $unixsources/fftw-3.2.1",
    1040              "./configure --prefix=/mingw",
    1041              "make",
    1042              "make install"],
    1043   comment => 'building and installing: mingw fftw' ],
    1044927
    1045928# typical template:
    1046929#[ archive => $sources.'xxx.tar.gz',  fetch => ''],
     
    1051934#            "make",
    1052935#            "make install"] ],
    1053936
    1054 #----------------------------------------
    1055 # Building QT3 is complicated!
    1056 #
     937;}
    1057938
    1058 ;
    1059 
    1060 if ( $qtver == 3  ) {
    1061 push @{$expect},
    1062 
    1063 #[ pause => 'press [enter] to build QT3 next!'],
    1064 [ archive => $sources.'qt-3.3.x-p8.tar.bz2', 
    1065   fetch => 'http://'.$sourceforge.'/sourceforge/qtwin/qt-3.3.x-p8.tar.bz2'],
    1066 [ dir => $msys.'qt-3.3.x-p8',
    1067   extract => [$sources.'qt-3.3.x-p8.tar', $msys] ],
    1068 
    1069 
    1070 # equivalent patch:
    1071 [ archive => $sources.'qt.patch' ,
    1072   'fetch' => 'http://tanas.ca/qt.patch',
    1073   comment => ' patch the QT sources'],
    1074 [ filesame => [$msys.'qt-3.3.x-p8/qt.patch',$sources."qt.patch"],
    1075   copy => [''=>''] ],
    1076 [ grep => ["\-lws2_32", $msys.'qt-3.3.x-p8/mkspecs/win32-g++/qmake.conf'],
    1077   shell => ["cd ".$unixmsys."qt-3.3.x-p8/","patch -p1 < qt.patch"],
    1078   comment => 'patch the qt3 qmake.conf' ],
    1079 
    1080 
    1081 [ file => $msys.'bin/sh_.exe',
    1082   shell => ["mv ".$unixmsys."bin/sh.exe ".$unixmsys."bin/sh_.exe"],
    1083   comment => 'rename msys sh.exe out of the way before building QT! ' ] ,
    1084 
    1085 # write a batch script for the QT environment under DOS:
    1086 [ file => $msys.'qt-3.3.x-p8/qt3_env.bat',
    1087   write => [$msys.'qt-3.3.x-p8/qt3_env.bat',
    1088 'rem a batch script for the QT environment under DOS:
    1089 set QTDIR='.$dosmsys.'qt-3.3.x-p8
    1090 set MINGW='.$dosmingw.'
    1091 set PATH=%QTDIR%\bin;%MINGW%\bin;%PATH%
    1092 set QMAKESPEC=win32-g++
    1093 cd %QTDIR%
    1094 '
    1095 ],comment=>'write a batch script for the QT3 environment under DOS'],
    1096 
    1097 
    1098 [ file => $msys.'qt-3.3.x-p8/lib/libqt-mt3.dll',
    1099   exec => $dosmsys.'qt-3.3.x-p8\qt3_env.bat && '.
    1100           'configure.bat -thread -plugin-sql-mysql -opengl -no-sql-sqlite',
    1101   comment => 'Execute qt3_env.bat  && the configure command to actually '.
    1102              'build QT now!  - ie configures qt and '.
    1103              'also makes it, hopefully! WARNING SLOW (MAY TAKE HOURS!)' ],
    1104 [ exists => $mingw.'bin/sh.exe',
    1105    shell => ["mv ".$unixmingw."bin/sh.exe ".$unixmingw."bin/sh_.exe"],
    1106  comment => 'rename mingw sh.exe out of the way before building QT! ' ] ,
    1107 
    1108 [ filesame => [$msys.'qt-3.3.x-p8/bin/libqt-mt3.dll',$msys.'qt-3.3.x-p8/lib/libqt-mt3.dll'],
    1109   copy => [''=>''],
    1110   comment => 'is there a libqt-mt3.dll in the "lib" folder of QT? if so, copy it to the the "bin" folder for uic.exe to use!' ],
    1111 
    1112 # did the configure finish?  - run mingw32-make to get it to finish
    1113 # properly.
    1114 # HINT: the very last file built in a successful QT build env is the C:\msys\1.0\qt-3.3.x-p8\examples\xml\tagreader-with-features\tagreader-with-features.exe
    1115 #[ file => $msys.'qt-3.3.x-p8/examples/xml/tagreader-with-features/tagreader-with-features.exe', exec => $dosmsys.'qt-3.3.x-p8\qt3_env.bat && mingw32-make',comment => 'we try to finish the build of QT with mingw32-make, incase it was just a build dependancy issue? WARNING SLOW (MAY TAKE HOURS!)' ],
    1116 
    1117 # TODO - do we have an action we can take to build just this one file/dll if it fails? 
    1118 # For now, we will just test if it built, and try to run 'make' again if it didn't!
    1119 [ file => $msys.'qt-3.3.x-p8/plugins/sqldrivers/libqsqlmysql.dll',
    1120   exec => $dosmsys.'qt-3.3.x-p8\qt3_env.bat && mingw32-make -j',
    1121   comment => 'lib\libqsqlmysql.dll - we are just validating some basics of '.
    1122              'the QT install, and if any of these components are missing, '.
    1123              'the build must have failed (is the sql driver built properly?) '],
    1124 [ file => $msys.'qt-3.3.x-p8/bin/qmake.exe',
    1125   exec => $dosmsys.'qt-3.3.x-p8\qt3_env.bat && mingw32-make',
    1126   comment => 'bin\qmake.exe - here we are just validating some basics of '.
    1127              'the QT install, and if any of these components are missing, '.
    1128              'the build must have failed (is the sql driver built properly?) '],
    1129 [ file => $msys.'qt-3.3.x-p8/bin/moc.exe',
    1130   exec => $dosmsys.'qt-3.3.x-p8\qt3_env.bat && mingw32-make',
    1131   comment => 'bin\moc.exe - here we are just validating some basics of '.
    1132              'the QT install, and if any of these components are missing, '.
    1133              'the build must have failed (is the sql driver built properly?) '],
    1134 [ file => $msys.'qt-3.3.x-p8/bin/uic.exe',
    1135   exec => $dosmsys.'qt-3.3.x-p8\qt3_env.bat && mingw32-make',
    1136   comment => 'bin\uic.exe - here we are just validating some basics of '.
    1137              'the QT install, and if any of these components are missing, '.
    1138              'the build must have failed (is the sql driver built properly?) '],
    1139 [ file => $msys.'qt-3.3.x-p8/lib/libqt-mt3.dll',
    1140   exec => $dosmsys.'qt-3.3.x-p8\qt3_env.bat && mingw32-make',
    1141   comment => 'bin\libqt-mt3.dll - here we are just validating some basics of '.
    1142              'the QT install, and if any of these components are missing, '.
    1143              'the build must have failed (is the sql driver built properly?) '],
    1144 
    1145 # a manual method for "installing" QT would be to put all the 'bin' files
    1146 # into /mingw/bin and similarly for the 'lib' and 'include' folders to their
    1147 # respective mingw folders, but we don't.  we run it from the build location!
    1148 
    1149 
    1150 #  (back to sh.exe ) now that we are done !
    1151 [ file => $msys.'bin/sh.exe',
    1152  shell => ["mv ".$unixmsys."bin/sh_.exe ".$unixmsys."bin/sh.exe"],
    1153  comment => 'rename msys sh_.exe back again!' ] ,
    1154 [ exists => $mingw.'bin/sh_.exe',
    1155    shell => ["mv ".$unixmingw."bin/sh_.exe ".$unixmingw."bin/sh.exe"],
    1156  comment => 'rename mingw sh_.exe back again!' ] ,
    1157 
    1158 #Copy libqt-mt3.dll to libqt-mt.dll  , if there is any date/size change!
    1159 [ filesame => [$msys.'qt-3.3.x-p8/lib/libqt-mt.dll',
    1160                $msys.'qt-3.3.x-p8/lib/libqt-mt3.dll'],
    1161   copy => [''=>''],
    1162   comment => 'Copy libqt-mt3.dll to libqt-mt.dll' ] ,
    1163 ;
    1164 }
    1165 
    1166939#
    1167940#----------------------------------------
    1168941# building QT4 is complicated too
     
    13541127push @{$expect},
    13551128# now lets write some build scripts to help with mythtv itself
    13561129
    1357 # Qt3
    1358 [ always => [],
    1359   write => [$mythtv.'qt3_env.sh',
    1360 'export QTDIR='.$unixmsys.'qt-3.3.x-p8
    1361 export QMAKESPEC=$QTDIR/mkspecs/win32-g++
    1362 export LD_LIBRARY_PATH=$QTDIR/lib:/usr/lib:/mingw/lib:/lib
    1363 export PATH=$QTDIR/bin:/usr/local/bin:$PATH
    1364 ' ],
    1365   comment => 'write a QT3 script that we can source later when inside msys '.
    1366              'to setup the environment variables'],
    1367 
    1368 
    13691130# Qt4
    13701131[ always => [],
    13711132  write => [$mythtv.'qt4_env.sh',
    13721133'export QTDIR='.$unixqt4dir.'
    13731134export QMAKESPEC=$QTDIR/mkspecs/win32-g++
    13741135export LD_LIBRARY_PATH=$QTDIR/lib:/usr/lib:/mingw/lib:/lib
    1375 export PATH=$QTDIR/bin:/usr/local/bin:$PATH
     1136export LIBRARY_PATH=/usr/lib
     1137export CPATH=/usr/include
     1138export PATH=$QTDIR/bin:/usr/bin:$PATH
    13761139' ],
    13771140  comment => 'write a QT4 script that we can source later when inside msys '.
    13781141             'to setup the environment variables'],
     
    13921155rm -f /usr/bin/mtd.exe
    13931156rm -f /usr/bin/ignyte.exe
    13941157cd '.$unixmythtv.'mythtv
    1395 make clean
     1158make distclean
    13961159rm Makefile
    13971160cd '.$unixmythtv.'mythplugins
    1398 make clean
     1161make distclean
    13991162rm Makefile
    14001163cd '.$unixmythtv.'oldthemes
    1401 make clean
     1164make distclean
    14021165rm Makefile
    14031166cd '.$unixmythtv.'
    1404 find . -type f -name \*.dll | grep -v build | grep -v setup | xargs -n1 rm
    1405 find . -type f -name \*.exe | grep -v build | grep -v setup | xargs -n1 rm
    1406 find . -type f -name \*.a | xargs -n1 rm
    1407 find . -type f -name \*.o | xargs -n1 rm
     1167find . -type f -name \*.dll -o -name \*.exe -o -name \*.a \
     1168       -o -name \*.o -o -name moc_\*.cpp -o -name version.cpp \
     1169     | grep -v build | grep -v setup | grep -v svn | xargs -n1 rm -v
    14081170#find . -type f -name Makefile\.* | grep -v svn | xargs -n1 rm
    1409 find . -type f -name moc_\*.cpp |  grep -v svn | xargs -n1 rm
    14101171#rm -rf '.$unixmythtv.'mythtv/libs/libmythdb
    14111172rm -f '.$mythtv.'delete_to_do_make_clean.txt
    14121173'],
     
    14601221# ... then SVN update every time, before patches
    14611222
    14621223  [ always  => [],
    1463     exec    => [$dosmsys."bin\\svn.exe -r $SVNRELEASE update $dosmythtv$comp"],
     1224    exec    => [$dosmsys."bin\\svn -r $SVNRELEASE update $dosmythtv$comp"],
    14641225    comment => "Getting SVN updates for:$comp on $svnlocation" ];
    14651226}
    14661227
     
    14691230# always get svn num
    14701231[ always   => [],
    14711232  exec     => ['cd '.$dosmythtv.'mythtv && '.
    1472                $dosmsys.'bin\svn.exe info > '.$dosmythtv.'mythtv\svn_info.new'],
     1233               $dosmsys.'bin\svn info > '.$dosmythtv.'mythtv\svn_info.new'],
    14731234 comment   => 'fetching the SVN number to a text file, if we can'],
    14741235[ filesame => [$mythtv.'mythtv/svn_info.txt',$mythtv.'mythtv/svn_info.new'],
    14751236  shell    => ['touch -r '.$unixmythtv.'mythtv/svn_info.txt '.
     
    14861247             .$unixmythtv.'mythtv/svn_info.txt'],
    14871248  comment => 'if the SVN number is changed, then remember that, AND arrange for a full re-make of mythtv. (overkill, I know, but safer)' ],
    14881249
    1489 # open up the permissions:
    1490 [ always   => [],
    1491   shell    => ['cd '.$unixmythtv.'mythtv',
    1492 #TODO - reenable               'chmod -R 777 .'
    1493 #               'cd '.$unixmythtv.'mythplugins',
    1494 #               'chmod -R 777 .'
    1495 #               'cd '.$unixmythtv.'mythtvthemes',
    1496 #               'chmod -R 777 .'
    1497                ],
    1498   comment   => 'loosening permissions on source code:'],
    14991250
    1500 
    1501 
    15021251#  [ pause => 'press [enter] to continue !'],
    15031252 
    15041253# apply any outstanding win32 patches - this section will be hard to keep upwith HEAD/SVN:
     
    15061255# expired patches
    15071256#----------------------------------------
    15081257
    1509 # 15586 and earlier need this patch:
    1510 #[ archive => $sources.'backend.patch.gz' , 'fetch' => 'http://svn.mythtv.org/trac/raw-attachment/ticket/4392/backend.patch.gz', comment => 'backend.patch.gz - apply any outstanding win32 patches - this section will be hard to keep up with HEAD/SVN'],
    1511 #[ filesame => [$mythtv.'mythtv/backend.patch.gz',$sources."backend.patch.gz"], copy => [''=>'',comment => '4392: - backend connections being accepted patch '] ],
    1512 #[ grep => ['unsigned\* Indexes = new unsigned\[n\]\;',$mythtv.'mythtv/libs/libmyth/mythsocket.cpp'], shell => ["cd ".$unixmythtv."mythtv/","gunzip -f backend.patch.gz","patch -p0 < backend.patch"] ],
    1513 
    1514 # these next 3 patches are needed for 15528 (and earlier)
    1515 #[ archive => $sources.'importicons_windows_2.diff' , 'fetch' => 'http://svn.mythtv.org/trac/raw-attachment/ticket/3334/importicons_windows_2.diff', comment => 'importicons_windows_2.diff - apply any outstanding win32 patches - this section will be hard to keep up with HEAD/SVN'],
    1516 #[ filesame => [$mythtv.'mythtv/importicons_windows_2.diff',$sources."importicons_windows_2.diff"], copy => [''=>'',comment => '3334 fixes error with mkdir() unknown.'] ],
    1517 #
    1518 #[ grep => ['\#include <qdir\.h>',$mythtv.'mythtv/libs/libmythtv/importicons.cpp'], shell => ["cd ".$unixmythtv."mythtv/","patch -p0 < importicons_windows_2.diff"] ],
    1519 #[ archive => $sources.'mingw.patch' , 'fetch' => 'http://svn.mythtv.org/trac/raw-attachment/ticket/4516/mingw.patch', comment => 'mingw.patch - apply any outstanding win32 patches - this section will be hard to keep up with HEAD/SVN'],
    1520 #[ filesame => [$mythtv.'mythtv/mingw.patch',$sources."mingw.patch"], copy => [''=>'',comment => '4516 fixes build'] ],
    1521 #[ grep => ['LIBS \+= -lmyth-\$\$LIBVERSION',$mythtv.'mythtv/libs/libmythui/libmythui.pro'], shell => ["cd ".$unixmythtv."mythtv/","patch -p0 < mingw.patch"] ]
    1522 #
    1523 # (fixed in 15547)
    1524 #[ archive => $sources.'util_win32.patch' , 'fetch' => 'http://svn.mythtv.org/trac/raw-attachment/ticket/4497/util_win32.patch', comment => 'util_win32.patch - apply any outstanding win32 patches - this section will be hard to keep up with HEAD/SVN'],
    1525 #[ filesame => [$mythtv.'mythtv/util_win32.patch',$sources."util_win32.patch"], copy => [''=>'',comment => '4497 fixes build'] ],
    1526 #[ grep => ['\#include "compat.h"',$mythtv.'mythtv/libs/libmyth/util.h'], shell => ["cd ".$unixmythtv."mythtv/libs/libmyth/","patch -p0 < ".$unixmythtv."mythtv/util_win32.patch"] ],
    1527 
    1528 # post 15528, pre 15568  needs this: equivalent to: svn merge -r 15541:15540 .
    1529 #[ archive => $sources.'15541_undo.patch' , 'fetch' => 'http://svn.mythtv.org/trac/raw-attachment/ticket/XXXX/15541_undo.patch', comment => 'util_win32.patch - apply any outstanding win32 patches - this section will be hard to keep up with HEAD/SVN'],
    1530 #[ filesame => [$mythtv.'mythtv/15541_undo.patch',$sources."15541_undo.patch"], copy => [''=>'',comment => 'XXXX'] ],
    1531 #[ grep  => ['\#include \"compat.h\"',$mythtv.'mythtv/libs/libmythui/mythpainter.cpp'], shell => ["cd ".$unixmythtv."mythtv/libs/libmyth/","patch -p2 < ".$unixmythtv."mythtv/15541_undo.patch"] , comment => 'currently need this patch too, equivalemnt of: svn merge -r 15541:15540 .'],
    1532 
    1533 # Ticket 4984
    1534 #[ archive => $sources.'4984_mythcontext.patch6' , 'fetch' => 'http://svn.mythtv.org/trac/raw-attachment/ticket/4984/mythcontext.patch6', comment => 'Applying Ticket 4984'],
    1535 #[ filesame => [$mythtv.'mythtv/4984_mythcontext.patch6',$sources."4984_mythcontext.patch6"], copy => [''=>'',comment => 'XXXX'] ],
    1536 #[ grep  => ['MYTHLIBDIR',$mythtv.'mythtv/libs/libmyth/mythcontext.cpp'], shell => ["cd ".$unixmythtv."mythtv/","patch -p0 < ".$unixmythtv."mythtv/4984_mythcontext.patch6"] , comment => ' 4984'],
    1537 
    1538 
    1539 # Ticket 4699
    1540 #[ archive => $sources.'4699_win32_fs.patch', 'fetch' => 'http://svn.mythtv.org/trac/raw-attachment/ticket/4699/win32_fs.patch', comment => 'win32_fs.patch'],
    1541 #[ filesame => [$mythtv.'mythtv/4699_win32_fs.patch',$sources."4699_win32_fs.patch"], copy => [''=>'',comment => 'XXXX'] ],
    1542 #[ grep  => ['setCaption',$mythtv.'mythtv/libs/libmythui/mythmainwindow.cpp'], shell => ["cd ".$unixmythtv."mythtv","patch -p0 < ".$unixmythtv."mythtv/4699_win32_fs.patch"] , comment => ' 4699'],
    1543 
    1544 #  4718
    1545 #[ archive => $sources.'4718_undo.patch' , 'fetch' => 'http://svn.mythtv.org/trac/raw-attachment/ticket/4718/dvd_playback.patch', comment => 'Ticket 4718 dvdplayer.patch'],
    1546 #[ filesame => [$mythtv.'mythtv/4718_undo.patch',$sources."4718_undo.patch"], copy => [''=>'',comment => 'XXXX'] ],
    1547 #[ grep  => ['filename.right(filename.length() -  4)',$mythtv.'mythtv/libs/libmythtv/RingBuffer.cpp'], shell => ["cd ".$unixmythtv."mythtv/","patch -p0 < ".$unixmythtv."mythtv/4718_undo.patch"] , comment => ' .'],
    1548 #[ archive => $sources.'4718_playback.patch' , 'fetch' => 'http://svn.mythtv.org/trac/raw-attachment/ticket/4718/dvd_playback_plugin.patch', comment => 'dvdplayer.patch - apply any outstanding win32 patches - this section will be hard to keep upwith HEAD/SVN'],
    1549 #[ filesame => [$mythtv.'mythtv/4718_playback.patch',$sources."4718_playback.patch"], copy => [''=>'',comment => 'XXXX'] ],
    1550 #[ grep  => ['gc->setValue\("D:',$mythtv.'mythplugins/mythvideo/mythvideo/globalsettings.cpp'], shell => ["cd ".$unixmythtv."mythplugins/mythvideo","patch -p0 < ".$unixmythtv."mythtv/4718_undo.patch"] , comment => ' .'],
    1551 #[ grep  => ['\"dvd:\/\"',$mythtv.'mythplugins/mythvideo/mythvideo/main.cpp'], shell => ["cd ".$unixmythtv."mythplugins/mythvideo","patch -p1 < ".$unixmythtv."mythtv/4718_undo.patch"] , comment => ' 4718'],
    1552 
    15531258# Ticket 15831
    15541259#[ archive => $sources.'15831_win32_fs.patch', 'fetch' => 'http://svn.mythtv.org/trac/changeset/15831?format=diff&new=15831', comment => 'win32_fs.patch - apply any outstanding win32 patches - this section will be hard to keep upwith HEAD/SVN'],
    15551260#[ filesame => [$mythtv.'mythtv/15831_win32_fs.patch',$sources."15831_win32_fs.patch"], copy => [''=>'',comment => 'XXXX'] ],
     
    15991304foreach my $comp( @components ) {
    16001305  push @{$expect},
    16011306  [ file    => $mythtv.'delete_to_do_make_clean.txt',
    1602     exec    => [$dosmsys."bin\\svn.exe -R revert $dosmythtv$comp", "nocheck"],
     1307    exec    => [$dosmsys."bin\\svn -R revert $dosmythtv$comp", "nocheck"],
    16031308    comment => "reverting any local MODS from SVN - $comp on $svnlocation" ],
    16041309   
    16051310# this is now done as part of make_clean.sh, which happens EARLIER
     
    16311336  shell  => ['source '.$unixmythtv.'qt'.$qtver.'_env.sh',
    16321337            'cd '.$unixmythtv.'mythtv',
    16331338            './configure --prefix='.$unixbuild.' --runprefix=..'.
    1634             ' --disable-dbox2'.
    16351339            ' --disable-iptv --disable-joystick-menu --disable-xvmc-vld'.
    1636             ' --disable-xvmc --disable-lirc'.
     1340            ' --disable-xvmc --disable-lirc --disable-dbox2'.
    16371341            ' --cpu=pentium4 --compile-type='.$compile_type],
    16381342  comment => 'do we already have a Makefile for mythtv?' ],
    16391343
    16401344# make
    16411345
    1642 # fix a bug in Makefile and make COPY_DIR cp -fr instead of cp -f
    1643 # TODO Check if this is necessary. I suspect it was meant to fix #4949?
    1644 #
    1645 [ file => $mythtv.'mythtv/fix_makefile.sh',
    1646   write => [$mythtv.'mythtv/fix_makefile.sh',
    1647 'cd '.$unixmythtv.'mythtv
    1648 cat Makefile | sed  "s/\(^COPY_DIR\W*\=\W*cp\)\(\W\-f\)/\1 -fr/" > Makefile_new
    1649 cp Makefile_new Makefile
    1650 '],
    1651   comment => 'write a script to fix Makefile'],
    1652 
    16531346[ newer => [$mythtv."mythtv/libs/libmyth/libmyth-$version.dll",
    16541347            $mythtv.'mythtv/last_build.txt'],
    16551348  shell => ['rm '.$unixmythtv."mythtv/libs/libmyth/libmyth-$version.dll",
     
    17091402source '.$unixmythtv.'qt'.$qtver.'_env.sh
    17101403cd '.$unixmythtv.'
    17111404echo copying main QT dlls to build folder...
    1712 # mythtv probably needs the qt3 dlls at runtime:
    1713 cp '.$unixmsys.'qt-3.3.x-p8/lib/*.dll '.$unixmythtv.'build/bin
    17141405# mythtv needs the qt4 dlls at runtime:
    17151406cp '.$unixqt4dir.'bin/*.dll '.$unixmythtv.'build/bin
    17161407# qt mysql connection dll has to exist in a subfolder called sqldrivers:
     
    17251416# translations go into <installprefix>/share/mythtv/i18n
    17261417mkdir '.$unixmythtv.'/build/bin/sqldrivers
    17271418echo Copying QT plugin required dlls....
    1728 cp '.$unixmsys.'qt-3.3.x-p8/plugins/sqldrivers/libqsqlmysql.dll '.$unixmythtv.'build/bin/sqldrivers
    17291419cp '.$unixqt4dir.'plugins/sqldrivers/qsqlmysql*.dll '.$unixmythtv.'build/bin/sqldrivers
    17301420echo Copying ming and msys dlls to build folder.....
    17311421# pthread dlls and mingwm10.dll are copied from here:
    17321422cp /mingw/bin/*.dll '.$unixmythtv.'build/bin
    1733 # msys-1.0.dll dll is copied from here:
    1734 cp /bin/msys-1.0.dll '.$unixmythtv.'build/bin
     1423# msys-1.0.dll and library dlls are copied from here:
     1424cp /bin/*.dll '.$unixmythtv.'build/bin
    17351425echo copying lib files...
    17361426mv '.$unixmythtv.'build/lib/*.dll '.$unixmythtv.'build/bin/
    17371427mv '.$unixmythtv.'build/bin/*.a '.$unixmythtv.'build/lib/
    17381428
    1739 # because the install process failes to copy the .mak file (needed by the plugins), we copy it manually.
    1740 cp '.$unixmythtv.'mythtv/libs/libmyth/mythconfig.mak '.$unixmythtv.'build//include/mythtv/
    1741 
    17421429touch '.$unixmythtv.'/build/package_flag
    1743 cp '.$unixmythtv.'gdb_*.bat '.$unixmythtv.'build/bin
    17441430cp '.$unixmythtv.'packaging/Win32/debug/*.cmd '.$unixmythtv.'build/bin
    17451431'],
    17461432  comment => 'write a script to install mythtv to build folder'],
    17471433
    17481434
    1749 # Create file to install mythplugins
    1750 [ always => [],
    1751   write => [$mythtv.'setup_plugins.sh',
    1752 '#!/bin/bash
    1753 source '.$unixmythtv.'qt'.$qtver.'_env.sh
    1754 cd '.$unixmythtv.'
    1755 echo Copying exe files....
    1756 find /usr/bin -name \\myth*.exe  | grep -v build | xargs -n1 -i__ cp __ ./build/
    1757 echo Copying dll files....
    1758 find /usr/bin -name \\libmyth*.dll  | grep -v build | xargs -n1 -i__ cp __ ./build/ 
    1759 find /usr/lib -name \\libmyth*.dll  | grep -v build | xargs -n1 -i__ cp __ ./build/ 
    1760 echo Copying share files...
    1761 cp -ur /share/mythtv ./build/share/
    1762 echo Copying lib files...
    1763 cp -ur /lib/mythtv/* ./build/lib/mythtv
    1764 cp -ur /usr/lib/mythtv/* ./build/lib/mythtv
    1765 '],
    1766   comment => 'write a script to install plugins to build folder'],
    1767 
    1768 
    17691435# chmod the shell scripts, everytime
    17701436[ always  => [],
    17711437  shell   => ["cd $mythtv","chmod 755 *.sh"] ],
     
    19421608             ' --disable-mythgame --disable-mythnews'.
    19431609             ' --disable-mythzoneminder --enable-aac'.
    19441610             ' --enable-libvisual --enable-fftw --compile-type='.$compile_type,
    1945              #'touch '.$unixmythtv.'mythplugins/cleanup/cleanup.pro'
    19461611             ],
    19471612  comment => 'do we already have a Makefile for myth plugins?' ],
    19481613 
    19491614#[ pause => 'how does the mythplugins Makefile look? '.
    19501615#           '(did we get any errors on screen?)'],
    19511616
    1952 
    1953 [ grep    => ['win32:DEPENDS', $mythtv.'mythplugins/settings.pro'],
    1954   shell   => ['echo \'win32:DEPENDS += ./\' >> '.
    1955               $mythtv.'mythplugins/settings.pro','nocheck'],
    1956   comment => 'fix settings.pro' ],
    1957 
    1958 #hack mythconfig.mak to remove /usr
    1959 [ grep    => ['LIBDIR=/lib', $mythtv.'mythplugins/mythconfig.mak'],
    1960   shell   => ['cd '.$unixmythtv.'mythplugins',
    1961               'sed -e \'s|/usr||\' mythconfig.mak > mythconfig2.mak',
    1962               'cp mythconfig2.mak mythconfig.mak', 'nocheck'],
    1963   comment => 'hack mythconfig.mak'],
    1964 
    19651617# make
    19661618[ newer   => [$mythtv.'mythplugins/mythmovies/mythmovies/libmythmovies.dll',
    19671619              $mythtv.'mythtv/last_build.txt'],
     
    19701622  comment => 'PLUGINS! redo make if we need to '.
    19711623             '(see the  last_build.txt identifier)' ],
    19721624
    1973 # make cleanup/cleanup.pro as install fails without it
    1974 #[ file    => $mythtv.'mythplugins/cleanup/cleanup.pro',
    1975 #  shell   => ['touch '.$unixmythtv.'mythplugins/cleanup/cleanup.pro',
    1976 #              'nocheck'],
    1977 #  comment => 'make cleanup.pro'],
    1978 
    19791625# make install
    19801626[ newer   => [$mythtv.'build/lib/mythtv/plugins/libmythmovies.dll',
    19811627              $mythtv.'mythplugins/mythmovies/mythmovies/libmythmovies.dll'],
     
    19831629              'cd '.$unixmythtv.'mythplugins','make install'],
    19841630  comment => 'PLUGINS! make install' ],
    19851631
    1986 # Copy to build area
    1987 #[ newer => [$mythtv.'build/lib/mythtv/plugins/libmythmovies.dll',
    1988 #            $msys.'lib/mythtv/plugins/libmythmovies.dll'],
    1989 #  shell => [$unixmythtv.'setup_plugins.sh'],
    1990 #  comment => 'Copy mythplugins to ./build folder' ],
    1991 
    1992 # Qt3 can't cope with wildcards in the install targets:
    1993 [ file   => $build.'/share/mythtv/videomenu.xml',
    1994   shell  => ['cd '.$unixmythtv.'mythplugins',
    1995              'cp mythcontrols/mythcontrols/controls-ui.xml'.
    1996              '   mythcontrols/images/*.png '.
    1997              '   mythvideo/theme/default/*.xml'.
    1998              '   mythvideo/theme/default/images/*.png'.
    1999              '   mythweather/mythweather/weather-ui.xml'.
    2000              '   mythweather/mythweather/images/*.png'.
    2001              ' '.$unixbuild.'/share/mythtv/themes/default',
    2002              'cp mythmovies/mythmovies/theme-wide/*.xml'.
    2003              '   mythvideo/theme/default-wide/*.xml'.
    2004              '   mythvideo/theme/default-wide/images/*.png'.
    2005              '   mythweather/mythweather/theme-wide/weather-ui.xml'.
    2006              '   mythweather/mythweather/theme-wide/images/*.png'.
    2007              ' '.$unixbuild.'/share/mythtv/themes/default-wide',
    2008              'cp mythweather/mythweather/weather_settings.xml'.
    2009              '   mythvideo/theme/menus/*.xml'.
    2010              ' '.$unixbuild.'/share/mythtv',
    2011              'mkdir -p '.$unixbuild.'/share/mythtv/mythvideo/scripts',
    2012              'cp mythvideo/mythvideo/scripts/*'.
    2013              ' '.$unixbuild.'/share/mythtv/mythvideo/scripts',
    2014              'mkdir -p '.$unixbuild.'/share/mythtv/mythweather/scripts',
    2015              'cp mythweather/mythweather/weather-screens.xml'.
    2016              ' '.$unixbuild.'/share/mythtv/mythweather',
    2017              'cp -pr mythweather/mythweather/scripts/* '.
    2018              ' '.$unixbuild.'/share/mythtv/mythweather/scripts']
    2019 ]
    20201632;
    20211633}
    20221634
    20231635
    2024 if ( grep m/oldthemes/, @components ) {
     1636foreach my $themecomp ( grep m/themes/, @components ) {
    20251637# -------------------------------
    20261638# Make themes
    20271639# -------------------------------
    20281640push @{$expect},
    20291641## config:
    2030 [ file    => $mythtv.'oldthemes/Makefile',
     1642[ file    => $mythtv.$themecomp.'/Makefile',
    20311643  shell   => ['source '.$unixmythtv.'qt'.$qtver.'_env.sh',
    2032             'cd '.$unixmythtv.'oldthemes','./configure --prefix='.$unixbuild],
    2033   comment => 'do we already have a Makefile for oldthemes?' ],
     1644            'cd '.$unixmythtv.$themecomp,'./configure --prefix='.$unixbuild],
     1645  comment => "do we already have a Makefile for $themecomp?" ],
    20341646
    2035 ## fix oldthemes.pro
    2036 [ grep    => ['^win32:QMAKE_INSTALL_DIR', $mythtv.'oldthemes/oldthemes.pro'],
    2037   shell   => ['echo \'win32:QMAKE_INSTALL_DIR = sh ./cpsvndir\' >> '.
    2038               $mythtv.'oldthemes/oldthemes.pro','nocheck'],
    2039   comment => 'fix oldthemes.pro' ],
    2040 [ grep    => ['win32:DEPENDS', $mythtv.'oldthemes/oldthemes.pro'],
    2041   shell   => ['echo \'win32:DEPENDS += ./\' >> '.
    2042               $mythtv.'oldthemes/oldthemes.pro','nocheck'],
    2043   comment => 'fix oldthemes.pro' ],
    2044 
    2045 #hack mythconfig.mak to remove /usr
    2046 [ grep    => ['LIBDIR=/lib', $mythtv.'oldthemes/mythconfig.mak'],
    2047   shell   => ['cd '.$unixmythtv.'oldthemes',
    2048              'sed -e \'s|/usr||\' mythconfig.mak > mythconfig2.mak',
    2049              'cp mythconfig2.mak mythconfig.mak', 'nocheck'],
    2050   comment => 'hack mythconfig.mak'],
    2051 
    20521647## make
    2053 [ dir     => [$mythtv.'/build/share/mythtv/themes/Retro'],
     1648[ file    => [$mythtv.'build/share/'.$themecomp.'.installed'],
    20541649  shell   => ['source '.$unixmythtv.'qt'.$qtver.'_env.sh',
    2055               'cd '.$unixmythtv.'oldthemes','make', 'make install'],
     1650              'cd '.$unixmythtv.$themecomp,'make', 'make install',
     1651              'touch '.$unixmythtv.'build/share/'.$themecomp.'.installed'],
    20561652  comment => 'THEMES! redo make if we need to '.
    20571653             '(see the  last_build.txt identifier)' ],
    2058  
     1654;
     1655}
    20591656
     1657if ( grep m/themes/, @components ) {
     1658push @{$expect},       
    20601659# Get any extra Themes
    20611660#
    20621661
     
    20741673# Move ttf fonts to font directory
    20751674[ always  => [],
    20761675  shell   => ['source '.$unixmythtv.'qt'.$qtver.'_env.sh',
    2077             'cd '.$unixmythtv.'oldthemes',
     1676            'cd '.$unixmythtv.'build',
    20781677            'find '.$unixmythtv.'build/share/mythtv/themes/ -name "*.ttf"'.
    20791678            ' | xargs -n1 -i__ cp __ '.$unixmythtv.'build/share/mythtv'],
    20801679  comment => 'move ttf files'],
     
    25812180          print FILE $_[0] or die "_fetch can't write to $file: $!\n";
    25822181      }
    25832182    );
    2584     close(FILE) || die "_fetch can't close $file: $!\n";
     2183    close(FILE) || print "_fetch can't close $file: $!\n";
    25852184    if (my $mtime = $res->last_modified) {
    25862185        utime time, $mtime, $file;
    25872186    }
     
    27152314
    27162315-h             This message
    27172316-v             Verbose output
    2718 -u all|mythtv|mythplugins|oldthemes
    2719                Revert instead of checkout !!
     2317-o             Include oldthemes in the build [default off]
     2318-g             Exclude mythplugins from the build [default off]
    27202319-k             Package win32 distribution
    27212320-p proxy:port  Your proxy
    27222321-r XXXX|head   Your prefered revision (to change revision)