home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 3 / Meeting_Pearls_III.iso / Mosaic < prev    next >
AmigaDOS Script File  |  1995-10-11  |  6KB  |  226 lines

  1. .key FILENAME
  2. .bra [
  3. .ket ]
  4.  
  5. ; $VER: StartMosaic 2.3 (10.10.95)
  6. ;
  7. ; Starter for AMosaic
  8. ;
  9. ; (C) 1994 by Bernhard Möllemann
  10. ;
  11. ; You may use it for any purpose,
  12. ; but this Copyright notice must be included and left intact
  13. ;
  14. ; - V1.1 first Release (23.6.94)
  15. ; - V1.2 cleanup of Angelas changes (19.2.95)
  16. ; - V1.3 support for special homepage on < OS 3.x (19-2-95 by Angela Schmidt)
  17. ; - V2.0 adapted to AMosaic 2.0pre and MP3 (11-Sep-95 Stefan Gybas)
  18. ; - V2.1 added check for already running AMosaic (18-Sep-95 Stefan Gybas)
  19. ; - V2.2 some small improvements (26-Sep-95 Stefan Gybas)
  20. ; - V2.3 start Mosaic1.2 if 2.x detectet, because Moasic2.0 crashes (ZZA, 10.10.95)
  21.  
  22. FailAt 21
  23.  
  24. :C/Version >NIL: exec.library VERSION 37
  25. If WARN
  26.   Echo "-------------------------------------------------"
  27.   Echo "No OS 2.04!"
  28.   Echo "You need at least AmigaOS Version 2.04!"
  29.   Echo "-------------------------------------------------"
  30.   Echo "Kein 2.04!"
  31.   Echo "Sie brauchen mindestens AmigaOS Version 2.04!"
  32.   Echo "-------------------------------------------------"
  33.   Quit 10
  34. EndIf
  35.  
  36. :C/Version >NIL: muimaster.library
  37. If WARN
  38.   Echo "-------------------------------------------------"
  39.   Echo "No MUI!"
  40.   Echo "Click first on clickme.first please!"
  41.   Echo "-------------------------------------------------"
  42.   Echo "Kein MUI!"
  43.   Echo "Bitte klicken Sie zuerst auf clickme.first!"
  44.   Echo "-------------------------------------------------"
  45.   Quit 10
  46. EndIf
  47.  
  48. :C/Version >NIL: muimaster.library VERSION 8
  49. If WARN
  50.   Echo "-------------------------------------------------"
  51.   Echo "Need at least muimaster.library V8!"
  52.   Echo "Please update your System!"
  53.   Echo "You will find the new version in"
  54.   Echo "  *"Pearls/dev/GUI/MUI*""
  55.   Echo "-------------------------------------------------"
  56.   Echo "Es wird mindestens muimaster.library V8 benötigt!"
  57.   Echo "Bitte installieren Sie die neue Version!"
  58.   Echo "Sie finden sie unter"
  59.   Echo "  *"Pearls/dev/GUI/MUI*""
  60.   Echo "-------------------------------------------------"
  61.   Quit 10
  62. EndIf
  63.  
  64. ; make sure we have a config
  65.  
  66. If NOT EXISTS ENV:Mosaic/Prefs
  67.   If NOT EXISTS ENV:Mosaic
  68.     MakeDir ENV:Mosaic
  69.   EndIf
  70.   Copy :Pearls/comm/Internet/AMosaic/EnvArc/Mosaic ENV:Mosaic CLONE QUIET
  71.  
  72.   ;;; adjust image cache on small Amigas
  73.   If NOT VAL `Avail TOTAL` GT 1000000
  74.     SetEnv Mosaic/ImageCacheSize 200
  75.   EndIf
  76.  
  77.   ;;; on 68000/010/020 delay image loads
  78.   CPU >NIL: CHECK 68030
  79.   If WARN
  80.     SetEnv Mosaic/DelayImageLoads true
  81.   EndIf
  82. EndIf
  83.  
  84. ; set initial window position
  85.  
  86. If NOT EXISTS ENV:MUI/AMOSAIC.1.wini
  87.   If NOT EXISTS ENV:MUI
  88.     MakeDir ENV:MUI
  89.   EndIf
  90.   Copy :Pearls/comm/Internet/AMosaic/EnvArc/MUI/AMOSAIC.1.wini ENV:MUI CLONE QUIET
  91. EndIf
  92.  
  93. ; set home document according to FILENAME and make sure we use a complete path
  94.  
  95. If [FILENAME]
  96.   If EXISTS "`CD`/[FILENAME]"
  97.  
  98.     ; file in in current directory (which is not a root directory)
  99.  
  100.     SetEnv Mosaic/HomeDocument file://localhost/`CD`/[FILENAME]
  101.   Else
  102.  
  103.     If EXISTS "`CD`[FILENAME]"
  104.  
  105.       ; file in in current directory (which is a root directory)
  106.  
  107.       SetEnv Mosaic/HomeDocument file://localhost/`CD`[FILENAME]
  108.     Else
  109.  
  110.       ; FILENAME must be a complete path (or doesn't exists)
  111.  
  112.       SetEnv Mosaic/HomeDocument file://localhost/[FILENAME]
  113.     EndIf
  114.   EndIf
  115. Else
  116.  
  117.   ; use a different home document on AmigaOS 2.0
  118.  
  119.   :C/Version >NIL: exec.library 39
  120.   If WARN
  121.     SetEnv Mosaic/HomeDocument file://localhost/:os2index.html
  122.   Else
  123.     SetEnv Mosaic/HomeDocument file://localhost/:index.html
  124.   EndIf
  125. EndIf
  126.  
  127. ; there is a a bug in AMosaic when using documents in root directories
  128.  
  129. CD :html
  130.  
  131. ; IconX does not copy Workbenchs path so we have to handcraft a minimal path
  132. ; "${Mosaic/SetPath}" is a hook for you!
  133.  
  134. If NOT "${Mosaic/SetPath}" EQ "*${Mosaic/SetPath}"
  135.   Execute "${Mosaic/SetPath}"
  136. Else
  137.   Path :C Rexx: S:
  138.   If EXISTS SYS:Rexxc
  139.     Path SYS:Rexxc
  140.   EndIf
  141.   If EXISTS SYS:System
  142.     Path SYS:System
  143.   EndIf
  144.   If EXISTS SYS:Utilities
  145.     Path SYS:Utilities
  146.   EndIf
  147.   If EXISTS SYS:Tools
  148.     Path SYS:Tools
  149.   EndIf
  150.   If EXISTS SYS:WBStartup
  151.     Path SYS:WBStartup
  152.   EndIf
  153.   If EXISTS SYS:Tools/Commodities
  154.     Path SYS:Tools/Commodities
  155.   EndIf
  156. EndIf
  157.  
  158. ; check if AMosaic is already running
  159.  
  160. rx >NIL: "parse arg filename; if show('p','AMOSAIC.1') then do; address 'AMOSAIC.1' 'jump url' filename; exit 5; end;" `GetEnv Mosaic/HomeDocument`
  161. If NOT WARN
  162.  
  163.   ; AMosaic not running: try to find the right AMosaic version
  164.  
  165.   ; the new versions need more stack for forms
  166.  
  167.   Stack 32768
  168.  
  169.   ; ${Moasic/Binary} is a hook in case of the script guesses the wrong version
  170.  
  171.   If NOT "${Mosaic/Binary}" EQ "*${Mosaic/Binary}"
  172.     "${Mosaic/Binary}"
  173.   Else
  174.  
  175.     ; check for AmigaOS 3.0 (AmiTCP and AS225 versions require OS 3.0)
  176.  
  177.     :C/Version >NIL: exec.library VERSION 39
  178.     If NOT WARN
  179.  
  180.       ; check for AmiTCP 3.0 or higher
  181.  
  182.       :C/Version >NIL: bsdsocket.library VERSION 3
  183.       If NOT WARN
  184.         :Pearls/comm/Internet/AMosaic/AMosaic2.0pre3_AmiTCP
  185.       Else
  186.  
  187.         ; check for AS225
  188.  
  189.         :C/Version >NIL: socket.library
  190.         If NOT WARN
  191.           :Pearls/comm/Internet/AMosaic/AMosaic2.0pre3_AS225
  192.         Else
  193.  
  194.           ; no network: use NoNet version
  195.  
  196.           :Pearls/comm/Internet/AMosaic/AMosaic2.0pre1_NoNet
  197.         EndIf
  198.       EndIf
  199.     Else
  200.  
  201.       ; OS 2.x: use old version
  202.  
  203.       ; check for AmiTCP 3.0 or higher
  204.  
  205.       :C/Version >NIL: bsdsocket.library VERSION 3
  206.       If NOT WARN
  207.         :Pearls/comm/Internet/AMosaic/AMosaic1.2_AmiTCP
  208.       Else
  209.  
  210.         ; check for AS225
  211.  
  212.         :C/Version >NIL: socket.library
  213.         If NOT WARN
  214.           :Pearls/comm/Internet/AMosaic/AMosaic1.2_AS225
  215.         Else
  216.  
  217.           ; found no net
  218.  
  219.           :Pearls/comm/Internet/AMosaic/AMosaic1.2_NoNet
  220.         EndIf
  221.       EndIf
  222.     EndIf
  223.   EndIf
  224. EndIf
  225.  
  226.