;***************************************************************************
;* Enterprise Developer Runtime - 1.0 Install Script                       *
;* SCRIPT FOR VERSION 3.2+ OF SYMANTEC INSTALL FOR WINDOWS                 *
;***************************************************************************

[InstallVersion]
3.2

[process]
Bitmaps.pix

EbRTCopy = SetActiveCopy

AllowIntlChars

;////////////////////////////////////////////////////////////////////
; Initialize switches 10 and 12 to TRUE so that ODBC.INI and ODBCINST.INI
; won't get copied if 1)they don't exist and 2)XDB and ORDPROC not selected
;////////////////////////////////////////////////////////////////////

switch10 = TRUE
switch12 = TRUE

;////////////////////////////////////////////////////////////////////
;Initializing the switches 02 and 40, I am not sure if it is necessary, but
;I will do it anyway; switch48 = TRUE is for message windows...
;////////////////////////////////////////////////////////////////////
switch02 = FALSE
switch40 = FALSE
switch48 = TRUE

switch02 = VersionSearch.EnterpriseDeveloperSearch
#if switch02
	switch40=MessageYesNo.FoundVerAskNewPath
	#if switch40
		ResetTarget.NewTarget
		PathBrowse.GetNewPath
	#endif
#endif

SelectInstallType
;////////////////////////////////////////////////////////////////////
; If a previous version was found and the user did not ask to change the path
; then get the previous version size because the user is installing over the
; previous version.
;////////////////////////////////////////////////////////////////////

#ifnot switch40
	GetPrevVerSize
#endif

#if switch92
	DeselectOption.XDB
#endif    

switch03 = CheckDiskSpace.TARGET
;////////////////////////////////////////////////////////////////////
; If the the user did not choose custom install and does not have enough
; disk space, then ask the customer if he would like to delselect some of
; the components.
;////////////////////////////////////////////////////////////////////
#ifnot switch93
	#ifnot switch02                     ;///No previous version
		TargetDrive
		switch03 = CheckDiskSpace.TARGET 
	#endif
	;////////////////////////////////////////////////////////////////////
	; If it is not a Minimum install, then the user can deselect some
	; components
	;////////////////////////////////////////////////////////////////////
	#ifnot switch92
	  #ifnot switch03
		  switch04 = MessageYesNo.AskTheCust
		  #if switch04
			  PrimarySelect
		  #endif ;switch04
	  #endif ;switch03
	#endif ;switch92
	switch05 = CheckDiskSpace.TARGET
	#ifnot switch05
		switch50 = MessageYesNo.AskNewPathAgain
		#if switch50
			PathBrowse.GetNewPath
			switch51 = CheckDiskSpace.TARGET
			#ifnot switch51
				;//////////////////////////
				; Time to get out, no space
				;//////////////////////////
				switch80 = TRUE
			#endif ;switch51
		#else
			;//////////////////////////
			; Time to get out, no space
			;//////////////////////////
			switch80 = TRUE  
			switch81 = TRUE
		#endif ;switch50
	#endif ;switch05
#else ;switch93
	;////////////////////////////////////////////////////////////////////
	; If the user selected the custom install option.
	;////////////////////////////////////////////////////////////////////
	PrimarySelect
	#ifnot switch02                     ;///If no previous version
		TargetDrive
	#endif
	switch05 = FALSE
	switch05 = CheckDiskSpace.TARGET
	;////////////////////////////////////////////////////////////////////
	;  If there is no disk space, let the user first delselect some components
	;  and then give him a chance to change the destination path.
	;////////////////////////////////////////////////////////////////////
	#ifnot switch05
		MessageBox.NoDiskSpace
		PrimarySelect
		switch52 = CheckDiskSpace.TARGET
		#ifnot switch52
			switch50 = MessageYesNo.AskNewPathAgain
			#if switch50
				PathBrowse.GetNewPath
				switch51 = CheckDiskSpace.TARGET
				#ifnot switch51
					;//////////////////////////
					; Time to get out, no space
					;//////////////////////////
					switch80 = TRUE
				#endif ;switch51
			#else
				;//////////////////////////
				; Time to get out, no space
				;//////////////////////////
				switch80 = TRUE
				switch81 = TRUE  
			#endif ;switch50
		#endif ;switch52
	#endif ;switch05
	;////////////////////////////////////////////////////////////////////
	; End of #ifnot switch93
	;////////////////////////////////////////////////////////////////////
#endif ;switch93  

#ifnot switch80

	switch07 = IsOptionSelected.RT
	switch06 = IsOptionSelected.XDB
	
	;////////////////////////////////////////////////////////////////////
	; Make sure that the target directory is created.
	;////////////////////////////////////////////////////////////////////
	CreateDirectory.MakeTheDestDir
	
	#if switch06
		;////////////////////////////////////////////////////////////////////
		; Set XDB directories
		;////////////////////////////////////////////////////////////////////
		ResetTarget.XDBdir
		ResetTarget.XDBSystem
	
		switch32 = TRUE                  ;///Initialized for dir creation
		;////////////////////////////////////////////////////////////////////
		; Search for a copy of XDB with ODBC connections
		;////////////////////////////////////////////////////////////////////
		switch31 = Exists.LookingForXDB
		#if switch31                     ;///if XDBODBC.DLL is found in SYSTEM
			switch32 = MessageYesNo.FoundXDB
				#ifnot switch32            ;///do not overwrite/add XDB
					DeselectOption.XDB
					switch06 = FALSE
				#endif ;switch32
		#endif  ;switch31   
		#if switch32                     ;///if first time/overwrite OK 
			;////////////////////////////////////////////////////////////////////
			; Create XDB directories if they don't exist
			;////////////////////////////////////////////////////////////////////
			CreateDirectory.MakeXDBdir        
			CreateDirectory.MakeXDBSysDir
		#endif ;switch32
	#endif ;switch06
		
	;////////////////////////////////////////////////////////////////////
	; If the XDB Option is selected, the ODBCINST.INI file 
	; needs to be backed up and modified. 
	;////////////////////////////////////////////////////////////////////
	#if switch06                        ;///If XDB is selected
		;////////////////////////////////////////////////////////////////////      
		; Is there an existing ODBCINST.INI ?
		;////////////////////////////////////////////////////////////////////
		switch12=exists.IsOdbcinstIni
		#if switch12
			switch21 = TRUE
		#endif ;switch12
	#endif ; switch06
	
	;////////////////////////////////////////////////////////////////////
	; Now we know which INI files need modification, It is time to ask the 
	; user if he/she wants the install program to do the modifications.
	; Remember switch21 == TRUE means that the ODBCINST.INI needs mods.
	; If switch23 == TRUE implies that the user let ODBCINST.INI be modified
	;////////////////////////////////////////////////////////////////////   

	#if switch21
		;////////////////////////////////////////////////////////////////////
		; Only the ODBCINST.INI needs modification
		;////////////////////////////////////////////////////////////////////
		switch23 = MessageYesNo.ModOdbcinstQuestion
		#if switch23
			Backup.SaveOdbcinst
		#endif ;switch23
	#endif ;switch21
	
	DisableUtils
	copy
	EnableUtils
	
	;////////////////////////////////////////////////////////////////////
	;  Now It is time to do the INI file modifications.
	;////////////////////////////////////////////////////////////////////
	#if switch06                        ;///Selected XDB option
		#ifnot switch12
			switch23 = TRUE
		#endif
		;////////////////////////////////////////////////////////////////////
		;Modifications to the odbcinst.ini file
		;////////////////////////////////////////////////////////////////////
		#if switch23
			updateini.odbcinstAdd
		#endif
	#endif ;switch06
	
	;////////////////////////////////////////////////////////////////////
	; Now, if XDB was installed, we need to modify the autoexec file
	; and configure the xdb installation
	;////////////////////////////////////////////////////////////////////
	#if switch06
		backup.moveXDBODBC               ;///This moves the XDB ODBC dlls to win dir
		updateini.wininiadd
		;////////////////////////////////////////////////////////////////////
		; Configure XDB
		;////////////////////////////////////////////////////////////////////
		ExecChildProcess.XDBCFG0
		Updateini.ShutDownXDB
		#if switch07
			modifytextfile.autoexecBOTH
		#else
			modifytextfile.autoexecNoRT
		#endif ;switch07
	#else
		#if switch07
			modifytextfile.autoexecNoXDB
		#endif ;switch07   
	#endif ;switch06

	switch13 = IsRebootRequested
	switch14 = IsInstallShell
	UpdateIni.Fassist
	#if switch13
		End.byeReboot
	#else
		#ifnot switch14
			end.ByeMessage
		#else
			End.byeshell
		#endif ;switch14
	#endif;switch13

#else                                        ;///else switch80
	#ifnot switch81 
		messagebox.ByeStillNoDiskSpace
		exit
	#else
		MessageBox.ByeNoDiskSpace
		exit
	#endif ;switch81
#endif                                       ;///end switch80

end

;*******************************************************************
; Disks
;*******************************************************************

[disks]
1=A:\, "Enterprise Developer Runtime Disk 1"
2=A:\, "Enterprise Developer Runtime Disk 2"
3=A:\, "Enterprise Developer Runtime Disk 3"
4=A:\, "Enterprise Developer Runtime Disk 4"

;***************************************************************************
;* Autoexec Mods                                                           *
;***************************************************************************

[AutoexecBOTH]
caption    = "Enterprise Developer Runtime - Modify Autoexec.bat File"
text1      = "The following modifications need to be performed on your autoexec.bat file:"
FileSpec   = c:\autoexec.bat
filetype   = autoexec
findrems   = 0
rem1       = "rem"
rem2       =
rem3       =
rem4       =
EditCaption= "Edit Autoexec.bat File"
EditText   = "Edit the file as desired.  When complete, press Finished.  To cancel all changes made in this or previous edits, press Cancel Edit."
AddPath    = target, target2
DelItems   = AutoexecDelItems
AddItems   = AutoexecAddItems

[AutoexecDelItems]

[AutoexecAddItems]

[AutoexecNoXdb]
caption    = "Enterprise Developer Runtime - Modify Autoexec.bat File"
text1      = "The following modifications need to be performed on your autoexec.bat file:"
FileSpec   = c:\autoexec.bat
filetype   = autoexec
findrems   = 0
rem1       = "rem"
rem2       =
rem3       =
rem4       =
EditCaption= "Edit Autoexec.bat File"
EditText   = "Edit the file as desired.  When complete, press Finished.  To cancel all changes made in this or previous edits, press Cancel Edit."
AddPath    = target
DelItems   = AutoexecXDelItems
AddItems   = AutoexecXAddItems

[AutoexecXDelItems]

[AutoexecXAddItems]

[AutoexecNoRT]
caption    = "Enterprise Developer Runtime - Modify Autoexec.bat File"
text1      = "The following modifications need to be performed on your autoexec.bat file:"
FileSpec   = c:\autoexec.bat
filetype   = autoexec
findrems   = 0
rem1       = "rem"
rem2       =
rem3       =
rem4       =
EditCaption= "Edit Autoexec.bat File"
EditText   = "Edit the file as desired.  When complete, press Finished.  To cancel all changes made in this or previous edits, press Cancel Edit."
AddPath    = target2
DelItems   = AutoexecRDelItems
AddItems   = AutoexecRAddItems

[AutoexecRDelItems]

[AutoexecRAddItems]

;//////////////////////////////////////////////////////////////////
; File Assist ini update
;//////////////////////////////////////////////////////////////////
		
[Fassist]
IniName = fassist.ini
SectionName = compatibility
edev = 0x0
edevteam = 0x0
erun = 0x0

;******************************************************************
; Message text
;******************************************************************

[EbRTCopy:CopyDialog]
caption = "Copying Enterprise Developer Runtime Files..."
posx = -5
posy = -5
		
[cancelshell]
caption = "Enterprise Developer Runtime - Exit Install"
text = "You have selected to cancel Install.\nIn order to reset the Windows\nenvironment, Install will also close Windows.\nAre you sure you want to exit?"

[cancel]
caption = "Enterprise Developer Runtime - Exit Install"
text    = "Are you sure you want to exit?"

;***************************************************************************
;* SetShell section                                                        *
;***************************************************************************

[SetShell]
AppIniName = qaw.ini
WinIniName = win.ini
SystemIniName = system.ini
Message = MessageBox.SetShellMessage
SysSectionName = boot
WinSectionName = windows
shell = %s\install.exe
load =
run =
SetShellIfLoaded=
Backup = Backup.SetShellSave
Restore = Backup.SetShellRestore
Active = yes
IfActiveList=LoadedList
SubProcess=

[SetShellSave]
win.ini, win.siw, WINDOWS, WINDOWS
system.ini, system.siw, WINDOWS, WINDOWS

[SetShellRestore]
system.siw, system.ini, WINDOWS, WINDOWS
win.siw, win.ini, WINDOWS, WINDOWS

[LoadedList]                    

[SetShellMessage]
caption  =  "Enterprise Developer Runtime Install Program"
"Welcome to the Enterprise Developer" 
"Runtime Installation program.  Please" 
"press OK to allow Install to restart" 
"Windows and continue the Installation."  
"Press Cancel to exit Install."

;***************************************************************************
;* Message Text                                                            *
;***************************************************************************

[EbRTCopy:Primary]
caption = "Enterprise Developer Runtime - Primary Selection"
button1 = "Files"
button2 = "Files"
button3 = "Files"
text = App1Text

[App1Text]
"Please select the items you wish to install.  If a selection"
"has a button to the right, you can select individual files or"
"components."

[EbRTCopy:Component]
caption = "Enterprise Developer - Runtime Component Selection"
text    = "Indicate which components you want to install.  Highlighted items will be installed."

[AdvoDefault]
posx = 5
posy = 5
text = AdvoText

[AdvoText]
"Please take a moment to complete the Product Registration"
"Card included with your product and return it to Symantec."
"This will ensure that you receive future product"
"announcements and important notices.  It will also" 
"qualify you for any discounts on future upgrades."
""
""
"Thank you for choosing Enterprise Developer."

[EbRTCopy:TypeSelect]
count = 3
caption = "Enterprise Developer - Install Type"
text = "Please select the type of install you would like to perform."
grouptext = "Install Types"
button1 = "Complete Install"
button2 = "Minimum Install"
button3 = "Custom Install"
descrip1 = "Installs the entire product.  Approximate disk space needed = 9MB"
descrip2 = "Installation excludes the XDB Engine.  Approximate disk space needed = 6.5MB"
descrip3 = "Allows you to choose the components you wish to install"

[ByeMessage]
caption  =  "Enterprise Developer - Runtime Install Complete"
"This concludes the Runtime installation" 
"of Enterprise Developer for Windows."
" "
"Please review the README.TXT file for "
"last minute changes and corrections to" 
"the documentation if you have not done"
"so already."
" "
"Please select one of the exit options" 
"below."

[ByeShell]
caption  =  "Enterprise Developer - Runtime Install Complete"
"This concludes the Runtime installation" 
"of Enterprise Developer for Windows."
" "
"Please review the README.TXT file for" 
"last minute changes and corrections to" 
"the documentation."
" "
"Please select one of the exit options" 
"below."

[byereboot]
caption  =  "Enterprise Developer - Runtime Install Complete"
"This concludes the Runtime installation"
"of Enterprise Developer."
" "
"Please review the README.TXT file for "
"last minute changes and corrections to" 
"the documentation. "
" "
"Select one of the exit options below."
"Rebooting is highly recommended.  "
"Please remove all floppy disks from the" 
"drives."

[ByeStillNoDiskSpace]
caption  =  "Enterprise Developer - Runtime Install Exiting"
"The disk space available is still not"
"sufficient for the components of "
"Enterprise Developer you have selected."
""
"Please restart the installation after"
"you have made more disk space available."

[ByeNoDiskSpace]
caption  =  "Enterprise Developer - Runtime Install Exiting"
"The disk space available is insufficient"
"for the components of Enterprise" 
"Developer you have selected."
""
"Please restart the installation after" 
"you have made more disk space available."

[EnterpriseDeveloperSearch]
caption =  "Searching for Previous Version"
text1   =  "Searching for a previously installed"
text2   =  "version of Enterprise Developer Runtime"
appname =  "erun.dll"
apppath =  C:\EntDevRT

[FoundVersion]
caption = "Enterprise Developer Runtime Previous Version"
"A previous version of the Runtime files"
"has been detected.  We STRONGLY suggest" 
"that you install this copy to another" 
"location and delete your old version"
"after the installation is complete."

[FoundVerAskNewPath]
caption = "Enterprise Developer Runtime Previous Version"
"A previous version of the Runtime files"
"has been detected.  We suggest that you"
"install this copy to another location"
"and delete your old version after the"
"installation is complete."
""
"Would you like to select a new" 
"destination path for Enterprise Developer" 
"Runtime Install?"

[StillInstallXDBOrdProc]
caption = "Install confirmation"
"There is insufficient disk space on" 
"the target drive for the components"
"you have selected.  "
""
""
"Do you wish to choose another drive for" 
"the installation?"

[AskNewPathAgain]
caption = "Enterprise Developer Runtime Path Selection"
"There is insufficient disk space for"
"the type of install you have selected."
""
"Would you like to change the destination"
"to a different drive and/or directory" 
"where there is enough space?"
 
[GetNewPath]
caption = "Enterprise Developer Runtime - Select Destination"
reset = TARGET
DefaultDir = "" 

[DefaultXDBTarget]
reset = TARGET2
location = %s\XDB, TARGET

[XDBSystem]
reset = TARGET3
location = %s\system, TARGET2

[MakeXDBdir]
%s\XDB,TARGET

[XDBdir]
reset = TARGET2
location = %s\xdb, TARGET

[NewTarget]
reset = TARGET
location = "c:\EDEVRT1"

[AskTheCust]
caption = "Insufficient Disk Space"
"There is insufficient disk space for"
"the type of install you have selected."
"We suggest one of the following"
"options:"
""
"1) Deselect product components so"
"that less disk space is required."
"2) Change the destination to a"
"different drive and/or directory"
"where there is enough space."
"3) Exit the installation and free more"
"disk space on your drive."
""
"Would you like to deselect product"
"components?"

[NoDiskSpace]
caption = "Insufficient Disk Space"
"There is insufficient disk space for"
"the type of install you have selected."
"We suggest one of the following"
"options:"
""
"1) Deselect product components so that"
"less disk space is required."
"2) Change the destination to a"
"different drive and/or directory where"
"there is enough space."
"3) Exit the installation and free"
"more disk space on your drive."
""
"The next screen will allow you to"
"deselect product components. You will"
"then be able to change the destination"
"drive and/or directory on the screen"
"that follows."

[TargetDrive]
caption =  "Enterprise Developer Runtime - Select Destination"
defpath =  C:\EntDevRT
text    =  "Please select the drive/directory where you would like Enterprise Developer installed."
reqspace=  "Approximate disk space required"

[errors]
noprev  =  "Symantec Install for Windows is already running!"
nohelp  =  "If you require assistance, please consult your installation manual or contact technical support."

[FileCopy]
copycaption   =  "Installing Enterprise Developer"
errorcaption  =  "Error Copying Files"
insertcaption =  "Insert Diskette"
Message       =   MessageText

[LookingForXDB]
xdbodbc.dll, SYSTEM

[FoundXDB]
caption = "XDB Previous Version"
"A previous version of XDB has been"
"detected on your hard drive."
""
"XDB has made some enhancements to"
"this release of the XDB engine."
""
"Would you like Team Enterprise"
"Developer to install another copy of" 
"XDB to this hard drive?"
""
"NOTE: If you are currently using a "
"copy of XDB that was originaly installed" 
"by Team Enterprise Developer, it will"
"be over written if you answer Yes.  "
"Altough this will cause you to lose "
"access to all of your existing" 
"databases, they can be reconnected to" 
"the new version."

[MakeTheDestDir]
%s,TARGET

[MakeXDBSysDir]
%s\SYSTEM, TARGET2

;************************************************************************
;  Ini Modifications
;************************************************************************

[ModOdbcinstQuestion]
caption = "ODBCINST.INI File Modifications"
"Your ODBCINST.INI file needs to be" 
"modified. If you answer YES, your" 
"current ODBCINST.INI file will be" 
"backed up as ODBCINST.ED1"
""
"If you choose NO, you must modify the"
"ODBCINST.INI file manually to be" 
"able to access the XDB databases."

[odbcinstAdd]
IniName = odbcinst.ini
SectionName = "ODBC Drivers"
"XDB ODBC Driver"=Installed
SectionName = "XDB ODBC Driver"
Driver="%s\xdbodbc.dll",SYSTEM
Setup="%s\xdbodbcs.dll",SYSTEM

[WinIniAdd]
IniName = win.ini
SectionName = "XDB"
XDBCFG="%s",TARGET2
XSRVCFG="%s", TARGET2
XDBAUTOSHUTDOWN=OFF

[ShutDownXDB]
IniName = win.ini
SectionName = "XDB"
XDBAUTOSHUTDOWN=ON
;***************************************************************************
;* Delete Files                                                            *
;***************************************************************************

[Leftovers]
win.siw, WINDOWS
system.siw, WINDOWS

;***************************************************************************
;* Misc install functions                                                  *
;***************************************************************************

[XDBCFG0]
"%s\SIWXDBUP 0",TARGET2

[VerDll]
ver.dll, system

[CheckEm]
win.eb0, WINDOWS

[IsOdbcinstIni]
odbcinst.ini,WINDOWS

[SaveOdbcinst]
odbcinst.ini, odbcinst.ed1, WINDOWS, WINDOWS

[MoveXDBODBC]
xdbodbc.dll, xdbodbc.dll, TARGET2, SYSTEM
xdbodbcs.dll, xdbodbcs.dll, TARGET2, SYSTEM

[pix]
color = %s\stars.bmp

;*******************************************************************
;  Copy Information
;*******************************************************************

[EbRTCopy]
CopyMain.RT,       "Enterprise Developer Runtime Component", 21000000,     N, N, Y
CopyMain.XDB,      "XDB SQL Engine", 210000,            N, N, Y

[EbRTCopy.Disk1]
SCALE.ZI!,     "SCALE Runtime Files",          Link:RT,  size:1417412
IMAGES.ZI!,    "Enterprise Developer Image Support Files"  Link:RT,  size:157920
OBJECTS.ZI!,   "Enterprise Developer Object Files",        Link:RT,  size:710208
ODBC.DLL,      "ODBC support file",            SYSTEM, VersionCheck, Link:Basefiles, size:44736
ODBCINST.DLL,  "ODBC support file",            SYSTEM, VersionCheck, Link:Basefiles, size:6016
ODBCINST.INI,  "ODBC support file",            WINDOWS, switch12, Link:Basefiles, size:56

[EbRTCopy.Disk2]
RUNTIME.ZI!,   "Runtime Component Support Files", Link:RT,  size:3421792

[EbRTCopy.Disk4]
XDB.ZI! ,   "XDB Engine files",   TARGET2,  Link:XDB, ZIPDDIRS, size:2608324
XDBSYS.ZI! ,"XDB System Database",   TARGET3, Link:XDB, ZIPDDIRS, size:367803

[EbRTCopy.Disk3]
ODBCDRV.ZI!,   "SCALE Generic ODBC Data Link",    Link:RT, size:80960
XDBDRV.ZI!,    "SCALE XDB via ODBC Data Link",    Link:RT,     size:80992
WATDRV.ZI!,    "SCALE WATCOM via ODBC Data Link", Link:RT,  size:80960
SCALE.INI,     "SCALE Initialization Files",      Link:RT,  size:50
																								  ;RLS
