NAME
Tk::Wizard::Installer::Win32 - Win32-specific routines for Tk::Wizard::Installer
DESCRIPTION
All the methods and means of Tk::Wizard
and Tk::Wizard::Installer
, plus the below, which are thought to be specific to the Microsoft Windows platform.
If you are looking for a freeware software installer that is not dependant upon Perl, try Inno Setup - http://www.jrsoftware.org/
. It's so good, even Microsoft have been caught using it.
If you are looking for a means to update the Windows Path
variable, have a look for PathTool.exe, a tiny Windows 32-bit executable by Luke Bailey (luke@notts.flexeprint.com
). This tool can also be used to add new, persistant environment variables to the system.
DEPENDENCIES
Tk::Wizard
Tk::Wizard::Installer
Win32::TieRegistry
HLIST
Win32::OLE;
Windows Scripting Host (for want of a better idea)
METHODS
METHOD register_with_windows
Registers an application with Windows so that it can be "uninstalled" using the Control Panel's Add/Remove Programs dialogue.
An entry is created in the Windows' registry pointing to the uninstall script path. See UninstallString
, below.
Returns undef
on failure, 1
on success. Does nothing on non-MSWin32 platforms
Aguments are:
- uninstall_key_name
-
The name of the registery sub-key to be used. This is transparent to the end-user, but should be unique for all applications.
- UninstallString
-
The command-line to execute to uninstall the script.
According to Microsoft:
You must supply complete names for both the DisplayName and UninstallString values for your uninstall program to appear in the Add/Remove Programs utility. The path you supply to Uninstall-String must be the complete command line used to carry out your uninstall program. The command line you supply should carry out the uninstall program directly rather than from a batch file or subprocess.
The default value is:
perl -e '$args->{app_path} -u'
This default assumes you have set the argument
app_path
, and that it checks and reacts to the the command line switch-u
:package MyInstaller; use strict; use Tk::Wizard; if ($ARGV[0] =~ /^-*u$/i){ # ... Have been passed the uninstall switch: uninstall myself now ... } # ...
Or something like that.
- QuiteUninstallString
-
As
UninstallString
above, but for ... quiet uninstalls. - app_path
-
Please see the entry for
UninstallString
, above. - DisplayName
- DisplayVersion
- Size
-
The strings displayed in the application list of the Add/Remove dialogue.
- ModifyPath
- NoRepair NoModify NoRemove
- EstimatedSize InstallSorce InstallDate InstallLocation
- AthorizedCDFPrefix Language ProductID
-
Unknown
- Comments
- RegOwner
- RegCompnay
- Contact
- HelpTelephone
- Publisher
- URLUpdateInfo
- URLInfoAbout
- HelpLink
-
These are all displayed when the Support Information link is clicked in the Add/Remove Programs dialogue. The last should be full URIs.
The routine will also try to add any other paramters to the registry tree in the current location: YMMV.
METHOD addStartMenuPage
Returns a page (a filled Tk::Frame
object) that allows users to select a location on the Windows "Start Menu", perhaps to add a shortcut there.
This routine does not currently create the directory in the Start Menu, nor does it place a link there. Rather, the caller supplies a -variable
paramter that is a reference to a scalar which, once the page is 'run', will contain either the path to the user's chosen directory, or undef
if the option to not select was chosen.
In addition, when the page is 'run', it places the path to the current user's Start Menu/Programs directory into the object field startmenu_dir_current
, and the path to the common Start Menu/Programs in the object field startmenu_dir_common
.
The adding of a shortcut is left as an exercise to the reader until later this year, when I'll get around to finishing this. Have a look at the $mkdir
Button
in Tk::Wizard::page_dirSelect
.
- -user
-
Set to
current
,all
orboth
to list the "Start Menu" for all users, just the current user, or both. Default isboth
. If there exist entries in both the common and current user's Start Menu with the same name, the entry in the common menu takes precedence. - -variable
-
The directory the user has chosen to create an item in. Note this is not the full path: see above.
- -append
-
If this parameter evaluates to true, the name of the directory defined by
-variable
will be appended to any selection made by the user. - -disable_nochoice
-
Set to prevent the display of the checkbox which allows the user not to use this feature. See
-label_nochoice
, below. - -label_nochoice
-
If the paramter
-disable_nochoice
has not been set,-label_nochoice
should contains text to use for the label by the checkbox which disables choices on this page and causes the page to set the-variable
paramter toundef
. Default text isDo not create a shortcut on the Start Menu
- -listHeight
-
Height of the list box, default is
10
but you may vary this if your-text
attribute takes up more or less much room.
Accepts the Standard Options that are common to the HList
and Label
widgets, but does not accept aliases:
-relief -highlightthickness -background -borderwidth -cursor
-highlightcolor -foreground -font
You can supply the common Wizard page options:
-title -subtitle -text
CHANGES
Please see the file CHANGES.txt included with the distribution.
AUTHOR
Lee Goddard (lgoddard@cpan.org).
KEYWORDS
Wizard; set-up; setup; installer; uninstaller; install; uninstall; Tk; GUI; windows; win32; registry.
COPYRIGHT
Copyright (C) Lee Goddard, 11/2002 ff.
Distributed under the same terms as Perl itself.