home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / GFX / Misc / SOB-ME5.DMS / in.adf / Install-Operators < prev    next >
Encoding:
Text File  |  1996-11-14  |  19.7 KB  |  640 lines

  1. ; ************************************************
  2. ; *
  3. ; * Install-Operators
  4. ; *
  5. ; * $VER: Install-Operators 4.0 (5. November 1996)
  6. ; *
  7. ; * This is the installation script for DraCo-Motion, VLAB-Motion
  8. ; * and MovieShop Operator disks.
  9. ; *
  10. ; * Copyright © 1994-1996 MS MacroSystem Computer GmbH
  11. ; * All Rights Reserved
  12. ; *
  13. ; * written by Claus Bönnhoff
  14. ; *
  15. ; ************************************************
  16.  
  17. ; #####################################################################
  18. ;
  19. ;  Set up some global variables.
  20. ;
  21. ; #####################################################################
  22.  
  23.  
  24. (set MovieShop    "MovieShop")
  25.  
  26. (set DISK1        "Operator_Disk")
  27.  
  28. ; defines for often used constants
  29. (set FALSE 0)
  30. (set TRUE  1)
  31.  
  32. ; defines for the languages
  33. (set LANG_DEUTSCH 2)
  34. (set LANG_ENGLISH 4)
  35.  
  36. (set PART_DEUTSCH 1)
  37. (set PART_ENGLISH 2)
  38.  
  39. ; for the percent counter
  40. (set TotalFiles   0)
  41. (set ActualFiles  0)
  42.  
  43. (set OSVersion        (/ (getversion) 65536))
  44.  
  45. ; the needed pathes
  46. (set DirPath (@default-dest)) ; will be updated to ENVARC:MovieShopPath/Operators if found
  47. (set MovieShopDirPath "") ; the path for the Operators
  48.  
  49. ; #####################################################################
  50. ;
  51. ;  Set up some messages.
  52. ;
  53. ; #####################################################################
  54.  
  55. (if (patmatch @language "deutsch")
  56. ; german language
  57.   (
  58.    (set language LANG_DEUTSCH)
  59.  
  60.    (set HLP_SETDIRPATH        (cat "Wenn Sie mit dem Installer ein Verzeichnis anlegen, ist es "
  61.                               ("sehr sinnvoll, daß sie in den Namen kein Leerzeichen einfügen. ")
  62.                               ("Dieses erleichtert den späteren Umgang, besonders beim Arbeiten ")
  63.                               ("in der Shell und mit AREXX.\n")))
  64.    (set MSG_MOVIESHOPPATH     ("Geben Sie bitte das Verzeichnis an, in dem %s installiert ist..." MovieShop))
  65.  
  66.    (set MSG_GETDISK1          (cat ("Bitte legen Sie die Diskette mit dem Namen \"") (DISK1) (":\" in ein beliebiges Laufwerk")))
  67.    (Set HLP_GETDISK1          (cat (MSG_GETDISK1 "\nIch benötige diese Diskette, um die Installation weiterführen zu können !\n")))
  68.    (set MSG_OLD_MS            ("Diese Operatoren benötigen mindestens\nMovieShop 3.3.\n"))
  69.    (set MSG_COPYFILE          ("Kopiere Datei %s nach %s..."))
  70.    (set MSG_NOMOVIESHOP       ("Sie müssen zuerst MovieShop installieren !"))
  71.    (set MSG_FALSEOSVERSION    ("%s benötigt unbedingt AmigaOS 2.04 oder höher.\n" MovieShop))
  72.    (set MSG_TIMELINE          ("Schnittlisten"))
  73.    (Set MSG_FPUNO             ("Sie haben ein System OHNE mathematischen Koprozessor. "))
  74.    (Set MSG_FPUYES            ("Sie haben ein System MIT mathematischen Koprozessor. "))
  75.    (set MSG_OTHERDISK         ("Bitte installieren Sie die Operatoren mit der anderen Diskette"))
  76.   )
  77. ; default language
  78.   (
  79.    (set language LANG_ENGLISH)
  80.  
  81.    (set HLP_SETDIRPATH        (cat "NOTE: If you will using the Installer program's "
  82.                               ("function to create a new directory using \"Make New Drawer...\"")
  83.                               ("it is highly recommended that you DO NOT include ")
  84.                               ("spaces in the drawer name.  Following this advice ")
  85.                               ("will avoid any problems accessing the directory, ")
  86.                               ("especially from ARexx scripts.\n\n")))
  87.    (set MSG_MOVIESHOPPATH     ("Please select the directory in which %s is installed..." MovieShop))
  88.    (set MSG_GETDISK1          (cat ("Please insert disk \"")(DISK1)(":\" in any drive...")))
  89.    (set HLP_GETDISK1          (cat (MSG_GETDISK1 "\nI need this disk to completly install your programs.\n")))
  90.    (set MSG_OLD_MS            ("These operators require at least\nMovieShop 3.3.\n"))
  91.    (set MSG_COPYFILE          ("Copying file %s to directory %s"))
  92.    (set MSG_NOMOVIESHOP       ("You must install MovieShop first !"))
  93.    (set MSG_FALSEOSVERSION    ("MovieShop requires at least Kickstart 2.04"))
  94.    (set MSG_TIMELINE          ("TimeLines"))
  95.    (Set MSG_FPUNO             ("Your system does NOT have a mathematic coprocessor."))
  96.    (Set MSG_FPUYES            ("Your system does have a mathematic coprocessor."))
  97.    (set MSG_OTHERDISK         ("Please use the other Operator Disk for installation."))
  98.   )
  99. )
  100.  
  101. ; #####################################################################
  102. ;
  103. ;  Ask the user for a directory name.
  104. ;
  105. ;  these variables must be defined before calling this procedure:
  106. ;
  107. ;    DirPathTitle ; text to ask the user for
  108. ;    DirPathHelp  ; help text for the help button
  109. ;    DirPath      ; the Path which will be offered
  110. ;
  111. ; this procedure returns the selected directory in DirPath
  112. ;
  113. ; #####################################################################
  114.  
  115. (procedure SetDirPath
  116.    (
  117.    (if (= (exists DirPath) FALSE) ; Directory does not exist ?
  118.       (
  119.       (set DirPath   ; No -> offer to make a new Directory
  120.          (askdir
  121.             (prompt DirPathTitle)
  122.             (help DirPathHelp @askdir-help)
  123.             (newpath DirPath)
  124.             (default DirPath)
  125.          )
  126.       )
  127.       )
  128.       (
  129.       (set DirPath   ; Yes -> just offer this path to the user
  130.          (askdir
  131.             (prompt DirPathTitle)
  132.             (help DirPathHelp @askdir-help)
  133.             (default DirPath)
  134.          )
  135.       )
  136.       )
  137.    )
  138.    )
  139. )
  140.  
  141. ; #####################################################################
  142. ;
  143. ;  Set the Percent indicator.
  144. ;
  145. ; #####################################################################
  146.  
  147. (procedure IncrementMeter
  148.    (
  149.    (set PctDone   (/ (* ActualFiles 100) TotalFiles))
  150.    (set ActualFiles  (+ ActualFiles AddToMeter))
  151.    (complete PctDone)
  152.    )
  153. )
  154.  
  155. ; #####################################################################
  156. ;
  157. ;  Install all Operator files
  158. ;
  159. ; #####################################################################
  160.  
  161. (procedure InstallOperators
  162.    (
  163.    (set existsrc (getassign DISK1 "a"))
  164.    (if (= existsrc "")
  165.       (askdisk (prompt MSG_GETDISK1)
  166.                (help HLP_GETDISK1 @askdisk-help)
  167.                (dest DISK1)
  168.       )
  169.    )
  170.  
  171.    (Set DirPath (tackon @default-dest "MovieShop"))
  172.    (if (exists "ENV:MovieShopPath")
  173.       (
  174.       (set DirPath (getenv ("MovieShopPath")))
  175.       )
  176.    )
  177.    (Set DirPathTitle MSG_MOVIESHOPPATH)
  178.    (Set DirPathHelp  HLP_SETDIRPATH)
  179.    (SetDirPath)
  180.    (set @default-dest (DirPath))
  181.    (set MovieShopDirPath (DirPath))
  182.  
  183. ; #1
  184.    (set AddToMeter   1)
  185.    (IncrementMeter)
  186.  
  187. ; ---------------------------------------------------------------------
  188. ;
  189. ; install macros
  190. ;
  191. ; ---------------------------------------------------------------------
  192.  
  193.    (if(= (exists (cat Disk1 ":Macros")) TRUE)
  194.       (
  195.       (if(= (exists (tackon MovieShopDirPath "Macros")) FALSE)
  196.          (
  197.             (makedir (tackon MovieShopDirPath "Macros"))
  198.          )
  199.       )
  200.  
  201.       (copyfiles
  202.          (prompt (MSG_COPYFILE "Macros"))
  203.          (help MSG_COPYFILE @copyfiles-help)
  204.          (source (tackon (DISK1)(":Macros/#?")))
  205.          (dest (tackon MovieShopDirPath "Macros"))
  206.          (pattern "#?")
  207.          (files)
  208.          (optional fail force)
  209.       )
  210.       )
  211.    )
  212.  
  213. ; #2
  214.    (set AddToMeter   1)
  215.    (IncrementMeter)
  216.  
  217. ; ---------------------------------------------------------------------
  218. ;
  219. ; install effect operators
  220. ;
  221. ; ---------------------------------------------------------------------
  222.  
  223.    (if (= (exists (tackon MovieShopDirPath "Operators")) FALSE)
  224.       (
  225.          (makedir (tackon MovieShopDirPath "Operators"))
  226.       )
  227.    )
  228.  
  229.    (Set DirPath (tackon MovieShopDirPath "Operators"))
  230.    (set OperatorDirPath DirPath)
  231.    (set @default-dest DirPath)
  232.  
  233.    (if (exists (cat (DISK1)(":c/FPU")))
  234.       (
  235.          (run (cat (DISK1)(":c/FPU")))
  236.          (if (exists "ENV:fpu")
  237.             (
  238.             (set fpuavail (getenv ("fpu")))
  239.             )
  240.          )
  241.          (if (= fpuavail TRUE)
  242.             (
  243.                (set MSG_FALSEDISK (cat MSG_FPUYES MSG_OTHERDISK))
  244.                (if (exists (cat (DISK1)(":Operators/68881")))
  245.                   (
  246.                      (copyfiles
  247.                         (prompt (MSG_COPYFILE "Operators" DirPath))
  248.                         (help MSG_COPYFILE @copyfiles-help)
  249.                         (source (cat (DISK1)(":Operators/68881/")))
  250.                         (pattern "#?")
  251.                         (dest DirPath)
  252.                         (files)
  253.                         (optional fail force)
  254.                      )
  255.                   )
  256.                   (
  257.                      (abort (MSG_FALSEDISK))
  258.                   )
  259.                )
  260.             )
  261.             (
  262.                (set MSG_FALSEDISK (cat MSG_FPUNO MSG_OTHERDISK))
  263.                (if (exists (cat (DISK1)(":Operators/Standard")))
  264.                   (
  265.                      (copyfiles
  266.                         (prompt (MSG_COPYFILE "Operators" DirPath))
  267.                         (help MSG_COPYFILE @copyfiles-help)
  268.                         (source (cat (DISK1)(":Operators/Standard/")))
  269.                         (pattern "#?")
  270.                         (dest DirPath)
  271.                         (files)
  272.                         (optional fail force)
  273.                      )
  274.                   )
  275.                   (
  276.                      (abort (MSG_FALSEDISK))
  277.                   )
  278.                )
  279.             )
  280.          )
  281.  
  282.       )
  283.       (
  284.          (copyfiles
  285.             (prompt (MSG_COPYFILE "Operators" DirPath))
  286.             (help MSG_COPYFILE @copyfiles-help)
  287.             (source (cat (DISK1)(":Operators/")))
  288.             (pattern "#?")
  289.             (dest DirPath)
  290.             (files)
  291.             (optional fail force)
  292.          )
  293.       )
  294.    )
  295.  
  296. ; #3
  297.    (set AddToMeter 1)
  298.    (IncrementMeter)
  299.  
  300. ; ---------------------------------------------------------------------
  301. ;
  302. ;  install extfiles only if MovieShop version 4 or higher
  303. ;
  304. ; ---------------------------------------------------------------------
  305.  
  306.    (set MSVersion (/ (getversion (tackon MovieShopDirPath "MovieShop")) 65536))
  307.  
  308.    (if (> MSVersion 3)
  309.       (
  310.          (copyfiles
  311.             (prompt (MSG_COPYFILE "Extfiles"))
  312.             (help MSG_COPYFILE @copyfiles-help)
  313.             (source (cat (DISK1)(":ExtFiles/")))
  314.             (pattern "#?")
  315.             (dest DirPath)
  316.             (optional fail force)
  317.          )
  318.       )
  319.    )
  320.  
  321. ; #4
  322.    (set AddToMeter   1)
  323.    (IncrementMeter)
  324.  
  325.  
  326. ; ---------------------------------------------------------------------
  327. ;
  328. ;  Install online help files
  329. ;
  330. ; ---------------------------------------------------------------------
  331.  
  332. ; there is no english guide now. Replace this part
  333. ; of the script if a new guide is finished.
  334. ;
  335. ;   (if (= language LANG_DEUTSCH)
  336. ;   (
  337. ;      (set langdefault 1)
  338. ;   )
  339. ;   (
  340. ;      (set langdefault 2)
  341. ;   ))
  342. ;
  343. ;
  344. ;   (
  345. ;   (set Parts
  346. ;      (askoptions
  347. ;         (prompt
  348. ;            (MSG_SELECTGUIDEPARTS)
  349. ;         )
  350. ;         (help
  351. ;            (HLP_SELECTGUIDEPARTS1)
  352. ;            @askoptions-help
  353. ;         )
  354. ;         (default langdefault)
  355. ;         (choices
  356. ;            ; bit position 0 -- todo & 1
  357. ;            ;
  358. ;            ("%s" MSG_GERMAN)
  359. ;            ; bit position 1 -- todo & 2
  360. ;            ;
  361. ;            ("%s" MSG_ENGLISH)
  362. ;         )
  363. ;      )
  364. ;   )
  365. ;   )
  366.  
  367. (set Parts PART_DEUTSCH) ; just while there is no englsh guide
  368.  
  369.    (if (BITAND Parts PART_DEUTSCH)
  370.       (
  371.          (if (exists (tackon (MovieShopDirPath) ("Help")))
  372.             (
  373.                (if (exists (tackon (MovieShopDirPath) ("Help/Deutsch")))
  374.                   (
  375. ; #5
  376.                      (copyfiles
  377.                         (prompt (MSG_COPYFILE "Rexx-Script" (tackon (MovieShopDirPath)("Help/Deutsch"))))
  378.                         (help MSG_COPYFILE @copyfiles-help)
  379.                         (source (cat (DISK1)(":Guide/Deutsch/Rexx/")))
  380.                         (all)
  381.                         (dest (tackon (MovieShopDirPath)("Help/Deutsch")))
  382.                         (files)
  383.                         (optional fail force)
  384.                      )
  385.                      (set AddToMeter 1)
  386.                      (IncrementMeter)
  387.                      (makedir (tackon MovieShopDirPath "Help/Deutsch/ops"))
  388.                      (copyfiles
  389.                         (prompt (MSG_COPYFILE "Online-Hilfe" (tackon (MovieShopDirPath)("Help/Deutsch/ops"))))
  390.                         (help MSG_COPYFILE @copyfiles-help)
  391.                         (source (cat (DISK1)(":Guide/Deutsch/")))
  392.                         (all)
  393.                         (dest (tackon (MovieShopDirPath)("Help/Deutsch/ops")))
  394.                         (files)
  395.                         (optional fail force)
  396.                      )
  397. ; #6
  398.                      (if ( exists (tackon MovieShopDirPath "Help/Deutsch/UpdateOps.bat"))
  399.                         (
  400.                            (makeassign "MS_GUIDE" (tackon MovieShopDirPath "Help/Deutsch"))
  401.                            (execute (tackon MovieShopDirPath "Help/Deutsch/UpdateOps.bat"))
  402.                         )
  403.                      )
  404.                      (set AddToMeter 1)
  405.                      (IncrementMeter)
  406.                   )
  407.                )
  408.             )
  409.             (
  410.                (if (exists ("Help:Deutsch"))
  411.                   (
  412.                      (if (exists ("Help:Deutsch/MovieShop"))
  413.                         (
  414. ; #5
  415.                            (copyfiles
  416.                               (prompt (MSG_COPYFILE "Rexx-Script" (tackon (MovieShopDirPath)("Help/Deutsch"))))
  417.                               (help MSG_COPYFILE @copyfiles-help)
  418.                               (source (cat (DISK1)(":Guide/Deutsch/Rexx/")))
  419.                               (all)
  420.                               (dest "Help:Deutsch/MovieShop")
  421.                               (files)
  422.                               (optional fail force)
  423.                            )
  424.                            (set AddToMeter 1)
  425.                            (IncrementMeter)
  426.                            (makedir "Help:Deutsch/MovieShop/ops")
  427.                            (copyfiles
  428.                               (prompt (MSG_COPYFILE "Online-Hilfe" ("Help:Deutsch/MovieShop/ops")))
  429.                               (help MSG_COPYFILE @copyfiles-help)
  430.                               (source (cat (DISK1)(":Guide/Deutsch/")))
  431.                               (all)
  432.                               (dest "Help:Deutsch/MovieShop/ops")
  433.                               (files)
  434.                               (optional fail force)
  435.                            )
  436.                         )
  437.                      )
  438.                   )
  439.                   (
  440. ; #6
  441.                      (set AddToMeter 1)
  442.                      (IncrementMeter)
  443.                   )
  444.                )
  445.             )
  446.          )
  447.       )
  448.       (
  449.          (set AddToMeter 2)
  450.          (IncrementMeter)
  451.       )
  452.    )
  453.  
  454.    (if (BITAND Parts PART_ENGLISH)
  455.       (
  456.          (if (exists (tackon (MovieShopDirPath) ("Help/English")))
  457.             (
  458. ; #5
  459.                (copyfiles
  460.                   (prompt (MSG_COPYFILE "Rexx-Script" (tackon (MovieShopDirPath)("Help/English"))))
  461.                   (help MSG_COPYFILE @copyfiles-help)
  462.                   (source (cat (DISK1)(":Guide/English/Rexx/")))
  463.                   (all)
  464.                   (dest (tackon (MovieShopDirPath)("Help/English")))
  465.                   (files)
  466.                   (optional fail force)
  467.                )
  468.                (set AddToMeter 1)
  469.                (IncrementMeter)
  470.                (makedir (tackon MovieShopDirPath "Help/English/ops"))
  471.                (copyfiles
  472.                   (prompt (MSG_COPYFILE "Online-Hilfe" (tackon (MovieShopDirPath)("Help/English/ops"))))
  473.                   (help MSG_COPYFILE @copyfiles-help)
  474.                   (source (cat (DISK1)(":Guide/English/")))
  475.                   (all)
  476.                   (dest (tackon (MovieShopDirPath)("Help/English/ops")))
  477.                   (files)
  478.                   (optional fail force)
  479.                )
  480. ; #6
  481.                (if ( exists (tackon MovieShopDirPath "Help/English/UpdateOps.bat"))
  482.                   (
  483.                      (makeassign "MS_GUIDE" (tackon MovieShopDirPath "Help/English"))
  484.                      (execute (tackon MovieShopDirPath "Help/English/UpdateOps.bat"))
  485.                   )
  486.                )
  487.                (set AddToMeter 1)
  488.                (IncrementMeter)
  489.             )
  490.             (
  491.                (if (exists ("Help:English/MovieShop"))
  492.                   (
  493. ; #5
  494.                      (copyfiles
  495.                         (prompt (MSG_COPYFILE "Rexx-Script" (tackon (MovieShopDirPath)("Help/English"))))
  496.                         (help MSG_COPYFILE @copyfiles-help)
  497.                         (source (cat (DISK1)(":Guide/English/Rexx/")))
  498.                         (all)
  499.                         (dest (tackon (MovieShopDirPath)("Help/English")))
  500.                         (files)
  501.                         (optional fail force)
  502.                      )
  503.                      (set AddToMeter 1)
  504.                      (IncrementMeter)
  505.                      (makedir "Help:English/MovieShop/ops")
  506.                      (copyfiles
  507.                         (prompt (MSG_COPYFILE "Online-Hilfe" ("Help:English/MovieShop/ops")))
  508.                         (help MSG_COPYFILE @copyfiles-help)
  509.                         (source (cat (DISK1)(":Guide/English/")))
  510.                         (all)
  511.                         (dest "Help:English/MovieShop/ops")
  512.                         (files)
  513.                         (optional fail force)
  514.                      )
  515. ; #6
  516.                      (set AddToMeter 1)
  517.                      (IncrementMeter)
  518.                   )
  519.                )
  520.             )
  521.          )
  522.       )
  523.       (
  524.          (set AddToMeter 2)
  525.          (IncrementMeter)
  526.       )
  527.    )
  528.  
  529.  
  530. ; ---------------------------------------------------------------------
  531. ;
  532. ;  Install example timelines
  533. ;
  534. ; ---------------------------------------------------------------------
  535.  
  536.  
  537.    (makedir (tackon (MovieShopDirPath) "TimeLines"))
  538.    (makedir (tackon (MovieShopDirPath) "TimeLines/Easy"))
  539.    (makedir (tackon (MovieShopDirPath) "TimeLines/UPN"))
  540.  
  541.    (if ((exists (tackon (MovieShopDirPath) ("TimeLines"))))
  542.       (
  543.          (copyfiles
  544.             (prompt (MSG_COPYFILE MSG_TIMELINES (tackon (MovieShopDirPath)("TimeLines"))))
  545.             (help MSG_COPYFILE @copyfiles-help)
  546.             (source (cat (DISK1)(":TimeLines/UPN/")))
  547.             (all)
  548.             (dest (tackon (MovieShopDirPath)("TimeLines/UPN")))
  549.             (files)
  550.             (optional fail force)
  551.          )
  552. ; #7
  553.          (set AddToMeter 1)
  554.          (IncrementMeter)
  555.          (copyfiles
  556.             (prompt (MSG_COPYFILE MSG_TIMELINES (tackon (MovieShopDirPath)("TimeLines"))))
  557.             (help MSG_COPYFILE @copyfiles-help)
  558.             (source (cat (DISK1)(":TimeLines/Easy/")))
  559.             (all)
  560.             (dest (tackon (MovieShopDirPath)("TimeLines/Easy")))
  561.             (files)
  562.             (optional fail force)
  563.          )
  564. ; #8
  565.  
  566.       )
  567.       (
  568.          (set AddToMeter 1)
  569.          (IncrementMeter)
  570.       )
  571.    )
  572.    (
  573.       (set AddToMeter 1)
  574.       (IncrementMeter)
  575.    )
  576.  
  577.    )
  578. )
  579.  
  580. ; #####################################################################
  581. ;
  582. ; look what expansion cards and software versions are aviable
  583. ;
  584. ; #####################################################################
  585.  
  586. (procedure GetHardwareConfig
  587.    (
  588.  
  589.    (if (< OSVersion 37)   ; Kick2.0 or higher is required
  590.       (
  591.       (abort (MSG_FALSEOSVERSION))
  592.       )
  593.    )
  594.  
  595.    (if (= (exists "libs:vmotion.library") FALSE)
  596.       (
  597.          abort (MSG_NOMOVIESHOP)
  598.       )
  599.    )
  600.  
  601.    (if (= (exists ("libs:motioneffect.library")) TRUE)
  602.       (
  603.          (set vernum (getversion ("libs:motioneffect.library")))
  604.          (set ver1 (/ vernum 65536))
  605.       )
  606.       (
  607.          (set ver1 0)
  608.       )
  609.    )
  610.    (if (< ver1 4)
  611.      (abort (MSG_OLD_MS)))
  612.    )
  613. )
  614.  
  615. ; #####################################################################
  616. ;
  617. ;  On error - go here on error occured
  618. ;
  619. ; #####################################################################
  620.  
  621. (onerror
  622.    (exit (quiet))
  623. )
  624.  
  625. ; #####################################################################
  626. ;
  627. ;  Main Startup code is here
  628. ;
  629. ; #####################################################################
  630.  
  631. ; look for hardware configuration
  632.  
  633. (GetHardWareConfig)
  634.  
  635. (set TotalFiles (+ TotalFiles 8))
  636.  
  637. (complete 0)
  638. (InstallOperators)
  639. (complete 100)
  640.