home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / btag201.zip / install.cmd < prev    next >
OS/2 REXX Batch file  |  1998-03-12  |  5KB  |  133 lines

  1. /*****************************************************************************/
  2. /* FA Partners                                                               */
  3. /* Copyright (c) FA Partner 1997, 1998                                       */
  4. /*---------------------------------------------------------------------------*/
  5. /* Name        : install.cmd                                                 */
  6. /* Description : Installs the Bandit Tagger                                  */
  7. /*---------------------------------------------------------------------------*/
  8. /* 1997-08-10  | Created                                 | FB                */
  9. /* 1997-08-27  | Inserted product support option.        | FB                */
  10. /* 1997-11-07  | Aligned with Bandit Tagger v1.27a       | FB                */
  11. /* 1997-11-10  | Promted user to overwrite old os2.tag   | FB                */
  12. /* 1998-02-12  | Added creation of nested directories    | FB                */
  13. /* 1998-02-12  | Added creation of Bandit Netscape icon  | FB                */
  14. /* 1998-02-23  | Added creation of shadow in startup     | FB                */
  15. /*             | folder                                  |                   */
  16. /* 1998-03-12  | Aligned with Bandit Tagger v2.01        | FB                */
  17. /*****************************************************************************/
  18.  
  19. '@ECHO OFF'
  20.  
  21. call RxFuncAdd 'SysCreateObject', 'RexxUtil', 'SysCreateObject'
  22. call RxFuncAdd 'SysCreateShadow', 'RexxUtil', 'SysCreateShadow'
  23. call RxFuncAdd 'SysOpenObject'  , 'RexxUtil', 'SysOpenObject'
  24. call RxFuncAdd 'SysMkDir'       , 'RexxUtil', 'SysMkDir'
  25. call RxFuncAdd 'SysFileTree'    , 'RexxUtil', 'SysFileTree'
  26. call RxFuncAdd 'SysIni'         , 'RexxUtil', 'SysIni'
  27.  
  28. Say 'Install the Bandit Tagger to :'
  29. pull path
  30. Say 'Use Bandit Tagger togther with :'
  31. Say '1. Internet Adventure'
  32. Say '2. SouthSide Software'
  33. Say '3. MR/2 Internet Cruiser Edition for OS/2'
  34. Say '4. Netscape/2'
  35. Say '5. None of the above'
  36.  
  37. pull option
  38.  
  39. select
  40.   when option = 1 then do
  41.     xnews   = "Internet Adventurer v1.20 for OS/2 with Bandit Tagger v2.01"
  42.     xmailer = "Internet Adventurer v1.20 for OS/2 with Bandit Tagger v2.01"
  43.     parent  = "<INETADVFOLDER>"
  44.   end
  45.   when option = 2 then do
  46.     xnews   = "PMINews 1.01a for OS/2 with Bandit Tagger v2.01"
  47.     xmailer = "PMMail 1.95a for OS/2 with Bandit Tagger v2.01"
  48.     parent  = "<PMMAILFLDR>"
  49.   end
  50.   when option = 3 then do
  51.     xnews   = "MR/2 Internet Cruiser Edition for OS/2 v1.38 with Bandit Tagger v2.01"
  52.     xmailer = "MR/2 Internet Cruiser Edition for OS/2 v1.38 with Bandit Tagger v2.01"
  53.     parent  = "<WP_DESKTOP>"
  54.   end
  55.   when option = 4 then do
  56.     xnews   = "Brought to you by OS/2 Warp"
  57.     xmailer = "Brought to you by OS/2 Warp"
  58.     parent = "<NETSCAPEFLDR>"
  59.   end
  60.   otherwise
  61.     xnews   = "Brought to you by OS/2 Warp"
  62.     xmailer = "Brought to you by OS/2 Warp"
  63.     parent = "<WP_DESKTOP>"
  64. end
  65.  
  66. rc = SysIni('bandit.in_', 'BANDIT_USER', 'X_MAILER', xmailer);
  67. rc = SysIni('bandit.in_', 'BANDIT_USER', 'X_NEWS'  , xnews  );
  68.  
  69. position = 1;
  70.  
  71. do while (position <> 0)
  72.   position = pos("\", path, position+1)
  73.   if (position <> 0) then
  74.     createPath = substr(path, 1, position-1)
  75.   else
  76.     createPath = substr(path, 1)
  77.   rc = SysMkDir(createPath)
  78. end
  79.  
  80. Say  'Place Bandit Tagger for Netscape in the start-up folder. (Y/N) ?';
  81. Pull startupFolder
  82.  
  83. /* Avoid overwriting old inifiles. & os2.tag */
  84. Call SysFileTree path'\os2.tag', 'fileStem', 'F';
  85. if fileStem.0 <> 0 then do
  86.   Say 'Do your want to overwrite the os2.tag file (Y/N) ?';
  87.   Pull tagOverwrite
  88. end
  89.  
  90. if (rc = 0 | rc = 5) then do
  91.   'copy license.doc  'path'\license.doc'
  92.   'copy bandit.exe   'path'\bandit.exe'
  93.   'copy hookdll.dll  'path'\hookdll.dll'
  94.   'copy st.exe       'path'\st.exe'
  95.   'copy bandit.cmd   'path'\bandit.cmd'
  96.   'copy netscape.ico 'path'\netscape.ico'
  97.   'copy file_id.diz  'path'\file_id.diz'
  98.   'copy bandit.doc   'path'\bandit.doc'
  99.   'copy wysiwyg.ta_  'path'\wysiwyg.ta_'
  100.  
  101.   if fileStem.0 = 0 | tagOverwrite = 'Y' then
  102.     'copy os2.tag     'path'\os2.tag'
  103.  
  104.   Call SysFileTree path'\bandit.ini', 'fileStem', 'F';
  105.  
  106.   if fileStem.0 = 0 then
  107.     'copy bandit.in_  'path'\bandit.ini'
  108.  
  109.  
  110.   rc = SysOpenObject(parent, "icon", "TRUE")
  111.  
  112.  
  113.   rc = SysCreateObject("WPProgram", "Bandit Tagger", parent,,
  114.                        "EXENAME="path"\bandit.exe;OBJECTID=<BANDIT>", "replace")
  115.   if rc = 0 then
  116.     rc = SysCreateObject("WPProgram", "Bandit Tagger", "<WP_DESKTOP>",,
  117.                        "EXENAME="path"\bandit.exe;OBJECTID=<BANDIT>", "replace")
  118.  
  119.   rc = SysCreateObject("WPProgram", "Bandit Tagger for Netscape", parent,,
  120.                        "EXENAME="path"\bandit.exe;OBJECTID=<BANDIT_NETSCAPE>;ICONFILE="path"\NETSCAPE.ICO;PARAMETERS=/n", "replace")
  121.  
  122.   if rc = 0 then
  123.     rc = SysCreateObject("WPProgram", "Bandit Tagger for Netscape", "<WP_DESKTOP>",,
  124.                          "EXENAME="path"\bandit.exe;OBJECTID=<BANDIT_NETSCAPE>;ICONFILE="path"\NETSCAPE.ICO;PARAMETERS=/n", "replace")
  125.  
  126.   if rc = 1  & startupFolder = 'Y' then
  127.     rc = SysCreateShadow("<BANDIT_NETSCAPE>", "<WP_START>")
  128. end
  129. else
  130.   Say 'Unable to create directories. Installation ended.'
  131.  
  132. exit
  133.