Ticket #6900: 6900-w32pkg.patch
File 6900-w32pkg.patch, 2.4 KB (added by , 15 years ago) |
---|
-
win32-packager.pl
40 40 use Digest::MD5; 41 41 42 42 43 $SIG{INT} = sub { die "Interrupted\n"; }; 43 44 $| = 1; # autoflush stdout; 44 45 45 46 # this script was last tested to work with this version, on other versions YMMV. … … 708 672 if ( $qtver == 4 ) { 709 673 push @{$expect}, 710 674 [ archive => $sources.'qt-win-opensource-4.5.1-mingw.exe', 711 fetch => 'ftp://ftp.qtsoftware.com/qt/source/'. 712 'qt-win-opensource-4.5.1-mingw.exe'], 675 fetch => 'http://get.qt.nokia.com/qt/source/'. 676 'qt-win-opensource-4.5.1-mingw.exe', 677 comment => 'Downloading QT binaries; this will take a LONG time (165MB)' ], 713 678 [ file => $qt4dir.'bin/QtCore4.dll', 714 679 exec => $dossources.'qt-win-opensource-4.5.1-mingw.exe', 715 680 comment => 'Install Qt - use default options. '. … … 947 915 # confirmed latest source version as at 26-12-2008: 948 916 [ archive => $sources.'SDL-devel-1.2.13-mingw32.tar.gz', 949 917 fetch => 'http://www.libsdl.org/release/SDL-devel-1.2.13-mingw32.tar.gz'], 950 [ dir => $sources.'SDL-1.2.13',918 [ file => $sources.'SDL-1.2.13/bin/SDL.dll', 951 919 extract => $sources.'SDL-devel-1.2.13-mingw32.tar.gz' ], 952 920 [ file => $msys.'bin/SDL.dll', 953 921 shell => ["cd $unixsources/SDL-1.2.13", … … 2578 2375 my $ua = LWP::UserAgent->new; 2579 2376 $ua->proxy(['http', 'ftp'], $proxy); 2580 2377 2581 my $req = HTTP::Request->new(GET => $url); 2582 my $res = $ua->request($req); 2583 2584 if ($res->is_success) { 2585 my $f = new IO::File "> $file" || die "_fetch: $!\n"; 2586 $f->binmode(); 2587 $f->print($res->content); 2588 $f->close(); 2378 my $res = $ua->request(HTTP::Request->new(GET => $url), 2379 sub { 2380 if (! -f $file) { 2381 open(FILE, ">$file") || die "_fetch can't open $file: $!\n"; 2382 binmode FILE; 2383 } 2384 print FILE $_[0] or die "_fetch can't write to $file: $!\n"; 2385 } 2386 ); 2387 close(FILE) || die "_fetch can't close $file: $!\n"; 2388 if (my $mtime = $res->last_modified) { 2389 utime time, $mtime, $file; 2589 2390 } 2391 if ($res->header("X-Died") || !$res->is_success) { 2392 unlink($file) && print "Transfer failed. File deleted.\n"; 2393 } 2394 2590 2395 if ( ! -s $file ) { 2591 2396 die ('ERR: Unable to automatically fetch file!\nPerhaps manually '. 2592 2397 'downloading from the URL to the filename (both listed above) '.