Perl-Dist-WiX

changeset 1049:f83a0e5324b3

Make sure files loaded from a .msm are counted as being in a .msi.
author Curtis Jewell <perl@curtisjewell.name>
date Thu Jun 09 20:23:22 2011 -0600 (2011-06-09)
parents 7af86c340b19
children 37fa0958b228
files lib/Perl/Dist/WiX.pm
line diff
     1.1 --- a/lib/Perl/Dist/WiX.pm	Mon Jun 06 23:51:31 2011 -0600
     1.2 +++ b/lib/Perl/Dist/WiX.pm	Thu Jun 09 20:23:22 2011 -0600
     1.3 @@ -2234,6 +2234,15 @@
     1.4  	default  => sub { File::List::Object->new() },
     1.5  );
     1.6  
     1.7 +
     1.8 +has '_msm_files_object' => (
     1.9 +	is       => 'ro',
    1.10 +	isa      => 'File::List::Object',
    1.11 +	init_arg => undef,
    1.12 +	lazy     => 1,
    1.13 +	default  => sub { File::List::Object->new() },
    1.14 +);
    1.15 +
    1.16  # This comes from MooseX::Object::Pluggable, and sets up the
    1.17  # fact that Perl::Dist::WiX::BuildPerl::* is where plugins happen to be.
    1.18  has '+_plugin_ns' => ( default => 'BuildPerl', );
    1.19 @@ -2597,7 +2606,7 @@
    1.20  
    1.21  	# Download and extract the image.
    1.22  	my $tgz = $self->mirror_url( $self->msm_zip(), $self->download_dir() );
    1.23 -	$self->extract_archive( $tgz, $self->image_dir() );
    1.24 +	my @files_extracted = $self->extract_archive( $tgz, $self->image_dir() );
    1.25  	
    1.26  	# Start adding the fragments that are only for an .msi.
    1.27  	$self->_add_fragment( 'StartMenuIcons',
    1.28 @@ -2639,7 +2648,6 @@
    1.29  
    1.30  	# Do the relocation.
    1.31  	$self->execute_perl( $self->file(qw(relocation.pl.bat)));
    1.32 -
    1.33  	
    1.34  	# Do the same for the environment variables
    1.35  	$self->add_path( 'c',    'bin' );
    1.36 @@ -2660,6 +2668,8 @@
    1.37  			$cpan_dir, );
    1.38  	}
    1.39  
    1.40 +	$self->_msm_files_object()->add_files(@files_extracted);
    1.41 +	
    1.42  	return 1;
    1.43  } ## end sub initialize_using_msm
    1.44  
    1.45 @@ -3114,6 +3124,7 @@
    1.46  	}
    1.47  	my @files_in_imagedir = grep {m/\A\Q$image_dir\E/msx} @files;
    1.48  	$files_msi->load_array(@files_in_imagedir);
    1.49 +	$files_msi->add($self->_msm_files_object());
    1.50  	if ( -e $perllocal ) {
    1.51  		$files_msi->add_file($perllocal);
    1.52  	}