User: vins
Date: 06/03/14 02:45:28
Added: xemacs-builds/acs MakeNativeXEmacs getPkgs
mk-XEmacsWindowsKit unpack.cmd
Log:
Added my build scripts for a Windows setup kit.
Revision Changes Path
1.1 XEmacs/xemacs-builds/acs/MakeNativeXEmacs
Index: MakeNativeXEmacs
===================================================================
#!/bin/sh
# Build a Windows-native version of XEmacs.
# Usage: MakeNativeXEmacs [-h] [--with-mule] [--without-mule] [--with-debug]
[--without-debug] [--package-path=path] [--install-path=path] [--install]
<21.4|21.5>
#
# Assumptions:
# 1) There is a CVS hierarchy rooted at ~/cvsroot for whatever
# XEmacs version is specified. (See CVS_BASE.)
# 2) Cygwin is installed on the build machine, including makeinfo, perl,
# cvs, tar and probably other stuff, too.
# 3) Optional library sources are in /usr/local/src. (See LIB_DIR.)
# 4) zlib is in /usr/local/src/zlib (See ZLIB_VER.)
# 5) tiff is installed in /usr/local/src/tiff-3.7.3 (See TIFF_VER.)
# 6) Visual Studio is installed in E:/Program Files/Microsoft Visual Studio
# (See VC_ROOT.)
# Execute this script under the Z shell
[ ! -n "$ZSH_VERSION" ] && exec zsh -f "$0"
${1+"$@"}
cmdname="${0:t}"
# Set up a vanilla zsh environment
emulate zsh
# Things to customize
: ${CVS_BASE:=~/cvsroot}
: ${LIB_DIR:=/usr/local/src}
: ${ZLIB_VER:=zlib}
: ${TIFF_VER:=tiff-3.7.3}
# Visual Studio
: ${VC_ROOT:="E:/Program Files/Microsoft Visual Studio"}
: ${INCLUDE:="$VC_ROOT/VC98/include"}
: ${LIB:="$VC_ROOT/VC98/lib"}
cyg_VC_ROOT=$(cygpath $VC_ROOT)
typeset -U PATH
PATH="$cyg_VC_ROOT/Common/Tools/WinNT:$cyg_VC_ROOT/Common/MSDev98/bin:$cyg_VC_ROOT/Common/Tools:$cyg_VC_ROOT/VC98/bin:$PATH"
export INCLUDE LIB PATH
mule=
debug=
package_dir=
install_dir=
install=0
XEMACS_VER=
# Parse options
while (( $# > 0 )); do
case $1 in
(-h|--help)
print -u2 "usage: $cmdname [-h|--help] [--with-mule] [--without-mule]
[--with-debug] [--without-debug] [--package-root=dir] [--install-root=dir] [--install]
<21.4|21.5>
-h|--help print this help message and exit
--with-mule turn on MULE support
--without-mule turn off MULE support
--with-debug turn on debugging
--without-debug turn off debugging
--package-root=dir specify directory for root of installed
packages
--install-root=dir specify installation directory
--install install the executable
21.4 build a 21.4 XEmacs kit from CVS
21.5 build a 21.5 XEmacs kit from CVS"
return 0
;;
(--with-mule)
mule=1
;;
(--without-mule)
mule=0
;;
(--with-debug)
debug=1
;;
(--without-debug)
debug=0
;;
(--package-root=*)
package_dir=${1#--package-root=}
;;
(--install-root=*)
install_dir=${1#--install-root=}
;;
(--install)
install=1
;;
(-*)
print -u2 "$cmdname: unknown argument: \"$arg\""
return 1
;;
(*)
if [[ $1 == 21.4 || $1 == 21.5 ]]; then
XEMACS_VER=$1
else
print -u2 "$cmdname: Only XEmacs 21.4 and XEmacs 21.5 are currently
supported"
return 1
fi
;;
esac
shift
done
# Update to latest CVS sources
cd $CVS_BASE/xemacs-$XEMACS_VER
if (( $? != 0 )); then
print -u2 "$cmdname: CVS tree for XEmacs-$XEMACS_VER not found at
$CVS_BASE/xemacs-$XEMACS_VER"
return 1
fi
cvs -q update
cd - >/dev/null
# Make a local copy of the source tree
: ${VERSION:=$(date +'%Y-%m-%d')}
mkdir xemacs-$XEMACS_VER-$VERSION
cd xemacs-$XEMACS_VER-$VERSION
tar cf - -C $CVS_BASE/xemacs-$XEMACS_VER --exclude CVS . | tar xf -
# Configure the sources
cd nt
unset HOME # Don't pick up my emacs customizations
# Configure for optional packages
CYGROOT=$(cygpath -m /)
perl -pi -e "s@^OPTIONAL_LIBRARY_DIR=.*(a)OPTIONAL_LIBRARY_DIR=$CYGROOT$LIB_DIR@;
s@^ZLIB_DIR=.*(a)ZLIB_DIR=\\\$(OPTIONAL_LIBRARY_DIR)/$ZLIB_VER@;
s@^TIFF_DIR=.*(a)TIFF_DIR=\\\$(OPTIONAL_LIBRARY_DIR)/$TIFF_VER@;
s@^HAVE_XFACE=.*(a)HAVE_XFACE=0@;
s@^MAKEINFO=.*@MAKEINFO=$CYGROOT/bin/makeinfo.exe(a)" < config.inc.samp
>config.inc
# Change installation directory if requested
[[ -n $install_dir ]] && perl -pi -e
"s@^INSTALL_DIR=.*@INSTALL_DIR=$install_dir/XEmacs-\\\$(XEMACS_VERSION_STRING)(a)"
config.inc
# Configure debugging if requested
[[ -n $debug ]] && perl -pi -e "s@^DEBUG_XEMACS=.*@DEBUG_XEMACS=$debug(a)"
config.inc
# Configure MULE if requested (only for 21.5)
[[ -n $mule ]] && perl -pi -e "s@^MULE=.*@MULE=$mule(a)" config.inc
# Configure package path if requested
if [[ -n $package_dir ]] && perl -pi -e
"s@^#PACKAGE_PREFIX=.*@PACKAGE_PREFIX=$package_dir(a)" config.inc
# Build and install XEmacs
nmake -f xemacs.mak
(( install )) && nmake -f xemacs.mak install
# Local Variables:
# mode: ksh
# sh-indentation: 2
# indent-tabs-mode: nil
# End:
1.1 XEmacs/xemacs-builds/acs/getPkgs
Index: getPkgs
===================================================================
#!/bin/sh
# Download all the packages needed for the XEmacs setup kits
# Execute this script under the Z shell
[ ! -n "$ZSH_VERSION" ] && exec zsh -f "$0"
${1+"$@"}
emulate zsh
setopt nonomatch extendedglob
: ${ftpsite:=ftp://ftp.xemacs.org/pub/xemacs/packages}
: ${expsite:=ftp://ftp.xemacs.org/pub/xemacs/beta/experimental/packages}
default_pkgs="auctex
bbdb
c-support
calc
cc-mode
debug
dired
ecb
ecrypto
edebug
ediff
edit-utils
efs
eieio
elib
emerge
eshell
footnote
fortran-modes
fsf-compat
gnus
hm--html-menus
ibuffer
igrep
ispell
jde
latin-euro-standards
latin-unity
locale
lookup
mail-lib
mailcrypt
mh-e
mmm-mode
mule-base
net-utils
os-utils
pc
pcl-cvs
pcomplete
perl-modes
prog-modes
ps-print
psgml
python-modes
re-builder
reftex
ruby-modes
sasl
scheme
semantic
sgml
sh-script
sieve
sounds-wav
speedbar
supercite
texinfo
text-modes
textools
time
tramp
vc
vhdl
viper
vm
w3
x-symbol
xemacs-base
xemacs-devel
xetla
xslide
xslt-process"
: ${pkglist:=$default_pkgs}
for f in ${=pkglist}; do
wget -q "$expsite/${f}*"
# I can't seem to get this:
# if [[ -e ${f}-*-pkg.tar.gz ]]; then
# to work, so use `ls' instead
if ls ${f}-*-pkg.tar.gz >& /dev/null ; then
print "$(ls ${f}-*-pkg.tar.gz) (experimental)"
else
wget -q "$ftpsite/${f}-*-pkg.tar.gz"
print "$(ls ${f}-*-pkg.tar.gz)"
fi
done
# Uncompress all the package tarfiles
gunzip *-pkg.tar.gz
# Get newest package index
wget -q $expsite/package-index.LATEST.gpg
[[ ! -e package-index.LATEST.gpg ]] && wget -q $ftpsite/package-index.LATEST.gpg
# Local Variables:
# mode: ksh
# sh-indentation: 2
# indent-tabs-mode: nil
# End:
1.1 XEmacs/xemacs-builds/acs/mk-XEmacsWindowsKit
Index: mk-XEmacsWindowsKit
===================================================================
#!/bin/sh
# Build native setup kits for XEmacs under Windows.
# usage: mk-XEmacsWindowsKit [-p] [21.4.xx] [21.5-xx]
# Assumptions:
# 1. I do not expect that this script will work for you right out of the box,
# but perhaps with a small amount of tuning it will function in your setup.
# 2. Cygwin is installed on the build system.
# 3. InnoSetup is installed in e:/Program Files/Inno Setup 5 and the
# pre-processor has been installed, too
# (see
http://www.jrsoftware.org/isdl.php#qsp for more details and
#
http://files.jrsoftware.org/ispack/ispack-5.1.6.exe for the setup kit).
# Execute this script under the Z shell
[ ! -n "$ZSH_VERSION" ] && exec zsh -f "$0"
${1+"$@"}
cmdname="${0:t}"
# Set up a vanilla zsh environment
emulate zsh
# Things to customize for your system
: ${InnoSetup:="/cygdrive/e/Program Files/Inno Setup 5/iscc"}
# Update all the packages (delete them first)
PACKAGE_DIR=$(cygpath --mixed $PWD/packages)
if [[ $1 == '-p' ]]; then
shift
rm -rf $PACKAGE_DIR
mkdir $PACKAGE_DIR
cd $PACKAGE_DIR
../getPkgs
cd -
fi
# Give both versions a consistent datestamp
export VERSION=$(date +'%Y-%m-%d')
INSTALL_DIR=$(cygpath --mixed $PWD/installed)
# If no arguments were supplied, build latest versions of 21.4 and 21.5
(( $# == 0 )) && set 21.4.19 21.5-b25
# Loop over the versions specified on the command line
for ver in $*; do
case $ver in
(21.4*)
branch=21.4
branch_options="--without-debug"
kit_options=
;;
(21.5*)
branch=21.5
branch_options="--with-mule"
kit_options="/dMULE"
;;
(*)
print -u2 "$cmdname: unknown version specified: \"$ver\"."
continue
;;
esac
# Make and install the executables
./MakeNativeXEmacs --install --install-root=$INSTALL_DIR $branch_options $branch
# Run the Inno Setup compiler to make the kit
$InnoSetup XEmacs.iss /dExecSrc=$INSTALL_DIR /dPkgSrc=$PACKAGE_DIR /dXEmacsVersion=$ver
$kit_options
done
# Local Variables:
# mode: ksh
# sh-indentation: 2
# indent-tabs-mode: nil
# End:
1.1 XEmacs/xemacs-builds/acs/unpack.cmd
Index: unpack.cmd
===================================================================
if exist ..\mule-packages\nul (
chdir ..\mule-packages
for %%f in (*-pkg.tar) do ..\xemacs-packages\minitar.exe %%f
del *-pkg.tar
chdir ..\xemacs-packages
)
for %%f in (*-pkg.tar) do .\minitar.exe %%f
del *-pkg.tar
del minitar.exe
del unpack.cmd