2008-02-28 02:34:43 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
WINLOCAL=/home/jm/H-win/local
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
if [ -z "$1" ]; then
|
|
|
|
echo "build_release <version> [nobin]"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
TMP=tmp.build_release
|
|
|
|
RELDIR=`pwd`/Release
|
|
|
|
VER=$1
|
|
|
|
NOW=`date +%Y-%m-%d`
|
|
|
|
|
|
|
|
echo "Version: $VER - $NOW"
|
|
|
|
|
|
|
|
DATEw=`head -n 3 wpa_supplicant/ChangeLog | tail -n 1 | sed "s/ .*//"`
|
|
|
|
DATEh=`head -n 3 hostapd/ChangeLog | tail -n 1 | sed "s/ .*//"`
|
|
|
|
|
|
|
|
if [ "$DATEw" != "$NOW" -o "$DATEh" != "$NOW" ]; then
|
|
|
|
echo "NOTE! Date mismatch in ChangeLog: wpa_supplicant $DATEw hostapd $DATEh != $NOW"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -r $TMP ]; then
|
|
|
|
echo "Temporary directory '$TMP' exists. Remove it before running this."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir $TMP
|
|
|
|
mkdir -p $RELDIR
|
|
|
|
|
|
|
|
git-archive --format=tar --prefix=wpa-$VER/ HEAD \
|
|
|
|
README COPYING patches src wpa_supplicant hostapd |
|
|
|
|
gzip > $RELDIR/wpa-$VER.tar.gz
|
|
|
|
git-archive --format=tar --prefix=hostapd-$VER/ HEAD \
|
|
|
|
README COPYING patches src hostapd |
|
|
|
|
gzip > $RELDIR/hostapd-$VER.tar.gz
|
|
|
|
git-archive --format=tar --prefix=wpa_supplicant-$VER/ HEAD \
|
|
|
|
README COPYING patches src wpa_supplicant |
|
|
|
|
tar --directory=$TMP -xf -
|
|
|
|
|
|
|
|
cd $TMP
|
|
|
|
make -C wpa_supplicant-$VER/wpa_supplicant/doc/docbook man
|
|
|
|
rm -f wpa_supplicant-$VER/wpa_supplicant/doc/docbook/manpage.{links,refs}
|
|
|
|
tar czf $RELDIR/wpa_supplicant-$VER.tar.gz wpa_supplicant-$VER
|
|
|
|
cd ..
|
|
|
|
rm -r $TMP
|
|
|
|
|
|
|
|
if [ "$2" == "nobin" ]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2008-12-20 16:50:13 +01:00
|
|
|
|
|
|
|
cd $RELDIR
|
2008-02-28 02:34:43 +01:00
|
|
|
|
|
|
|
PDIR=wpa_supplicant-$VER
|
|
|
|
WDIR=wpa_supplicant-windows-bin-$VER
|
|
|
|
tar xzf $PDIR.tar.gz
|
|
|
|
mkdir "$WDIR"
|
|
|
|
cd "$PDIR/wpa_supplicant"
|
|
|
|
cat > .config <<EOF
|
|
|
|
CONFIG_DRIVER_NDIS=y
|
|
|
|
CONFIG_NATIVE_WINDOWS=y
|
|
|
|
|
2008-12-20 16:50:13 +01:00
|
|
|
CC=i586-mingw32msvc-gcc
|
|
|
|
STRIP=i586-mingw32msvc-strip
|
2008-02-28 02:34:43 +01:00
|
|
|
PLATFORMSDKLIB=$WINLOCAL/lib
|
|
|
|
CONFIG_NDIS_EVENTS_INTEGRATED=y
|
|
|
|
|
|
|
|
CFLAGS += -I$WINLOCAL/include
|
|
|
|
LIBS += -L$WINLOCAL/lib
|
|
|
|
LIBS_w += -L$WINLOCAL/lib
|
|
|
|
LIBS_p += -L$WINLOCAL/lib
|
|
|
|
|
|
|
|
CONFIG_EAP_SIM=y
|
|
|
|
CONFIG_EAP_AKA=y
|
2008-11-05 22:02:13 +01:00
|
|
|
CONFIG_USIM_SIMULATOR=y
|
2008-02-28 02:34:43 +01:00
|
|
|
CONFIG_EAP_LEAP=y
|
|
|
|
CONFIG_EAP_FAST=y
|
|
|
|
CONFIG_EAP_TLS=y
|
|
|
|
|
|
|
|
CONFIG_CTRL_IFACE=y
|
|
|
|
CONFIG_EAP_FAST=y
|
|
|
|
CONFIG_EAP_MSCHAPV2=y
|
|
|
|
CONFIG_EAP_TTLS=y
|
|
|
|
CONFIG_EAP_PEAP=y
|
|
|
|
CONFIG_EAP_MD5=y
|
|
|
|
CONFIG_EAP_GTC=y
|
|
|
|
CONFIG_EAP_OTP=y
|
|
|
|
CONFIG_EAP_PAX=y
|
|
|
|
CONFIG_EAP_SAKE=y
|
|
|
|
CONFIG_EAP_PSK=y
|
|
|
|
CONFIG_EAP_TNC=y
|
|
|
|
CONFIG_PKCS12=y
|
|
|
|
CONFIG_PCSC=y
|
2008-12-20 20:40:26 +01:00
|
|
|
CONFIG_WPS=y
|
2008-02-28 02:34:43 +01:00
|
|
|
|
|
|
|
CONFIG_L2_PACKET=winpcap
|
|
|
|
CONFIG_MAIN=main_winsvc
|
|
|
|
CONFIG_BACKEND=winreg
|
|
|
|
CONFIG_ELOOP=eloop_win
|
|
|
|
CFLAGS += -DCONFIG_DEBUG_FILE
|
|
|
|
EOF
|
|
|
|
|
|
|
|
# First, build the Windows service & registry version and rename it
|
2008-12-20 19:42:39 +01:00
|
|
|
make -j2 windows-bin
|
2008-02-28 02:34:43 +01:00
|
|
|
mv wpa_supplicant.exe wpasvc.exe
|
|
|
|
|
|
|
|
# Then, build "the standard" wpa_supplicant.exe
|
|
|
|
cat >> .config <<EOF
|
|
|
|
CONFIG_MAIN=main
|
|
|
|
CONFIG_BACKEND=file
|
|
|
|
EOF
|
|
|
|
|
2008-12-20 19:42:39 +01:00
|
|
|
make -j2 windows-bin
|
2008-02-28 02:34:43 +01:00
|
|
|
|
|
|
|
for i in COPYING; do
|
|
|
|
unix2dos < ../$i > ../../"$WDIR"/$i
|
|
|
|
done
|
|
|
|
for i in README README-Windows.txt wpa_supplicant.conf; do
|
|
|
|
unix2dos < $i > ../../"$WDIR"/$i
|
|
|
|
done
|
|
|
|
mv *.exe ../../"$WDIR"
|
|
|
|
cp win_example.reg ../../"$WDIR"
|
|
|
|
|
|
|
|
cd wpa_gui-qt4
|
2008-12-20 16:50:13 +01:00
|
|
|
qmake -spec win32-x-g++
|
2008-12-20 16:55:52 +01:00
|
|
|
make -C icons
|
2008-12-20 19:42:39 +01:00
|
|
|
make -j2
|
2008-02-28 02:34:43 +01:00
|
|
|
cp release/wpa_gui.exe ../../../"$WDIR"
|
|
|
|
cd ../../..
|
|
|
|
rm -rf "$PDIR"
|
|
|
|
zip "$WDIR.zip" "$WDIR"/*
|
|
|
|
rm -rf "$WDIR"
|
|
|
|
|
2008-12-20 16:50:13 +01:00
|
|
|
cd $RELDIR/..
|
2008-02-28 02:34:43 +01:00
|
|
|
|
2008-12-20 19:40:23 +01:00
|
|
|
./build_nsis.sh "$RELDIR/$WDIR.zip"
|
|
|
|
mv wpa_supplicant-$VER.exe $RELDIR
|
|
|
|
|
2008-02-28 02:34:43 +01:00
|
|
|
ls -l $RELDIR/*$VER*
|
|
|
|
|
|
|
|
exit 0
|