;****************************************************************************
;* Norton Commander Installation Script                                     *
;* FOR VERSION 4.0 OF SYMANTEC INSTALL FOR WINDOWS                          *
;****************************************************************************
;


[InstallVersion] ; Tell SETUP that this script is designed for SETUP Ver 4.0
4.0

[process]
switch98 = FALSE                        ; Used in "Common Finish" panel
switch97 = FALSE                        ; Used in "Common Finish" panel
switch96 = TRUE                         ; Used in "Common Finish" panel
switch97 = IsInstallShell()             ; Check if install has made itself the shell

Backup( SaveCustom )                    ; Backup the Custom DLL

switch2 = CallProcEx( CheckOSVer )      ; Check for Windows 95
  #ifnot (switch2)                      ; Not running under Win 95
;  #if (switch2)                      ; (Debug) running under Win 95
    WizardPanel( BadOS, siwnc.dll)
    WizardProcessPanel()
    Goto( ScriptEnd )                   ; Exit
  #endif

CallProcEx( SetInstDir )                ; Set the install directory

WizardPanel ( Welcome, siwnc.dll )      ; Get ready for the Welcome panel
WizardProcessPanel()                    ; Display the Welcome panel

WizardPanel( License, siwnc.dll )       ; Set up the online license agreement
WizardProcessPanel()			; Display online license agreement

WizardPanel( Location, siwnc.dll )      ; Set up the location request panel
WizardProcessPanel()			; Display tech support panel

SetActiveCopy( NCCopy , install.inf )   ; Used in searching DISKS.INF

switch66 = CheckDiskSpace( TARGET )     ; Ensure there is enough space on the selected drive

#ifnot( switch66 )
 MessageBox( NoSpace )
 WizardPanel( LocationNoSpace, siwnc.dll )  ; Set up the location request panel again
 WizardProcessPanel()                  ; Try again with Location panel
 switch65 = CheckDiskSpace( TARGET )   ; Check again
 #ifnot( switch65 )
   MessageBox( StillNoSpace )
   Goto( ScriptEnd )                   ; Go to the end of the script and exit
 #endif
 Goto( Continue )                      ; Continue as a valid drive has been selected.
#endif

:Continue

:CopyTheFiles

CreateDirectory( MakeProgramDir )       ; Create the NC directory in mixed case

DisableUtils()                          ; Disable Norton products that may cause problems when copying over new versions.
Copy()                                  ; Copy the files
EnableUtils()                           ; Re-enable these "problematic" Norton products

EnableWin95Shell()                      ; Groups are processed quicker this way. Uses IShellLink instead of DDE
Groups( )                               ; Create a group for installed product

MergeRegFile( NC96_RegFile )            ; Merge the NC.REG file into the registry
MergeRegFile( NC96_OtherRegFile )       ; Merge the NC_INST.REG file so user can use "Add/Remove Programs" to uninstall

SetRegistration( WriteTheNames )        ; Write the registration info to NC.EXE

Backup( RenameScrs )                    ; Give the screen savers long filenames
Delete( DelShortScrs )                  ; Delete the short name versions

Delete( DeleteCustom )                  ; Delete the Custom DLL.

WizardPanel( TechSupport, siwnc.dll )   ; Set up the tech support panel
WizardProcessPanel()			; Display tech support panel

WizardPanel( Finish, siwnc.dll )        ; Set up the final panel
WizardProcessPanel()			; Display final panel

:ScriptEnd

Exit()                                  ; Exit the installation program
End()                                   ; Goodbye

;***************************************************************************
;* Wizard Panel section                                                    *
;***************************************************************************
[BadOS]
Caption = "Norton Commander for Windows 95"
Title = "Incorrect Version"
ResourceId= 3344
DlgProc= _WizardPanelProc@07
Bitmap16= 600
PanelDataProc= _DefaultDataProc@0
PanelFlags= First + Last + Finish

[Welcome]
Caption = "Norton Commander for Windows 95"
Title = "Welcome"
DlgProc = _WelcomeDlgProc@16
ResourceID = 501
Bitmap16 = 600
PanelDataProc = _WelcomeDataProc@0
PanelFlags = First

[License]
Caption= "Online License Agreement"
DlgProc= _LicenseDlgProc@16
ResourceId= 502
PanelDataProc= _LicenseDataProc@0

[Location]
Caption = "Norton Commander for Windows 95"
Title = "Program Location"
ResourceId= 560
DlgProc= _LocationDlgProc@16
Bitmap16= 600
PanelDataProc= _LocationDataProc@0

[LocationNoSpace]
Caption = "Norton Commander for Windows 95"
Title = "Choose Another Location"
ResourceId= 560
DlgProc= _LocationDlgProc@16
Bitmap16= 600
PanelDataProc= _LocationDataProc@0

[TechSupport]
Caption = "Norton Commander for Windows 95"
ResourceId= 507
DlgProc= _TechSupDlgProc@16
Bitmap16= 207
PanelFlags = First

[Finish]
Caption = "Norton Commander for Windows 95"
Title = "Installation Complete"
ResourceId= 563
DlgProc= _FinishDlgProc@16
Bitmap16= 600
PanelDataProc= _FinishDataProc@0
PanelFlags= Last + Finish

[FinishData]                           ; For the "Common Finish" panel
RebootSwitch = switch98
RestartSwitch = switch97
ContinueSwitch = switch96
SuccessText = "Norton Commander for Windows 95 has been successfully copied to your computer."
AddInfoText = "For the latest information on Norton Commander for Windows 95, see the README.TXT file in the installation directory."
RebootOnlyText = "Setup must reboot the system to complete the necessary changes."
RebootOnlyNTText = "Please reboot this NT system to complete the necessary changes."
RestartOnlyText = "Setup must restart Windows to complete the necessary changes."
ContinueOnlyText = "The Norton Commander for Windows 95 installation is complete."

[MakeProgramDir]
%s, TARGET

;***************************************************************************
;* Custom DLL section                                                      *
;***************************************************************************
[SaveCustom]
siwnc.dll, siwnc.dll, SOURCE, TEMPDIR

[DeleteCustom]
siwnc.dll, TEMPDIR

[CheckOSVer]
dll = siwnc.dll
function = IsPlatformWin95

[SetInstDir]
dll = siwnc.dll
function = SetNCInstDir

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

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

[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]
ecdc32.dll                              ; Includes all the executable files in NC 96
ecdc32.vxd
mfco30.dll
nc.exe
nc_edit.dll
nc_frame.dll
nc_obj.dll
nc_panel.dll
nc_res.dll
nc_sched.exe
nc_util.dll
nc_zip.dll
s32krnl8.dll


[SetShellMessage]                       ; Message displayed if SETUP needs to make itself the shell
caption  =  "Norton Commander Setup"
"Welcome to the Norton Commander Setup."
" "
"Please select OK to allow Setup to restart"
"Windows and continue the installation."
" "
"Press Cancel to exit Setup."

;***************************************************************************
;* Groups                                                                  *
;***************************************************************************

[groups]
"Norton Commander",  nc96.grp           ; Name of the Norton Commander Group

[Norton Commander]                      ; This text in [] must match that under [NC96Groups]
"Norton Commander",                     nc.exe,         basefiles,,,,,
"Norton Commander Network Utilities",   nc_net.exe,     basefiles,,,,,
"Norton Commander Scheduler",           nc_sched.exe,   basefiles,,,,,

;***************************************************************************
;* Quitting Setup                                                          *
;***************************************************************************

[Cancel]                                ; When the user chooses to exit Setup
caption = "Norton Commander Setup"
text    = "Are you sure you want to exit?"

[CancelShell]                           ; Displayed if Setup made itself the shell
caption = "Norton Commander Setup"
"You have selected to exit Setup. In order "
"to reset the Windows environment, Setup "
"will need to restart your computer."
" "
"Are you sure you want to exit?"
" "

;***************************************************************************
;* Registration                                                            *
;***************************************************************************
[Registration]
appname =  nc.exe                         ; Destination file for registration info.
string  =  "Symantec Install for Windows" ; Search string in destination DLL
active = no
serialize = 0

[WriteTheNames]
nc.exe, TARGET

[NC96_RegFile]                          ; Windows Registry information
file = %s\nc.reg, TARGET                ; Merge NC.REG into the Windows Registry

[NC96_OtherRegFile]
file = %s\nc_inst.reg, TARGET           ; Merge NC_INST.REG into Windows Registry

;***************************************************************************
;* Copying Files                                                           *
;***************************************************************************

[NCCopy:Primary]
caption = "Norton Commander - Application Selection"
text = PrimaryText

[PrimaryText]
"Uncheck any modules you do not wish to install."

[NCCopy:CopyDialog]
caption = "Copying Files"
posx = -10
posy = -10

[FileCopy]
copycaption   =  "Installing Norton Commander"
errorcaption  =  "Error Copying Files"
insertcaption =  "Insert Diskette"

[NCCopy]                                                  ;Size,  Required, Files Button, Show Item
CopyMain.BaseFiles,    "Norton Commander Files - %ldK",    0,     Y,        N,            Y

[RenameScrs]          ; Gives LFN to the screen savers
nc_name.scr, "Norton Commander Name Bounce.Scr", SYSTEM, SYSTEM
nc_stars.scr, "Norton Commander Starry Night.Scr", SYSTEM, SYSTEM

[DelShortScrs]        ; Delete the original files
nc_name.scr, SYSTEM
nc_stars.scr, SYSTEM
;***************************************************************************
;* Default "Advotorial" dialog                                             *
;***************************************************************************
                                        ; Can use a section [NCCopy:Advo] with
                                        ; a custom DLL to display up to 20 advotorial
                                        ; screens during setup.
[AdvoDefault]
posx = 20
posy = 20
text = AdvoText

[AdvoText]
"Be sure to fill out your registration"
"card.  This will allow Symantec to contact"
"you about future product updates."

;***************************************************************************
;* Messages                                                                *
;***************************************************************************
[Beta_Welcome]
caption="Norton Commander"
" "
"Welcome to Beta 2 of Norton Commander."
" "

[Installed]
caption="Norton Commander"
" "
"Congratulations - Norton Commander"
"has been successfully installed."
" "
"Please remove the installation diskette from the"
"floppy drive at the end of the installation."
" "

[NoSpace]
caption = "Norton Commander"
" "
"There is not enough space to install Norton"
"Commander to the selected drive."
" "
"Please select another drive."
" "

[StillNoSpace]
caption = "Norton Commander"
" "
"You have not selected a drive with sufficient"
"space to install Norton Commander."
" "
"The installation program will now exit."
" "

