Digg this topic Add to my del.icio.us Submit to SlashDot  
Reply to this topicStart new topic
> K8668 - Rebuilding Windows 3.11, A rebuild of PC-DOS 6.30 and Wfw 3.11
wendy
post Jul 20 2006, 07:51 AM
Post #1


Advanced Member
***

Group: Lady
Posts: 63
Joined: 16-July 06
From: one mile from the QR main line
Member No.: 13


Australia


I decided to rebuild a copy of Windows 3.11 with all of the latest mod cons etc. In essence, while we are trying to keep with the original windows, most of the thing is getting a modern makeover. The Windows 3.11 resource kit (reskit31.exe) gives extensive details on this, so we're really following what MS has documented. Still, doing this gives a ready-made custom Windows with patches installed.

This is not the first time this experiment has been conducted. A custom build of windows has been used as the main OS since about 1994 to 1998 (when win31 dominated the desktop). So this is not merely some theoretical exercise, but a day-to-day OS.

The base versions of Windows are abbreviated thus:
  • W300 : Windows 3.00
  • W310: Windows 3.10
  • W330: Windows 3.10 for Workgroups
  • W311: Windows 3.11
  • W331: Windows 3.11 for workgroups

When one speaks of 310 and 311. one usually means W310 and W331. There really was a wfw 310 and an win 311, but neither of these were mainstream. wfw 310 (w330) is also cheerfully dubbed "Windows for Warehouses", because it was slower than Windows 3.10 or either of the 3.11 stock.

The further idea is to see if we can support something like standard mode in Windows 3.11.

For as much as possible, the process is not merely to produce a 3.31 distro, but to see if much of the original can be reproduced, including compression, etc. Eventually, we will get around to recompiling help files, to add in extra information. One subject to be added is help on the Progman DDE interface.

Initial tests with W310, W311 and W331 suggest that W331 requires the least modifications, and this version is fairly accessable to many users. You should be able to access MS-DOS 6.22 and Windows 3.10 as well, because we will borrow from both of these. None the same, these are more cosmetic changes, rather than real things.
Go to the top of the page
 
+Quote Post
wendy
post Jul 20 2006, 08:22 AM
Post #2


Advanced Member
***

Group: Lady
Posts: 63
Joined: 16-July 06
From: one mile from the QR main line
Member No.: 13


Australia


Compression

The first element is to deal with the fact that both PC-DOS / MS-DOS and Windows 3.11 are compressed in the distribution. Looking in an DOS 5.x or Win3.x0 distro file, one sees the signature letters SZDD. The Dos 6 / Win 3.x1 files have here KWAJ. Windows NT and 98 are in MSCF format.

One can make SZDD files using a MS utility hight "compress.exe". This is fairly easy to come by, it basically escaped the Windows 3.1 SDK. The "compress.exe" that comes with the Windows NT resource kit makes MSCF files. One has to go way back to find a compress.exe for the KWAJ format.

To understand what has happened, KWAJ is an older format than SZDD, but is generally better compression. MSCF is generally as good as KWAJ, but appeared later. One might easily suppose that SZDD is native microsoft format, but did not give the same compression ratios as an earlier KWAJ. But because Windows 3.11 and DOS 6 are considerably larger than their DOS 5 / Windows 3.10, the older format was reused to save disk storage. EXPAND 2 (in DOS 6.x), and 2.1 (in Windows 3.11), are there largely to handle both SZDD and KWAJ formats transparently.

One notes also that there is an OS/2 utility DECOMP.EXE, (included in the WLO libraries), which is quite capable of expanding the Windows 3.11 / DOS 6 files. even though the file is quite old. On the other hand, the expand from dos 5.0 or Windows 3.x0 (3.00/3.10/3.30) is incapable of expanding KWAJ format.

The compress.exe for KWAJ is quite rare. I found it in conjuction with the Foxpro distribution Kit. Still, because of fears of it being overwritten, i renamed it to ENCOMP (to match DECOMP). Here is encomp's help screen,

CODE
Microsoft (R) Compression Utility - Version 1.02
Copyright (c) Microsoft Corp 1989 - 1991.  All rights reserved.

Usage: compress [-aAlg -bceflq$ -sSize -tText -zSize] srcArg [destArg]
   -a -- Choices for compression algorithm are:  [default = 3]
      2 - the Steven Zeck algorithm.
      3 - Jeff Johnson's algorithm (LZSS + Huffman).
   -be will include each file basename/extension in the header.
   -f will force overwriting and recompression of files.
   -l will include each file length in the header.
   -q will compute compressed file lengths (no output) (ignores -sz flags).
   -s will split output into Size x 512 byte pieces naming each piece
      with a sequentially higher numerical base name.
   -t will include following Text in the header.
      Text that includes spaces should be double-quoted.
   -z will split off and compress just one piece, and leave the
      remainder uncompressed in a second file.
   -$ will turn OFF dollar sign renaming.  Specific destArg will override.

   srcArg can be a filename, a wildcard pattern, or a directory.  The
   latter will cause a tree walk operation.  destArg can be a directory,
   a specific filebase, or omitted in which case digits are appended.


You might imagine these to be in a batch condition, where one writes eg "pack winfile.ex e". The default of this version is to rename winfile.exe to winfile.ex$. The $ was changed to _ to match the ISO 9660 file restrictions, mainly.
  • DOS6xx: encomp -a3 -l -f %1%2 %1_
  • Win3x1: encomp -a3 -b -e -l -f %1%2 %1_

Note that both the DOS and Windows files store length (-l), but only the Windows version stores the filename. This is why the expand.exe from Windows 3.11 supports the -r option (which does not work under DOS files, because the information is not stored in the files.

This is the compress from Windows SDK:

CODE
Microsoft (R) File Compression Utility  Version 2.00
Copyright (C) Microsoft Corp. 1990-1992.  All rights reserved.

Compresses one or more files.

COMPRESS [-r] Source Destination
COMPRESS -r Source [Destination]

  -r          Automatically rename compressed files.
  Source      Source file specification. Source may be multiple file
              specifications. Wildcards may be used.
  Destination Destination file / path specification. Destination may be a
              directory. If Source is multiple files and -r is not specified,
              Destination must be a directory. Wildcards may not be used.


This produces the SZDD files found in MS/PC DOS 5.00 and Windows 3.00 / 3.10 / 3.11. In general, it is not as tight as the encomp format, and the letter is stored only if the -r option is used. In practice, the last letter is stored, not the full name as under KWAJ format.

Still, the purpose of this is that one should look for version 1 if one wants to make SZDD files, not version 2.

A more recent version comes with the Windows NT reskit files, makes only MSCF format, the format used with Windows NT, 2K, XP, (as individual files), and Win9x (as cabinet-files).

OS/2 uses pack and pack2, but this is not a worry at this stage.

Target

Because we want to use the -r option of expand.exe, we need to repack DOS files to meet this. DOS 6 setup does not understand SZDD files, because it is a one-shot install. Windows 3.x1 has to understand the older format because the LZEXPAND dll is used elsewhere after install, eg with SZDD files.

We also plan to update some of the dos files, and this is therefore needed.
Go to the top of the page
 
+Quote Post
wendy
post Jul 20 2006, 08:38 AM
Post #3


Advanced Member
***

Group: Lady
Posts: 63
Joined: 16-July 06
From: one mile from the QR main line
Member No.: 13


Australia


PC-DOS 6.31

OK, this is a fairly rare DOS, i'd amit, but i have used PC-DOS as my OS from vers 5.00 onwards through 6,10, 6.30, 7.00 and 2000. BTW, Edlin 2000 does _not_ run under DOS 2000! OK, onwards we go.

PC-DOS 6.3 had a number of fixes released, including ibmdos.com, ibmbio.com, command.com, and a few others. We plan to slipstream these all to the new DOS. Also, there are a number of standard drivers that we plan to integrate, largely from DOS 2000.

Here is a list of drivers from the different DOS's, based on release date. The file collection was up to date at the time the file was built, but new entries have been made since.

CODE
                                  Emm   Ram  Smart
                           Himem   386  Drive  Drv  Mouse  Mscdex
   Win286  2.11  U 270588  1.0           2.04  1.05
   MS-DOS  4.01  U 070489  2.04   4.00   2.12  2.10
   MS-Win  3.00  U 311090  2.60   4.10   3.04  3.06  7.04
   IBMDOS  5.00  U 090591  2.77   4.20   3.06  3.13  7.04
   MS-DOS  5.00  U 111191  2.78   4.33   3.06  3.13
   IBMDOS  5.02  B 010992  2.78   4.33   3.06  3.13  8.20
   MS-Win  3.10  U 100392  3.07   4.44   3.06  4.00  8.20
   MS-Win  3.11  U 311293  3.07   4.44   3.06  4.00
   MS-DOS  6.00  U 100393  3.07   4.45   3.06  4.10  8.20   2.22
   IBMDOS  6.00  U 290693  3.09   4.45   3.06  4.10  8.20
   PC-DOS  6.10  U 161193  3.09   4.45   3.06  4.10  8.20
   MS-Fix  6.0a  F 010693                      4.20
   PC-DOS  6.30  U 311293  3.09   4.48   3.06  5.00  9.01   2.23
   MS-DOS  6.20  U 270993  3.10   4.48   3.07  5.00  8.20   2.23
   MS-WfW  3.11  U 011193  3.10   4.48   3.07  5.00         2.23
   MS-DOS  6.21  B 130294  3.10   4.48   3.07  5.00         2.23
   MS-DOS  6.22  U 310594  3.10   4.49   3.07  5.01  8.20   2.23
   PC-DOS  7.00  U 171194  3.15   4.50   3.10  5.10  8.20   2.25
   Win-95  3.95  U 110795  3.95   4.95   3.06  5.00 (8.30)  2.25


We plan to keep the version 9 of the mouse driver. The default install creates a hideous mouse.ini, but deleting this fixes all problems. The rest are updated according to the table.

We also plan to update a number of other files, such as qconfig.exe (pc-dos version of msd.exe), and expand.exe (windows 3.11, supporting -r options), and probably a patched version of pcdos 7.00 dosshell.
Go to the top of the page
 
+Quote Post
TheHive
post Jul 20 2006, 02:17 PM
Post #4


Advanced Member
***

Group: .script developer
Posts: 2,159
Joined: 14-July 06
Member No.: 5



Well I cant keep up with all of it but it sounds good.

There is a shell replacement called Calmira that can either make Windows 3.11 look like Win98 or Win XP.
http://www.calmira.de/
Go to the top of the page
 
+Quote Post
wendy
post Aug 6 2006, 07:14 AM
Post #5


Advanced Member
***

Group: Lady
Posts: 63
Joined: 16-July 06
From: one mile from the QR main line
Member No.: 13


Australia


Some pictures.

This is Windows K8668 just after being installed. The picture shows Windows Help (winhelp.exe), loaded and then the "Help/about" dialog displayed.

On the left is the control panel. There are a number of extra control panel applets, for ATM font manager, Clock, Wallpaper, Pif Editor, Reg-Edit and WinSetup. These are modified versions of the NEVERnever control panel applets.

Clock launches clock.exe. The OS/2 clock icon lives in the control panel.

Wallpaper directly links to the program paper.exe, which is a "file-open" dialog that changes the wallpaper.

PifEdit and RegEdit are the standard pifedit and regedit programs. They live in the control panel

WinSetup is the Windows Setup program. It has been started, you see it to the bottom right of the screen.

The colour-scheme is "WinOS/2 original" from the package "Workplace Shell for Windows"

r
Attached thumbnail(s)
Attached Image
 
Go to the top of the page
 
+Quote Post
Nuno Brito
post Aug 6 2006, 11:48 AM
Post #6


Advanced Member
***

Group: .script developer
Posts: 4,851
Joined: 13-July 06
From: Azores
Member No.: 1


Portugal


Your Win3.1 desktop looks good! (IMG:http://www.boot-land.net/forums/style_emoticons/default/laugh.gif)


Are you planning to make some tutorials on how/where to apply these mods? (IMG:http://www.boot-land.net/forums/style_emoticons/default/huh.gif)
Go to the top of the page
 
+Quote Post
wendy
post Aug 7 2006, 08:59 AM
Post #7


Advanced Member
***

Group: Lady
Posts: 63
Joined: 16-July 06
From: one mile from the QR main line
Member No.: 13


Australia


I am planning to write how to integrate individual packages into the result. It's not hard.

Just have to document it...

W
Go to the top of the page
 
+Quote Post
Yorn
post Aug 7 2006, 02:24 PM
Post #8


Advanced Member
***

Group: Advanced user
Posts: 169
Joined: 17-July 06
From: United States
Member No.: 25



I remember using PC-DOS for a while on the old Compaq. But that came with Win95 and 8 meg RAM, so it was impossible for me to completely axe MS-DOS, if I remember right.
Go to the top of the page
 
+Quote Post
wendy
post Aug 12 2006, 07:34 AM
Post #9


Advanced Member
***

Group: Lady
Posts: 63
Joined: 16-July 06
From: one mile from the QR main line
Member No.: 13


Australia


The rexx script for doing the mods to setup.inf, etc is now done. It took just three bugs to get it working nicely.

The script is produced by a rexx-script weave.rex. The process allows you to write elegant fully documented code, and test the result at the end. Don Knuth invented this particular process "literate programming". I implemented it to write text files etc (you can write raw binary files and floppy disks with it!).

CODE
extproc weave.rex
regina.exe weave.rexx zmk3.cmd
goto :erexx
!topic About

!src
!! Directory of output      !!set ytarget #\k-dos\build\mswfw##
!exe rexxmain #winsetup.rex##Parse winsetup.inf##
!exe batfile #test1.bat##
!end

This command is intended to process winsetup.inf based on the location of
files as set forth in the directories above.  Basically. winsetup.inf is
a prototype for all setup.inf files, and the output has the cumulative
build of individual insertions.

If the file exists in the output directory, then the line is printed to
the default printer object.  Only optional files are thus added.

!topic - settings

!src settings
!! Name of source tape     !!set yinput #winsetup.inf##
!! Command to search for   !!set ykey #@@#
!! Output to:              !!set youtdir #r:##
!lbl rexxsets
!! key to find       !!exe rexxvar #key##ykey##
!! non-active file   !!exe rexxvar #null##*~*##
!! true variable     !!exe rexxvar #true##*t*##
!! false variable    !!exe rexxvar #false##*f*##
!! input file        !!exe rexxvar #infile##yinput##
!! target dir        !!exe rexxvar #target##ytarget#\##
!! underscore        !!exe rexxvar #uscore##_##
!! outdir            !!exe rexxvar #outdir##youtdir##
!put ##
!lbl rexxvar
!put #zvar1#='#zvar2#';#
!end

To set a DOS directory into something like UNIX or whatever, use this
command.

   !set ytarget \build\mswfw/
   !say #zq.*\*ytarget*/*     ->  /build/mswfw/

!topic cmdline

!src cmdline
parse arg a1 a2; if stream(a1'\xmsmmgr.exe', 'c', 'query exists') = ''
  then nop; else; do; target = a1; outdir = a2; end
!lbl batfile
!new #zvar1#
@echo off
!put #regina.exe winsetup.rex #ytarget#\ #youtdir#\##
!exe copyfile #setup.in##f##
!exe compress #control.sr##c##
!exe compress #system.sr#c##
!exe compress #win.sr##c##
!lbl copyfile
!put #rem copy /y #youtdir#\#zarg1#zarg2# #ytarget#\#zarg1#zarg2##
!lbl compress
!put #encomp -b -e -f -l #youtdir#\#zarg1#zarg2# #ytarget#\#zvar1#_##
!end



!topic eachline

This is the gist of the program.  We initialise the assorted printers
and then fire up the loop.  When the loop is done, we turn off any open
printers, and then exit.

!src eachline
if pos(key, incard) > 0
  then call procline
  else call printline
!lbl printline
!put #printline:; select; #
!put   #when defprint = '*' then nop; #
!put   #when paused = true then nop; ##
!put   #otherwise call lineout defprint, incard; end; #
!put #return##
!end

The idea here is that we can print a line if a file exists or does not
exist, eg

    exists('calendar.ex_') gives 'true'
    thisline = exists('calendar.ex_'); call printtrue


!topic procline

Here we process the lines that have the string '@@' in them.  The actual
action is one of many things, including opening and closing printers.

   @@*     select printer
   @@*/    select printer null
   @@c     printtrue(file)
   @@/     printfalse(file)

!src procline
!put #procline:; #
!put #parse var incard incard (key) cmdcard; #
!put #parse var cmdcard 1 cmdx 2 testme; ##
!put #if pos( cmdx, '*/') = 0 then testme = cmdcard; #
!put #parse var testme testme .; ##
select;
when cmdx = '*' then call setprint
when cmdx = '/' then call isfile testme, false
otherwise call  isfile testme, true; end
return
!inc setprint
!end

With setprint, we now allow pausing of the file, too, eg

   @@\  pause
   @@/  restart




!topic isfile testme, true/false.

!src isfile
!put #isfile:; #
!put   #parse arg testfile, allow;#
!put   #call testforme; ##
!put   #if exists = allow; #
!put      #then call printline; #
!put #return##
!inc testforme
!end



!topic testforme

See if any of the files exist.  Files are comma separated, eg

  @@winfile.exe,winfile.hlp

!src testforme
!put #testforme:;#
!put   #exists = false; #
!put   #testme = testfile; ##
!put #do while testme <> ""; #
!put   #parse var testme test1 ',' testme; ##
!inc findfile
!put # if exists = true then leave; #
!put   #end;#
!put #return##
!lbl findfile -----------------------------------
test2 = reverse(test1); parse var test2 1 . 2 test2;
test2 = reverse(test2) || uscore; select;
  when stream( target || test2, 'c', 'query exists') <> '' then exists = true
  when stream( target || test1, 'c', 'query exists') <> '' then exists = true
  otherwise; nop; end
!end



!topic selprint

The idea here is that one of three printers are available, either

!src setprint
!put #setprint:; #
!put #select; #
!put  #when testme = '/' then paused = false; #
!put  #when testme = '\' then paused = true; #
!put #otherwise; ##
!put    #call stream defprint, 'c', 'close'; #
!put    #defprint = outdir'\'testme; paused = defprint; ##
!put    #call stream defprint, 'c', 'open write replace'; #
!put #end; #
!put #return##
!end

    /   resumes a printer
    \   pauses a printer
    otherwise, start a new printer


!topic rexxmain

This is the main rexx script.  We only give the highlights here, and
direct the user to read the individual routines listed in the script.

!src rexxmain
!inc settings;  General Weave variables.
!new #zvar1#
!put #/* REXX #zcomment# */##/*~ #zvar2# */##
!inc rexxsets;  General REXX variables
!inc cmdline;   Command line processing
call stream infile, 'c', 'open read'
defprint = null; thisline = null;
do while lines(infile)
incard = linein(infile)
!inc eachline
end
call stream defprint, 'c', 'close'
call stream infile, 'c', 'close'
exit
!rem ------------- routines -------------------------
!inc printline; print the current line to defprint
!inc procline ; process lines with @@.
!inc isfile   ; part of checking for file
!end


!topic eof
!eof
:erexx


The rexx-script this makes is:

CODE
/* REXX Woven from zmk3.cmd by Wendy Krieger on 20060811 at 20:25:49 */
/*~ Parse winsetup.inf */
key='@@';null='*~*';true='*t*';false='*f*';infile='winsetup.inf';
target='\k-dos\build\mswfw\';uscore='_';outdir='r:';
parse arg a1 a2;  if stream(a1'\xmsmmgr.exe', 'c', 'query exists') = ""
  then nop; else; do; target = a1; outdir = a2; end
call stream infile, 'c', 'open read'
defprint = null; thisline = null;
do while lines(infile)
incard = linein(infile)
if pos(key, incard) > 0
  then call procline
  else call printline
end
call stream defprint, 'c', 'close'
call stream infile, 'c', 'close'
exit
printline:; select; when defprint = '*' then nop; when paused = true then nop;
otherwise call lineout defprint, incard; end; return
procline:; parse var incard incard (key) cmdcard; parse var cmdcard 1 cmdx 2 testme;
if pos( cmdx, '*/') = 0 then testme = cmdcard; parse var testme testme .;
select;
when cmdx = '*' then call setprint
when cmdx = '/' then call isfile testme, false
otherwise call  isfile testme, true; end
return
setprint:; select; when testme = '/' then paused = false; when testme = '\' then paused = true;
otherwise; call stream defprint, 'c', 'close'; defprint = outdir'\'testme; paused = defprint;
call stream defprint, 'c', 'open write replace'; end; return
isfile:; parse arg testfile, allow;call testforme;
if exists = allow; then call printline; return
testforme:;exists = false; testme = testfile;
do while testme <> ""; parse var testme test1 ',' testme;
test2 = reverse(test1); parse var test2 1 . 2 test2;
test2 = reverse(test2) || uscore; select;
  when stream( target || test2, 'c', 'query exists') <> '' then exists = true
  when stream( target || test1, 'c', 'query exists') <> '' then exists = true
  otherwise; nop; end
if exists = true then leave; end;return
Go to the top of the page
 
+Quote Post
« Next Oldest · OS2 and Windows 3x/9x · Next Newest »
 

Fast ReplyReply to this topicStart new topic

Members Who Viewed Topic Today ()

 

Display Mode: Standard · Switch to: Linear+ · Switch to: Outline

Track this topic · Email this topic · Print this topic · Subscribe to this forum

RSS Lo-Fi Version Time is now: 23rd March 2008 - 06:08 AM

MKPortal ©2003-2006 mkportal.it