Sunday, August 30, 2015

Thoughts on updating the install process

Jerome Shidel has been working on a set of power utilities for DOS batch files. Called the V8Power Tools for DOS, they provide "Visual" equivalents to many command line tools, such as VCLS, VCHOICE, VECHO .. as well as new power tools such as VPROGRES (display a progress bar) and VFRAME (for text-mode boxes).

I would love to see an update to the FreeDOS install process that uses Jerome's V8Power Tools. It may help to know that we've previously discussed (on the mailing list, and individually with a few developers) that the next FreeDOS distribution should assume some defaults. For example, rather than ask "minimal install," "normal install," "complete install," and "custom install," simply assume a "default" installation. The only option that needs to be asked is if the user wants to install source code, too.

This simplifies the install process quite a lot. And it means that everyone starts with a standard configuration, which makes debugging easier (rather than having to ask "did you do a complete install or only the minimal install?" when helping someone with a question or problem). FreeDOS isn't very large, so limiting the install options is unlikely to be an issue for many people these days.

Applying Jerome's V8Power Tools, the INSTALL.BAT would be quite simple. Here's an example that I'm just making up (I haven't tested this):
@ECHO OFF

VCHOICE "Hi there. You are about to install FreeDOS onto your computer. If this is not what you intend to do, please exit now." "Continue" "Exit"
IF ERRORLEVEL 2 GOTO QUIT

VCHOICE "Do you want to install source code, too?" "Yes" "No"
IF ERRORLEVEL 1 GOTO INSTALL

SET EXCLUDE="-x SOURCE"

:INSTALL
VECHO "Installing FreeDOS … Please wait"

UNZIP -qq A:\INSTALL\PKGS\BASE\*.ZIP %EXCLUDE% -d C:\FDOS
UNZIP -qq A:\INSTALL\PKGS\DEVEL\*.ZIP %EXCLUDE% -d C:\FDOS
UNZIP -qq A:\INSTALL\PKGS\EDIT\*.ZIP %EXCLUDE% -d C:\FDOS
REM … and so on for other package sets

VCHOICE "FreeDOS has been installed! You can reboot the computer now, or you can just exit back to the system." "Reboot" "Exit"
IF ERRORLEVEL 2 GOTO DONE

VECHO "Rebooting …"
REBOOT

:QUIT
VECHO "You have aborted the installation."
GOTO END

:DONE
VCLS
ECHO "Ok"

:END

That batch script is over-simplified (it doesn't check if the C: drive is ready, doesn't run post-install scripts, etc.) but I think it's enough that you can see the idea I had.

No comments:

Post a Comment