From 5fc99ba93b677efd11bc17f5016f12988279ed2d Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 19 Jul 2008 15:50:38 +0000 Subject: [PATCH] kes Do partial integration of the Win32 bat build created by Eric. kes Fix bat not to block. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.4@7401 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/lib/bnet.c | 4 +- bacula/src/lib/bsock.c | 9 +- bacula/src/lib/bsock.h | 4 +- bacula/src/lib/cram-md5.c | 4 +- bacula/src/lib/message.c | 4 + .../{README.mingw => README.mingw32} | 21 ++-- .../{bat.pro.mingw => bat.pro.mingw32} | 8 +- bacula/src/qt-console/bcomm/dircomm.cpp | 2 +- bacula/src/qt-console/console/console.cpp | 25 ++++- bacula/src/qt-console/mainwin.cpp | 6 ++ bacula/src/qt-console/make-win32 | 16 +++ bacula/src/qt-console/win32-x-g++/qmake.conf | 97 ------------------- bacula/src/qt-console/win32/qmake.conf | 97 +++++++++++++++++++ .../{win32-x-g++ => win32}/qplatformdefs.h | 0 bacula/src/version.h | 4 +- bacula/src/win32/dll/bacula.def | 6 +- bacula/technotes-2.4 | 3 + 17 files changed, 181 insertions(+), 129 deletions(-) rename bacula/src/qt-console/{README.mingw => README.mingw32} (85%) rename bacula/src/qt-console/{bat.pro.mingw => bat.pro.mingw32} (96%) create mode 100755 bacula/src/qt-console/make-win32 delete mode 100644 bacula/src/qt-console/win32-x-g++/qmake.conf create mode 100644 bacula/src/qt-console/win32/qmake.conf rename bacula/src/qt-console/{win32-x-g++ => win32}/qplatformdefs.h (100%) diff --git a/bacula/src/lib/bnet.c b/bacula/src/lib/bnet.c index d5aed8a57d..057a7d4fe7 100644 --- a/bacula/src/lib/bnet.c +++ b/bacula/src/lib/bnet.c @@ -342,7 +342,7 @@ bool bnet_tls_client(TLS_CONTEXT *ctx, BSOCK * bsock, alist *verify_list) */ int bnet_wait_data(BSOCK * bsock, int sec) { - return bsock->wait_data(sec); + return bsock->wait_data(sec, 0); } /* @@ -350,7 +350,7 @@ int bnet_wait_data(BSOCK * bsock, int sec) */ int bnet_wait_data_intr(BSOCK * bsock, int sec) { - return bsock->wait_data_intr(sec); + return bsock->wait_data_intr(sec, 0); } #ifndef NETDB_INTERNAL diff --git a/bacula/src/lib/bsock.c b/bacula/src/lib/bsock.c index 66703c8078..3536afba63 100644 --- a/bacula/src/lib/bsock.c +++ b/bacula/src/lib/bsock.c @@ -728,7 +728,7 @@ void BSOCK::restore_blocking (int flags) * 0 if timeout * -1 if error */ -int BSOCK::wait_data(int sec) +int BSOCK::wait_data(int sec, int usec) { fd_set fdset; struct timeval tv; @@ -737,7 +737,7 @@ int BSOCK::wait_data(int sec) FD_SET((unsigned)m_fd, &fdset); for (;;) { tv.tv_sec = sec; - tv.tv_usec = 0; + tv.tv_usec = usec; switch (select(m_fd + 1, &fdset, NULL, NULL, &tv)) { case 0: /* timeout */ b_errno = 0; @@ -758,7 +758,7 @@ int BSOCK::wait_data(int sec) /* * As above, but returns on interrupt */ -int BSOCK::wait_data_intr(int sec) +int BSOCK::wait_data_intr(int sec, int usec) { fd_set fdset; struct timeval tv; @@ -766,7 +766,7 @@ int BSOCK::wait_data_intr(int sec) FD_ZERO(&fdset); FD_SET((unsigned)m_fd, &fdset); tv.tv_sec = sec; - tv.tv_usec = 0; + tv.tv_usec = usec; switch (select(m_fd + 1, &fdset, NULL, NULL, &tv)) { case 0: /* timeout */ b_errno = 0; @@ -781,6 +781,7 @@ int BSOCK::wait_data_intr(int sec) return 1; } + /* * Note, this routine closes and destroys all the sockets * that are open including the duped ones. diff --git a/bacula/src/lib/bsock.h b/bacula/src/lib/bsock.h index 29a693772d..08e32859de 100644 --- a/bacula/src/lib/bsock.h +++ b/bacula/src/lib/bsock.h @@ -107,8 +107,8 @@ public: int set_nonblocking(); int set_blocking(); void restore_blocking(int flags); - int wait_data(int sec); - int wait_data_intr(int sec); + int wait_data(int sec, int usec); + int wait_data_intr(int sec, int usec); bool authenticate_director(const char *name, const char *password, TLS_CONTEXT *tls_ctx, char *msg, int msglen); diff --git a/bacula/src/lib/cram-md5.c b/bacula/src/lib/cram-md5.c index 036dc4ed34..aa0ef82f7c 100644 --- a/bacula/src/lib/cram-md5.c +++ b/bacula/src/lib/cram-md5.c @@ -85,7 +85,7 @@ bool cram_md5_challenge(BSOCK *bs, const char *password, int tls_local_need, int } /* Read hashed response to challenge */ - if (bs->wait_data(180) <= 0 || bs->recv() <= 0) { + if (bs->wait_data(180, 0) <= 0 || bs->recv() <= 0) { Dmsg1(dbglvl, "Bnet receive challenge response error.\n", bs->bstrerror()); bmicrosleep(5, 0); return false; @@ -150,7 +150,7 @@ bool cram_md5_respond(BSOCK *bs, const char *password, int *tls_remote_need, int return false; } Dmsg1(99, "sending resp to challenge: %s\n", bs->msg); - if (bs->wait_data(180) <= 0 || bs->recv() <= 0) { + if (bs->wait_data(180, 0) <= 0 || bs->recv() <= 0) { Dmsg1(dbglvl, "Receive chanllenge response failed. ERR=%s\n", bs->bstrerror()); bmicrosleep(5, 0); return false; diff --git a/bacula/src/lib/message.c b/bacula/src/lib/message.c index 3596291b5d..ac0e8e00f0 100644 --- a/bacula/src/lib/message.c +++ b/bacula/src/lib/message.c @@ -875,7 +875,11 @@ d_msg(const char *file, int line, int level, const char *fmt,...) if (trace) { if (!trace_fd) { char fn[200]; +#ifdef HAVE_WIN32 bsnprintf(fn, sizeof(fn), "%s/%s.trace", working_directory ? working_directory : ".", my_name); +#else + bsnprintf(fn, sizeof(fn), "%s.trace", my_name); +#endif trace_fd = fopen(fn, "a+b"); } if (trace_fd) { diff --git a/bacula/src/qt-console/README.mingw b/bacula/src/qt-console/README.mingw32 similarity index 85% rename from bacula/src/qt-console/README.mingw rename to bacula/src/qt-console/README.mingw32 index ff2fe76e71..7f416e051e 100644 --- a/bacula/src/qt-console/README.mingw +++ b/bacula/src/qt-console/README.mingw32 @@ -33,7 +33,6 @@ bacula setup $ cd bacula/src/win32 $ make -Don't run any configure, make or make install Make sure that bacula/src/win32/release/bacula.dll is built QT4 setup @@ -51,6 +50,8 @@ $ wine qt-win-opensource-4.4.0-mingw.exe $ cp -r ~/.wine/drive_c/Qt/4.4.0/src/ depkgs-mingw32/include $ cp -r ~/.wine/drive_c/Qt/4.4.0/include depkgs-mingw32/include/qt $ cp -r ~/.wine/drive_c/Qt/4.4.0/lib depkgs-mingw32/lib/qt +# copy ~/.wine/drive_c/Qt/4.4.0/bin/QtCore4.dll to src/win32/release +# copy ~/.wine/drive_c/Qt/4.4.0/bin/QtGui4.dll to src/win32/release MINGW setup ----------- @@ -61,7 +62,7 @@ MINGW setup time_t st_ctime; /* Creation time */ }; --#ifdef _NO_OLDNAMES +-#ifndef _NO_OLDNAMES +#ifdef _NO_OLDNAMES_DISABLE /* NOTE: Must be the same as _stat above. */ struct stat @@ -71,9 +72,14 @@ Compile bat ----------- $ cd bacula/src/qt-console -$ cp bat.pro.mingw bat.pro -$ qmake-qt4 -spec win32-x-g++ -$ make +$ ./make-win32 + +Cleanup +------- +$ cd bacula/src/qt-console +$ ./make-win32 clean + + Run Bat on Windows ------------------ @@ -89,17 +95,16 @@ You'll need mingwm10.dll bat.conf -You can find QT dlls on ~/.wine/drive_c/Qt/4.4.0/bin +You can find the Qt dlls in ~/.wine/drive_c/Qt/4.4.0/bin Run Bat with wine ----------------- $ cd bacula/src/qt-console/debug # configure a bat.conf -# copy all dll to this directory +# copy all dlls to this directory $ wine bat That all, easy isn't it ? - diff --git a/bacula/src/qt-console/bat.pro.mingw b/bacula/src/qt-console/bat.pro.mingw32 similarity index 96% rename from bacula/src/qt-console/bat.pro.mingw rename to bacula/src/qt-console/bat.pro.mingw32 index 5fe906b3d5..ea60bb1c04 100644 --- a/bacula/src/qt-console/bat.pro.mingw +++ b/bacula/src/qt-console/bat.pro.mingw32 @@ -7,7 +7,7 @@ # # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # -CONFIG += qt debug +CONFIG += qt debug bins.path = ./ bins.files = ./bat.exe @@ -21,9 +21,9 @@ INCLUDEPATH += .. . ./console ./restore ./select LIBS += -L../win32/release -lbacula -mwindows RESOURCES = main.qrc -MOC_DIR = moc -OBJECTS_DIR = obj -UI_DIR = ui +MOC_DIR = win32/moc +OBJECTS_DIR = win32/obj +UI_DIR = win32/ui # Main window FORMS += main.ui diff --git a/bacula/src/qt-console/bcomm/dircomm.cpp b/bacula/src/qt-console/bcomm/dircomm.cpp index a238ecec52..16bf4f5c9d 100644 --- a/bacula/src/qt-console/bcomm/dircomm.cpp +++ b/bacula/src/qt-console/bcomm/dircomm.cpp @@ -536,7 +536,6 @@ static int tls_pem_callback(char *buf, int size, const void *userdata) (void)size; (void)userdata; #ifdef HAVE_TLS - const char *prompt = (const char *)userdata; # if defined(HAVE_WIN32) // sendit(prompt); if (win32_cgets(buf, size) == NULL) { @@ -546,6 +545,7 @@ static int tls_pem_callback(char *buf, int size, const void *userdata) return strlen(buf); } # else + const char *prompt = (const char *)userdata; char *passwd; passwd = getpass(prompt); diff --git a/bacula/src/qt-console/console/console.cpp b/bacula/src/qt-console/console/console.cpp index 63ca001009..76415412e7 100644 --- a/bacula/src/qt-console/console/console.cpp +++ b/bacula/src/qt-console/console/console.cpp @@ -105,8 +105,8 @@ void Console::terminate() if (m_sock) { if (m_notifier) { m_notifier->setEnabled(false); - delete m_notifier; - m_notifier = NULL; +// delete m_notifier; +// m_notifier = NULL; } stopTimer(); m_sock->close(); @@ -612,11 +612,27 @@ int Console::read() int stat = 0; while (m_sock) { for (;;) { - stat = bnet_wait_data_intr(m_sock, 1); +// bool enabled; +// if (mainWin->m_commDebug) Pmsg0(000, "bnet_wait_data_intr\n"); + stat = m_sock->wait_data_intr(0, 50000); if (stat > 0) { break; } +// if (mainWin->m_commDebug) Pmsg1(000, "wait status=%d\n", stat); +#ifdef xxx + if (m_notifier) { + enabled = m_notifier->isEnabled(); + if (enabled) { + m_notifier->setEnabled(false); + } + } +#endif app->processEvents(); +#ifdef xxx + if (m_notifier && enabled) { + m_notifier->setEnabled(true); + } +#endif if (m_api_set && m_messages_pending && m_notifier->isEnabled()) { write_dir(".messages"); m_messages_pending = false; @@ -748,6 +764,7 @@ void Console::read_dir(int /* fd */) while (read() >= 0) { display_text(msg()); } + if (mainWin->m_commDebug) Pmsg0(000, "exit read_dir\n"); } /* @@ -840,7 +857,6 @@ static int tls_pem_callback(char *buf, int size, const void *userdata) (void)size; (void)userdata; #ifdef HAVE_TLS - const char *prompt = (const char *)userdata; # if defined(HAVE_WIN32) // sendit(prompt); if (win32_cgets(buf, size) == NULL) { @@ -850,6 +866,7 @@ static int tls_pem_callback(char *buf, int size, const void *userdata) return strlen(buf); } # else + const char *prompt = (const char *)userdata; char *passwd; passwd = getpass(prompt); diff --git a/bacula/src/qt-console/mainwin.cpp b/bacula/src/qt-console/mainwin.cpp index 343ebd01c1..33b4d0296b 100644 --- a/bacula/src/qt-console/mainwin.cpp +++ b/bacula/src/qt-console/mainwin.cpp @@ -54,6 +54,8 @@ #include "jobgraphs/jobplot.h" #endif +extern bool trace; + /* * Daemon message callback */ @@ -64,6 +66,10 @@ void message_callback(int /* type */, char *msg) MainWin::MainWin(QWidget *parent) : QMainWindow(parent) { +#ifdef HAVE_WIN32 + my_name_is(0, NULL, "bat"); + set_trace(true); +#endif m_isClosing = false; m_dtformat = "yyyy-MM-dd HH:mm:ss"; mainWin = this; diff --git a/bacula/src/qt-console/make-win32 b/bacula/src/qt-console/make-win32 new file mode 100755 index 0000000000..4de01cf1b0 --- /dev/null +++ b/bacula/src/qt-console/make-win32 @@ -0,0 +1,16 @@ +#!/bin/sh +# +# Used to build the Win32 version of bat +# +rm -f debug/bat.exe +if test -e ../config.h ; then + mv -f ../config.h ../config.h.orig +fi +qmake -spec win32 -unix -o Makefile.mingw32 bat.pro.mingw32 +make -j3 -f Makefile.mingw32 $1 +if test -e ../config.h.orig ; then + mv -f ../config.h.orig ../config.h +fi +if test -d ../win32/release; then + cp -f debug/bat.exe ../win32/release +fi diff --git a/bacula/src/qt-console/win32-x-g++/qmake.conf b/bacula/src/qt-console/win32-x-g++/qmake.conf deleted file mode 100644 index db2114adef..0000000000 --- a/bacula/src/qt-console/win32-x-g++/qmake.conf +++ /dev/null @@ -1,97 +0,0 @@ -# -# qmake configuration for win32-g++ -# -# Written for MinGW -# - -MAKEFILE_GENERATOR = MINGW -TEMPLATE = app -CONFIG += qt warn_on release link_prl copy_dir_files debug_and_release debug_and_release_target precompile_header -QT += core gui -DEFINES += UNICODE QT_LARGEFILE_SUPPORT -QMAKE_COMPILER_DEFINES += __GNUC__ WIN32 - -QMAKE_EXT_OBJ = .o -QMAKE_EXT_RES = _res.o - -QMAKE_CC = ../../../cross-tools/mingw32/bin/mingw32-gcc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = byacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -DHAVE_MINGW -DHAVE_WIN32 -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -Wall -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses - -QMAKE_CXX = ../../../cross-tools/mingw32/bin/mingw32-g++ -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -DHAVE_MINGW -DHAVE_WIN32 -DHAVE_ZLIB_H -DHAVE_LIBZ -DHAVE_CRYPTO -DHAVE_OPENSSL -DHAVE_TLS -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD -QMAKE_CXXFLAGS_RTTI_ON = -frtti -QMAKE_CXXFLAGS_RTTI_OFF = -fno-rtti -QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads -QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -fno-exceptions - -QMAKE_INCDIR = ../../../depkgs-mingw32/include/pthreads ../../../depkgs-mingw32/include/ ../win32/compat -QMAKE_INCDIR_QT = ../../../depkgs-mingw32/include/qt -QMAKE_LIBDIR_QT = ../../../depkgs-mingw32/lib/qt - -QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src -QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< -QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src -QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -QMAKE_LINK = ../../../cross-tools/mingw32/bin/mingw32-g++ -QMAKE_LFLAGS = -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -mno-cygwin -m32 -fno-strict-aliasing -Wl,-enable-runtime-pseudo-reloc -mwindows - -QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads -Wl -QMAKE_LFLAGS_EXCEPTIONS_OFF = -QMAKE_LFLAGS_RELEASE = -Wl,-s -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,console -QMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows -QMAKE_LFLAGS_DLL = -shared -QMAKE_LINK_OBJECT_MAX = 10 -QMAKE_LINK_OBJECT_SCRIPT= object_script - - -QMAKE_LIBS = -lwsock32 -QMAKE_LIBS_CORE = -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lws2_32 -QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lws2_32 -lole32 -luuid -luser32 -ladvapi32 -QMAKE_LIBS_NETWORK = -lws2_32 -QMAKE_LIBS_OPENGL = -lopengl32 -lglu32 -lgdi32 -luser32 -QMAKE_LIBS_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32 -QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain - -#!isEmpty(QMAKE_SH) { - MINGW_IN_SHELL = 1 - QMAKE_DIR_SEP = / - QMAKE_COPY = cp - QMAKE_COPY_DIR = cp -r - QMAKE_MOVE = mv - QMAKE_DEL_FILE = rm -f - QMAKE_MKDIR = mkdir -p - QMAKE_DEL_DIR = rm -rf - QMAKE_CHK_DIR_EXISTS = test -d - -QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc -QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic -QMAKE_IDC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc - -QMAKE_IDL = midl -QMAKE_LIB = ../../../cross-tools/mingw32/bin/mingw32-ar -ru -QMAKE_RC = ../../../cross-tools/mingw32/bin/mingw32-windres -QMAKE_ZIP = zip -r -9 - -QMAKE_STRIP = ../../../cross-tools/mingw32/bin/mingw32-strip -QMAKE_STRIPFLAGS_LIB += --strip-unneeded -load(qt_config) diff --git a/bacula/src/qt-console/win32/qmake.conf b/bacula/src/qt-console/win32/qmake.conf new file mode 100644 index 0000000000..0799397f31 --- /dev/null +++ b/bacula/src/qt-console/win32/qmake.conf @@ -0,0 +1,97 @@ +# +# qmake configuration for win32-g++ +# +# Written for MinGW +# + +MAKEFILE_GENERATOR = MINGW +TEMPLATE = app +CONFIG += qt warn_on release link_prl copy_dir_files debug_and_release debug_and_release_target precompile_header +QT += core gui +DEFINES += UNICODE QT_LARGEFILE_SUPPORT +QMAKE_COMPILER_DEFINES += __GNUC__ WIN32 + +QMAKE_EXT_OBJ = .o +QMAKE_EXT_RES = _res.o + +QMAKE_CC = ../../../cross-tools/mingw32/bin/mingw32-gcc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = byacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = -DHAVE_MINGW -DHAVE_WIN32 +QMAKE_CFLAGS_DEPS = -M +QMAKE_CFLAGS_WARN_ON = -Wall +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = -O2 +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses + +QMAKE_CXX = ../../../cross-tools/mingw32/bin/mingw32-g++ +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -DHAVE_MINGW -DHAVE_WIN32 -DHAVE_ZLIB_H -DHAVE_LIBZ -DHAVE_CRYPTO -DHAVE_OPENSSL -DHAVE_TLS +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD +QMAKE_CXXFLAGS_RTTI_ON = -frtti +QMAKE_CXXFLAGS_RTTI_OFF = -fno-rtti +QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads +QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -fno-exceptions + +QMAKE_INCDIR = ../../../depkgs-mingw32/include/pthreads ../../../depkgs-mingw32/include/ ../win32/compat +QMAKE_INCDIR_QT = ../../../depkgs-mingw32/include/qt +QMAKE_LIBDIR_QT = ../../../depkgs-mingw32/lib/qt + +QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src +QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< +QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src +QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< + +QMAKE_LINK = ../../../cross-tools/mingw32/bin/mingw32-g++ +QMAKE_LFLAGS = -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -mno-cygwin -m32 -fno-strict-aliasing -Wl,-enable-runtime-pseudo-reloc + +QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads -Wl +QMAKE_LFLAGS_EXCEPTIONS_OFF = +QMAKE_LFLAGS_RELEASE = -Wl,-s +QMAKE_LFLAGS_DEBUG = +QMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,console +QMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows +QMAKE_LFLAGS_DLL = -shared +QMAKE_LINK_OBJECT_MAX = 10 +QMAKE_LINK_OBJECT_SCRIPT= object_script + + +QMAKE_LIBS = -lwsock32 +QMAKE_LIBS_CORE = -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lws2_32 +QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lws2_32 -lole32 -luuid -luser32 -ladvapi32 +QMAKE_LIBS_NETWORK = -lws2_32 +QMAKE_LIBS_OPENGL = -lopengl32 -lglu32 -lgdi32 -luser32 +QMAKE_LIBS_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32 +QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain + +MINGW_IN_SHELL = 1 +QMAKE_DIR_SEP = / +QMAKE_COPY = cp +QMAKE_COPY_DIR = cp -r +QMAKE_MOVE = mv +QMAKE_DEL_FILE = rm -f +QMAKE_MKDIR = mkdir -p +QMAKE_DEL_DIR = rm -rf +QMAKE_RCC = rcc +QMAKE_CHK_DIR_EXISTS = test -d + +QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc +QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic +QMAKE_IDC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc + +QMAKE_IDL = midl +QMAKE_LIB = ../../../cross-tools/mingw32/bin/mingw32-ar -ru +QMAKE_RC = ../../../cross-tools/mingw32/bin/mingw32-windres +QMAKE_ZIP = zip -r -9 + +QMAKE_STRIP = ../../../cross-tools/mingw32/bin/mingw32-strip +QMAKE_STRIPFLAGS_LIB += --strip-unneeded +load(qt_config) diff --git a/bacula/src/qt-console/win32-x-g++/qplatformdefs.h b/bacula/src/qt-console/win32/qplatformdefs.h similarity index 100% rename from bacula/src/qt-console/win32-x-g++/qplatformdefs.h rename to bacula/src/qt-console/win32/qplatformdefs.h diff --git a/bacula/src/version.h b/bacula/src/version.h index 68688ef9bf..26b3f5bdfe 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -4,8 +4,8 @@ #undef VERSION #define VERSION "2.4.1" -#define BDATE "15 July 2008" -#define LSMDATE "15Jul08" +#define BDATE "19 July 2008" +#define LSMDATE "19Jul08" #define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n" #define BYEAR "2008" /* year for copyright messages in progs */ diff --git a/bacula/src/win32/dll/bacula.def b/bacula/src/win32/dll/bacula.def index 0818935b9b..6892d96c64 100644 --- a/bacula/src/win32/dll/bacula.def +++ b/bacula/src/win32/dll/bacula.def @@ -220,12 +220,12 @@ _Z12write_nbytesP5BSOCKPci _Z13bnet_get_peerP5BSOCKPci _Z13bnet_strerrorP5BSOCK _Z13is_bnet_errorP5BSOCK -_Z14bnet_wait_dataP5BSOCKi _Z15bnet_tls_clientP11TLS_ContextP5BSOCKP5alist _Z15bnet_tls_serverP11TLS_ContextP5BSOCKP5alist _Z17bnet_host2ipaddrsPKciPS0_ _Z17bnet_set_blockingP5BSOCK _Z17bnet_sig_to_asciiP5BSOCK +_Z14bnet_wait_dataP5BSOCKi _Z19bnet_wait_data_intrP5BSOCKi _Z20bnet_set_buffer_sizeP5BSOCKji _Z20bnet_set_nonblockingP5BSOCK @@ -281,7 +281,6 @@ _Z9bsnprintfPciPKcz _Z9new_bsockv _ZN5BSOCK10free_bsockEv _ZN5BSOCK12set_blockingEv -_ZN5BSOCK14wait_data_intrEi _ZN5BSOCK15set_buffer_sizeEji _ZN5BSOCK15set_nonblockingEv _ZN5BSOCK16restore_blockingEi @@ -299,7 +298,8 @@ _ZN5BSOCK7destroyEv _ZN5BSOCK8fin_initEP3JCRiPKcS3_iP8sockaddr _ZN5BSOCK8get_peerEPci _ZN5BSOCK9bstrerrorEv -_ZN5BSOCK9wait_dataEi +_ZN5BSOCK9wait_dataEii +_ZN5BSOCK14wait_data_intrEii ; bsys.o _Z10b_strerroriPcj diff --git a/bacula/technotes-2.4 b/bacula/technotes-2.4 index a7a3729a4f..5349e6763f 100644 --- a/bacula/technotes-2.4 +++ b/bacula/technotes-2.4 @@ -1,6 +1,9 @@ Technical notes on version 2.4 General: +19Jul08 +kes Do partial integration of the Win32 bat build created by Eric. +kes Fix bat not to block. 15Jul08 kes Ensure that SD tried to mount a volume not in an autochanger at least once before asking for operator intervention. -- 2.39.5