Perl::Dist::WiX::Fragment::StartMenu - A <Fragment> tag that handles the Start menu.
This document describes Perl::Dist::WiX::Fragment::StartMenu version 1.200_101.
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', );
This object represents a Start Menu directory, and creates the tags required so that the Start Menu is created when the .msi is installed.
This class inherits from WiX3::XML::Fragment and shares its API.
The new constructor takes a series of parameters, validates then and returns a new Perl::Dist::WiX::Fragment::StartMenu object.
new
Perl::Dist::WiX::Fragment::StartMenu
It inherits all the parameters described in the WiX3::XML::Fragment->new() method documentation.
If the id parameter is omitted, it defaults to 'StartMenuIcons'.
id
'StartMenuIcons'
The icons parameter is a Perl::Dist::WiX::IconArray object containing the icons that have already been used.
icons
New icons created for this fragment are added to this IconArray object.
Returns the icons parameter that was passed in to new.
This object may have been changed since it was passed in.
$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.
name
description
target
working_dir
icon_id
directory_id
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.)
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.
Curtis Jewell <csjewell@cpan.org>
Perl::Dist::WiX
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.
To install Perl::Dist::WiX, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Perl::Dist::WiX
CPAN shell
perl -MCPAN -e shell install Perl::Dist::WiX
For more information on module installation, please visit the detailed CPAN module installation guide.