annotate build-msw-release.sh @ 1924:6f59299e3cb7

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