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 init
-
- :init
- rem unset variables to make some environmentspace.
-
- set bin_dir=A:
- if not "%cdrom%"=="" set bin_dir=%cdrom%\freedos\setup\bin
- set files=sys.com debug.com attrib.com locate.com
- REM for %%x in ( %files% ) do if not exist %bin_dir%\%%x goto complain
- goto begin
-
- :begin
- cls
- ctty nul
- set fdosdir=%_CWD%
- 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
- ctty con
- cls
- %header%
- echo.
- echo Performing post installation steps:
- echo %step1% Stage 1 : Setup kernel and bootsectorfiles
- echo %step2% Stage 2 : Create configuration file %cfgfile%
- echo %step3% Stage 3 : Create automation file %autofile%
- echo %step4% Stage 4 : Setting up translated programs.
- echo %step5% Stage 5 : Installing mousedriver
- echo %step6% Stage 6 : Writing bootsector
- ctty nul
- %bin_dir%\sleep 1
- if "%step1%"=="Θ" goto step1
- if "%step2%"=="Θ" goto step2
- if "%step3%"=="Θ" goto step3
- if "%step4%"=="Θ" goto step4
- if "%step5%"=="Θ" goto step5
- if "%step6%"=="Θ" goto step6
- goto end
-
- :step1
- set step1=√
- set copycmd=/y
- rem Create Bootsector
- SYS %fdosdir% c: c:\fdosboot.bin BOOTONLY
- copy %fdosdir%\bin\kernel32.sys c:\kernel.sys
-
- REM %bin_dir%\hasfat32
- REM if errorlevel 1 set core=%core16%
-
- 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
- rem Determine the appropriate eXtended Memory Services [XMS] manager
- if "%cputype%"=="80386" set xmsline=1?DEVICE=%fdosdir%\BIN\FDXMS.SYS
- if "%cputype%"=="80286" set xmsline=1?DEVICE=%fdosdir%\BIN\FDXMS286.SYS
- if "%cputype%"=="80186" set xmsline=;XMS driver not available on %cputype% platform
- if "%cputype%"=="80086" set xmsline=;XMS driver not available on %cputype% platform
-
- cls
- if "%GUI_inst%"=="true" goto step2a1
- echo ;for help on commands, please see %fdosdir%\config.sys > c:\fdconfig.sys
- echo !LASTDRIVE=Z >> c:\fdconfig.sys
- echo !BUFFERS=20 >> c:\fdconfig.sys
- echo !FILES=40 >> c:\fdconfig.sys
- goto step2a1
-
- :step2a1
- echo MENU 1 - Load FreeDOS and XMS-memory driver >> c:\fdconfig.sys
- echo MENU 2 - Load FreeDOS without drivers >> c:\fdconfig.sys
- echo MENUDEFAULT=1,5 >> c:\fdconfig.sys
- echo %xmsline% >> c:\fdconfig.sys
- echo 1?DOS=HIGH >> c:\fdconfig.sys
- set step2=√
- for %%x in ( 80086 80186 80286 ) do if "%cputype%"=="%%x" goto infomenu
- goto step2a2
-
- :step2a2
- rem install cdrom support (386+). . .
- set cdinfo=1?DEVICE=%fdosdir%\bin\atapicdd.sys /D:FDCD0001
- REM please uncomment the following line to allow setup to add cdrom support.
- REM strangely enough it crashes the combination of:
- REM kernel2030_32/fdXxms0.92/atapicdd0.2.10/ freecom 0.82pl2-xms-swap
-
- REM for %%x in ( 1 2 3 4 5 6 7 8 9 0 ) do if exist FDCD000%%x goto step2a
-
- REM no cdromdrivers loaded, so comment them out, but add anyway.
- set cdinfo=;%cdinfo%
- goto step2b
-
- :step2a
- if NOT exist %fdosdir%\bin\atapicdd.sys set cdinfo=;%cdinfo%
- if "%scsidrvr%"=="" goto step2b
- rem copy and install non-atapi (ASPI?) drivers. AtapiCDD should be able to handle them!
- rem the device-path in config.sys needs to be corrected. I can't get the base filename!
- for %%x in ( %scsidrvr% ) do copy %%x %fdosdir%\bin
- for %%x in ( %scsidrvr% ) do echo ;1?DEVICE=%fdosdir%\bin\%%x >> c:\fdconfig.sys
- goto step2b
-
- :step2b
- echo %cdinfo% >> c:\fdconfig.sys
- set cdinfo=
- goto infomenu
-
- :step3
- cls
- REM ## IF NOT [%KEY%]==[none] set KEY=%fdosdir%\bin\key\%key%.key
- rem ## rem Xkeyb wants a base file to start with...
- rem ## if not [%KEY%]==[none] copy /y %fdosdir%\bin\key\pc437.key %fdosdir%\bin\pc437.key
- if "%GUI_inst%"=="true" goto step3a1
-
- echo @echo off > %fdosdir%\fdauto.bat
- echo set dircmd=/p/ogn >> %fdosdir%\fdauto.bat
- echo IF EXIST %fdosdir%\bin\mouse.exe %fdosdir%\bin\mouse.exe >> %fdosdir%\fdauto.bat
- echo IF EXIST FDCD0001 %fdosdir%\bin\Shsucdx /D:FDCD0001 >> %fdosdir%\fdauto.bat
- echo set dosdir=%fdosdir% >> %fdosdir%\fdauto.bat
- echo set path=C:\;%fdosdir%;%fdosdir%\bin >> %fdosdir%\fdauto.bat
- echo set NLSDIR=%fdosdir%\NLS >> %fdosdir%\fdauto.bat
- goto step3a1
-
- :step3a1
- echo set lang=%lang% >> %fdosdir%\fdauto.bat
- echo set key=%key% >> %fdosdir%\fdauto.bat
- if not exist c:\config.sys ren c:\fdconfig.sys config.sys
- set step3=√
- if exist c:\autoexec.bat goto infomenu
- copy %fdosdir%\fdauto.bat c:\autoexec.bat
- if exist c:\autoexec.bat del %fdosdir%\fdauto.bat
- goto infomenu
-
-
- :step4
- REM first determine which files were actually used. Later, set up nationalised stuff (FreeCOM, CTmouse)
- for %%x in ( c:\config.sys c:\fdconfig.sys ) do if exist %%x set cfgfile=%%x
- for %%x in ( c:\autoexec.bat %fdosdir%\fdauto.bat ) do if exist %%x set autofile=%%x
- echo 1?SHELL=%fdosdir%\BIN\CMDXSWP.COM /P=%autofile% >> %cfgfile%
- echo 2?SHELL=%comfile% /P=%autofile% >> %cfgfile%
- if exist %fdosdir%\bin\key\%key% echo %fdosdir%\bin\keyb %fdosdir%\bin\key\%key% >> %autofile%
- echo echo BootFiles: %cfgfile%, %autofile%, %comfile% >> %autofile%
- echo echo type HELP to get support on commands and navigation >> %autofile%
- echo echo. >> %autofile%
- echo echo Welcome to FreeDOS >> %autofile%
- echo echo. >> %autofile%
- set step4=√
- 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
- copy command.com %comfile%
- copy xmsswap.com %fdosdir%\bin\cmdxswp.com
- if exist %fdosdir%\bin\ctmouse\ctm-%lang%.exe copy /y %fdosdir%\bin\ctmouse\ctm-%lang%.exe %fdosdir%\bin\ctmouse.exe
- cls
- set workdir=
- for %%x in ( "" "none" ) do if "%key%"==%%x goto infomenu
- for %%x in ( %fdosdir%\bin\key\*.kc ) do if not %%x==%fdosdir%\bin\key\%key% del %%x
- goto infomenu
-
- :step5
- set step5=√
- if not exist %fdosdir%\bin\ctmouse.exe goto infomenu
- echo Trying to install mouse support (may hang your computer)
- ctty nul
- %fdosdir%\bin\ctmouse.exe
- if errorlevel 5 goto infomenu
- copy /y %fdosdir%\bin\ctmouse.exe %fdosdir%\bin\mouse.exe
- if not exist c:\kernel.sys copy /y c:\fdkernel.sys c:\kernel.sys
- ctty con
- echo Mouse support succesfully installed!
- goto infomenu
-
- :step6
- ctty con
- set step6=√
- alias boot=SYS %FDOSDIR% C: BOOTONLY
- call %cdrom%\freedos\setup\batch\finaltxt.bat
- set step1=
- set step2=
- set step3=
- set step4=
- set step5=
- set step6=
- goto end
-
- :end
-