home *** CD-ROM | disk | FTP | other *** search
- ; ************************************************
- ; *
- ; * Install-Operators
- ; *
- ; * $VER: Install-Operators 4.0 (5. November 1996)
- ; *
- ; * This is the installation script for DraCo-Motion, VLAB-Motion
- ; * and MovieShop Operator disks.
- ; *
- ; * Copyright © 1994-1996 MS MacroSystem Computer GmbH
- ; * All Rights Reserved
- ; *
- ; * written by Claus Bönnhoff
- ; *
- ; ************************************************
-
- ; #####################################################################
- ;
- ; Set up some global variables.
- ;
- ; #####################################################################
-
-
- (set MovieShop "MovieShop")
-
- (set DISK1 "Operator_Disk")
-
- ; defines for often used constants
- (set FALSE 0)
- (set TRUE 1)
-
- ; defines for the languages
- (set LANG_DEUTSCH 2)
- (set LANG_ENGLISH 4)
-
- (set PART_DEUTSCH 1)
- (set PART_ENGLISH 2)
-
- ; for the percent counter
- (set TotalFiles 0)
- (set ActualFiles 0)
-
- (set OSVersion (/ (getversion) 65536))
-
- ; the needed pathes
- (set DirPath (@default-dest)) ; will be updated to ENVARC:MovieShopPath/Operators if found
- (set MovieShopDirPath "") ; the path for the Operators
-
- ; #####################################################################
- ;
- ; Set up some messages.
- ;
- ; #####################################################################
-
- (if (patmatch @language "deutsch")
- ; german language
- (
- (set language LANG_DEUTSCH)
-
- (set HLP_SETDIRPATH (cat "Wenn Sie mit dem Installer ein Verzeichnis anlegen, ist es "
- ("sehr sinnvoll, daß sie in den Namen kein Leerzeichen einfügen. ")
- ("Dieses erleichtert den späteren Umgang, besonders beim Arbeiten ")
- ("in der Shell und mit AREXX.\n")))
- (set MSG_MOVIESHOPPATH ("Geben Sie bitte das Verzeichnis an, in dem %s installiert ist..." MovieShop))
-
- (set MSG_GETDISK1 (cat ("Bitte legen Sie die Diskette mit dem Namen \"") (DISK1) (":\" in ein beliebiges Laufwerk")))
- (Set HLP_GETDISK1 (cat (MSG_GETDISK1 "\nIch benötige diese Diskette, um die Installation weiterführen zu können !\n")))
- (set MSG_OLD_MS ("Diese Operatoren benötigen mindestens\nMovieShop 3.3.\n"))
- (set MSG_COPYFILE ("Kopiere Datei %s nach %s..."))
- (set MSG_NOMOVIESHOP ("Sie müssen zuerst MovieShop installieren !"))
- (set MSG_FALSEOSVERSION ("%s benötigt unbedingt AmigaOS 2.04 oder höher.\n" MovieShop))
- (set MSG_TIMELINE ("Schnittlisten"))
- (Set MSG_FPUNO ("Sie haben ein System OHNE mathematischen Koprozessor. "))
- (Set MSG_FPUYES ("Sie haben ein System MIT mathematischen Koprozessor. "))
- (set MSG_OTHERDISK ("Bitte installieren Sie die Operatoren mit der anderen Diskette"))
- )
- ; default language
- (
- (set language LANG_ENGLISH)
-
- (set HLP_SETDIRPATH (cat "NOTE: If you will using the Installer program's "
- ("function to create a new directory using \"Make New Drawer...\"")
- ("it is highly recommended that you DO NOT include ")
- ("spaces in the drawer name. Following this advice ")
- ("will avoid any problems accessing the directory, ")
- ("especially from ARexx scripts.\n\n")))
- (set MSG_MOVIESHOPPATH ("Please select the directory in which %s is installed..." MovieShop))
- (set MSG_GETDISK1 (cat ("Please insert disk \"")(DISK1)(":\" in any drive...")))
- (set HLP_GETDISK1 (cat (MSG_GETDISK1 "\nI need this disk to completly install your programs.\n")))
- (set MSG_OLD_MS ("These operators require at least\nMovieShop 3.3.\n"))
- (set MSG_COPYFILE ("Copying file %s to directory %s"))
- (set MSG_NOMOVIESHOP ("You must install MovieShop first !"))
- (set MSG_FALSEOSVERSION ("MovieShop requires at least Kickstart 2.04"))
- (set MSG_TIMELINE ("TimeLines"))
- (Set MSG_FPUNO ("Your system does NOT have a mathematic coprocessor."))
- (Set MSG_FPUYES ("Your system does have a mathematic coprocessor."))
- (set MSG_OTHERDISK ("Please use the other Operator Disk for installation."))
- )
- )
-
- ; #####################################################################
- ;
- ; Ask the user for a directory name.
- ;
- ; these variables must be defined before calling this procedure:
- ;
- ; DirPathTitle ; text to ask the user for
- ; DirPathHelp ; help text for the help button
- ; DirPath ; the Path which will be offered
- ;
- ; this procedure returns the selected directory in DirPath
- ;
- ; #####################################################################
-
- (procedure SetDirPath
- (
- (if (= (exists DirPath) FALSE) ; Directory does not exist ?
- (
- (set DirPath ; No -> offer to make a new Directory
- (askdir
- (prompt DirPathTitle)
- (help DirPathHelp @askdir-help)
- (newpath DirPath)
- (default DirPath)
- )
- )
- )
- (
- (set DirPath ; Yes -> just offer this path to the user
- (askdir
- (prompt DirPathTitle)
- (help DirPathHelp @askdir-help)
- (default DirPath)
- )
- )
- )
- )
- )
- )
-
- ; #####################################################################
- ;
- ; Set the Percent indicator.
- ;
- ; #####################################################################
-
- (procedure IncrementMeter
- (
- (set PctDone (/ (* ActualFiles 100) TotalFiles))
- (set ActualFiles (+ ActualFiles AddToMeter))
- (complete PctDone)
- )
- )
-
- ; #####################################################################
- ;
- ; Install all Operator files
- ;
- ; #####################################################################
-
- (procedure InstallOperators
- (
- (set existsrc (getassign DISK1 "a"))
- (if (= existsrc "")
- (askdisk (prompt MSG_GETDISK1)
- (help HLP_GETDISK1 @askdisk-help)
- (dest DISK1)
- )
- )
-
- (Set DirPath (tackon @default-dest "MovieShop"))
- (if (exists "ENV:MovieShopPath")
- (
- (set DirPath (getenv ("MovieShopPath")))
- )
- )
- (Set DirPathTitle MSG_MOVIESHOPPATH)
- (Set DirPathHelp HLP_SETDIRPATH)
- (SetDirPath)
- (set @default-dest (DirPath))
- (set MovieShopDirPath (DirPath))
-
- ; #1
- (set AddToMeter 1)
- (IncrementMeter)
-
- ; ---------------------------------------------------------------------
- ;
- ; install macros
- ;
- ; ---------------------------------------------------------------------
-
- (if(= (exists (cat Disk1 ":Macros")) TRUE)
- (
- (if(= (exists (tackon MovieShopDirPath "Macros")) FALSE)
- (
- (makedir (tackon MovieShopDirPath "Macros"))
- )
- )
-
- (copyfiles
- (prompt (MSG_COPYFILE "Macros"))
- (help MSG_COPYFILE @copyfiles-help)
- (source (tackon (DISK1)(":Macros/#?")))
- (dest (tackon MovieShopDirPath "Macros"))
- (pattern "#?")
- (files)
- (optional fail force)
- )
- )
- )
-
- ; #2
- (set AddToMeter 1)
- (IncrementMeter)
-
- ; ---------------------------------------------------------------------
- ;
- ; install effect operators
- ;
- ; ---------------------------------------------------------------------
-
- (if (= (exists (tackon MovieShopDirPath "Operators")) FALSE)
- (
- (makedir (tackon MovieShopDirPath "Operators"))
- )
- )
-
- (Set DirPath (tackon MovieShopDirPath "Operators"))
- (set OperatorDirPath DirPath)
- (set @default-dest DirPath)
-
- (if (exists (cat (DISK1)(":c/FPU")))
- (
- (run (cat (DISK1)(":c/FPU")))
- (if (exists "ENV:fpu")
- (
- (set fpuavail (getenv ("fpu")))
- )
- )
- (if (= fpuavail TRUE)
- (
- (set MSG_FALSEDISK (cat MSG_FPUYES MSG_OTHERDISK))
- (if (exists (cat (DISK1)(":Operators/68881")))
- (
- (copyfiles
- (prompt (MSG_COPYFILE "Operators" DirPath))
- (help MSG_COPYFILE @copyfiles-help)
- (source (cat (DISK1)(":Operators/68881/")))
- (pattern "#?")
- (dest DirPath)
- (files)
- (optional fail force)
- )
- )
- (
- (abort (MSG_FALSEDISK))
- )
- )
- )
- (
- (set MSG_FALSEDISK (cat MSG_FPUNO MSG_OTHERDISK))
- (if (exists (cat (DISK1)(":Operators/Standard")))
- (
- (copyfiles
- (prompt (MSG_COPYFILE "Operators" DirPath))
- (help MSG_COPYFILE @copyfiles-help)
- (source (cat (DISK1)(":Operators/Standard/")))
- (pattern "#?")
- (dest DirPath)
- (files)
- (optional fail force)
- )
- )
- (
- (abort (MSG_FALSEDISK))
- )
- )
- )
- )
-
- )
- (
- (copyfiles
- (prompt (MSG_COPYFILE "Operators" DirPath))
- (help MSG_COPYFILE @copyfiles-help)
- (source (cat (DISK1)(":Operators/")))
- (pattern "#?")
- (dest DirPath)
- (files)
- (optional fail force)
- )
- )
- )
-
- ; #3
- (set AddToMeter 1)
- (IncrementMeter)
-
- ; ---------------------------------------------------------------------
- ;
- ; install extfiles only if MovieShop version 4 or higher
- ;
- ; ---------------------------------------------------------------------
-
- (set MSVersion (/ (getversion (tackon MovieShopDirPath "MovieShop")) 65536))
-
- (if (> MSVersion 3)
- (
- (copyfiles
- (prompt (MSG_COPYFILE "Extfiles"))
- (help MSG_COPYFILE @copyfiles-help)
- (source (cat (DISK1)(":ExtFiles/")))
- (pattern "#?")
- (dest DirPath)
- (optional fail force)
- )
- )
- )
-
- ; #4
- (set AddToMeter 1)
- (IncrementMeter)
-
-
- ; ---------------------------------------------------------------------
- ;
- ; Install online help files
- ;
- ; ---------------------------------------------------------------------
-
- ; there is no english guide now. Replace this part
- ; of the script if a new guide is finished.
- ;
- ; (if (= language LANG_DEUTSCH)
- ; (
- ; (set langdefault 1)
- ; )
- ; (
- ; (set langdefault 2)
- ; ))
- ;
- ;
- ; (
- ; (set Parts
- ; (askoptions
- ; (prompt
- ; (MSG_SELECTGUIDEPARTS)
- ; )
- ; (help
- ; (HLP_SELECTGUIDEPARTS1)
- ; @askoptions-help
- ; )
- ; (default langdefault)
- ; (choices
- ; ; bit position 0 -- todo & 1
- ; ;
- ; ("%s" MSG_GERMAN)
- ; ; bit position 1 -- todo & 2
- ; ;
- ; ("%s" MSG_ENGLISH)
- ; )
- ; )
- ; )
- ; )
-
- (set Parts PART_DEUTSCH) ; just while there is no englsh guide
-
- (if (BITAND Parts PART_DEUTSCH)
- (
- (if (exists (tackon (MovieShopDirPath) ("Help")))
- (
- (if (exists (tackon (MovieShopDirPath) ("Help/Deutsch")))
- (
- ; #5
- (copyfiles
- (prompt (MSG_COPYFILE "Rexx-Script" (tackon (MovieShopDirPath)("Help/Deutsch"))))
- (help MSG_COPYFILE @copyfiles-help)
- (source (cat (DISK1)(":Guide/Deutsch/Rexx/")))
- (all)
- (dest (tackon (MovieShopDirPath)("Help/Deutsch")))
- (files)
- (optional fail force)
- )
- (set AddToMeter 1)
- (IncrementMeter)
- (makedir (tackon MovieShopDirPath "Help/Deutsch/ops"))
- (copyfiles
- (prompt (MSG_COPYFILE "Online-Hilfe" (tackon (MovieShopDirPath)("Help/Deutsch/ops"))))
- (help MSG_COPYFILE @copyfiles-help)
- (source (cat (DISK1)(":Guide/Deutsch/")))
- (all)
- (dest (tackon (MovieShopDirPath)("Help/Deutsch/ops")))
- (files)
- (optional fail force)
- )
- ; #6
- (if ( exists (tackon MovieShopDirPath "Help/Deutsch/UpdateOps.bat"))
- (
- (makeassign "MS_GUIDE" (tackon MovieShopDirPath "Help/Deutsch"))
- (execute (tackon MovieShopDirPath "Help/Deutsch/UpdateOps.bat"))
- )
- )
- (set AddToMeter 1)
- (IncrementMeter)
- )
- )
- )
- (
- (if (exists ("Help:Deutsch"))
- (
- (if (exists ("Help:Deutsch/MovieShop"))
- (
- ; #5
- (copyfiles
- (prompt (MSG_COPYFILE "Rexx-Script" (tackon (MovieShopDirPath)("Help/Deutsch"))))
- (help MSG_COPYFILE @copyfiles-help)
- (source (cat (DISK1)(":Guide/Deutsch/Rexx/")))
- (all)
- (dest "Help:Deutsch/MovieShop")
- (files)
- (optional fail force)
- )
- (set AddToMeter 1)
- (IncrementMeter)
- (makedir "Help:Deutsch/MovieShop/ops")
- (copyfiles
- (prompt (MSG_COPYFILE "Online-Hilfe" ("Help:Deutsch/MovieShop/ops")))
- (help MSG_COPYFILE @copyfiles-help)
- (source (cat (DISK1)(":Guide/Deutsch/")))
- (all)
- (dest "Help:Deutsch/MovieShop/ops")
- (files)
- (optional fail force)
- )
- )
- )
- )
- (
- ; #6
- (set AddToMeter 1)
- (IncrementMeter)
- )
- )
- )
- )
- )
- (
- (set AddToMeter 2)
- (IncrementMeter)
- )
- )
-
- (if (BITAND Parts PART_ENGLISH)
- (
- (if (exists (tackon (MovieShopDirPath) ("Help/English")))
- (
- ; #5
- (copyfiles
- (prompt (MSG_COPYFILE "Rexx-Script" (tackon (MovieShopDirPath)("Help/English"))))
- (help MSG_COPYFILE @copyfiles-help)
- (source (cat (DISK1)(":Guide/English/Rexx/")))
- (all)
- (dest (tackon (MovieShopDirPath)("Help/English")))
- (files)
- (optional fail force)
- )
- (set AddToMeter 1)
- (IncrementMeter)
- (makedir (tackon MovieShopDirPath "Help/English/ops"))
- (copyfiles
- (prompt (MSG_COPYFILE "Online-Hilfe" (tackon (MovieShopDirPath)("Help/English/ops"))))
- (help MSG_COPYFILE @copyfiles-help)
- (source (cat (DISK1)(":Guide/English/")))
- (all)
- (dest (tackon (MovieShopDirPath)("Help/English/ops")))
- (files)
- (optional fail force)
- )
- ; #6
- (if ( exists (tackon MovieShopDirPath "Help/English/UpdateOps.bat"))
- (
- (makeassign "MS_GUIDE" (tackon MovieShopDirPath "Help/English"))
- (execute (tackon MovieShopDirPath "Help/English/UpdateOps.bat"))
- )
- )
- (set AddToMeter 1)
- (IncrementMeter)
- )
- (
- (if (exists ("Help:English/MovieShop"))
- (
- ; #5
- (copyfiles
- (prompt (MSG_COPYFILE "Rexx-Script" (tackon (MovieShopDirPath)("Help/English"))))
- (help MSG_COPYFILE @copyfiles-help)
- (source (cat (DISK1)(":Guide/English/Rexx/")))
- (all)
- (dest (tackon (MovieShopDirPath)("Help/English")))
- (files)
- (optional fail force)
- )
- (set AddToMeter 1)
- (IncrementMeter)
- (makedir "Help:English/MovieShop/ops")
- (copyfiles
- (prompt (MSG_COPYFILE "Online-Hilfe" ("Help:English/MovieShop/ops")))
- (help MSG_COPYFILE @copyfiles-help)
- (source (cat (DISK1)(":Guide/English/")))
- (all)
- (dest "Help:English/MovieShop/ops")
- (files)
- (optional fail force)
- )
- ; #6
- (set AddToMeter 1)
- (IncrementMeter)
- )
- )
- )
- )
- )
- (
- (set AddToMeter 2)
- (IncrementMeter)
- )
- )
-
-
- ; ---------------------------------------------------------------------
- ;
- ; Install example timelines
- ;
- ; ---------------------------------------------------------------------
-
-
- (makedir (tackon (MovieShopDirPath) "TimeLines"))
- (makedir (tackon (MovieShopDirPath) "TimeLines/Easy"))
- (makedir (tackon (MovieShopDirPath) "TimeLines/UPN"))
-
- (if ((exists (tackon (MovieShopDirPath) ("TimeLines"))))
- (
- (copyfiles
- (prompt (MSG_COPYFILE MSG_TIMELINES (tackon (MovieShopDirPath)("TimeLines"))))
- (help MSG_COPYFILE @copyfiles-help)
- (source (cat (DISK1)(":TimeLines/UPN/")))
- (all)
- (dest (tackon (MovieShopDirPath)("TimeLines/UPN")))
- (files)
- (optional fail force)
- )
- ; #7
- (set AddToMeter 1)
- (IncrementMeter)
- (copyfiles
- (prompt (MSG_COPYFILE MSG_TIMELINES (tackon (MovieShopDirPath)("TimeLines"))))
- (help MSG_COPYFILE @copyfiles-help)
- (source (cat (DISK1)(":TimeLines/Easy/")))
- (all)
- (dest (tackon (MovieShopDirPath)("TimeLines/Easy")))
- (files)
- (optional fail force)
- )
- ; #8
-
- )
- (
- (set AddToMeter 1)
- (IncrementMeter)
- )
- )
- (
- (set AddToMeter 1)
- (IncrementMeter)
- )
-
- )
- )
-
- ; #####################################################################
- ;
- ; look what expansion cards and software versions are aviable
- ;
- ; #####################################################################
-
- (procedure GetHardwareConfig
- (
-
- (if (< OSVersion 37) ; Kick2.0 or higher is required
- (
- (abort (MSG_FALSEOSVERSION))
- )
- )
-
- (if (= (exists "libs:vmotion.library") FALSE)
- (
- abort (MSG_NOMOVIESHOP)
- )
- )
-
- (if (= (exists ("libs:motioneffect.library")) TRUE)
- (
- (set vernum (getversion ("libs:motioneffect.library")))
- (set ver1 (/ vernum 65536))
- )
- (
- (set ver1 0)
- )
- )
- (if (< ver1 4)
- (abort (MSG_OLD_MS)))
- )
- )
-
- ; #####################################################################
- ;
- ; On error - go here on error occured
- ;
- ; #####################################################################
-
- (onerror
- (exit (quiet))
- )
-
- ; #####################################################################
- ;
- ; Main Startup code is here
- ;
- ; #####################################################################
-
- ; look for hardware configuration
-
- (GetHardWareConfig)
-
- (set TotalFiles (+ TotalFiles 8))
-
- (complete 0)
- (InstallOperators)
- (complete 100)
-