home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD1.bin
/
useful
/
comm
/
tcp
/
amitcp
/
install_amitcp
< prev
next >
Wrap
Text File
|
1994-05-19
|
55KB
|
1,561 lines
;;;; Hey Emacs, this script might as well be -*- lisp -*-
;;;;
;;;; Install_AmiTCP - AmiTCP/IP installation script for Installer
;;;;
;;;; Copyright © 1993 AmiTCP/IP Group, <amitcp-group@hut.fi>
;;;;
;;;; $Id: Install_AmiTCP,v 3.6 1994/05/19 04:19:33 ppessi Exp $
;;;;
;;;; This script has been tested with Installer 1.24:
;;;;
;;;; 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.
;;;;
;;;; Use following Icon tooltypes / Command line options:
;;;; APPNAME=AmiTCP/IP
;;;; MINUSER=AVERAGE
;;;;
(welcome " Welcome to " @app-name " 3.0 beta installation.\n"
" We hope that after this installation your world of "
"communication will be much more broader than before.")
;;;;
;;;; What we are?
;;;;
(set app-name (cat @app-name " 3.0ß2"))
;;;;
;;;; "Needs"
;;;;
(set need-version 37 ; version of operating system need by AmiTCP/IP
need-memory (* 512 1024))
;;;
;;; Destination directories of the AmiTCP/IP
;;;
(set
atcp-name "AmiTCP"
atcp-assign (cat atcp-name ":") ; Assign to AmiTCP
;; Exported files
export-dir (tackon atcp-assign "export")
;; Configuration
conf-dir (tackon atcp-assign "db")
;; User binaries
bin-dir (tackon atcp-assign "bin")
;; documentation
doc-dir (tackon atcp-assign "doc")
;; devices directory
devs-dir (tackon atcp-assign "devs")
;; AmigaGuide documentation
help-dir (tackon atcp-assign "help")
;; DOS handlers
l-dir (tackon atcp-assign "l")
;; libraries
libs-dir (tackon atcp-assign "libs")
;; source
src-dir (tackon atcp-assign "src")
;; includes for net applications
include-dir (tackon atcp-assign "netinclude")
;; network link libraries
lib-dir (tackon atcp-assign "netlib")
;; daemons
serv-dir (tackon atcp-assign "serv")
;;
;; If you add directories above, then also add the name of the variable below.
;; This is to have "for i in a b c d ..." construct
;;
;; These directories are always present
dir-pat (cat "(" "devs" "|" "db" "|" "bin" "|" "doc" "|"
"help" "|" "l" "|" "libs" "|" "serv" ")")
;; Optional directories
dir-pat-opt (cat "(" "netinclude" "|" "netlib" "|" "src" ")")
;; The source directory name
source-dir (if (= 1 (exists @icon))
(pathonly (expandpath @icon))
(expandpath @icon))
;; Mounts
tcp-mount (cat
"Assign TCP: Exists > NIL:\n"
"IF Warn\n"
" Mount TCP: from AmiTCP:devs/Inet-Mountlist\n"
"EndIf\n")
)
;; How to get needed information?
(set
net-setup-help
" You can get this information from your network administration.\n")
;;; copy "more" to ram: to be able to use it
(set
pager-cmd (if (exists "ENV:PAGER" (noreq)) (getenv "PAGER"))
pager-cmd
(if pager-cmd pager-cmd
(if (exists "SYS:Utilities/More" (noreq))
((copyfiles
(prompt "Copying sys:utilities/more to ram: for use")
(source "SYS:Utilities/More")
(dest "RAM:")
(safe)
(optional "nofail"))
"RAM:More")
("more"))))
;; Return old AmiTCP: assign if we are aborting
(onerror
(if old-atcp-directory
(makeassign atcp-name old-atcp-directory)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(procedure
ask-ip-address
;; Procedure to ask an IP address
;;
;; arguments:
;; ::ask-ip-prompt - Prompt text
;; ::ask-ip-help - help text
;; ::ask-ip-need - empty result allowed if not true
;;
;; locally used names:
;; ::ask-ip-result
(set ::ask-ip-result "<none>")
(while
((set ::ask-ip-result
(askstring
(prompt ::ask-ip-prompt
(if (NOT ::ask-ip-need)
(cat "\nGive an empty string if you want to "
"by-pass this option."))
(if (NOT (= ::ask-ip-result "<none>"))
(cat "\n\nYou entered an invalid value\n\""
::ask-ip-result "\".\n"
"Enter a valid IP address.")))
(default (if (<> ::ask-ip-result "<none>") ::ask-ip-result ""))
(help net-setup-help
::ask-ip-help
"\n Internet address is a string of at most four "
"decimal numbers separated by dots. For example, "
"\"130.233.161.40\" is a valid internet address.\n"
" You will be asked again for the address, "
"if the address you entered is invalid.")))
;; loop while answer is unacceptable
(if ::ask-ip-result
(NOT (patmatch "# #(1|2|3|4|5|6|7|8|9|0).#(1|2|3|4|5|6|7|8|9|0|.)# "
::ask-ip-result))
::ask-ip-need)))
::ask-ip-result)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(procedure
check-system-version
;; is your Exec recent enough?
(set exec-version (/ (getversion) 65536))
(transcript "Running on exec version " exec-version ".")
(if (< exec-version need-version) ; check operating system version
((message @app-name " needs at least Exec version " need-version
" to run.\nYou have only version " exec-version ".\n"
"You can proceed with the installation, but consider "
"installing the " @app-name " with proper version of "
"the operating system."
(help
" The " @app-name " uses some system functions "
"that are not present or functional in earlier system "
"versions. Consider updating your system.\n"
" If you have a later version of operating system "
"and are only now using older version: be sure to use "
"only release 2.04 or newer with " @app-name ". "
"No damage happens if you run " @app-name " with an "
"earlier operating system, however. It just "
"refuses to start.\n"
" If you decide to continue, no changes will be made to "
"system startup files, so you must edit them yourself. "
"Refer instructions for manual installation."))
(transcript "User decided to continue installation while running "
"on operating system release earlier than 2.04."))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(procedure
check-available-memory
;;
(transcript "Checking available memory.")
(set avail-mem (+ (database "total-mem")))
(if (< avail-mem need-memory)
((message "Your system has only " (/ avail-mem 1024) " kilobytes of "
"free memory, while " @app-name " needs at least "
(/ need-memory 1024) " to be useful.\n"
"You can continue the installation but be warned!")
(transcript "User decided to continue installation while available "
"memory was below the recommended minimum."))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(procedure
check-user-level
;;
(transcript "Checking user level.")
(if (< @user-level 1)
((transcript "Installation aborted due to too low user level.")
(abort "AmiTCP/IP installation requires at least the \"average\" "
"user level. Restart installation and select appropriate user "
"level."))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(procedure
check-old-assign
;; If there is already the AmiTCP/IP installed, store the assign
;; to old-atcp-directory
(transcript "Checking for already installed AmiTCP.")
(if (exists atcp-assign (noreq))
(set old-atcp-directory (getassign atcp-name)))
(if old-atcp-directory
(transcript "Existing AmiTCP detected at directory "
old-atcp-directory ".")))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(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 to install " @app-name ".\n"
"Most of the files don't have to be copied, if you accept "
"the offered default.")
(help " Here you can spe