home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 12 / CD_ASCQ_12_0294.iso / vrac / wdevnt.zip / INSTALL.BAT < prev    next >
DOS Batch File  |  1993-10-30  |  4KB  |  147 lines

  1. @echo off
  2. REM  Installation script for Windev on Windows 3.1 or NT.
  3. REM  Must be run from the installation disk.
  4. REM  Usage: INSTALL [-n or -w] dest-dir
  5.  
  6. set FILLER=123456789012345678901234567890
  7. if %FILLER% == 123456789012345678901234567890 goto getos
  8. @echo Increase environment space before continuing
  9. goto end
  10.  
  11. :getos
  12. set FILLER=
  13. if "%1" == "-w" goto win3
  14. if "%1" == "-W" goto win3
  15. if "%1" == "-n" goto nt
  16. if "%1" == "-N" goto nt
  17.  
  18. if exist win3\windev.exe goto setwin3
  19. if exist nt\windev.exe goto setnt
  20. @echo INSTALL must be run from the root of the installation disk.
  21. goto end
  22.  
  23. :win3
  24. shift
  25. if exist win3\windev.exe goto setwin3
  26. @echo Cannot find windev.exe for Windows 3.1.
  27. goto end
  28.  
  29. :setwin3
  30. set os=win3
  31. @echo Installing Windev for Windows 3.1
  32. goto setdest
  33.  
  34. :nt
  35. shift
  36. if exist nt\windev.exe goto setnt
  37. @echo Cannot find windev.exe for Windows NT.
  38. goto end
  39.  
  40. :setnt
  41. set os=nt
  42. @echo Installing Windev for Windows NT
  43.  
  44. :setdest
  45. if not "%1" == "" goto windir
  46. @echo Usage: INSTALL [-n or -w] destination-directory
  47. goto end
  48.  
  49. :windir
  50. if not "%windir%" == "" goto mkdirs
  51. if exist c:\windows\win.ini goto setwin
  52. @echo Cannot determine Windows installation directory.
  53. @echo Set environment variable WINDIR and start again.
  54. goto end
  55.  
  56. :setwin
  57. set windir=C:\WINDOWS
  58.  
  59. :mkdirs
  60. set destdir=%1\windev
  61. mkdir %destdir%
  62. mkdir %destdir%\%os%
  63.  
  64. REM --- O/S specific, common named files.
  65. @echo Copying to %destdir%\%os% ...
  66. @echo windev.exe...
  67. copy %os%\windev.exe %destdir%\%os%
  68. if not exist %destdir%\%os%\windev.exe goto copyerr
  69. @echo windevx.exe...
  70. copy %os%\windevx.exe %destdir%\%os%
  71. if not exist %destdir%\%os%\windevx.exe goto copyerr
  72. if exist %os%\windev.reg copy %os%\windev.reg %destdir%\%os%
  73.  
  74. if "%os%" == "nt" goto ntfiles
  75. REM --- Windows 3 specific files.
  76. @echo instw31.txt...
  77. copy instw31.txt %destdir%
  78. if not exist %destdir%\instw31.txt goto copyerr
  79. @echo stbar.dll...
  80. copy %os%\stbar.dll %destdir%\%os%
  81. if not exist %destdir%\%os%\stbar.dll goto copyerr
  82. @echo Copying windevpj.pif to %windir%
  83. copy %os%\windevpj.pif %windir%
  84. if not exist %windir%\windevpj.pif goto copyerr
  85. if exist %windir%\system\ctl3d.dll goto shared
  86. @echo Copying ctl3d.dll to %windir%\system
  87. copy %os%\ctl3d.dll %windir%\system
  88. goto shared
  89.  
  90. :ntfiles
  91. REM --- Windows NT specific files.
  92. if not exist instaxp.txt goto instnt
  93. @echo instaxp.txt...
  94. copy instaxp.txt %destdir%
  95. if not exist %destdir%\instaxp.txt goto copyerr
  96. :instnt
  97. if not exist instnt.txt goto projexec
  98. @echo instnt.txt...
  99. copy instnt.txt %destdir%
  100. if not exist %destdir%\instnt.txt goto copyerr
  101. :projexec
  102. @echo projexec.exe...
  103. copy %os%\projexec.exe %destdir%\%os%
  104. if not exist %destdir%\%os%\projexec.exe goto copyerr
  105. if exist %windir%\system32\ctl3d32.dll goto shared
  106. if not exist %os%\ctl3d32.dll goto shared
  107. @echo Copying ctl3d32.dll to %windir%\system32
  108. copy %os%\ctl3d32.dll %windir%\system32\ctl3d32.dll
  109.  
  110. :shared
  111. REM --- Common files.
  112. @echo Copying to %destdir% ...
  113. @echo readme.txt...
  114. copy readme.txt %destdir%
  115. if not exist %destdir%\readme.txt goto copyerr
  116. @echo windev.hlp...
  117. copy windev.hlp %destdir%
  118. if not exist %destdir%\windev.hlp goto copyerr
  119. @echo license.txt...
  120. copy license.txt %destdir%
  121. if not exist %destdir%\license.txt goto copyerr
  122. @echo changes.txt...
  123. copy changes.txt %destdir%
  124. if not exist %destdir%\changes.txt goto copyerr
  125. @echo quickgo.txt...
  126. copy quickgo.txt %destdir%
  127. if not exist %destdir%\quickgo.txt goto copyerr
  128. @echo windevx.txt...
  129. copy windevx.txt %destdir%
  130. if not exist %destdir%\windevx.txt goto copyerr
  131. @echo features.wri...
  132. copy features.wri %destdir%
  133. if not exist %destdir%\features.wri goto copyerr
  134.  
  135. @echo ---------------------------------------------------------
  136. @echo Windev has been successfully installed in %destdir%
  137. @echo Please read readme.txt before starting use.
  138. @echo Use Program Manager to add %destdir%\%os%\windev.exe
  139. @echo to a program group.
  140. @echo ---------------------------------------------------------
  141. goto end
  142.  
  143. :copyerr
  144. @echo File copy error, abandoning installation.
  145.  
  146. :end
  147.