#!perl # # Install script for ToolTipPlugin # # Copyright (C) 2004-2007 Foswiki Contributors. All Rights Reserved. # Foswiki Contributors are listed in the AUTHORS file in the root of # this distribution. NOTE: Please extend that file, not this notice. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. For # more details read LICENSE in the root of this distribution. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # As per the GPL, removal of this notice is prohibited. # # Author: Crawford Currie http://c-dot.co.uk # # NOTE TO THE DEVELOPER: THIS FILE IS GENERATED AUTOMATICALLY # BY THE BUILD PROCESS DO NOT EDIT IT - IT WILL BE OVERWRITTEN # use strict; use warnings; require 5.008; use File::Spec; use Cwd; =pod ---+ ToolTipPlugin_installer This is the installer script. The basic function of this script is to locate an archive and unpack it. It will also check the dependencies listed in DEPENDENCIES and assist the user in installing any that are missing. The script also automatically maintains the revision histories of any files that are being installed by the package but already have ,v files on disc (indicating that they are revision controlled). The script also functions as an *uninstaller* by passing the parameter =uninstall= on the command-line. Note that uninstallation does *not* revert the history of any topic changed during the installation. The script allows the definition of PREINSTALL and POSTINSTALL scripts. These scripts can be used for example to modify the configuration during installation, using the functions described below. Refer to the documentation of =configure= =cut # This is all done in package Foswiki so that reading LocalSite.cfg and Foswiki.cfg # will put the config vars into the right namespace. package Foswiki; # The root of package URLs my $PACKAGES_URL = 'http://foswiki.org/pub/Extensions'; # Extract MANIFEST and DEPENDENCIES from the __DATA__ undef $/; my @DATA = split( /<<<< (.*?) >>>>\s*\n/, ); shift @DATA; # remove empty first element # Establish where we are my @path = ( 'tools', 'extender.pl' ); my $wd = Cwd::cwd(); $wd =~ /^(.*)$/; # untaint unshift( @path, $1 ) if $1; my $script = File::Spec->catfile(@path); unless ( do $script ) { my $message = <; close(F); $data =~ /^(.*)$/s; # untaint eval $1; if ($@) { $message .= "Error when trying to eval the file content: $@\n"; } else { print STDERR "'do $script failed, but install was able to proceed: $message"; undef $message; } } else { $message .= "Could not open file using open() either: $!\n"; } die $message if $message; } sub preuninstall { # # No PREUNINSTALL script; } sub postuninstall { # # No POSTUNINSTALL script; } sub preinstall { # # No PREINSTALL script; } sub postinstall { # # No POSTINSTALL script; } Foswiki::Extender::install( $PACKAGES_URL, 'ToolTipPlugin', 'ToolTipPlugin', @DATA ); 1; # MANIFEST and DEPENDENCIES are done this way # to make it easy to extract them from this script. __DATA__ <<<< MANIFEST >>>> data/System/ToolTipPlugin.txt,0644,Plugin topic lib/Foswiki/Plugins/ToolTipPlugin.pm,0755,Plugin Module pub/System/ToolTipPlugin/ToolTipBackground.jpg,0644,Background image for example tips pub/System/ToolTipPlugin/ToolTipPhoto.gif,0644,Image included in example tips pub/System/ToolTipPlugin/balloon/b.gif,0644,Balloon - bottom edge pub/System/ToolTipPlugin/balloon/background.gif,0644,Balloon background pub/System/ToolTipPlugin/balloon/l.gif,0644,Balloon - left edge pub/System/ToolTipPlugin/balloon/lb.gif,0644,Balloon - left bottom corner pub/System/ToolTipPlugin/balloon/lt.gif,0644,Balloon - left top corner pub/System/ToolTipPlugin/balloon/r.gif,0644,Balloon - right edge pub/System/ToolTipPlugin/balloon/rb.gif,0644,Balloon - right bottom corner pub/System/ToolTipPlugin/balloon/rt.gif,0644,Balloon - right top corner pub/System/ToolTipPlugin/balloon/stemb.gif,0644,Balloon - Stem bottom pub/System/ToolTipPlugin/balloon/stemt.gif,0644,Ballon - Stem top pub/System/ToolTipPlugin/balloon/t.gif,0644,Balloon - top edge pub/System/ToolTipPlugin/balloon_simple/b.gif,0644,Simple balloon - bottom edge pub/System/ToolTipPlugin/balloon_simple/background.gif,0644,Simple balloon - background pub/System/ToolTipPlugin/balloon_simple/l.gif,0644,Simple balloon - left edge pub/System/ToolTipPlugin/balloon_simple/lb.gif,0644,Simple balloon - left bottom corner pub/System/ToolTipPlugin/balloon_simple/lt.gif,0644,Simple balloon -left top corner pub/System/ToolTipPlugin/balloon_simple/r.gif,0644,Simple balloon - right edge pub/System/ToolTipPlugin/balloon_simple/rb.gif,0644,Simple balloon - right bottom corner pub/System/ToolTipPlugin/balloon_simple/rt.gif,0644,Simple balloon - right top corner pub/System/ToolTipPlugin/balloon_simple/stemb.gif,0644,Simple balloon - stem bottom pub/System/ToolTipPlugin/balloon_simple/stemt.gif,0644,Simple balloon - stem top pub/System/ToolTipPlugin/balloon_simple/t.gif,0644,Simple ballon - top edge pub/System/ToolTipPlugin/balloon_simple/tip_balloon_simple.png,0644, pub/System/ToolTipPlugin/example1.jpg,0644,Sample tip pub/System/ToolTipPlugin/example2.jpg,0644,Sample tip pub/System/ToolTipPlugin/example3.jpg,0644,Sample tip pub/System/ToolTipPlugin/example4.jpg,0644,Sample tip pub/System/ToolTipPlugin/example5.jpg,0644,sample tip pub/System/ToolTipPlugin/tip_balloon.js,0644,Javascript for balloon tips pub/System/ToolTipPlugin/tip_centerwindow.js,0644,Javascript for centered tips pub/System/ToolTipPlugin/tip_followscroll.js,0644,Javascript for tip to float over scrolling page pub/System/ToolTipPlugin/wz_tooltip.js,0644,Main javascript <<<< DEPENDENCIES >>>>