The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Perl::Dist::WiX::Mixin::Support - Provides support routines for building a Win32 perl distribution.

VERSION

This document describes Perl::Dist::WiX::Mixin::Support version 1.500002.

SYNOPSIS

        # This module is not to be used independently.
        # It provides methods to be called on a Perl::Dist::WiX object.
  

DESCRIPTION

This module provides support methods for copying, extracting, and executing files, directories, and programs for Perl::Dist::WiX.

METHODS

dir

        my $dir = $dist->dir(qw(perl bin));

Returns the subdirectory of the image directory with these components in order.

file

        my $file = $dist->file(qw(perl bin perl.exe));

Returns the filename contained in the image directory with these components in order.

mirror_url

        my $file = $dist->mirror_url(
                'http://www.strawberryperl.com/strawberry-perl.zip',
                'C:\strawberry\',
        );
        

Downloads a file from the url in the first parameter to the directory in the second parameter.

Returns where the file was downloaded, including filename.

copy_file

        # Copy a file to a directory.
        $dist->copy_file(
                'C:\strawberry\perl\bin\perl.exe',
                'C:\strawberry\perl\lib\'
        );

        # Copy a file to a file.
        $dist->copy_file(
                'C:\strawberry\perl\bin\perl.exe',
                'C:\strawberry\perl\lib\perl.exe'
        );
        
        # Copy a directory to a directory.
        $dist->copy_file(
                'C:\strawberry\license\',
                'C:\strawberry\text\'
        );
        

Copies a file or directory into a directory, or a file to another file.

If you are copying a file, the destination file already exists, and the destination file is not writable, the destination is temporarily set to be writable, the copy is performed, and the destination is set to read-only.

move_file

        # Move a file into a directory.
        $dist->move_file(
                'C:\strawberry\perl\bin\perl.exe',
                'C:\strawberry\perl\lib\'
        );

        # Move a file to a file.
        $dist->move_file(
                'C:\strawberry\perl\bin\perl.exe',
                'C:\strawberry\perl\lib\perl.exe'
        );
        
        # Move a directory to a directory.
        $dist->move_file(
                'C:\strawberry\license\',
                'C:\strawberry\text\'
        );

Moves a file or directory into a directory, or a file to another file.

push_dir

        my $dir = $dist->push_dir($dist->image_dir(), qw(perl bin));

Changes the current directory to the location specified by the components passed in.

When the object that is returned (a File::pushd object) is destroyed, the current directory is changed back to the previous value.

execute_build

        $dist->execute_build('install');

Executes a Module::Build script with the options given (which can be empty).

execute_make

        $dist->execute_make('install');

Executes a ExtUtils::MakeMaker-generated makefile with the options given (which can be empty) using the dmake being installed.

execute_perl

        $self->execute_perl('Build.PL', 'INSTALLDIR=vendor');

Executes a perl script (given in the first parameter) with the options given using the perl being installed.

execute_any

        $self->execute_any('dmake');
        

Executes a program, saving the STDOUT and STDERR in the files specified by debug_stdout() and debug_stderr().

extract_archive

        $dist->extract_archive($archive, $to);

Extracts an archive file (set in the first parameter) to a specified directory (set in the second parameter).

The archive file must be a .tar.gz, .tar.bz2, .tar.xz, or .zip file.

make_path

        $dist->make_path('perl\bin');

Creates a path if it does not already exist.

The path passed in is converted to an absolute path using File::Spec::Functions::rel2abs() before creation occurs.

remake_path

        $dist->remake_path('perl\bin');

Creates a path, removing all the files in it if the path already exists.

The path passed in is converted to an absolute path using File::Spec::Functions::rel2abs() before creation occurs.

remove_path

        $dist->remove_path('perl\bin');

Removes a path, removing all the files in it if the path already exists.

The path passed in is converted to an absolute path using File::Spec::Functions::rel2abs() before deletion occurs.

make_relocation_file

        $dist->make_relocation_file('strawberry_merge_module.reloc.txt');
        
        $dist->make_relocation_file('strawberry_ui.reloc.txt', 
                'strawberry_merge_module.reloc.txt');
        

Creates a file to be input to relocation.pl.

The first file is created, and it includes all files in the .source file that actually exist, and adds all .packlist files that are not already being processed for relocation in files after the first.

If there is no second parameter, the first file will include all .packlist files existing to that point.

SUPPORT

Bugs should be reported via the CPAN bug tracker at

http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Perl-Dist-WiX

For other issues, contact the author.

AUTHOR

Curtis Jewell <csjewell@cpan.org>

Adam Kennedy <adamk@cpan.org>

SEE ALSO

Perl::Dist::WiX,

COPYRIGHT AND LICENSE

Copyright 2009 - 2011 Curtis Jewell.

Copyright 2007 - 2009 Adam Kennedy.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this distribution.