driver_test: Merge drv->hapd into drv->ctx
[hostap-gosc2009.git] / build_release
blobda94097d239edd721f749ae3457cd19ccfd870b1
1 #!/bin/sh
3 WINLOCAL=/home/jm/H-win/local
5 set -e
7 if [ -z "$1" ]; then
8 echo "build_release <version> [nobin]"
9 exit 1
12 TMP=tmp.build_release
13 RELDIR=`pwd`/Release
14 VER=$1
15 NOW=`date +%Y-%m-%d`
17 echo "Version: $VER - $NOW"
19 DATEw=`head -n 3 wpa_supplicant/ChangeLog | tail -n 1 | sed "s/ .*//"`
20 DATEh=`head -n 3 hostapd/ChangeLog | tail -n 1 | sed "s/ .*//"`
22 if [ "$DATEw" != "$NOW" -o "$DATEh" != "$NOW" ]; then
23 echo "NOTE! Date mismatch in ChangeLog: wpa_supplicant $DATEw hostapd $DATEh != $NOW"
26 if [ -r $TMP ]; then
27 echo "Temporary directory '$TMP' exists. Remove it before running this."
28 exit 1
31 mkdir $TMP
32 mkdir -p $RELDIR
34 git archive --format=tar --prefix=wpa-$VER/ HEAD \
35 README COPYING patches src wpa_supplicant hostapd |
36 gzip > $RELDIR/wpa-$VER.tar.gz
37 git archive --format=tar --prefix=hostapd-$VER/ HEAD \
38 README COPYING patches src hostapd |
39 gzip > $RELDIR/hostapd-$VER.tar.gz
40 git archive --format=tar --prefix=wpa_supplicant-$VER/ HEAD \
41 README COPYING patches src wpa_supplicant hostapd/*.[ch] |
42 tar --directory=$TMP -xf -
44 cd $TMP
45 make -C wpa_supplicant-$VER/wpa_supplicant/doc/docbook man
46 rm -f wpa_supplicant-$VER/wpa_supplicant/doc/docbook/manpage.{links,refs}
47 tar czf $RELDIR/wpa_supplicant-$VER.tar.gz wpa_supplicant-$VER
48 cd ..
49 rm -r $TMP
51 if [ "$2" = "nobin" ]; then
52 exit 0
56 cd $RELDIR
58 PDIR=wpa_supplicant-$VER
59 WDIR=wpa_supplicant-windows-bin-$VER
60 tar xzf $PDIR.tar.gz
61 mkdir "$WDIR"
62 cd "$PDIR/wpa_supplicant"
63 cat > .config <<EOF
64 CONFIG_DRIVER_NDIS=y
65 CONFIG_NATIVE_WINDOWS=y
67 CC=i586-mingw32msvc-gcc
68 STRIP=i586-mingw32msvc-strip
69 PLATFORMSDKLIB=$WINLOCAL/lib
70 CONFIG_NDIS_EVENTS_INTEGRATED=y
72 CFLAGS += -I$WINLOCAL/include
73 LIBS += -L$WINLOCAL/lib
74 LIBS_w += -L$WINLOCAL/lib
75 LIBS_p += -L$WINLOCAL/lib
77 CONFIG_EAP_SIM=y
78 CONFIG_SIM_SIMULATOR=y
79 CONFIG_EAP_AKA=y
80 CONFIG_USIM_SIMULATOR=y
81 CONFIG_EAP_LEAP=y
82 CONFIG_EAP_FAST=y
83 CONFIG_EAP_TLS=y
85 CONFIG_CTRL_IFACE=y
86 CONFIG_EAP_FAST=y
87 CONFIG_EAP_MSCHAPV2=y
88 CONFIG_EAP_TTLS=y
89 CONFIG_EAP_PEAP=y
90 CONFIG_EAP_MD5=y
91 CONFIG_EAP_GTC=y
92 CONFIG_EAP_OTP=y
93 CONFIG_EAP_PAX=y
94 CONFIG_EAP_SAKE=y
95 CONFIG_EAP_PSK=y
96 CONFIG_EAP_TNC=y
97 CONFIG_PKCS12=y
98 CONFIG_PCSC=y
99 CONFIG_WPS=y
101 CONFIG_L2_PACKET=winpcap
102 CONFIG_MAIN=main_winsvc
103 CONFIG_BACKEND=winreg
104 CONFIG_ELOOP=eloop_win
105 CFLAGS += -DCONFIG_DEBUG_FILE
108 # First, build the Windows service & registry version and rename it
109 make -j2 windows-bin
110 mv wpa_supplicant.exe wpasvc.exe
112 # Then, build "the standard" wpa_supplicant.exe
113 cat >> .config <<EOF
114 CONFIG_MAIN=main
115 CONFIG_BACKEND=file
118 make -j2 windows-bin
120 for i in COPYING; do
121 unix2dos < ../$i > ../../"$WDIR"/$i
122 done
123 for i in README README-Windows.txt wpa_supplicant.conf; do
124 unix2dos < $i > ../../"$WDIR"/$i
125 done
126 mv *.exe ../../"$WDIR"
127 cp win_example.reg ../../"$WDIR"
129 cd wpa_gui-qt4
130 make -C icons
131 qmake -spec win32-x-g++
132 make -j2
133 cp release/wpa_gui.exe ../../../"$WDIR"
134 cd ../../..
135 rm -rf "$PDIR"
136 zip "$WDIR.zip" "$WDIR"/*
137 rm -rf "$WDIR"
139 cd $RELDIR/..
141 ./build_nsis.sh "$RELDIR/$WDIR.zip"
142 mv wpa_supplicant-$VER.exe $RELDIR
144 ls -l $RELDIR/*$VER*
146 exit 0