/*
 *
 * INSTALL.DAT for Home Series Release 2 - LANDSCAPE
 *
 * Copyright (c) 1993, Autodesk RPD DAG 
 *
 */

@DefineProject
	@Name   =       "Landscape"
	@Version=       "Release 2"
	@Subdir =       "LANDSCAP"
	@Outdrive=      c       
	@Requires       @Harddisk
	@Requires       9000000         //make sure line 68 gets updated too!
										
@EndProject        

Reprompt:
@GetOutDrive 
	@Suppress a
	@Suppress b
	//
	//
	@If (@DriveRemote(C)) @Suppress C @EndIf
	@If (@DriveRemote(D)) @Suppress D @EndIf
	@If (@DriveRemote(E)) @Suppress E @EndIf
	@If (@DriveRemote(F)) @Suppress F @EndIf
	@If (@DriveRemote(G)) @Suppress G @EndIf
	@Cls
			 Verifying local drives...
	@If (@DriveRemote(H)) @Suppress H @EndIf
	@If (@DriveRemote(I)) @Suppress I @EndIf
	@If (@DriveRemote(J)) @Suppress J @EndIf
	@If (@DriveRemote(K)) @Suppress K @EndIf
	@If (@DriveRemote(L)) @Suppress L @EndIf
	@If (@DriveRemote(M)) @Suppress M @EndIf
	@If (@DriveRemote(N)) @Suppress N @EndIf
	@If (@DriveRemote(O)) @Suppress O @EndIf
	@If (@DriveRemote(P)) @Suppress P @EndIf
	@Cls
			 Verifying local drives...
	@If (@DriveRemote(Q)) @Suppress Q @EndIf
	@If (@DriveRemote(R)) @Suppress R @EndIf
	@If (@DriveRemote(S)) @Suppress S @EndIf
	@If (@DriveRemote(T)) @Suppress T @EndIf
	@If (@DriveRemote(U)) @Suppress U @EndIf
	@If (@DriveRemote(V)) @Suppress V @EndIf
	@Cls
			 Verifying local drives...
	@If (@DriveRemote(W)) @Suppress W @EndIf
	@If (@DriveRemote(X)) @Suppress X @EndIf
	@If (@DriveRemote(Y)) @Suppress Y @EndIf
	@If (@DriveRemote(Z)) @Suppress Z @EndIf
	@Cls
		 On which drive should @Name @Version be installed?
@EndOutDrive

@If (@Mouse)
	@Display
	A Mouse driver is required for the Home Series to run correctly.
	Please load a Mouse driver then re-run this install.
	@Pause
	@Abort
	@EndDisplay
@EndIf

@If ( @DiskFree(@OutDrive) < 9000k )
	@Display
	The selected drive only has @DiskFree(@OutDrive) bytes free.
	@Name @Version requires 9000000 bytes of free disk space to install.
	After installation is done, the program will use approx: 6M of space.

	Please free up room on drive @OutDrive or install to a different drive.


	@Pause
	@EndDisplay
	@Goto Reprompt
@EndIf

@GetSubdir 
	@Prompt = "ĶIn which subdirectory should @Name @Version be installed?"
@EndSubdir

@If (@Exists("@OutDrive:\\@Subdir\\LANDSCAP.EXE"))
	@Display
	@Cls

			     *** CAUTION ***
	    
	    You are about to install over an existing version
	    of the Home Series.
	    
	    Hit the <ESC> key to exit the install, or any other key to 
	    overwrite existing program files. 

	@Pause
	@EndDisplay
       
@EndIf

@GetGroups 
	@If (@VideoCard == 'C')      An IBM CGA compatible video graphis device is detected.
		@Set c = "IBM CGA compatible"    
		@Set e = "IBM EGA compatible"
		@Set s = "IBM EGA compatible with 64K"
		@Set v = "IBM VGA compatible"
		@Set a = "IBM MCGA compatible"
		@Set m = "Hercules compatible"
	@ElseIf (@VideoCard == 'E')  An IBM EGA compatible video graphics device is detected.
		@Set e = "IBM EGA compatible"
		@Set s = "IBM EGA compatible with 64K"
		@Set v = "IBM VGA compatible"
		@Set a = "IBM MCGA compatible"
		@Set c = "IBM CGA compatible"    
		@Set m = "Hercules compatible"
	@ElseIf (@VideoCard == '6')  An IBM EGA compatible video graphics device with 64K is detected.
		@Set s = "IBM EGA compatible with 64K"
		@Set e = "IBM EGA compatible"
		@Set v = "IBM VGA compatible"
		@Set a = "IBM MCGA compatible"
		@Set c = "IBM CGA compatible"    
		@Set m = "Hercules compatible"
	@ElseIf (@VideoCard == 'V')  An IBM VGA compatible video graphics device is detected.
		@Set v = "IBM VGA compatible"
		@Set a = "IBM MCGA compatible"
		@Set e = "IBM EGA compatible"
		@Set s = "IBM EGA compatible with 64K"
		@Set c = "IBM CGA compatible"    
		@Set m = "Hercules compatible"
	@ElseIf (@VideoCard == 'A')  An IBM MCGA compatible video graphics device is detected.
		@Set a = "IBM MCGA compatible"
		@Set v = "IBM VGA compatible"
		@Set e = "IBM EGA compatible"
		@Set s = "IBM EGA compatible with 64K"
		@Set c = "IBM CGA compatible"    
		@Set m = "Hercules compatible"
	@ElseIf (@VideoCard == 'H')  A Hercules compatible video graphics device is detected.
		@Set m = "Hercules compatible"
		@Set c = "IBM CGA compatible"    
		@Set e = "IBM EGA compatible"
		@Set s = "IBM EGA compatible with 64K"
		@Set v = "IBM VGA compatible"
		@Set a = "IBM MCGA compatible"
	@ElseIf (@VideoCard == 'M')        
		@Cls
		A monochrome display adapter is detected.  @Name @Version cannot work on this computer,
		as it requires a graphics adapter.
		@Pause
		@Abort

	@Else      The type of video graphics device could not be detected.
		@Set c = "IBM CGA compatible"    
		@Set e = "IBM EGA compatible"
		@Set s = "IBM EGA compatible with 64K"
		@Set v = "IBM VGA compatible"
		@Set a = "IBM MCGA compatible"  
		@Set m = "Hercules compatible"
	@EndIf
	@Cls
	      Please select your video graphics device from the list.
@EndGroups

@If ('v' [= @Group) 
	@GetGroups
		@Set b = "Black"
		@Set g = "Gray"
		@Cls
			  Please Select a background color
	@EndGroups

	@If ( 'g' [= @Group )
		@If ( 'v' [= @Group )
			@SetGrayVga
			@SetAutoexec
				@Overwrite
				@SetReplace ("CADD_COLORS", " 25h 25h 25h")
			@EndAutoexec
		@EndIf
	@EndIf
@EndIf
	
@If (( @StrLen(@GetEnv "CADD_INIT") > 2 ) ||
	  ( @StrLen(@GetEnv "CADD_FONT") > 2 ))
	@Display

   You have a SET CADD_INIT statement in your active environment.  

   This statement is set-up by Generic CADD, and the Home Series will 
   not run with that variable active.  

   Please read the READ.ME file before running the program!


	@Pause
	@EndDisplay
@EndIf
	
@GetOption
				Pick default units.
	   @Option 1 = "English (inches)"
	   @Option 2 = "Metric  (mm)"
@EndOption

@DefineDisk
	@Label= "Disk 1"

	@File   PROGRAM1.EXE
	
	@If (@DiskSize @InDrive <400000)
		@EndDisk
		@DefineDisk
		@Label= "Disk 2"
	@EndIf

	@File    HATCHES.EXE
	@File      MACRO.EXE

		@If ( 1 [= @Option )
			@File     3DLIB1.EXE
		@EndIf

	@If (@DiskSize @InDrive <400000)
		@EndDisk
		@DefineDisk
		@Label= "Disk 3"
	@EndIf

	@If ((@DiskSize @InDrive >400000) && (@DiskSize @InDrive <800000))
		@EndDisk
		@DefineDisk
		@Label= "Disk 2"
	@EndIf

	@File       MISC.EXE
	@File    SYMPREV.EXE

		@If ( 1 [= @Option )
			@File     SAMPLES.EXE
		@EndIf


	@If (@DiskSize @InDrive <400000)
		@EndDisk
		@DefineDisk
		@Label= "Disk 4"
	@EndIf

	@If (@DiskSize @InDrive >800000)
		@EndDisk
		@DefineDisk
		@Label= "Disk 2"
	@EndIf

	@File   PROGRAM2.EXE
		@If ( 1 [= @Option )
			@File     3DLIB3.EXE
		@EndIf

	@If (@DiskSize @InDrive <400000)
		@EndDisk
		@DefineDisk
		@Label= "Disk 5"
	@EndIf

	@If ((@DiskSize @InDrive >400000) && (@DiskSize @InDrive <800000))
		@EndDisk
		@DefineDisk
		@Label= "Disk 3"
	@EndIf

	@File    CONVERT.EXE

		@If ( 1 [= @Option ) 
			@File     3DLIB2.EXE          
		@EndIf

	@If (@DiskSize @InDrive <400000)
		@EndDisk
		@DefineDisk
		@Label= "Disk 6"
	@EndIf

	@File    3DPLAN1.EXE
	@File    CONFIG1.EXE
	@File      FONTS.EXE
	@File    PRINTER.EXE

	@If (@DiskSize @InDrive <400000)
		@EndDisk
		@DefineDisk
		@Label= "Disk 7"
	@EndIf

	@If ((@DiskSize @InDrive >400000) && (@DiskSize @InDrive <800000))
		@EndDisk
		@DefineDisk
		@Label= "Disk 4"
	@EndIf

	@If (@DiskSize @InDrive >800000)
		@EndDisk
		@DefineDisk
		@Label= "Disk 3"
	@EndIf

	@If ( 2 [= @Option ) 
		@File   MET-CONF.EXE
		@File   MET3DLB1.EXE
		@File   SAMP-MET.EXE
	@EndIf

	@If (@DiskSize @InDrive <400000)
		@EndDisk
		@DefineDisk
		@Label= "Disk 8"
	@EndIf

	@If ( 2 [= @Option )         
		@File   MET3DLB2.EXE
		@File   MET3DLB3.EXE
	@EndIf

	@If (@DiskSize @InDrive <400000)
		@EndDisk
		@DefineDisk
		@Label= "Disk 9"
	@EndIf

	@If ((@DiskSize @InDrive >400000) && (@DiskSize @InDrive <800000))
		@EndDisk
		@DefineDisk
		@Label= "Disk 5"
	@EndIf

	@If ( 2 [= @Option ) 
		@File   MET-SYMS.EXE
		@File   MET-MACR.EXE
	@EndIf

	@If ( 1 [= @Option )
		@File    SYMBOLS.EXE
	@EndIf
	
@EndDisk

@Finish
@ChDrive( @OutDrive )
@ChDir  ( "@Subdir" )

	@If (@Exists("@OutDrive:\\@Subdir\\PROGRAM1.EXE")) 
		@Cls
		  Extracting Program Files
		@If (@System("@OutDrive:\\@SubDir\\PROGRAM1.EXE -o >nul")) @EndIf
		@Delete ("@OutDrive:\\@SubDir\\PROGRAM1.EXE")
	@EndIf

	@If (@Exists("@OutDrive:\\@Subdir\\PROGRAM2.EXE")) 
		@Cls
		  Extracting Main Program
		@If (@System("@OutDrive:\\@SubDir\\PROGRAM2.EXE -o >nul")) @EndIf
		@Delete ("@OutDrive:\\@SubDir\\PROGRAM2.EXE")
	@EndIf         

	@If (@Exists("@OutDrive:\\@Subdir\\3DPLAN1.EXE")) 
		@Cls
		  Extracting 3D Plan
		@If (@System("@OutDrive:\\@SubDir\\3DPLAN1.EXE -o >nul")) @EndIf
		@Delete ("@OutDrive:\\@SubDir\\3DPLAN1.EXE")
	@EndIf 

	@If (@Exists("@OutDrive:\\@Subdir\\SYMBOLS.EXE"))
		@Cls
		  Extracting Symbols 
		@If (@System("@OutDrive:\\@SubDir\\SYMBOLS.EXE -o >nul")) @EndIf
		@Delete ("@OutDrive:\\@SubDir\\SYMBOLS.EXE")
	@EndIf

	@If (@Exists("@OutDrive:\\@Subdir\\HATCHES.EXE")) 
		@Cls
		  Extracting Hatches
		@If (@System("@OutDrive:\\@SubDir\\HATCHES.EXE -o >nul")) @EndIf
		@Delete ("@OutDrive:\\@SubDir\\HATCHES.EXE")
	@EndIf 

	@If (@Exists("@OutDrive:\\@Subdir\\MACRO.EXE"))
		@Cls
		  Extracting Macros
		@If (@System("@OutDrive:\\@SubDir\\MACRO.EXE -o >nul")) @EndIf
		@Delete ("@OutDrive:\\@SubDir\\MACRO.EXE")
	@EndIf

	@If (@Exists("@OutDrive:\\@Subdir\\MISC.EXE")) 
		@Cls
		  Extracting Misc Files
		@If (@System("@OutDrive:\\@SubDir\\MISC.EXE -o >nul")) @EndIf
		@Delete ("@OutDrive:\\@SubDir\\MISC.EXE")
	@EndIf 

	@If (@Exists("@OutDrive:\\@Subdir\\SYMPREV.EXE")) 
		@Cls
		  Extracting Symbol Previews
		@If (@System("@OutDrive:\\@SubDir\\SYMPREV.EXE -o >nul")) @EndIf
		@Delete ("@OutDrive:\\@SubDir\\SYMPREV.EXE")
	@EndIf 

	@If (@Exists("@OutDrive:\\@Subdir\\CONFIG1.EXE")) 
		@Cls
		  Extracting Configuration
		@If (@System("@OutDrive:\\@SubDir\\CONFIG1.EXE -o >nul")) @EndIf
		@Delete ("@OutDrive:\\@SubDir\\CONFIG1.EXE")
	@EndIf 

	@If (@Exists("@OutDrive:\\@Subdir\\SAMPLES.EXE")) 
		@Cls
		  Extracting Sample Drawings
		@If (@System("@OutDrive:\\@SubDir\\SAMPLES.EXE -o >nul")) @EndIf
		@Delete ("@OutDrive:\\@SubDir\\SAMPLES.EXE")
	@EndIf 

	@If (@Exists("@OutDrive:\\@Subdir\\CONVERT.EXE")) 
		@Cls
		  Extracting Conversion Files
		@If (@System("@OutDrive:\\@SubDir\\CONVERT.EXE -o >nul")) @EndIf
		@Delete ("@OutDrive:\\@SubDir\\CONVERT.EXE")
	@EndIf 

	@If (@Exists("@OutDrive:\\@Subdir\\FONTS.EXE")) 
		@Cls
		  Extracting Fonts
		@If (@System("@OutDrive:\\@SubDir\\FONTS.EXE -o >nul")) @EndIf
		@Delete ("@OutDrive:\\@SubDir\\FONTS.EXE")
	@EndIf 

	@If (@Exists("@OutDrive:\\@Subdir\\PRINTER.EXE")) 
		@Cls
		  Extracting Printer Drivers
		@If (@System("@OutDrive:\\@SubDir\\PRINTER.EXE -o >nul")) @EndIf
		@Delete ("@OutDrive:\\@SubDir\\PRINTER.EXE")
	@EndIf 
	
	@If (@Exists("@OutDrive:\\@Subdir\\3DLIB1.EXE"))
		@Cls
		  Extracting 3D Symbols 1
		@If (@System("@OutDrive:\\@SubDir\\3DLIB1.EXE -o >nul")) @EndIf
		@Delete ("@OutDrive:\\@SubDir\\3DLIB1.EXE")
	@EndIf

	@If (@Exists("@OutDrive:\\@Subdir\\3DLIB2.EXE"))
		@Cls
		  Extracting 3D Symbols 2
		@If (@System("@OutDrive:\\@SubDir\\3DLIB2.EXE -o >nul")) @EndIf
		@Delete ("@OutDrive:\\@SubDir\\3DLIB2.EXE")
	@EndIf

	@If (@Exists("@OutDrive:\\@Subdir\\3DLIB3.EXE"))
		@Cls
		  Extracting 3D Symbols 3
		@If (@System("@OutDrive:\\@SubDir\\3DLIB3.EXE -o >nul")) @EndIf
		@Delete ("@OutDrive:\\@SubDir\\3DLIB3.EXE")
	@EndIf

	@If (@Exists("@OutDrive:\\@Subdir\\MET-CONF.EXE"))
		@Cls
		  Extracting Metric Configuration Information
		@If (@System("@OutDrive:\\@SubDir\\MET-CONF.EXE -o >nul")) @EndIf
		@Delete ("@OutDrive:\\@SubDir\\MET-CONF.EXE")
	@EndIf

	@If (@Exists("@OutDrive:\\@Subdir\\SAMP-MET.EXE"))
		@Cls
		  Extracting Metric Sample Drawings
		@If (@System("@OutDrive:\\@SubDir\\SAMP-MET.EXE -o >nul")) @EndIf
		@Delete ("@OutDrive:\\@SubDir\\SAMP-MET.EXE")
	@EndIf

	@If (@Exists("@OutDrive:\\@Subdir\\MET-SYMS.EXE"))
		@Cls
		  Extracting Metric Symbols
		@If (@System("@OutDrive:\\@SubDir\\MET-SYMS.EXE -o >nul")) @EndIf
		@Delete ("@OutDrive:\\@SubDir\\MET-SYMS.EXE")
	@EndIf

	@If (@Exists("@OutDrive:\\@Subdir\\MET-MACR.EXE"))
		@Cls
		  Extracting Metric Symbols
		@If (@System("@OutDrive:\\@SubDir\\MET-MACR.EXE -o >nul")) @EndIf
		@Delete ("@OutDrive:\\@SubDir\\MET-MACR.EXE")
	@EndIf

	@If (@Exists("@OutDrive:\\@Subdir\\MET3DLB1.EXE"))
		@Cls
		  Extracting Metric 3D Symbols 1
		@If (@System("@OutDrive:\\@SubDir\\MET3DLB1.EXE -o >nul")) @EndIf
		@Delete ("@OutDrive:\\@SubDir\\MET3DLB1.EXE")
	@EndIf

	@If (@Exists("@OutDrive:\\@Subdir\\MET3DLB2.EXE"))
		@Cls
		  Extracting Metric 3D Symbols 2
		@If (@System("@OutDrive:\\@SubDir\\MET3DLB2.EXE -o >nul")) @EndIf
		@Delete ("@OutDrive:\\@SubDir\\MET3DLB2.EXE")
	@EndIf

	@If (@Exists("@OutDrive:\\@Subdir\\MET3DLB3.EXE"))
		@Cls
		  Extracting Metric 3D Symbols 3
		@If (@System("@OutDrive:\\@SubDir\\MET3DLB3.EXE -o >nul")) @EndIf
		@Delete ("@OutDrive:\\@SubDir\\MET3DLB3.EXE")
	@EndIf


@If ('e' [= @Group || 's' [= @Group)
	@Cls
	@Copy("@OutDrive:\\@SubDir\\CONFIG6.EGA", "@OutDrive:\\@SubDir\\CONFIG6.FIL")
@EndIf

@If ('v' [= @Group)
	@Cls
	@Copy("@OutDrive:\\@SubDir\\CONFIG6.VGA", "@OutDrive:\\@SubDir\\CONFIG6.FIL") 
@EndIf

@If ('c' [= @Group)
	@Cls
	@Copy("@OutDrive:\\@SubDir\\CONFIG6.CGA", "@OutDrive:\\@SubDir\\CONFIG6.FIL") 
	@Copy("@OutDrive:\\@SubDir\\LANDSCAP.MNU", "@OutDrive:\\@SubDir\\LAND.MNU")  
	@Copy("@OutDrive:\\@SubDir\\CGA.MNU", "@OutDrive:\\@SubDir\\LANDSCAP.MNU") 
@EndIf

@If ('m' [= @Group)
	@Cls
	@Copy("@OutDrive:\\@SubDir\\CONFIG6.HRC", "@OutDrive:\\@SubDir\\CONFIG6.FIL") 
@EndIf

@If ('a' [= @Group)
	@Cls
	@Copy("@OutDrive:\\@SubDir\\CONFIG6.MCG", "@OutDrive:\\@SubDir\\CONFIG6.FIL") 
	@Copy("@OutDrive:\\@SubDir\\LANDSCAP.MNU", "@OutDrive:\\@SubDir\\LAND.MNU")  
	@Copy("@OutDrive:\\@SubDir\\CGA.MNU", "@OutDrive:\\@SubDir\\LANDSCAP.MNU") 
@EndIf

@FileAttr("@OutDrive:\\@SubDir\\environ.gcd", "r+") 

@Cls

    Landscape is now installed!  At the DOS prompt, type "LANDSCAP", then 
    press <ENTER> to start.  
    
    Please read the READ.ME file for more information.
@Pause
@EndFinish
