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

NAME

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

VERSION

This document describes Perl::Dist::WiX::Installer version 0.190.

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->output_dir; 

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

  • output_dir

    The location where the distribution files (*.msi, *.zip) will be written.

  • source_dir

    See the image_dir accessor in Perl::Dist::WiX.

  • fragment_dir

    The location where this object will write the information for WiX to process to create the MSI. A default is provided if this is not specified.

  • directories

    Returns the Perl::Dist::WiX::DirectoryTree object associated with this distribution. Created by "new"

  • fragments

    Returns a hashref containing the objects subclassed from Perl::Dist::WiX::Base::Fragment associated with this distribution. Created as the distribution's "run" routine progresses.

  • msi_feature_tree

    Returns the parameter of the same name passed in from "new". Unused as of yet.

  • msi_product_icon_id

    Specifies the Id for the icon that is used in Add/Remove Programs for this MSI file.

  • feature_tree_obj

    Returns the Perl::Dist::WiX::FeatureTree object associated with this distribution.

  • msi_product_icon_id

    Returns the product icon to use in the main template.

  • app_ver_name

    Returns the application name with the version appended to it.

  • output_base_filename

    Returns the base filename that is used to create distributions.

  • output_date_string

    Returns a stringified date in YYYYMMDD format for the use of other routines.

  • msi_ui_type

    Returns the UI type that the MSI needs to use.

  • msi_product_id

    Returns the Id for the MSI's <Product> tag.

    See http://wix.sourceforge.net/manual-wix3/wix_xsd_product.htm?

  • msi_upgrade_code

    Returns the Id for the MSI's <Upgrade> tag.

    See http://wix.sourceforge.net/manual-wix3/wix_xsd_upgrade.htm

  • msi_perl_version

    Returns the Version attribute for the MSI's <Product> tag.

    See http://wix.sourceforge.net/manual-wix3/wix_xsd_product.htm

  • perl_config_myuname

    Returns the value to be used for perl -V:myuname, which is in this pattern:

            Win32 app_id 5.10.0.1.beta_1 #1 Mon Jun 15 23:11:00 2009 i386
            

    (the .betaX is ommitted if the beta_number accessor is not set.)

  • get_component_array

    Returns the array of <Component Id>'s required.

    See http://wix.sourceforge.net/manual-wix3/wix_xsd_component.htm, http://wix.sourceforge.net/manual-wix3/wix_xsd_componentref.htm

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;

DIAGNOSTICS

See Perl::Dist::WiX's <DIAGNOSTICS section|Perl::Dist::WiX/DIAGNOSTICS> for details, as all diagnostics from this module are listed there.

SUPPORT

Bugs should be reported via:

1) The CPAN bug tracker at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Perl-Dist-WiX if you have an account there.

2) Email to mailto:bug-Perl-Dist-WiX@rt.cpan.org if you do not.

For other issues, contact the topmost author.

AUTHORS

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.