674
|
1 #!/bin/sh
|
|
2
|
|
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.
|
|
6
|
|
7 # configuration
|
|
8 NATIVE_ZLIB_DIR=/usr/local/mingw/lib
|
|
9 PROGRAM_FILES='c:/Program Files/XEmacs'
|
|
10 # no configuration past this point
|
|
11
|
|
12 INSTALL=
|
|
13 FILES=
|
|
14 BUILD=1
|
|
15
|
|
16 for OPT in $*
|
|
17 do
|
|
18 case $OPT in
|
|
19 --install) INSTALL=1;;
|
|
20 --installonly) INSTALL=1; BUILD='';;
|
|
21 --help) echo "usage: build-msw-release.sh [--install]" && exit;;
|
|
22 --*) ;;
|
|
23 *) FILES="$FILES $OPT";;
|
|
24 esac
|
|
25 done
|
|
26
|
|
27 # pick up version info
|
|
28 . version.sh
|
|
29
|
|
30 # decide on names
|
|
31 emacs_ver=${emacs_major_version}.${emacs_minor_version}.${emacs_beta_version}
|
708
|
32 cygwin_tarball=xemacs-i686-pc-cygwin-${emacs_ver}${emacs_kit_version}.tar.gz
|
|
33 win32_tarball=xemacs-i586-pc-win32-${emacs_ver}${emacs_kit_version}.tar.gz
|
674
|
34
|
|
35 DISTDIR=`pwd`/windows
|
|
36
|
|
37 # check to see if we should build
|
|
38 if test "$BUILD" = "1"
|
|
39 then
|
|
40
|
|
41 echo "Building the mswindows ${emacs_ver} release"
|
|
42
|
|
43 # cleanup everything first
|
|
44 if [ -f Makefile ] ; then
|
|
45 make distclean
|
|
46 fi
|
|
47
|
708
|
48 # nuke the dist dir.
|
|
49 rm -rf windows
|
|
50
|
|
51 # create a dist directory
|
|
52 mkdir -p windows/cygwin32
|
|
53 mkdir -p windows/win32
|
|
54 mkdir -p /usr/local
|
|
55
|
674
|
56 # first build win32
|
|
57 (cd nt;
|
708
|
58 nmake -f xemacs.mak clean;
|
674
|
59 nmake -f xemacs.mak)
|
|
60 (cd "${PROGRAM_FILES}";
|
|
61 rm -rf ./XEmacs-${emacs_ver})
|
|
62 (cd nt;
|
|
63 nmake -f xemacs.mak install;
|
|
64 nmake -f xemacs.mak clean)
|
|
65
|
|
66 # now build cygwin
|
|
67 ./configure --with-dragndrop --with-postgresql=no --with-x=no \
|
|
68 --bindir=/usr/local/bin/i686-pc-cygwin --with-site-lisp=yes \
|
|
69 --with-ipv6-cname=no --with-netinstall
|
|
70 make CFLAGS=-O3 MINGW_ZLIB_DIR=${NATIVE_ZLIB_DIR} beta
|
|
71
|
|
72 # deal with the netinstaller
|
|
73 (cd netinstall;
|
|
74 strip setup.exe)
|
|
75 cp netinstall/setup.exe windows
|
|
76
|
|
77 # the win32 tar ball needs setup.exe
|
|
78 cp netinstall/setup.exe \
|
|
79 "${PROGRAM_FILES}"/XEmacs-${emacs_ver}/i586-pc-win32
|
|
80
|
|
81 # make the win32 tarball
|
|
82 (cd "${PROGRAM_FILES}";
|
|
83 tar czvf ${DISTDIR}/win32/${win32_tarball} \
|
|
84 ./XEmacs-${emacs_ver})
|
|
85
|
|
86 # make the tarball
|
|
87 make install
|
|
88 (cd /usr/local;
|
|
89 tar czvf ${DISTDIR}/cygwin32/${cygwin_tarball} \
|
|
90 ./bin/i686-pc-cygwin \
|
|
91 ./lib/xemacs-${emacs_ver} \
|
|
92 ./lib/xemacs/lock \
|
|
93 ./man/man1/ctags.1 \
|
|
94 ./man/man1/etags.1 \
|
|
95 ./man/man1/gnuattach.1 \
|
|
96 ./man/man1/gnuclient.1 \
|
|
97 ./man/man1/gnudoit.1 \
|
|
98 ./man/man1/gnuserv.1 \
|
|
99 ./man/man1/xemacs.1)
|
|
100
|
|
101 # figure out the ini file.
|
|
102 cygwin_tarball_size=`ls -l windows/cygwin32/${cygwin_tarball} | awk '{ print $5; }'`
|
|
103 win32_tarball_size=`ls -l windows/win32/${win32_tarball} | awk '{ print $5; }'`
|
|
104
|
|
105 (cd netinstall;
|
|
106 make CYGWIN_SIZE=${cygwin_tarball_size} \
|
708
|
107 WIN32_SIZE=${win32_tarball_size} \
|
|
108 KIT_VERSION=${emacs_kit_version} setup-bin.ini )
|
674
|
109 cp netinstall/setup-bin.ini windows
|
|
110
|
|
111 # tidy up
|
|
112 make distclean
|
|
113
|
|
114 fi
|
|
115 # end of build
|
|
116
|
|
117 # optionally install to the ftp site
|
|
118 if test "$INSTALL" != ""
|
|
119 then
|
|
120 echo "Installing the mswindows ${emacs_ver} release"
|
|
121 scp -r -oUser=slb -oProtocol=1 windows/* \
|
|
122 ftp.xemacs.org:/pub/xemacs/windows
|
|
123 # update setup.ini
|
|
124 ssh -1 -l slb ftp.xemacs.org 'cd /pub/xemacs/windows; sh makeini.sh'
|
|
125 fi
|
|
126
|