home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / p / p115 / 7.ddi / GCD4 / INSTALL / INSTALL.DAT < prev   
Encoding:
Text File  |  1989-11-14  |  9.3 KB  |  343 lines

  1. echo off
  2. clrwin
  3. -- 11/14/89 SJO GCDS 4.00 Release
  4. -- 01/30/89 SJO GCDS 3.20 Release
  5. -- 06/16/87 SJO GCDS 3.10 Release
  6.  
  7. -- Rev 4.00 GCD SURFACES load and installation process data file
  8.  
  9. -------- Begin macro definitions -------------------------------------------
  10. macro DISPLAY_TITLE
  11.    setwin
  12.    setatt 15 1
  13.    clrwin
  14.    title  " microCADDS Surfaces 4.00 Installation Procedure "
  15. endmac
  16. ----------------------------------------
  17. macro TOP_WINDOW
  18.   setwin 3 5 78 12  
  19.   setatt 0 0
  20.   clrwin
  21.   setwin 2 4 77 11
  22.   setatt 15 2
  23.   clrwin
  24.   setatt  1 2
  25. endmac
  26. ----------------------------------------
  27. macro BOTTOM_WINDOW
  28.   setwin 3 14 78 21
  29.   setatt 0 0
  30.   clrwin
  31.   setwin 2 13 77 20
  32.   setatt 15 2
  33.   clrwin
  34.   setatt  1 2
  35. endmac
  36. macro ERROR_WINDOW
  37.   setwin 3 3 75 19
  38.   setatt 0 0
  39.   clrwin
  40.   setwin 2 2 74 18  
  41.   setatt 1 7
  42.   clrwin
  43.   setatt 7 0
  44. endmac
  45. -------- End macro definitions -------------------------------------------
  46. SET BOOT={COMSPEC: 1,1}
  47. -------- Begin execution -------------------------------------------------
  48. DISPLAY_TITLE
  49.  
  50. ------- Copy SURFACES Diskette -------- 
  51. :disk_S
  52. echo
  53. setatt 12 1
  54. center "IMPORTANT!"
  55. setatt 15 1
  56. echo                                                                         
  57. center "Welcome to  the Surfaces  module of  microCADDS Geometric Construction"
  58. center "and Detailing  Version 4.00.   This  program will walk you through the"
  59. center "installation of  Surfaces  on  your  hard  disk,  and  will  help  you"
  60. center "configure  the   software  for  your  specific  hardware  setup.    To"
  61. center "successfully install  Surfaces you will need a minimum of one megabyte"
  62. center "of space  on your  hard disk in addition to the space you have already"
  63. center "allocated for  the basic  GCD software.   One  new directory  will  be"
  64. center "created on  your  hard  disk,  \GCD4\SHADE.    It  contains  the  main"
  65. center "surfacing and shading programs and their support files.  If there is a"
  66. center "conflict with  an existing directory name, you will need to rename the"
  67. center "old directory.  As you begin this process, be sure that you are in the"
  68. center "root directory of the drive on which you wish to load Surfaces.       "
  69.  
  70. echo
  71. echo 
  72. setatt 10 1
  73. center " Do you wish to install Surfaces [Y/N]? "
  74. setatt 15 1
  75. getsel "YyNn"
  76. clrwin
  77. if select N goto cleanup
  78. if select n goto cleanup
  79. if infile \DMANTMP "A:\" goto overwrite_attempt
  80. if infile \DMANTMP "B:\" goto overwrite_attempt
  81. goto test_environment
  82.  
  83. :overwrite_attempt
  84. echo 
  85. center "WARNING: You are attempting to overwrite your Surfaces        "
  86. center "Master Diskette.  Your current drive and path are:            "
  87. echo
  88. type DMANTMP
  89. echo
  90. center "Please review your Installation Procedure and try again.      "
  91. echo
  92. pause
  93. goto end
  94.  
  95. --------------------------------------
  96. :test_environment
  97. :test1
  98.  
  99. if not exist \GCD4\SHADE\*.* goto test2
  100. echo      
  101. echo 
  102. center "   WARNING: Directory \GCD4\SHADE currently exists.  If you continue, "
  103. center "            you may overwrite existing files, or load Surfaces into   "
  104. center "            another program's work area.                              "
  105. center "                                                                      "
  106. center "            If you have previously installed this version (4.00) of   "
  107. center "            Surfaces, and you are re-installing it, you can ignore    "
  108. center "            this message.                                             "
  109. echo
  110. setatt 10 1
  111. center "  Do you wish to continue [Y/N]?   "
  112. setatt 15 1
  113. getsel "YyNn"
  114. clrwin
  115. if select N goto cleanup
  116. if select n goto cleanup
  117.  
  118. --Delete Graphics device driver to avoid incompatability problems
  119. DEL >NUL \GCD4\SHADE\GRAPHICS.DEV
  120. DEL >NUL \GCD4\SHADE\GRAPHICS.DIF
  121.  
  122. :test2
  123. if not exist \SHADE\*.* goto test3
  124. echo      
  125. echo 
  126. center "   WARNING: Directory \SHADE currently exists.  Revision 4.00 of   "
  127. center "   GCD Surfaces is installed in the \GCD4\SHADE directory.  Please "
  128. center "   transfer any needed files from \SHADE to \GCD4\SHADE and delete "
  129. center "   \SHADE directory.                                               "
  130. echo
  131. pause
  132. clrwin
  133. --Delete Graphics device driver to avoid incompatability problems
  134. DEL >NUL \SHADE\GRAPHICS.DEV
  135. DEL >NUL \SHADE\GRAPHICS.DIF
  136.  
  137. :test3
  138. if not exist \GCD3\SHADE\*.* goto begin
  139. echo      
  140. echo 
  141. center "   WARNING: Directory \GCD3\SHADE currently exists.  Revision 4.00 of"
  142. center "   GCD Surfaces is installed in the \GCD4\SHADE directory.  Please   "
  143. center "   transfer any needed files from \GCD3\SHADE to \GCD4\SHADE and     "
  144. center "   delete \GCD3\SHADE directory.                                     "
  145. echo
  146. pause
  147. clrwin
  148.  
  149. ------- Build Directory Structure ----------------------------------------
  150. :begin
  151.  
  152. cd \
  153. md \GCD4\SHADE
  154.  
  155. ------- Copy Diskette 1 --------------------------------------------------
  156. :diskS_copy
  157. echo
  158. echo
  159. echo
  160. echo
  161. echo
  162. center "Creating \GCD4\SHADE directory..."
  163. echo
  164. -- If \GCD4\GRAPHICS.DEV does not exist, CONFIG wasn't run 
  165. if not exist \GCD4\graphics.dev goto graph_err
  166.  
  167. :proceed
  168. center "Copying files from the Surfaces diskette"
  169. echo
  170. copy {LOAD}:\GCD4\SHADE \GCD4\SHADE >\error.fil
  171. if infile \error.fil "Insufficient disk space" goto disk_full
  172.  
  173. -- If GRAPHICS.DAT exists, then SHADE requires a different driver.
  174. if not exist \GCD4\graphics.dat goto copy_same
  175.  
  176. -- use FS switch for From Shade specific installation.
  177. cd \
  178.  
  179. \gcd4\install\diskman \gcd4\graphics.dat FS
  180.  
  181. DISPLAY_TITLE
  182. del >nul \gcd4\graphics.dat
  183. goto chk_autoex
  184.  
  185. :copy_same
  186. -- If GRAPHICS.dat doesn't exist, then SHADE uses same driver as GCD.
  187. center "Copying graphics device driver into the \SHADE directory..."
  188. copy \GCD4\graphics.dev \GCD4\shade >\error.fil
  189. if infile \error.fil "Insufficient disk space" goto disk_full
  190. copy \GCD4\graphics.dif \GCD4\shade >\error.fil
  191. if infile \error.fil "Insufficient disk space" goto disk_full
  192.  
  193. ------- Edit AUTOEXEC.BAT -------- 
  194. :chk_autoex
  195. clrwin
  196.  
  197. :Check if COMSPEC invalid
  198. if {bootltr} == bad goto skip_edauto
  199.  
  200. echo  
  201. center "Editing AUTOEXEC.BAT..."
  202. subr EDAUTOEX path 1 ev 1
  203. gcd4\shade 
  204. cvshade
  205. if not exist {BOOT}:\AUTOEXEC.OLD goto no_old_autoex
  206. center "Finished editing!  Please make note of the following changes"
  207. TOP_WINDOW
  208. title " Old AUTOEXEC.BAT "
  209. setatt 15 2
  210. type {BOOT}:\AUTOEXEC.OLD
  211. BOTTOM_WINDOW
  212. title " New AUTOEXEC.BAT "
  213. setatt 15 2
  214. type {BOOT}:\AUTOEXEC.BAT
  215. setatt 15 1
  216. pause
  217. goto finish
  218.  
  219. :no_old_autoex
  220. center "No old AUTOEXEC.BAT found, new one created!"
  221. TOP_WINDOW
  222. title " New AUTOEXEC.BAT "
  223. setatt 15 2
  224. type {BOOT}:\AUTOEXEC.BAT
  225. setatt 15 1
  226. pause
  227. goto finish
  228.  
  229. :skip_edauto
  230. echo
  231. echo
  232. echo
  233. setatt 12 1
  234. center " Unable to edit your AUTOEXEC.BAT file."
  235. setatt 15 1
  236. center "Please include the following in your AUTOEXEC.BAT file:        "
  237. center "PATH C:\GCD4\SHADE;C:\DOS;C:\;"
  238. center "SET CVSHADE=C:\GCD4\SHADE     "
  239. center "Sustitute your boot drive letter for the C: in the above lines."
  240. echo 
  241. pause
  242.  
  243. :finish
  244.  
  245. :codes
  246. -- see if internal or dealer box, add codes to \CVOPTION.FIl
  247.  
  248. ------------------------------------------------------------------------
  249. :internal
  250. -- Prime internal, Option number is: 5211 - Surfaces Release
  251. echo "989898 33172 34203 38016 38031 38535 197" >&TMP1
  252. SUBR ADOPTION &TMP1 &TMP2
  253. if not infile &TMP2 Error goto success
  254. goto dealer
  255.  
  256. ------------------------------------------------------------------------
  257. :dealer
  258. -- Dealer, Option number is: 5211 - Surfaces Release
  259. echo "999999 37268 38299 39069 40339 39838 253" >&TMP1
  260. SUBR ADOPTION &TMP1 &TMP2
  261. if not infile &TMP2 Error goto success
  262. goto no_can_do
  263.  
  264. ------------------------------------------------------------------------
  265. :no_can_do
  266. -- For Customers only.
  267. --echo
  268. --echo
  269. --center "Codes not added (not supposed to!)"
  270. --echo 
  271. --pause
  272. goto complete
  273.  
  274. :success
  275. -- For Dealers and Prime Internal only.
  276. echo
  277. echo
  278. center "Codes added!"
  279. echo 
  280. pause
  281.  
  282. :complete
  283. ------- Completion Message -------- 
  284. DISPLAY_TITLE
  285. echo
  286. echo
  287. echo
  288. center " Surfaces Installation Complete!!!!! "
  289. echo
  290. center " Please remove diskette and store in a safe place.            "
  291. center " After installation is complete you must reboot your system   "
  292. center " by typing [Ctrl][Alt][Del] to make changes take effect.      "
  293. echo 
  294. pause
  295. --------------------------------------
  296. goto cleanup
  297.  
  298. :disk_full
  299. clrwin
  300. echo
  301. echo
  302. echo
  303. echo 
  304. setatt 12 1
  305. center "*** FATAL ERROR ***"
  306. echo 
  307. center "*** HARD DISK FULL ***"
  308. echo 
  309. setatt 15 1
  310. center "Please backup and delete all unneccesary files from hard disk"
  311. center "and try again.  Surfaces requires at least 1 Megabyte of disk"
  312. center "space.                                                       "
  313. echo 
  314. pause
  315. goto cleanup
  316.  
  317. :graph_err
  318. clrwin
  319. echo
  320. echo
  321. echo
  322. setatt 10 1
  323. center "WARNING: GCD Surfaces requires a graphics device driver to be      "
  324. center "         installed in the GCD4 directory prior to the Surfaces     "
  325. center "         installation. If you have not yet installed your graphics "
  326. center "         board for the basic GCD package, exit this program now.   "
  327. center "         Then type 'CONFIG' to install the graphics device driver. "
  328. echo 
  329. pause
  330. goto cleanup
  331.  
  332. :cleanup
  333. -- if not called from GCD installation, delete dat file
  334. if not "%1" == FL del >nul \install.dat
  335. del >nul \error.fil
  336. del >nul \cvoption.new
  337. del >nul \&tmp1
  338. del >nul \&tmp2
  339. SET BOOT=
  340.  
  341. :end
  342. exit
  343.