Ticket #4397: win32-packager.17.patch
File win32-packager.17.patch, 22.4 KB (added by , 18 years ago) |
---|
-
win32-packager.
old new 20 20 #use Cwd (); 21 21 use LWP::UserAgent; 22 22 use IO::File; 23 use Data::Dumper qw(Dumper);23 use Data::Dumper; 24 24 use File::Copy qw(cp); 25 25 26 26 my $NOISY = 1; # set to 0 for less output to the screen 27 27 28 28 $| = 1; # autoflush stdout; 29 29 30 my $SVNRELEASE = '15433' ;# this scipt was last tested to work with this version, on other versions YMMV. 30 my $SVNRELEASE = '15433' ;# this scipt was last tested to work with this 31 # developer version, on other versions YMMV. 32 #my $SVNRELEASE = 'HEAD' ;# if you are game, go forth and test the latest release! 31 33 32 34 # We allow SourceForge to tell us which server to download from, 33 35 # rather than assuming specific server/s … … 35 37 # mirror of SF's choosing, 36 38 # hopefully close to you 37 39 # alternatively you can choose your own mirror: 38 #my $sourceforge = 'optusnet.dl.sourceforge.net'; # australia <- the author 39 # # uses this one! 40 #my $sourceforge = 'optusnet.dl.sourceforge.net'; # australia 40 41 #my $sourceforge = 'internap.dl.sourceforge.net'; # USA,California 41 42 #my $sourceforge = 'easynews.dl.sourceforge.net'; # USA,Arizona,Phoenix, 42 43 #my $sourceforge = 'jaist.dl.sourceforge.net'; # Japan … … 50 51 my $proxy = ''; 51 52 #my $proxy = 'http://enter.your.proxy.here:8080'; 52 53 53 # TODO - use this list to define the components to build - 54 # TODO - use this list to define the components to build - only the first of these currently works well. 54 55 my @components = ( 'mythtv', 'myththemes', 'mythplugins' ); 55 56 56 57 … … 60 61 # unless $ENV{SOURCES}; 61 62 # my $sources = $ENV{SOURCES}; 62 63 # TODO - although theoretically possible to change these paths, 63 # it has NOT been tested, and will with HIGH PROBABILITY fail somewhere 64 # it has NOT been tested much, and will with HIGH PROBABILITY fail somewhere. 65 # TODO - Only $mingw is tested and most likely is safe to change. 64 66 65 67 # perl compatible paths (single forward slashes in DOS style): 66 68 my $msys = 'C:/MSys/1.0/'; # must end in slash, and use forward slashes / … … 119 121 # copy a new version of a file, set mtime to the original [copy] 120 122 121 123 #TODO: 122 # copy a file or set of files (path/filespec, destination) not-yet-impl. use exec => 'copy /Y xxxyyy'124 # copy a set of files (path/filespec, destination) not-yet-impl. use exec => 'copy /Y xxx.* yyy' 123 125 # apply a diff not-yet-impl use shell => 'patch -p0 < blah.patch' 124 126 # search-replace text in a file not-yet-impl use grep => ['pattern',subject], exec => shell 'patch < etc to replace it' 125 127 … … 195 197 [ dir => $sources.'svn-win32-1.4.6', extract => $sources.'svn-win32-1.4.6.zip' ], 196 198 197 199 198 [ file => $msys.'bin/svn.exe', shell => ["cp -R $unixsources/svn-win32-1.4.6/* ".$unixmsys],comment => 'put the svn.exe executable into the path, so we can use it later!' ],200 [ file => $msys.'bin/svn.exe', shell => ["cp -R $unixsources/svn-win32-1.4.6/* ".$unixmsys],comment => 'put the svn.exe executable into the path, so we can use it easily later!' ], 199 201 200 202 # : 201 203 [ dir => $sources."zlib" , mkdirs => $sources.'zlib',comment => 'the zlib download is a bit messed-up, and needs some TLC to put everything in the right place' ], … … 203 205 # install to /usr: 204 206 [ file => $msys.'lib/libz.a', exec => ["copy /Y ".$dossources.'zlib\usr\lib\* '.$dosmsys."lib"] ], 205 207 [ file => $msys.'bin/msys-z.dll', exec => ["copy /Y ".$dossources.'zlib\usr\bin\* '.$dosmsys."bin"] ], 206 [ file => $msys.'include/zlib.h', exec => ["copy /Y ".$dossources.'zlib\usr\include\* ',$dosmsys."include"] ],208 [ file => $msys.'include/zlib.h', exec => ["copy /Y ".$dossources.'zlib\usr\include\* '.$dosmsys."include"] ], 207 209 # taglib also requires zlib in /mingw , so we'll put it there too, why not! 208 210 [ file => $msys.'lib/libz.a', exec => ["copy /Y ".$dossources.'zlib\usr\lib\* '.$dosmingw."lib"] ], 209 [ file => $msys.'bin/msys-z.dll', exec => ["copy /Y ".$dossources.'zlib\usr\bin\* ',$dosmingw."bin"] ],211 [ file => $msys.'bin/msys-z.dll', exec => ["copy /Y ".$dossources.'zlib\usr\bin\* '. $dosmingw."bin"] ], 210 212 [ file => $msys.'include/zlib.h', exec => ["copy /Y ".$dossources.'zlib\usr\include\* '.$dosmingw."include"] ], 211 213 212 214 … … 452 454 export PATH=$QTDIR/bin:$PATH 453 455 ' ],comment => 'write a script that we can source later when inside msys to setup the environment variables'], 454 456 455 ##456 #[ file => $mythtv.'make_run.sh', write => [$mythtv.'make_run.sh',457 #'#!/bin/bash458 #source '.$unixmythtv.'qt_env.sh459 #cd '.$unixmythtv.'/mythtv460 ## keep around just one earlier verion in run_old:461 #rm -rf run_old462 #mv run run_old463 #mkdir run464 ## copy exes and dlls to the run folder:465 #find . -name \\*.exe | grep -v run | xargs -n1 -i__ cp __ ./run/466 #find . -name \\*.dll | grep -v run | xargs -n1 -i__ cp __ ./run/467 ## mythtv needs the qt dlls at runtime:468 #cp '.$unixmsys.'qt-3.3.x-p8/lib/*.dll '.$unixmythtv.'mythtv/run469 ## qt mysql connection dll has to exist in a subfolder called sqldrivers:470 #mkdir '.$unixmythtv.'mythtv/run/sqldrivers471 #cp '.$unixmsys.'qt-3.3.x-p8/plugins/sqldrivers/libqsqlmysql.dll '.$unixmythtv.'mythtv/run/sqldrivers472 ## pthread dlls and mingwm10.dll are copied from here:473 #cp /mingw/bin/*.dll '.$unixmythtv.'mythtv/run474 #' ],comment => 'script that will copy all the files necessary for running mythtv out of the build folder into the ./run folder'],475 476 #477 [ file => $mythtv.'build_plugins.sh', write => [$mythtv.'build_plugins.sh',478 '#!/bin/bash479 cd '.$unixmythtv.'mythplugins480 ./configure --prefix=/usr --disable-mythgallery --disable-mythmusic --disable-mytharchive --disable-mythbrowser --disable-mythflix --disable-mythgame --disable-mythnews --disable-mythphone --disable-mythzoneminder --disable-mythweb --enable-aac --enable-libvisual --enable-fftw --compile-type=debug && make && make install481 #make482 #make install483 #cd ..484 ' ],comment => 'write a script to build mythtv plugins'],485 457 486 458 # chmod the shell scripts, everytime 487 459 [ file => $mythtv.'_' , shell => ["cd $mythtv","chmod 755 *.sh",'nocheck'] ], … … 493 465 # SVN update every time, before patches, unless we are using a proxy 494 466 foreach my $comp( @components ) { 495 467 push @{$expect}, 496 [ file => $mythtv.'using_proxy_cannot_do_SVN.txt', exec => ['cd '.$dosmythtv."$comp && ".$dosmsys.'bin\svn.exe update','nocheck'],comment => 'getting SVN updates for:'.$comp ],468 [ file => $mythtv.'using_proxy_cannot_do_SVN.txt', exec => ['cd '.$dosmythtv."$comp && ".$dosmsys.'bin\svn.exe -r '.$SVNRELEASE.' update','nocheck'],comment => 'getting SVN updates for:'.$comp ], 497 469 } 498 470 push @{$expect}, 499 471 472 # always get svn num 473 [ file => $mythtv.'_', exec => ['cd '.$dosmythtv.'mythtv && '.$dosmsys.'bin\svn.exe info > '.$dosmythtv.'mythtv\svn_info.new','nocheck'], comment => 'fetching the SVN number to a text file, if we can'], 474 [ filesame => [$mythtv.'mythtv\svn_info.txt',$mythtv.'mythtv\svn_info.new'], shell => ['touch -r '.$unixmythtv.'mythtv/svn_info.txt '.$unixmythtv.'mythtv/svn_info.new'], comment => 'match the datetime of these files, so that the contents only can be compared next' ], 475 476 # is svn num (ie file contents) changed since last run, if so, do a 'make clean' (overkill, I know, but safer)! 477 [ filesame => [$mythtv.'mythtv\svn_info.txt',$mythtv.'mythtv\svn_info.new'], shell => ['touch '.$unixmythtv.'mythtv/Makefile','cat '.$unixmythtv.'mythtv/svn_info.new >'.$unixmythtv.'mythtv/svn_info.txt','touch -r '.$unixmythtv.'mythtv/svn_info.txt '.$unixmythtv.'mythtv/svn_info.new'], comment => 'if the SVN number is changed, then remember that, AND arrange for a full re-make of mythtv. (overkill, I know, but safer)' ], 500 478 501 479 # apply any outstanding win32 patches - this section will be hard to keep upwith HEAD/SVN: 502 480 … … 525 503 # config 526 504 [ file => $mythtv.'mythtv/Makefile', shell => ['source '.$unixmythtv.'qt_env.sh','cd '.$unixmythtv.'mythtv','./configure --prefix=/usr --disable-dbox2 --disable-hdhomerun --disable-dvb --disable-ivtv --disable-iptv --disable-joystick-menu --disable-xvmc-vld --disable-x11 --disable-xvmc --enable-directx --enable-memalign-hack --cpu=k8 --compile-type=debug'], comment => 'do we already have a Makefile for mythtv?' ], 527 505 # make 528 [ newer => [$mythtv.'mythtv/libs/libmyth/libmyth-0.20.dll',$mythtv.'mythtv/Makefile'], shell => [' source '.$unixmythtv.'qt_env.sh','cd '.$unixmythtv.'mythtv','make'], comment => 'libs/libmyth/libmyth-0.20.dll - redo make unless all these files exist, and are newer than the Makefile' ],529 [ newer => [$mythtv.'mythtv/libs/libmythtv/libmythtv-0.20.dll',$mythtv.'mythtv/Makefile'], shell => [' source '.$unixmythtv.'qt_env.sh','cd '.$unixmythtv.'mythtv','make'], comment => 'libs/libmythtv/libmythtv-0.20.dll - redo make unless all these files exist, and are newer than the Makefile' ],530 [ newer => [$mythtv.'mythtv/programs/mythfrontend/mythfrontend.exe',$mythtv.'mythtv/Makefile'], shell => [' source '.$unixmythtv.'qt_env.sh','cd '.$unixmythtv.'mythtv','make'], comment => 'programs/mythfrontend/mythfrontend.exe - redo make unless all these files exist, and are newer than the Makefile' ],531 [ newer => [$mythtv.'mythtv/programs/mythbackend/mythbackend.exe',$mythtv.'mythtv/Makefile'], shell => [' source '.$unixmythtv.'qt_env.sh','cd '.$unixmythtv.'mythtv','make'], comment => 'programs/mythbackend/mythbackend.exe - redo make unless all these files exist, and are newer than the Makefile' ],506 [ newer => [$mythtv.'mythtv/libs/libmyth/libmyth-0.20.dll',$mythtv.'mythtv/Makefile'], shell => ['rm '.$unixmythtv.'mythtv/libs/libmyth/libmyth-0.20.dll','source '.$unixmythtv.'qt_env.sh','cd '.$unixmythtv.'mythtv','make'], comment => 'libs/libmyth/libmyth-0.20.dll - redo make unless all these files exist, and are newer than the Makefile' ], 507 [ newer => [$mythtv.'mythtv/libs/libmythtv/libmythtv-0.20.dll',$mythtv.'mythtv/Makefile'], shell => ['rm '.$unixmythtv.'mythtv/libs/libmythtv/libmythtv-0.20.dll','source '.$unixmythtv.'qt_env.sh','cd '.$unixmythtv.'mythtv','make'], comment => 'libs/libmythtv/libmythtv-0.20.dll - redo make unless all these files exist, and are newer than the Makefile' ], 508 [ newer => [$mythtv.'mythtv/programs/mythfrontend/mythfrontend.exe',$mythtv.'mythtv/Makefile'], shell => ['rm '.$unixmythtv.'mythtv/programs/mythfrontend/mythfrontend.exe','source '.$unixmythtv.'qt_env.sh','cd '.$unixmythtv.'mythtv','make'], comment => 'programs/mythfrontend/mythfrontend.exe - redo make unless all these files exist, and are newer than the Makefile' ], 509 [ newer => [$mythtv.'mythtv/programs/mythbackend/mythbackend.exe',$mythtv.'mythtv/Makefile'], shell => ['rm '.$unixmythtv.'mythtv/programs/mythbackend/mythbackend.exe','source '.$unixmythtv.'qt_env.sh','cd '.$unixmythtv.'mythtv','make'], comment => 'programs/mythbackend/mythbackend.exe - redo make unless all these files exist, and are newer than the Makefile' ], 532 510 533 511 # re-install to msys /usr/bin folders etc, if we have a newer mythtv build ready: 534 512 [ newer => [$msys.'bin/mythfrontend.exe',$mythtv.'mythtv/programs/mythfrontend/mythfrontend.exe'], shell => ['source '.$unixmythtv.'qt_env.sh','cd '.$unixmythtv.'mythtv','make install'], comment => 'was the last configure successful? then install mythtv ' ], 535 513 514 # it seems that mythverbose.h isn't installed as it should be.... (needed by the plugins compile) 515 [ filesame => [$msys.'include/mythtv/mythverbose.h',$mythtv.'mythtv/libs/libmyth/mythverbose.h'], copy => [''=>''], comment => 'mythverbose.h ist installed properly yet...' ], 516 517 536 518 # install some themes? does a 'make install' do that adequately (no, not if running outside msys)? 537 519 538 520 … … 639 621 # this has the 'nocheck' flag because the creation of the DB doesn't instantly reflect in the .txt file we are looking at: 640 622 [ grep => ['mythconverg',$mythtv.'_mysqlshow_err.txt'], exec => [ 'echo create database mythconverg; | "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysql.exe" -u mythtv --password=mythtv','nocheck'], comment => ' does the mythconverg database exist? (and can this user see it?) '], 641 623 624 #---------------------------------------- 625 626 # build the mythplugins now: 627 # 628 #[ file => $mythtv.'build_plugins.sh', write => [$mythtv.'build_plugins.sh', 629 #'#!/bin/bash 630 #source '.$unixmythtv.'qt_env.sh 631 #cd '.$unixmythtv.'mythplugins 632 #./configure --prefix=/usr --disable-mythgallery --disable-mythmusic --disable-mytharchive --disable-mythbrowser --disable-mythflix --disable-mythgame --disable-mythnews --disable-mythphone --disable-mythzoneminder --disable-mythweb --enable-aac --enable-libvisual --enable-fftw --compile-type=debug && make && make install 633 ##make 634 ##make install 635 ##cd .. 636 #' ],comment => 'write a script to build mythtv plugins'], 637 638 # get mythtv sources, if we don't already have them 639 # download all the files from the web, and save them here: 640 [ dir => $mythtv.'mythplugins', mkdirs => $mythtv.'mythplugins' ], 641 642 # config: 643 [ file => $mythtv.'mythplugins/Makefile', shell => ['source '.$unixmythtv.'qt_env.sh','cd '.$unixmythtv.'mythplugins','--prefix=/usr --disable-mythgallery --disable-mythmusic --disable-mytharchive --disable-mythbrowser --disable-mythflix --disable-mythgame --disable-mythnews --disable-mythphone --disable-mythzoneminder --disable-mythweb --enable-aac --enable-libvisual --enable-fftw --compile-type=debug'], comment => 'do we already have a Makefile for myth plugins?' ], 644 # make 645 #[ newer => [$mythtv.'mythplugins/mythmovies/mythmovies/XXXXX',$mythtv.'mythplugins/Makefile'], shell => ['source '.$unixmythtv.'qt_env.sh','cd '.$unixmythtv.'mythplugins','make'], comment => 'plugins - redo make unless all these files exist, and are newer than the Makefile' ], 646 647 # re-install to msys /usr/bin folders etc, if we have a newer mythtv build ready: 648 #[ newer => [$msys.'bin/mythfrontend.exeXXXXX',$mythtv.'mythplugins/mythmovies/mythmovies/XXXXX'], shell => ['source '.$unixmythtv.'qt_env.sh','cd '.$unixmythtv.'mythplugins','make install'], comment => 'plugins - was the last configure successful? then install mythtv ' ], 642 649 643 650 644 # then we Can't connect to MySQL server is the message we get if the server is not even running!645 #[ grep => ["Access denied for user",$mythtv.'_mysqlshow_err.txt'], exec => 'C:\Program Files\MySQL\MySQL Server 5.0\bin\MySQLInstanceConfig.exe', comment => 'We couldnt connect to server, please re-configure the MySQL server to start as a service.'],646 651 647 652 #---------------------------------------- 648 653 … … 657 662 print << "END"; 658 663 # 659 664 # SCRIPT TODO/NOTES: - further notes on this scripts direction.... 660 # if the build was successful then try running the 'mythfrontend.exe' and 'mythbackend.exe' from the 'C:\mythtv\mythtv\run' folder. 661 # ok, how about the test-run process? 662 # create a vanilla mysql.txt file 663 # check that the local mysql server is running, and configure it: 664 # we should run: 'C:\\Program Files\\MySQL\\MySQL Server 5.0\\bin\\MySQLInstanceConfig.exe' 665 # check that mythtv/mythtv/mythconverg will access the mysql database. 666 # 665 # * if the build was successful then try running the 'mythfrontend.exe' and 'mythbackend.exe' from the 'C:\mythtv\mythtv\run' folder. 666 # * ok, how about the test-run process? 667 # * check that mythtv/mythtv/mythconverg will access the mysql database 668 # * mythplugins build isn't currently working, so disabled. 669 # * myththemes build isn't tried at all 667 670 END 668 671 } 669 672 … … 718 721 # a single array on passing to effect(); 719 722 effect($effecttype,$cause[0],@nocheckeffectparams); 720 723 if ( ! -f $cause[0] && $nocheck == 0) { 721 die " archive -> EFFECT FAILED: $causetype,$cause[0],$effecttype\n";724 die "EFFECT FAILED ($causetype -> $effecttype): unable to locate expected file ($cause[0]) that was to be fetched from $nocheckeffectparams[0]\n"; 722 725 } 723 726 724 727 } elsif ( $causetype eq 'dir' ) { … … 727 730 } 728 731 effect($effecttype,@nocheckeffectparams); 729 732 if ( ! -d $cause[0] && $nocheck == 0) { 730 die " dir -> EFFECT FAILED: $causetype,$cause[0],$effecttype\n";733 die "EFFECT FAILED ($causetype -> $effecttype): unable to locate expected directory ($cause[0]).\n"; 731 734 } 732 735 733 736 } elsif ( $causetype eq 'file' ) { 734 737 if ( -f $cause[0] ) {print "file exists: $cause[0]\n"; next;} 735 738 effect($effecttype,@nocheckeffectparams); 736 739 if ( ! -f $cause[0] && $nocheck == 0) { 737 die " file -> EFFECT FAILED: $causetype,$cause[0],$effecttype\n";740 die "EFFECT FAILED ($causetype -> $effecttype): unable to locate expected file ($cause[0]).\n"; 738 741 } 739 742 } elsif ( $causetype eq 'filesame' ) { 740 743 # TODO - currently we check file mtime, and byte size, but not MD5/CRC32 or contents, this is "good enough" for most circumstances. … … 743 746 $size = (stat($cause[0]))[7]; 744 747 $mtime = (stat($cause[0]))[9]; 745 748 } 746 if (! (-f $cause[1] ) ) { die "cause: $causetype requires its SECOND filename to exist for comparison: $cause[1]\n"; }749 if (! (-f $cause[1] ) ) { die "cause: $causetype requires its SECOND filename to exist for comparison: ($cause[1]).\n"; } 747 750 my $size2 = (stat($cause[1]))[7]; 748 751 my $mtime2 = (stat($cause[1]))[9]; 749 752 if ( $mtime != $mtime2 || $size != $size2) { … … 755 758 effect($effecttype,@nocheckeffectparams); # do something else if the files are not 100% identical? 756 759 } 757 760 }else { 758 print "effect not required m files already up-to-date/identical: ($cause[0] => $cause[1])\n";761 print "effect not required files already up-to-date/identical: ($cause[0] => $cause[1]).\n"; 759 762 } 760 763 undef $size; undef $mtime; 761 764 undef $size2; undef $mtime2; … … 765 768 if ( -f $cause[0] ) { 766 769 $mtime = (stat($cause[0]))[9]; 767 770 } 768 if (! ( -f $cause[1]) ) { die "cause: $causetype requires it's SECOND filename to exist for comparison: $cause[1] \n"; }771 if (! ( -f $cause[1]) ) { die "cause: $causetype requires it's SECOND filename to exist for comparison: $cause[1].\n"; } 769 772 my $mtime2 = (stat($cause[1]))[9]; 770 773 if ( $mtime < $mtime2 ) { 771 774 effect($effecttype,@nocheckeffectparams); … … 774 777 my $mtime3 = (stat($cause[0]))[9]; 775 778 my $mtime4 = (stat($cause[1]))[9]; 776 779 if ( $mtime3 < $mtime4 ) { 777 die " file -> EFFECT FAILED: $causetype,$cause[0],$cause[1],$effecttype\n";780 die "EFFECT FAILED ($causetype -> $effecttype): mtime of file ($cause[0]) should be greater than file ($cause[1]).\n"; 778 781 } 779 782 } 780 783 } else { … … 790 793 print "grep - already matched source file($cause[1]), with pattern ($cause[0]) - no action reqd\n"; 791 794 } 792 795 if ( (! _grep($cause[0],$cause[1])) && $nocheck == 0 ) { 793 die " grep -> EFFECT FAILED: $causetype,$effecttype,$cause[0],$cause[1]\n";796 die "EFFECT FAILED ($causetype -> $effecttype): unable to locate regex pattern ($cause[0]) in file ($cause[1])\n"; 794 797 } 795 798 796 799 } else { 797 print Dumper(\@dep); 798 die " unknown causetype '$causetype' \n"; 800 die " unknown causetype $causetype \n"; 799 801 } 800 802 } 801 803 … … 809 811 sub effect { 810 812 my ( $effecttype, @effectparams ) = @_; 811 813 812 if ( $effecttype =~ /\s*fetch\s*/i) {814 if ( $effecttype eq 'fetch') { 813 815 # passing two parameters that came in via the array 814 816 _fetch(@effectparams); 815 817 816 } elsif ( $effecttype =~ /\s*extract\s*/i) {818 } elsif ( $effecttype eq 'extract') { 817 819 my $tarfile = $effectparams[0]; 818 820 my $destdir = $effectparams[1] || ''; 819 821 if ($destdir eq '') { … … 826 828 print "extracttar($t,$destdir);\n"; 827 829 extracttar($t,$destdir); 828 830 829 } elsif ($effecttype =~ /\s*exec\s*/i) { # execute a DOS command831 } elsif ($effecttype eq 'exec') { # execute a DOS command 830 832 my $cmd = shift @effectparams; 831 833 #print `$cmd`; 832 834 print "exec:$cmd\n"; … … 835 837 print; 836 838 } 837 839 838 } elsif ($effecttype =~ /\s*shell\s*/i) {840 } elsif ($effecttype eq 'shell') { 839 841 shell(@effectparams); 840 842 841 } elsif ($effecttype =~ /\s*copy\s*/i) {843 } elsif ($effecttype eq 'copy') { 842 844 die "Can not copy non-existant file ($effectparams[0])\n" unless -f $effectparams[0]; 843 845 print "copying file ($effectparams[0] => $effectparams[1]) \n"; 844 846 cp($effectparams[0],$effectparams[1]); 845 847 # make destn mtime the same as the original for ease of comparison: 846 848 shell("touch --reference=".perl2unix($effectparams[0])." ".perl2unix($effectparams[1])); 847 849 848 } elsif ($effecttype =~ /\s*mkdirs\s*/i) {850 } elsif ($effecttype eq 'mkdirs') { 849 851 mkdirs(shift @effectparams); 850 852 851 } elsif ($effecttype =~ /\s*write\s*/i) {853 } elsif ($effecttype eq 'write') { 852 854 # just dump the requested content from the array to the file. 853 855 my $filename = shift @effectparams; 854 856 my $fh = new IO::File ("> $filename") … … 858 860 $fh->close(); 859 861 860 862 } else { 861 print Dumper(\@effectparams); 862 die " unknown effecttype '$effecttype'\n"; 863 die " unknown effecttype $effecttype from cause 'dir'\n"; 863 864 } 864 865 } 865 866 #------------------------------------------------------------------------------ … … 976 977 # (cause we are in the process of installing them) 977 978 sub shell { 978 979 my @cmds = @_; 979 my $cmd = $dosmsys.'bin\bash.exe -c "( export PATH=/bin:/mingw/bin:$PATH;'.join(';',@cmds).') "';980 my $cmd = $dosmsys.'bin\bash.exe -c "( export PATH=/bin:/mingw/bin:$PATH;'.join(';',@cmds).') 2>&1 "'; 980 981 print "shell:$cmd\n"; 981 982 # execute the cmd, and capture the output! this is a glorified version 982 983 # of "print `$cmd`;" except it doesn't buffer the output if $|=1; is set. 983 984 open F, "$cmd |" || die "err: $!"; 984 985 while (<F>) { 986 if (! $NOISY ) { 987 # skip known spurious messages from going to the screen unnecessarily 988 next if /redeclared without dllimport attribute after being referenced with dllimpo/; 989 next if /warning: overriding commands for target `\.\'/; 990 next if /warning: ignoring old commands for target `\.\'/; 991 next if /Nothing to be done for `all\'/; 992 next if /^cd .* \&\& \\/; 993 next if /^make -f Makefile/; 994 } 985 995 print; 986 996 } 987 997 }