home *** CD-ROM | disk | FTP | other *** search
- ; $VER: Install 2.0 (12-3-1994)
- ; Script to install PolyEd
-
- (complete 0)
-
- ;=============================================================================
- ; strings
-
- (set #bad-kick
- (cat "You must be using Kickstart 2.0 or higher to install PolyEd."
- ))
-
- (set #which-language
- (cat "\nWhich languages 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 #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)
- ))
-
-
- ;=============================================================================
- ; 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)
-
- ;=============================================================================
- ; make some drawers
-
- (set supertarget target)
- (set target (tackon target "PolyEd"))
- (makedir target (infos) (prompt "Creating some drawers..."))
- (makedir (tackon target "Doc"))
- (makedir (tackon target "Icons"))
- (makedir (tackon target "Catalogs"))
-
- ;=============================================================================
- ; Copy required libraries for V37
-
- (if (= osversion 37)
- (
- (working "Installing libraries to Libs:")
- (copylib
- (help #v37needslibs)
- (source "reqtools.library")
- (dest "LIBS:")
- (nogauge)
- )
-
- (copylib
- (help #v37needslibs)
- (source "amigaguide.library")
- (dest "LIBS:")
- (nogauge)
- )
- ))
-
- (complete 10)
-
- ;=============================================================================
- ; copy main-program
-
- (copyfiles (prompt "")
- (help @copyfiles-help)
- (source "ped")
- (infos)
- (dest target)
- )
-
- (copyfiles (prompt "")
- (help @copyfiles-help)
- (source "ReadMe")
- (infos)
- (optional nofail)
- (dest target)
- (nogauge)
- )
-
- (complete 50)
-
- ;=============================================================================
- ; copy documentation and catalogs
- (working "Installing Documentation and Catalogs")
-
- ; Copy arexx documentation (only english)
- (copyfiles (optional nofail)
- (source "Doc")
- (dest (tackon target "Doc"))
- (pattern "arexx.#?")
- (infos)
- (nogauge)
- )
-
- (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!)
- (
- (set catalog-dir (tackon (tackon target "Catalogs") language ))
- (makedir catalog-dir)
- (copyfiles
- (optional nofail)
- (source (cat "Catalogs/" language "/polyed.catalog"))
- (dest catalog-dir)
- (nogauge)
- )
- ))
- (set #from (cat "Doc/" language ".guide"))
- (if (exists #from)
- (copyfiles
- (optional nofail)
- (source #from)
- (dest (tackon target "Doc"))
- (infos)
- (nogauge)
- )
- )
- ))
- (set n (+ n 1))
- ))
-
- (complete 70)
-
- ;=============================================================================
- ; copy Macros
-
- (working "Installing ARexx Macros")
-
- (copyfiles
- (source "Macros")
- (dest (tackon target "Macros"))
- (optional nofail)
- (all)
- (infos)
- (nogauge)
- )
-
- (complete 80)
-
- ;=============================================================================
- ; copy Icons
-
- (working "Installing Icons")
-
- (copyfiles
- (source "Icons")
- (dest (tackon target "Icons"))
- (optional nofail)
- (pattern "#?.info")
- (infos)
- (nogauge)
- )
-
- ; PolyEd Drawer
- (copyfiles
- (source "Icons.info")
- (dest supertarget)
- (newname "PolyEd.info")
- (infos)
- (nogauge)
- )
-
- (complete 90)
-
- ;------------------------------------------------------------
- ; Copy keyfile for registrated users
- ;------------------------------------------------------------
-
- (if (exists "ped.key")
- (
- (working "Installing Keyfile")
- (copyfiles
- (source "ped.key")
- (dest target)
- (optional nofail)
- (infos)
- (help @copyfiles-help)
- )
- ))
-
- ;=============================================================================
- ; 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)
-