@DefineProject
	@Name = "NeuroLab Demo for Windows"
	@Version = "1.2"
	
	@Subdir = "\\NLABDEMO"
	@OutDrive = Z
	@group = "emnxo"
@EndProject

@defineVars

	@dir     @winsys = "@windowsDrive:\\@windowsdir\\system"
	@integer @iwin32s = 1
	@integer @win32Minor = 0
	@integer @win32Major = 0
	@qstring @cGroup = "[CreateGroup(NeuroLab,@outdrive:\\@subdir)]"
	@qstring @aItem = "[Additem(@outdrive:\\@subdir\\Extend.exe,Extend,@outdrive:\\@subdir\\Extend.exe,,,,@outdrive:\\@subdir)]"
	@qstring @sGroup = "[showGroup(NeuroLab,1)]"
	@qstring @addRM = "[Additem(@outdrive:\\@subdir\\nlabextd.doc,NeuroLab Demo Manual (Word 2.0),@outDrive:\\@subDir\\Extend.exe,2)]"

@endvars


@backgroundMode(1,,)

@Display
	@Cls
This program will install:
      NeuroLab demo v1.2 and Extend demo v3.1
on your computer system.

You may press the [Esc] key at any time to stop the installation.
	@Pause
@EndDisplay

@if(@cpu < 386)
	@display
	@cls
This machine is not capable of running the NeuroLab+Extend Demo.
You need an 80386 processor or better.
	@pause
	@abort
	@enddisplay

@endif


@if(@windowsmode != 2)
	@display
	@cls
Windows must be running in Enhanced mode in order to run the
NeuroLab+Extend Demo.
	@pause
	@abort
	@enddisplay

@endif

@if(@windowsVersion < 301)

	@cls
	@display
Microsoft Windows version 3.1 or later is required to run the
NeuroLab+Extend Demo. Install detects that version @WindowsMajor.@WindowsMinor
is installed on this computer.
	@pause
	@enddisplay
	@abort
@endif

@if(@ExtTotal < 3M)

	@display
	@cls
You have insufficient memory to run the NeuroLab+Extend Demo.
4MB or more is required. You may continue with this installation,
but you will need additional memory to run the demo.
	@pause
	@enddisplay
@endif

@if(@exists("@windowsdrive:\\@windowsdir\\system\\w32sys.dll")&&@exists("@windowsdrive:\\@windowsdir\\system\\win32s.ini") && @exists("@windowsdrive:\\@windowsdir\\system\\WIN32S16.DLL") && @exists("@windowsdrive:\\@windowsdir\\system\\win32s\\W32S.386"))

	/* get the version of win32s */
	
		@win32major = @strToInt(@strToken(@getIni("win32s","version","@windowsdrive:\\@windowsdir\\system\\win32s.ini"),0,"."))
		@win32minor = @strToInt(@strToken(@getIni("win32s","version","@windowsdrive:\\@windowsdir\\system\\win32s.ini"),1,"."))
			
		@if((@win32Major * 1000) + @win32Minor >= 1020)
			
			@iwin32s = 0
		
			@getOption
				@cls        
				@dlgctrlsize(0,8,10,10,50)
The version of Win32s (@win32Major.@win32Minor) installed on your system appears 
sufficient to run the NeuroLab+Extend Demo. However, if you are not sure 
if the version of Win32s on your system is complete, you may choose to 
install Win32s version 1.20 from this disk. Choose one of the two options 
below and click "OK" to continue the installation, or "Cancel" the installation.

				@Option 2 = "Continue without reinstalling Win32s"
				@Option 1 = "Reinstall Win32s"
			
			@endOption

			@if(1 [= @option)
				@iwin32s = 1
			@endif

		@else
			@display
			@cls
The version of Win32s installed (@win32Major.@win32Minor) is insufficient 
to run the NeuroLab+Extend Demo. Select "OK" to update win32s to version 1.2 
and continue the installation or "Cancel" to stop the installation.
			@pause
			@endDisplay
		@endif
@elseif(@windowsmajor * 100 + @windowsMinor >= 320)
/*
	@display
	@cls
You have Windows version @windowsmajor.@windowsminor, 
you do not need to install Win32s (@windowsVersion)
	@pause
	@endDisplay
*/        
	@iwin32s = 0

@else

	@display
	@cls        

Win32s has not been installed on this system.

Win32s is a system extension provided by Microsoft Corporation 
which will allow your 386 or better computer to run 32 bit Windows
applications. It will not interfere with the operation of your
existing Windows or DOS programs. NeuroLab+Extend requires Win32s.

Select 'OK' to install Win32s and continue the installation.
Select 'Cancel' to stop the installation.
	
	@pause
	@endDisplay

@endif  

@GetOutDrive
	@suppress(0,1)
	@Cls
	@prompt = "installation drive"
	@dlgCtrlSize(0,6,15,9,25)

On which disk drive do you wish to install 
@Name?


@EndOutDrive


@GetSubdir
	@Cls
	@dlgCtrlSize(0,5,2,6,40)

In which directory should the NeuroLab+Extend Demo be installed?

	@Prompt = "installation directory ([Enter] = @Subdir) ?"
@EndSubdir


	@cGroup = "[CreateGroup(NeuroLab Demo,@outdrive:\\@subdir)]"
	@aItem = "[Additem(@outdrive:\\@subdir\\Extend.exe,Extend Demo,,,,,@outdrive:\\@subdir)]"
	@sGroup = "[showGroup(NeuroLab Demo,1)]"
	@addRM = "[Additem(@outdrive:\\@subdir\\nlabextd.doc,NeuroLab Demo Manual <Word 2.0>,@outDrive:\\@subDir\\Extend.exe,2)]"

@DefineDisk
	@Label = "Disk #1"
	@BeginLib DDB.001
	    @if (@iwin32s == 1)
		@F 0 @S 4096 @O @winsys\\WIN32S\COMDLG32.DLL
		@F 1 @S 156720 @O @winsys\\WIN32S\CRTDLL.DLL
		@F 2 @S 6768 @O @winsys\\WIN32S\CTYPE.NLS
		@F 3 @S 7142 @O @winsys\\WIN32S\L_INTL.NLS
		@F 4 @S 54686 @O @winsys\\WIN32S\LOCALE.NLS
		@F 5 @S 4096 @O @winsys\\WIN32S\LZ32.DLL
		@F 6 @S 5632 @O @winsys\\WIN32S\MPR.DLL
		@F 7 @S 8192 @O @winsys\\WIN32S\NETAPI32.DLL
		@F 8 @S 106496 @O @winsys\\WIN32S\NTMSG.DLL
		@F 9 @S 17920 @O @winsys\\WIN32S\OLECLI32.DLL
		@F A @S 8704 @O @winsys\\WIN32S\OLESVR32.DLL
		@F B @S 2082 @O @winsys\\WIN32S\P_037.NLS
		@F C @S 3874 @O @winsys\\WIN32S\P_10000.NLS
		@F D @S 87586 @O @winsys\\WIN32S\P_10001.NLS
		@F E @S 3106 @O @winsys\\WIN32S\P_10006.NLS
		@F F @S 3106 @O @winsys\\WIN32S\P_10007.NLS
		@F G @S 3362 @O @winsys\\WIN32S\P_10029.NLS
		@F H @S 3618 @O @winsys\\WIN32S\P_10079.NLS
		@F I @S 4130 @O @winsys\\WIN32S\P_10081.NLS
		@F J @S 2082 @O @winsys\\WIN32S\P_1026.NLS
		@F K @S 5410 @O @winsys\\WIN32S\P_1250.NLS
		@F L @S 3874 @O @winsys\\WIN32S\P_1251.NLS
		@F M @S 5410 @O @winsys\\WIN32S\P_1252.NLS
		@F N @S 4130 @O @winsys\\WIN32S\P_1253.NLS
		@F O @S 5410 @O @winsys\\WIN32S\P_1254.NLS
		@F P @S 5922 @O @winsys\\WIN32S\P_437.NLS
		@F Q @S 2082 @O @winsys\\WIN32S\P_500.NLS
		@F R @S 4130 @O @winsys\\WIN32S\P_737.NLS
		@F S @S 5922 @O @winsys\\WIN32S\P_850.NLS
		@F T @S 5922 @O @winsys\\WIN32S\P_852.NLS
		@F U @S 4386 @O @winsys\\WIN32S\P_855.NLS
		@F V @S 5922 @O @winsys\\WIN32S\P_857.NLS
		@F W @S 5922 @O @winsys\\WIN32S\P_860.NLS
		@F X @S 5922 @O @winsys\\WIN32S\P_861.NLS
		@F Y @S 5922 @O @winsys\\WIN32S\P_863.NLS
		@F Z @S 5922 @O @winsys\\WIN32S\P_865.NLS
		@F 00 @S 4386 @O @winsys\\WIN32S\P_866.NLS
		@F 10 @S 4386 @O @winsys\\WIN32S\P_869.NLS
		@F 20 @S 2338 @O @winsys\\WIN32S\P_875.NLS
		@F 30 @S 87586 @O @winsys\\WIN32S\P_932.NLS
		@F 40 @S 94754 @O @winsys\\WIN32S\P_936.NLS
		@F 50 @S 104994 @O @winsys\\WIN32S\P_949.NLS
		@F 60 @S 130594 @O @winsys\\WIN32S\P_950.NLS
		@F 70 @S 9216 @O @winsys\\WIN32S\SCK16THK.DLL
		@F 80 @S 4096 @O @winsys\\WIN32S\SHELL32.DLL
		@F 90 @S 262148 @O @winsys\\WIN32S\SORTKEY.NLS
		@F A0 @S 3196 @O @winsys\\WIN32S\SORTTBLS.NLS
		@F B0 @S 33764 @O @winsys\\WIN32S\UNICODE.NLS
		@F C0 @S 3584 @O @winsys\\WIN32S\VERSION.DLL
		@F D0 @S 40491 @O @winsys\\WIN32S\W32S.386
		@F E0 @S 203264 @O @winsys\\WIN32S\W32SCOMB.DLL
		@F F0 @S 82432 @O @winsys\\WIN32S\W32SKRNL.DLL
		@F G0 @S 352 @O @winsys\\WIN32S\WIN32S.EXE
		@F H0 @S 60416 @O @winsys\\WIN32S\WINMM.DLL
		@F I0 @S 6656 @O @winsys\\WIN32S\WINSPOOL.DRV
		@F J0 @S 8704 @O @winsys\\WIN32S\WSOCK32.DLL
		@F K0 @S 82944 @O @winsys\\OLECLI.DLL
		@F L0 @S 12048 @O @winsys\\W32SYS.DLL
		@F M0 @S 160256 @O @winsys\\WIN32S16.DLL
		@F N0 @S 29184 @O @winsys\\WINMM16.DLL
		@F O0 @S 89 @O @winsys\\WIN32S.INI
	    @endif
		@F P0 @S 342450 @O EXTEND.RSR
		@F Q0 @S 25066 @O TUTORIAL\BANKLINE.MOX
		@F R0 @S 25100 @O TUTORIAL\LAKEPOLN.MOX
		@F S0 @S 1605120 @O NLABEXTD.DOC
	@EndLib
@EndDisk


@DefineDisk
	@Label = "Disk #2"
	@BeginLib DDB.002
		@F 0 @A NLABEXTD.DOC
		@F 1 @S 12288 @O INIUPD.DLL
		@F 2 @S 954597 @O LIBS\NLABDEMO.LIX
		@F 3 @S 392655 @O LIBS\DEMODE.LIX
		@F 4 @S 232396 @O LIBS\DEMOGEN.LIX
		@F 5 @S 71480 @O LIBS\DEMOPLOT.LIX
		@F 6 @S 12968 @O INIUPD.EXE
		@F 7 @S 142126 @O EXTENSNS\PENDULUM.RSR
		@F 8 @S 25600 @O ASIFONT.FON
		@F 9 @S 1167 @O ASIFONT.MAP
		@F A @S 11597 @O ASIPORT.RSR
		@F B @S 1238016 @O EXTEND.EXE
		@F C @S 505 @O PREFS.RSR
		@F D @S 9416 @O EXTEND16.DLL
		@F E @S 311808 @O WMFPICT.DLL
		@F F @S 995840 @O ASIMAGIN.DLL
		@F G @S 624 @O NLABMDLS\TSP_FM.TXT
		@F H @S 61700 @O NLABMDLS\DECODER.MOX
		@F I @S 365 @O NLABMDLS\HOPF3NOI.TXT
		@F J @S 44829 @O NLABMDLS\NL_DYN.MOX
		@F K @S 89329 @O NLABMDLS\INVPEND.MOX
		@F L @S 119 @O NLABMDLS\DECODER.TXT
		@F M @S 33689 @O NLABMDLS\TSP_FM.MOX
		@F N @S 41821 @O NLABMDLS\XORLAYER.MOX
		@F O @S 72108 @O NLABMDLS\CHARRECG.MOX
		@F P @S 39661 @O NLABMDLS\EDU_XOR.MOX
		@F Q @S 1282 @O NLABMDLS\HOPF4CHA.TXT
	@EndLib
@EndDisk

@Finish

	@ChDrive @OutDrive
	@ChDir "@SubDir"
Installation of @Name is now finished.
If Win32s was installed, your machine will now restart Windows.
	@Pause

	@if(@ProgramManager("@cGroup@sGroup@aItem@addRM"))
	@endif

	@setIni("NeuroLab Demo","Extend_dir","@outdrive:\\@subdir\\","@windowsdrive:\\@windowsdir\\extend.ini")
	@setini("Extensions","MOX","@outdrive:\\@subdir\\extend.exe")
	@setini("Extensions","LIX","@outdrive:\\@subdir\\extend.exe")

@if(@iwin32s == 1)
	@copy("@windowsDrive:\\@windowsDir\\system.ini","@outDrive:\\@subDir\\system.sav")
	@if(@winExec("@outdrive:\\@subdir\\iniupd 1 @windowsdrive:\\@windowsdir\\system\\win32s\\w32s.386",0,15))
	@endif
@endif

	@delete("@outdrive:\\@subdir\\iniupd.exe")
	@delete("@outdrive:\\@subdir\\iniupd.dll")

@if(@iwin32s == 1)
	@windowsExitExec("dir")
@endif


@EndFinish
/* end-of-file */
