changeset 39011:dc12250ba65b

add scripts for creating precompiled Windows distributions
author Andrew Innes <andrewi@gnu.org>
date Wed, 29 Aug 2001 13:58:01 +0000
parents 40e322d4c818
children aa310bebddef
files admin/nt/README-UNDUMP.W32 admin/nt/README-ftp-server admin/nt/README.W32 admin/nt/dump.bat admin/nt/makedist.bat
diffstat 5 files changed, 619 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/admin/nt/README-UNDUMP.W32	Wed Aug 29 13:58:01 2001 +0000
@@ -0,0 +1,43 @@
+	      Emacs for Windows NT and Windows 95/98/2000
+
+			Version 21.0.104 pretest
+
+			     July 16, 2001
+		
+This README file describes how to dump a bare precompiled version of GNU
+Emacs for Windows NT and Windows 95/98/2000.  This distribution
+supplements the standard dumped precompiled distribution of Emacs, which
+you can download from:
+
+	ftp://ftp.gnu.org/gnu/windows/emacs/
+
+If you do not have the "bin" distribution, then you will need to
+download it before you can use this undumped version.  Also note that
+you should only need to dump Emacs yourself if you want to dump Emacs
+with more elisp files than are included normally, or to rebuild Emacs
+after patching one of the elisp files that is preloaded.
+
+The dumping process consists of running a bare Emacs, loading up a
+number of general elisp files, and then creating a new Emacs executable
+preinitialized and ready to run.  In the precompiled distributions,
+Emacs has already been dumped with the standard configuration.
+
+To dump Emacs, unpack this distribution into the directory created by
+unpacking the corresponding standard precompiled distribution.  To
+verify that you unpacked in the proper place, check to make sure that
+you now have a temacs.exe file in the bin directory.
+
+Once you have unpacked this distribution, cd into the bin directory and
+run dump.bat.  This will produce a new bin\emacs.exe executable for you
+to use (the original one is renamed to emacs.exe.orig; this is not
+overwritten if you run dump more than once).
+
+For more information about running Emacs, read the README.W32 file that
+came with the standard dumped precompiled distribution.  If you have
+problems with Emacs, including problems with dumping, send email to
+"ntemacs-users@cs.washington.edu".
+
+Enjoy.
+
+Andrew Innes
+(andrewi@gnu.org)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/admin/nt/README-ftp-server	Wed Aug 29 13:58:01 2001 +0000
@@ -0,0 +1,241 @@
+		      Precompiled Distributions of
+	      Emacs for Windows NT and Windows 95/98/2000
+
+			      Version 20.7
+
+			     June 13, 2000
+		
+  This directory contains source and precompiled distributions for GNU
+  Emacs on Windows NT and Windows 95/98/2000.  This port is a part of
+  the standard GNU Emacs distribution from the Free Software Foundation;
+  the precompiled distributions are provided here for convenience since,
+  unlike Unix, the majority of Windows users do not have access to a
+  compiler (and, besides, do you really want to compile Emacs when you
+  don't have to?).
+
+  If you have access to the World Wide Web, I would recommend pointing
+  your favorite web browser to the following document (if you haven't
+  already):
+
+	http://www.gnu.org/software/emacs/windows/ntemacs.html
+
+  The above web document is a far more complete version of this README
+  file.  If you don't have access to the Web, however, then read on.
+
+
+* IMPORTANT LEGAL REMINDER
+
+  If you want to redistribute any of the precompiled distributions of
+  Emacs, be careful to check the implications of the GPL.  For instance,
+  if you put the emacs-20.7-bin-i386.tar.gz file from this directory on
+  an Internet site, you must arrange to distribute the source files of
+  the SAME version (i.e. emacs-20.7-src.tar.gz).
+
+  Making a link to our copy of the source is NOT sufficient, since we
+  might upgrade to a new version while you are still distributing the
+  old binaries.
+
+
+* Distributions in .tar.gz format
+
+  Emacs is distributed primarily as a set of large gzipped tar files
+  (*.tar.gz).  Because Emacs is quite large and therefore difficult to
+  download over unreliable connections, it is provided in several
+  combinations, ranging from the complete source plus executables, to
+  just the minimal amount needed to run without any source, plus a
+  couple of optional packages.  Here are the combinations (i386 in the
+  name indicates a tarball contains executables compiled for
+  Intel-compatible x86 systems):
+
+  + Primary precompiled distribution, including lisp source:
+
+      emacs-20.7-fullbin-i386.tar.gz
+
+  + Minimal precompiled distribution, which excludes lisp source:
+
+      emacs-20.7-bin-i386.tar.gz
+
+    You can download emacs-20.7-lisp.tar.gz to get the lisp source, if
+    you later decide you want it - it is useful for understanding how
+    packages work, and how they can best be setup or customized.
+
+
+  NB. If you just want to run Emacs, get one of the distributions above.
+
+
+  + Bare executables, only useful if you want to get the complete source
+    release below, but can't compile Emacs yourself:
+
+      emacs-20.7-barebin-i386.tar.gz  (requires emacs-20.7-src.tar.gz)
+
+  + Undumped executable, only needed for rebuilding Emacs after changing
+    certain core lisp files:
+
+      emacs-20.7-undumped-i386.tar.gz
+
+  + Optional package providing the Library of Emacs Input Methods for
+    typing non-ascii characters, notably Chinese, Japanese and Korean,
+    but also including European and other character sets:
+
+      emacs-20.7-leim.tar.gz
+
+  + The complete official source for Emacs:
+
+      emacs-20.7-src.tar.gz
+
+  + The complete official source for LEIM:
+
+      leim-20.7-src.tar.gz
+
+
+* Distributions in multi-file .zip format
+
+  A second distribution in the form of multiple small .zip files is also
+  provided, for the benefit of people who have unreliable internet
+  connections, or who need to copy the distribution onto floppy disks:
+
+      em207-b*.zip
+
+  This is equivalent to getting emacs-20.7-bin-i386.tar.gz above.
+  The lisp source is available as em207-l*.zip.
+
+
+* Distributions for non-x86 platforms
+
+  I try to make this port available for all platforms supported by
+  Windows (it should build on all supported Windows NT/9x platforms).
+  However, I do not always have access to non-x86 platforms, and so I
+  cannot guarantee to provide precompiled distributions for the other
+  platforms myself.  If you find there are no binaries for your
+  platform, and you have access to a Microsoft compiler, then you can
+  download the source and compile Emacs yourself (and, if you do, please
+  consider contributing your executables; send me mail and we can make
+  arrangements for making them available on this ftp server.)
+
+
+* Unpacking distributions
+
+  Programs for handling the distribution file formats can be found in
+  the utilities directory: 
+
+    ftp://ftp.gnu.org/gnu/windows/emacs/utilities
+
+  For gzipped tar files, you will need either gunzip.exe and tar.exe
+  together, or djtarnt.exe.  djtarnt.exe can also unpack .zip files.  I
+  strongly urge you to use these utilities since they were the ones used
+  to create the distributions; the most common problem people have in
+  trying to get Emacs to run is due to some other utility program
+  corrupting the distribution while unpacking.
+
+  Open a command prompt (MSDOS) window.  Decide on a directory in which
+  to place Emacs.  Move the distribution to that directory, and then
+  unpack it as follows.
+
+  If you have the gzipped tar version, use gunzip to uncompress the tar
+  file on the fly, and pipe the output through tar with the "xvf" flags
+  to extract the files from the tar file:
+
+    % gunzip -c some.tar.gz | tar xvf -
+
+  You may see messages from tar about not being able to change the
+  modification time on directories, and from gunzip complaining about a
+  broken pipe.  These messages are harmless and you can ignore them.  On
+  Windows NT, unpacking tarballs this way leaves them in compressed
+  form, taking up less space on disk.  Unfortunately, on Windows 95 and
+  98, a large temporary file is created, so it is better to use the
+  djtarnt.exe program, which performs the equivalent operation in one
+  step:
+
+    % djtarnt -x some.tar.gz
+
+  You may be prompted to rename or overwrite directories when using
+  djtarnt: simply type return to continue (this is harmless).
+
+  If you have the multi-file .zip distribution, use djtarnt to unpack
+  all of the .zip files:
+
+    % djtarnt -x *.zip
+
+  Once you have unpacked a precompiled distribution of Emacs, it should
+  have the following subdirectories:
+
+	bin	etc	info	lisp	lock	site-lisp
+
+  If your utility failed to create the lock directory, then you can
+  simply create it by hand (it is initially empty).
+
+
+* Unpacking with other tools
+
+  If you do use other utility programs to unpack the distribution, check
+  the following to be sure the distribution was not corrupted:
+
+  + Be sure to disable the CR/LF translation or the executables will be
+    unusable.  Older versions of WinZipNT would enable this translation
+    by default.  If you are using WinZipNT, disable it.  (I don't have
+    WinZipNT myself, and I do not know the specific commands necessary
+    to disable it.)
+
+  + Check that filenames were not truncated to 8.3.  For example, there
+    should be a file lisp/abbrevlist.el; if this has been truncated to
+    abbrevli.el, your distribution has been corrupted while unpacking
+    and Emacs will not start.
+
+  + I've been told that some utilities (WinZip again?) don't create the
+    lock subdirectory.  The lock subdirectory needs to be created.
+
+  + I've also had reports that the "gnu-win32" port of tar corrupts the
+    executables.  Use the version of tar or djtarnt in the utilities
+    directory instead.
+
+  If you believe you have unpacked the distributions correctly and are
+  still encountering problems, see the section on Further Information
+  below.
+
+
+* Compiling from source
+
+  If you would like to compile Emacs from source, download the source
+  distribution, unpack it in the same manner as a precompiled
+  distribution, and look in the file nt/INSTALL for detailed directions.
+  Note, though, that you must have a Microsoft compiler to compile the
+  source.  (Support for compiling with gcc 2.95 or later will be
+  available in a future release.)
+
+
+* Further information
+
+  There is a web page that serves as a FAQ at:
+
+	http://www.gnu.org/software/emacs/windows/ntemacs.html
+
+  There is also a mailing list for discussing issues related to this
+  port of Emacs.  For information about the list, send a message to
+  ntemacs-users-request@cs.washington.edu with the word "info" in the
+  *body* of the message.  To subscribe to the list, send a message to
+  the same address with the word "subscribe" in the body of the message;
+  similarly, to unsubscribe from the list, send a message with the word
+  "unsubscribe" in the message body.
+
+  Another valuable source of information and help which should not be
+  overlooked is the various Usenet news groups dedicated to Emacs.
+  These are particuarly good for help with general issues which aren't
+  specific to the Windows port of Emacs.  The main news groups to use
+  for seeking help are:
+
+	gnu.emacs.help
+	comp.emacs
+
+  There are also fairly regular postings and announcements of new or
+  updated Emacs packages on this group:
+
+	gnu.emacs.sources
+
+  You are also always welcome to send me mail directly.  If you don't
+  hear from me immediately, however, don't worry; it sometimes takes me
+  a few days (or longer) to get to all of my mail regarding Emacs.
+
+  Enjoy!
+
+  Andrew Innes
+  (andrewi@gnu.org)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/admin/nt/README.W32	Wed Aug 29 13:58:01 2001 +0000
@@ -0,0 +1,192 @@
+	      Emacs for Windows NT and Windows 95/98/2000
+
+			Version 21.0.104 pretest
+
+			     July 16, 2001
+		
+  This README file describes how to set up and run a precompiled version
+  of GNU Emacs for Windows NT and Windows 95/98/2000.  This distribution
+  can be found on the ftp.gnu.org server and its mirrors:
+
+	ftp://ftp.gnu.org/gnu/windows/emacs/
+
+  This server contains other distributions, including the full Emacs
+  source distribution and the lisp source distribution, as well as older
+  releases of Emacs for Windows.
+
+  Answers to frequently asked questions, and further information about
+  this port of GNU Emacs and related software packages can be found via
+  http or ftp:
+
+	http://www.gnu.org/software/emacs/windows/ntemacs.html
+	ftp://ftp.gnu.org/gnu/windows/emacs/docs/ntemacs.html
+
+* Preliminaries
+
+  Along with this file should be six subdirectories (bin, etc, info,
+  lisp, lock, site-lisp).  Depending on which distribution you have
+  installed, the lisp subdirectory might contain both the lisp source
+  (*.el) and compiled lisp files (*.elc), or just the compiled lisp
+  files.  If you don't have the lisp source files, you can obtain them
+  by downloading the lisp source distribution or the full source
+  distribution from the ftp site mentioned above.
+
+* Setting up Emacs
+
+  To install Emacs, simply unpack all the files into a directory of your
+  choice, but note that you might encounter minor problems if there is a
+  space anywhere in the directory name.  To complete the installation
+  process, you can optionally run the program addpm.exe in the bin
+  subdirectory.  This will add some entries to the registry that tell
+  Emacs where to find its support files, and put an icon for Emacs in
+  the Start Menu under "Start -> Programs -> Gnu Emacs -> Emacs".
+
+  Some users have reported that the Start Menu item is not created for
+  them.  If this happens, just create your own shortcut to runemacs.exe,
+  eg. by dragging it on to the desktop or the Start button.
+
+  Note that running addpm is now an optional step; Emacs is able to
+  locate all of its files without needing the information to be set in
+  the environment or the registry, although such settings will still be
+  obeyed if present.  This is convenient for running Emacs on a machine
+  which disallows registry changes, or on which software should not be
+  installed.  For instance, you can now run Emacs directly from a CD
+  without copying or installing anything on the machine itself.
+
+* Starting Emacs
+
+  To run Emacs, simply select Emacs from the Start Menu, or invoke
+  runemacs.exe directly from Explorer or a command prompt.  This will
+  start Emacs in its default GUI mode, ready to use.  If you have never
+  used Emacs before, you should follow the tutorial at this point
+  (select Emacs Tutorial from the Help menu), since Emacs is quite
+  different from ordinary Windows applications in many respects.
+
+  If you want to use Emacs in tty or character mode within a command
+  window, you can start it by typing "emacs -nw" at the command prompt.
+  (Obviously, you need to ensure that the Emacs bin subdirectory is in
+  your PATH first, or specify the path to emacs.exe.)  The -nw
+  (non-windowed) mode of operation is most useful if you have a telnet
+  server on your machine, allowing you to run Emacs remotely.
+
+* Uninstalling Emacs
+
+  If you should need to uninstall Emacs, simply delete all the files and
+  subdirectories from the directory where it was unpacked (Emacs does
+  not install or update any files in system directories or anywhere
+  else).  If you ran the addpm.exe program to create the registry
+  entries and the Start menu icon, then you can remove the registry
+  entries using regedit.  All of the settings are written under the
+  Software\GNU\Emacs key in HKEY_LOCAL_MACHINE, or if you didn't have
+  administrator privileges, the same key in HKEY_CURRENT_USER.  Just
+  delete the Software\GNU\Emacs key.
+
+  The Start menu entry can be removed by right-clicking on the Task bar
+  and selecting Properties, then using the Remove option on the Start
+  Menu Programs page.  (If you installed under an account with
+  administrator privileges, then you need to click the Advanced button
+  and look for the Gnu Emacs menu item under All Users.)
+
+* Troubleshooting
+
+  Unpacking the distributions
+
+  If you encounter trouble trying to run Emacs, there are a number of
+  possible causes.  If you didn't use the versions of tar and gunzip (or
+  djtarnt) on the above ftp site, it is possible that the distribution
+  became corrupted while it was being unpacked.  Check the following for
+  indications that the distribution was not corrupted:
+
+    * Be sure to disable the CR/LF translation or the executables will
+      be unusable.  Older versions of WinZipNT would enable this
+      translation by default.  If you are using WinZipNT, disable it.
+      (I don't have WinZipNT myself, and I do not know the specific
+      commands necessary to disable it.)
+
+    * Check that filenames were not truncated to 8.3.  For example,
+      there should be a file lisp\abbrevlist.elc; if this has been
+      truncated to abbrevli.elc, your distribution has been corrupted
+      while unpacking and Emacs will not start.
+
+    * Users have said that some utilities (WinZip again?) don't create
+      the lock subdirectory.  You can create the lock directory by hand
+      (it is normally empty).
+
+    * Users have also reported that the gnu-win32 tar corrupts the
+      executables.  Use the version of tar or djtarnt on the ftp.gnu.org
+      site instead.
+
+  If you believe you have unpacked the distributions correctly and are
+  still encountering problems, see the section on Further Information
+  below.
+
+  Virus scanners
+
+  Some virus scanners interfere with Emacs' use of subprocesses.  If you
+  are unable to use subprocesses and you use Dr. Solomon's WinGuard or
+  McAfee's Vshield, turn off "Scan all files" (WinGuard) or "boot sector
+  scanning" (McAfee exclusion properties).
+
+* Further information
+
+  If you have access to the World Wide Web, I would recommend pointing
+  your favorite web browser to following the document (if you haven't
+  already):
+
+	http://www.gnu.org/software/emacs/windows/ntemacs.html
+
+  This document serves as an FAQ and a source for further information
+  about the Windows port and related software packages.
+
+  In addition to the FAQ, there is a mailing list for discussing issues
+  related to the Windows port of Emacs.  The name of the list is
+  "ntemacs-users@cs.washington.edu".  For information about the list,
+  send a message to "ntemacs-users-request@cs.washington.edu" with the
+  word "info" in the body of the message.  To subscribe to the list,
+  send a message to the same address with the word "subscribe" in the
+  body of the message; similarly, to unsubscribe from the list, send a
+  message with the word "unsubscribe" in the message body.
+
+  Another valuable source of information and help which should not be
+  overlooked is the various Usenet news groups dedicated to Emacs.
+  These are particuarly good for help with general issues which aren't
+  specific to the Windows port of Emacs.  The main news groups to use
+  for seeking help are:
+
+	gnu.emacs.help
+	comp.emacs
+
+  There are also fairly regular postings and announcements of new or
+  updated Emacs packages on this group:
+
+	gnu.emacs.sources
+
+* Reporting bugs
+
+  If you encounter a bug in this port of Emacs, we would like to hear
+  about it.  First check the FAQ on the web page above to see if the bug
+  is already known and if there are any workarounds.  Then check whether
+  the bug has something to do with code in your .emacs file, e.g. by
+  invoking Emacs with the "-q --no-site-file" options.
+
+  If you decide that it is a bug in Emacs that might be specific to the
+  Windows port, send a message to the ntemacs-users@cs.washington.edu
+  mailing list describing the bug, the version of Emacs that you are
+  using, and the operating system that you are running on (Windows NT,
+  2000, 95 or 98 including service pack level if known).  If the bug is
+  related to subprocesses, also specify which shell you are using (e.g.,
+  include the values of `shell-file-name' and `shell-explicit-file-name'
+  in your message).
+
+  If you think the bug is not specific to the Windows port of Emacs,
+  then it is better to mail the bug report to bug-gnu-emacs@gnu.org so
+  that it will be seen by the right people.  If Emacs has been set up to
+  send mail, you can use the command M-x report-emacs-bug to create and
+  send the bug report, but in some cases there is a function to report
+  bugs in a specific package; e.g. M-x gnus-bug for Gnus, M-x
+  c-submit-bug-report for C/C++/Java mode, etc.
+
+  Enjoy.
+
+  Andrew Innes
+  (andrewi@gnu.org)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/admin/nt/dump.bat	Wed Aug 29 13:58:01 2001 +0000
@@ -0,0 +1,21 @@
+@echo off
+rem  Run temacs.exe to recreate the dumped emacs.exe.
+rem  This is only likely to be useful on systems where the prebuilt
+rem  emacs.exe crashes on startup.
+
+rem First save original emacs.exe if present
+if exist emacs.exe.orig goto dump
+echo Saving original emacs.exe as emacs.exe.orig
+ren emacs.exe emacs.exe.orig
+
+:dump
+rem Overwrites emacs.exe if still present
+mkdir ..\lib-src
+copy fns* ..\lib-src
+mkdir obj
+mkdir obj\i386
+mkdir obj\etc
+copy ..\etc\DOC* obj\etc
+copy temacs.exe obj\i386
+obj\i386\temacs -batch -l loadup dump
+copy obj\i386\emacs.exe .
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/admin/nt/makedist.bat	Wed Aug 29 13:58:01 2001 +0000
@@ -0,0 +1,122 @@
+@echo off
+
+set TAR=wtar
+
+rem Make a copy of current Emacs source
+if (%3) == () goto usage
+if not (%4) == () goto %4
+if not (%4) == (src) goto :lisp
+
+:src
+
+echo Create full source distribution, excluding leim
+%TAR%  --exclude leim --exclude _marker --exclude DOC --exclude DOC-X --exclude TAGS --exclude bin --exclude obj --exclude obj-spd --exclude oo --exclude oo-spd --exclude *~ --exclude *.rej -cvf - emacs-%1 | gzip -9 > %2-src.tar.gz
+if not (%4) == () goto end
+
+:lisp
+echo Create limited elisp source distribution
+%TAR% --exclude *.rej --exclude *.elc --exclude *~ -cvf - emacs-%1/lisp | gzip -9 > %2-lisp.tar.gz
+if not (%4) == () goto end
+
+:bin
+
+set eld=emacs-%1/lisp
+
+rem Keep this list in sync with the DONTCOMPILE list in lisp/Makefile.in
+
+set elfiles=%eld%/cus-load.el %eld%/cus-start.el %eld%/emacs-lisp/cl-specs.el %eld%/eshell/esh-maint.el %eld%/eshell/esh-groups.el %eld%/finder-inf.el %eld%/forms-d2.el %eld%/forms-pass.el %eld%/generic-x.el %eld%/international/latin-1.el %eld%/international/latin-2.el %eld%/international/latin-3.el %eld%/international/latin-4.el %eld%/international/latin-5.el %eld%/international/latin-8.el %eld%/international/latin-9.el %eld%/international/mule-conf.el %eld%/loaddefs.el %eld%/loadup.el %eld%/mail/blessmail.el %eld%/patcomp.el %eld%/paths.el %eld%/play/bruce.el %eld%/subdirs.el %eld%/term/internal.el %eld%/term/AT386.el  %eld%/term/apollo.el %eld%/term/bobcat.el %eld%/term/iris-ansi.el %eld%/term/keyswap.el %eld%/term/linux.el %eld%/term/lk201.el %eld%/term/news.el %eld%/term/vt102.el %eld%/term/vt125.el %eld%/term/vt200.el %eld%/term/vt201.el %eld%/term/vt220.el %eld%/term/vt240.el %eld%/term/vt300.el %eld%/term/vt320.el %eld%/term/vt400.el %eld%/term/vt420.el %eld%/term/wyse50.el %eld%/term/xterm.el %eld%/version.el
+
+rem set term_elfiles=%eld%/term/AT386.el %eld%/term/apollo.el %eld%/term/bg-mouse.el %eld%/term/bobcat.el %eld%/term/internal.el %eld%/term/iris-ansi.el %eld%/term/keyswap.el %eld%/term/linux.el %eld%/term/lk201.el %eld%/term/news.el %eld%/term/pc-win.el %eld%/term/sun-mouse.el %eld%/term/sun.el %eld%/term/sup-mouse.el %eld%/term/tvi970.el %eld%/term/vt100.el %eld%/term/vt102.el %eld%/term/vt125.el %eld%/term/vt200.el %eld%/term/vt201.el %eld%/term/vt220.el %eld%/term/vt240.el %eld%/term/vt300.el %eld%/term/vt320.el %eld%/term/vt400.el %eld%/term/vt420.el %eld%/term/w32-win.el %eld%/term/wyse50.el %eld%/term/x-win.el %eld%/term/xterm.el
+
+rem set elcfiles=%eld%/*.elc %eld%/emacs-lisp/*.elc %eld%/emulation/*.elc %eld%/gnus/*.elc %eld%/international/*.elc %eld%/language/*.elc %eld%/mail/*.elc %eld%/play/*.elc %eld%/progmodes/*.elc %eld%/term/*.elc %eld%/textmodes/*.elc
+
+set fns_el=
+for %%f in (emacs-%1/bin/fns*) do set fns_el=%fns_el% emacs-%1/bin/%%f
+
+echo Create bin distribution
+copy %3\README.W32 emacs-%1\README.W32
+
+rem %TAR% --exclude temacs.exe --exclude emacs.mdp --exclude *.pdb
+rem --exclude *.opt --exclude *.el --exclude *~ -cvf - emacs-%1/BUGS
+rem emacs-%1/GETTING.GNU.SOFTWARE emacs-%1/README emacs-%1/README.W32
+rem emacs-%1/bin %fns_el% emacs-%1/etc emacs-%1/info emacs-%1/lisp %elfiles%
+rem %term_elfiles% emacs-%1/lock emacs-%1/site-lisp -cvf - | gzip -9 > %2-bin-i386.tar.gz
+
+del #files#
+for %%f in (emacs-%1/BUGS emacs-%1/GETTING.GNU.SOFTWARE emacs-%1/README emacs-%1/README.W32) do echo %%f>>#files#
+for %%f in (emacs-%1/bin/fns*) do echo emacs-%1/bin/%%f>>#files#
+for %%f in (emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp %elfiles%) do echo %%f>>#files#
+for %%f in (%eld%/term/*.el) do echo %eld%/term/%%f>>#files#
+for %%f in (emacs-%1/lock emacs-%1/site-lisp) do echo %%f>>#files#
+%TAR% --exclude temacs.exe --exclude emacs.mdp --exclude *.pdb --exclude *.opt --exclude *.el --exclude *~ -T #files# -cvf - | gzip -9 > %2-bin-i386.tar.gz
+del emacs-%1\README.W32
+del #files#
+if not (%4) == () goto end
+
+:fullbin
+
+echo Create full bin distribution
+copy %3\README.W32 emacs-%1\README.W32
+
+%TAR% --exclude temacs.exe --exclude emacs.mdp --exclude *.pdb --exclude *.opt --exclude *~ -cvf - emacs-%1/BUGS emacs-%1/GETTING.GNU.SOFTWARE emacs-%1/README emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp emacs-%1/lock emacs-%1/site-lisp | gzip -9 > %2-fullbin-i386.tar.gz
+del emacs-%1\README.W32
+if not (%4) == () goto end
+
+:leim
+
+echo Create archive with precompiled leim files
+%TAR% -cvf - emacs-%1/leim/leim-list.el emacs-%1/leim/quail emacs-%1/leim/ja-dic | gzip -9 > %2-leim.tar.gz
+if not (%4) == () goto end
+
+:undumped
+
+echo Create archive with extra files needed for redumping emacs
+copy %3\README-UNDUMP.W32 emacs-%1\README-UNDUMP.W32
+copy %3\dump.bat emacs-%1\bin
+if exist emacs-%1\src\obj-spd\i386\temacs.exe copy emacs-%1\src\obj-spd\i386\temacs.exe emacs-%1\bin
+if exist emacs-%1\src\oo-spd\i386\temacs.exe copy emacs-%1\src\oo-spd\i386\temacs.exe emacs-%1\bin
+%TAR% -cvf - emacs-%1/README-UNDUMP.W32 emacs-%1/bin/dump.bat emacs-%1/bin/temacs.exe | gzip -9 > %2-undumped-i386.tar.gz
+del emacs-%1\bin\temacs.exe
+del emacs-%1\bin\dump.bat
+del emacs-%1\README-UNDUMP.W32
+if not (%4) == () goto end
+
+:barebin
+
+echo Create archive with just the basic binaries and generated files
+echo (the user needs to unpack the full source distribution for
+echo  everything else)
+copy %3\README.W32 emacs-%1\README.W32
+%TAR% -cvf - emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc/DOC emacs-%1/etc/DOC-X | gzip -9 > %2-barebin-i386.tar.gz
+del emacs-%1\README.W32
+if not (%4) == () goto end
+
+goto end
+
+rem Only do this if explicitly requested
+:zipfiles
+
+echo Create zip files for bin and lisp archives
+mkdir distrib
+cd distrib
+gunzip -c ..\%2-bin-i386.tar.gz | %TAR% xf -
+zip -rp9 em%5_bin %2
+rm -rf %2
+zipsplit -n 1400000 -b .. em%5_bin.zip
+del em%5_bin.zip
+gunzip -c ..\%2-lisp.tar.gz | %TAR% xf -
+zip -rp9 em%5_lis %2
+rm -rf %2
+zipsplit -n 1400000 -b .. em%5_lis.zip
+del em%5_lis.zip
+cd ..
+
+goto end
+
+:usage
+echo Generate source and binary distributions of emacs.
+echo Usage: %0 emacs-version dist-basename distfiles [lisp,bin,undumped,barebin]
+echo   (e.g., %0 19.34 emacs-19.34.5 d:\andrewi\distfiles)
+echo Or: %0 emacs-version dist-basename distfiles "zipfiles" short-version
+echo   (e.g., %0 20.6 emacs-20.6 d:\andrewi\distfiles zipfiles 206)
+:end