3 # This file builds the release kits for both cygwin and win32. You
4 # must have both environments configured for it to work properly. In
5 # particular you must provide a suitable value for NATIVE_ZLIB_DIR.
8 NATIVE_ZLIB_DIR=/usr/local/mingw/lib
9 PROGRAM_FILES='c:/Program Files/XEmacs'
10 # no configuration past this point
19 --install) INSTALL=1;;
20 --installonly) INSTALL=1; BUILD='';;
21 --help) echo "usage: build-msw-release.sh [--install]" && exit;;
23 *) FILES="$FILES $OPT";;
27 # pick up version info
31 emacs_ver=${emacs_major_version}.${emacs_minor_version}.${emacs_beta_version}
32 cygwin_tarball=xemacs-i686-pc-cygwin-${emacs_ver}.tar.gz
33 win32_tarball=xemacs-i586-pc-win32-${emacs_ver}.tar.gz
35 # create a dist directory
36 mkdir -p windows/cygwin32
37 mkdir -p windows/win32
41 # check to see if we should build
42 if test "$BUILD" = "1"
45 echo "Building the mswindows ${emacs_ver} release"
47 # cleanup everything first
48 if [ -f Makefile ] ; then
55 (cd "${PROGRAM_FILES}";
56 rm -rf ./XEmacs-${emacs_ver})
58 nmake -f xemacs.mak install;
59 nmake -f xemacs.mak clean)
62 ./configure --with-dragndrop --with-postgresql=no --with-x=no \
63 --bindir=/usr/local/bin/i686-pc-cygwin --with-site-lisp=yes \
64 --with-ipv6-cname=no --with-netinstall
65 make CFLAGS=-O3 MINGW_ZLIB_DIR=${NATIVE_ZLIB_DIR} beta
67 # deal with the netinstaller
70 cp netinstall/setup.exe windows
72 # the win32 tar ball needs setup.exe
73 cp netinstall/setup.exe \
74 "${PROGRAM_FILES}"/XEmacs-${emacs_ver}/i586-pc-win32
76 # make the win32 tarball
77 (cd "${PROGRAM_FILES}";
78 tar czvf ${DISTDIR}/win32/${win32_tarball} \
79 ./XEmacs-${emacs_ver})
84 tar czvf ${DISTDIR}/cygwin32/${cygwin_tarball} \
85 ./bin/i686-pc-cygwin \
86 ./lib/xemacs-${emacs_ver} \
90 ./man/man1/gnuattach.1 \
91 ./man/man1/gnuclient.1 \
92 ./man/man1/gnudoit.1 \
93 ./man/man1/gnuserv.1 \
96 # figure out the ini file.
97 cygwin_tarball_size=`ls -l windows/cygwin32/${cygwin_tarball} | awk '{ print $5; }'`
98 win32_tarball_size=`ls -l windows/win32/${win32_tarball} | awk '{ print $5; }'`
101 make CYGWIN_SIZE=${cygwin_tarball_size} \
102 WIN32_SIZE=${win32_tarball_size} setup-bin.ini )
103 cp netinstall/setup-bin.ini windows
111 # optionally install to the ftp site
112 if test "$INSTALL" != ""
114 echo "Installing the mswindows ${emacs_ver} release"
115 scp -r -oUser=slb -oProtocol=1 windows/* \
116 ftp.xemacs.org:/pub/xemacs/windows
118 ssh -1 -l slb ftp.xemacs.org 'cd /pub/xemacs/windows; sh makeini.sh'