home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / armsdk20.zip / armsdk.exe / INSTALL.BAT < prev    next >
DOS Batch File  |  1998-10-23  |  6KB  |  178 lines

  1. @ECHO OFF
  2. REM **********************************************************************
  3. REM **
  4. REM **          (C) COPYRIGHT IBM CORP. 1996. ALL RIGHTS RESERVED.
  5. REM **
  6. REM ***********************************************************************
  7. REM **
  8. REM **
  9. REM **
  10. REM ***********************************************************************
  11.  
  12. set prodname="Application Response Measurement Development Toolkit"
  13. set ApiName=ARM
  14. REM set SdkPath=F:
  15. set SdkPath=.
  16.  
  17. if (%ApiName%)==() goto OutOfEnvSpace
  18. if (%prodname%)==() goto OutOfEnvSpace
  19. if (%SdkPath%)==() goto OutOfEnvSpace
  20.        @cls
  21.        echo ***************************************************************
  22.        echo *                                                             *
  23.        echo *   This command file installs the                            *
  24.        echo     %prodname%
  25.        echo *   In order to successfully perform this installation,       *
  26.        echo *   the following must be true:                               *
  27.        echo *                                                             *
  28.        echo *     1.  The CD root directory must be the                   *
  29.        echo *         current directory:                                  *
  30.        echo *                                                             *
  31.        echo ***************************************************************
  32.        echo Press any key to start the installation. . .
  33.        pause > nul
  34. cls
  35.  
  36. echo ***************************************************************
  37. echo ***************************************************************
  38. echo ***************************************************************
  39. echo WARNING: If you have installed another application supporting
  40. echo          the %prodname% API
  41. echo          This command will overwrite any previous installations
  42. echo          of the API.
  43. echo          If so, cancel %0 now with CNTL-C.
  44. echo ***************************************************************
  45. echo ***************************************************************
  46. echo ***************************************************************
  47. pause
  48.  
  49.     if (%1)==() goto Usage
  50.     if not exist %SdkPath%\%ApiName%.LST goto BadPath
  51.         set DestPat=%1\ARM_SDK
  52.         rem -----------------------------------
  53.         rem  Create directories
  54.         rem  and
  55.         rem  Copy files
  56.         rem -----------------------------------
  57.  
  58.         MD %DestPat%
  59.           xcopy %SdkPath%\README.PC            %DestPat%\
  60.  
  61.         MD %DestPat%\DOC
  62.           xcopy %SdkPath%\DOC\*.*              %DestPat%\DOC
  63.  
  64.         MD %DestPat%\INCLUDE
  65.           xcopy %SdkPath%\INCLUDE\*.*        %DestPat%\include /s
  66.  
  67.         MD %DestPat%\LIB
  68.           MD %DestPat%\LIB\WIN95_NT
  69.             xcopy %SdkPath%\LIB\WIN95_NT\*.DLL %DestPat%\LIB\WIN95_NT\
  70.             xcopy %SdkPath%\LIB\WIN95_NT\*.LIB %DestPat%\LIB\WIN95_NT\
  71.           MD %DestPat%\LIB\OS2
  72.             xcopy %SdkPath%\LIB\OS2\*.DLL      %DestPat%\LIB\OS2
  73.             xcopy %SdkPath%\LIB\OS2\*.LIB      %DestPat%\LIB\OS2\
  74.           MD %DestPat%\LIB\LOGAGENT
  75.             xcopy %SdkPath%\LIB\LOGAGENT\*.C %DestPat%\LIB\LOGAGENT\
  76.             xcopy %SdkPath%\LIB\LOGAGENT\LOGFILE %DestPat%\LIB\LOGAGENT\
  77.  
  78.         MD %DestPat%\SAMPLES
  79.           MD %DestPat%\SAMPLES\WIN95_NT
  80.             xcopy %SdkPath%\SAMPLES\WIN95_NT\*.* %DestPat%\SAMPLES\WIN95_NT /s
  81.             echo @echo off                                         > %DestPat%\SAMPLES\WIN95_NT\C\SETENV.BAT
  82.             echo set INCLUDE=%DestPat%\INCLUDE;%INCLUDE% >> %DestPat%\SAMPLES\WIN95_NT\C\SETENV.BAT
  83.             echo set LIB=%DestPat%\LIB\WIN95_NT;%LIB%             >> %DestPat%\SAMPLES\WIN95_NT\C\SETENV.BAT
  84.           MD %DestPat%\SAMPLES\OS2
  85.             xcopy %SdkPath%\SAMPLES\OS2\*.*      %DestPat%\SAMPLES\OS2 /s
  86.             echo @echo off                                    > %DestPat%\SAMPLES\OS2\C\SETENV.CMD
  87.             echo set INCLUDE=%DestPat%\INCLUDE;%INCLUDE% >> %DestPat%\SAMPLES\OS2\C\SETENV.CMD
  88.             echo set LIB=%DestPat%\LIB\OS2;%LIB%             >> %DestPat%\SAMPLES\OS2\C\SETENV.CMD
  89.  
  90. goto DoneCompleted
  91.  
  92. :OutOfEnvSpace
  93.     rem -----------------------------------
  94.     rem  Display Out of Env. Space Message
  95.     rem -----------------------------------
  96.  
  97.     echo:
  98.     echo: Error: Out of Environment Space !!
  99.     echo:
  100.     echo:        Increase the size of your environment using the
  101.     echo:        '/e' switch on COMMAND.COM.
  102.     echo:
  103.     echo:        Example CONFIG.SYS:
  104.     echo:
  105.     echo:           SHELL=C:\COMMAND.COM /e:512
  106.     echo:
  107.     goto DoneAborted
  108.  
  109. :BadPath
  110.     rem -----------------------------------
  111.     rem  Display Bad Source Path Message
  112.     rem -----------------------------------
  113.  
  114.     echo:
  115.     echo: Error: Bad Source Path !!
  116.     echo:
  117.     echo: The current working directory is not the CD-ROM drive
  118.     echo: with the %prodname% CD in the drive.
  119.     echo: Please make sure the correct CD is in the drive and
  120.     echo: the current directory is the parent directory of CD.
  121.     echo:
  122.     echo:
  123.     goto DoneAborted
  124.  
  125. :Usage
  126.     rem ---------------------------
  127.     rem  Display INSTALL.BAT Usage
  128.     rem ---------------------------
  129.  
  130.     echo:
  131.     echo: Usage:
  132.     echo:        %0  {drive}
  133.     echo:
  134.     echo: where {drive} = destination drive
  135.     echo:
  136.     echo: example:
  137.     echo:          %0 c:
  138.     echo:
  139.     goto DoneAborted
  140.  
  141. :MissSdkPath
  142.     rem -----------------------------
  143.     rem  Display Set SdkPath Message
  144.     rem -----------------------------
  145.  
  146.     echo:
  147.     echo: Error: Bad SDK DRIVE !!
  148.     echo:
  149.     echo:       %SdkPath%
  150.     echo:
  151.     echo:       Set the 'SdkPath' environment variable in
  152.     echo:       %0.BAT to your CD drive or change directory
  153.     echo:       to <your CD drive>:\
  154.     echo:
  155.     goto DoneAborted
  156.  
  157. :DoneAborted
  158.     echo: Installation failed
  159.     goto Done
  160.  
  161. :DoneCompleted
  162.     echo:
  163.     echo: -----------------------------------
  164.     echo:       Installation completed
  165.     echo: -----------------------------------
  166.     echo:
  167.     echo:       %prodname% installed in
  168.     echo:
  169.     echo:           %DestPat%
  170.     echo:
  171.     goto Done
  172.  
  173. :Done
  174. set prodname=
  175. set SdkPath=
  176. set ApiName=
  177.  
  178.