annotate build-msw-release.sh @ 674:a05e8cd20cce

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