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.500.
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.
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 => 'D_PerlBin',
icon_id => 'I_CpanBat',
directory_id => 'D_App_Menu_Tools',
);
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, the id
is the ID of the shortcut itself, and the directory_id
is the ID for the directory that the shortcut is going to go into.
The name
, target
, working_dir
, and id
parameters are required. (description
defaults to being empty, directory_id
defaults to 'D_App_Menu', 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.