home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 4
/
AACD04.ISO
/
AACD
/
Programming
/
SGMLS
/
Install
< prev
next >
Wrap
Text File
|
1999-11-24
|
5KB
|
165 lines
;
; Installer script for sgmls
;
; Copyright © 1995,1999 Dipl.-Inform. Kai Hofmann
; All rights reserved!
; Released without any explicit or implicit warranty!
;
; EMail: hofmann@hofmann-int.de
; WWW : http://www.hofmann-int.de/
;
; $VER: Install 43.2 (24.11.99)
;
; -----------------------------------------------------------------------------
(set #welcome (cat "Welcome to the sgmls parser!\n\n"))
(set #iuquest ("What do you want to do with the %s parser?\n\n" @app-name))
(set #iuc1 "Install")
(set #iuc2 "Uninstall")
(set #use37 ("You must be using OS 2.04 or higher to install and use the %s parser" @app-name))
(set #exedestdir ("Where do you want to install the %s parser?" @app-name))
(set #docdestdir "To which directory should I copy the .doc files?")
(set #del1 "Deleting .info file - it is created by an installer bug!")
(set #remove ("Removing %s" @app-name))
(set #notfound "Sorry, could not found %s")
(set #endunin ("\nUninstalling %s finished, but if you have installed the docs, so please remove them by hand!" @app-name))
(set #delete-help "Delete a file")
(set #cplprompt "Copying %s to %s")
; --- GetCPU ------------------------------------------------------------------
(procedure P_GetCPU
; Param:
;
; Results:
; #cpu #cpu_str
; -1 = unknown; 0 = 68000; 1 = 68010; 2 = 68020; 3 = 68030; 4 = 68040;
; 5 = 68060
;
; Used Vars:
(set #cpu_str (database "cpu"))
(set #cpu 0)
(while (<> #cpu_str (select #cpu "68000" "68010" "68020" "68030" "68040" "68060" #cpu))
(set #cpu (+ #cpu 1))
)
(if (= #cpu 6)
(
(set #cpu -1)
(set #cpu_str -1)
)
)
)
; -----------------------------------------------------------------------------
(if (= 0 (askchoice (prompt #iuquest)
(choices #iuc1 #iuc2)
(default 0)
(help @askchoice-help)
)
)
(
; Install
(if (< (/ (getversion) 65536) 37)
(abort #use37)
)
(welcome #welcome)
(complete 0)
(set @default-dest "c:")
(set @default-dest (askdir (prompt #exedestdir)
(default @default-dest)
(help @askdir-help)
)
)
(copyfiles (prompt (#cplprompt @app-name @default-dest))
(source "c")
(choices "sgmlsasp" "rast")
(dest @default-dest)
(optional "askuser")
(help @copyfiles-help)
)
(P_GetCPU)
(if (= #cpu 1)
(
(set #cpu 0)
(set #cpu_str "68000")
)
(if (= #cpu 3)
(
(set #cpu 2)
(set #cpu_str "68020")
)
(if (= #cpu -1)
(
(set #cpu 0)
(set #cpu_str "68000")
)
)
)
)
(copyfiles (prompt (#cplprompt @app-name @default-dest))
(source (cat "c/sgmls" #cpu_str))
(dest @default-dest)
(all)
(optional "askuser")
(newname "sgmls")
(help @copyfiles-help)
)
(complete 50)
(set destination (askdir (prompt #docdestdir)
(default "SYS:")
(help @askdir-help)
)
)
(copyfiles (prompt (#cplprompt @app-name destination))
(source "docs/")
(dest destination)
(infos)
(all)
(optional "askuser")
(help @copyfiles-help)
)
(delete (tackon destination ".info")
(prompt #del1)
(optional "force")
(help #delete-help)
)
(complete 100)
)
;else
(
; Uninstall
(if (exists "c:sgmls" (noreq))
(delete "c:sgmls"
(prompt #remove)
(help #delete-help)
(optional "force")
)
(message (#notfound "sgmls"))
)
(complete 33)
(if (exists "c:sgmlsasp" (noreq))
(delete "c:sgmlsasp"
(prompt #remove)
(help #delete-help)
(optional "force")
)
(message (#notfound "sgmlsasp"))
)
(complete 66)
(if (exists "c:rast" (noreq))
(delete "c:rast"
(prompt #remove)
(help #delete-help)
(optional "force")
)
(message (#notfound "rast"))
)
(complete 100)
(message #endunin)
(exit (quiet))
)
)