home *** CD-ROM | disk | FTP | other *** search
- @echo off
- if [%errorlevel%]==[] goto error
- if [%_CWD%]==[] goto error
- if "%cdrom%"=="C:" goto error2
- if "%cdrom%"=="c:" goto error2
- if "%step6%"=="√" goto end
- goto begin
-
- rem #1: Bootsector
- rem #2: Search bootup files
- rem -2a: comfile (comspec/shell/command interpreter, command.com)
- rem -2b: autofile (bootup automation script, autoexec.bat)
- rem -2c: cfgfile (device driver loading script, [fd]config.sys)
- rem #3: Create bootup files
- rem #4: Translate programs and install them
- rem #5: Clean up
-
- :begin
- cls
- set fdosdir=%_CWD%
- if "%bootsrc%"=="" set path=%fdosdir%;%path%
- if "%bootsrc%"=="diskette" set path=%fdosdir%;%path%
- REM ctty nul
- cdd %fdosdir%
- ren localize.txt localize.%lang%
- if exist %fdosdir%\INSTBASE\freedos.log set GUI_inst=true
- for %%x in ( 1 2 3 4 5 6 ) DO set step%%x=Θ
- set comfile=%fdosdir%\BIN\command.com
- goto infomenu
-
- :infomenu
- if exist %fdosroot%\nls\localize.%lang% set nlspath=%fdosroot%\nls
- if exist a:\freedos\localize.%lang% set nlspath=a:\freedos
- ctty con
- cls
- for %%x in ( 0 1 2 ) do localize 3.%%x
- for %%x in ( 1 2 3 4 5 6 ) do if "%step%%x%"=="√" localize 4.%%x
- for %%x in ( 1 2 3 4 5 6 ) do if "%step%%x%"=="Θ" localize 5.%%x
- REM ctty nul
- %fdosroot%\bin\sleep 1
- for %%x in ( 1 2 3 4 5 6 ) do if "%step%%x%"=="Θ" goto step%%x
- goto end
-
- :step1
- set step1=√
- set copycmd=/y
- rem Create Bootsector
- %fdosdir%\bin\SYS %fdosdir% c: c:\fdosboot.bin BOOTONLY
- copy %fdosdir%\bin\kernel32.sys c:\kernel.sys
- REM set iofiles=c:\io.sys c:\dosplus.sys c:\drbios.sys c:\drdos.sys c:\ibmbio.com c:\winboot.sys
- REM for %%x in ( %iofiles% ) do if exist %%x goto metadual
- goto infomenu
-
-
- :step2
- set nlspath=%fdosdir%
- ren localize.txt localize.%lang%
- goto step2a
-
- :step2a
- set comfile=%fdosdir%\command.com
- IF EXIST C:\command.com goto step2b
- set comfile=c:\command.com
- goto step2b
-
- :step2b
- echo @echo off > %fdosdir%\fdauto.bat
- for %%x in ( 1 2 3 4 5 6 7 8 ) do localize 2.%%x >> %fdosdir%\fdauto.bat
- set autofile=%fdosdir%\fdauto.bat
- if exist c:\autoexec.bat goto step2c
- rem Moving file and adjusting %autofile%
- copy %fdosdir%\fdauto.bat c:\autoexec.bat
- if exist c:\autoexec.bat del %fdosdir%\fdauto.bat
- if exist c:\autoexec.bat set autofile=c:\autoexec.bat
- goto step2c
-
- :step2c
- cls
- set cpugen=3
- set nlspath=%fdosdir%
- echo !SET dosdir=%fdosdir%> c:\fdconfig.sys
- if not exist c:\config.sys ren c:\fdconfig.sys config.sys
- for %%x in ( c:\config.sys c:\fdconfig.sys ) do if exist %%x set cfgfile=%%x
- set step2=√
- goto infomenu
-
- :step3
- CDD %fdosdir%\NLS
- if exist makecmd.bat call makecmd.bat
- if not exist command.com copy %comspec% command.com
- if not exist xmsswap.com copy command.com xmsswap.com
- set copycmd=/y
- IF NOT EXIST %comfile% copy command.com %comfile%
- cls
- set step3=√
- goto infomenu
-
-
- :step4
- set nlspath=%fdosdir%
- cls
- echo !SET lang=%lang% >> %cfgfile%
- for %%x in ( 0 1 2 3 4 5 6 7 8 9 10 ) DO LOCALIZE 0.%%x >> %cfgfile%
- goto sub4_%cpugen%86
-
- :sub4_186
- copy %fdosdir%\NLS\command.com %comfile%
- for %%x in ( 1 2 3 ) DO LOCALIZE 0.%cpugen%%%x >> %cfgfile%
- rem swap FreeCOM (non-XMS version!) to harddisk when using CALL /S prog.exe
- ECHO 1?SHELLHIGH=%fdosdir%\bin\KSSF.COM %comfile% /K %autofile% >> %cfgfile%
- REM for %%x in ( 1 ) DO LOCALIZE 2.%cpugen%%%x >> %autofile%
- set step4=√
- goto infomenu
-
- :sub4_286
- copy %fdosdir%\NLS\xmsswap.com %comfile%
- for %%x in ( 1 2 ) DO LOCALIZE 0.%cpugen%%%x >> %cfgfile%
- ECHO 1?DEVICE=%fdosdir%\BIN\FDXMS286.SYS >> %cfgfile%
- ECHO 1?SHELL=%comfile% /K %autofile% >> %cfgfile%
- ECHO 2?SHELL=%comfile% /D /K SET PATH=%fdosdir%\bin >> %cfgfile%
- REM for %%x in ( 1 ) DO LOCALIZE 2.%cpugen%%%x >> %autofile%
- goto sub4keyb
-
- :sub4_386
- copy %fdosdir%\NLS\xmsswap.com %comfile%
- set umb_list=NOEMS
- rem UMB_list is mostly VMware specific, but should hardly harm on real machines.
- rem Areas not explicitly included are being taken care of by the auto-scan.
- if not "%color%"=="Mono" set umb_list=NOEMS I=B000-B7FF I=DC00-EBFF I=C800-C8FF
- for %%x in ( 1 2 3 ) DO LOCALIZE 0.%cpugen%%%x >> %cfgfile%
- ECHO 12?DEVICE=%fdosdir%\BIN\HIMEM.EXE >> %cfgfile%
- ECHO 2?DEVICE=%fdosdir%\BIN\EMM386.EXE %umb_list% >> %cfgfile%
- ECHO ;1?DEVICE=%fdosdir%\bin\atapicdd.sys /D:FDCD0001 >> %cfgfile%
- ECHO 12?SHELLHIGH=%comfile% /K %autofile% >> %cfgfile%
- ECHO 3?SHELLHIGH=%comfile% /D /K set path=%fdosdir%\bin >> %cfgfile%
- for %%x in ( 1 ) DO LOCALIZE 2.%cpugen%%%x >> %autofile%
- set umb_list=
- goto sub4keyb
-
- :sub4keyb
- set step4=√
- if "%keybfile%"=="" goto infomenu
- CDD %fdosdir%\bin\key
- keyfiles %keybfile%
- if not exist %keybfile% keyfiles %keybfile%
- cdd -
- REM if not exist %fdosdir%\bin\KEY\%keybfile% %fdosdir%\bin\KEY\kblayout.exe -C %keybfile% -d %fdosdir%\bin\KEY
- REM if exist %fdosdir%\bin\KEY\%keybfile%
- echo LH KEYB %kblayout%,,%fdosdir%\bin\KEY\%keybfile% %keybrest% >> %autofile%
- goto infomenu
-
- :step5
- if exist %fdosroot%\nls\localize.%lang% set nlspath=%fdosroot%\nls
- if exist a:\freedos\localize.%lang% set nlspath=a:\freedos
- REM localize 7.4 %cfgfile%, %autofile%, %comfile% >> %autofile%
- for %%x in ( 0 1 2 1 ) do localize 7.%%x >> %autofile%
- goto step5a
-
- :step5a
- set step5=√
- if not exist %fdosdir%\bin\ctmouse.exe goto infomenu
- localize 3.3
- REM ctty nul
- %fdosdir%\bin\ctmouse.exe
- if errorlevel 5 goto infomenu
- copy /y %fdosdir%\bin\ctmouse.exe %fdosdir%\bin\mouse.exe
- for %%x in ( %fdosdir%\bin\ctmouse\ctm-%lang%.exe ) do if exist %%x copy /y %fdosdir%\bin\mouse.exe
- ECHO MOUSE >> %autofile%
- ctty con
- goto infomenu
-
- :step6
- ctty con
- set step6=√
- alias boot=%fdosdir%\bin\SYS C: C: BOOTONLY
- for %%x in ( 0 1 2 3 4 5 6 ) do localize 4.%%x
- for %%x in ( 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ) do localize 6.%%x
- md %fdosdir%\temp
-
- cd \
- cd %fdosdir%
- echo.
- echo Type NO (+ENTER) to not install bootsector,
- set /P instboot=or press just ENTER to DO install bootsector
- if not "%instboot%"=="" goto clean_up
- %fdosdir%\bin\SYS C: C: BOOTONLY
- goto clean_up
-
- :clean_up
- set temp=%fdosdir%\temp
- set tmp=%fdosdir%\temp
- set path=%fdosdir%\bin
- set nlspath=%fdosdir%\NLS
- for %%x in ( 1 2 3 4 5 6 ) do set step%%x=
- for %%x in ( files disksrc bootsrc cputype cdname loadbat cdrom findfile ) DO set %%x=
- for %%x in ( instmode menu1_nr menu2_nr opt form_opt instparm autofile key ) DO set %%x=
- for %%x in ( config cfgfile gui_inst comfile languages fdosroot color display ) DO set %%x=
- goto end
-
- :end