home *** CD-ROM | disk | FTP | other *** search
/ Multimedia & CD-ROM 4 / mmcd04-julaug1995-cd.iso / applicat / educate / windev / install.bat < prev    next >
DOS Batch File  |  1993-09-07  |  4KB  |  137 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. @echo instnt.txt...
  93. copy instnt.txt %destdir%
  94. if not exist %destdir%\instnt.txt goto copyerr
  95. @echo projexec.exe...
  96. copy %os%\projexec.exe %destdir%\%os%
  97. if not exist %destdir%\%os%\projexec.exe goto copyerr
  98. if exist %windir%\system\ctl3d32.dll goto shared
  99. if not exist %os%\ctl3d32.dll goto shared
  100. @echo Copying ctl3d32.dll to %windir%\system
  101. copy %os%\ctl3d32.dll %windir%\system
  102.  
  103. :shared
  104. REM --- Common files.
  105. @echo Copying to %destdir% ...
  106. @echo readme.txt...
  107. copy readme.txt %destdir%
  108. if not exist %destdir%\readme.txt goto copyerr
  109. @echo windev.hlp...
  110. copy windev.hlp %destdir%
  111. if not exist %destdir%\windev.hlp goto copyerr
  112. @echo license.txt...
  113. copy license.txt %destdir%
  114. if not exist %destdir%\license.txt goto copyerr
  115. @echo changes.txt...
  116. copy changes.txt %destdir%
  117. if not exist %destdir%\changes.txt goto copyerr
  118. @echo windevx.txt...
  119. copy windevx.txt %destdir%
  120. if not exist %destdir%\windevx.txt goto copyerr
  121. @echo features.wri...
  122. copy features.wri %destdir%
  123. if not exist %destdir%\features.wri goto copyerr
  124.  
  125. @echo ---------------------------------------------------------
  126. @echo Windev has been successfully installed in %destdir%
  127. @echo Please read readme.txt before starting use.
  128. @echo Use Program Manager to add %destdir%\%os%\windev.exe
  129. @echo to a program group.
  130. @echo ---------------------------------------------------------
  131. goto end
  132.  
  133. :copyerr
  134. @echo File copy error, abandoning installation.
  135.  
  136. :end
  137.