## And package them up
os.chdir(directory)
print("Zipping: {}".format(arch))
- check_output_maybe("zip -9r ../../emacs-{}-{}-deps.zip *"
- .format(EMACS_MAJOR_VERSION, arch),
+ check_output_maybe("zip -9r ../../emacs-{}-{}{}-deps.zip *"
+ .format(EMACS_MAJOR_VERSION, DATE, arch),
shell=True)
os.chdir("../../")
p.map(download_source,to_download)
print("Zipping")
- check_output_maybe("zip -9 ../emacs-{}-deps-mingw-w64-src.zip *"
- .format(EMACS_MAJOR_VERSION),
+ check_output_maybe("zip -9 ../emacs-{}-{}deps-mingw-w64-src.zip *"
+ .format(EMACS_MAJOR_VERSION,DATE),
shell=True)
os.chdir("..")
parser = argparse.ArgumentParser()
+parser.add_argument("-s", help="snapshot build",
+ action="store_true")
+
parser.add_argument("-t", help="32 bit deps only",
action="store_true")
parser.add_argument("-f", help="64 bit deps only",
action="store_true")
-parser.add_argument("-s", help="source code only",
+parser.add_argument("-r", help="source code only",
action="store_true")
parser.add_argument("-c", help="clean only",
action="store_true")
args = parser.parse_args()
-do_all=not (args.c or args.s or args.f or args.t)
+do_all=not (args.c or args.r or args.f or args.t)
deps=extract_deps()
DRY_RUN=args.d
+if args.s:
+ DATE="{}-".format(check_output(["date", "+%Y-%m-%d"]).decode("utf-8").strip())
+else:
+ DATE=""
+
if( do_all or args.t ):
gather_deps(deps,"i686","mingw32")
if( do_all or args.f ):
gather_deps(deps,"x86_64","mingw64")
-if( do_all or args.s ):
+if( do_all or args.r ):
gather_source(deps)
if( args.c ):
function git_up {
- echo Making git worktree for Emacs $VERSION
+ echo [build] Making git worktree for Emacs $VERSION
cd $HOME/emacs-build/git/emacs-$MAJOR_VERSION
git pull
git worktree add ../$BRANCH $BRANCH
PKG=$2
HOST=$3
- echo Building Emacs-$VERSION for $ARCH
+ echo [build] Building Emacs-$VERSION for $ARCH
if [ $ARCH == "i686" ]
then
PATH=/mingw32/bin:$PATH
## time that is not always needed
if (($CONFIG))
then
- ../../../git/$BRANCH/configure \
- --without-dbus \
- --host=$HOST --without-compress-install \
- $CACHE \
- CFLAGS="-O2 -static -g3"
+ echo [build] Configuring Emacs $ARCH
+ ../../../git/$BRANCH/configure \
+ --without-dbus \
+ --host=$HOST --without-compress-install \
+ $CACHE \
+ CFLAGS="-O2 -static -g3"
fi
make -j 16 install \
zip -r -9 emacs-$OF_VERSION-$ARCH-no-deps.zip *
mv emacs-$OF_VERSION-$ARCH-no-deps.zip $HOME/emacs-upload
rm bin/libXpm-noX4.dll
- unzip $HOME/emacs-build/deps/emacs-$MAJOR_VERSION-$ARCH-deps.zip
+
+ if [ -z $SNAPSHOT ];
+ then
+ DEPS_FILE=$HOME/emacs-build/deps/emacs-$MAJOR_VERSION-$ARCH-deps.zip
+ else
+ ## Pick the most recent snapshot whatever that is
+ DEPS_FILE=`ls $HOME/emacs-build/deps/emacs-$MAJOR_VERSION-*-$ARCH-deps.zip | tail -n 1`
+ fi
+
+ echo [build] Using $DEPS_FILE
+ unzip $DEPS_FILE
+
zip -r -9 emacs-$OF_VERSION-$ARCH.zip *
mv emacs-$OF_VERSION-$ARCH.zip ~/emacs-upload
}
function build_installer {
ARCH=$1
cd $HOME/emacs-build/install/emacs-$VERSION
- echo Calling makensis in `pwd`
+ echo [build] Calling makensis in `pwd`
cp ../../git/$BRANCH/admin/nt/dist-build/emacs.nsi .
makensis -v4 \
if [ -z $VERSION ];
then
- echo Cannot determine Emacs version
+ echo [build] Cannot determine Emacs version
exit 1
fi
MAJOR_VERSION="$(echo $VERSION | cut -d'.' -f1)"
+## ACTUAL VERSION is the version declared by emacs
ACTUAL_VERSION=$VERSION
+
+## VERSION includes the word snapshot if necessary
VERSION=$VERSION$SNAPSHOT
+
+## OF version includes the date if we have a snapshot
OF_VERSION=$VERSION
if [ -z $SNAPSHOT ];