home *** CD-ROM | disk | FTP | other *** search
/ Spel 4 / Spel4.iso / os2 / actie / bemdemo / install.cmd < prev    next >
Encoding:
Text File  |  1996-05-27  |  8.0 KB  |  175 lines

  1. /* INSTALL.cmd - (c) Copyright 1996, Rhintek, Incorporated */
  2.  
  3.    root = 'BEMDEMO1'
  4.  
  5.    '@echo off'
  6.  
  7.    /* get the system functions involved so that we can use them */
  8.    call RxFuncAdd 'SysLoadFuncs','RexxUtil','SysLoadFuncs'
  9.    call SysLoadFuncs
  10.  
  11.    /* open the readme file in e */
  12.    'start "BEM Readme" /F e readme.1st'
  13.    say 'Installing...'
  14.  
  15.    /* get the current directory */
  16.    thepath = SysSearchPath( PATH, "BEMbook.ico" )
  17.    lastslash = lastpos( '\', thepath)
  18.    thepath = substr( thepath, 1, lastslash )
  19.  
  20.    /* make the folder for the BEM directory on the desktop */
  21.    icons = 'ICONFILE=' || thepath || 'BEMFLDR.ICO;ICONNFILE=1,' || thepath || 'BEMFLDRo.ICO'
  22.    background = 'BACKGROUND=' || thepath || 'tile2blu.bmp,T,1,I;'
  23.    setupstring = 'OBJECTID=<'||root||'FLDR>;' || background || icons
  24.    rc = SysCreateObject( WPFolder, "BEM Demo", "<WP_DESKTOP>", setupstring )
  25.    if rc = 0
  26.       then say "error in creating folder on the desktop"
  27.  
  28.    /* add the shadow of the general readme (so its first in the folder) */
  29.    setupstring = 'SHADOWID=' || thepath || 'readme.1st;'
  30.    rc = SysCreateObject( WPShadow, " ", "<"||root||"FLDR>", setupstring )
  31.    if rc = 0
  32.       then say "error in creating shadow of General Readme"
  33.  
  34.    /* make the program object for the config.exe */
  35.    execstring = 'EXENAME=' || thepath || 'config.exe;'
  36.    startstring = 'STARTUPDIR=' || thepath
  37.    icons = 'ICONFILE=' || thepath || 'bconfig.ICO;'
  38.    setupstring = 'OBJECTID=<'||root||'CFG>;' || icons || execstring || startstring
  39.    rc = SysCreateObject( WPProgram, "BEM Config", "<"||root||"FLDR>", setupstring )
  40.    if rc = 0
  41.       then say "error in creating Config object"
  42.  
  43.    /* make the program object for single-player BEM */
  44.    execstring = 'EXENAME=' || thepath || 'oseer.exe;'
  45.    paramstring = 'PARAMETERS=pld;'
  46.    startstring = 'STARTUPDIR=' || thepath
  47.    icons = 'ICONFILE=' || thepath || 'single.ICO;'
  48.    setupstring = 'OBJECTID=<'||root||'SNGL>;' || icons || execstring || paramstring || startstring
  49.    rc = SysCreateObject( WPProgram, "Single-Player", "<"||root||"FLDR>", setupstring )
  50.    if rc = 0
  51.       then say "error in creating Single-Player"
  52.  
  53.    /* make a program object that points to the inf */
  54.    execstring = 'EXENAME=view.exe;'
  55.    paramstring = 'PARAMETERS=bemnet.inf;'
  56.    startstring = 'STARTUPDIR=' || thepath
  57.    icons = 'ICONFILE=' || thepath || 'bembook.ICO;'
  58.    setupstring = 'OBJECTID=<'||root||'HELP>;' || icons || execstring || paramstring || startstring
  59.    rc = SysCreateObject( WPProgram, "BEM Help", "<"||root||"FLDR>", setupstring )
  60.    if rc = 0
  61.       then say "error in creating BEM Book"
  62.  
  63.    /* make the folder for the Client in the BEM folder */
  64.    icons = 'ICONFILE=' || thepath || 'BEMFLDR.ICO;ICONNFILE=1,' || thepath || 'BEMFLDRo.ICO'
  65.    background = 'BACKGROUND=' || thepath || 'tile2grn.bmp,T,1,I;'
  66.    setupstring = 'OBJECTID=<'||root||'CLNT>;' || background || icons
  67.    rc = SysCreateObject( WPFolder, "Client", "<"||root||"FLDR>", setupstring )
  68.    if rc = 0
  69.       then say "error in creating client folder in BEM demo "
  70.  
  71.    /* add the readme first so that is is the object to the left */
  72.    setupstring = 'SHADOWID=' || thepath || 'readme.clt;'
  73.    rc = SysCreateObject( WPShadow, " ", "<"||root||"CLNT>", setupstring )
  74.    if rc = 0
  75.       then say "error in creating shadow of Client Readme"
  76.  
  77.    /* add the Direct-Connect client */
  78.    execstring = 'EXENAME=' || thepath || 'rhino.exe;'
  79.    paramstring = 'PARAMETERS=clntdir.rcf "/T=Direct-Connect Client";'
  80.    startstring = 'STARTUPDIR=' || thepath
  81.    icons = 'ICONFILE=' || thepath || 'single.ICO;'
  82.    setupstring = 'OBJECTID=<'||root||'CDIR>;' || icons || execstring || paramstring || startstring
  83.    rc = SysCreateObject( WPProgram, "Direct-Connect", "<"||root||"CLNT>", setupstring )
  84.    if rc = 0
  85.       then say "error in creating Client Direct-Connect"
  86.  
  87.    /* add the COM client */
  88.    execstring = 'EXENAME=' || thepath || 'rhino.exe;'
  89.    paramstring = 'PARAMETERS=clntcom.rcf "/T=COM Client";'
  90.    startstring = 'STARTUPDIR=' || thepath
  91.    icons = 'ICONFILE=' || thepath || 'single.ICO;'
  92.    setupstring = 'OBJECTID=<'||root||'CCOM>;' || icons || execstring || paramstring || startstring
  93.    rc = SysCreateObject( WPProgram, "Modem", "<"||root||"CLNT>", setupstring )
  94.    if rc = 0
  95.       then say "error in creating Client COM"
  96.  
  97.    /* add the Client Internet/TCPIP connection object */
  98.    execstring = 'EXENAME=' || thepath || 'rhino.exe;'
  99.    paramstring = 'PARAMETERS=client.rcf "/T=Internet/TCPIP";'
  100.    startstring = 'STARTUPDIR=' || thepath
  101.    icons = 'ICONFILE=' || thepath || 'single.ICO;'
  102.    setupstring = 'OBJECTID=<'||root||'CTCPIP>;' || icons || execstring || paramstring || startstring
  103.    rc = SysCreateObject( WPProgram, "Internet/TCPIP", "<"||root||"CLNT>", setupstring )
  104.    if rc = 0
  105.       then say "error in creating Internet/TCPIP Client"
  106.  
  107.    /* make the folder for Server in the BEM demo folder */
  108.    icons = 'ICONFILE=' || thepath || 'BEMFLDR.ICO;ICONNFILE=1,' || thepath || 'BEMFLDRo.ICO'
  109.    background = 'BACKGROUND=' || thepath || 'tile2red.bmp,T,1,I;'
  110.    setupstring = 'OBJECTID=<'||root||'SRVR>;' || background || icons
  111.    rc = SysCreateObject( WPFolder, "Server", "<"||root||"FLDR>", setupstring )
  112.    if rc = 0
  113.       then say "error in creating server folder in BEM demo"
  114.  
  115.    /* add the readme first so that it is the leftmost item */
  116.    setupstring = 'SHADOWID=' || thepath || 'readme.svr;'
  117.    rc = SysCreateObject( WPShadow, " ", "<"||root||"SRVR>", setupstring )
  118.    if rc = 0
  119.       then say "error in creating shadow of Server Readme"
  120.  
  121.    /* add the overseer to the Server Folder (since it has to run first, put it here) */
  122.    execstring = 'EXENAME=' || thepath || 'oseer.exe;'
  123.    startstring = 'STARTUPDIR=' || thepath
  124.    icons = 'ICONFILE=' || thepath || 'overseer.ICO;'
  125.    setupstring = 'OBJECTID=<'||root||'OSEER>;' || icons || execstring || startstring
  126.    rc = SysCreateObject( WPProgram, "Overseer", "<"||root||"SRVR>", setupstring )
  127.    if rc = 0
  128.       then say "error in creating overseer"
  129.  
  130.    /* make the program object for local player BEM */
  131.    execstring = 'EXENAME=' || thepath || 'pld.exe;'
  132.    paramstring = 'PARAMETERS=/c=oseer;'
  133.    startstring = 'STARTUPDIR=' || thepath
  134.    icons = 'ICONFILE=' || thepath || 'single.ICO;'
  135.    setupstring = 'OBJECTID=<'||root||'LCPL>;' || icons || execstring || startstring
  136.    rc = SysCreateObject( WPProgram, "Local-Player", "<"||root||"SRVR>", setupstring )
  137.    if rc = 0
  138.       then say "error in creating Local-Player"
  139.  
  140.    /* add the Direct-Connect server */
  141.    execstring = 'EXENAME=' || thepath || 'rhino.exe;'
  142.    paramstring = 'PARAMETERS=srvrdir.rcf "/T=Direct-Connect Server";'
  143.    startstring = 'STARTUPDIR=' || thepath
  144.    icons = 'ICONFILE=' || thepath || 'bserver.ICO;'
  145.    setupstring = 'OBJECTID=<'||root||'SDIR>;' || icons || execstring || paramstring || startstring
  146.    rc = SysCreateObject( WPProgram, "Direct-Connect", "<"||root||"SRVR>", setupstring )
  147.    if rc = 0
  148.       then say "error in creating Server Direct-Connect"
  149.  
  150.    /* put the COM server in -- we expect this to be the most common connection */
  151.    execstring = 'EXENAME=' || thepath || 'rhino.exe;'
  152.    paramstring = 'PARAMETERS=srvrcom.rcf "/T=COM Server";'
  153.    icons = 'ICONFILE=' || thepath || 'bserver.ICO;'
  154.    setupstring = 'OBJECTID=<'||root||'SCOM>;' || icons || execstring || paramstring || startstring
  155.    rc = SysCreateObject( WPProgram, "Modem", "<"||root||"SRVR>", setupstring )
  156.    if rc = 0
  157.       then say "error in creating Server COM"
  158.  
  159.    /* put the multisession server in */
  160.    execstring = 'EXENAME=' || thepath || 'rhino.exe;'
  161.    paramstring = 'PARAMETERS=server.rcf "/T=Multisession Server";'
  162.    icons = 'ICONFILE=' || thepath || 'bserver.ICO;'
  163.    setupstring = 'OBJECTID=<'||root||'SMULTI>;' || icons || execstring || paramstring || startstring
  164.    rc = SysCreateObject( WPProgram, "MultiSession", "<"||root||"SRVR>", setupstring )
  165.    if rc = 0
  166.       then say "error in creating MultiSession Server"
  167.  
  168.    say 'Install Complete, read the readme.1st file and have fun, Soldier!'
  169.  
  170. endit:
  171.  
  172.  
  173. /* pause
  174.  'kill e' */
  175.