annotate build-msw-release.sh @ 830:20baef34a0b0

[xemacs-hg @ 2002-05-07 16:13:59 by stephent] fix tab escape <87adrcueez.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Tue, 07 May 2002 16:14:04 +0000
parents 512e4a478e9d
children 5b3cf2203477
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}
708
512e4a478e9d [xemacs-hg @ 2001-12-20 06:08:09 by andyp]
andyp
parents: 674
diff changeset
32 cygwin_tarball=xemacs-i686-pc-cygwin-${emacs_ver}${emacs_kit_version}.tar.gz
512e4a478e9d [xemacs-hg @ 2001-12-20 06:08:09 by andyp]
andyp
parents: 674
diff changeset
33 win32_tarball=xemacs-i586-pc-win32-${emacs_ver}${emacs_kit_version}.tar.gz
674
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 DISTDIR=`pwd`/windows
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
36
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
37 # check to see if we should build
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
38 if test "$BUILD" = "1"
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
39 then
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 echo "Building the mswindows ${emacs_ver} release"
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
42
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
43 # cleanup everything first
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
44 if [ -f Makefile ] ; then
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
45 make distclean
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
46 fi
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
47
708
512e4a478e9d [xemacs-hg @ 2001-12-20 06:08:09 by andyp]
andyp
parents: 674
diff changeset
48 # nuke the dist dir.
512e4a478e9d [xemacs-hg @ 2001-12-20 06:08:09 by andyp]
andyp
parents: 674
diff changeset
49 rm -rf windows
512e4a478e9d [xemacs-hg @ 2001-12-20 06:08:09 by andyp]
andyp
parents: 674
diff changeset
50
512e4a478e9d [xemacs-hg @ 2001-12-20 06:08:09 by andyp]
andyp
parents: 674
diff changeset
51 # create a dist directory
512e4a478e9d [xemacs-hg @ 2001-12-20 06:08:09 by andyp]
andyp
parents: 674
diff changeset
52 mkdir -p windows/cygwin32
512e4a478e9d [xemacs-hg @ 2001-12-20 06:08:09 by andyp]
andyp
parents: 674
diff changeset
53 mkdir -p windows/win32
512e4a478e9d [xemacs-hg @ 2001-12-20 06:08:09 by andyp]
andyp
parents: 674
diff changeset
54 mkdir -p /usr/local
512e4a478e9d [xemacs-hg @ 2001-12-20 06:08:09 by andyp]
andyp
parents: 674
diff changeset
55
674
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
56 # first build win32
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
57 (cd nt;
708
512e4a478e9d [xemacs-hg @ 2001-12-20 06:08:09 by andyp]
andyp
parents: 674
diff changeset
58 nmake -f xemacs.mak clean;
674
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
59 nmake -f xemacs.mak)
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
60 (cd "${PROGRAM_FILES}";
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
61 rm -rf ./XEmacs-${emacs_ver})
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
62 (cd nt;
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
63 nmake -f xemacs.mak install;
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
64 nmake -f xemacs.mak clean)
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
65
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
66 # now build cygwin
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
67 ./configure --with-dragndrop --with-postgresql=no --with-x=no \
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
68 --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
69 --with-ipv6-cname=no --with-netinstall
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
70 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
71
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
72 # deal with the netinstaller
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
73 (cd netinstall;
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
74 strip setup.exe)
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
75 cp netinstall/setup.exe windows
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
76
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
77 # the win32 tar ball needs setup.exe
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
78 cp netinstall/setup.exe \
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
79 "${PROGRAM_FILES}"/XEmacs-${emacs_ver}/i586-pc-win32
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 win32 tarball
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
82 (cd "${PROGRAM_FILES}";
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
83 tar czvf ${DISTDIR}/win32/${win32_tarball} \
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
84 ./XEmacs-${emacs_ver})
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
85
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
86 # make the tarball
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
87 make install
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
88 (cd /usr/local;
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
89 tar czvf ${DISTDIR}/cygwin32/${cygwin_tarball} \
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
90 ./bin/i686-pc-cygwin \
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
91 ./lib/xemacs-${emacs_ver} \
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
92 ./lib/xemacs/lock \
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
93 ./man/man1/ctags.1 \
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
94 ./man/man1/etags.1 \
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
95 ./man/man1/gnuattach.1 \
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
96 ./man/man1/gnuclient.1 \
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
97 ./man/man1/gnudoit.1 \
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
98 ./man/man1/gnuserv.1 \
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
99 ./man/man1/xemacs.1)
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
100
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
101 # figure out the ini file.
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
102 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
103 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
104
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
105 (cd netinstall;
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
106 make CYGWIN_SIZE=${cygwin_tarball_size} \
708
512e4a478e9d [xemacs-hg @ 2001-12-20 06:08:09 by andyp]
andyp
parents: 674
diff changeset
107 WIN32_SIZE=${win32_tarball_size} \
512e4a478e9d [xemacs-hg @ 2001-12-20 06:08:09 by andyp]
andyp
parents: 674
diff changeset
108 KIT_VERSION=${emacs_kit_version} setup-bin.ini )
674
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
109 cp netinstall/setup-bin.ini windows
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 # tidy up
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
112 make distclean
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
113
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
114 fi
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
115 # end of build
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
116
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
117 # optionally install to the ftp site
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
118 if test "$INSTALL" != ""
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
119 then
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
120 echo "Installing the mswindows ${emacs_ver} release"
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
121 scp -r -oUser=slb -oProtocol=1 windows/* \
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
122 ftp.xemacs.org:/pub/xemacs/windows
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
123 # update setup.ini
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
124 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
125 fi
a05e8cd20cce [xemacs-hg @ 2001-10-30 05:21:58 by andyp]
andyp
parents:
diff changeset
126