home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / software / sviluppo / mccontrol / install / mccontrol.install < prev   
Text File  |  2000-02-09  |  24KB  |  644 lines

  1. ; $VER: MCControl.install 1.27 (03.01.00)
  2. ; Install script for MCControl (Workbench 2.0 or higher)
  3. ;
  4. (COMPLETE 0)
  5. ;(USER 2)
  6. (SET #ApplicationName "MCControl")
  7. (SET #ApplicationDir "sys:tools")
  8. (SET #ApplicationDir1 "sys:utilities")
  9. (SET #ApplicationDir2 "work:tools")
  10. (SET #ApplicationDir3 "tools:")
  11. (SET #ApplicationDir4 "work:utilities")
  12. (SET #ArchiveDir "/")
  13. (SET #Language -1)
  14. (SET #Documents -1)
  15. (SET #ApplicationKeyfile (CAT #ApplicationName ".key"))
  16. ;=============================================================================
  17. ; English strings
  18.  
  19. (SET default_lang 1)
  20.  
  21. (SET #bad-kick "You must have at least Workbench 2.0+")
  22. (SET #bad-installer
  23. (CAT "You have an old version of the program 'Installer' "
  24.      "on your Amiga!\n\nThe installation procedure needs at least Installer 42.9.\n\n"
  25.      "Please check your configuration!\n"
  26. ))
  27.  
  28. (SET #App-InstallMsg
  29. (CAT "\n\n%s Installation Script.\n\n"
  30.         "This script installs %s on your Amiga.\n\n"
  31.         "Read the guide file for more information\n"
  32.         " on the distribution of %s.\n\n"
  33.         "%s © 1995-2000 Guido Mersmann\n"
  34.         "All rights reserved."
  35. ))
  36. (SET #App-MainMode "Please choose mode:")
  37.  
  38. (SET #App-Where
  39. (CAT "Where would you like to install %s ?\n"
  40.         "(A drawer will be created)"
  41. ))
  42.  
  43. (SET #App-Update
  44. (CAT "\n\nA %s drawer does already exist in the selected "
  45.         " directory.\n\n By selecting \"Proceed\", you"
  46.         " indicate that you want to update the %s"
  47.         " installation with the most recent version.\n\n"
  48.         "Several %s specific files will be overwritten!"
  49. ))
  50.  
  51. (SET #App-Main "Which %s version should be installed ?")
  52. (SET #App-Main-help
  53. (CAT "The OS2.0+ version should only be used on Systems with OS2."
  54.      " The OS2.1+ and the OS3.0+ version need less Memory. Locale is required!"
  55.      " Special OS3.0+ functions are used to save more memory."
  56. ))
  57.  
  58. (SET #App-Language "Which languages should be installed ?")
  59. (SET #App-Language-help
  60. (CAT "\nThe Amiga can be operated in many different"
  61.           " languages."
  62.           "To reduce the amount of space consumed by the"
  63.           " language files, you can select to have only the"
  64.           " files of specific languages copied.\n\n"
  65.           "Simply check the boxes of the languages you wish"
  66.           " to have available on your system.\n\n"
  67.           @askoptions-help
  68. ))
  69.  
  70. (SET #App-Docs "Which Amiga-guide files should be installed ?")
  71.  
  72. (SET #App-Exit "\n\n%s installed !!\n\n%s can be found in your \"%s\" drawer (or partiton).")
  73. ;--------- DEINSTALLATION STRINGS
  74. (SET #App-DeInstallWhere "Where is the location of %s ?\n")
  75. (SET #App-Install "Install")
  76. (SET #App-DeInstall "Deinstall")
  77. (SET #bad-DeInstall "There is no %s installation at the specified position!")
  78. (SET #StartupRemove-prompt "\nRemove %s lines within your user-startup?")
  79. (SET #Deinstall-Done "\n%s is now deinstalled.")
  80. ;=============================================================================
  81. ; German strings
  82.  
  83. (IF (= @language "deutsch")
  84. (
  85. (SET default_lang 2)
  86.  
  87. (SET #bad-kick "Sie benötigen Workbench 2.0 oder größer")
  88. (SET #bad-installer
  89. (CAT "Achtung! Es ist eine alte Version des Programmes 'Installer' "
  90.      "auf Ihrem Amiga!\n\nDie Installation benötigt mindestens Installer 42.9.\n\n"
  91.      "Bitte überprüfen Sie Ihre Konfiguration!\n"
  92. ))
  93.  
  94. (SET #App-InstallMsg
  95. (CAT "\n%s Installationsskript.\n\n"
  96.         "Dieses Skript installiert oder deinstalliert\n"
  97.         "%s auf Ihrem Amiga.\n\n"
  98.         "Lesen Sie die Anleitungsdatei für weitere Informationen"
  99.         " über den Vertrieb von %s.\n\n"
  100.         "%s © 1999-2000 Guido Mersmann\n"
  101.         "Alle Rechte reserviert."
  102. ))
  103. (SET #App-MainMode "Wählen Sie den gewüschten Vorgang!")
  104.  
  105. (SET #App-Where
  106. (CAT "Wo möchten Sie %s installieren ?\n"
  107.         "(Ein Verzeichnis wird angelegt)"
  108. ))
  109.  
  110. (SET #App-Update
  111. (CAT "\nEin %s-Verzeichnis existiert im ausgewählen"
  112.         " Verzeichnis.\n\n Wenn Sie fortfahren,"
  113.         " bestätigen Sie, daß Sie die alte %s-Installation"
  114.         " mit der neuesten Version überschreiben wollen.\n\n"
  115.         "Verschiedene %s-Dateien (z.B überflüssige Dateien) werden falls nötig überschrieben!"
  116. ))
  117.  
  118. (SET #App-Main "Welche Version von %s möchten Sie installieren?")
  119. (SET #App-Main-help
  120. (CAT "Die OS2.0+ Version läuft unter allen Systemen ab OS2.0."
  121.      " Die OS2.1+ Version hat den Nutzen, daß sie weniger Resourcen"
  122.      " benutzt, wenn sich %s im Hintergrund befindet. Dazu MUß"
  123.      " die Locale.library eingebunden sein. Für die OS3.0+ gilt das Selbe"
  124.      " wie für die OS2.1 Verison. Es werden OS3.0+ Routinen benutzt, die"
  125.      " weiteren Speicher sparen."
  126. ))
  127.  
  128. (SET #App-Language "Welche Sprachen sollen installiert werden ?")
  129.  
  130. (SET #App-Language-help
  131. (CAT "\nDer Amiga kann in vielen verschiedenen Sprachen"
  132.          " arbeiten. Um Plattenkapazität zu sparen können Sie"
  133.          " nur die Sprachen anwählen, die sie benötigen"
  134.          " Haken Sie also einfach die Sprachen ab, die Sie"
  135.          " Ihrem System zugänglich machen wollen."
  136.           @askoptions-help
  137. ))
  138.  
  139. (SET #App-Docs "Welche Anleitungs- und Informationsdateien wollen Sie installieren ?")
  140.  
  141. (SET #App-Exit "\n\n%s installiert!!\n\nSie finden %s im Verzeichnis \"%s\"")
  142. ;------- DEINSTALL STRINGS
  143. (SET #App-DeinstallWhere "Wo liegt %s auf Ihrer Platte ?\n")
  144. (SET #App-Install "%s Installieren")
  145. (SET #App-DeInstall "%s Deinstallieren")
  146. (SET #bad-DeInstall "Es gibt keine %s Installation an der angegeben Position")
  147. (SET #StartupRemove-prompt "\n\nDie zu %s gehörenden Einträge in der User-startup werden gelöscht!")))
  148. (SET #Deinstall-Done "\n%s ist jetzt deinstalliert!")
  149. ;=============================================================================
  150. ; Español strings
  151.  
  152. (IF (= @language "español")
  153. (
  154. (SET default_lang 8)
  155.  
  156. (SET #bad-kick "Necesitas al menos Workbench 2.0+")
  157. (SET #bad-installer
  158. (CAT "Tienes una versión antigua del 'Installer' "
  159.      "en tu Amiga!\n\nEl proceso de instalación requiere al menos el Installer 42.9.\n\n"
  160.      "Revisa tu configuración!\n"
  161. ))
  162.  
  163. (SET #App-InstallMsg
  164. (CAT "\n\nGuión de instalación de %s .\n\n"
  165.         "Este script instala %s en tu Amiga.\n\n"
  166.         "Lee el amigaguide para más información\n"
  167.         " sobre la distribución de %s.\n\n"
  168.         "%s © 1995-2000 Guido Mersmann\n"
  169.         "Todos los derechos reservados."
  170. ))
  171. (SET #App-MainMode "Elige uno de los modos:")
  172.  
  173. (SET #App-Where
  174. (CAT "¿ Dónde quieres instalar %s ?\n"
  175.         "(Un cajón será creado)"
  176. ))
  177.  
  178. (SET #App-Update
  179. (CAT "\n\nYa existe un cajón %s en ese"
  180.         " directorio.\n\n Si seleccionas \"Seguir\","
  181.         " actualizarás la instalación %s"
  182.         " con la versión más reciente.\n\n"
  183.         "!Algunos ficheros específicos de %s serán sobreescritos¡"
  184. ))
  185.  
  186. (SET #App-Main "¿ Qué versión de %s quieres instalar ?")
  187. (SET #App-Main-help
  188. (CAT "La versión OS2.0+ sólo debería funcionar bajo sistemas con OS2."
  189.      " Las versiones OS2.1+ y OS3.0+ requieren menos Memoria. Necesitas Locale!"
  190.      " Algunas funciones del OS3.0+ reducen el consumo de memoria."
  191. ))
  192.  
  193. (SET #App-Language "¿ Qué lenguajes quieres instalar ?")
  194. (SET #App-Language-help
  195. (CAT "\nRl Amiga puede trabajar en numerosos lenguajes"
  196.           " diferentes."
  197.           "Parar reducir la cantidad de espacio necesaria para los"
  198.           " ficheros de lenguaje, puedes copiar sólo"
  199.           " los lenguajes específicos.\n\n"
  200.           "Marca las cajas de los lenguajes que quieras"
  201.           " tener disponibles en tu sistema.\n\n"
  202.           @askoptions-help
  203. ))
  204.  
  205. (SET #App-Docs "¿Qué Amiga-guides queres instalar ?")
  206.  
  207. (SET #App-Exit "\n\n%s instalado !!\n\n%s está en el cajón \"%s\" (o partición).")
  208. ;--------- DEINSTALLATION STRINGS
  209. (SET #App-DeInstallWhere "¿ En qué directorio está %s ?\n")
  210. (SET #App-Install "Instalar")
  211. (SET #App-DeInstall "Desinstalar")
  212. (SET #bad-DeInstall "No hay instalación de %s en el lugar indicado")
  213. (SET #StartupRemove-prompt "\n¿ Elimino las líneas %s de tu fichero user-startup ?")
  214. (SET #Deinstall-Done "\n%s ha sido desinstalado.")
  215. ;---------
  216. ))
  217. ;----------------------------------------------------------------------------
  218. ;----------------------------------------------------------------------------
  219. ;       P_Requirements
  220. ;----------------------------------------------------------------------------
  221. ;----------------------------------------------------------------------------
  222. (PROCEDURE P_Requirements
  223. ; Workbench 37 or better required
  224. (IF (< (/ (getversion) 65536) 37)
  225. (
  226.   (abort #bad-kick)
  227. )
  228. )
  229. ; Installer 42.9 or better required
  230. (if (< @installer-version 2752521)
  231. (
  232. (abort #bad-installer)
  233. )
  234. ) ;if
  235. ) ;PROCDURE
  236. ;----------------------------------------------------------------------------
  237. ;----------------------------------------------------------------------------
  238. ;       P_DeInstall
  239. ;----------------------------------------------------------------------------
  240. ;----------------------------------------------------------------------------
  241. (PROCEDURE P_DeInstall #InstallerMode
  242.  
  243. (SET #Dummy             (ASKCHOICE
  244.                         (PROMPT #App-MainMode)
  245.                         (HELP @askchoice-help)
  246.                         (CHOICES
  247.                                 (#App-Install #ApplicationName)
  248.                                 (#App-Deinstall #ApplicationName)
  249.                         )
  250.                         ;(DEFAULT #Documents)
  251.                         )
  252. )
  253. ) ;PROCDURE
  254. ;----------------------------------------------------------------------------
  255. ;----------------------------------------------------------------------------
  256. ;       GetApplicationDir
  257. ;----------------------------------------------------------------------------
  258. ;----------------------------------------------------------------------------
  259. (PROCEDURE P_GetApplicationDir
  260. (SET #Dummy #ApplicationDir)
  261. (if (= (exists (TACKON #ApplicationDir1 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir1))
  262. (if (= (exists (TACKON #ApplicationDir2 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir2))
  263. (if (= (exists (TACKON #ApplicationDir3 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir3))
  264. (if (= (exists (TACKON #ApplicationDir4 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir4))
  265.  
  266. (SET #ApplicationDir
  267.         (TACKON
  268.                 (ASKDIR
  269.                         (PROMPT (#App-Where #ApplicationName))
  270.                         (HELP @askdir-help)
  271.                         (default #Dummy)
  272.                 )
  273.                 #ApplicationName
  274.         )
  275. )
  276. (SET @default-dest #ApplicationDir)
  277. ) ;PROCEDURE
  278. ;----------------------------------------------------------------------------
  279. ;----------------------------------------------------------------------------
  280. ;       GetDeinstallDir
  281. ;----------------------------------------------------------------------------
  282. ;----------------------------------------------------------------------------
  283. (PROCEDURE P_GetDeInstallDir
  284. (SET #Dummy #ApplicationDir)
  285. (if (= (exists (TACKON #ApplicationDir1 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir1))
  286. (if (= (exists (TACKON #ApplicationDir2 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir2))
  287. (if (= (exists (TACKON #ApplicationDir3 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir3))
  288. (if (= (exists (TACKON #ApplicationDir4 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir4))
  289.  
  290. (SET #ApplicationDir
  291.                 (ASKDIR
  292.                         (PROMPT (#App-DeInstallWhere #ApplicationName))
  293.                         (HELP @askdir-help)
  294.                         (default #Dummy)
  295.                 )
  296. )
  297.          (SET #Dummy (EXISTS (TACKON #Applicationdir #ApplicationName)))
  298.  
  299.         (Select #Dummy
  300.          (abort (#bad-DeInstall #ApplicationName))
  301.          (SET #Applicationdir #Applicationdir)
  302.          (SET #Applicationdir (TACKON #Applicationdir #ApplicationName))
  303.         ) ;Select
  304. (SET @default-dest #ApplicationDir)
  305.  
  306. ) ;PROCEDURE
  307. ;----------------------------------------------------------------------------
  308. ;----------------------------------------------------------------------------
  309. ;       Ask for Catalogs
  310. ;----------------------------------------------------------------------------
  311. ;----------------------------------------------------------------------------
  312. (PROCEDURE P_AskCatalogs #Language
  313.  
  314. (SET #Dummy     (ASKOPTIONS
  315.                 (PROMPT #App-Language)
  316.                 (HELP #App-Language-help)
  317.                 (CHOICES
  318.                         "English"
  319.                         "Deutsch"
  320.                         "Français"
  321.                         "Español")
  322.                 (DEFAULT default_lang)
  323.         )
  324. )
  325. ) ;PROCEDURE
  326. ;----------------------------------------------------------------------------
  327. ;----------------------------------------------------------------------------
  328. ;       Copy Selected Catalogs
  329. ;----------------------------------------------------------------------------
  330. ;----------------------------------------------------------------------------
  331. (PROCEDURE P_CopyCatalogs #Language
  332. (SET n 0)
  333. (SET #DestinationRoot (TACKON #ApplicationDir "Catalogs"))
  334. (SET #SourceRoot (TACKON #ArchiveDir "Catalogs"))
  335. (MAKEDIR #DestinationRoot)
  336.  
  337. (while (< n 4)
  338.         (SET #Dummy (SELECT n "english" "deutsch" "français" "español"))
  339.         (
  340.                 (IF (IN #Language n)
  341.                 (
  342.         (MAKEDIR (TACKON #DestinationRoot #Dummy))
  343.                         (COPYFILES
  344.                                 (SOURCE (TACKON #SourceRoot #Dummy))
  345.                                 (DEST (TACKON #DestinationRoot #Dummy))
  346.                                 (HELP @copyfiles-help)
  347.                                 (ALL)
  348.                         )
  349.                 )
  350.                 )
  351.         )
  352. (SET n (+ n 1))
  353. )
  354. ) ;PROCEDURE
  355. ;----------------------------------------------------------------------------
  356. ;----------------------------------------------------------------------------
  357. ;       Ask for docs
  358. ;----------------------------------------------------------------------------
  359. ;----------------------------------------------------------------------------
  360. (PROCEDURE P_AskDocs #Documents
  361. (SET #Dummy             (ASKOPTIONS
  362.                         (PROMPT #App-Docs)
  363.                         (HELP @askoptions-help)
  364.                         (CHOICES
  365.                                 "english"
  366.                                 "deutsch"
  367.                         )
  368.                         (DEFAULT default_lang)
  369.                   )
  370. )
  371. ) ;PROCEDURE
  372. ;----------------------------------------------------------------------------
  373. ;----------------------------------------------------------------------------
  374. ;       Copy docs
  375. ;----------------------------------------------------------------------------
  376. ;----------------------------------------------------------------------------
  377. (PROCEDURE P_CopyDocs #Documents
  378. (SET n 0)
  379. (SET #DestinationRoot (TACKON #ApplicationDir "Docs"))
  380. (SET #SourceRoot (TACKON #ArchiveDir "Docs"))
  381. (MAKEDIR #DestinationRoot)
  382.  
  383. (while (< n 2)
  384.         (SET #Dummy (SELECT n
  385.                 "english"
  386.                 "deutsch"
  387.         )
  388.         )
  389.         (
  390.                 (IF (IN #Documents n)
  391.                 (
  392.         (MAKEDIR (TACKON #DestinationRoot #Dummy))
  393.                         (COPYFILES
  394.                                 (SOURCE (TACKON #SourceRoot #Dummy))
  395.                                 (DEST (TACKON #DestinationRoot #Dummy))
  396.                                 (HELP @copyfiles-help)
  397.                                 (INFOS)
  398.                                 (ALL)
  399.                         )
  400.                 )
  401.                 )
  402.         )
  403. (SET n (+ n 1))
  404. )
  405. ) ;PROCEDURE
  406. ;----------------------------------------------------------------------------
  407. ;----------------------------------------------------------------------------
  408. ;       Copy_Dir (Dir)
  409. ;----------------------------------------------------------------------------
  410. ;----------------------------------------------------------------------------
  411. (PROCEDURE P_CopyDir #Dummy
  412.  
  413. (SET #DestinationRoot (TACKON #ApplicationDir #Dummy))
  414. (SET #SourceRoot (TACKON #ArchiveDir #Dummy))
  415. (MAKEDIR #DestinationRoot)
  416.  
  417.                    (COPYFILES
  418.         (SOURCE #SourceRoot)
  419.         (DEST #DestinationRoot)
  420.         (HELP @copyfiles-help)
  421.         (OPTIONAL <force>)
  422.         (ALL)
  423.         (INFOS)
  424.                    )
  425. ) ;PROCEDURE
  426. ;----------------------------------------------------------------------------
  427. ;----------------------------------------------------------------------------
  428. ;       Copy_File (Name)
  429. ;----------------------------------------------------------------------------
  430. ;----------------------------------------------------------------------------
  431. (PROCEDURE P_CopyFile #Dummy
  432.  
  433. (if (<> (exists (TACKON #ArchiveDir #Dummy) (noreq)) 0) 
  434. (
  435.                    (COPYFILES
  436.         (SOURCE (TACKON #ArchiveDir #Dummy))
  437.         (DEST #ApplicationDir)
  438.         (HELP @copyfiles-help)
  439.         (OPTIONAL <force>)
  440.         (ALL)
  441.         (INFOS)
  442.                    )
  443. )
  444. ) ;If
  445. ) ;PROCEDURE
  446. ;----------------------------------------------------------------------------
  447. ;----------------------------------------------------------------------------
  448. ;       P_Update
  449. ;----------------------------------------------------------------------------
  450. ;----------------------------------------------------------------------------
  451. (PROCEDURE P_Update
  452. (if (= (exists #ApplicationDir) 2)
  453.         (message (#App-Update #ApplicationName #ApplicationName #ApplicationName))
  454. )
  455. ) ;PROCEDURE
  456. ;----------------------------------------------------------------------------
  457. ;----------------------------------------------------------------------------
  458. ;       P_AskBinary
  459. ;----------------------------------------------------------------------------
  460. ;----------------------------------------------------------------------------
  461. (PROCEDURE P_AskBinary
  462. (set #Dummy (/ (getversion) 65536))
  463.  
  464. (if (= #Dummy 37) (set #Binary 0))
  465. (if (= #Dummy 38) (set #Binary 1))
  466. (if (>= #Dummy 39) (set #Binary 2))
  467.  
  468. (set #Binary (askchoice
  469.         (prompt (#App-Main #ApplicationName))
  470.         (help (#App-Main-help #ApplicationName))
  471.         (choices
  472.         "OS2.0+"
  473.                         "OS2.1+"
  474.                         "OS3.0+"
  475.                         )
  476.         (default #Binary)
  477.             )
  478. )
  479. ) ;PROCEDURE
  480. ;----------------------------------------------------------------------------
  481. ;----------------------------------------------------------------------------
  482. ;       P_CopyBinary
  483. ;----------------------------------------------------------------------------
  484. ;----------------------------------------------------------------------------
  485. (PROCEDURE P_CopyBinary #Dummy
  486.  
  487. (set #BinaryName (SELECT #Binary #Dummy (CAT "Bin/" #Dummy "_OS21") (CAT "Bin/" #Dummy "_OS30")))
  488. (copyfiles
  489.         (source (tackon #ArchiveDir #BinaryName) (infos))
  490.         (dest #ApplicationDir)
  491.         (newname #Dummy)
  492.         (help @copyfiles-help)
  493.         (optional <force>)
  494. )
  495. ) ;PROCEDURE
  496. ;----------------------------------------------------------------------------
  497. ;----------------------------------------------------------------------------
  498. ;       P_KeyFile
  499. ;----------------------------------------------------------------------------
  500. ;----------------------------------------------------------------------------
  501. (PROCEDURE P_KeyFile
  502.  
  503. (SET #Dummy (tackon (tackon #ArchiveDir "Keyfile") #ApplicationKeyfile))
  504.  
  505. (if (<> (exists #Dummy (noreq)) 0) ((P_CopyDir "KeyFile"))
  506. )
  507. ) ;PROCEDURE
  508. ;----------------------------------------------------------------------------
  509. ;----------------------------------------------------------------------------
  510. ;       P_CopyArchiveIcon
  511. ;----------------------------------------------------------------------------
  512. ;----------------------------------------------------------------------------
  513. (PROCEDURE P_CopyArchiveIcon
  514.                    (COPYFILES
  515.         (SOURCE (CAT (CAT (TACKON #ArchiveDir "/") #ApplicationName) ".info"))
  516.         (DEST (TACKON #ApplicationDir "/"))
  517.         (HELP @copyfiles-help)
  518.                    )
  519. ) ;PROCEDURE
  520. ;----------------------------------------------------------------------------
  521. ;----------------------------------------------------------------------------
  522. ;       P_AskBool
  523. ;----------------------------------------------------------------------------
  524. ;----------------------------------------------------------------------------
  525. (PROCEDURE P_AskBool #dummy
  526.  (SET #dummy (ASKBOOL      (prompt #dummy)
  527.            (help @askbool-help)
  528.            (default 1)
  529.              )
  530.  )
  531. ) ;PROCEDURE
  532. ;----------------------------------------------------------------------------
  533. ;----------------------------------------------------------------------------
  534. ;       MAIN
  535. ;----------------------------------------------------------------------------
  536. ;----------------------------------------------------------------------------
  537. (P_Requirements)
  538. (message (#App-installmsg #ApplicationName #ApplicationName #ApplicationName #ApplicationName))
  539. (SET #InstallerMode (P_DeInstall))
  540. (welcome)
  541. ;-----------------------------------------------
  542. (IF (= #InstallerMode "0")
  543. (
  544. ;-----------------------------------------------
  545.  (SET #ApplicationDir (P_GetApplicationDir))
  546.  
  547. (COMPLETE 1)
  548.  (P_Update)
  549.  (SET #Binary (P_AskBinary))
  550. (COMPLETE 2)
  551.  (SET #Language (P_AskCatalogs #Language))
  552. (COMPLETE 3)
  553.  (SET #Documents (P_AskDocs #Documents))
  554. (COMPLETE 4)
  555.  
  556. ;***** Delete old Data and Prefs
  557. (MAKEDIR #ApplicationDir)
  558. (MAKEDIR (TACKON #ApplicationDir "Prefs"))
  559. (MAKEDIR (TACKON #ApplicationDir "SaveGames"))
  560.  
  561. (COMPLETE 10)
  562. (DELETE (TACKON #ApplicationDir "bin") (optional FORCE) (ALL))
  563.  (P_CopyBinary #ApplicationName)
  564. (COMPLETE 20)
  565. (DELETE (TACKON #ApplicationDir "catalogs") (optional FORCE) (ALL))
  566.  (P_CopyCatalogs #Language)
  567. (COMPLETE 30)
  568. (DELETE (TACKON #ApplicationDir "docs") (optional FORCE) (ALL))
  569.  (P_CopyDocs #Documents)
  570. (COMPLETE 40)
  571.  (P_CopyDir "Modules")
  572. (COMPLETE 50)
  573.  (P_CopyDir "MemoryCards")
  574. (COMPLETE 60)
  575.  (P_CopyDir "DefaultCards")
  576. (COMPLETE 70)
  577.  (P_CopyDir "Patches")
  578.  (P_CopyDir "Docs/Pictures")
  579.  (P_Keyfile)
  580. (COMPLETE 80)
  581.  (P_CopyArchiveIcon)
  582.  (P_CopyFile "MCControl.info")
  583.  (P_CopyFile "Docs.info")
  584.  (P_CopyFile "Warning")
  585.  
  586. (COMPLETE 90)
  587. ;-----
  588. (DELETE (TACKON #ApplicationDir "Modules.info"))
  589. (DELETE (TACKON #ApplicationDir "MemoryCards.info"))
  590. (DELETE (TACKON #ApplicationDir "DefaultCards.info"))
  591. (DELETE (TACKON #ApplicationDir "Patches.info"))
  592.  
  593. (DELETE (TACKON #ApplicationDir "Prefs.info"))
  594. (DELETE (TACKON #ApplicationDir "SaveGames.info"))
  595. (run "c:avail Flush")
  596. (COMPLETE 100)
  597. (message (#App-exit #ApplicationName #ApplicationName #ApplicationDir))
  598. (exit (QUIET))
  599. ;-----------------------------------------------
  600. )) ;IF #InstallerMode = 0
  601. ;-----------  Deinstallation -------------------
  602. (IF (= #InstallerMode "1") (
  603.  
  604. (SET #ApplicationDir (P_GetDeInstallDir))
  605.  
  606. (COMPLETE 20)
  607. (DELETE (TACKON #ApplicationDir "Modules") (optional FORCE) (ALL))
  608. (DELETE (TACKON #ApplicationDir "DefaultCards") (optional FORCE) (ALL))
  609. (DELETE (TACKON #ApplicationDir "Patches") (optional FORCE) (ALL))
  610. (COMPLETE 30)
  611. (DELETE (TACKON #ApplicationDir "Docs") (optional FORCE) (ALL))
  612. (DELETE (TACKON #ApplicationDir "Docs.info" (optional FORCE) ))
  613. (COMPLETE 40)
  614. (DELETE (TACKON #ApplicationDir "Install") (optional FORCE) (ALL))
  615. (DELETE (TACKON #ApplicationDir "Install.info" (optional FORCE) ))
  616. (COMPLETE 50)
  617. (DELETE (TACKON #ApplicationDir "Catalogs") (optional FORCE) (ALL))
  618. (COMPLETE 60)
  619. (DELETE (TACKON #ApplicationDir "Bin") (optional FORCE) (ALL))
  620. (COMPLETE 70)
  621. (DELETE (TACKON #ApplicationDir "Prefs") (optional FORCE) (ALL))
  622. (COMPLETE 80)
  623. (DELETE (TACKON #ApplicationDir "MCControl") (optional FORCE))
  624. (DELETE (TACKON #ApplicationDir "MCControl.info" (optional FORCE) ))
  625. (DELETE (TACKON #ApplicationDir "Warning") (optional FORCE))
  626. (DELETE (TACKON #ApplicationDir "Warning.info" (optional FORCE) ))
  627. (COMPLETE 90)
  628. (DELETE (TACKON #ApplicationDir "MemoryCards/example.mcd") (optional FORCE))
  629.  
  630. (DELETE (TACKON #ApplicationDir "MemoryCards"))
  631. (DELETE (TACKON #ApplicationDir "SaveGames"))
  632. (DELETE #ApplicationDir)
  633. (DELETE (CAT #ApplicationDir ".info"))
  634.  
  635. (COMPLETE 100)
  636.  
  637. (Message (#Deinstall-Done #ApplicationName))
  638. (exit (QUIET))
  639.  
  640. ;-----------------------------------------------
  641. )) ;IF #InstallerMode = 1
  642. ;-----------------------------------------------
  643.  
  644.