home *** CD-ROM | disk | FTP | other *** search
- echo off
- clrwin
- -- 11/14/89 SJO GCDS 4.00 Release
- -- 01/30/89 SJO GCDS 3.20 Release
- -- 06/16/87 SJO GCDS 3.10 Release
-
- -- Rev 4.00 GCD SURFACES load and installation process data file
-
- -------- Begin macro definitions -------------------------------------------
- macro DISPLAY_TITLE
- setwin
- setatt 15 1
- clrwin
- title " microCADDS Surfaces 4.00 Installation Procedure "
- endmac
- ----------------------------------------
- macro TOP_WINDOW
- setwin 3 5 78 12
- setatt 0 0
- clrwin
- setwin 2 4 77 11
- setatt 15 2
- clrwin
- setatt 1 2
- endmac
- ----------------------------------------
- macro BOTTOM_WINDOW
- setwin 3 14 78 21
- setatt 0 0
- clrwin
- setwin 2 13 77 20
- setatt 15 2
- clrwin
- setatt 1 2
- endmac
- macro ERROR_WINDOW
- setwin 3 3 75 19
- setatt 0 0
- clrwin
- setwin 2 2 74 18
- setatt 1 7
- clrwin
- setatt 7 0
- endmac
- -------- End macro definitions -------------------------------------------
- SET BOOT={COMSPEC: 1,1}
- -------- Begin execution -------------------------------------------------
- DISPLAY_TITLE
-
- ------- Copy SURFACES Diskette --------
- :disk_S
- echo
- setatt 12 1
- center "IMPORTANT!"
- setatt 15 1
- echo
- center "Welcome to the Surfaces module of microCADDS Geometric Construction"
- center "and Detailing Version 4.00. This program will walk you through the"
- center "installation of Surfaces on your hard disk, and will help you"
- center "configure the software for your specific hardware setup. To"
- center "successfully install Surfaces you will need a minimum of one megabyte"
- center "of space on your hard disk in addition to the space you have already"
- center "allocated for the basic GCD software. One new directory will be"
- center "created on your hard disk, \GCD4\SHADE. It contains the main"
- center "surfacing and shading programs and their support files. If there is a"
- center "conflict with an existing directory name, you will need to rename the"
- center "old directory. As you begin this process, be sure that you are in the"
- center "root directory of the drive on which you wish to load Surfaces. "
-
- echo
- echo
- setatt 10 1
- center " Do you wish to install Surfaces [Y/N]? "
- setatt 15 1
- getsel "YyNn"
- clrwin
- if select N goto cleanup
- if select n goto cleanup
- if infile \DMANTMP "A:\" goto overwrite_attempt
- if infile \DMANTMP "B:\" goto overwrite_attempt
- goto test_environment
-
- :overwrite_attempt
- echo
- center "WARNING: You are attempting to overwrite your Surfaces "
- center "Master Diskette. Your current drive and path are: "
- echo
- type DMANTMP
- echo
- center "Please review your Installation Procedure and try again. "
- echo
- pause
- goto end
-
- --------------------------------------
- :test_environment
- :test1
-
- if not exist \GCD4\SHADE\*.* goto test2
- echo
- echo
- center " WARNING: Directory \GCD4\SHADE currently exists. If you continue, "
- center " you may overwrite existing files, or load Surfaces into "
- center " another program's work area. "
- center " "
- center " If you have previously installed this version (4.00) of "
- center " Surfaces, and you are re-installing it, you can ignore "
- center " this message. "
- echo
- setatt 10 1
- center " Do you wish to continue [Y/N]? "
- setatt 15 1
- getsel "YyNn"
- clrwin
- if select N goto cleanup
- if select n goto cleanup
-
- --Delete Graphics device driver to avoid incompatability problems
- DEL >NUL \GCD4\SHADE\GRAPHICS.DEV
- DEL >NUL \GCD4\SHADE\GRAPHICS.DIF
-
- :test2
- if not exist \SHADE\*.* goto test3
- echo
- echo
- center " WARNING: Directory \SHADE currently exists. Revision 4.00 of "
- center " GCD Surfaces is installed in the \GCD4\SHADE directory. Please "
- center " transfer any needed files from \SHADE to \GCD4\SHADE and delete "
- center " \SHADE directory. "
- echo
- pause
- clrwin
- --Delete Graphics device driver to avoid incompatability problems
- DEL >NUL \SHADE\GRAPHICS.DEV
- DEL >NUL \SHADE\GRAPHICS.DIF
-
- :test3
- if not exist \GCD3\SHADE\*.* goto begin
- echo
- echo
- center " WARNING: Directory \GCD3\SHADE currently exists. Revision 4.00 of"
- center " GCD Surfaces is installed in the \GCD4\SHADE directory. Please "
- center " transfer any needed files from \GCD3\SHADE to \GCD4\SHADE and "
- center " delete \GCD3\SHADE directory. "
- echo
- pause
- clrwin
-
- ------- Build Directory Structure ----------------------------------------
- :begin
-
- cd \
- md \GCD4\SHADE
-
- ------- Copy Diskette 1 --------------------------------------------------
- :diskS_copy
- echo
- echo
- echo
- echo
- echo
- center "Creating \GCD4\SHADE directory..."
- echo
- -- If \GCD4\GRAPHICS.DEV does not exist, CONFIG wasn't run
- if not exist \GCD4\graphics.dev goto graph_err
-
- :proceed
- center "Copying files from the Surfaces diskette"
- echo
- copy {LOAD}:\GCD4\SHADE \GCD4\SHADE >\error.fil
- if infile \error.fil "Insufficient disk space" goto disk_full
-
- -- If GRAPHICS.DAT exists, then SHADE requires a different driver.
- if not exist \GCD4\graphics.dat goto copy_same
-
- -- use FS switch for From Shade specific installation.
- cd \
-
- \gcd4\install\diskman \gcd4\graphics.dat FS
-
- DISPLAY_TITLE
- del >nul \gcd4\graphics.dat
- goto chk_autoex
-
- :copy_same
- -- If GRAPHICS.dat doesn't exist, then SHADE uses same driver as GCD.
- center "Copying graphics device driver into the \SHADE directory..."
- copy \GCD4\graphics.dev \GCD4\shade >\error.fil
- if infile \error.fil "Insufficient disk space" goto disk_full
- copy \GCD4\graphics.dif \GCD4\shade >\error.fil
- if infile \error.fil "Insufficient disk space" goto disk_full
-
- ------- Edit AUTOEXEC.BAT --------
- :chk_autoex
- clrwin
-
- :Check if COMSPEC invalid
- if {bootltr} == bad goto skip_edauto
-
- echo
- center "Editing AUTOEXEC.BAT..."
- subr EDAUTOEX path 1 ev 1
- gcd4\shade
- cvshade
- if not exist {BOOT}:\AUTOEXEC.OLD goto no_old_autoex
- center "Finished editing! Please make note of the following changes"
- TOP_WINDOW
- title " Old AUTOEXEC.BAT "
- setatt 15 2
- type {BOOT}:\AUTOEXEC.OLD
- BOTTOM_WINDOW
- title " New AUTOEXEC.BAT "
- setatt 15 2
- type {BOOT}:\AUTOEXEC.BAT
- setatt 15 1
- pause
- goto finish
-
- :no_old_autoex
- center "No old AUTOEXEC.BAT found, new one created!"
- TOP_WINDOW
- title " New AUTOEXEC.BAT "
- setatt 15 2
- type {BOOT}:\AUTOEXEC.BAT
- setatt 15 1
- pause
- goto finish
-
- :skip_edauto
- echo
- echo
- echo
- setatt 12 1
- center " Unable to edit your AUTOEXEC.BAT file."
- setatt 15 1
- center "Please include the following in your AUTOEXEC.BAT file: "
- center "PATH C:\GCD4\SHADE;C:\DOS;C:\;"
- center "SET CVSHADE=C:\GCD4\SHADE "
- center "Sustitute your boot drive letter for the C: in the above lines."
- echo
- pause
-
- :finish
-
- :codes
- -- see if internal or dealer box, add codes to \CVOPTION.FIl
-
- ------------------------------------------------------------------------
- :internal
- -- Prime internal, Option number is: 5211 - Surfaces Release
- echo "989898 33172 34203 38016 38031 38535 197" >&TMP1
- SUBR ADOPTION &TMP1 &TMP2
- if not infile &TMP2 Error goto success
- goto dealer
-
- ------------------------------------------------------------------------
- :dealer
- -- Dealer, Option number is: 5211 - Surfaces Release
- echo "999999 37268 38299 39069 40339 39838 253" >&TMP1
- SUBR ADOPTION &TMP1 &TMP2
- if not infile &TMP2 Error goto success
- goto no_can_do
-
- ------------------------------------------------------------------------
- :no_can_do
- -- For Customers only.
- --echo
- --echo
- --center "Codes not added (not supposed to!)"
- --echo
- --pause
- goto complete
-
- :success
- -- For Dealers and Prime Internal only.
- echo
- echo
- center "Codes added!"
- echo
- pause
-
- :complete
- ------- Completion Message --------
- DISPLAY_TITLE
- echo
- echo
- echo
- center " Surfaces Installation Complete!!!!! "
- echo
- center " Please remove diskette and store in a safe place. "
- center " After installation is complete you must reboot your system "
- center " by typing [Ctrl][Alt][Del] to make changes take effect. "
- echo
- pause
- --------------------------------------
- goto cleanup
-
- :disk_full
- clrwin
- echo
- echo
- echo
- echo
- setatt 12 1
- center "*** FATAL ERROR ***"
- echo
- center "*** HARD DISK FULL ***"
- echo
- setatt 15 1
- center "Please backup and delete all unneccesary files from hard disk"
- center "and try again. Surfaces requires at least 1 Megabyte of disk"
- center "space. "
- echo
- pause
- goto cleanup
-
- :graph_err
- clrwin
- echo
- echo
- echo
- setatt 10 1
- center "WARNING: GCD Surfaces requires a graphics device driver to be "
- center " installed in the GCD4 directory prior to the Surfaces "
- center " installation. If you have not yet installed your graphics "
- center " board for the basic GCD package, exit this program now. "
- center " Then type 'CONFIG' to install the graphics device driver. "
- echo
- pause
- goto cleanup
-
- :cleanup
- -- if not called from GCD installation, delete dat file
- if not "%1" == FL del >nul \install.dat
- del >nul \error.fil
- del >nul \cvoption.new
- del >nul \&tmp1
- del >nul \&tmp2
- SET BOOT=
-
- :end
- exit
-