home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 9
/
FreshFishVol9-CD2.bin
/
bbs
/
util
/
polyed-1.242.lha
/
PolyEd
/
Install
< prev
next >
Wrap
Text File
|
1994-10-04
|
7KB
|
334 lines
; $VER: Install 1.0
; Script to install PolyEd
(complete 0)
;=============================================================================
; strings
(set #bad-kick
(cat "You must be using Kickstart 2.0 or higher to install PolyEd."
))
(set #introduction
(cat "\n\nThis program lets you install PolyEd on a hard drive."
))
(set #which-language
(cat "\nWhich languages should be installed?"
))
(set #which-iconset
(cat "\nWhich icon set should be installed?"
))
(set #which-language-help
(cat "\nThe Amiga can be operated in many different "
"languages. "
"To reduce the amount of space consumed by the "
"language files, you can select only the "
"files of specific languages to be copied.\n\n"
"Check the boxes of the languages you wish "
"to have available on your system.\n\n"
@askoptions-help
))
(set #which-iconset-help
(cat "\nThis package provides two sets of icons, one for standard workbench and "
"one for the 'MagicWB'. Select the set you want to use.\n"
@askchoice-help
))
(set #startup-help
(cat "\nAn assign to the PolyEd drawer called PED: "
"and the inclusion of that assign to the "
"paths where AmigaOS looks for programs is "
"being added to the user-startup"
))
;=============================================================================
; make sure we are running under V37+
(set osversion (/ (getversion) 65536))
(if (< osversion 37)
(
(abort #bad-kick)
))
;=============================================================================
; say hi!
;(set old_level @user-level) ; remember user-level
;(user 2) ; for message is shown
;(message #introduction) ; show intro message
;(user old_level) ; revert to original user-level
;(welcome)
;=============================================================================
; get target
(set old_level @user-level) ; remember user-level
(user 2)
(set target (askdir (prompt "Where do you want the PolyEd drawer to be placed in?")
(help @askdir-help)
(default "SYS:Tools")
)
)
(user old_level)
(set @default-dest target)
;=============================================================================
; which languages should be installed?
(user 2)
(set lang (askoptions (prompt #which-language)
(help #which-language-help)
(choices
; "Dansk"
"Deutsch"
"English"
; "Español"
; "Français"
; "Italiano"
; "Nederlands"
; "Norsk"
; "Português"
; "Svenska"
)
(default -1)
)
)
(user old_level)
;=============================================================================
; which icon set should be installed (Standard or MagicWB)
(set iconset (askchoice (prompt #which-iconset)
(help #which-iconset-help)
(choices "Standard" "MagicWB")
)
)
;=============================================================================
; Copy required libraries for V37
(if (= osversion 37)
(
(copylib
(help #v37needslibs)
(source "Libs/reqtools.library")
(dest "LIBS:")
)
(copylib
(help #v37needslibs)
(source "Libs/amigaguide.library")
(dest "LIBS:")
)
))
(complete 10)
;=============================================================================
; make some drawers
(set supertarget target)
(set target (tackon target "PolyEd"))
(makedir target (infos) (prompt "Creating some drawers..."))
(makedir (tackon target "Doc"))
;=============================================================================
; copy main-program
(copyfiles (prompt "")
(help @copyfiles-help)
(source "ped")
(dest target)
)
(complete 40)
(copyfiles (prompt "")
(help @copyfiles-help)
(source "Read.Me")
(dest target)
)
(complete 45)
;=============================================================================
; copy catalogs and documentation
(copyfiles (optional nofail)
(source "Doc")
(dest (tackon target "Doc"))
(pattern "arexx.#?")
)
(set n 0)
(while (set language (select n
; "Dansk"
"Deutsch"
"English"
; "Español"
; "Français"
; "Italiano"
; "Nederlands"
; "Norsk"
; "Português"
; "Svenska"
""
)
)
(
(if (IN lang n)
(
(if (<> 1 n) ; FIXME: Wenn Dansk verfügbar, 1 auf 2 ändern (entspricht englisch, das als Default keinen Catalog hat!)
(
(makedir (tackon target "Catalogs"))
(set catalog-dir (tackon target (cat "Catalogs/" language )))
(makedir catalog-dir)
(copyfiles
(optional nofail)
(source (cat "Catalogs/" language "/polyed.catalog"))
(dest catalog-dir)
)
))
(set #from (cat "Doc/" language ".guide"))
(if (exists #from)
(copyfiles
(optional nofail)
(source #from)
(dest (tackon target "Doc"))
)
)
))
(set n (+ n 1))
))
(complete 50)
;=============================================================================
; copy Macros and ARexx
(copyfiles
(source "Macros")
(dest (tackon target "Macros"))
(optional nofail)
(pattern "~#?.info")
)
(complete 60)
(copyfiles
(source "Rexx")
(dest (tackon target "Rexx"))
(optional nofail)
(pattern "~#?.info")
)
(complete 70)
;=============================================================================
; copy Icons
(if (= iconset 0)
(set iconsource "Icons/Standard")
(set iconsource "Icons/MagicWB")
)
; PolyEd Drawer
(copyfiles (source (cat iconsource ".info"))
(dest supertarget)
(newname "PolyEd.info")
(infos)
)
; Main Program and Subdrawers
(set n 0)
(while (set from (select n "PEd.info" "Read.Me.info" "Doc.info" "Macros.info" "Rexx.info" ""))
(copyfiles (source (tackon iconsource from))
(dest target)
(infos)
)
(set n (+ n 1))
)
(set iconsource (tackon iconsource "Def_Icons"))
; Docs
(set destdir (tackon target "Doc"))
(foreach destdir "#?.guide"
(
(copyfiles (source (tackon iconsource "def_guide.info"))
(dest destdir)
(newname (cat @each-name ".info"))
(infos)
)
))
(foreach destdir "#?.doc"
(
(copyfiles (source (tackon iconsource "def_doc.info"))
(dest destdir)
(newname (cat @each-name ".info"))
(infos)
)
))
; Rexx
(set destdir (tackon target "Rexx"))
(foreach destdir "#?.rexx"
(
(copyfiles (source (tackon iconsource "def_rexx.info"))
(dest destdir)
(newname (cat @each-name ".info"))
(infos)
)
))
; Macros
(set destdir (tackon target "Macros"))
(foreach destdir "#?.ped"
(
(copyfiles (source (tackon iconsource "def_ped.info"))
(dest destdir)
(newname (cat @each-name ".info"))
(infos)
)
))
; Default Icons
(copyfiles
(source iconsource)
(dest "ENVARC:SYS")
(all)
(optional nofail)
(infos)
)
(copyfiles
(source iconsource)
(dest "ENV:SYS")
(all)
(optional nofail)
(infos)
)
(complete 90)
;=============================================================================
; Make user-startup entries
(startup "PolyEd"
(prompt "Some instructions need to be added to the \"S:user-startup\" so that your system will be properly configured to use PolyEd.")
(help #startup-help)
(command (cat "assign >NIL: PED: " target "\n"))
(command "path >NIL: PED: add")
)
(complete 100)