home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / Welcome < prev    next >
AmigaDOS Script File  |  1999-12-16  |  7KB  |  232 lines

  1. .key CHECK/K,QUIET/K,VOL/K
  2. .bra {
  3. .ket }
  4.  
  5. ;set echo on
  6.  
  7. ;;; CD to AACD root if run from elsewhere, e.g. AutoRun
  8. cd >NIL: {VOL}
  9. ;;;
  10. ;;; Check argument - exit if Welcome has been run, otherwise ask
  11.     If {CHECK} EQ "YES"
  12.         Assign >NIL: AACD: EXISTS
  13.         If NOT WARN
  14.             Skip ABORT
  15.         Else
  16.             set init `:System/C/RequestChoice "Amiga Active CD" "Some assigns need to be made before we can proceed.*NYou can remove them later with the RemoveCD icon" "OK|Cancel"`
  17.             If $init EQ 0
  18.                 Skip ABORT
  19.                 EndIf
  20.             EndIf
  21.         EndIf
  22. ;;;
  23. ;;; Skip to HTML if Welcome has already been run
  24. Assign >NIL: AACD: EXISTS
  25. If NOT WARN
  26.     Skip HTML
  27.     EndIf
  28. ;;;
  29. ;;; Set up temporary assign
  30. Assign AACDtmp: :
  31. set ReqTitle Welcome to the Amiga Active CD
  32. ;;;
  33. ;;; Check for some system assigns
  34. ; MUI
  35. Assign MUI: EXISTS >NIL:
  36. If WARN
  37.     AACDtmp:System/C/RequestChoice >NIL: "`get ReqTitle`" "Some of the software on this CD requires MUI*NIf you use it regularly you should install MUI to your hard drive.*NThe installer is in the CDTools drawer of this CD" "I see"
  38.     Assign >NIL: MUI: AACDtmp:CDTools/MUI
  39.     Assign >NIL: LIBS: AACDtmp:CDTools/MUI/libs ADD
  40.     EndIf
  41. ; ClassAct
  42. If NOT EXISTS LIBS:window.class
  43.     AACDtmp:System/C/RequestChoice >NIL: "`get ReqTitle`" "Some of the software on this CD requires ClassAct*NIf you use it regularly you should install ClassAct to your hard drive.*NThe installer is in the CDTools drawer of this CD" "I see"
  44.     EndIf
  45. ;;;
  46. ;;; Start arexx if not running
  47. AACDtmp:System/rexxc/rx "address command" >NIL:
  48. If WARN
  49.     AACDtmp:System/System/RexxMast >NIL:
  50.     EndIf
  51. rx "call addlib('rexxsupport.library',0,-30,0)
  52. ;;;
  53. ;;; Make sure files needed by CD system are available
  54. ; muirexx.library
  55. If NOT EXISTS LIBS:muirexx.library
  56.     Copy >NIL: AACDtmp:CDTools/MUI/Libs/muirexx.library MUI:Libs CLONE
  57. Else
  58.     Version >NIL: muirexx.library 19 9
  59.     If WARN
  60.         Copy >NIL: AACDtmp:CDTools/MUI/Libs/muirexx.library MUI:Libs CLONE
  61.         EndIf
  62.     EndIf
  63. ; icon.mcc
  64. Version >NIL: MUI:Libs/MUI/Icon.mcc 1 1
  65. If WARN
  66.     Copy >NIL: AACDtmp:Icon.mcc MUI:Libs/MUI CLONE
  67.     EndIf
  68. ; MUIRexx
  69. which >NIL: MUIRexx
  70. if WARN
  71.     copy AACDtmp:MUIRexx SYS:Rexxc clone quiet'
  72.     path SYS:Rexxc ADD
  73.     endif
  74. ; AACDfile
  75. If NOT EXISTS C:AACDfile
  76.     Copy >NIL: AACDtmp:System/C/AACDfile C: CLONE QUIET
  77.     EndIf
  78. ; AAShowDir
  79. Version >NIL: REXX:AAShowDir 1 3
  80. If WARN
  81.     Copy >NIL: AACDtmp:CDTools/S/AAShowDir REXX: CLONE
  82.     EndIf
  83. ; AAExtract
  84. Version >NIL: REXX:AAExtract 1 1
  85. If WARN
  86.     Copy >NIL: AACDtmp:CDTools/S/AAExtract REXX: CLONE
  87.     EndIf
  88. ; AAExtract
  89. Version >NIL: REXX:AAGoFetch 1 0
  90. If WARN
  91.     Copy >NIL: AACDtmp:CDTools/S/AAGoFetch REXX: CLONE
  92.     EndIf
  93. ; IDer
  94. Version >NIL: C:IDer 1 6
  95. If WARN
  96.     Copy >NIL: AACDtmp:System/C/IDer C: CLONE
  97.     EndIf
  98. ; FlashFind
  99. which >NIL: FlashFind
  100. If WARN
  101.     copy AACDtmp:System/C/FlashFind C: clone quiet
  102.     Endif
  103. ; AWeb config
  104. If NOT EXISTS ENVARC:AWeb3DEMO
  105.     Makedir >NIL: ENVARC:AWeb3DEMO
  106.     Makedir >NIL: ENV:AWeb3DEMO
  107.     Endif
  108. If NOT EXISTS ENVARC:AWeb3DEMO/Amigactive
  109.     Makedir >NIL: ENVARC:AWeb3DEMO/Amigactive
  110.     Makedir >NIL: ENV:AWeb3DEMO/Amigactive
  111.     Copy AACDtmp:System/Prefs/env-archive/AWeb3DEMO/Amigactive/#? ENVARC:AWeb3DEMO/Amigactive CLONE QUIET
  112.     Copy AACDtmp:System/Prefs/env-archive/AWeb3DEMO/Amigactive/#? ENV:AWeb3DEMO/Amigactive CLONE QUIET
  113.     Endif
  114. If EXISTS ENVARC:AWeb3
  115.     If NOT EXISTS ENVARC:AWeb3/Amigactive
  116.         Makedir >NIL: ENVARC:AWeb3/Amigactive
  117.         Makedir >NIL: ENV:AWeb3/Amigactive
  118.         Copy AACDtmp:System/Prefs/env-archive/AWeb3DEMO/Amigactive/#? ENVARC:AWeb3/Amigactive CLONE QUIET
  119.         Copy AACDtmp:System/Prefs/env-archive/AWeb3DEMO/Amigactive/#? ENV:AWeb3/Amigactive CLONE QUIET
  120.         Endif
  121.     Endif
  122. ;;;
  123. ;;; Give option for setting CD preferences, if not already done
  124. If NOT EXISTS ENV:AACD.prefs
  125.     If NOT EXISTS S:AACD.prefs
  126.         Version >NIL: version 39
  127.         If NOT WARN
  128.             Copy >NIL: AACDtmp:CDTools/S/AACD.prefs ENV:
  129.             Copy >NIL: AACDtmp:CDTools/S/AACD.prefs ENVARC:
  130.             set NoPrefs 1
  131.         Else
  132.             Copy >NIL: AACDtmp:CDTools/S/AACD.prefs_OS2 ENV:AACD.prefs
  133.             EndIf
  134.         EndIf
  135.     EndIf
  136. If NOT EXISTS ENV:AACDfile.prefs
  137.     If NOT EXISTS S:AACDfile.prefs
  138.         Version >NIL: version 39
  139.         If NOT WARN
  140.             Copy >NIL: AACDtmp:CDTools/S/AACDfile.prefs ENV:
  141.             Copy >NIL: AACDtmp:CDTools/S/AACDfile.prefs ENVARC:
  142.             set NoPrefs 1
  143.         Else
  144.             Copy >NIL: AACDtmp:CDTools/S/AACDfile.prefs_OS2 ENV:AACDfile.prefs
  145.             EndIf
  146.         EndIf
  147.     EndIf
  148. If $NoPrefs EQ 1
  149.     set edit `RequestChoice "Amigaactive CD" "AACD has a preferences program to specify*N the tools used to view/hear different types of files.*NWould you like to run it now?" "Yes|No"`
  150.     If $edit EQ 1
  151.         stack 16384
  152.         MuiRexx AACDPrefs port AACDPREFS
  153.     Else
  154.         RequestChoice >NIL: "Amiga Active CD" "You can run AACD preferences at any time.*NEither from its icon or from the Setup page of the documentation." "OK"
  155.         EndIf
  156.     EndIf
  157. ;;;
  158. ;;; Set assigns for programs on this CD and system drawers
  159. Execute AACDtmp:CDTools/S/ThisCD
  160. Assign >NIL: DEVS:    AACDtmp:System/Devs ADD
  161. Assign >NIL: Fonts:   AACDtmp:System/Fonts ADD
  162. Assign >NIL: Libs:    AACDtmp:System/Libs ADD
  163. Assign >NIL: L:       AACDtmp:System/L ADD
  164. Assign >NIL: S:       AACDtmp:CDTools/S ADD
  165. Assign >NIL: REXX:    AACDtmp:CDTools/S ADD
  166. Assign >NIL: LIBS:    AACDtmp:System/Classes ADD
  167.  
  168. ; Make environment variables defined on CD available to system
  169. Failat 21
  170. Assign >NIL: ENV: AACDtmp:System/Prefs/Env-Archive ADD
  171. ; For HappyENV users
  172. If FAIL
  173.     Assign >NIL: ENVARC: AACDtmp:System/Prefs/Env-Archive ADD
  174.     EndIf
  175. ;;;
  176. ;;;Check for NewIcons if not already running
  177. If $NoNewIcons NOT EQ TRUE
  178.     AACDtmp:System/C/isnirunning
  179.     If NOT WARN
  180.         Version >NIL: Version 44
  181.         If Warn
  182.             set RunNI `AACDtmp:System/C/RequestChoice "Amiga Active CD" "This CD is set up for use with NewIcons*NIf you do not run Newicons the icon*Nimages and layout may look strange.*N*NWould you like to run NewIcons now?" "Yes|No"`
  183.             If $RunNI EQ 1
  184.                 Run <>NIL: AACDtmp:System/C/NewIcons
  185.                 EndIf
  186.             EndIf
  187.         EndIf
  188.     EndIf
  189. ;;;
  190. ;;; Change temporary assign to permanent one
  191. If {QUIET} NOT EQ "YES"
  192.     Run >NIL: RequestChoice >NIL: "`get ReqTitle`" "We have set up some assigns to run software from the CD.*N*NIf you wish to remove the CD from the drive, doubleclick the RemoveCD icon,*Notherwise the icon will stay on your Workbench." " OK "
  193.     Endif
  194. Assign AACD: AACDtmp:
  195. Assign AACDtmp:
  196. ;;;
  197. ;;; Do this if this is the first time this CD has been initialised
  198. If `cd` GT $AACDlast
  199.     rx AACD:CDTools/S/UpdateIndices
  200.     setenv ENVARC:AACDNewsFlash 1
  201.     setenv AACDlast `cd`
  202.     copy ENV:AACDlast ENVARC: QUIET
  203.     EndIf
  204. ;;;
  205. ;;; Load HTML - using registered AWeb if available
  206. LAB HTML
  207. If {QUIET} NOT EQ "YES"
  208.     set Browser AACD:AACD/WebSites/AWeb3/AWebDemo 
  209.     Assign >NIL: AWeb3: EXISTS
  210.     If NOT WARN
  211.         Version >NIL: AWeb3:AWeb-II 3 3
  212.         If NOT WARN
  213.             set Browser AWeb3:AWeb-II
  214.             If NOT EXISTS ENVARC:AWeb3/Amigactive
  215.                 Makedir >NIL: ENVARC:AWeb3/Amigactive
  216.                 Makedir >NIL: ENV:AWeb3/Amigactive
  217.                 copy >NIL: AACD:System/Prefs/Env-Archive/AWeb3DEMO/AmigActive/#? ENVARC:AWeb3/Amigactive clone
  218.                 copy >NIL: AACD:System/Prefs/Env-Archive/AWeb3DEMO/AmigActive/#? ENV:AWeb3/Amigactive clone
  219.                 EndIf
  220.             EndIf
  221.         EndIf
  222.     Run >NIL: $Browser `cd`Welcome.html LOCAL CONFIG Amigactive
  223.     If EXISTS ENVARC:AACDNewsFlash
  224.         Run >NIL: rx AACD:CDTools/S/NewsFlash.awebrx
  225.         EndIf
  226.     Endif
  227. ;;;
  228. ;;; Abort
  229. LAB ABORT
  230. ;;;
  231.  
  232.