Load XML-Feed-0.01 into trunk.
[catagits/XML-Feed.git] / inc / Module / Install / Win32.pm
1 #line 1 "inc/Module/Install/Win32.pm - /Library/Perl/5.8.1/Module/Install/Win32.pm"
2 # $File: //depot/cpan/Module-Install/lib/Module/Install/Win32.pm $ $Author: autrijus $
3 # $Revision: #9 $ $Change: 1789 $ $DateTime: 2003/11/11 01:22:54 $ vim: expandtab shiftwidth=4
4
5 package Module::Install::Win32;
6 use Module::Install::Base; @ISA = qw(Module::Install::Base);
7
8 $VERSION = '0.02';
9
10 use strict;
11
12 # determine if the user needs nmake, and download it if needed
13 sub check_nmake {
14     my $self = shift;
15     $self->load('can_run');
16     $self->load('get_file');
17
18     require Config;
19     return unless (
20         $Config::Config{make}                   and
21         $Config::Config{make} =~ /^nmake\b/i    and
22         $^O eq 'MSWin32'                        and
23         !$self->can_run('nmake')
24     );
25
26     print "The required 'nmake' executable not found, fetching it...\n";
27
28     require File::Basename;
29     my $rv = $self->get_file(
30         url         => 'http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe',
31         ftp_url     => 'ftp://ftp.microsoft.com/Softlib/MSLFILES/Nmake15.exe',
32         local_dir   => File::Basename::dirname($^X),
33         size        => 51928,
34         run         => 'Nmake15.exe /o > nul',
35         check_for   => 'Nmake.exe',
36         remove      => 1,
37     );
38
39     if (!$rv) {
40         die << '.';
41
42 -------------------------------------------------------------------------------
43
44 Since you are using Microsoft Windows, you will need the 'nmake' utility
45 before installation. It's available at:
46
47   http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe
48       or
49   ftp://ftp.microsoft.com/Softlib/MSLFILES/Nmake15.exe
50
51 Please download the file manually, save it to a directory in %PATH% (e.g.
52 C:\WINDOWS\COMMAND\), then launch the MS-DOS command line shell, "cd" to
53 that directory, and run "Nmake15.exe" from there; that will create the
54 'nmake.exe' file needed by this module.
55
56 You may then resume the installation process described in README.
57
58 -------------------------------------------------------------------------------
59 .
60     }
61 }
62
63 1;
64
65 __END__
66