]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/qt-console/make-win32
Fix bat seg fault
[bacula/bacula] / bacula / src / qt-console / make-win32
index 3360e3401febf16add87b55121f6510e0b4608bb..b9be654f279495d5cd679dbfe768619f648af3a0 100755 (executable)
@@ -3,7 +3,7 @@
 #  Used to build the Win32 version of bat
 #
 rm -f debug/bat.exe
-if test -e ../config.h ; then
+if test -f ../config.h ; then
    mv -f ../config.h ../config.h.orig
 fi
 qmake -spec win32 -unix -o Makefile.mingw32 bat.pro.mingw32
@@ -12,7 +12,11 @@ if test -e ../config.h.orig ; then
    mv -f ../config.h.orig ../config.h
 fi
 if test -d ../win32/release32; then
-   cp -f release/bat.exe ../win32/release32
+   if test -f release/bat.exe; then
+      cp -f release/bat.exe ../win32/release32
+   else
+      cp -f debug/bat.exe ../win32/release32
+   fi 
    cp -f ${DEPKGS}/depkgs-mingw32/lib/qt/QtGui4.dll ../win32/release32
    cp -f ${DEPKGS}/depkgs-mingw32/lib/qt/QtCore4.dll ../win32/release32
    rm -rf ../win32/release32/help