Blame inc/Module/Install/Win32.pm

Packit 549706
#line 1
Packit 549706
package Module::Install::Win32;
Packit 549706
Packit 549706
use strict;
Packit 549706
use Module::Install::Base ();
Packit 549706
Packit 549706
use vars qw{$VERSION @ISA $ISCORE};
Packit 549706
BEGIN {
Packit 549706
	$VERSION = '0.91';
Packit 549706
	@ISA     = 'Module::Install::Base';
Packit 549706
	$ISCORE  = 1;
Packit 549706
}
Packit 549706
Packit 549706
# determine if the user needs nmake, and download it if needed
Packit 549706
sub check_nmake {
Packit 549706
	my $self = shift;
Packit 549706
	$self->load('can_run');
Packit 549706
	$self->load('get_file');
Packit 549706
Packit 549706
	require Config;
Packit 549706
	return unless (
Packit 549706
		$^O eq 'MSWin32'                     and
Packit 549706
		$Config::Config{make}                and
Packit 549706
		$Config::Config{make} =~ /^nmake\b/i and
Packit 549706
		! $self->can_run('nmake')
Packit 549706
	);
Packit 549706
Packit 549706
	print "The required 'nmake' executable not found, fetching it...\n";
Packit 549706
Packit 549706
	require File::Basename;
Packit 549706
	my $rv = $self->get_file(
Packit 549706
		url       => 'http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe',
Packit 549706
		ftp_url   => 'ftp://ftp.microsoft.com/Softlib/MSLFILES/Nmake15.exe',
Packit 549706
		local_dir => File::Basename::dirname($^X),
Packit 549706
		size      => 51928,
Packit 549706
		run       => 'Nmake15.exe /o > nul',
Packit 549706
		check_for => 'Nmake.exe',
Packit 549706
		remove    => 1,
Packit 549706
	);
Packit 549706
Packit 549706
	die <<'END_MESSAGE' unless $rv;
Packit 549706
Packit 549706
-------------------------------------------------------------------------------
Packit 549706
Packit 549706
Since you are using Microsoft Windows, you will need the 'nmake' utility
Packit 549706
before installation. It's available at:
Packit 549706
Packit 549706
  http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe
Packit 549706
      or
Packit 549706
  ftp://ftp.microsoft.com/Softlib/MSLFILES/Nmake15.exe
Packit 549706
Packit 549706
Please download the file manually, save it to a directory in %PATH% (e.g.
Packit 549706
C:\WINDOWS\COMMAND\), then launch the MS-DOS command line shell, "cd" to
Packit 549706
that directory, and run "Nmake15.exe" from there; that will create the
Packit 549706
'nmake.exe' file needed by this module.
Packit 549706
Packit 549706
You may then resume the installation process described in README.
Packit 549706
Packit 549706
-------------------------------------------------------------------------------
Packit 549706
END_MESSAGE
Packit 549706
Packit 549706
}
Packit 549706
Packit 549706
1;