NAME
Perl::Dist::WiX::Fragment::StartMenu - A <Fragment> tag that handles the Start menu.
VERSION
This document describes Perl::Dist::WiX::Fragment::StartMenu version 1.200.
SYNOPSIS
my $fragment = Perl::Dist::WiX::Fragment::StartMenu->new(
directory_id => 'D_App_Menu',
);
$fragment->add_shortcut(
name => 'CPAN',
description => 'CPAN Shell (used to install modules)',
target => "[D_PerlBin]cpan.bat",
id => 'CpanShell',
working_dir => PerlBin,
icon_id => 'I_CpanBat',
);
DESCRIPTION
This object represents a Start Menu directory, and creates the tags required so that the Start Menu is created when the .msi is installed.
METHODS
This class inherits from WiX3::XML::Fragment and shares its API.
new
The new
constructor takes a series of parameters, validates then and returns a new Perl::Dist::WiX::Fragment::StartMenu
object.
It inherits all the parameters described in the WiX3::XML::Fragment->new() method documentation.
If the id
parameter is omitted, it defaults to 'StartMenuIcons'
.
icons
The icons
parameter is a Perl::Dist::WiX::IconArray object containing the icons that have already been used.
New icons created for this fragment are added to this IconArray object.
directory_id
The required directory_id
parameter is a string containing the ID of the Perl::Dist::WiX::Tag::Directory object representing the directory that the Start Menu shortcuts that this object contains will be be created in.
get_directory_id
Returns the directory_id
parameter that was passed in to new.
get_icons
Returns the icons
parameter that was passed in to new.
This object may have been changed since it was passed in.
add_shortcut
$fragment->add_shortcut(
name => 'CPAN',
description => 'CPAN Shell (used to install modules)',
target => "[D_PerlBin]cpan.bat",
id => 'CpanShell',
working_dir => PerlBin,
icon_id => 'I_CpanBat',
);
This method creates the tag objects that represent a Start Menu shortcut, and attaches them to this fragment.
The name
and description
parameters are the name and the comment of the shortcut being created, the target
is the command to be executed, the working_dir
is the ID of the working directory of the shortcut, the icon_id
is the ID of the icon to be used with this shortcut, and the id
is the ID of the shortcut itself.
Unlike most methods in the Perl::Dist::WiX
distribution that take named parameters, this method does not take a hash reference at the present time.
The name
, target
, working_dir
, and id
parameters are required. (description
defaults to being empty, and a missing icon_id
allows Windows to follow its default rules for choosing an icon to display.)
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>
SEE ALSO
COPYRIGHT
Copyright 2009 - 2010 Curtis Jewell.
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.