diff --git a/build_release b/build_release index fd195365f..3e47453dc 100755 --- a/build_release +++ b/build_release @@ -1,7 +1,5 @@ #!/bin/sh -# Path to the Windows cross compiler (mingw) -WINCROSS=/opt/xmingw/bin WINLOCAL=/home/jm/H-win/local set -e @@ -54,8 +52,8 @@ if [ "$2" == "nobin" ]; then exit 0 fi -if [ -d $WINCROSS ]; then - pushd $RELDIR + +cd $RELDIR PDIR=wpa_supplicant-$VER WDIR=wpa_supplicant-windows-bin-$VER @@ -66,9 +64,8 @@ if [ -d $WINCROSS ]; then CONFIG_DRIVER_NDIS=y CONFIG_NATIVE_WINDOWS=y -CFLAGS += -I/opt/xmingw/i386-mingw32msvc/include/ddk -CC=i386-mingw32msvc-gcc -STRIP=i386-mingw32msvc-strip +CC=i586-mingw32msvc-gcc +STRIP=i586-mingw32msvc-strip PLATFORMSDKLIB=$WINLOCAL/lib CONFIG_NDIS_EVENTS_INTEGRATED=y @@ -107,7 +104,7 @@ CFLAGS += -DCONFIG_DEBUG_FILE EOF # First, build the Windows service & registry version and rename it - PATH=$PATH:$WINCROSS make windows-bin + make windows-bin mv wpa_supplicant.exe wpasvc.exe # Then, build "the standard" wpa_supplicant.exe @@ -116,7 +113,7 @@ CONFIG_MAIN=main CONFIG_BACKEND=file EOF - PATH=$PATH:$WINCROSS make windows-bin + make windows-bin for i in COPYING; do unix2dos < ../$i > ../../"$WDIR"/$i @@ -128,16 +125,15 @@ EOF cp win_example.reg ../../"$WDIR" cd wpa_gui-qt4 - PATH=$PATH:$WINCROSS ./setup-mingw-cross-compiling - PATH=$PATH:$WINCROSS make + qmake -spec win32-x-g++ + make cp release/wpa_gui.exe ../../../"$WDIR" cd ../../.. rm -rf "$PDIR" zip "$WDIR.zip" "$WDIR"/* rm -rf "$WDIR" - popd -fi +cd $RELDIR/.. ls -l $RELDIR/*$VER* diff --git a/wpa_supplicant/wpa_gui-qt4/setup-mingw-cross-compiling b/wpa_supplicant/wpa_gui-qt4/setup-mingw-cross-compiling deleted file mode 100755 index b7d57f6a9..000000000 --- a/wpa_supplicant/wpa_gui-qt4/setup-mingw-cross-compiling +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -# qmake seems to be forcing include and lib paths from the original build -# and I have no idea how to change these. For now, just override the -# directories in the Makefile.Release file after qmake run. - -qmake -spec /q/jm/qt4-win/4.3.3/mkspecs/win32-g++ wpa_gui.pro -o Makefile -cat Makefile.Release | - sed s%/usr/lib/qt4%/q/jm/qt4-win/4.3.3/lib%g | - sed s%/usr/include/qt4%/q/jm/qt4-win/4.3.3/include%g > tmp.Makefile.Release && -mv -f tmp.Makefile.Release Makefile.Release - -make -C icons diff --git a/wpa_supplicant/wpa_gui-qt4/wpa_gui.pro b/wpa_supplicant/wpa_gui-qt4/wpa_gui.pro index 0de775217..5efc07ff8 100644 --- a/wpa_supplicant/wpa_gui-qt4/wpa_gui.pro +++ b/wpa_supplicant/wpa_gui-qt4/wpa_gui.pro @@ -15,6 +15,13 @@ win32 { DEFINES += CONFIG_NATIVE_WINDOWS CONFIG_CTRL_IFACE_NAMED_PIPE SOURCES += ../../src/utils/os_win32.c RESOURCES += icons_png.qrc +} else:win32-x-g++ { + # cross compilation to win32 + LIBS += -lws2_32 -static -mwindows + DEFINES += CONFIG_NATIVE_WINDOWS CONFIG_CTRL_IFACE_NAMED_PIPE + DEFINES += _X86_ + SOURCES += ../../src/utils/os_win32.c + RESOURCES += icons_png.qrc } else { DEFINES += CONFIG_CTRL_IFACE_UNIX SOURCES += ../../src/utils/os_unix.c