The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Perl::Dist::WiX::Installer - WiX-specific routines.

DESCRIPTION

These are the routines that interact with the Windows Installer XML package, generate .wxs files, or are otherwise WiX specific.

METHODS

Many public methods are listed in Perl::Dist::WiX, since this is a superclass of that class.

Accessors

    $id = $dist->bin_candle; 

Accessors will return a portion of the internal state of the object.

compile_wxs($filename, $wixobj)

Compiles a .wxs file (specified by $filename) into a .wixobj file (specified by $wixobj.) Both parameters are required.

    $self = $self->compile_wxs("Perl.wxs", "Perl.wixobj");

write_msi

  $self->write_msi;

The write_msi method is used to generate the compiled installer executable. It creates the entire installation file tree, and then executes WiX to create the final executable.

This method should only be called after all installation phases have been completed and all of the files for the distribution are in place.

The executable file is written to the output directory, and the location of the file is printed to STDOUT.

Returns true or throws an exception or error.

add_env($name, $value [, $append])

Adds the contents of $value to the environment variable $name (or appends to it, if $append is true) upon installation (by adding it to the Reg_Environment fragment.)

$name and $value are required.

add_file({source => $filename, fragment => $fragment_name})

Adds the file $filename to the fragment named by $fragment_name.

Both parameters are required, and the file and fragment must both exist.

insert_fragment($id, $files_ref)

Adds the list of files $files_ref to the fragment named by $id.

The fragment is created by this routine, so this can only be done once.

This MUST be done for each set of files to be installed in an MSI.

add_to_fragment($id, $files_ref)

Adds the list of files $files_ref to the fragment named by $id.

The fragment must already exist.

as_string

Loads the main .wxs file template, using this object, and returns it as a string.

    $wxs = $self->as_string;

SUPPORT

No support of any kind is provided for this module.

AUTHOR

Curtis Jewell <csjewell@cpan.org>

Adam Kennedy <adamk@cpan.org>

SEE ALSO

Perl::Dist, Perl::Dist::Inno::Script, http://ali.as/

COPYRIGHT

Copyright 2009 Curtis Jewell.

Copyright 2008-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 module.