NAME

Tk::Wizard::Installer - building-blocks for a software install wizard

DESCRIPTION

This module comprises the first moves towards a Tk::Wizard extension to automate software installation, primarily for end-users, in the manner of Inno Setup, Install Sheild, etc.

DEPENDENCIES

Cwd
File::Path;
File::Copy;
File::Spec;
Tk::Wizard;
Tk::ProgressBar;
Tk::LabFrame;

DETAILS

All the methods and means of Tk::Wizard, plus those below:

METHOD addLicencePage

$wizard->addLicencePage ( -filepath => $path_to_licence_text )

Adds a page (Tk::Frame) that contains a scroll texxt box of a licence text file specifed in the -filepath argument. Presents the user with two options, accept and continue, or not accept and quit. The user cannot progress until the 'agree' option has been chosen. The choice is entered into the object field licence_agree, which you can test as the Next button is pressed, either using your own function or with the Wizard's callback_licence_agreement function.

You could supply the GNU Artistic Licence....

See "CALLBACK callback_licence_agreement" and "METHOD page_licence_agreement".

METHOD addDirSelectPage

$wizard->addDirSelectPage ( -variable => \$chosen_dir )

Adds a page (Tk::Frame) that contains a scrollable texxt box of all directories including, on Win32, logical drives.

Supply in -variable a reference to a variable to set the initial directory, and to have set with the chosen path.

Supply -nowarnings to list only drives which are accessible, thus avoiding Tk::DirTree warnings on Win32 where removable drives have no media.

You may also specify the -title, -subtitle and -text paramters, as in "METHOD blank_frame".

See "CALLBACK callback_dirSelect".

CALLBACK callback_licence_agreement

Intended to be used with an action-event handler like -preNextButtonAction, this routine check that the object field licence_agree is a Boolean true value. If that operand is not set, it warns the user to read the licence; if that operand is set to a Boolean false value, a message box says goodbye and quits the program.

METHOD addFileListPage

$wizard->addFileListPage ( name1=>value1 ... nameN=>valueN )

Arguments:

-title
-subtitle
-text

As blank_frame.

-copy
-move

Setting one or the other will determine whether files are copied (without deletion of originals) or moved (with deletion of originals). The default action is the former.

-from

Rerence to an array of locations to copy/move from

-to

Rerence to an array of locations to move/copy to

-delay

Delay (in mS) before copying begins (see Tk::After). Default is 1000.

-continue

Display the next Wizard page once the job is done: invokes the callback of the Next button at the end of the task.

-bar

A list of properties to pass to the Tk::ProgessBar object created and used in this routine. Assumes reasonable defaults.

-label_frame_title

Text for the label frame (Tk::LabFrame object> which contains our moving parts. Defaults to Copying Files.

-label_preparing

Text for label displayed whilst counting files to be copied. Defaults to Preparing....

-label_from

The text of the label prepended to the name of the directory being copied. Defaults to From:.

-label_file

The text of the labe prepended to the name of the file being copied. Defaults to Copying:.

INTERNATIONALISATION

The labels of the licence can be changed (perhaps into a language other an English) by changing the values of the package-global %LABELS hash, at the top of the source. This will be revised in a future version.

Please see other functions' arguemnts for label-changing paramters.

CAVEATS / TODO / BUGS

  • It would be nice to have an 'Estimated Time Remaining' feature for the copy routines.

  • How about a remove-before-copy feature, and removing of directories? When there is time, yes.

SEE ALSO

Tk::LabFrame; File::Path; Tk::ProgressBar; File::Spec; File::Copy; Tk; Tk::Wizard; Tk::Wizard::Install::Win32.

AUTHOR

Lee Goddard (lgoddard @ cpan.org).

KEYWORDS

Wizard; set-up; setup; installer; uninstaller; install; uninstall; Tk; GUI.

COPYRIGHT

Copyright (C) Lee Goddard, 11/2002 ff.

Available under the same terms as Perl itself; no warranty of any kind.

1;

1 POD Error

The following errors were encountered while parsing the POD:

Around line 456:

You forgot a '=back' before '=head1'