home *** CD-ROM | disk | FTP | other *** search
- ; Install_Examples - RayStorm examples installation script for Installer
- ;
- ; Copyright © 1995 Andreas Heumann
- ;
- ; $Id: Install_Examples,v 1.2 1996/24/01
- ;
- ; Installer and Installer project icon
- ; (c) Copyright 1991-93 Commodore-Amiga, Inc. All Rights Reserved.
- ; Reproduced and distributed under license from Commodore.
- ;
- ; INSTALLER SOFTWARE IS PROVIDED "AS-IS" AND SUBJECT TO CHANGE;
- ; NO WARRANTIES ARE MADE. ALL USE IS AT YOUR OWN RISK. NO LIABILITY
- ; OR RESPONSIBILITY IS ASSUMED.
- ;
- ;
- (welcome " Welcome to the " @app-name " examples installation.\n")
-
- ; What we are?
- (set app-name (cat @app-name " examples"))
-
- ; These directories are always present
- (set dir-pat "(anims|arexx|brushes|examples|objects)")
-
- ; The source directory name
- (set source-dir
- (if (= 1 (exists @icon))
- (pathonly (expandpath @icon))
- (expandpath @icon)
- )
- )
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- (procedure select-destination-directory
- ;; Select destination directory for the installation. We suggest the user
- ;; to install to the place from where the installer was started. This is
- ;; since normally this software will be unarchived to its proper location
- ;; and the files don't have to be copied any more.
- ;;
- (transcript "Selecting destination directory for the installation.")
- (while
- (
- (set @default-dest
- (askdir
- (prompt "Select directory where " app-name " is installed.\n")
- (help " Here you can specify location where to install "
- "the " app-name ".\n"
- " Installation can be made on-place. "
- "This is recommended if you have already unarchived "
- "the " app-name " archive to its final location. "
- "In this case "
- "most of the files are left where they are. "
- "Only necessary files are copied to different "
- "positions.\n"
- )
- (newpath)
- (default source-dir)
- )
- )
- (if (= 2 (exists @default-dest))
- 0
- (makedir @default-dest
- (infos)
- )
- )
- )
- )
- )
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- (procedure
- copy-files-to-destination ;;; Copy all files if not installing on-place
- ;;
- (if (= source-dir (expandpath @default-dest))
- (message "\nSource and destination directories are the same, "
- "not copying."
- (help " The " app-name " files don't have to be copied, "
- "since the source and the destination directories are "
- "the same."
- )
- )
- ((transcript "Copying " app-name " files from " source-dir " to "
- @default-dest "."
- )
- (foreach source-dir dir-pat
- (
- (set dest-dir (tackon @default-dest @each-name))
- (if (NOT (exists dest-dir))
- (makedir dest-dir)
- )
- (copyfiles (all)
- (source (expandpath @each-name))
- (dest dest-dir)
- (prompt "Copying files to the selected location.")
- (optional "askuser")
- )
- )
- )
- )
- )
- )
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;;
- ;;; Installatation sequence
- ;;;
- (message "Please remember during this installation:\n\n"
- " Read the instructions provided behind the \"Help\" "
- "buttons, if you are not absolutely sure what you are doing.\n"
- )
-
- (complete 00)
- (transcript "On making " app-name ".")
- (select-destination-directory)
- (complete 10)
- (copy-files-to-destination)
- (complete 80)
- (copyfiles (source source-dir)
- (dest @default-dest)
- (prompt "Copying files to the selected location.")
- (choices "anims.info" "Readme" "Readme.info")
- (files)
- (infos)
- (optional "askuser")
- )
- (complete 100)
-
- ;;; All done!
-
- ; EOF
-
-