@DefineProject
	@Name = 	"Generic 3D"
	@Version =	"2.0"
	@OutDrive =	C
	@SubDir =	"3dv2"
        @Group =        "z"
	@Terse
@EndProject

@GetOutDrive
	@Cls
		On which drive should @Name be installed?
	@Suppress A
	@Suppress B
@EndOutDrive

@DefineVars
	@Drive	@3DDrive = 	@OutDrive
@EndVars

@GetOption
                Has Generic CADD 6.0 been installed?
	@Option 1 = "Yes"
	@Option 2 = "No"
@EndOption

@DefineVars
	@Dir @CADDDIR =		"CADD6"
	@Dir @FNTDIR  =        "FNT"
	@Dir @CADD =	"@CADDDIR\\@FNTDIR"
@EndVars

@If ( 1 [= @Option)
	@DefineVars
		@Integer @CADD6 =	1
	@EndVars

	@DefineVars
		@Drive @CADDrive = 	@OutDrive
	@EndVars

	@GetOutDrive  @CADDrive
		@Cls
		On which drive has Generic CADD 6.0 been installed?
		@Suppress A
		@Suppress B
	@EndOutDrive

	@GetOption
                Do you want to use CADD 6.0 fonts?
		@Option 11 = "Yes"
		@Option 12 = "No"
	@EndOption

	@GetSubDir	@CADDDIR
		@Prompt = "Where has CADD 6.0 been installed?"
	@EndSubDir

	@If ( 11 [= @Option )
		@GetSubDir	@CADD
			@Prompt = "Where have the CADD 6.0 Fonts been installed?"
		@EndSubDir
	@EndIf
@Else
	@DefineVars
		@Integer @CADD6 = 	2
		@Drive   @CADDrive =	@3DDrive
	@EndVars
@EndIf

@GetSubDir
	@Prompt = "Where should @Name @Version be installed?"
@EndSubDir

@DefineVars
	@Dir @Drawing = "@SubDir\\3DD"
        @Dir @Comp =    "@SubDir\\CM3"
@EndVars

@GetSubDir      @Drawing
	@Prompt = "Where should the sample drawings be installed?"
@EndSubDir

@If ( 2 [= @Option || 12 [= @Option)
@DefineVars
	@Dir @Font =	"@SubDir\\FNT"
	@Integer @Option6	= 2
@EndVars

@GetSubDir	@Font
	@Prompt = "Where should the fonts be installed?"
@EndSubDir
@Else
@DefineVars
	@Dir @Font = "@CADD"
	@Integer @Option6	= 1
@EndVars
@EndIf

@GetSubDir	@Comp
	@Prompt = "Where should the components be installed?"
@EndSubDir

@GetGroups
	@CheckBox
	@Cls

                Select Which parts of @Name @Version to install















    **   Use cursor keys to move to item. Press <SPACEBAR> to select.   **
    **   Press [ENTER] when done selecting to continue installing.      **
     @Set z = "FULL INSTALLATION                               (11974190 bytes)"
     @Set c = "CORE FILES - ALWAYS INSTALL FIRST TIME!          (3430867 bytes)"
     @Set a = "AutoCAD Import/Export (DXF, DWG) Utilities        (344058 bytes)"
     @Set x = "AutoCAD style fonts                              (1661031 bytes)"
     @Set o = "Fillable outline fonts                           (2149637 bytes)"
     @Set h = "On-line, context sensitive Help system            (407203 bytes)"
     @Set d = "Sample Drawings and Template Drawings             (296474 bytes)"
     @Set g = "HPGL Import                                        (99805 bytes)"
     @Set k = "Ketiv Sample Components                           (512289 bytes)"
     @Set p = "Phd Sample Components                             (637988 bytes)"
     @Set f = "Furniture Sample Components                      (1018411 bytes)"
     @Set m = "Home Sample Components                            (564261 bytes)"
     @Set l = "People Sample Components                           (34406 bytes)"
     @Set e = "Electric Sample Components                        (346570 bytes)"
     @Set t = "Tutorial Sample Components                         (54820 bytes)"
@EndGroups


@If ('c' [= @Group || 'z' [= @Group || 'd' [= @Group)
        @ChDrive @3DDrive
        @MkDir ("@Drawing")
        @ChDrive @InDrive
@EndIf

@If ('c' [= @Group || 'z' [= @Group)
        @GetOption
	                       Pick default units.
	           @Option 21 = "English (inches)"
                   @Option 22 = "Metric (mm)"
        @EndOption
@EndIf
@DefineDisk
@Label = "Disk 1 (1.44 M)"
        @File helpzip.exe @Group hz @Size 407203
        @File hpzip.exe @Group gz @Size 99805
        @File acvtzip.exe @Group az @Size 106281
@If (2 == @Option6)
        @File acadfnts.exe @Out \@Font\*.* @Group xz @Size 1661031
        @File caddfnts.exe @Out \@Font\*.* @Group cz @Size 389999
@EndIf
@If (22 [= @Option)
	@File metric.exe @Group cz @Size 6253
	@File acadmet.exe @Group az @Size 6300
@EndIf
        @File paper.exe @Group cz @Size 107016
        @File smvideo.exe @Group cz @Size 417979
@EndDisk
@DefineDisk
@Label = "Disk 2 (1.44 M)"
        @File program.exe @Group cz @Size 1217241
        @File lgvideo.exe @Group cz @Size 607496 
	@File pointer.exe @Group cz @Size 28809
	@File fontstuf.exe @Group cz @Size 49700
@If (2 == @Option6)
        @File outfnts.exe @Out \@Font\*.* @Group oz @Size 2149637
@EndIf
@EndDisk
@DefineDisk
@Label = "Disk 3 (1.44 M)"
        @File samp3dds.exe @Out \@Drawing\*.* @Group dz @Size 1050262
	@File ketiv.exe @Out \@Comp\ketiv\*.* @Group kz @size 512289
	@File phd.exe @Out \@Comp\phd\*.* @Group pz @size 637988
	@File furnitur.exe @Out \@Comp\furnitur\*.* @Group fz @size 1018411
	@File home.exe @Out \@Comp\home\*.* @Group mz @size 564261
	@File people.exe @Out \@Comp\people\*.* @Group lz @size 34406
	@File elec.exe @Out \@Comp\elec\*.* @Group ez @size 346570
	@File tutorcm3.exe @Out \@Comp\*.* @Group tz @size 54820
        @File setup.exe @Group cz @Size 512875
@EndDisk /* all sizes end here */

@Finish
	@ChDrive @CADDrive
        @ChDir "@Font"	
        @If (@Exists "@CADDrive:\\@Font\\outfnts.exe")
        	@Cls
                 	  Extracting Outline fonts
        	@System "@CADDrive:\\@Font\\outfnts.exe -o >nul"
        	@Delete ("@CADDrive:\\@Font\\outfnts.exe")
        @EndIf
        @If (@Exists "@CADDrive:\\@Font\\acadfnts.exe")
        	@Cls
        	        Extracting AutoCAD style fonts
        	@System "@CADDrive:\\@Font\\acadfnts.exe -o >nul"
        	@Delete ("@CADDrive:\\@Font\\acadfnts.exe")
        @EndIf
        @If (@Exists "@CADDrive:\\@Font\\caddfnts.exe")	
        	@Cls	
        	     Extracting standard Generic 3D fonts	
        	@System "@CADDrive:\\@Font\\caddfnts.exe -o >Nul"	
        	@Delete ("@CADDrive:\\@Font\\caddfnts.exe")
        @EndIf	
	@ChDrive @3DDrive
        @ChDir "@SubDir"
        @If (@Exists "@3DDrive:\\@SubDir\\program.exe")
        	@Cls
        	     Extracting Generic 3D Program files
        	@System "@3DDrive:\\@SubDir\\program.exe -o >nul"
        	@Delete ("@3DDrive:\\@SubDir\\program.exe")
        @EndIf
        @ChDir "@SubDir"
        @If (@Exists "@3DDrive:\\@SubDir\\acvtzip.exe")
        	@Cls
        	     Extracting DXF Utilities
        	@System "@3DDrive:\\@SubDir\\acvtzip.exe -o >nul"
        	@Delete ("@3DDrive:\\@SubDir\\acvtzip.exe")
        @EndIf
        @ChDir "@SubDir"
        @If (@Exists "@3DDrive:\\@SubDir\\helpzip.exe")
        	@Cls
        	              Extracting Help
        	@System "@3DDrive:\\@SubDir\\helpzip.exe -o >nul"
        	@Delete ("@3DDrive:\\@SubDir\\helpzip.exe")
        @EndIf
@If ('c' [= @Group || 'z' [= @Group)
        @If (@Exists "@3DDrive:\\@SubDir\\smvideo.exe")
        	@Cls
        	            Extracting video info
        	@System "@3DDrive:\\@SubDir\\smvideo.exe -o smvideo.tvd >nul"
                @System "@3DDrive:\\@SubDir\\smvideo.exe -o vga3.vgd >nul"
                @System "@3DDrive:\\@SubDir\\smvideo.exe -o ega3.vgd >nul"
                @System "@3DDrive:\\@SubDir\\smvideo.exe -o vesa16.vgd >nul"
                @System "@3DDrive:\\@SubDir\\smvideo.exe -o vesa256.vgd >nul"
        @EndIf
        @If (@Exists "@3DDrive:\\@SubDir\\lgvideo.exe")	
        	@System "@3DDrive:\\@SubDir\\lgvideo.exe -o lgvideo.tvd >nul"	
        @EndIf	
@EndIf
        @ChDir "@SubDir"	
        @If (@Exists "@3DDrive:\\@SubDir\\setup.exe")
        	@Cls	
        	   Extracting Configuration and Setup files	
        	@System "@3DDrive:\\@SubDir\\setup.exe -o >nul"	
        	@Delete ("@3DDrive:\\@SubDir\\setup.exe")	

		@If (1 == @Option6)
			@ChDrive @CADDrive
	        	@ChDir "@CADDDIR"	
			@If (@Exists "@CADDrive:\\@CADDDIR\\config6.fil")
				@Cls
				Copying CADD 6.0 Configuration file
				@Copy ("@CADDrive:\\@CADDDIR\\config6.fil","@3DDrive:\\@SubDir\\config3d.fil")
			@EndIf
			@ChDrive @3DDrive
		@EndIf
        @EndIf	
        @ChDir "@SubDir"	
	@If (@Exists "@3DDrive:\\@SubDir\\hpzip.exe")	
		@Cls	
		           Extracting HPGL converter
		@System "@3DDrive:\\@SubDir\\hpzip.exe -o >nul"	
		@Delete ("@3DDrive:\\@SubDir\\hpzip.exe")	
	@EndIf	
	@If (@Exists "@3DDrive:\\@SubDir\\fontstuf.exe")	
		@Cls	
		           Extracting Font utilities	
		@System "@3DDrive:\\@SubDir\\fontstuf.exe -o >nul"	
		@Delete ("@3DDrive:\\@SubDir\\fontstuf.exe")	
	@EndIf
	@If (@Exists "@3DDrive:\\@SubDir\\paper.exe")	
		@Cls	
		     Extracting printer and plotter drivers	
		@System "@3DDrive:\\@SubDir\\paper.exe -o >nul"	
		@Delete ("@3DDrive:\\@SubDir\\paper.exe")	
	@EndIf
@If ('c' [= @Group || 'z' [= @Group)
	@If (@Exists "@3DDrive:\\@SubDir\\pointer.exe")	
		@Cls	
		        Extracting Pointing Device Info	
		@System "@3DDrive:\\@SubDir\\pointer.exe -o pointers.tdg >nul"	
		@System "@3DDrive:\\@SubDir\\pointer.exe -o dig13.ipd >nul"	
        @EndIf	
@EndIf
        @ChDir "@Comp\\ketiv"		
	@If (@Exists "@3DDrive:\\@Comp\\ketiv\\ketiv.exe")	
		@Cls	
		      Extracting Ketiv Sample Components
		@System "@3DDrive:\\@Comp\\ketiv\\ketiv.exe -o >nul"	
		@Delete ("@3DDrive:\\@Comp\\ketiv\\ketiv.exe")	
	@EndIf	
        @ChDir "@Comp\\phd"		
	@If (@Exists "@3DDrive:\\@Comp\\phd\\phd.exe")	
		@Cls	
		       Extracting Phd Sample Components
		@System "@3DDrive:\\@Comp\\phd\\phd.exe -o >nul"	
		@Delete ("@3DDrive:\\@Comp\\phd\\phd.exe")	
	@EndIf	
        @ChDir "@Comp\\furnitur"		
	@If (@Exists "@3DDrive:\\@Comp\\furnitur\\furnitur.exe")	
		@Cls	
		    Extracting Furniture Sample Components
		@System "@3DDrive:\\@Comp\\furnitur\\furnitur.exe -o >nul"	
		@Delete ("@3DDrive:\\@Comp\\furnitur\\furnitur.exe")	
	@EndIf	
        @ChDir "@Comp\\home"		
	@If (@Exists "@3DDrive:\\@Comp\\home\\home.exe")	
		@Cls	
		       Extracting Home Sample Components
		@System "@3DDrive:\\@Comp\\home\\home.exe -o >nul"	
		@Delete ("@3DDrive:\\@Comp\\home\\home.exe")	
	@EndIf	
        @ChDir "@Comp\\people"		
	@If (@Exists "@3DDrive:\\@Comp\\people\\people.exe")	
		@Cls	
		      Extracting People Sample Components
		@System "@3DDrive:\\@Comp\\people\\people.exe -o >nul"	
		@Delete ("@3DDrive:\\@Comp\\people\\people.exe")	
	@EndIf	
        @ChDir "@Comp\\elec"		
	@If (@Exists "@3DDrive:\\@Comp\\elec\\elec.exe")	
		@Cls	
		    Extracting Electrical Sample Components
		@System "@3DDrive:\\@Comp\\elec\\elec.exe -o >nul"	
		@Delete ("@3DDrive:\\@Comp\\elec\\elec.exe")	
	@EndIf	
        @ChDir "@Comp"		
	@If (@Exists "@3DDrive:\\@Comp\\tutorcm3.exe")	
		@Cls	
		    Extracting Tutorial Sample Components
		@System "@3DDrive:\\@Comp\\tutorcm3.exe -o >nul"	
		@Delete ("@3DDrive:\\@Comp\\tutorcm3.exe")	
	@EndIf	
        @ChDir "@Drawing"		
	@If (@Exists "@3DDrive:\\@Drawing\\samp3dds.exe")	
		@Cls	
		         Extracting 3D Sample Drawings
		@System "@3DDrive:\\@Drawing\\samp3dds.exe -o >nul"	
		@Delete ("@3DDrive:\\@Drawing\\samp3dds.exe")	
	@EndIf	
        @ChDir "@SubDir"
                @If (@Exists "@3DDrive:\\@SubDir\\metric.exe")
        	@Cls
	                 Extracting Metric information
        	@System "@3DDrive:\\@SubDir\\metric.exe -o >nul"
	        @Delete ("@3DDrive:\\@SubDir\\metric.exe")
        @EndIf
        @ChDir "@SubDir"
                @If (@Exists "@3DDrive:\\@SubDir\\acadmet.exe")
        	@Cls
	                 Extracting Metric information
        	@System "@3DDrive:\\@SubDir\\acadmet.exe -o >nul"
	        @Delete ("@3DDrive:\\@SubDir\\acadmet.exe")
        @EndIf

@If ('c' [= @Group || 'z' [= @Group)
	@ChDir "@SubDir"
	@OurConfig
	@Spawn ("config3d.exe")
@EndIf
@Cls
    Install complete!  At DOS prompt, type "3DD" and press <ENTER> to run
    Generic 3D.
@If ('c' [=@Group || 'z' [=@Group)
    
    NOTE: You may need to re-boot for video configuration changes to 
          take effect.
@EndIf
@Pause
@EndFinish
