#############################################################################
 #                                                                           #
 #                                Info-ZIP Note                              #
 #                                =============                              #
 #                                                                           #
 #  This file, first created in September 1999, has now been expanded into   #
 #  two parts:                                                               #
 #                                                                           #
 #    (1) notes about the differences between the three known NetWare ports  #
 #        of Info-ZIP's UnZip [new]                                          #
 #    (2) notes about the most recent port, version 5.40, which is also now  #
 #        bundled with NetWare 5.1                                           #
 #                                                                           #
 #  Both sets of notes were written by Vance Baarda of Novell, who also was  #
 #  responsible for the 5.40 port.                                           #
 #                                                                           #
 #############################################################################


+----------+
|  PART 1  |
+----------+

These are the three NetWare ports of UnZip that I know of:

   5.0:    ftp://ftp.info-zip.org/pub/infozip/NOVELL/beta/unzip.nlm
           (September 1993)
   5.12e:  ftp://ftp.rz.fh-hannover.de/pandora/util/nlm/zipnlm.exe
           (May 1995)
   5.40:   ftp://ftp.info-zip.org/pub/infozip/NOVELL/unz540xNLM.zip
           (September 1999)

I imagine the folks at Info-ZIP can answer any questions you have
regarding generic differences among 5.0 and 5.12e and 5.40.

   [Info-ZIP note:  see the appropriate History.* files within
    ftp://ftp.info-zip.org/pub/infozip/doc/UnzpHist.zip, and note
    that the embedded version info in zipnlm.exe's unzip.nlm
    identifies it as being based on the stock version 5.12, not
    the older beta version 5.12e.  We do not know who did this
    port or whether source code is available, but it is now also
    available in ftp://ftp.info-zip.org/pub/infozip/NOVELL/beta2/ ]

As far as the NetWare ports, the main differences I know of are as follows:

   5.0:    auto-destroys screen with -S option,
           does not extract files with long names

   5.12e:  auto-destroys screen with -$ option,
           does not extract files with long names

   5.40:   does not auto-destroy screen (but see below),
           extracts and creates files with long names,
           maintains case-sensitivity of file names (like FiLeNaMe),
           supports command-line stdin and stdout redirection (like
             unzip -o sys:/test.zip > sys:/output)

When I ported UnZip 5.40 to NetWare, I decided to handle screen issues
differently from the earlier ports.  Because I wanted to use unzip.nlm
during NetWare installation, I didn't want it to create a screen at all.
But I also wanted it to behave "naturally" when invoked manually at the
console.

The unzip.nlm version 5.40 creates its own non-auto-destruct screen if
and only if the current screen (at the time UnZip is loaded) is the
System Console. The way we handle this at Novell, if we want UnZip not
to create its own screen, is to call it from an install.nlm/nwconfig.nlm
script. (Install.nlm for NetWare 4.x, nwconfig.nlm for NetWare 5.x).
Here's an example of such a script: 

   command icmd 
   activate 
   nlmexec 1, 'unzip -o sys:/test1.zip' 
   activate 
   nlmexec 1, 'unzip -o sys:/test2.zip' 
   activate 
   nlmexec 1, 'unzip -o sys:/test3.zip' 

This script could be invoked on NW4.x like this: 

   load install -b=sys:/script.bat -d=c:\nwserver 

This script could be invoked on NW5.x like this: 

   nwconfig -b=sys:/script.bat 

Notes: 

1) Important!! If you use a script like the above, you *must* use the -o
   option of UnZip. If you do not, and UnZip tries to ask the user whether
   to replace an existing file, the server will abend (at least NetWare
   4.11 will). The reason is that no thread is allowed to try to read
   keystrokes from the System Console. 

2) You cannot do something like this in an ncf file: 

      load unzip -o sys:/test1.zip 
      load unzip -o sys:/test2.zip 
      load unzip -o sys:/test3.zip 

   The reason is that the thread that parses the ncf file does not wait for
   UnZip to unload before executing the next line. It executes all three
   lines immediately, which means that only the first line will work (since
   unzip.nlm is not re-entrant). The nlmexec command, however (when called
   with the block flag set to 1 as in the example above), waits for UnZip
   to unload before executing the next command. 

3) Note that on 4.x, the load line is shown as "load install
   -b=sys:/script.bat -d=c:\nwserver" Some versions of install.nlm need to
   know what the NetWare boot directory is, even though the script above
   does not touch the boot directory. Anyway, that's the purpose of the
   "-d=c:\nwserver" 

4) You need to call "activate" before every invocation of unzip.nlm.
   That's the only way to guarantee that the active screen at the time
   unzip.nlm loads is not the system console. 

Vance Baarda
Senior Software Engineer
1800 South Novell Place
Provo, UT 84606
www.novell.com
[20 September 2000]



+----------+
|  PART 2  |
+----------+

1) I used the Watcom version 11 compiler and the Novell NetWare SDK
   from October 1998.  You can get the latest NetWare SDK (free).  Go to
   http://developer.novell.com/ndk/netware.htm#C/C++ and look for "NLM and
   NetWare Libraries for C (including CLIB and XPlat)"

2) The unzip.nlm runs in the same address space as the NetWare OS.
   In other words, if unzip.nlm crashes, the server will most likely crash.
   Therefore, I recommend you do not load unzip.nlm on a server that your
   company depends on for business until it's been thoroughly tested on a
   test server.

3) I've designed this unzip.nlm port to load on any version of NetWare
   starting with NetWare 3.12.  However, I've tested it only on NetWare 5.0.
   If unzip.nlm does not load or run correctly, try the following in
   this order:

	a) Load clibaux.nlm version 1.21a or later before loading
	   unzip.nlm.  The clibaux.nlm is part of the NetWare SDK package
	   mentioned above.  It's also part of the 3.x C library package
	   mentioned below.

	b) On NetWare 3.x, install the latest 3.x C library modules.
	   Go to http://support.novell.com/misc/patlst.htm#nw and look for
	   "NetWare 3.12/3.2 CLIB".

	c) On NetWare 4.10, install the latest 4.10 C library modules.
	   Go to http://support.novell.com/misc/patlst.htm#nw and look for
	   "Updated modular CLIB and DSAPI".

	d) On NetWare 4.11 and 4.2, install the latest support pack.
	   Go to http://support.novell.com/misc/patlst.htm#nw and look for
	   "NetWare 4 Support Pack".

4) This unzip.nlm assumes that support for the long name space (also
   known as the OS/2 name space) has already been added to the current
   working volume.  If it has not, and the zip archive contains files with
   long names, then the fopen() for such files will just fail.  The code
   does not attempt to rename the file to fit in a DOS-style name.  The same
   problem would occur with long directory names.

5) If unzip.nlm works correctly on NetWare 3.x (which it should,
   but I've not tried it), it will create all files and directories with
   all-uppercase names. The reason is that the NetWare 3.x C library does
   not support creating mixed-case or lowercase file names, even in the long
   (OS/2) name space.

6) To change the current working volume and current working directory
   in which unzip.nlm loads and runs, load unzip.nlm like this:

	load unzip <unzip options> (CLIB_OPT)/P<volume>:<directory>

   For example:

	load unzip archive.zip (CLIB_OPT)/Pvol1:\usr\home

   For more information on CLIB_OPT, go to http://developer.novell.com/search/
   and enter "CLIB_OPT" in the "Novell Developer Kit Search" box.

7) To find out more about clibaux.nlm, go to
   http://developer.novell.com/search/ and enter "clibaux" in the "Novell
   Developer Kit Search" box.


Vance Baarda
NetWare Server Install
Novell, Inc.
[26 September 1999]