/*
 Copyright (c) 1994, 1995, 1996 Polygon Network Inc. All rights reserved
 Distributed by Polygon Network Inc.

 INSTALL 01/24/96
 High Density 3(1/2)" disk
 Project: Polygon
 Version: 7.3
*/



@DefineProject
	@Name           = "Polygon"
	@Version        = "7.3"
	@OutDrive       = C
	@Subdir         = "\\Poly"
	@Immediate      = 1
	@Terse
	@InDiskBell     = @True
@EndProject

@DefineVars
	
	@Integer @V          = @VideoCard
	@Integer @Convert    = 0
	@Integer @Upgrade71  = 1
	@Qstring @OldPolyDir = "C:\\POLY"        
	
@EndVars

@Display



				WELCOME TO THE 
			       POLYGON  NETWORK!

		       THE JEWELERS'INFORMATION HIGHWAY(tm)
			

				On Line Trading  
			      and Communications
			   For The Jewelry Industry.
	
	
	
	
	@Pause
@EndDisplay

@Display



			POLYGON NETWORK INC.          
			
			P.O. Box 4806
			Dillon, Colorado 80435

			970/468-1245 - Voice
			970/468-1247 - Fax
			800/221-4435 - Sales
			970/262-0719 - Tech. Support
			 
	
	
	
	@Pause
@EndDisplay


@Display

    This program will install @Name software version @Version onto 
    your computer's hard drive.  

    You may press the [Esc] key at any time to abort the installation.  
    
    This install program will ask you several questions during the 
    installation, each question has a default answer.  If that 
    answer is correct, press the ENTER key.  Otherwise, type the 
    answer you desire and then press the ENTER key.

    If you make a mistake while typing, press the BACKSPACE key and then
    retype the answer.

    @Pause
@EndDIsplay

/* 
   Record the installation type.
*/
@GetGroups
	@Cls
	
	
	
	
	
	
	
	
	@Set A = "First time installation of Polygon"
	@Set B = "Upgrade from Polygon version 6.0 or 7.0"
	@Set C = "Upgrade from Polygon version 7.1 or 7.2"
	
	
	
	
	Please select the type on installation you wish to perform
	(Use the arrow keys to highlight your choice and the press
	[ENTER]).

	NOTE: Only choose the upgrade option if you currently using
	Polygon version 6.0 or 7.x.  If you are using an earlier
	version of Polygon, choose "First time installation of Polygon" 
	instead.

@EndGroups

/* If upgrading from an earlier version of Polygon get more info */
@If ( B [= @Group || C [= @Group )
	@GetOption
	      @Cls

		
		
		
		
		
		
		
		
	   Is your old version of Polygon installed on this computer?

			
			
			
			@Option 1 = "Yes"
			@Option 2 = "No"

	@EndOption
@EndIf        

/* Get old poly directory */
GETPOLY:
@If ( 1 [= @Option || 3 [= @Option)
	@GetString @OldPolyDir
		
		Please enter the path to your old Polygon software.

		If you run from Polygon from a DOS prompt, your path
		will be the same as the DOS prompt where you type 
		"poly" to start the Polygon software.

			    ie. C:\POLY  or C:\POLY70

		For those of you who run Polygon from Windows, highlight
		the Polygon icon and then pull down the Program Manager's
		FILE menu and select PROPERTIES, you will see the path
		for Polygon listed.



		@Prompt = "Polygon path:"
	@EndString                
	@If (B [= @Group && @Exists("@OldPolyDir\\POLY60.DAT"))
		@Display
			
		   Old version of Polygon successfully located!
				
		   This install program will attempt to convert 
		   your user settings, libraries, and stored 
		   messages for use with Polygon 7.3.

		   A message will be displayed to you at the end
		   of the installation, telling you if the conversion 
		   was successful.





		@Pause
		@EndDisplay
		@FlushOptions()
		@Convert = 1
	@ElseIf (C [= @Group && @Exists("@OldPolyDir\\POLY71.DAT"))
		@Display
			
		   Old version of Polygon successfully located!
				
		   This install program will attempt to convert 
		   your user settings, and stored messages for 
		   use with Polygon 7.3.

		   A message will be displayed to you at the end
		   of the installation, telling you if the conversion 
		   was successful.





		@Pause
		@EndDisplay
		@FlushOptions()
		@Convert = 1
	@Else
		@GetOption
		@FlushOptions()
		@Cls









		The installation program was unable to locate the 
		necessary Polygon files to copy your user settings,
		libraries, and stored messages for use with Poly 7.3
		in the following directory: 
		
				@OldPolyDir
		
		Would you like you like to try another directory?
			
			
			@Option 3 = "Yes, I would."
			@Option 4 = "No, I would not."
			
		

		@EndOption
	@EndIf

/* If they want to try again, let them */
	@If ( 3 [= @Option ) 
		@Goto GETPOLY
	@ElseIf( 4 [= @Option )
		@Display

		Since your old version of Polygon was not found on
		this computer, the installation has been changed to
		"First time installation of Polygon".






		@Pause
		@EndDisplay
	@EndIf
@ElseIf ( 2 [= @Option )
	@Display

		Since your old version of Polygon is not installed
		on this computer, the installation has been changed
		to "First time installation of Polygon".






	@Pause
	@EndDisplay

@Endif

/* 
   Enter a series of conditional blocks to see if the users hardware
   configuration meet the minimum standards to run Polygon Software.
   Depending upon the nature of the conflict the install program will 
   issue either a warning message to the user and contnue the installation
   or it will abort the installation process.
*/
@Display
	@If (@CPU < 386)
				WARNING!!!
					
	This install program has detected that your computer does
	not have at least a 386 processor.  
	
	You will be unable to use the imaging portions of the
	Polygon 7.2 software on this computer. Do not attempt
	to view any images on this computer, unpredictable 
	results may occur.



	@Pause
	@EndIf
@EndDisplay        

@Display
	
	@If(((@OSMajor * 100) + @OSMinor) < 500)
				WARNING!!!

	The version of DOS you are currently running @OSMajor.@OSMinor may 
	not allow for normal operation of the Polygon software.

	If at all possible please upgrade to DOS version 6.2 or higher.

	Thank You, Polygon.


	@Pause
	@Endif
@EndDisplay

/* 
   Checks user video adapter and tells them is they will be able to
   use the imaging section of the Poly 7.0 software.
*/
	@If(@V == 77 || @V == 72) 
	@Display
	This installation program has detected a monochrome video
	adaptor on your computer.  You will be unable to use the  
	imaging capabilities of the 7.3 software with your present
	computer setup. 



	
	@Pause
	@EndDisplay
	@ElseIf(@V == 69) 
	@Display
	This installation program has detected an EGA video
	adaptor on your computer.  You will be unable to use the  
	imaging capabilities of the 7.3 software with your present
	computer setup.  
	
	



	
	@Pause
	@EndDisplay
	@ElseIf(@V == 67) 
	@Display
	This installation program has detected a CGA video
	adaptor on your computer.  You will be unable to use the  
	imaging capabilities of the 7.3 software with your present
	computer setup. 




	@Pause
	@EndDisplay
	@Endif      
/* 
   Check the users available memory and issues warnings if necessary.
*/
@Display

	@If(@Eval(@RamAvail/1024) < 525)
	Your computer has less than 525 free conventional 
	memory, to run the Polygon software.                                
	
	It is strongly advised that you increase the amount of 
	free conventional memory available to your system before 
	using any of the Polygon 7.3 imaging features.  
				      







	@Pause
	@Endif
@EndDIsplay

/* 
   Lists all drives available for current system and asks the user to
   select a drive for installation of Polygon.
*/
DRIVE:
@GetOutDrive
	@Suppress(0,1)   /* Don't install on floppys or CDs */







	
	Which drive would you like to install @Name onto?
	(Use arrow keys to move up or down. Press [Enter] 
	 when the choice you want is blinking.)
@EndOutDrive

/* 
   Checks to see if the drive choosen for installation has enough 
   available free space to install Polygon, based upon the installation
   options.
*/

@Display
		@If(@Eval(@DiskFree(@Outdrive)/1024000) < 4)
		The drive you have currently selected to install @Name
		does not have enough available free space to complete
		the installation.

		Please select another hard drive on which to install 
		@Name, or abort the installation by pressig the [Esc] key
		and free a minimum of 4Mb of hard disk space on the hard 
		drive you selected.

		@Pause
		@Goto DRIVE
		@EndIf
@EndDisplay


@GetSubdir
	
	This install program will create a directory called POLY on 
	your hard disk, and install the Polygon @Version software into that 
	directory.  If you prefer a different name for that directory, 
	please type it in below. Use the BACKSPACE key erase the default 
	entry. To record your selection press [Enter].

	
	@Prompt = "Directory to install @Name"
@EndSubdir
/* 
   Checks the users config.sys for required settings and asks to make 
   changes if the minimum run settings need to be changed.
   If changes are required to the config.sys a backup copy of the file 
   automatically created, and the backup filename is displayed to the
   user.
*/

@SetConfig        
	@AskOverwrite
	@Buffers = 20
	@Files   = 25
@EndConfig
	
	@Display
	This install program will take a look at your config.sys file.
	After the installation is completed, changes may be required to 
	allow for proper execution of the Polygon software.

	You will be asked whether or not you want the install program to 
	make any required changes in your config.sys file.

	If you choose (Y)es and changes are required, the install program will
	tell you what changes were made, and give you the name of the backup 
	file it created of your old config.sys file should you need it at 
	some future date.

	If you choose (N)o and changes are required, the install program will
	tell you what changes should be made to the config.sys file. It is
	advisable that you consider making these changes to allow for normal
	operation of the Polygon software.
	
	@Pause
	@EndDisplay

/* Create all necessary directories */
@MkDir("@OutDrive:\\@Subdir\\UPLOAD")
@MkDir("@OutDrive:\\@SubDir\\DATA")
@MkDir("@OutDrive:\\@SubDir\\IMAGES\\LIBRARY\\DAILYIMG")
@MkDir("@OutDrive:\\@SubDir\\IMAGES\\LIBRARY\\ALLOTHER")
@MkDir("@OutDrive:\\@SubDir\\IMAGES\\LIBRARY\\CHAINBRA")
@MkDir("@OutDrive:\\@SubDir\\IMAGES\\LIBRARY\\COLORING")
@MkDir("@OutDrive:\\@SubDir\\IMAGES\\LIBRARY\\CUSTOMJE")
@MkDir("@OutDrive:\\@SubDir\\IMAGES\\LIBRARY\\DESGNWIN")
@MkDir("@OutDrive:\\@SubDir\\IMAGES\\LIBRARY\\DIAMRING")
@MkDir("@OutDrive:\\@SubDir\\IMAGES\\LIBRARY\\EARRINGS")
@MkDir("@OutDrive:\\@SubDir\\IMAGES\\LIBRARY\\ESTATEJE")
@MkDir("@OutDrive:\\@SubDir\\IMAGES\\LIBRARY\\EQUIPMNT") 
@MkDir("@OutDrive:\\@SubDir\\IMAGES\\LIBRARY\\FINISHPC")
@MkDir("@OutDrive:\\@SubDir\\IMAGES\\LIBRARY\\JSA-BLTN")
@MkDir("@OutDrive:\\@SubDir\\IMAGES\\LIBRARY\\LOOSEGEM")
@MkDir("@OutDrive:\\@SubDir\\IMAGES\\LIBRARY\\PENDBROC")
@MkDir("@OutDrive:\\@SubDir\\IMAGES\\LIBRARY\\PROMOS")
@MkDir("@OutDrive:\\@SubDir\\IMAGES\\LIBRARY\\SUBPHOTO")
@MkDir("@OutDrive:\\@SubDir\\IMAGES\\LIBRARY\\WATCHES")

@DefineDisk
	@Label = "Disk #1"
	@BeginLib DDB.001
		@F 00000001.CMP @S 17395 @Out @Outdrive:\@Subdir\IMAGES\LIBRARY\PENDBROC\*.* 
		@F 00000001.IMG @S 84 @Out @Outdrive:\@Subdir\IMAGES\LIBRARY\PENDBROC\*.*    
		@F 00000002.CMP @S 17395 @Out @Outdrive:\@Subdir\IMAGES\LIBRARY\COLORING\*.* 
		@F 00000002.IMG @S 84 @Out @Outdrive:\@Subdir\IMAGES\LIBRARY\COLORING\*.*    
		@F LASTIMGS.DAT             @Out @Outdrive:\@Subdir\*.*
		@F CATEGORY.LST @S 455      @Out @Outdrive:\@Subdir\*.*
		@F CHANNEL.LST @S 1002      @Out @Outdrive:\@Subdir\*.*
		@F COLORFUL.PAL @S 65       @Out @Outdrive:\@Subdir\*.*
		@F CONVERT.EXE @S 59516     @Out @Outdrive:\@Subdir\*.*
		@F DONTRUN.EXE @S 755210    @Out @Outdrive:\@Subdir\*.*
		@F GRAY.PAL @S 65           @Out @Outdrive:\@Subdir\*.*
		@F MONO.PAL @S 65           @Out @Outdrive:\@Subdir\*.*
		@F MAKELIBS.BAT @S 593      @Out @Outdrive:\@Subdir\*.*
		@F PATCH.EXE @S 76981       @Out @Outdrive:\@Subdir\*.*
		@F PLYHELP.REZ @S 8989      @Out @Outdrive:\@Subdir\*.*
		@F PLYMSGS.REZ @S 5251      @Out @Outdrive:\@Subdir\*.*
		@F PLYVIEWR.LST @S 291      @Out @Outdrive:\@Subdir\*.*
		@F POLY.BAT @S 433          @Out @Outdrive:\@Subdir\*.*
		@F POLYDLG.REZ @S 358916    @Out @Outdrive:\@Subdir\*.*
		@F POLYTOOL.EXE @S 283620   @Out @Outdrive:\@Subdir\*.*
		@F UNIVESA.EXE @S 34032     @Out @Outdrive:\@Subdir\*.*
		@F SAVLIBRY.EXE @S 45266    @Out @Outdrive:\@Subdir\*.*
		@F NJSUB.LST @S 876         @Out @Outdrive:\@Subdir\*.*
		@F NJFORMS.REZ @S 42422     @Out @Outdrive:\@Subdir\*.*
		@F VLIST.EXE @S 8187        @Out @Outdrive:\@Subdir\*.*
		@F REFRESH.BAT @S 549       @Out @Outdrive:\@Subdir\*.*
		@F RESET.BAT @S 930         @Out @Outdrive:\@Subdir\*.*
		@F UPLOADER.EXE @S 709114   @Out @Outdrive:\@Subdir\*.*
		@F UPLOAD.BAT @S 123        @Out @Outdrive:\@Subdir\*.*
		@F UPLOAD.REZ @S 259843     @Out @Outdrive:\@Subdir\*.*
		@F UPHELP.REZ @S 5160       @Out @Outdrive:\@Subdir\*.*
		@F UPMSGS.REZ @S 2447       @Out @Outdrive:\@Subdir\*.*
		@F JCKFORMS.REZ @S 155859   @Out @Outdrive:\@Subdir\*.*
		@F JCKBOOKS.LST @S 1475     @Out @Outdrive:\@Subdir\*.*
		@F JCKREG.LST @S 3791       @Out @Outdrive:\@Subdir\*.*
		@F JCKSUB.LST @S 791        @Out @Outdrive:\@Subdir\*.*
		@F JCKREG.FRM @S 2824       @Out @Outdrive:\@Subdir\*.*
		@F VESA.EXE @S 1942         @Out @Outdrive:\@Subdir\*.*
		@F STULLER.REZ              @Out @Outdrive:\@Subdir\*.*
	@EndLib
	@If ( @Convert == 0 )
		@F POLY71.DAT @S 318
		@F UPLOAD70.DAT @S 158
	@EndIf
@EndDisk
/* Move over files if old version was successfully found */
@If ( @Convert == 1 )
	@If ( B [= @Group )
		@Copy("@OldPolyDir\\L?.*", "@Outdrive:\\@SubDir\\DATA\\*.*")
		@Copy("@OldPolyDir\\Stored.*", "@Outdrive:\\@SubDir\\DATA\\*.*")
		@ChDrive(@OutDrive)
		@ChDir("@SubDir")                                       
		@If ( @Spawn("CONVERT.EXE @OldPolyDir > NUL") == 0)
		@Display  
		@Cls
		Your user settings, libraries, and stored messages
		have been successfully converted for use with Polygon 7.3.
		  
		You will need to reset your Collection Options (Shift-F5).
						  


		@Pause
		@EndDisplay
		@Else
		@Display
		@Cls
		An error occured during your the conversion
		of your old Polygon information to the Polygon 
		7.3 format. 
					   
		Your stored messages and personal libraries should
		be available for use with Polygon 7.3. You will
		however, need to enter your user settings, collection
		options and subscriber ID#.

		Call Polygon if you need assistance.
		   
		   
		   
		@Pause
		@EndDisplay
		@EndIf   
	@EndIf
	@If ( C [= @Group )
	     @Copy("@OldPolyDir\\DATA\\Stored.*", "@Outdrive:\\@SubDir\\DATA\\*.*") 
	     @Copy("@OldPolyDir\\POLY71.DAT", "@Outdrive:\\@SubDir\\*.*")
	     @Copy("@OldPolyDir\\PLYIMG71.DAT", "@Outdrive:\\@SubDir\\*.*")
	     @Display            
	     @Cls
	     
	     
	     
	     Your user settings and stored messages have been 
	     successfully converted for use with Polygon 7.3.

	 You will need to reset your Collection Options (Shift-F5).
		  







	     @Pause
	     @EndDisplay
	@EndIf
@EndIf

@Finish

	Installation of @Name version @Version is now complete.
	Thank you for joining the network.  If you have any technical
	or sales questions, please feel free to contact us at:
		
		Polygon Network Inc.
		P.O. Box 4806
		Dillon, Colorado 80435

		(970) 262-0719 Technical Support
		(800) 221-4435 Sales

	To access the Polygon 7.3 software type POLY at DOS prompt.

	@Pause
	@ChDrive(@OutDrive)
	@ChDir("@SubDir")                                       
		     
@EndFinish
