home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 28 / amigaformatcd28.iso / -seriously_amiga- / commercial / mavi2-1t3 / installdemo next >
Text File  |  1998-05-09  |  5KB  |  227 lines

  1. ; script to install MaVi, based on the PPage example
  2.  
  3.     ; set up a error cleanup routine
  4.  
  5. (onerror
  6.     (message "Die Installation wurde abgebrochen. Sie sollten eventuelle Teilinstallationen löschen.")
  7. )
  8.  
  9. (complete 0)
  10.  
  11.  
  12.     ; just in case the installation was restarted
  13.  
  14.     ; see if this is really an update
  15.  
  16. (set is_update 0)
  17. (set version 0)
  18.  
  19. (set installdest (getassign "MaVi" "a"))
  20.  
  21.     ; if update, be sure they want program in same place
  22.  
  23. (if installdest
  24.     (
  25.         (message "Sie haben evtl. einen inkompatiblen MaVi-Key installiert (von der Preview-Version). Es wird eine neue Version installiert, die allerdings nicht registriert ist.\n"
  26.                     "Falls Sie ein registrierter MaVi-User sind, können Sie einen neuen Schlüssel per email von support@pro-dev.com anfordern. Bitte geben Sie auch Ihre Kundennummer an.\n"
  27.                     "Sie können jetzt die Installation abbrechen (bis jetzt wurden keine Änderungen an Ihrem System vorgenommen) und bis zum Erhalt des neuen Schlüssels die alte Version weiterbenutzen oder die neue installieren.")
  28.         (if (askbool
  29.                 (prompt "Soll das MaVi-System im Verzeichnis\n\n\""
  30.                         installdest
  31.                         "\"\n\überschrieben werden (Empfohlen)?"
  32.                 )
  33.                 (help
  34.                     "Wie es scheint, hatten Sie MaVi schon einmal auf diesem Rechner installiert. "
  35.                     "Da die zu installierende wohl eine neuere Version ist, sollten Sie mit der Installation fortfahren, "
  36.                     "Sie können diese Version auch in ein anderes Verzeichnis installieren oder aber die Installation jetzt abbrechen.\n"
  37.                 )
  38.                 (default 1)
  39.             )
  40.  
  41.             (set is_update 1)        ; if user wants in same place
  42. ;            else
  43.             (set installdest        ; if user wants in different place
  44.                 (tackon
  45.                     (askdir
  46.                         (prompt "In welchem Verzeichnis soll der (neue) MaVi Ordner angelegt werden?")
  47.                         (help @askdir-help)
  48.                         (default @default-dest)
  49.                     )
  50.                     "MaVi"
  51.                 )
  52.             )
  53.         )
  54.     )
  55. ; else
  56.     (set installdest
  57.         (tackon
  58.             (askdir
  59.                 (prompt "In welchem Verzeichnis soll der MaVi Ordner angelegt werden?")
  60.                 (help @askdir-help)
  61.                 (default @default-dest)
  62.             )
  63.             "MaVi"
  64.         )
  65.     )
  66. )
  67.  
  68. (if (not is_update)
  69.     (
  70.         (makedir installdest (infos))
  71.  
  72.         (tooltype
  73.             (dest installdest)
  74.             (noposition)
  75.         )
  76.     )
  77.     (
  78.         ;remove now obsolete plug-ins
  79.         (if (exists "MaVi:Plug-Ins/")
  80.             (delete "MaVi:Plug-Ins/#?")
  81.         )
  82.     )
  83. )
  84.  
  85. ; from now on I'll work with this assign
  86. (makeassign "MaVi" installdest)
  87.  
  88. ; now lock on to disk 1, Demo only
  89. (makeassign "installdisk1" "Disk1")
  90.  
  91.  
  92.  
  93. ; at this point we have a valid destination, so we tell installer where
  94. ; the application will end up so the exit page will be correct -- also,
  95. ; the installation log file (if any) will be copied to the destination
  96. (set @default-dest installdest)
  97.  
  98. (complete 20)
  99.  
  100. ; these libraries are not only needed be mavi but may also be used by other programs
  101. ; or may already present on this system, so use copylib here
  102.  
  103. (copylib 
  104.     (source "installdisk1:libs/hrtool.library")
  105.     (dest "LIBS:")
  106. )
  107.  
  108. (copylib 
  109.     (source "installdisk1:libs/gaudio.library")
  110.     (dest "LIBS:")
  111. )
  112.  
  113. (copylib 
  114.     (source "installdisk1:libs/cyberext.library")
  115.     (dest "LIBS:")
  116. )
  117.  
  118. (copylib 
  119.     (source "installdisk1:libs/registry.library")
  120.     (dest "LIBS:")
  121. )
  122.  
  123. (copylib 
  124.     (source "installdisk1:libs/regprefs.library")
  125.     (dest "LIBS:")
  126. )
  127.  
  128. (makedir "SYS:storage/registry")
  129. (copyfiles 
  130.     (source "installdisk1:storage/registry/registry.new")
  131.     (dest "SYS:storage/registry")
  132. )
  133.  
  134. (copyfiles 
  135.     (source "installdisk1:storage/registry/registry.old")
  136.     (dest "SYS:storage/registry")
  137. )
  138. (if (exists "devs:registry.new")
  139.     (
  140.         (delete "devs:registry.new")
  141.     )
  142. )
  143. (if (exists "devs:registry.old")
  144.     (
  145.         (delete "devs:registry.old")
  146.     )
  147. )
  148.  
  149. (copyfiles 
  150.     (source "installdisk1:mavi.guide")
  151.     (dest "MaVi:")
  152. )
  153. (copyfiles 
  154.     (source "installdisk1:mavi.guide.info")
  155.     (dest "MaVi:")
  156. )
  157. (makedir "MaVi:libs")
  158. (makedir "MaVi:libs/MaVi")
  159.  
  160. (if (not is_update)
  161.     (
  162.         ; do not use copylib here
  163.         (copyfiles
  164.             (source "installdisk1:libs/mavikey.library")
  165.             (dest "Mavi:Libs/Mavi/")
  166.         )
  167.  
  168.         (copyfiles 
  169.             (source "installdisk1:libs/mavititle.data")
  170.             (dest "Mavi:libs/Mavi/")
  171.         )
  172.     )
  173. )
  174.  
  175. ; unpack the archives to their destination, maybe later into a temp dir and then
  176. ; with copylib a version check
  177.  
  178. (run "lha x installdisk1:font.lha fonts:")
  179. (run "lha x installdisk1:images.lha MaVi:")
  180. (run "lha x installdisk1:experimental.lha MaVi:")
  181.  
  182. ; remove the assign, demo only
  183. (makeassign "installdisk1")
  184. (complete 40)
  185.  
  186. ; now lock on to disk 2, Demo only
  187. (makeassign "installdisk2" "Disk2")
  188.  
  189. (copyfiles
  190.     (source "installdisk2:")
  191.     (dest "Mavi:")
  192.     (all)
  193. )
  194. (delete "mavi:disk.info" (safe))
  195.  
  196. ; remove the assign, demo only
  197. (makeassign "installdisk2")
  198.  
  199. (makedir "MaVi:Cache")
  200. (run "delete MaVi:Cache/#? all")
  201.  
  202. (complete 90)
  203.  
  204.     ; modify S:User-Startup
  205.  
  206. (startup "MaVi"
  207.     (prompt
  208.         "Einige Instruktionen müssen nun in die \"user-startup\" "
  209.         "eingefügt werden.")
  210.     (help "Ohne diese Instruktionen funktioniert MaVi nicht!")
  211.     (command
  212.         "ASSIGN MaVi: \"" installdest "\"\n"
  213.         "ASSIGN Images: MaVi:Images add\n"
  214.         "ASSIGN Libs: MaVi:Libs add\n"
  215.         "ASSIGN ImageCache: MaVi:Cache add\n"
  216.     )
  217. )
  218.  
  219.  
  220. (complete 100)
  221.  
  222. (message "MaVi wurde komplett installiert. Nach einem Neustart können Sie das System nutzen.")
  223.  
  224.     ; this is not strictly necessary, but doesn't hurt -- there is always
  225.     ; a default (exit) at the end of any script
  226. (exit)
  227.