Hi Patrick,
Patrick Gundlach schrieb:
Hi,
is there any instruction on how to compile luatex for windows? What
software do I need?
you only need MingW and MSYS
http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/MinGW%205.1.4/MinGW-5.1.4.exe/download
http://sourceforge.net/projects/mingw/files/MSYS%20Base%20System/Current%20Release_%20MSYS-1.0.11/MSYS-1.0.11.exe/download
See
http://www.mingw.org/wiki/MSYS
for installation instructions. You need to install the following
components (can be selected during the MingW installation):
w32api=w32api-3.13-mingw32-dev.tar.gz
binutils=binutils-2.19.1-mingw32-bin.tar.gz
core=gcc-core-3.4.5-20060117-3.tar.gz
gpp=gcc-g++-3.4.5-20060117-3.tar.gz
After installation start MSYS, change to the luatex directory and modify
the 'build.sh' file. I have attached my current version, where I'm still
trying to optimize the cpu load; too many parallel makes are problematic
here somehow (signals). Anyhow, the only necessary part is
'LUATEXEXE=luatex.exe', otherwise no striping is possible. Just enter
'./build.sh' (first try without --parallel) and cross the fingers...
Best wishes, Peter
No pointer to a binary, please.
Patrick
#!/usr/bin/env bash
#
# Public Domain
#
# new script to build luatex binaries
# ----------
# Options:
# --make : only make, no make distclean; configure
# --parallel : make -j 2 -l 3.0
# --nostrip : do not strip binary
# --mingw : crosscompile for mingw32 from i-386linux
# --ppc : crosscompile for ppc
# try to find gnu make; we may need it
MAKE=make;
if make -v 2>&1| grep "GNU Make" >/dev/null
then
echo "Your make is a GNU-make; I will use that"
elif gmake -v >/dev/null 2>&1
then
MAKE=gmake;
echo "You have a GNU-make installed as gmake; I will use that"
else
echo "I can't find a GNU-make; I'll try to use make and hope that works."
echo "If it doesn't, please install GNU-make."
fi
ONLY_MAKE=FALSE
STRIP_LUATEX=TRUE
MINGWCROSS=FALSE
PPCCROSS=FALSE
if [ `uname|awk -F- '{print $1}'` = "MINGW32_NT" ];
then
JOBS_IF_PARALLEL=env |grep NUMBER_OF_PROCESSORS|awk -F= '{print $2}'
MAX_LOAD_IF_PARALLEL=env |grep NUMBER_OF_PROCESSORS|awk -F= '{print $2}' ;
LUATEXEXE=luatex.exe
else
JOBS_IF_PARALLEL=2 # TODO
MAX_LOAD_IF_PARALLEL=3.0
LUATEXEXE=luatex
fi;
CFLAGS="$CFLAGS -Wdeclaration-after-statement"
while [ "$1" != "" ] ; do
if [ "$1" = "--make" ] ;
then ONLY_MAKE=TRUE ;
elif [ "$1" = "--nostrip" ] ;
then STRIP_LUATEX=FALSE ;
elif [ "$1" = "--mingw" ] ;
then MINGWCROSS=TRUE ;
elif [ "$1" = "--ppc" ] ;
then PPCCROSS=TRUE ;
elif [ "$1" = "--parallel" ] ;
then MAKE="$MAKE -j $JOBS_IF_PARALLEL -l $MAX_LOAD_IF_PARALLEL" ;
else
echo "ERROR: invalid build.sh parameter: $1"
exit 1
fi ;
shift ;
done
#
STRIP=strip
if [ `uname` = "Darwin" ] ;
then
export MACOSX_DEPLOYMENT_TARGET=10.4
fi;
B=build
CONFHOST=
if [ "$MINGWCROSS" = "TRUE" ]
then
B=build-windows
STRIP=mingw32-strip
LUATEXEXE=luatex.exe
OLDPATH=$PATH
PATH=/usr/mingw32/bin:$PATH
CONFHOST="--host=mingw32 --build=i686-linux-gnu "
fi
if [ "$PPCCROSS" = "TRUE" ]
then
B=ppc
CFLAGS="-arch ppc $CFLAGS"
XCFLAGS="-arch ppc $XCFLAGS"
CXXFLAGS="-arch ppc $CXXFLAGS"
LDFLAGS="-arch ppc $LDFLAGS"
export CFLAGS CXXFLAGS LDFLAGS XCFLAGS
fi
# ----------
# clean up, if needed
if [ -r "$B"/Makefile -a $ONLY_MAKE = "FALSE" ]
then
rm -rf "$B"
elif [ ! -r "$B"/Makefile ]
then
ONLY_MAKE=FALSE
fi
if [ ! -r "$B" ]
then
mkdir "$B"
fi
#
cd "$B"
if [ "$ONLY_MAKE" = "FALSE" ]
then
../source/configure $CONFHOST \
--enable-cxx-runtime-hack \
--disable-afm2pl \
--disable-aleph \
--disable-bibtex \
--disable-bibtex8 \
--disable-cfftot1 \
--disable-cjkutils \
--disable-detex \
--disable-devnag \
--disable-dialog \
--disable-dtl \
--enable-dump-share \
--disable-dvi2tty \
--disable-dvidvi \
--disable-dviljk \
--disable-dvipdfm \
--disable-dvipdfmx \
--disable-dvipos \
--disable-dvipsk \
--disable-gsftopk \
--disable-lacheck \
--disable-lcdf-typetools \
--disable-makeindexk \
--disable-mf \
--disable-mmafm \
--disable-mmpfb \
--disable-musixflx \
--disable-otfinfo \
--disable-otftotfm \
--disable-pdfopen \
--disable-pdftex \
--disable-ps2eps \
--disable-ps2pkm \
--disable-psutils \
--disable-seetexk \
--disable-t1dotlessj \
--disable-t1lint \
--disable-t1rawafm \
--disable-t1reencode \
--disable-t1testpage \
--disable-t1utils \
--disable-tex \
--disable-tex4htk \
--disable-tpic2pdftex \
--disable-ttf2pk \
--disable-ttfdump \
--disable-ttftotype42 \
--disable-vlna \
--disable-web-progs \
--disable-xdv2pdf \
--disable-xdvipdfmx \
--without-system-kpathsea \
--without-system-freetype2 \
--without-system-gd \
--without-system-libpng \
--without-system-teckit \
--without-system-zlib \
--without-system-t1lib \
--disable-shared \
--disable-largefile \
--disable-ipc \
--without-mf-x-toolkit --without-x \
|| exit 1
fi
$MAKE
# go back
cd ..
if [ "$STRIP_LUATEX" = "TRUE" ] ;
then
$STRIP "$B"/texk/web2c/$LUATEXEXE
else
echo "luatex binary not stripped"
fi
if [ "$MINGWCROSS" = "TRUE" ]
then
PATH=$OLDPATH
fi
# show the results
ls -l "$B"/texk/web2c/$LUATEXEXE