@ECHO OFF
rem   dc2.bat
cd %3
md samples
if not "%1" == "U" goto SKIP2
if exist gfx.sys copy gfx.sys gfxsys.bak > nul:
if exist nc.bat copy nc.bat ncbat.bak > nul:
if exist pe2.pro copy pe2.pro pe2pro.bak > nul:
:SKIP2
copy %2readme.* > nul:
clsa 31
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO        Extracting INSTALLATION DISK #1 files
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
%2g2system -o > nul:
if not errorlevel 1 goto OK1
ECHO 
ECHO        ERROR EXTRACTING SYSTEM FILES...INSTALLATION ABORTED
ECHO 
goto EREND
:OK1
if exist %2ssvr.exe %2ssvr -o > nul:
if exist ncbat.bak copy ncbat.bak nc.bat > nul:
if exist ncbat.bak del ncbat.bak
if exist gfxsys.bak copy gfxsys.bak gfx.sys > nul:
if exist gfxsys.bak del gfxsys.bak
clsa 31
ECHO 
ECHO 
ECHO 
:LOOP1
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO        Now insert INSTALLATION DISK #2 into drive %2
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
pause
if exist %2disk2.000 goto OK5
clsa 31
ECHO 
ECHO        DID NOT FIND DISK 2 IN THE "%2" DRIVE...TRY AGAIN
ECHO 
goto LOOP1
:OK5
clsa 31
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO        Extracting INSTALLATION DISK #2 files
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
%2g2util -o > nul:
if exist pe2pro.bak copy pe2pro.bak pe2.pro > nul:
if not errorlevel 1 goto OK2
ECHO 
ECHO        ERROR EXTRACTING UTILITY FILES...INSTALLATION ABORTED
ECHO 
goto EREND
:OK2
if exist pe2pro.bak del pe2pro.bak
if "%1" == "U" goto SKIP1
%2g2sample -o > nul:
if not exist %2g2post.exe goto OK3
%2g2post -o > nul:
if not errorlevel 1 goto OK3
ECHO 
ECHO        ERROR EXTRACTING SAMPLE FILES...INSTALLATION WILL PROCEED
ECHO        HOWEVER THERE WILL BE NO POST PROCESSORS, TOOLING FILES
ECHO        PROTOCOL FILES, ENGRAVING FONTS OR OTHER SAMPLES INSTALLED
ECHO 
:OK3
clsa 31
ECHO 
ECHO 
ECHO 
:LOOP2
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO        Now insert CAD/CAM ATP Companion disk into drive %2
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
pause
if exist %2atpdisk1.000 goto OK6
clsa 31
ECHO 
ECHO       DID NOT FIND ATP COMPANION DISK IN THE "%2" DRIVE...TRY AGAIN
ECHO 
goto LOOP2
:OK6
copy %2readme.atp > nul:
copy %2*.pmb > nul:
clsa 31
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO        Extracting ATP Companion disk files
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
%2atpmill -o > nul:
%2atpturn -o > nul:
clsa 31
ECHO 
ECHO           Remove the ATP Companion disk from the floppy drive
ECHO 
ECHO 
ECHO 
ECHO           In order to run GRAFX CAD/CAM Starter Kit on your hardware,
ECHO           you need to configure the software to run on the hardware
ECHO           you are using.
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
pause
g2config
clsa 31
ECHO 
ECHO 
ECHO 
ECHO           Please stand by while the Post Processors are being
ECHO                       installed onto the system
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
inspost -s
clsa 31
ECHO 
ECHO 
ECHO 
ECHO         Please stand by while the job description list is built
extlist @geo
clsa 31
ECHO 
ECHO 
ECHO           The installation is now complete
ECHO 
ECHO           The first document you should read is README.TXT located in
ECHO           the %3 directory. From DOS, Just type in README.
ECHO 
ECHO           BRACKET.geo and LATHE1.geo are sample programs for you to get
ECHO           started with.
ECHO 
ECHO           TO START GRAFX CAD/CAM SK Type the following: (WRITE THIS DOWN!)
ECHO 
ECHO                      CD %3 [Enter]
ECHO                      NC [Enter]
ECHO 
pause
clsa 31
ECHO 
ECHO 
ECHO           PLEASE TAKE A MOMENT TO SEND IN YOUR REGISTRATION CARD NOW
ECHO 
ECHO           By registering your GRAFX CAD/CAM Starter Kit you will be
ECHO           kept up to date on new product offerings and special
ECHO           pricing which may be available to existing Datacut customers.
ECHO 
ECHO           You will also receive free of charge a disk containing a
ECHO           screen saver utility compatible with the Starter Kit.
ECHO 
ECHO           If you purchased your GRAFX CAD/CAM Starter Kit directly
ECHO           from Datacut, you are already registered.
ECHO 
ECHO 
pause
goto END
:SKIP1
clsa 31
ECHO 
ECHO 
ECHO           THIS INSTALLATION DISK contains:
ECHO        a) Sample Post Processors  (.PMB extension)
ECHO        b) Sample Tooling files    (.TLL extension)
ECHO        c) Sample Engraving fonts  (.VEC extension)
ECHO        d) Sample Geometry files   (.GEO extension)
ECHO        e) Sample Toolpath files   (.DMB extension)
ECHO        f) Sample DXF Header file  (DXFHEAD.DXH)
ECHO 
ECHO        When updating an existing GRAFX CAD/CAM Starter Kit, these files
ECHO        are installed into the %3\samples directory.  You may want to look
ECHO        at this directory and use the DOS copy command to copy whatever
ECHO        files you want to be installed on the system up to the %3
ECHO        directory.
ECHO 
ECHO        Ready to copy samples into %3\SAMPLES
ECHO 
ECHO 
ECHO 
pause
clsa 31
cd samples
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO        Extracting SAMPLES
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
%2g2sample -n -o > nul:
if not exist %2g2post.exe goto OK4
%2g2post -n -o > nul:
if not errorlevel 1 goto OK4
ECHO 
ECHO        ERROR EXTRACTING SAMPLE FILES...INSTALLATION WILL PROCEED
ECHO        HOWEVER THERE WILL BE NO NEW POST PROCESSORS, TOOLING FILES
ECHO        PROTOCOL FILES, ENGRAVING FONTS OR OTHER SAMPLES INSTALLED
ECHO 
:OK4
cd %3
clsa 31
ECHO 
ECHO 
ECHO 
:LOOP3
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO        Now insert CAD/CAM ATP Companion disk into drive %2
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
pause
if exist %2atpdisk1.000 goto OK7
clsa 31
ECHO 
ECHO       DID NOT FIND ATP COMPANION DISK IN THE "%2" DRIVE...TRY AGAIN
ECHO 
goto LOOP3
:OK7
copy %2readme.atp > nul:
copy %2*.pmb > nul:
clsa 31
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO        Extracting ATP Companion disk files
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
ECHO 
%2atpmill -o > nul:
%2atpturn -o > nul:
clsa 31
g2config -cp
clsa 31
ECHO 
ECHO 
ECHO 
ECHO         Please stand by while the job description list is built
extlist @geo
clsa 31
ECHO 
ECHO           Remove the ATP Companion disk from the floppy drive
ECHO 
ECHO        The first document you should read is README.TXT located in
ECHO        the %3 directory. From DOS, Just type in README.
ECHO 
ECHO        The installation is now complete, to start GRAFX CAD/CAM SK
ECHO           Type NC followed by [Enter]
ECHO 
pause
:END
:EREND
clsa 7
del clsa.exe
ECHO ON
