home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #3 / amigamamagazinepolishissue1998.iso / bazy / scion407 / install next >
Text File  |  1995-07-08  |  39KB  |  1,137 lines

  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;;
  3. ;;; Install Scion Genealogist Version 4
  4. ;;;
  5. ;;; $VER: Install_Scion 1.0 (1 Apr 1995)
  6. ;;;
  7. ;;; This is the installation script for Scion Genealogist version 4.
  8. ;;;
  9. ;;; Copyright © 1993-1995 Robbie J Akins, Wellington, New Zealand.
  10. ;;; All Rights Reserved
  11. ;;;
  12. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  13. (set TESTING 0) ; 1 = test mode (relatively safe, 0 = distribution mode
  14.  
  15. (if (= TESTING 1)
  16.     (user 2))    ; Force "expert" mode regardless of installer defaults. Naughty!
  17.  
  18. (set @user-level 2) ; "Expert" mode preferred
  19.  
  20. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  21. ;;;
  22. ;;; Initialize variables
  23. ;;;
  24. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  25. ;
  26. (set ProgramName    "Scion Genealogist")        ; programme name
  27. (set ProgramBaseName    "Scion")            ; programme base name
  28. (set VersionNum        "4.07")                ; programme version number
  29.  
  30. (set PrefsName        "Scion Preferences")        ; preferences programme name
  31. (set PrefsBaseName    "ScionPrefs")            ; preferences programme base name
  32. (set PrefsVersionNum    "1.06")                ; preferences programme version number
  33.  
  34. (set ArchiveName    "ScionSupport.lha")        ; archive name
  35. (set ArchiveLocn    "")                ; archive location
  36. (set ScionArchive (tackon ArchiveLocn ArchiveName))
  37.  
  38. (set ArexxArchiveName    "ScionArexx.lha")        ; archive name
  39. (set ArexxArchiveLocn    "")                ; archive location
  40. (set ArexxArchive (tackon ArexxArchiveLocn ArexxArchiveName))
  41.  
  42. (set InstallScion    0)        ; 1 = install, 0 = don't install
  43. (set InstallPrefs    0)        ; 1 = install, 0 = don't install
  44. (set InstallArexx    0)        ; 1 = install, 0 = don't install
  45. (set InstallOnlineHelp    0)        ; 1 = install, 0 = don't install
  46. (set InstallExample    0)        ; 1 = install, 0 = don't install
  47. (set InstallReadMe    0)        ; 1 = install, 0 = don't install
  48. (set InstallScionCats    0)        ; 1 = install, 0 = don't install
  49. (set InstallPrefsCats    0)        ; 1 = install, 0 = don't install
  50.  
  51. (set InstallEnglish    0)        ; 1 = install, 0 = don't install
  52. (set InstallDutch    0)        ; 1 = install, 0 = don't install
  53. (set InstallGerman    0)        ; 1 = install, 0 = don't install
  54. (set InstallNorwegian    0)        ; 1 = install, 0 = don't install
  55. (set InstallItalian    0)        ; 1 = install, 0 = don't install
  56. (set InstallSwedish    0)        ; 1 = install, 0 = don't install
  57. (set InstallFrench    0)        ; 1 = install, 0 = don't install
  58. (set Localised        0)        ; 1 = localised, 0 = only english
  59.  
  60. ; Set whether wish to confirm lha extraction was okay
  61. (set xconfirmCopy    0)        ; 1 = don't confirm, 0 = confirm
  62. (set delscionarchive 0)            ; 1 = delete archive, 0 = don't
  63. (set delarexxarchive 0)            ; 1 = delete archive, 0 = don't
  64.  
  65. ;
  66. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  67. ;;;
  68. ;;; English and foreign language messages and "variables"
  69. ;;;
  70. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  71. ;
  72. ; NOTE: The next three variables must appear before the rest of the strings
  73. (set #ArexxScripts    "ARexx Scripts")
  74. (set #OnLineHelp    "On-line Help")
  75. (set #Example        "Example Database")
  76. (set #CatFiles        "Language Support Files")
  77. (set #ReadmeFiles    "Documentation Files")
  78.  
  79. (set #copyingscion    "Copying the Scion archive to RAM:...")
  80. (set #copyingarexx    "Copying the ARexx archive to RAM:...")
  81. (set #copy_err1        "An error occurred during the copying of %s")
  82. (set #err_msg (cat    "\n\n"
  83.             "Press the Proceed button to stop the installation procedure.\n"))
  84. (set #install_msg (cat "\n\nScion Genealogist installation script.\n\n"
  85.             "This script installs Scion Genealogist\n"
  86.             (" Version %s on your Amiga, " VersionNum)
  87.             "along with associated support files.\n\n"
  88.             "Scion Genealogist © 1993-1995 Robbie Akins\n"
  89.             "All rights reserved."))
  90.  
  91. (set #dirselect        "Please select the directory where you want to install %s.")
  92. (set #prevselect (cat    "Please chose the location where %s is currently located "
  93.             "so that %s can be installed in the correct location."))
  94. (set #setDirPathHelp (cat "This part of the installation is asking you where you "
  95.             "would like to place %s.\n\nFor current %s owners, you "
  96.             "should select the directory that is the current location "
  97.             "of %s. If you choose a different location, then the "
  98.             "current (existing) module(s) will be in a different "
  99.             "place than the newly-installed module(s).\n"))
  100.  
  101. (set #setPrevLocHelp (cat "This part of the installation is asking you where "
  102.             "to place %s.\n\nFor current %s owners, you must "
  103.             "select the directory that is the current location "
  104.             "of %s. If you choose a different location, then the "
  105.             "%s will not be installed in the correct place and "
  106.             "hence will not be available.\n\nYou CAN install "
  107.             "%s before installing %s, but you must select the "
  108.             "directory where you eventually intend to install %s.\n"))
  109. (set #setPrevLocHelp (#setPrevLocHelp #OnLineHelp ProgramName ProgramName #OnLineHelp #OnLineHelp ProgramName ProgramName))
  110. (set #pathhelpextra (cat "\n"
  111.             "NOTE: If you will using the Installer program's "
  112.             "function to create a new directory (using \"Make New Drawer...\"), "
  113.             "it is highly recommended that you DO NOT include "
  114.             "spaces in the drawer name.  Following this advice "
  115.             "will avoid any problems accessing the directory, "
  116.             "especially from ARexx scripts.\n"
  117.             "\n"
  118.             @askdir-help))
  119. (set #installing "Installing...")
  120.  
  121. (set #lha_error1     "Error decompressing %s from %s into the %s directory.\n")
  122. (set #lha_error2 (cat    "\n"
  123.             "Be sure that the directory you have specified as the "
  124.             "destination exists and has enough free space in it "
  125.             "to accept new files. Also be sure that if the file to "
  126.             "be copied already exists, that the existing file "
  127.             "isn't protected from being overwritten or deleted."))
  128. (set #ver_err1        ("\%s version %s requires at least AmigaOS 2.04 to run." ProgramName VersionNum))
  129. (set #installoptions (cat ("Select the parts of the %s package you want to install " ProgramName)
  130.             "at this time."))
  131. (set #installopthelp (cat "This part of the installation procedure lets you select the "
  132.             "parts of the distribution you want to install at this time.\n"
  133.             "\n"
  134.             @askoptions-help))
  135. (set #languageoptions (cat "Select those languages that you want to install at this time.\n\n"
  136.             "NOTE: Not all languages are fully supported."))
  137. (set #languageopthelp (cat "This part of the installation procedure lets you select the "
  138.             "languages that you want to install at this time.\n\n"
  139.             "Not all languages are fully supported, so even if you "
  140.             "select a particular language, on-line help and/or "
  141.             "'localization' may not actually be available at this "
  142.             "time. If you would like to help with a translation, "
  143.             "please contact the author.\n\n"
  144.             @askoptions-help))
  145. (set #libcopy         "Copying %s to %s")
  146. (set #copyLibFileHelp (cat "If you already have a copy of this library in the "
  147.             "selected destination directory, the library included "
  148.             "on the distribution disk will be compared to the one "
  149.             "you already have. If your current library is an old "
  150.             "version, the newer version will be installed.\n\n"
  151.             @copylib-help))
  152. (set #makedir         "The directory that has been specified does not exist and is about to be created.")
  153. (set #nolocale        "\n\n\nYour computer does not have support for languages other than English, and so only the English version of the distribution will be installed.")
  154. (set #fontprompt (cat    "\n\nDo you want to install \"sciongen.font\"?\n\nIt is not "
  155.             "required, but makes the user-interfaces look better!"))
  156. (set #fonthelp1 (cat    "\"sciongen.font\" is not required for %s to function, "
  157.             "however, it makes the user-interface look a lot better "
  158.             "if you do decide to install it."))
  159. (set #fonthelp        (#fonthelp1 programname))
  160. (set #oldscionprompt (cat "\n\nYou currently have version %ld.%s of %s installed "
  161.                         "in the directory you have selected. Do you want to "
  162.             "replace it with version %s?"))
  163. (set #oldscionhelp (cat "The directory that you have selected already has a "
  164.                         "copy of %s installed. If you wish to overwrite this "
  165.             "existing copy with version %s, select \"Yes\". "
  166.             "If you select \"No\", you will be asked to once again "
  167.             "select the location where you want to install the "
  168.             "programme. Select another destination if you do not "
  169.             "want to overwrite your existing copy."))
  170.  
  171. ;=============================================================================
  172. ; Dutch strings
  173. ;
  174. (if (= @language "nederlands")
  175. ;(
  176. ; Include the Dutch versions of above strings in here.
  177. ;)
  178. )
  179. ;
  180. ;=============================================================================
  181. ; German strings
  182. ;
  183. (if (= @language "deutsch")
  184. ;(
  185. ; Include the German versions of above strings in here.
  186. ;)
  187. )
  188. ;
  189. ;=============================================================================
  190. ; Norwegian strings
  191. ;
  192. (if (= @language "norsk")
  193. ;(
  194. ; Include the Norwegian versions of above strings in here.
  195. ;)
  196. )
  197. ;
  198. ;=============================================================================
  199. ; Italian strings
  200. ;
  201. (if (= @language "italiano")
  202. ;(
  203. ; Include the Italian versions of above strings in here.
  204. ;)
  205. )
  206. ;
  207. ;=============================================================================
  208. ; Swedish strings
  209. ;
  210. (if (= @language "svenska")
  211. ;(
  212. ; Include the Swedish versions of above strings in here.
  213. ;)
  214. )
  215. ;
  216. ;=============================================================================
  217. ; French strings
  218. ;
  219. (if (= @language "français")
  220. ;(
  221. ; Include the French versions of above strings in here.
  222. ;)
  223. )
  224. ;
  225. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  226. ;;;
  227. ;;; Some useful procedures
  228. ;;;
  229. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  230. ;
  231. ;
  232. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  233. ;;;
  234. ;;; Ask the user for a directory name.
  235. ;;;
  236. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  237. ;
  238. ; INPUTS:
  239. ;    SDP_ModuleName    ; Name of 'module' to install
  240. ;    SDP_DefDir        ; Default directory to start with
  241. ;
  242. ;    #setDirPathHelp   ; Any help text. Note: This is set globally at the start.
  243. ;
  244. ; OUTPUTS:
  245. ;    SDP_DirPath       ; The selected directory
  246. ;
  247. (procedure setDirPath
  248.     (
  249.     (set moveon    FALSE)
  250.     (while (NOT moveon)
  251.         (
  252.         (set SDP_DirPath
  253.             (askdir    (prompt    (#dirselect SDP_ModuleName))
  254.                 (help (#setDirPathHelp SDP_ModuleName ProgramBaseName SDP_ModuleName) #pathhelpextra)
  255.                 (default SDP_DefDir)
  256.                 (newpath)
  257.             )
  258.         )
  259.  
  260.         ; Don't try and create directory in pretend mode (gets stuck in a loop!)
  261.         (if (<> @pretend 1)
  262.             (
  263.                 (if (= (exists SDP_DirPath) 0)
  264.                     (makedir SDP_DirPath
  265.                         (prompt #makedir)
  266.                         (help @makedir-help)
  267.                         (confirm)
  268.                         (infos)
  269.                     )
  270.                     (set moveon    TRUE)
  271.                 )
  272.             )(set moveon TRUE))
  273.         )
  274.     )
  275.     )
  276. )
  277.  
  278. ;
  279. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  280. ;;;
  281. ;;; Ask user where Scion was previously installed so help can be installed correctly
  282. ;;;
  283. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  284. ;
  285. ; INPUTS:
  286. ;    SPL_ModuleName    ; Name of 'module' to install (#OnLineHelp)
  287. ;    SPL_DefDir        ; Default directory to start with
  288. ;
  289. ;    #setPrevLocHelp   ; Any help text. Note: This is set globally at the start.
  290. ;
  291. ; OUTPUTS:
  292. ;    SPL_DirPath       ; The selected directory
  293. ;
  294. (procedure setPrevLoc
  295.     (
  296.     (set SPL_DirPath
  297.         (askdir    (prompt    (#prevselect ProgramName SPL_ModuleName))
  298.             (help (#setPrevLocHelp))
  299.             (default SPL_DefDir))
  300.         )
  301.     )
  302. )
  303.  
  304. ;
  305. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  306. ;;;
  307. ;;; Extract a file from an 'lha' archive file using 'lx'
  308. ;;;
  309. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  310. ;
  311. ; INPUTS:
  312. ;    xarcFileName    ; Name of archive (eg "fred.lha")
  313. ;    xsrcFileName    ; Name of file within archive (including "internal" dir structure)
  314. ;    xdestDirName    ; "Base" location to copy file to (will recreate "internal"
  315. ;                      dir structure of archive)
  316. ;    xconfirmCopy    ; 0 = confirm extraction okay, else don't confirm
  317. ;
  318. (procedure extractLhaFile2Dir
  319.     (
  320.     (set lha_rc (run ("lx -qf x %s \"%s\" \"%s\"" xarcFileName xsrcFileName xdestDirName)))
  321.     (if (<> lha_rc 0)
  322.         (message
  323.             (#lha_error1 xsrcFileName xarcFileName xdestDirName) #lha_error2
  324.         )
  325.     )
  326.     (if (= 0 xconfirmCopy)
  327.         (
  328.         (if (= 0 (exists (tackon xdestDirName xsrcFileName)))
  329.             (abort (#copy_err1 xsrcFileName) #err_msg)
  330.         )
  331.     )
  332.     )
  333.     )
  334. )
  335.  
  336. ;
  337. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  338. ;;;
  339. ;;; Fix up "lha" destinations which must end with ":" or "/"
  340. ;;;
  341. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  342. ;
  343. ; INPUTS:
  344. ;    xdestDirName    ; "Base" location to fix up
  345. ;
  346. (procedure fixLhaDest
  347. (set len (strlen xdestDirName))
  348. (if (<> (substr xdestDirName (- len 1) 1) ":")
  349.     (set xdestDirName (cat xdestDirName "/")))
  350. )
  351.  
  352. ;
  353. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  354. ;;;
  355. ;;; Ask the user which parts of the package should be installed.
  356. ;;;
  357. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  358. ;
  359. (procedure setPkgOpts
  360.     (
  361.     (set PkgOpts
  362.         (askoptions
  363.             (prompt #installoptions)
  364.             (help #installopthelp
  365.             )
  366.             (choices
  367.                 ; bit position 0 -- install Scion ( AND ReadMe files)
  368.                 ;
  369.                 ("%s" ProgramName)
  370.  
  371.                 ; bit position 1 -- install ScionPrefs
  372.                 ;
  373.                 ("%s" PrefsName)
  374.  
  375.                 ; bit position 2 -- install ARexx scripts
  376.                 ;
  377.                 ("%s" #ArexxScripts)
  378.  
  379.                 ; bit position 3 -- install Guides
  380.                 ;
  381.                 ("%s" #OnLineHelp)
  382.  
  383.                 ; bit position 4 -- install Example database
  384.                 ;
  385.                 ("%s" #Example)
  386.  
  387.             )
  388.         )
  389.     )
  390.     )
  391. )
  392.  
  393. ;
  394. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  395. ;;;
  396. ;;; Ask the user which languages should be installed.
  397. ;;;
  398. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  399. ;
  400. (procedure setLanguages
  401.     (
  402.     (set LanguageOpts
  403.         (askoptions
  404.             (prompt #languageoptions)
  405.             (help #languageopthelp)
  406.  
  407.             (choices
  408.                 ; bit position 0 -- install English
  409.                 ;
  410.                 "English"
  411.  
  412.                 ; bit position 1 -- install Dutch
  413.                 ;
  414.                 "Nederlands"
  415.  
  416.                 ; bit position 2 -- install German
  417.                 ;
  418.                 "Deutsch"
  419.  
  420.                 ; bit position 3 -- install Norwegian
  421.                 ;
  422.                 "Norsk"
  423.  
  424.                 ; bit position 4 -- install French
  425.                 ;
  426.                 "Français"
  427.  
  428.                 ; bit position 5 -- install Italian
  429.                 ;
  430.                 "Italiano"
  431.  
  432.                 ; bit position 6 -- install Swedish
  433.                 ;
  434.                 ;"Svenska" NOTE: Not currently supported
  435.  
  436.         )
  437.         )
  438.     )
  439.     )
  440. )
  441.  
  442. ;
  443. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  444. ;;;
  445. ;;; Copy the specific library file from T: to the CLF_LibPath directory.
  446. ;;;
  447. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  448. ;
  449. ; INPUTS:
  450. ;    CLF_LibFileName     ; Library name
  451. ;    CLF_LibPath         ; Location to save library
  452. ;
  453. ;    #copyLibFileHelp    ; 'Base" help for this operation
  454. ;
  455. (procedure copyLibFile
  456.     (
  457.     (if (= (exists (tackon CLF_LibPath CLF_LibFileName)) 1)
  458.         (
  459.         (protect (tackon CLF_LibPath CLF_LibFileName) "+rwed")
  460.         )
  461.     )
  462.     (if (<> @pretend 1)
  463.         (copylib
  464.             (prompt (#libcopy CLF_LibFileName CLF_LibPath))
  465.             (help    #copyLibFileHelp)
  466.             (source (cat "T:" CLF_LibFileName))
  467.             (dest CLF_LibPath)
  468.             (confirm))
  469.         )
  470.     )
  471. )
  472.  
  473. ;
  474. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  475. ;;;
  476. ;;; Get the version and revision number of file/device/library/OS/etc
  477. ;;;
  478. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  479. ;
  480. ; INPUTS: WV_Item    ; Name of device/file/library/etc. "" for OS version
  481. ;
  482. ; OUTPUTS: WV_VerNum    ; (long) version/revision number
  483. ;          WV_Ver    ; Version number
  484. ;          WV_Rev    ; Revision number
  485. ; NOTE: Both WV_Ver and WV_Rev returned as 0 if "WV_Item" does not exist
  486. ;
  487. (procedure WhatVersion
  488.     (
  489.     (if (= WV_Item "")
  490.         (set WV_VerNum (getversion))        ; For OS
  491.         (set WV_VerNum (getversion WV_Item)))    ; For other "files"
  492.     (set WV_Ver (/ WV_VerNum 65536))
  493.     (set WV_Rev (- WV_VerNum (* WV_Ver 65536)))
  494.     )
  495. )
  496.  
  497. ;
  498. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  499. ;;;
  500. ;;; Fix revision numbers because I use 'x.05' style instead of 'x.5' style
  501. ;;;
  502. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  503. ;
  504. ; INPUTS:  WV_Rev    ; Revision number
  505. ;
  506. ; OUTPUTS: FR_Rev    ; Revision # modified to give leading '0' where needed
  507. ;
  508. (procedure FixRevision
  509.     (
  510.     (if (< WV_Rev 10)
  511.         (set FR_Rev (cat "0" WV_Rev))
  512.     (set FR_Rev (cat WV_Rev))
  513.     )
  514. ))
  515.  
  516. ;
  517. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  518. ;;;
  519. ;;; See if Multiview and/or AmigaGuide exist
  520. ;;;
  521. ;;; This is less than perfect! I can't get "run" to return a command result
  522. ;;; from the "which" command when run from Workbench! Okay from a shell.
  523. ;;; I wanted to use "which"command to locate viewer, but doesn't bloody work!
  524. ;;;
  525. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  526. ;
  527. ; OUTPUT: ViewerType = 1 for MultiView (preferred)
  528. ;                    = 2 for AmigaGuide
  529. ;                    = 0 for neither
  530. ;
  531. (procedure WhichGuideViewer
  532.     (
  533.     (if (= (exists "SYS:Utilities/MultiView" (noreq)) 1)
  534.         (set ViewerType 1)
  535.         (if (= (exists "SYS:Utilities/AmigaGuide" (noreq)) 1)
  536.             (set ViewerType 2)
  537.     (set ViewerType 0)))
  538.     )
  539. )
  540.  
  541. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  542. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  543. ;;;                                                                       ;;;
  544. ;;;                START OF ACTUAL INSTALLATION PROCESS                   ;;;
  545. ;;;                                                                       ;;;
  546. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  547. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  548. ;
  549. ;
  550. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  551. ;;;
  552. ;;; Make sure we are running under a 2.04 ROM (at least)
  553. ;;;
  554. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  555. ;
  556.  
  557. (set WV_Item "")    ; Want OS version
  558. (WhatVersion)
  559. (if (< WV_Ver 37)
  560.     (abort (cat #ver_err1 #err_msg))
  561.     )
  562.  
  563. ;
  564. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  565. ;;;
  566. ;;; Display startup message and make sure t: exists
  567. ;;;
  568. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  569. ;
  570.  
  571. (message #install_msg)
  572.  
  573. (if (= (getassign "t") "")
  574.     (makeassign "t" RAM:)
  575. )
  576.  
  577. ;
  578. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  579. ;;;
  580. ;;; Do installation
  581. ;;;
  582. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  583. ;
  584.  
  585. ; Try and determine the best place to set as destination for the installation.
  586. ; NOTE: For "novice" mode, the installer uses the value of @default-dest.
  587.  
  588. (if (= (exists "Work:" (noreq)) 2)          ; Check for WORK:
  589.     (set @default-dest ("Work:%s" ProgramBaseName))
  590.     (set @default-dest ("SYS:%s" ProgramBaseName))
  591. )
  592.  
  593. ; NOTE: For test purposes, over-ride default location with RAM:
  594. (if (= TESTING 1)
  595.     (set @default-dest ("RAM:%s" ProgramBaseName)))
  596.  
  597. (set Scion-dest @default-dest)              ; Default location to install Scion programme
  598. (setPkgOpts)                                ; Ask for installation options
  599.  
  600. (if (= (exists "LIBS:locale.library" (noreq)) 1) ;Is there locale support?
  601.     (
  602.     (set Localised 1)                       ; Set "localisation" supported
  603.     ; Only ask for languages for Scion, ScionPrefs or On-line help
  604.     (if (OR (IN PkgOpts 0) (IN PkgOpts 1) (IN PkgOpts 3))
  605.         (setLanguages)                      ; Ask for languages to install
  606.         )
  607.     )
  608.     (message #nolocale))                    ; Give bad news about no locale
  609.  
  610. (set SDP_DefDir @default-dest)              ; Start with default location
  611.  
  612. ;
  613. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  614. ;;;
  615. ;;; Set up installation options and destinations for files
  616. ;;;
  617. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  618. ;
  619. ; bit position 0 -- install Scion & ReadMe files
  620. (set Scion_Really 0)                        ; Do NOT install Scion at the moment
  621. (if (IN PkgOpts 0)                          ; if bit position 0 (Scion option) is on
  622.     (
  623.     (while (<> Scion_Really 1)
  624.         (
  625.         (set SDP_ModuleName ProgramBaseName); First module is Scion
  626.         (setdirpath)                        ; Returns user selected location in 'SDP_DirPath'
  627.         (set @default-dest SDP_DirPath)     ; Reset default location (for 'completed' message)
  628.  
  629.         (set Scion-dest SDP_DirPath)        ; Location to install Scion programme
  630.         (set InstallScion 1)                ; 1 = install Scion
  631.     
  632.         (set readme-dest Scion-dest)        ; Default to "base" location where Scion is
  633.         (set InstallReadMe 1)               ; 1 = install ReadMe files
  634.  
  635.         (set WV_Item (tackon Scion-dest ProgramBaseName))
  636.         (if (exists WV_Item (noreq))        ; Existing Scion installed?
  637.         (
  638.             (WhatVersion)                   ; Get existing Scion version number
  639.             (FixRevision)                   ; Kludge for my revision numbering!
  640.             (set Scion_Really (askbool
  641.             (prompt (#oldscionprompt WV_Ver FR_Rev ProgramName VersionNum)
  642.         (help (#oldscionhelp ProgramName VersionNum))
  643.         (default 1))))
  644.         )
  645.         ; 'else'
  646.         (set Scion_Really 1)            ; Nothing there - really install
  647.         ))
  648.      )
  649.     ))
  650.  
  651. ; bit position 1 -- install ScionPrefs
  652. (if (IN PkgOpts 1)                          ; if bit position 1 (Scion preferences option) is on
  653.     (
  654.     (set SDP_ModuleName PrefsBaseName)      ; Next module is preferences programme
  655.     (set SDP_DefDir "SYS:Prefs")
  656.     (setdirpath)                            ; Returns user selected location in 'SDP_DirPath'
  657.  
  658.     (set prefs-dest SDP_DirPath)            ; Location to install preferences programme
  659.     (set InstallPrefs 1)                    ; 1 = install preferences
  660.     ))
  661.  
  662. ; bit position 2 -- install ARexx scripts
  663. (if (IN PkgOpts 2)                          ; if bit position 2 (ARexx scripts option) is on
  664.     (
  665.     (set SDP_ModuleName #ArexxScripts)      ; Next 'section' is ARexx scripts
  666.  
  667.     (if (<> (getassign "REXX") "")
  668.         (set SDP_DefDir "REXX:")            ; Preferred default location is REXX:
  669.         (
  670.     (if (IN PkgOpts 0)                  ; Was Scion location chosen?
  671.         (set SDP_DefDir (tackon Scion-dest "Rexx")) ; 'Root' is location of Scion
  672.         (set SDP_DefDir "S:")           ; Last chance default
  673.     )
  674.     ))
  675.  
  676.     (setdirpath)                            ; Returns user selected location in 'SDP_DirPath'
  677.  
  678.     (set arexx-dest SDP_DirPath)            ; Location to install ARexx scripts
  679.     (set InstallArexx 1)                    ; 1 = install ARexx scripts
  680.     ))
  681.  
  682. ; bit position 3 -- install Guides
  683. (if (IN PkgOpts 3)                          ; if bit position 3 (On-line help option) is on
  684.     (
  685.     (set InstallOnlineHelp 1)               ; 1 = install ".guide" files
  686.     (if (IN PkgOpts 0)                      ; Installing Scion at this time?
  687.         (
  688.         (set guide-dest Scion-dest)         ; Default to "base" location where Scion is
  689.         )
  690.     ; Not installing Scion - ask where it is
  691.     (
  692.         (set SPL_ModuleName #OnLineHelp)
  693.         (set SPL_DefDir scion-dest)
  694.         (setPrevLoc)
  695.     (set guide-dest SPL_DirPath)        ; Set guide "root" location
  696.     (set Scion-dest SPL_DirPath)        ; Reset Scion location
  697.     (set @default-dest SPL_DirPath)     ; Reset default location too!
  698.     ))
  699.     ))
  700.  
  701. ; bit position 4 -- install Example database
  702. (if (IN PkgOpts 4)                          ; if bit position 4 ("Example" option) is on
  703.     (
  704.     (if (IN PkgOpts 0)
  705.         (set example-dest Scion-dest)       ; Default to "base" location where Scion is
  706.     ; Not installing Scion at this time. Ask for location
  707.     (
  708.         (set SDP_DefDir Scion-dest)         ; Start with Scion's default location
  709.         (set SDP_ModuleName #Example)       ; Ask for Example location
  710.         (setdirpath)                        ; Returns user selected location in 'SDP_DirPath'
  711.         (set example-dest SDP_DirPath)      ; Location to install Example
  712.     ))
  713.     (set InstallExample 1)                  ; 1 = install "Example" file
  714.     ))
  715.  
  716. ;
  717. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  718. ;;;
  719. ;;; Set up "locale" options and destinations
  720. ;;;
  721. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  722. ;
  723.  
  724. (if (= Localised 1)                                 ; Is "localisation" support available?
  725.     (
  726.  
  727.     (if (<> (getassign "LOCALE") "")                ; Is there a LOCALE: assign?
  728.         (
  729.         (set scioncat-dest "LOCALE:")               ; Preferred default location is LOCALE:
  730.         (set prefscat-dest "LOCALE:")               ; Preferred default location is LOCALE:
  731.         )
  732.         (
  733.         ; "else"
  734.         ; Where should we install locales for Scion?
  735.         (if (IN PkgOpts 0)                          ; if bit position 0 (Scion option) is on
  736.             (set scioncat-dest Scion-dest)          ; Location to install Scion catalogs
  737.             )
  738.         ; Where should we install locales for ScionPrefs?
  739.         (if (IN PkgOpts 1)                          ; if bit position 1 (Scion preferences option) is on
  740.             (set prefscat-dest prefs-dest)          ; Location to install preferences catalogs
  741.             )
  742.         ))
  743.  
  744.  
  745.     ; Should we install locales for Scion?
  746.     (if (IN PkgOpts 0)                              ; if bit position 0 (Scion option) is on
  747.         (set InstallScionCats 1)                    ; 1 = install Scion catalogs
  748.         )
  749.     ; Should we install locales for ScionPrefs?
  750.     (if (IN PkgOpts 1)                              ; if bit position 1 (Scion preferences option) is on
  751.         (set InstallPrefsCats 1)                    ; 1 = install Preferences catalogs
  752.         )
  753.  
  754.     (if (IN LanguageOpts 0)                         ; if bit position 0 (English)
  755.         (set InstallEnglish 1))
  756.     (if (IN LanguageOpts 1)                         ; if bit position 1 (Dutch)
  757.         (set InstallDutch 1))
  758.     (if (IN LanguageOpts 2)                         ; if bit position 2 (German)
  759.         (set InstallGerman 1))
  760.     (if (IN LanguageOpts 3)                         ; if bit position 3 (Norwegian)
  761.         (set InstallNorwegian 1))
  762.     (if (IN LanguageOpts 4)                         ; if bit position 4 (French)
  763.         (set InstallFrench 1))
  764.     (if (IN LanguageOpts 5)                         ; if bit position 5 (Italian)
  765.         (set InstallItalian 1))
  766.     (if (IN LanguageOpts 6)                         ; if bit position 6 (Swedish)
  767.         (set InstallSwedish 1))
  768.     )) ;;;;; (if (= Localised 1)
  769.  
  770.  
  771. ; If on-line help is requested, always install default English .guide file
  772. (if (= InstallOnlineHelp 1)
  773.         (set InstallEnglish 1))
  774. ;
  775. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  776. ;;;
  777. ;;; Copy scion and ARexx archives to RAM: (without asking for confirmation)
  778. ;;; if archives are not already on RAM: volume
  779. ;;;
  780. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  781. ;
  782.  
  783. (if (<> (getdevice ScionArchive) "RAM") ; Are the archives already on RAM:?
  784.     (
  785.     (copyfiles
  786.         (prompt "\n" #copyingscion)
  787.         (source ScionArchive)
  788.         (dest "RAM:"))
  789.     (set delscionarchive 1)        ; Set RAM: based file for deletion
  790.     (set ScionArchive (tackon "RAM:" ArchiveName))
  791.     ))
  792.  
  793. (if (= InstallArexx 1)
  794.     (
  795.     (if (<> (getdevice ArexxArchive) "RAM")
  796.         (
  797.         (copyfiles
  798.             (prompt "\n" #copyingarexx)
  799.             (source ArexxArchive)
  800.             (dest "RAM:"))
  801.         (set delarexxarchive 1)        ; Set RAM: based file for deletion
  802.     (set ArexxArchive (tackon "RAM:" ArexxArchiveName))
  803.     ))
  804.     ))
  805. ;
  806. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  807. ;;;
  808. ;;; De-archive the appropriate files to their intended destinations
  809. ;;;
  810. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  811. ;
  812. ; The following installation "flags" and locations are now set appropriately:
  813. ; - InstallScion
  814. ; - InstallPrefs
  815. ; - InstallArexx
  816. ; - InstallOnlineHelp
  817. ; - InstallExample
  818. ; - InstallReadMe
  819. ; - Scion-dest             ; Location to install Scion programme
  820. ; - prefs-dest             ; Location to install preferences programme
  821. ; - arexx-dest             ; Location to install ARexx scripts
  822. ; - guide-dest             ; "Base" location to install guide scripts
  823. ; - example-dest           ; Location to install example database
  824. ; - readme-dest            ; Location to install readme files
  825. ;
  826. ; NOTE: "language" flags are used for BOTH ".guide" AND ".catalog" files
  827. ; NOTE: ALWAYS install English ".guide" if InstallOnlineHelp is set
  828. ; - InstallEnglish
  829. ; - InstallDutch
  830. ; - InstallGerman
  831. ; - InstallNorwegian
  832. ; - InstallItalian
  833. ; - InstallSwedish
  834. ; - InstallFrench
  835. ; Localised             ; 1 if user's system support localisation
  836. ;
  837. ; - InstallScionCats
  838. ; - InstallPrefsCats
  839. ; - scioncat-dest         ; "Base" location to install Scion catalogs
  840. ; - prefscat-dest         ; "Base" location to install preferences catalogs
  841. ;
  842.  
  843. ; Install Scion
  844. (if (= InstallScion 1)
  845.     (
  846.     (copyfiles
  847.         (prompt "\n" ProgramName)
  848.         (source ProgramBaseName)
  849.         (dest scion-dest)
  850.        (files)
  851.     (infos))
  852.     ))
  853.  
  854. ; Install Scion Preferences
  855. (if (= InstallPrefs 1)
  856.     (
  857.     (set CurrentFile "ScionPrefs")
  858.     (set MyWorkinMsg (cat #Installing CurrentFile))
  859.     (working MyWorkinMsg)
  860.     (set xarcFileName ScionArchive)
  861.     (set xsrcFileName CurrentFile)
  862.     (set xdestDirName prefs-dest)
  863.     (fixLHADest)
  864.     ; Don't try and de-archive files in pretend mode
  865.     (if (<> @pretend 1)
  866.         (
  867.         (extractLhaFile2Dir)
  868.         ))
  869.  
  870.     (set CurrentFile "ScionPrefs.info")
  871.     (set MyWorkinMsg (cat #Installing CurrentFile))
  872.     (working MyWorkinMsg)
  873.     (set xsrcFileName CurrentFile)
  874.     ; Don't try and de-archive files in pretend mode
  875.     (if (<> @pretend 1)
  876.         (
  877.         (extractLhaFile2Dir)
  878.         ))
  879.     ))
  880.  
  881. ; Install on-line help as required
  882. (if (= InstallOnlineHelp 1)
  883.     (
  884.     (set xconfirmCopy 1)        ; Turn off confirmation for possible omissions
  885.     (set xsrcFileName "guides.info")    ; Main drawer icon
  886.     (set MyWorkinMsg (cat #Installing #OnLineHelp))
  887.     (working MyWorkinMsg)
  888.     (set xarcFileName ScionArchive)
  889.     (set xdestDirName guide-dest)
  890.     (fixLHADest)
  891.     ; Don't try and de-archive files in pretend mode
  892.     (if (<> @pretend 1)
  893.         (
  894.         (extractLhaFile2Dir)
  895.         ))
  896.     (set n 0)
  897.     (while (set whichlanguage (select n "English" "Nederlands" "Deutsch" "Norsk" "Italiano" "Svenska" "Français" ""))
  898.         (
  899.     (set dolanguage (select n InstallEnglish InstallDutch InstallGerman InstallNorwegian InstallItalian InstallSwedish InstallFrench 0))
  900.     (set n (+ n 1))
  901.     ; Now dearchive appropriate ".guide" files and drawer icons (what a pain!)
  902.         (if (= dolanguage 1)
  903.         (
  904.         (set xsrcFileName (cat "guides/" whichlanguage ".info"))
  905.             ; Don't try and de-archive files in pretend mode
  906.             (if (<> @pretend 1)
  907.                 (
  908.                 (extractLhaFile2Dir)
  909.                 ))
  910.         (set xsrcFileName (cat "guides/" whichlanguage "/Scion.guide#?"))
  911.             ; Don't try and de-archive files in pretend mode
  912.             (if (<> @pretend 1)
  913.                 (
  914.                 (extractLhaFile2Dir)
  915.                 (WhichGuideViewer) ; What guide viewer is available?
  916.                 (set scratch (cat "guides/" whichlanguage "/Scion.guide"))
  917.                 (set scratch (tackon guide-dest scratch))
  918.                 (if (= (exists scratch (noreq)) 1)
  919.             (
  920.             ; Set guide viewer tooltype
  921.                     (if (= ViewerType 1)
  922.                 (
  923.             ;Set to multiview
  924.             (tooltype
  925.                 (prompt "")
  926.                 (help "")
  927.                 (dest scratch)
  928.                 (setdefaulttool "MultiView"))
  929.             )
  930.             (if (= ViewerType 2)
  931.                 (
  932.                 ;Set to AmigaGuide
  933.                 (tooltype
  934.                     (prompt "")
  935.                     (help "")
  936.                     (dest scratch)
  937.                     (setdefaulttool "AmigaGuide"))
  938.                 )
  939.                 (
  940.                 ;Neither in "SYS:Utilities" - hope that "Amigaguide" is somewhere!
  941.                 (tooltype
  942.                     (prompt "")
  943.                     (help "")
  944.                     (dest scratch)
  945.                     (setdefaulttool "Amigaguide"))
  946.                 ))
  947.             )))
  948.                 ))
  949.  
  950.         ))
  951.     ))
  952.  
  953.     ; If installing Scion, install amigaguide.library as well
  954.     (set xsrcFileName "amigaguide.library")
  955.     (set MyWorkinMsg (cat #Installing "amigaguide.library in T:"))
  956.     (working MyWorkinMsg)
  957.     (set xarcFileName ScionArchive)
  958.     (set xdestDirName "T:")
  959.     ; Don't try and de-archive files in pretend mode
  960.     (if (<> @pretend 1)
  961.         (
  962.         (extractLhaFile2Dir)
  963.         ))
  964.     (set CLF_LibFileName "amigaguide.library")
  965.     (set CLF_LibPath "LIBS:")
  966.     (copyLibFile)
  967.     ))
  968. (set xconfirmCopy    0)        ; Turn confirmation back on
  969.  
  970. ; Install foreign language catalogs as required
  971. ; Firstly for Scion
  972. (if (= InstallScionCats 1)
  973.     (
  974.     (set xconfirmCopy 1)        ; Turn off confirmation for possible omissions
  975.     (set MyWorkinMsg (cat #Installing #CatFiles))
  976.     (working MyWorkinMsg)
  977.     (set xarcFileName ScionArchive)
  978.     (set xdestDirName scioncat-dest)
  979.     (fixLHADest)
  980.     (set n 0)
  981.     (while (set whichlanguage (select n "English" "Nederlands" "Deutsch" "Norsk" "Italiano" "Svenska" "Français" ""))
  982.         (
  983.     (set dolanguage (select n InstallEnglish InstallDutch InstallGerman InstallNorwegian InstallItalian InstallSwedish InstallFrench 0))
  984.     (set n (+ n 1))
  985.     ; Now dearchive appropriate ".catalog" files
  986.         (if (= dolanguage 1)
  987.         (
  988.         (set xsrcFileName (cat "catalogs/" whichlanguage "/scion.catalog"))
  989.             ; Don't try and de-archive files in pretend mode
  990.             (if (<> @pretend 1)
  991.                 (
  992.                 (extractLhaFile2Dir)
  993.                 ))
  994.         ))
  995.     ))
  996.     ))
  997. ; Secondly for ScionPrefs
  998. (if (= InstallPrefsCats 1)
  999.     (
  1000.     (set xconfirmCopy 1)        ; Turn off confirmation for possible omissions
  1001.     (set MyWorkinMsg (cat #Installing #CatFiles))
  1002.     (working MyWorkinMsg)
  1003.     (set xarcFileName ScionArchive)
  1004.     (set xdestDirName prefscat-dest)
  1005.     (fixLHADest)
  1006.     (set n 0)
  1007.     (while (set whichlanguage (select n "English" "Nederlands" "Deutsch" "Norsk" "Italiano" "Svenska" "Français" ""))
  1008.         (
  1009.     (set dolanguage (select n InstallEnglish InstallDutch InstallGerman InstallNorwegian InstallItalian InstallSwedish InstallFrench 0))
  1010.     (set n (+ n 1))
  1011.     ; Now dearchive appropriate ".catalog" files
  1012.         (if (= dolanguage 1)
  1013.         (
  1014.         (set xsrcFileName (cat "catalogs/" whichlanguage "/scionprefs.catalog"))
  1015.             ; Don't try and de-archive files in pretend mode
  1016.             (if (<> @pretend 1)
  1017.                 (
  1018.                 (extractLhaFile2Dir)
  1019.                 ))
  1020.         ))
  1021.     ))
  1022.     ))
  1023. (set xconfirmCopy    0)        ; Turn confirmation back on
  1024.  
  1025. ; Install sciongen.font if either Scion or ScionPrefs is being installed
  1026. (if (OR (= InstallScion 1) (= InstallPrefs 1))
  1027.     (
  1028.     (set result (askbool
  1029.         (prompt #fontprompt)
  1030.     (help #fonthelp)
  1031.     (default 1))
  1032.     )
  1033.     (if (= result 1)
  1034.         (
  1035.         (set xconfirmCopy 1)        ; Turn off confrimation for multiple files
  1036.         (set CurrentFile "sciongen#?")
  1037.         (set MyWorkinMsg (cat #Installing "sciongen font"))
  1038.         (working MyWorkinMsg)
  1039.         (set xarcFileName ScionArchive)
  1040.         (set xsrcFileName CurrentFile)
  1041.         (set xdestDirName "FONTS:")
  1042.         ; Don't try and de-archive files in pretend mode
  1043.         (if (<> @pretend 1)
  1044.             (
  1045.             (extractLhaFile2Dir)
  1046.             ))
  1047.         ))
  1048.     ))
  1049. (set xconfirmCopy    0)        ; Turn confirmation back on
  1050.  
  1051. ; Install Example database
  1052. (if (= InstallExample 1)
  1053.     (
  1054.     (set CurrentFile "Example")
  1055.     (set MyWorkinMsg (cat #Installing CurrentFile))
  1056.     (working MyWorkinMsg)
  1057.     (set xarcFileName ScionArchive)
  1058.     (set xsrcFileName CurrentFile)
  1059.     (set xdestDirName example-dest)
  1060.     (fixLHADest)
  1061.     ; Don't try and de-archive files in pretend mode
  1062.     (if (<> @pretend 1)
  1063.         (
  1064.         (extractLhaFile2Dir)
  1065.         ))
  1066.  
  1067.     (set CurrentFile "Example.info")
  1068.     (set MyWorkinMsg (cat #Installing CurrentFile))
  1069.     (working MyWorkinMsg)
  1070.     (set xsrcFileName CurrentFile)
  1071.     ; Don't try and de-archive files in pretend mode
  1072.     (if (<> @pretend 1)
  1073.         (
  1074.         (extractLhaFile2Dir)
  1075.         ))
  1076.     ))
  1077.  
  1078. ; Install ARexx
  1079. (if (= InstallArexx 1)
  1080.     (
  1081.     (set CurrentFile "#?")
  1082.     (set MyWorkinMsg (cat #Installing #ArexxScripts))
  1083.     (working MyWorkinMsg)
  1084.     (set xarcFileName ArexxArchive)
  1085.     (set xsrcFileName CurrentFile)
  1086.     (set xdestDirName arexx-dest)
  1087.     (fixLHADest)
  1088.     (set xconfirmCopy 1)        ; Turn off confrimation for multiple files
  1089.     ; Don't try and de-archive files in pretend mode
  1090.     (if (<> @pretend 1)
  1091.         (
  1092.         (extractLhaFile2Dir)
  1093.         ))
  1094.  
  1095.     ))
  1096.  
  1097. (set xconfirmCopy    0)        ; Turn confirmation back on
  1098.  
  1099. ; Lastly any "readme" files (and icons)
  1100. (if (= InstallReadMe 1)
  1101.     (
  1102.     (set n 0)
  1103.     (while (<> (set dolanguage (select n InstallEnglish InstallDutch InstallGerman InstallNorwegian InstallItalian InstallSwedish InstallFrench 99)) 99)
  1104.         (
  1105.     (set readme_name (select n "ReadMe" "LeesMij" "LiesMich" "LesMeg" "Leggimi" "Swedish???" "Lisez-moi" ""))
  1106.     (set n (+ n 1))
  1107.     ; Now copy appropriate readme file(s)
  1108.         (if (AND (= dolanguage 1) (= (exists readme_name (noreq)) 1))
  1109.         (
  1110.             (copyfiles
  1111.         ((optional "nofail" ))    ; This doesn't seem to work properly!?
  1112.                 (prompt "\n" #ReadmeFiles)
  1113.                 (source readme_name)
  1114.                 (dest readme-dest)
  1115.                (files)
  1116.             (infos))
  1117.         ))
  1118.     ))
  1119.     ))
  1120.  
  1121. ;
  1122. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1123. ;;;
  1124. ;;; Delete files no longer required from RAM: (if they've been copied there)
  1125. ;;;
  1126. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1127. ;
  1128.  
  1129. (if (= delscionarchive 1)
  1130.     (delete ScionArchive))
  1131. (if (= delarexxarchive 1)
  1132.     (delete ArexxArchive))
  1133. (exit)
  1134.  
  1135. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1136.  
  1137.