home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 33 VDrivers / 33-VDrivers.zip / neomagic.zip / SETUP.CMD < prev    next >
OS/2 REXX Batch file  |  1999-06-28  |  2KB  |  110 lines

  1. @echo off
  2. goto start
  3.  
  4.     *
  5.     * This command file installs the NeoMagic OS/2 3.0/4.0 SBCS display
  6.     * driver.
  7.     *
  8.     * To install the driver from a directory on the hard disk copy all
  9.     * files from the installation diskette to the same directory.  Then
  10.     * follow the normal installation procedure.
  11.     *
  12.  
  13. :start
  14. if %1.==. GOTO explain
  15. if %2.==. GOTO defsrc
  16. set orgsrc=%1
  17. set orgdst=%2
  18. goto getparms
  19.  
  20. :defsrc
  21. set dst=%1
  22. set src=.\
  23. set orgdst=%1
  24. set orgsrc=.\
  25. goto check_src
  26.  
  27. :getparms
  28. set src=%1
  29. set dst=%2
  30.  
  31. :check_src
  32. if not exist %src%neomagic.dsc goto fix_src
  33.  
  34. :check_dst
  35. if not exist %dst%os2 goto fix_dst
  36. goto do_install
  37.  
  38. :fix_src
  39. set src=%orgsrc%\
  40. if not exist %src%neomagic.dsc goto fix_src1
  41. goto check_dst
  42.  
  43. :fix_src1
  44. set src=%orgsrc%:\
  45. if not exist %src%neomagic.dsc goto baddrive
  46.  
  47. :fix_dst
  48. set dst=%orgdst%\
  49. if not exist %dst%os2 goto fix_dst2
  50. goto do_install
  51.  
  52. :fix_dst2
  53. set dst=%orgdst%:\
  54. if not exist %dst%os2 goto baddrive
  55.  
  56. :do_install
  57. copy %src%NEOMAGIC.dsc %dst%os2\install\NEOMAGIC.dsc > nul
  58. del %dst%os2\video.cfg > nul 2>&1
  59.  
  60. attrib %dst%psfonts\*.pfb -r > nul
  61. attrib %dst%psfonts\*.pfb +a > nul
  62.  
  63. %dst%os2\install\dspinstl
  64.  
  65. %src%chkkrnl > nul
  66. if ERRORLEVEL 1 GOTO exit
  67.  
  68. :noMiniVdm
  69. echo DEVICE=%dst%OS2\MDOS\VPRPMI.SYS >> %dst%config.sys
  70.  
  71. :exit
  72. echo.
  73. echo ***Installation Complete
  74. echo.
  75. echo.
  76. echo.
  77. goto end
  78.  
  79. :baddrive
  80. echo.
  81. echo ERROR -- Cannot install to drive %1:
  82. echo.
  83. echo !!!  Installation was unsuccessful
  84. echo.
  85. echo.
  86. echo.
  87. goto explain
  88.  
  89. :explain
  90. echo Usage:
  91. echo *
  92. echo *    Change to install drive and CD to install directory
  93. echo *    Then say,
  94. echo *
  95. echo *           SETUP bootdrive
  96. echo *
  97. echo *    Where "bootdrive" is your OS/2 boot drive.  Example:
  98. echo *
  99. echo *           SETUP C                 Installs to C:
  100. echo *           SETUP D                 Installs to D:
  101. echo *             etc.
  102. goto end
  103.  
  104. :end
  105. set src=
  106. set dst=
  107. set orgsrc=
  108. set orgdst=
  109.  
  110.