home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / _catalogue / _arcweb / _run < prev    next >
Text File  |  1997-08-25  |  4KB  |  109 lines

  1. | !Run for ArcWeb
  2. |
  3. | Copyright (C) Stewart Brodie, 1994, 1995, 1996, 1997
  4. |
  5. |
  6. | Have a look at the host computer system and determine if we can run on it,
  7. | and if so, which extra modules we need.
  8. |
  9. RmEnsure UtilityModule 3.10 Error 0 ArcWeb requires RISC OS 3.10 or later
  10. |
  11. | Follow PRM (4:497) advice and prevent multiple running
  12. |
  13. If "<ArcWeb$Running>" = "yes" Then Error ArcWeb is already running
  14. |
  15. WimpSlot -min 800K
  16. |
  17. RmEnsure FilterManager 0.00 RMLoad System:Modules.FilterMgr
  18. RmEnsure FilterManager 0.09 Error 0 You need at least Filter Manager 0.09 to run ArcWeb (see Problems Q21)
  19. RMEnsure BorderUtils 0.05 RmEnsure WindowManager 3.17 RMLoad System:modules.BorderUtil
  20. |
  21. | Set up the paths now that we are sure we want to set the,
  22. |
  23. Set ArcWeb$Dir <Obey$Dir>
  24. SetMacro ArcWeb$Path <ArcWeb$Dir>.,<ArcWeb$Dir>.Resources.,Resources:$.Resources.ArcWeb.
  25. |
  26. | Ensure that the ArcWeb module is present - this is now mandatory
  27. RMEnsure ArcWeb 0.00 Run ArcWeb:ArcWeb
  28. |
  29. | Find out if we are in a read-only filing system
  30. Run <Obey$Dir>.ROFS
  31. |
  32. |
  33. | If the cache location is unknown (haven't seen !WebCache) AND we are in a read/write
  34. | filing system, then use a subdirectory of ourselves as a last resort
  35. |
  36. If "<ArcWeb$CacheDir>" = "" Then If "<ArcWeb$ROFS_Status>" = "no" Then Set ArcWeb$CacheDir <ArcWeb$Dir>.WWWcache
  37. If "<ArcWeb$CacheDir>" = "" Then If "<Wimp$ScrapDir>" <> "" Then Set ArcWeb$CacheDir <Wimp$ScrapDir>.WWWCache
  38. If "<ArcWeb$CacheDir>" = "" Then Error You must find a !WebCache in a read/write filing system before running !ArcWeb
  39. Unset ArcWeb$ROFS_Status
  40. |
  41. |
  42. | Determine whether AddSprites is present and disable it whilst we insert small_b28
  43. | into the common sprite pool.
  44. | Also load in the extra sprites from RISC OS 3.5 that we need for RISC OS 3.1x only
  45. Set ArcWeb$AddSprites "1"
  46. RMEnsure AddSprites 0.00 Set ArcWeb$AddSprites "0"
  47. Set ArcWeb$ASSmall   <AddSprites$Small>
  48. Set AddSprites$Small   On
  49. RmEnsure UtilityModule 3.50 IconSprites ArcWeb:310.!Sprites
  50. IconSprites <ArcWeb$Dir>.!Sprites
  51. Set AddSprites$Small <ArcWeb$ASSmall>
  52. If "<ArcWeb$AddSprites>" = "0" Then Unset AddSprites$Small
  53. Unset ArcWeb$ASSmall
  54. Unset ArcWeb$AddSprites
  55. IconSprites <ArcWeb$Dir>.!Types
  56. |
  57. |
  58. | Note that this is a special syntax for ArcWeb$Home ONLY.  On startup, ArcWeb
  59. | automatically converts this into a valid local: URL.
  60. | The local://riscos-full-path syntax is allowed to allow you to use
  61. | variables such as <arcweb$dir> in the ArcWeb$Home variable
  62. |
  63. If "<ArcWeb$Home>" = "" Then Set ArcWeb$Home local://<ArcWeb$Dir>.PublicHTML.Welcome
  64. |
  65. | The default hotlist is <ArcWeb$HotLists>.usrHotList, the directory is .Bookmarks on the end of that
  66. |
  67. If "<ArcWeb$HotLists>" = "" Then Set ArcWeb$HotLists <ArcWeb$CacheDir>
  68. |
  69. | The default history location is in the cache
  70. |
  71. If "<ArcWeb$History>" = "" Then Set ArcWeb$History <ArcWeb$CacheDir>.History
  72. |
  73. | Now set the user preferences file
  74. |
  75. If "<ArcWeb$Choices>" = "" Then Set ArcWeb$Choices <ArcWeb$CacheDir>.Choices
  76. |
  77. | Locate the directory containing the helpers (need to guess if we don't know)
  78. |
  79. If "<ArcWeb$Helper$Dir>" = "" Then Set ArcWeb$Helper$Dir <ArcWeb$Dir>.^.!WebHelper.AppDir
  80. |
  81. Set File$Type_FAF HTML
  82. Set Alias$@RunType_FAF Run <Arcweb$Dir>.!RunURL -file %%*0
  83. |
  84. |
  85. | This is a default setting. WILL BE OVERRIDDEN by the Choices file
  86. Set ArcWeb$CFSIOptions -nomode -max160K
  87. |
  88. If "<ArcWeb$MimeTypes>" = "" Then Set ArcWeb$MimeTypes ArcWeb:mime/types
  89. If "<ArcWeb$AuthFile>" = "" Then Set ArcWeb$AuthFile <ArcWeb$Dir>.Auth_DB
  90. |
  91. | Run the Version checker
  92. Set ArcWebUpgrader$Dir <ArcWeb$Dir>.Upgrader
  93. Set ArcWebUpgrader$Path <ArcWebUpgrader$Dir>.
  94. WimpSlot -min 160K -max 160K
  95. |Run <ArcWebUpgrader$Dir>.!RunImage
  96. |
  97. | Set up the URL launch protocol variables
  98. |
  99. Set Alias$URLOpen_HTTP Run <ArcWeb$Dir>.!RunURL %%*0
  100. Set Alias$URLOpen_FTP Run <ArcWeb$Dir>.!RunURL %%*0
  101. Set Alias$URLOpen_gopher Run <ArcWeb$Dir>.!RunURL %%*0
  102. Set Alias$URLOpen_local Run <ArcWeb$Dir>.!RunURL %%*0
  103. |
  104. | Ensure enough memory is present, and claim the minimum we can survive with to start
  105. | up, which will expand to the first value on a 8 section cache after initialisation
  106. |
  107. WimpSlot -min 800K -max 800K
  108. |
  109. Run <ArcWeb$Dir>.!RunImage %*0