]> git.sur5r.net Git - bacula/bacula/commitdiff
Update the Microsoft Visual Studio build to match the MinGW32 build.
authorRobert Nelson <robertn@the-nelsons.org>
Fri, 1 Sep 2006 00:49:21 +0000 (00:49 +0000)
committerRobert Nelson <robertn@the-nelsons.org>
Fri, 1 Sep 2006 00:49:21 +0000 (00:49 +0000)
Fix precedence problem in an ASSERT.

Put DLL_IMP_EXP macros in the right place so they work with both gcc and msvc.

Change make_session_key on WIN32 to use WIN32 APIs to produce a better seed.

Add sed to external dependencies, it is used only during installation.

Remove unused code from winmain.cpp and winservice.cpp for the three daemons.

Fix /kill for file and storage daemons.

Add bfree to the exports for bacula.dll.

Add new tool scsilist.exe which displays the changer, tape and CD/DVD (1394, SCSI, SATA, ATAPI) devices and the information required to add them to bacula-sd.conf.

Added full configuration generation to the installer.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3392 91ce42f0-d328-0410-95d8-f526ca767f89

82 files changed:
bacula/Makefile.in
bacula/src/bacula.h
bacula/src/console/console.c
bacula/src/filed/job.c
bacula/src/findlib/attribs.c
bacula/src/jcr.h
bacula/src/lib/message.h
bacula/src/lib/res.c
bacula/src/lib/util.c
bacula/src/stored/dircmd.c
bacula/src/win32/External-mingw32
bacula/src/win32/README.vc8
bacula/src/win32/bacula.sln
bacula/src/win32/bacula/bacula.vcproj [new file with mode: 0644]
bacula/src/win32/build-depkgs-mingw32
bacula/src/win32/build-depkgs-msvc.cmd
bacula/src/win32/cats/Makefile
bacula/src/win32/cats/bacula_cats/bacula_cats.def [new file with mode: 0644]
bacula/src/win32/cats/bacula_cats/bacula_cats.vcproj [new file with mode: 0644]
bacula/src/win32/cats/cats.vcproj
bacula/src/win32/cats/cats_bdb/cats_bdb.vcproj [new file with mode: 0644]
bacula/src/win32/cats/cats_mysql/cats_mysql.vcproj [new file with mode: 0644]
bacula/src/win32/cats/cats_pgsql/cats_pgsql.vcproj [new file with mode: 0644]
bacula/src/win32/compat/compat.h
bacula/src/win32/compat/compat.vcproj
bacula/src/win32/compat/getopt.c
bacula/src/win32/compat/winconfig.h
bacula/src/win32/compat/winhost.h
bacula/src/win32/console/bconsole.conf.in [deleted file]
bacula/src/win32/console/console.vcproj
bacula/src/win32/dird/dird.vcproj
bacula/src/win32/dird/winmain.cpp
bacula/src/win32/dird/winservice.cpp
bacula/src/win32/dird/winservice.h
bacula/src/win32/dll/bacula.def
bacula/src/win32/filed/bacula-fd.conf.in [deleted file]
bacula/src/win32/filed/baculafd.vcproj
bacula/src/win32/filed/winmain.cpp
bacula/src/win32/filed/winservice.cpp
bacula/src/win32/installer/ConfigPage1.nsh [new file with mode: 0644]
bacula/src/win32/installer/ConfigPage2.nsh [new file with mode: 0644]
bacula/src/win32/installer/Makefile
bacula/src/win32/installer/bacula-dir.conf.in [new file with mode: 0644]
bacula/src/win32/installer/bacula-fd.conf.in [new file with mode: 0644]
bacula/src/win32/installer/bacula-sd.conf.in [new file with mode: 0644]
bacula/src/win32/installer/bconsole.conf.in [new file with mode: 0644]
bacula/src/win32/installer/installer.vcproj [new file with mode: 0644]
bacula/src/win32/installer/winbacula.nsi
bacula/src/win32/installer/wx-console.conf.in [new file with mode: 0644]
bacula/src/win32/libbac/libbac.vcproj
bacula/src/win32/libbac/msvc/bacula.def [new file with mode: 0644]
bacula/src/win32/libfind/libfind.vcproj
bacula/src/win32/libwin32/libwin32.vcproj
bacula/src/win32/libwin32/winservice.h
bacula/src/win32/patches/sed.patch [new file with mode: 0644]
bacula/src/win32/stored/baculasd/baculasd.vcproj [new file with mode: 0644]
bacula/src/win32/stored/baculasd/winbacula.h
bacula/src/win32/stored/baculasd/winmain.cpp
bacula/src/win32/stored/baculasd/winservice.cpp
bacula/src/win32/stored/baculasd/winservice.h
bacula/src/win32/stored/mtops.cpp
bacula/src/win32/tools/Makefile
bacula/src/win32/tools/ScsiDeviceList.cpp [new file with mode: 0644]
bacula/src/win32/tools/ScsiDeviceList.h [new file with mode: 0644]
bacula/src/win32/tools/dbcheck/dbcheck.vcproj [new file with mode: 0644]
bacula/src/win32/tools/scsilist.cpp [new file with mode: 0644]
bacula/src/win32/tools/scsilist/scsilist.vcproj [new file with mode: 0644]
bacula/src/win32/wx-console/wx-console.conf.in [deleted file]
bacula/src/win32/wx-console/wx-console.vcproj
bacula/src/wx-console/authenticate.c
bacula/src/wx-console/console_conf.c
bacula/src/wx-console/console_thread.cpp
bacula/src/wx-console/main.cpp
bacula/src/wx-console/wxbconfigfileeditor.cpp
bacula/src/wx-console/wxbconfigpanel.cpp
bacula/src/wx-console/wxbhistorytextctrl.cpp
bacula/src/wx-console/wxblistctrl.cpp
bacula/src/wx-console/wxbmainframe.cpp
bacula/src/wx-console/wxbrestorepanel.cpp
bacula/src/wx-console/wxbtableparser.cpp
bacula/src/wx-console/wxbtreectrl.cpp
bacula/src/wx-console/wxbutils.cpp

index 19c2d93c4aa50c226c42fe9652a5e33dabe82ab1..e4a0562cdd718402f8a1788b8fc44e1c5340a1fa 100755 (executable)
@@ -23,7 +23,7 @@ fd_subdirs = src scripts src/lib src/findlib src/filed \
             @GNOME_DIR@ @TRAY_MONITOR_DIR@ @WX_DIR@
 
 # Non-client-only directores
-subdirs =    src/cats @DIRD_DIR@ @STORED_DIR@ src/tools        
+subdirs =    src/cats @DIRD_DIR@ @STORED_DIR@ src/tools
 
 all_subdirs = ${fd_subdirs} ${@ALL_DIRS@} manpages
 
index 5619c0d7f2b041731c8f8d333bb22cfca28f0d96..09291ab3cae38f45fd1b218f9682d77d0111815e 100644 (file)
 #else
 #include "winconfig.h"
 #endif
-#include "winhost.h"
 #else
 #include "config.h"
-#include "host.h"
 #endif
 
 
 #if HAVE_ALLOCA_H
 #include <alloca.h>
 #endif
-
+#if defined(_MSC_VER)
+#include <io.h>
+#include <direct.h>
+#include <process.h>
+#endif
 #include <errno.h>
 #include <fcntl.h>
 
 #define O_NOATIME 0
 #endif
 
+#if defined(_MSC_VER)
+extern "C" {
+#include "getopt.h"
+}
+#endif
+
 #ifdef xxxxx
 #ifdef HAVE_GETOPT_LONG
 #include <getopt.h>
 
 #if defined(HAVE_WIN32)
 #include "win32/winapi.h"
+#include "winhost.h"
+#else
+#include "host.h"
 #endif
 
 #ifndef HAVE_ZLIB_H
index bcaf07a9fce9d7162bf648bcab7311166804b630..b7064e0bd299b54d7b4bfcee9dee2f1168909a5b 100644 (file)
@@ -292,8 +292,8 @@ static void read_and_process_input(FILE *input, BSOCK *UA_sock)
 static int tls_pem_callback(char *buf, int size, const void *userdata)
 {
 #ifdef HAVE_TLS
-# ifdef HAVE_MINGW
    const char *prompt = (const char *)userdata;
+# if defined(HAVE_WIN32)
    sendit(prompt);
    if (win32_cgets(buf, size) == NULL) {
       buf[0] = 0;
@@ -302,7 +302,6 @@ 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);
index 5d7ec87caf5d2ba16fbe0483a0ca83b8b45d87db..0c81adc143c96e5aeec114a1824e45413e8df81c 100644 (file)
@@ -25,7 +25,7 @@
 #include "filed.h"
 
 #if defined(WIN32_VSS)
-#include "vss.h"   
+#include "vss.h"
 
 static pthread_mutex_t vss_mutex = PTHREAD_MUTEX_INITIALIZER;
 static int enable_vss;
index ab9a87f51d61de352d0041bde277d872bd33c411..4c71cc679ec719486621ae43186d6acde1e2c4e9 100755 (executable)
@@ -123,7 +123,7 @@ int select_data_stream(FF_PKT *ff_pkt)
       default:
          /* All stream types that do not support encryption should clear out
           * FO_ENCRYPT above, and this code block should be unreachable. */
-         ASSERT(!ff_pkt->flags & FO_ENCRYPT);
+         ASSERT(!(ff_pkt->flags & FO_ENCRYPT));
          return STREAM_NONE;
       }
    }
index f37b6f68650fa35f728feb48dd4feef0b7366b42..6a2dad36e4d23f6a47fb9b41a204a5f709c40929 100644 (file)
@@ -353,7 +353,7 @@ struct s_last_job {
 };
 
 extern struct s_last_job last_job;
-extern dlist * DLL_IMP_EXP last_jobs;
+extern DLL_IMP_EXP dlist * last_jobs;
 
 
 /* The following routines are found in lib/jcr.c */
index 1d144bb74af11158dfa9d16421dc00eec55d911e..66b0f82dd89bfbe8a3617ac525487dcafd4efba2 100644 (file)
@@ -133,14 +133,14 @@ void Qmsg(JCR *jcr, int type, time_t mtime, const char *fmt,...);
 bool get_trace(void);
 
 typedef void (*sql_query)(JCR *jcr, const char *cmd);
-extern sql_query     DLL_IMP_EXP p_sql_query;
+extern DLL_IMP_EXP sql_query     p_sql_query;
 
-extern int           DLL_IMP_EXP debug_level;
-extern int           DLL_IMP_EXP verbose;
-extern char          DLL_IMP_EXP my_name[];
-extern const char *  DLL_IMP_EXP working_directory;
-extern time_t        DLL_IMP_EXP daemon_start_time;
+extern DLL_IMP_EXP int           debug_level;
+extern DLL_IMP_EXP int           verbose;
+extern DLL_IMP_EXP char          my_name[];
+extern DLL_IMP_EXP const char *  working_directory;
+extern DLL_IMP_EXP time_t        daemon_start_time;
 
-extern int           DLL_IMP_EXP console_msg_pending;
-extern FILE *        DLL_IMP_EXP con_fd;                 /* Console file descriptor */
-extern brwlock_t     DLL_IMP_EXP con_lock;               /* Console lock structure */
+extern DLL_IMP_EXP int           console_msg_pending;
+extern DLL_IMP_EXP FILE *        con_fd;                 /* Console file descriptor */
+extern DLL_IMP_EXP brwlock_t     con_lock;               /* Console lock structure */
index c35fb68ee5c7d4dd8ecbb59c44060f22354bba68..670b61fe59466592e5b1accf263f7f1b0567d9c7 100644 (file)
@@ -23,8 +23,6 @@
 
 #include "bacula.h"
 
-extern int debug_level;
-
 /* Each daemon has a slightly different set of
  * resources, so it will define the following
  * global values.
index 505851583fd4a2f094316627dd2372c211f45fdf..f991483202662a0cc2737eaaaadf1e9f2c6dedb5 100644 (file)
@@ -428,63 +428,86 @@ int do_shell_expansion(char *name, int name_len)
 
 void make_session_key(char *key, char *seed, int mode)
 {
-     int j, k;
-     struct MD5Context md5c;
-     unsigned char md5key[16], md5key1[16];
-     char s[1024];
-
-     s[0] = 0;
-     if (seed != NULL) {
-        bstrncat(s, seed, sizeof(s));
-     }
+   int j, k;
+   struct MD5Context md5c;
+   unsigned char md5key[16], md5key1[16];
+   char s[1024];
+
+   s[0] = 0;
+   if (seed != NULL) {
+     bstrncat(s, seed, sizeof(s));
+   }
+
+   /* The following creates a seed for the session key generator
+     based on a collection of volatile and environment-specific
+     information unlikely to be vulnerable (as a whole) to an
+     exhaustive search attack.  If one of these items isn't
+     available on your machine, replace it with something
+     equivalent or, if you like, just delete it. */
 
-     /* The following creates a seed for the session key generator
-        based on a collection of volatile and environment-specific
-        information unlikely to be vulnerable (as a whole) to an
-        exhaustive search attack.  If one of these items isn't
-        available on your machine, replace it with something
-        equivalent or, if you like, just delete it. */
-
-     sprintf(s + strlen(s), "%lu", (unsigned long)getpid());
-     sprintf(s + strlen(s), "%lu", (unsigned long)getppid());
-     (void)getcwd(s + strlen(s), 256);
-     sprintf(s + strlen(s), "%lu", (unsigned long)clock());
-     sprintf(s + strlen(s), "%lu", (unsigned long)time(NULL));
+#if defined(HAVE_WIN32)
+   {
+      LARGE_INTEGER     li;
+      DWORD             length;
+      FILETIME          ft;
+      char             *p;
+
+      p = s;
+      sprintf(s + strlen(s), "%lu", (unsigned long)GetCurrentProcessId());
+      (void)getcwd(s + strlen(s), 256);
+      sprintf(s + strlen(s), "%lu", (unsigned long)GetTickCount());
+      QueryPerformanceCounter(&li);
+      sprintf(s + strlen(s), "%lu", (unsigned long)li.LowPart);
+      GetSystemTimeAsFileTime(&ft);
+      sprintf(s + strlen(s), "%lu", (unsigned long)ft.dwLowDateTime);
+      sprintf(s + strlen(s), "%lu", (unsigned long)ft.dwHighDateTime);
+      length = 256;
+      GetComputerName(s + strlen(s), &length);
+      length = 256;
+      GetUserName(s + strlen(s), &length);
+   }
+#else
+   sprintf(s + strlen(s), "%lu", (unsigned long)getpid());
+   sprintf(s + strlen(s), "%lu", (unsigned long)getppid());
+   (void)getcwd(s + strlen(s), 256);
+   sprintf(s + strlen(s), "%lu", (unsigned long)clock());
+   sprintf(s + strlen(s), "%lu", (unsigned long)time(NULL));
 #if defined(Solaris)
-     sysinfo(SI_HW_SERIAL,s + strlen(s), 12);
+   sysinfo(SI_HW_SERIAL,s + strlen(s), 12);
 #endif
 #if defined(HAVE_GETHOSTID)
-     sprintf(s + strlen(s), "%lu", (unsigned long) gethostid());
+   sprintf(s + strlen(s), "%lu", (unsigned long) gethostid());
 #endif
-     gethostname(s + strlen(s), 256);
-     sprintf(s + strlen(s), "%u", (unsigned)getuid());
-     sprintf(s + strlen(s), "%u", (unsigned)getgid());
-     MD5Init(&md5c);
-     MD5Update(&md5c, (unsigned char *)s, strlen(s));
-     MD5Final(md5key, &md5c);
-     sprintf(s + strlen(s), "%lu", (unsigned long)((time(NULL) + 65121) ^ 0x375F));
-     MD5Init(&md5c);
-     MD5Update(&md5c, (unsigned char *)s, strlen(s));
-     MD5Final(md5key1, &md5c);
+   gethostname(s + strlen(s), 256);
+   sprintf(s + strlen(s), "%u", (unsigned)getuid());
+   sprintf(s + strlen(s), "%u", (unsigned)getgid());
+#endif
+   MD5Init(&md5c);
+   MD5Update(&md5c, (unsigned char *)s, strlen(s));
+   MD5Final(md5key, &md5c);
+   sprintf(s + strlen(s), "%lu", (unsigned long)((time(NULL) + 65121) ^ 0x375F));
+   MD5Init(&md5c);
+   MD5Update(&md5c, (unsigned char *)s, strlen(s));
+   MD5Final(md5key1, &md5c);
 #define nextrand    (md5key[j] ^ md5key1[j])
-     if (mode) {
-        for (j = k = 0; j < 16; j++) {
-           unsigned char rb = nextrand;
+   if (mode) {
+     for (j = k = 0; j < 16; j++) {
+        unsigned char rb = nextrand;
 
 #define Rad16(x) ((x) + 'A')
-           key[k++] = Rad16((rb >> 4) & 0xF);
-           key[k++] = Rad16(rb & 0xF);
+        key[k++] = Rad16((rb >> 4) & 0xF);
+        key[k++] = Rad16(rb & 0xF);
 #undef Rad16
-           if (j & 1) {
-              key[k++] = '-';
-           }
-        }
-        key[--k] = 0;
-     } else {
-        for (j = 0; j < 16; j++) {
-           key[j] = nextrand;
+        if (j & 1) {
+           key[k++] = '-';
         }
      }
+     key[--k] = 0;
+   } else {
+     for (j = 0; j < 16; j++) {
+        key[j] = nextrand;
+     }
+   }
 }
 #undef nextrand
 
index d1134f140e15a11392d7e0d923b79452bd93852b..877b4b01b2cfc66c6ee3a12c70a09abb35e57ec4 100644 (file)
@@ -43,8 +43,6 @@
 extern BSOCK *filed_chan;
 extern int r_first, r_last;
 extern struct s_res resources[];
-extern char my_name[];
-extern time_t daemon_start_time;
 extern struct s_last_job last_job;
 extern bool init_done;
 
index 555adcb0e5cf4f2708ce07c3a0a616f6efeff60b..e9c4b52376b9fb9866e3bc618ded0cd354a5df73 100644 (file)
@@ -33,3 +33,4 @@ NSIS_BIN|http://superb-west.dl.sourceforge.net/sourceforge/nsis/nsis-2.17.zip
 NSIS_SRC|http://superb-west.dl.sourceforge.net/sourceforge/nsis/nsis-2.17-src.tar.bz2
 MTX|http://superb-west.dl.sourceforge.net/sourceforge/mtx/mtx-1.3.9.tar.gz
 MT|ftp://ftp.ibiblio.org/pub/linux/system/backup/mt-st-0.9b.tar.gz
+SED|ftp://mirrors.kernel.org/gnu/sed/sed-4.1.5.tar.gz
index b92a4ebcf2823bc425109c07080c141f1ca4c6e2..37705afeb75175c750ef2ae204098ba7fcdbfa42 100644 (file)
@@ -2,10 +2,6 @@
 Instructions to build Bacula with Microsoft Visual C++ 2005 Express Edition (free version).
 ---
 
-(Note: for the moment VSS support has been disabled, and this is not
-the official way to build the released FD.  See README.win32 for the
-"official" instructions.)
-
 What you need to download:
 - Visual C++ 2005 Express Edition (2MB + 66MB)
   http://msdn.microsoft.com/vstudio/express/visualc/download/  
@@ -53,6 +49,20 @@ Installation instructions:
 
 Build instructions:
  - deppkgs:
+
+   You need 7-Zip, dlltool, nasm, patch, perl, sed, wget
+
+   build-depkgs
+      Builds
+         libz
+         mt
+         mtx
+         mysql
+         openssl
+         postgreSQL
+         pthreads
+         wxWidgets
+
    + Start VC++ 2005 command prompt (in the start menu)
    + run "<vc++ install dir>\VC\PlatformSDK\SetEnv.Cmd"
    + cd <dev dir>/deppkgs-win32/zlib
index fd9e8a33d2492c19ad9defb1714a50acec0af728..9ae384dd785bac8d652efce05b4da5b67a646f8f 100644 (file)
@@ -3,64 +3,51 @@ Microsoft Visual Studio Solution File, Format Version 9.00
 # Visual Studio 2005
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wx-console", "wx-console\wx-console.vcproj", "{9BA8E10D-0D82-4B25-8543-DE34641FBC10}"
        ProjectSection(ProjectDependencies) = postProject
-               {374BF775-AF68-4A88-814A-48F692DFFE5A} = {374BF775-AF68-4A88-814A-48F692DFFE5A}
-               {05CF01A0-3C11-443B-B14B-D806C79212F1} = {05CF01A0-3C11-443B-B14B-D806C79212F1}
+               {2D729599-C008-4154-BCCB-53E6A260F220} = {2D729599-C008-4154-BCCB-53E6A260F220}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "console", "console\console.vcproj", "{A0F65E06-9F18-40AC-81F6-A080852F1104}"
        ProjectSection(ProjectDependencies) = postProject
-               {374BF775-AF68-4A88-814A-48F692DFFE5A} = {374BF775-AF68-4A88-814A-48F692DFFE5A}
-               {05CF01A0-3C11-443B-B14B-D806C79212F1} = {05CF01A0-3C11-443B-B14B-D806C79212F1}
+               {2D729599-C008-4154-BCCB-53E6A260F220} = {2D729599-C008-4154-BCCB-53E6A260F220}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fstype", "tools\fstype\fstype.vcproj", "{AAF33ADD-A4F9-4BCA-B7F9-0C35C843CC7E}"
        ProjectSection(ProjectDependencies) = postProject
-               {05567F02-5DD8-4EB6-9C8E-C236C1D9AB1F} = {05567F02-5DD8-4EB6-9C8E-C236C1D9AB1F}
-               {374BF775-AF68-4A88-814A-48F692DFFE5A} = {374BF775-AF68-4A88-814A-48F692DFFE5A}
-               {05CF01A0-3C11-443B-B14B-D806C79212F1} = {05CF01A0-3C11-443B-B14B-D806C79212F1}
+               {2D729599-C008-4154-BCCB-53E6A260F220} = {2D729599-C008-4154-BCCB-53E6A260F220}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbac", "libbac\libbac.vcproj", "{374BF775-AF68-4A88-814A-48F692DFFE5A}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfind", "libfind\libfind.vcproj", "{05567F02-5DD8-4EB6-9C8E-C236C1D9AB1F}"
-EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "drivetype", "tools\drivetype\drivetype.vcproj", "{E5BC5B2E-976D-4DED-AA07-5DD52BF2163F}"
        ProjectSection(ProjectDependencies) = postProject
-               {05567F02-5DD8-4EB6-9C8E-C236C1D9AB1F} = {05567F02-5DD8-4EB6-9C8E-C236C1D9AB1F}
-               {374BF775-AF68-4A88-814A-48F692DFFE5A} = {374BF775-AF68-4A88-814A-48F692DFFE5A}
-               {05CF01A0-3C11-443B-B14B-D806C79212F1} = {05CF01A0-3C11-443B-B14B-D806C79212F1}
+               {2D729599-C008-4154-BCCB-53E6A260F220} = {2D729599-C008-4154-BCCB-53E6A260F220}
        EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "compat", "compat\compat.vcproj", "{05CF01A0-3C11-443B-B14B-D806C79212F1}"
-EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testfind", "tools\testfind\testfind.vcproj", "{558838F9-D792-4F56-AAB2-99C03687C5FF}"
        ProjectSection(ProjectDependencies) = postProject
-               {05567F02-5DD8-4EB6-9C8E-C236C1D9AB1F} = {05567F02-5DD8-4EB6-9C8E-C236C1D9AB1F}
-               {374BF775-AF68-4A88-814A-48F692DFFE5A} = {374BF775-AF68-4A88-814A-48F692DFFE5A}
-               {05CF01A0-3C11-443B-B14B-D806C79212F1} = {05CF01A0-3C11-443B-B14B-D806C79212F1}
+               {2D729599-C008-4154-BCCB-53E6A260F220} = {2D729599-C008-4154-BCCB-53E6A260F220}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testls", "tools\testls\testls.vcproj", "{28FB58CE-AB8C-4C60-83DA-BC1BFCC59BFF}"
        ProjectSection(ProjectDependencies) = postProject
-               {05567F02-5DD8-4EB6-9C8E-C236C1D9AB1F} = {05567F02-5DD8-4EB6-9C8E-C236C1D9AB1F}
-               {374BF775-AF68-4A88-814A-48F692DFFE5A} = {374BF775-AF68-4A88-814A-48F692DFFE5A}
-               {05CF01A0-3C11-443B-B14B-D806C79212F1} = {05CF01A0-3C11-443B-B14B-D806C79212F1}
+               {2D729599-C008-4154-BCCB-53E6A260F220} = {2D729599-C008-4154-BCCB-53E6A260F220}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "baculafd", "filed\baculafd.vcproj", "{6A435DBB-4D3D-4DAE-8CB3-E0AF169A240B}"
        ProjectSection(ProjectDependencies) = postProject
-               {05567F02-5DD8-4EB6-9C8E-C236C1D9AB1F} = {05567F02-5DD8-4EB6-9C8E-C236C1D9AB1F}
-               {374BF775-AF68-4A88-814A-48F692DFFE5A} = {374BF775-AF68-4A88-814A-48F692DFFE5A}
-               {05CF01A0-3C11-443B-B14B-D806C79212F1} = {05CF01A0-3C11-443B-B14B-D806C79212F1}
+               {2D729599-C008-4154-BCCB-53E6A260F220} = {2D729599-C008-4154-BCCB-53E6A260F220}
        EndProjectSection
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{825DFFD0-4747-43CA-8326-529655E31935}"
        ProjectSection(SolutionItems) = preProject
-               ClientConfig.ini = ClientConfig.ini
+               build-depkgs-mingw32 = build-depkgs-mingw32
+               build-depkgs-msvc.cmd = build-depkgs-msvc.cmd
+               build-win32-cross-tools = build-win32-cross-tools
                ..\..\autoconf\bacula-macros\db.m4 = ..\..\autoconf\bacula-macros\db.m4
+               External-mingw32 = External-mingw32
+               External-msvc = External-msvc
                ..\..\autoconf\bacula-macros\largefiles.m4 = ..\..\autoconf\bacula-macros\largefiles.m4
                ..\..\autoconf\bacula-macros\os.m4 = ..\..\autoconf\bacula-macros\os.m4
-               winbacula.nsi.in = winbacula.nsi.in
        EndProjectSection
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Header Files", "Header Files", "{C8301485-CFD1-43D4-827C-8EA050C8E256}"
@@ -74,70 +61,56 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Header Files", "Header File
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "baculadird", "dird\dird.vcproj", "{D03415F7-654E-42F4-B0E9-CB8FBE3F22FA}"
        ProjectSection(ProjectDependencies) = postProject
-               {05567F02-5DD8-4EB6-9C8E-C236C1D9AB1F} = {05567F02-5DD8-4EB6-9C8E-C236C1D9AB1F}
-               {BAB13141-20F9-4B2D-8C0A-021804ADD077} = {BAB13141-20F9-4B2D-8C0A-021804ADD077}
-               {374BF775-AF68-4A88-814A-48F692DFFE5A} = {374BF775-AF68-4A88-814A-48F692DFFE5A}
-               {05CF01A0-3C11-443B-B14B-D806C79212F1} = {05CF01A0-3C11-443B-B14B-D806C79212F1}
+               {2D729599-C008-4154-BCCB-53E6A260F220} = {2D729599-C008-4154-BCCB-53E6A260F220}
+               {8B79A2B5-8889-43D4-9B92-9AE8A6F00413} = {8B79A2B5-8889-43D4-9B92-9AE8A6F00413}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "baculasd", "stored\baculasd\baculasd.vcproj", "{F5F063F8-11A1-475A-82E2-19759BB40B25}"
        ProjectSection(ProjectDependencies) = postProject
                {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D} = {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}
-               {374BF775-AF68-4A88-814A-48F692DFFE5A} = {374BF775-AF68-4A88-814A-48F692DFFE5A}
-               {05CF01A0-3C11-443B-B14B-D806C79212F1} = {05CF01A0-3C11-443B-B14B-D806C79212F1}
+               {2D729599-C008-4154-BCCB-53E6A260F220} = {2D729599-C008-4154-BCCB-53E6A260F220}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bcopy", "stored\bcopy\bcopy.vcproj", "{614CE916-0972-4126-9392-CD9FC0ADD7DE}"
        ProjectSection(ProjectDependencies) = postProject
                {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D} = {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}
-               {374BF775-AF68-4A88-814A-48F692DFFE5A} = {374BF775-AF68-4A88-814A-48F692DFFE5A}
-               {05CF01A0-3C11-443B-B14B-D806C79212F1} = {05CF01A0-3C11-443B-B14B-D806C79212F1}
+               {2D729599-C008-4154-BCCB-53E6A260F220} = {2D729599-C008-4154-BCCB-53E6A260F220}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bextract", "stored\bextract\bextract.vcproj", "{6A7AA493-E46C-4994-B8D6-AA6C9C19C9BA}"
        ProjectSection(ProjectDependencies) = postProject
-               {05567F02-5DD8-4EB6-9C8E-C236C1D9AB1F} = {05567F02-5DD8-4EB6-9C8E-C236C1D9AB1F}
                {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D} = {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}
-               {374BF775-AF68-4A88-814A-48F692DFFE5A} = {374BF775-AF68-4A88-814A-48F692DFFE5A}
-               {05CF01A0-3C11-443B-B14B-D806C79212F1} = {05CF01A0-3C11-443B-B14B-D806C79212F1}
+               {2D729599-C008-4154-BCCB-53E6A260F220} = {2D729599-C008-4154-BCCB-53E6A260F220}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bls", "stored\bls\bls.vcproj", "{F8AF7D74-2918-422B-A7B6-4D98566B7160}"
        ProjectSection(ProjectDependencies) = postProject
-               {05567F02-5DD8-4EB6-9C8E-C236C1D9AB1F} = {05567F02-5DD8-4EB6-9C8E-C236C1D9AB1F}
                {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D} = {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}
-               {374BF775-AF68-4A88-814A-48F692DFFE5A} = {374BF775-AF68-4A88-814A-48F692DFFE5A}
-               {05CF01A0-3C11-443B-B14B-D806C79212F1} = {05CF01A0-3C11-443B-B14B-D806C79212F1}
+               {2D729599-C008-4154-BCCB-53E6A260F220} = {2D729599-C008-4154-BCCB-53E6A260F220}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bscan", "stored\bscan\bscan.vcproj", "{56EADEDB-FBED-4758-8B54-7B0B47ABDABF}"
        ProjectSection(ProjectDependencies) = postProject
-               {05567F02-5DD8-4EB6-9C8E-C236C1D9AB1F} = {05567F02-5DD8-4EB6-9C8E-C236C1D9AB1F}
-               {BAB13141-20F9-4B2D-8C0A-021804ADD077} = {BAB13141-20F9-4B2D-8C0A-021804ADD077}
                {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D} = {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}
-               {374BF775-AF68-4A88-814A-48F692DFFE5A} = {374BF775-AF68-4A88-814A-48F692DFFE5A}
-               {05CF01A0-3C11-443B-B14B-D806C79212F1} = {05CF01A0-3C11-443B-B14B-D806C79212F1}
+               {2D729599-C008-4154-BCCB-53E6A260F220} = {2D729599-C008-4154-BCCB-53E6A260F220}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "btape", "stored\btape\btape.vcproj", "{496415E0-AF44-4AD8-8C99-91B837DDF469}"
        ProjectSection(ProjectDependencies) = postProject
                {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D} = {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}
-               {374BF775-AF68-4A88-814A-48F692DFFE5A} = {374BF775-AF68-4A88-814A-48F692DFFE5A}
-               {05CF01A0-3C11-443B-B14B-D806C79212F1} = {05CF01A0-3C11-443B-B14B-D806C79212F1}
+               {2D729599-C008-4154-BCCB-53E6A260F220} = {2D729599-C008-4154-BCCB-53E6A260F220}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "storelib", "stored\storelib\storelib.vcproj", "{CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcats", "cats\cats.vcproj", "{BAB13141-20F9-4B2D-8C0A-021804ADD077}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mt", "tapetools\mt\mt\mt.vcproj", "{8F29646A-559A-484C-9C73-B3FCE80EDD9C}"
+       ProjectSection(ProjectDependencies) = postProject
+               {2D729599-C008-4154-BCCB-53E6A260F220} = {2D729599-C008-4154-BCCB-53E6A260F220}
+               {8B79A2B5-8889-43D4-9B92-9AE8A6F00413} = {8B79A2B5-8889-43D4-9B92-9AE8A6F00413}
+       EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "postest", "stored\postest\postest.vcproj", "{208D3989-794B-47A2-9D04-D7AEE1524078}"
        ProjectSection(ProjectDependencies) = postProject
-               {05567F02-5DD8-4EB6-9C8E-C236C1D9AB1F} = {05567F02-5DD8-4EB6-9C8E-C236C1D9AB1F}
                {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D} = {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}
-               {374BF775-AF68-4A88-814A-48F692DFFE5A} = {374BF775-AF68-4A88-814A-48F692DFFE5A}
-               {05CF01A0-3C11-443B-B14B-D806C79212F1} = {05CF01A0-3C11-443B-B14B-D806C79212F1}
+               {2D729599-C008-4154-BCCB-53E6A260F220} = {2D729599-C008-4154-BCCB-53E6A260F220}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sleep", "scripts\sleep.vcproj", "{0F56AEB0-14DA-4A80-8962-1F85A17339D0}"
@@ -152,6 +125,66 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Utilities", "Utilities", "{
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Consoles", "Consoles", "{C66C8B3B-C156-4498-91E9-CA9A24CF9051}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bacula", "bacula\bacula.vcproj", "{2D729599-C008-4154-BCCB-53E6A260F220}"
+       ProjectSection(ProjectDependencies) = postProject
+               {374BF775-AF68-4A88-814A-48F692DFFE5A} = {374BF775-AF68-4A88-814A-48F692DFFE5A}
+       EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cats_mysql", "cats\cats_mysql\cats_mysql.vcproj", "{B52BD53B-0E57-4E9A-A601-8E8171BA1CFC}"
+       ProjectSection(ProjectDependencies) = postProject
+               {2D729599-C008-4154-BCCB-53E6A260F220} = {2D729599-C008-4154-BCCB-53E6A260F220}
+               {8B79A2B5-8889-43D4-9B92-9AE8A6F00413} = {8B79A2B5-8889-43D4-9B92-9AE8A6F00413}
+       EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bacula_cats", "cats\bacula_cats\bacula_cats.vcproj", "{8B79A2B5-8889-43D4-9B92-9AE8A6F00413}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dbcheck", "tools\dbcheck\dbcheck.vcproj", "{85696E20-777A-41F6-BC00-2E7AB375B171}"
+       ProjectSection(ProjectDependencies) = postProject
+               {2D729599-C008-4154-BCCB-53E6A260F220} = {2D729599-C008-4154-BCCB-53E6A260F220}
+               {8B79A2B5-8889-43D4-9B92-9AE8A6F00413} = {8B79A2B5-8889-43D4-9B92-9AE8A6F00413}
+       EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cats_pgsql", "cats\cats_pgsql\cats_pgsql.vcproj", "{2FB961E5-213C-4475-8CB3-72F904D40752}"
+       ProjectSection(ProjectDependencies) = postProject
+               {2D729599-C008-4154-BCCB-53E6A260F220} = {2D729599-C008-4154-BCCB-53E6A260F220}
+       EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scsilist", "tools\scsilist\scsilist.vcproj", "{56D8C233-610E-4EE4-A73A-72CEF1C6A33A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cats_bdb", "cats\cats_bdb\cats_bdb.vcproj", "{1E6FC8D7-0A08-461A-B9AB-FD3CC5DC0B9C}"
+       ProjectSection(ProjectDependencies) = postProject
+               {2D729599-C008-4154-BCCB-53E6A260F220} = {2D729599-C008-4154-BCCB-53E6A260F220}
+       EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "installer", "installer\installer.vcproj", "{6D1B0964-FB32-4916-A61C-49D7F715EAD8}"
+       ProjectSection(ProjectDependencies) = postProject
+               {A0F65E06-9F18-40AC-81F6-A080852F1104} = {A0F65E06-9F18-40AC-81F6-A080852F1104}
+               {9BA8E10D-0D82-4B25-8543-DE34641FBC10} = {9BA8E10D-0D82-4B25-8543-DE34641FBC10}
+               {614CE916-0972-4126-9392-CD9FC0ADD7DE} = {614CE916-0972-4126-9392-CD9FC0ADD7DE}
+               {85696E20-777A-41F6-BC00-2E7AB375B171} = {85696E20-777A-41F6-BC00-2E7AB375B171}
+               {E5BC5B2E-976D-4DED-AA07-5DD52BF2163F} = {E5BC5B2E-976D-4DED-AA07-5DD52BF2163F}
+               {56D8C233-610E-4EE4-A73A-72CEF1C6A33A} = {56D8C233-610E-4EE4-A73A-72CEF1C6A33A}
+               {B52BD53B-0E57-4E9A-A601-8E8171BA1CFC} = {B52BD53B-0E57-4E9A-A601-8E8171BA1CFC}
+               {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D} = {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}
+               {F8AF7D74-2918-422B-A7B6-4D98566B7160} = {F8AF7D74-2918-422B-A7B6-4D98566B7160}
+               {374BF775-AF68-4A88-814A-48F692DFFE5A} = {374BF775-AF68-4A88-814A-48F692DFFE5A}
+               {208D3989-794B-47A2-9D04-D7AEE1524078} = {208D3989-794B-47A2-9D04-D7AEE1524078}
+               {6A7AA493-E46C-4994-B8D6-AA6C9C19C9BA} = {6A7AA493-E46C-4994-B8D6-AA6C9C19C9BA}
+               {2D729599-C008-4154-BCCB-53E6A260F220} = {2D729599-C008-4154-BCCB-53E6A260F220}
+               {0F56AEB0-14DA-4A80-8962-1F85A17339D0} = {0F56AEB0-14DA-4A80-8962-1F85A17339D0}
+               {8B79A2B5-8889-43D4-9B92-9AE8A6F00413} = {8B79A2B5-8889-43D4-9B92-9AE8A6F00413}
+               {6A435DBB-4D3D-4DAE-8CB3-E0AF169A240B} = {6A435DBB-4D3D-4DAE-8CB3-E0AF169A240B}
+               {28FB58CE-AB8C-4C60-83DA-BC1BFCC59BFF} = {28FB58CE-AB8C-4C60-83DA-BC1BFCC59BFF}
+               {1E6FC8D7-0A08-461A-B9AB-FD3CC5DC0B9C} = {1E6FC8D7-0A08-461A-B9AB-FD3CC5DC0B9C}
+               {56EADEDB-FBED-4758-8B54-7B0B47ABDABF} = {56EADEDB-FBED-4758-8B54-7B0B47ABDABF}
+               {AAF33ADD-A4F9-4BCA-B7F9-0C35C843CC7E} = {AAF33ADD-A4F9-4BCA-B7F9-0C35C843CC7E}
+               {496415E0-AF44-4AD8-8C99-91B837DDF469} = {496415E0-AF44-4AD8-8C99-91B837DDF469}
+               {2FB961E5-213C-4475-8CB3-72F904D40752} = {2FB961E5-213C-4475-8CB3-72F904D40752}
+               {D03415F7-654E-42F4-B0E9-CB8FBE3F22FA} = {D03415F7-654E-42F4-B0E9-CB8FBE3F22FA}
+               {F5F063F8-11A1-475A-82E2-19759BB40B25} = {F5F063F8-11A1-475A-82E2-19759BB40B25}
+               {558838F9-D792-4F56-AAB2-99C03687C5FF} = {558838F9-D792-4F56-AAB2-99C03687C5FF}
+       EndProjectSection
+EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|Win32 = Debug|Win32
@@ -174,18 +207,10 @@ Global
                {374BF775-AF68-4A88-814A-48F692DFFE5A}.Debug|Win32.Build.0 = Debug|Win32
                {374BF775-AF68-4A88-814A-48F692DFFE5A}.Release|Win32.ActiveCfg = Release|Win32
                {374BF775-AF68-4A88-814A-48F692DFFE5A}.Release|Win32.Build.0 = Release|Win32
-               {05567F02-5DD8-4EB6-9C8E-C236C1D9AB1F}.Debug|Win32.ActiveCfg = Debug|Win32
-               {05567F02-5DD8-4EB6-9C8E-C236C1D9AB1F}.Debug|Win32.Build.0 = Debug|Win32
-               {05567F02-5DD8-4EB6-9C8E-C236C1D9AB1F}.Release|Win32.ActiveCfg = Release|Win32
-               {05567F02-5DD8-4EB6-9C8E-C236C1D9AB1F}.Release|Win32.Build.0 = Release|Win32
                {E5BC5B2E-976D-4DED-AA07-5DD52BF2163F}.Debug|Win32.ActiveCfg = Debug|Win32
                {E5BC5B2E-976D-4DED-AA07-5DD52BF2163F}.Debug|Win32.Build.0 = Debug|Win32
                {E5BC5B2E-976D-4DED-AA07-5DD52BF2163F}.Release|Win32.ActiveCfg = Release|Win32
                {E5BC5B2E-976D-4DED-AA07-5DD52BF2163F}.Release|Win32.Build.0 = Release|Win32
-               {05CF01A0-3C11-443B-B14B-D806C79212F1}.Debug|Win32.ActiveCfg = Debug|Win32
-               {05CF01A0-3C11-443B-B14B-D806C79212F1}.Debug|Win32.Build.0 = Debug|Win32
-               {05CF01A0-3C11-443B-B14B-D806C79212F1}.Release|Win32.ActiveCfg = Release|Win32
-               {05CF01A0-3C11-443B-B14B-D806C79212F1}.Release|Win32.Build.0 = Release|Win32
                {558838F9-D792-4F56-AAB2-99C03687C5FF}.Debug|Win32.ActiveCfg = Debug|Win32
                {558838F9-D792-4F56-AAB2-99C03687C5FF}.Debug|Win32.Build.0 = Debug|Win32
                {558838F9-D792-4F56-AAB2-99C03687C5FF}.Release|Win32.ActiveCfg = Release|Win32
@@ -230,22 +255,44 @@ Global
                {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}.Debug|Win32.Build.0 = Debug|Win32
                {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}.Release|Win32.ActiveCfg = Release|Win32
                {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}.Release|Win32.Build.0 = Release|Win32
-               {BAB13141-20F9-4B2D-8C0A-021804ADD077}.Debug|Win32.ActiveCfg = Debug|Win32
-               {BAB13141-20F9-4B2D-8C0A-021804ADD077}.Debug|Win32.Build.0 = Debug|Win32
-               {BAB13141-20F9-4B2D-8C0A-021804ADD077}.Release|Win32.ActiveCfg = Release|Win32
-               {BAB13141-20F9-4B2D-8C0A-021804ADD077}.Release|Win32.Build.0 = Release|Win32
-               {8F29646A-559A-484C-9C73-B3FCE80EDD9C}.Debug|Win32.ActiveCfg = Debug|Win32
-               {8F29646A-559A-484C-9C73-B3FCE80EDD9C}.Debug|Win32.Build.0 = Debug|Win32
-               {8F29646A-559A-484C-9C73-B3FCE80EDD9C}.Release|Win32.ActiveCfg = Release|Win32
-               {8F29646A-559A-484C-9C73-B3FCE80EDD9C}.Release|Win32.Build.0 = Release|Win32
                {208D3989-794B-47A2-9D04-D7AEE1524078}.Debug|Win32.ActiveCfg = Debug|Win32
-               {208D3989-794B-47A2-9D04-D7AEE1524078}.Debug|Win32.Build.0 = Debug|Win32
                {208D3989-794B-47A2-9D04-D7AEE1524078}.Release|Win32.ActiveCfg = Release|Win32
                {208D3989-794B-47A2-9D04-D7AEE1524078}.Release|Win32.Build.0 = Release|Win32
                {0F56AEB0-14DA-4A80-8962-1F85A17339D0}.Debug|Win32.ActiveCfg = Debug|Win32
                {0F56AEB0-14DA-4A80-8962-1F85A17339D0}.Debug|Win32.Build.0 = Debug|Win32
                {0F56AEB0-14DA-4A80-8962-1F85A17339D0}.Release|Win32.ActiveCfg = Release|Win32
                {0F56AEB0-14DA-4A80-8962-1F85A17339D0}.Release|Win32.Build.0 = Release|Win32
+               {2D729599-C008-4154-BCCB-53E6A260F220}.Debug|Win32.ActiveCfg = Debug|Win32
+               {2D729599-C008-4154-BCCB-53E6A260F220}.Debug|Win32.Build.0 = Debug|Win32
+               {2D729599-C008-4154-BCCB-53E6A260F220}.Release|Win32.ActiveCfg = Release|Win32
+               {2D729599-C008-4154-BCCB-53E6A260F220}.Release|Win32.Build.0 = Release|Win32
+               {B52BD53B-0E57-4E9A-A601-8E8171BA1CFC}.Debug|Win32.ActiveCfg = Debug|Win32
+               {B52BD53B-0E57-4E9A-A601-8E8171BA1CFC}.Debug|Win32.Build.0 = Debug|Win32
+               {B52BD53B-0E57-4E9A-A601-8E8171BA1CFC}.Release|Win32.ActiveCfg = Release|Win32
+               {B52BD53B-0E57-4E9A-A601-8E8171BA1CFC}.Release|Win32.Build.0 = Release|Win32
+               {8B79A2B5-8889-43D4-9B92-9AE8A6F00413}.Debug|Win32.ActiveCfg = Debug|Win32
+               {8B79A2B5-8889-43D4-9B92-9AE8A6F00413}.Debug|Win32.Build.0 = Debug|Win32
+               {8B79A2B5-8889-43D4-9B92-9AE8A6F00413}.Release|Win32.ActiveCfg = Release|Win32
+               {8B79A2B5-8889-43D4-9B92-9AE8A6F00413}.Release|Win32.Build.0 = Release|Win32
+               {85696E20-777A-41F6-BC00-2E7AB375B171}.Debug|Win32.ActiveCfg = Debug|Win32
+               {85696E20-777A-41F6-BC00-2E7AB375B171}.Debug|Win32.Build.0 = Debug|Win32
+               {85696E20-777A-41F6-BC00-2E7AB375B171}.Release|Win32.ActiveCfg = Release|Win32
+               {85696E20-777A-41F6-BC00-2E7AB375B171}.Release|Win32.Build.0 = Release|Win32
+               {2FB961E5-213C-4475-8CB3-72F904D40752}.Debug|Win32.ActiveCfg = Debug|Win32
+               {2FB961E5-213C-4475-8CB3-72F904D40752}.Debug|Win32.Build.0 = Debug|Win32
+               {2FB961E5-213C-4475-8CB3-72F904D40752}.Release|Win32.ActiveCfg = Release|Win32
+               {2FB961E5-213C-4475-8CB3-72F904D40752}.Release|Win32.Build.0 = Release|Win32
+               {56D8C233-610E-4EE4-A73A-72CEF1C6A33A}.Debug|Win32.ActiveCfg = Debug|Win32
+               {56D8C233-610E-4EE4-A73A-72CEF1C6A33A}.Debug|Win32.Build.0 = Debug|Win32
+               {56D8C233-610E-4EE4-A73A-72CEF1C6A33A}.Release|Win32.ActiveCfg = Release|Win32
+               {56D8C233-610E-4EE4-A73A-72CEF1C6A33A}.Release|Win32.Build.0 = Release|Win32
+               {1E6FC8D7-0A08-461A-B9AB-FD3CC5DC0B9C}.Debug|Win32.ActiveCfg = Debug|Win32
+               {1E6FC8D7-0A08-461A-B9AB-FD3CC5DC0B9C}.Debug|Win32.Build.0 = Debug|Win32
+               {1E6FC8D7-0A08-461A-B9AB-FD3CC5DC0B9C}.Release|Win32.ActiveCfg = Release|Win32
+               {1E6FC8D7-0A08-461A-B9AB-FD3CC5DC0B9C}.Release|Win32.Build.0 = Release|Win32
+               {6D1B0964-FB32-4916-A61C-49D7F715EAD8}.Debug|Win32.ActiveCfg = Debug|Win32
+               {6D1B0964-FB32-4916-A61C-49D7F715EAD8}.Release|Win32.ActiveCfg = Release|Win32
+               {6D1B0964-FB32-4916-A61C-49D7F715EAD8}.Release|Win32.Build.0 = Release|Win32
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
@@ -258,11 +305,13 @@ Global
                {28FB58CE-AB8C-4C60-83DA-BC1BFCC59BFF} = {D6767108-F420-41C0-A834-2E6F487E1AB3}
                {208D3989-794B-47A2-9D04-D7AEE1524078} = {D6767108-F420-41C0-A834-2E6F487E1AB3}
                {AAF33ADD-A4F9-4BCA-B7F9-0C35C843CC7E} = {D6767108-F420-41C0-A834-2E6F487E1AB3}
-               {05567F02-5DD8-4EB6-9C8E-C236C1D9AB1F} = {0377E151-3352-487B-A5CF-24BCDC9EC43F}
-               {05CF01A0-3C11-443B-B14B-D806C79212F1} = {0377E151-3352-487B-A5CF-24BCDC9EC43F}
                {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D} = {0377E151-3352-487B-A5CF-24BCDC9EC43F}
-               {BAB13141-20F9-4B2D-8C0A-021804ADD077} = {0377E151-3352-487B-A5CF-24BCDC9EC43F}
                {374BF775-AF68-4A88-814A-48F692DFFE5A} = {0377E151-3352-487B-A5CF-24BCDC9EC43F}
+               {2D729599-C008-4154-BCCB-53E6A260F220} = {0377E151-3352-487B-A5CF-24BCDC9EC43F}
+               {B52BD53B-0E57-4E9A-A601-8E8171BA1CFC} = {0377E151-3352-487B-A5CF-24BCDC9EC43F}
+               {8B79A2B5-8889-43D4-9B92-9AE8A6F00413} = {0377E151-3352-487B-A5CF-24BCDC9EC43F}
+               {2FB961E5-213C-4475-8CB3-72F904D40752} = {0377E151-3352-487B-A5CF-24BCDC9EC43F}
+               {1E6FC8D7-0A08-461A-B9AB-FD3CC5DC0B9C} = {0377E151-3352-487B-A5CF-24BCDC9EC43F}
                {D03415F7-654E-42F4-B0E9-CB8FBE3F22FA} = {B9099DDA-18C9-4DE0-AECB-5D8139EA619F}
                {F5F063F8-11A1-475A-82E2-19759BB40B25} = {B9099DDA-18C9-4DE0-AECB-5D8139EA619F}
                {6A435DBB-4D3D-4DAE-8CB3-E0AF169A240B} = {B9099DDA-18C9-4DE0-AECB-5D8139EA619F}
@@ -271,8 +320,9 @@ Global
                {F8AF7D74-2918-422B-A7B6-4D98566B7160} = {37F903FE-3474-4C93-AD5B-987CB6A92E62}
                {56EADEDB-FBED-4758-8B54-7B0B47ABDABF} = {37F903FE-3474-4C93-AD5B-987CB6A92E62}
                {496415E0-AF44-4AD8-8C99-91B837DDF469} = {37F903FE-3474-4C93-AD5B-987CB6A92E62}
-               {8F29646A-559A-484C-9C73-B3FCE80EDD9C} = {37F903FE-3474-4C93-AD5B-987CB6A92E62}
                {0F56AEB0-14DA-4A80-8962-1F85A17339D0} = {37F903FE-3474-4C93-AD5B-987CB6A92E62}
                {614CE916-0972-4126-9392-CD9FC0ADD7DE} = {37F903FE-3474-4C93-AD5B-987CB6A92E62}
+               {85696E20-777A-41F6-BC00-2E7AB375B171} = {37F903FE-3474-4C93-AD5B-987CB6A92E62}
+               {56D8C233-610E-4EE4-A73A-72CEF1C6A33A} = {37F903FE-3474-4C93-AD5B-987CB6A92E62}
        EndGlobalSection
 EndGlobal
diff --git a/bacula/src/win32/bacula/bacula.vcproj b/bacula/src/win32/bacula/bacula.vcproj
new file mode 100644 (file)
index 0000000..38bff74
--- /dev/null
@@ -0,0 +1,217 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="8.00"
+       Name="bacula"
+       ProjectGUID="{2D729599-C008-4154-BCCB-53E6A260F220}"
+       RootNamespace="bacula"
+       Keyword="Win32Proj"
+       >
+       <Platforms>
+               <Platform
+                       Name="Win32"
+               />
+       </Platforms>
+       <ToolFiles>
+       </ToolFiles>
+       <Configurations>
+               <Configuration
+                       Name="Debug|Win32"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="4"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+                               AdditionalIncludeDirectories="../compat;&quot;../../../../depkgs-msvc/include&quot;;../..;&quot;../../../../depkgs-msvc/include/mysql&quot;;&quot;../../../../depkgs-msvc/vss/inc&quot;"
+                               PreprocessorDefinitions="WIN32;_DEBUG;_LIBWIN32;HAVE_WIN32;WIN32_VSS;USING_DLL;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"
+                               MinimalRebuild="true"
+                               BasicRuntimeChecks="3"
+                               RuntimeLibrary="3"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               Detect64BitPortabilityProblems="true"
+                               DebugInformationFormat="4"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLibrarianTool"
+                               AdditionalDependencies="$(TargetDir)libbac.lib"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Release|Win32"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="4"
+                       CharacterSet="1"
+                       WholeProgramOptimization="1"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               AdditionalIncludeDirectories="../compat;&quot;../../../../depkgs-msvc/include&quot;;../..;&quot;../../../../depkgs-msvc/include/mysql&quot;;&quot;../../../../depkgs-msvc/vss/inc&quot;"
+                               PreprocessorDefinitions="WIN32;NDEBUG;_LIB;HAVE_WIN32;WIN32_VSS;USING_DLL;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"
+                               RuntimeLibrary="2"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               Detect64BitPortabilityProblems="true"
+                               DebugInformationFormat="3"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLibrarianTool"
+                               AdditionalDependencies="$(TargetDir)libbac.lib"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+       </Configurations>
+       <References>
+       </References>
+       <Files>
+               <Filter
+                       Name="Source Files"
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+                       >
+                       <File
+                               RelativePath="..\compat\getopt.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\lib\parse_conf.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\..\lib\res.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Header Files"
+                       Filter="h;hpp;hxx;hm;inl;inc;xsd"
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+                       >
+               </Filter>
+               <Filter
+                       Name="Resource Files"
+                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+                       >
+               </Filter>
+               <File
+                       RelativePath=".\ReadMe.txt"
+                       >
+               </File>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>
index 6803b41f2918a4be1c0a945fe65608a9240a6828..e075400637e2297984f5449668f0f9d82076e76c 100644 (file)
@@ -395,6 +395,24 @@ process_mt()
         do_make Makefile PREFIX=${DEPPKG_DIR} install
 }
 
+process_sed()
+{
+        if get_source "${URL_SED}" "${DIR_SED}" "${MKD_SED}"
+        then
+                echo Patching SED
+                >patch.log
+                do_patch sed.patch
+                echo Configuring SED
+                ./configure --host=mingw32 \
+                            --prefix=${DEPPKG_DIR} \
+                            --disable-nls &>make.log
+       fi
+       echo Building SED
+       do_make Makefile all
+       echo Installing SED
+       do_make Makefile install
+}
+
 if [ "$#" -eq 0 ]
 then
         process_zlib
@@ -409,6 +427,7 @@ then
         process_nsis
         process_mtx
         process_mt
+        process_sed
 else
         for dependency in "$@"
         do
index 3953036c48a3577250d28f8d2da7f7f4465581e3..003e2c7bbb05ec592b5825c9f1776cdca261c5f0 100644 (file)
@@ -1,6 +1,15 @@
 @echo off
 SETLOCAL
 
+SET PERL_PATH=
+FOR /F "tokens=1" %%I in ( "perl.exe" ) DO SET PERL_PATH=%%~$PATH:I
+
+IF NOT "%PERL_PATH%"=="" GOTO :PERL_OK
+ECHO Perl must be in your PATH.  Please fix and rerun this script!
+EXIT /B 1
+
+:PERL_OK
+
 SET CLOBBER_SOURCE=
 
 FOR /F "eol=# delims=| tokens=1-4" %%I in ( External-msvc ) DO SET URL_%%I=%%J & SET DIR_%%I=%%K & SET MKD_%%I=%%L
@@ -12,7 +21,7 @@ SET SCRIPT_DIR=%CD%
 CD ..\..\..
 set TOP_DIR=%CD%
 
-cd %TOP_DIR%/depkgs-win32
+cd %TOP_DIR%/depkgs-msvc
 set DEPPKG_DIR=%CD%
 
 cd %DEPPKG_DIR%
@@ -56,7 +65,7 @@ REM   CALL :process_pcre
        CALL :process_mysql
 REM    CALL :process_sqlite
        CALL :process_postgreSQL
-       CALL :process_wxWidgets
+       CALL :process_wx
 REM    CALL :process_scons
        CALL :process_nsis
        CALL :process_mtx
@@ -76,9 +85,9 @@ REM   CALL :process_scons
        SET MAKE_SRC_ENABLE=%3
        SET BASENAME=
 
-       IF NOT %2=="" GOTO :get_source_make_src
+       IF NOT "%SRC_DIR%"=="" GOTO :get_source_make_src
        FOR %%I IN ( %URL% ) DO (SET BASENAME=%%~nI & IF NOT "%%~xI"==".gz" IF NOT "%%~xI"==".bz2" SET SRC_DIR=%%~nI)
-       IF %SRC_DIR%=="" FOR %%I IN ( %BASENAME% ) DO SET SRC_DIR=%%~nI
+       IF "%SRC_DIR%"=="" FOR %%I IN ( %BASENAME% ) DO SET SRC_DIR=%%~nI
 
 :get_source_make_src
        SET MAKE_SRC_DIR=
@@ -140,6 +149,7 @@ REM CALL :do_nmake win32\Makefile.msc AS=nasmw ASFLAGS= LOC="-D_CRT_SECURE_NO_DE
        XCOPY zlib.lib %DEPPKG_DIR%\lib\ /Y
        XCOPY zdll.lib %DEPPKG_DIR%\lib\ /Y
        XCOPY zlib.h %DEPPKG_DIR%\include\ /Y
+       XCOPY zconf.h %DEPPKG_DIR%\include\ /Y
        EXIT /B 0
 
 :process_pcre
@@ -199,8 +209,11 @@ REM        COPY /Y nul patch.log
 REM    do_patch postgresql.patch
        ECHO Installing postgreSQL
        XCOPY ..\pgsql\include\libpq-fe.h ..\..\include\ /Y 2>&1
-       dlltool -l ..\..\lib\libpgsql.lib -D libpgsql.dll -d src/interfaces/libpq/libpqdll.def
+       XCOPY ..\pgsql\include\postgres_ext.h ..\..\include\ /Y 2>&1
+       LIB /def:src\interfaces\libpq\libpqdll.def /out:..\..\lib\libpqdll.lib /machine:x86 /subsystem:console
        XCOPY ..\pgsql\lib\libpq.dll ..\..\bin\ /Y
+       XCOPY ..\pgsql\lib\comerr32.dll ..\..\bin\ /Y
+       XCOPY ..\pgsql\lib\krb5_32.dll ..\..\bin\ /Y
        XCOPY ..\pgsql\lib\libintl-2.dll ..\..\bin\ /Y
        XCOPY ..\pgsql\lib\libiconv-2.dll ..\..\bin\ /Y
        EXIT /B 0
@@ -229,10 +242,10 @@ REM       do_patch sqlite.patch
        cp -p sqlite3.h %DEPPKG_DIR%/include
        EXIT /B 0
 
-:process_wxWidgets
+:process_wx
        CALL :get_source %URL_WX% %DIR_WX% %MKD_WX%
-       IF ERRORLEVEL 2 GOTO :wxWidgets_error
-REM    IF ERRORLEVEL 1 GOTO :wxWidgets_skip_patch
+       IF ERRORLEVEL 2 GOTO :wx_error
+REM    IF ERRORLEVEL 1 GOTO :wx_skip_patch
 REM    ECHO Patching wxWidgets
 REM    COPY /Y nul patch.log
 REM    do_patch wx1.patch -o build/msw/config.mingw32
@@ -241,19 +254,19 @@ REM       find . -name makefile.gcc -exec sh -c "sed -f %SCRIPT_DIR%/patches/wx.sed {%
        ECHO Building wxWidgets
        cd build\msw
        COPY /Y nul make.log
-       CALL :do_nmake makefile.vc BUILD=release SHARED=1 VENDOR=bacula DEBUG_INFO=1
+       CALL :do_nmake makefile.vc BUILD=release SHARED=1 VENDOR=bacula DEBUG_INFO=1 CPPFLAGS=-D_USE_32BIT_TIME_T
        ECHO Installing wxWidgets
        cd ..\..
        IF EXIST ..\..\include\wx\nul RD /s /q ..\..\include\wx
        XCOPY include\wx ..\..\include\wx\ 2>&1
-       XCOPY include\wx\generic ..\..\include\wx\generic\ 2>&1
-       XCOPY include\wx\msw ..\..\include\wx\msw\ 2>&1
+       XCOPY include\wx\generic ..\..\include\wx\generic\ /e 2>&1
+       XCOPY include\wx\msw ..\..\include\wx\msw\ /e 2>&1
        XCOPY lib\vc_dll\*.dll ..\..\bin\ /y 
        IF EXIST ..\..\lib\wx_dll\nul RD /s /q ..\..\lib\wx_dll
        XCOPY lib\vc_dll\*.lib ..\..\lib\wx_dll\
        XCOPY lib\vc_dll\msw ..\..\lib\wx_dll\msw\ /e 2>&1
        EXIT /B 0
-:wxWidgets_error
+:wx_error
        ECHO Unable to download wxWidgets source from %URL_MTX%
        EXIT /B 1
 
index 19eab109ac26e180e5f5e0ba50f2a6d258b4614f..d935b180cc559e108b46bbcebd34ae4595c56b82 100644 (file)
@@ -52,7 +52,7 @@ LIBS_DLL = \
 
 .PHONY: all clean
 
-all: $(BINDIR)/cats_mysql.dll $(BINDIR)/cats_pgsql.dll $(BINDIR)/cats_bdb.dll
+all: $(LIBDIR)/libcats.a $(BINDIR)/cats_mysql.dll $(BINDIR)/cats_pgsql.dll $(BINDIR)/cats_bdb.dll
 
 clean:
        @echo "Cleaning `pwd`"
diff --git a/bacula/src/win32/cats/bacula_cats/bacula_cats.def b/bacula/src/win32/cats/bacula_cats/bacula_cats.def
new file mode 100644 (file)
index 0000000..0bb2acf
--- /dev/null
@@ -0,0 +1,142 @@
+LIBRARY bacula_cats.dll
+EXPORTS
+
+; bdb.c:
+; mysql.c:
+; postgresql.c:
+; sqlite.c:
+?db_get_type@@YAPBDXZ
+?db_sql_query@@YAHPAUB_DB@@PBDP6AHPAXHPAPAD@Z2@Z
+;?db_next_index@@YAHPAVJCR@@PAUB_DB@@PAD2@Z
+?db_escape_string@@YAXPAD0H@Z
+?db_init_database@@YAPAUB_DB@@PAVJCR@@PBD111H1H@Z
+?db_open_database@@YAHPAVJCR@@PAUB_DB@@@Z
+?db_close_database@@YAXPAVJCR@@PAUB_DB@@@Z
+
+; sql.c:
+?_db_unlock@@YAXPBDHPAUB_DB@@@Z
+?db_strerror@@YAPADPAUB_DB@@@Z
+;?list_dashes@@YAXPAUB_DB@@P6AXPAXPBD@Z1@Z
+;?list_result@@YAXPAVJCR@@PAUB_DB@@P6AXPAXPBD@Z2W4e_list_type@@@Z
+?db_int64_handler@@YAHPAXHPAPAD@Z
+?db_end_transaction@@YAXPAVJCR@@PAUB_DB@@@Z
+;?get_sql_record_max@@YAHPAVJCR@@PAUB_DB@@@Z
+;?split_path_and_file@@YAXPAVJCR@@PAUB_DB@@PBD@Z
+;?check_tables_version@@YA_NPAVJCR@@PAUB_DB@@@Z
+?db_start_transaction@@YAXPAVJCR@@PAUB_DB@@@Z
+;?QueryDB@@YAHPBDHPAVJCR@@PAUB_DB@@PAD@Z
+?_db_lock@@YAXPBDHPAUB_DB@@@Z
+;?DeleteDB@@YAHPBDHPAVJCR@@PAUB_DB@@PAD@Z
+;?InsertDB@@YAHPBDHPAVJCR@@PAUB_DB@@PAD@Z
+;?UpdateDB@@YAHPBDHPAVJCR@@PAUB_DB@@PAD@Z
+
+; sql_cmds.c
+?list_pool@@3PBDB DATA
+?client_backups@@3PBDB DATA
+?del_File@@3PBDB DATA
+?upd_Purged@@3PBDB DATA
+?cnt_DelCand@@3PBDB DATA
+?del_Job@@3PBDB DATA
+?del_JobMedia@@3PBDB DATA
+?cnt_JobMedia@@3PBDB DATA
+?sel_JobMedia@@3PBDB DATA
+?select_job@@3PBDB DATA
+?drop_deltabs@@3PAPBDA DATA
+?create_deltabs@@3PAPBDA DATA
+?insert_delcand@@3PBDB DATA
+?select_backup_del@@3PBDB DATA
+?select_verify_del@@3PBDB DATA
+?select_restore_del@@3PBDB DATA
+?select_admin_del@@3PBDB DATA
+?select_migrate_del@@3PBDB DATA
+?uar_count_files@@3PBDB DATA
+?uar_list_jobs@@3PBDB DATA
+?uar_file@@3PBDB DATA
+?uar_sel_files@@3PBDB DATA
+?uar_del_temp@@3PBDB DATA
+?uar_del_temp1@@3PBDB DATA
+?uar_create_temp@@3PBDB DATA
+?uar_create_temp1@@3PBDB DATA
+?uar_last_full@@3PBDB DATA
+?uar_full@@3PBDB DATA
+?uar_dif@@3PBDB DATA
+?uar_inc@@3PBDB DATA
+?uar_list_temp@@3PBDB DATA
+?uar_sel_jobid_temp@@3PBDB DATA
+?uar_sel_all_temp1@@3PBDB DATA
+?uar_sel_all_temp@@3PBDB DATA
+?uar_sel_fileset@@3PBDB DATA
+?uar_mediatype@@3PBDB DATA
+?uar_jobid_fileindex@@3PBDB DATA
+?uar_jobids_fileindex@@3PBDB DATA
+?uar_jobid_fileindex_from_dir@@3PBDB DATA
+?uar_jobid_fileindex_from_table@@3PBDB DATA
+
+; bdb_create.c:
+; sql_create.c:
+?db_create_job_record@@YA_NPAVJCR@@PAUB_DB@@PAUJOB_DBR@@@Z
+?db_create_jobmedia_record@@YA_NPAVJCR@@PAUB_DB@@PAUJOBMEDIA_DBR@@@Z
+?db_create_pool_record@@YA_NPAVJCR@@PAUB_DB@@PAUPOOL_DBR@@@Z
+;?db_create_device_record@@YA_NPAVJCR@@PAUB_DB@@PAVDEVICE_DBR@@@Z
+?db_create_storage_record@@YA_NPAVJCR@@PAUB_DB@@PAVSTORAGE_DBR@@@Z
+?db_create_mediatype_record@@YA_NPAVJCR@@PAUB_DB@@PAVMEDIATYPE_DBR@@@Z
+?db_create_media_record@@YAHPAVJCR@@PAUB_DB@@PAUMEDIA_DBR@@@Z
+?db_create_client_record@@YAHPAVJCR@@PAUB_DB@@PAUCLIENT_DBR@@@Z
+?db_create_counter_record@@YAHPAVJCR@@PAUB_DB@@PAUCOUNTER_DBR@@@Z
+?db_create_fileset_record@@YA_NPAVJCR@@PAUB_DB@@PAUFILESET_DBR@@@Z
+?db_create_file_attributes_record@@YAHPAVJCR@@PAUB_DB@@PAUATTR_DBR@@@Z
+
+; bdb_delete.c:
+; sql_delete.c:
+?db_delete_pool_record@@YAHPAVJCR@@PAUB_DB@@PAUPOOL_DBR@@@Z
+?db_delete_media_record@@YAHPAVJCR@@PAUB_DB@@PAUMEDIA_DBR@@@Z
+;?db_purge_media_record@@YAHPAVJCR@@PAUB_DB@@PAUMEDIA_DBR@@@Z
+
+; bdb_find.c:
+; sql_find.c:
+?db_find_job_start_time@@YA_NPAVJCR@@PAUB_DB@@PAUJOB_DBR@@PAPAD@Z
+?db_find_failed_job_since@@YA_NPAVJCR@@PAUB_DB@@PAUJOB_DBR@@PADAAH@Z
+?db_find_last_jobid@@YA_NPAVJCR@@PAUB_DB@@PBDPAUJOB_DBR@@@Z
+?db_find_next_volume@@YAHPAVJCR@@PAUB_DB@@H_NPAUMEDIA_DBR@@@Z
+
+; bdb_get.c:
+; sql_get.c:
+?db_get_file_attributes_record@@YAHPAVJCR@@PAUB_DB@@PADPAUJOB_DBR@@PAUFILE_DBR@@@Z
+?db_get_job_record@@YA_NPAVJCR@@PAUB_DB@@PAUJOB_DBR@@@Z
+?db_get_job_volume_names@@YAHPAVJCR@@PAUB_DB@@IPAPAD@Z
+?db_get_job_volume_parameters@@YAHPAVJCR@@PAUB_DB@@IPAPAUVOL_PARAMS@@@Z
+;?db_get_num_pool_records@@YAHPAVJCR@@PAUB_DB@@@Z
+?db_get_pool_ids@@YAHPAVJCR@@PAUB_DB@@PAHPAPAI@Z
+?db_get_client_ids@@YAHPAVJCR@@PAUB_DB@@PAHPAPAI@Z
+?db_get_pool_record@@YA_NPAVJCR@@PAUB_DB@@PAUPOOL_DBR@@@Z
+?db_get_client_record@@YAHPAVJCR@@PAUB_DB@@PAUCLIENT_DBR@@@Z
+;?db_get_counter_record@@YAHPAVJCR@@PAUB_DB@@PAUCOUNTER_DBR@@@Z
+?db_get_fileset_record@@YAHPAVJCR@@PAUB_DB@@PAUFILESET_DBR@@@Z
+;?db_get_num_media_records@@YAHPAVJCR@@PAUB_DB@@@Z
+?db_get_media_ids@@YA_NPAVJCR@@PAUB_DB@@IPAHPAPAI@Z
+?db_get_media_record@@YA_NPAVJCR@@PAUB_DB@@PAUMEDIA_DBR@@@Z
+
+; bdb_list.c:
+; sql_list.c:
+?db_list_sql_query@@YAHPAVJCR@@PAUB_DB@@PBDP6AXPAX2@Z3HW4e_list_type@@@Z
+?db_list_pool_records@@YAXPAVJCR@@PAUB_DB@@PAUPOOL_DBR@@P6AXPAXPBD@Z3W4e_list_type@@@Z
+?db_list_client_records@@YAXPAVJCR@@PAUB_DB@@P6AXPAXPBD@Z2W4e_list_type@@@Z
+?db_list_media_records@@YAXPAVJCR@@PAUB_DB@@PAUMEDIA_DBR@@P6AXPAXPBD@Z3W4e_list_type@@@Z
+?db_list_jobmedia_records@@YAXPAVJCR@@PAUB_DB@@IP6AXPAXPBD@Z2W4e_list_type@@@Z
+?db_list_job_records@@YAXPAVJCR@@PAUB_DB@@PAUJOB_DBR@@P6AXPAXPBD@Z3W4e_list_type@@@Z
+?db_list_job_totals@@YAXPAVJCR@@PAUB_DB@@PAUJOB_DBR@@P6AXPAXPBD@Z3@Z
+?db_list_files_for_job@@YAXPAVJCR@@PAUB_DB@@IP6AXPAXPBD@Z2@Z
+
+; bdb_update.c:
+; sql_update.c:
+?db_add_digest_to_file_record@@YAHPAVJCR@@PAUB_DB@@IPADH@Z
+?db_mark_file_record@@YAHPAVJCR@@PAUB_DB@@II@Z
+?db_update_job_start_record@@YA_NPAVJCR@@PAUB_DB@@PAUJOB_DBR@@@Z
+?db_update_job_end_record@@YAHPAVJCR@@PAUB_DB@@PAUJOB_DBR@@@Z
+?db_update_client_record@@YAHPAVJCR@@PAUB_DB@@PAUCLIENT_DBR@@@Z
+?db_update_counter_record@@YAHPAVJCR@@PAUB_DB@@PAUCOUNTER_DBR@@@Z
+?db_update_pool_record@@YAHPAVJCR@@PAUB_DB@@PAUPOOL_DBR@@@Z
+?db_update_storage_record@@YA_NPAVJCR@@PAUB_DB@@PAVSTORAGE_DBR@@@Z
+?db_update_media_record@@YAHPAVJCR@@PAUB_DB@@PAUMEDIA_DBR@@@Z
+?db_update_media_defaults@@YAHPAVJCR@@PAUB_DB@@PAUMEDIA_DBR@@@Z
+?db_make_inchanger_unique@@YAXPAVJCR@@PAUB_DB@@PAUMEDIA_DBR@@@Z
diff --git a/bacula/src/win32/cats/bacula_cats/bacula_cats.vcproj b/bacula/src/win32/cats/bacula_cats/bacula_cats.vcproj
new file mode 100644 (file)
index 0000000..6c471eb
--- /dev/null
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="8.00"
+       Name="bacula_cats"
+       ProjectGUID="{8B79A2B5-8889-43D4-9B92-9AE8A6F00413}"
+       RootNamespace="bacula_cats"
+       >
+       <Platforms>
+               <Platform
+                       Name="Win32"
+               />
+       </Platforms>
+       <ToolFiles>
+       </ToolFiles>
+       <Configurations>
+               <Configuration
+                       Name="Debug|Win32"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="0"
+                       >
+                       <Tool
+                               Name="VCNMakeTool"
+                               BuildCommandLine="lib /nologo /machine:x86 /out:$(TargetPath) /def:bacula_cats.def"
+                               ReBuildCommandLine="del $(TargetPath)&#x0D;&#x0A;lib /nologo /machine:x86 /out:$(TargetPath) /def:bacula_cats.def&#x0D;&#x0A;"
+                               CleanCommandLine="del $(TargetPath)"
+                               Output="$(OutDir)\$(ProjectName).lib"
+                               PreprocessorDefinitions=""
+                               IncludeSearchPath=""
+                               ForcedIncludes=""
+                               AssemblySearchPath=""
+                               ForcedUsingAssemblies=""
+                               CompileAsManaged=""
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Release|Win32"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="0"
+                       >
+                       <Tool
+                               Name="VCNMakeTool"
+                               BuildCommandLine="lib /nologo /machine:x86 /out:$(TargetPath) /def:bacula_cats.def"
+                               ReBuildCommandLine="del $(TargetPath)&#x0D;&#x0A;lib /nologo /machine:x86 /out:$(TargetPath) /def:bacula_cats.def&#x0D;&#x0A;"
+                               CleanCommandLine="del $(TargetPath)"
+                               Output="$(OutDir)\$(ProjectName).lib"
+                               PreprocessorDefinitions=""
+                               IncludeSearchPath=""
+                               ForcedIncludes=""
+                               AssemblySearchPath=""
+                               ForcedUsingAssemblies=""
+                               CompileAsManaged=""
+                       />
+               </Configuration>
+       </Configurations>
+       <References>
+       </References>
+       <Files>
+               <Filter
+                       Name="Source Files"
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+                       >
+                       <File
+                               RelativePath=".\bacula_cats.def"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                               </FileConfiguration>
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Header Files"
+                       Filter="h;hpp;hxx;hm;inl;inc;xsd"
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+                       >
+               </Filter>
+               <Filter
+                       Name="Resource Files"
+                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+                       >
+               </Filter>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>
index afa2b781cf00394b5463adad6e45ab69a3f47724..09de1b078911b379ec43d91ac5884de2ea4e5a00 100644 (file)
@@ -40,7 +40,7 @@
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="../compat;../..;&quot;../../../../depkgs-win32/pthreads&quot;;&quot;C:\Program Files\MySQL\MySQL Server 5.0\include&quot;"\r
+                               AdditionalIncludeDirectories="../compat;../../../../depkgs-win32/include;../..;../../../../depkgs-win32/include/pthreads;../../../../depkgs-win32/include/mysql;../../../../depkgs-win32/include/postgresql;../../../../depkgs-win32/vss/inc"\r
                                PreprocessorDefinitions="WIN32;_DEBUG;_LIB;HAVE_WIN32;HAVE_MYSQL;WIN32_VSS;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"\r
                                MinimalRebuild="true"\r
                                BasicRuntimeChecks="3"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="../compat;../..;&quot;../../../../depkgs-win32/pthreads&quot;;&quot;C:\Program Files\MySQL\MySQL Server 5.0\include&quot;"\r
+                               AdditionalIncludeDirectories="../compat;../../../../depkgs-win32/include;../..;../../../../depkgs-win32/include/pthreads;../../../../depkgs-win32/include/mysql;../../../../depkgs-win32/include/postgresql;../../../../depkgs-win32/vss/inc"\r
                                PreprocessorDefinitions="WIN32;NDEBUG;_LIB;HAVE_WIN32;WIN32_VSS;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"\r
                                RuntimeLibrary="2"\r
                                EnableFunctionLevelLinking="true"\r
                <Filter\r
                        Name="Source Files"\r
                        Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
                        >\r
                        <File\r
                                RelativePath="..\..\cats\bdb.c"\r
                <Filter\r
                        Name="Header Files"\r
                        Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
                        >\r
                        <File\r
                                RelativePath="..\..\cats\bdb.h"\r
                <Filter\r
                        Name="Resource Files"\r
                        Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
                        >\r
                </Filter>\r
        </Files>\r
diff --git a/bacula/src/win32/cats/cats_bdb/cats_bdb.vcproj b/bacula/src/win32/cats/cats_bdb/cats_bdb.vcproj
new file mode 100644 (file)
index 0000000..757a396
--- /dev/null
@@ -0,0 +1,369 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="8.00"
+       Name="cats_bdb"
+       ProjectGUID="{1E6FC8D7-0A08-461A-B9AB-FD3CC5DC0B9C}"
+       RootNamespace="cats_bdb"
+       Keyword="Win32Proj"
+       >
+       <Platforms>
+               <Platform
+                       Name="Win32"
+               />
+       </Platforms>
+       <ToolFiles>
+       </ToolFiles>
+       <Configurations>
+               <Configuration
+                       Name="Debug|Win32"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="2"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+                               AdditionalIncludeDirectories="../../compat;&quot;../../../../../depkgs-msvc/include&quot;;../../..;&quot;../../../../../depkgs-msvc/include/mysql&quot;;&quot;../../../../../depkgs-msvc/vss/inc&quot;"
+                               PreprocessorDefinitions="WIN32;_DEBUG;_LIB;HAVE_WIN32;HAVE_BACULA_DB;USING_DLL;BUILDING_CATS;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"
+                               MinimalRebuild="true"
+                               BasicRuntimeChecks="3"
+                               RuntimeLibrary="3"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               Detect64BitPortabilityProblems="true"
+                               DebugInformationFormat="4"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="bacula_cats.exp"
+                               AdditionalLibraryDirectories="&quot;../../../../../depkgs-msvc/lib&quot;;&quot;../../$(ConfigurationName)&quot;"
+                               GenerateDebugInformation="true"
+                               SubSystem="2"
+                               TargetMachine="1"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Release|Win32"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="2"
+                       CharacterSet="2"
+                       WholeProgramOptimization="1"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               AdditionalIncludeDirectories="../../compat;&quot;../../../../../depkgs-msvc/include&quot;;../../..;&quot;../../../../../depkgs-msvc/include/mysql&quot;;&quot;../../../../../depkgs-msvc/vss/inc&quot;"
+                               PreprocessorDefinitions="WIN32;NDEBUG;_LIB;HAVE_WIN32;HAVE_BACULA_DB;USING_DLL;BUILDING_CATS;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"
+                               RuntimeLibrary="2"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               Detect64BitPortabilityProblems="true"
+                               DebugInformationFormat="3"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="bacula_cats.exp"
+                               AdditionalLibraryDirectories="&quot;../../../../../depkgs-msvc/lib&quot;;&quot;../../$(ConfigurationName)&quot;"
+                               GenerateDebugInformation="true"
+                               SubSystem="2"
+                               OptimizeReferences="2"
+                               EnableCOMDATFolding="2"
+                               TargetMachine="1"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+       </Configurations>
+       <References>
+       </References>
+       <Files>
+               <Filter
+                       Name="Source Files"
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+                       >
+                       <File
+                               RelativePath="..\..\..\cats\bdb.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cats\bdb_create.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cats\bdb_delete.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cats\bdb_find.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cats\bdb_get.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cats\bdb_list.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cats\bdb_update.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cats\sql_cmds.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Header Files"
+                       Filter="h;hpp;hxx;hm;inl;inc;xsd"
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+                       >
+                       <File
+                               RelativePath="..\..\..\cats\cats.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cats\protos.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cats\sql_cmds.h"
+                               >
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Resource Files"
+                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+                       >
+               </Filter>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>
diff --git a/bacula/src/win32/cats/cats_mysql/cats_mysql.vcproj b/bacula/src/win32/cats/cats_mysql/cats_mysql.vcproj
new file mode 100644 (file)
index 0000000..e7a8a6e
--- /dev/null
@@ -0,0 +1,393 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="8.00"
+       Name="cats_mysql"
+       ProjectGUID="{B52BD53B-0E57-4E9A-A601-8E8171BA1CFC}"
+       RootNamespace="cats_mysql"
+       Keyword="Win32Proj"
+       >
+       <Platforms>
+               <Platform
+                       Name="Win32"
+               />
+       </Platforms>
+       <ToolFiles>
+       </ToolFiles>
+       <Configurations>
+               <Configuration
+                       Name="Debug|Win32"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="2"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+                               AdditionalIncludeDirectories="../../compat;&quot;../../../../../depkgs-msvc/include&quot;;../../..;&quot;../../../../../depkgs-msvc/include/mysql&quot;;&quot;../../../../../depkgs-msvc/vss/inc&quot;"
+                               PreprocessorDefinitions="WIN32;_DEBUG;_LIB;HAVE_WIN32;HAVE_MYSQL;USING_DLL;BUILDING_CATS;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"
+                               MinimalRebuild="true"
+                               BasicRuntimeChecks="3"
+                               RuntimeLibrary="3"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               Detect64BitPortabilityProblems="true"
+                               DebugInformationFormat="4"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="libmysql.lib bacula_cats.exp"
+                               AdditionalLibraryDirectories="&quot;../../../../../depkgs-msvc/lib&quot;;&quot;../../$(ConfigurationName)&quot;"
+                               GenerateDebugInformation="true"
+                               SubSystem="2"
+                               TargetMachine="1"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Release|Win32"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="2"
+                       CharacterSet="2"
+                       WholeProgramOptimization="1"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               AdditionalIncludeDirectories="../../compat;&quot;../../../../../depkgs-msvc/include&quot;;../../..;&quot;../../../../../depkgs-msvc/include/mysql&quot;;&quot;../../../../../depkgs-msvc/vss/inc&quot;"
+                               PreprocessorDefinitions="WIN32;NDEBUG;_LIB;HAVE_WIN32;HAVE_MYSQL;USING_DLL;BUILDING_CATS;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"
+                               RuntimeLibrary="2"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               Detect64BitPortabilityProblems="true"
+                               DebugInformationFormat="3"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="libmysql.lib bacula_cats.exp"
+                               AdditionalLibraryDirectories="&quot;../../../../../depkgs-msvc/lib&quot;;&quot;../../$(ConfigurationName)&quot;"
+                               GenerateDebugInformation="true"
+                               SubSystem="2"
+                               OptimizeReferences="2"
+                               EnableCOMDATFolding="2"
+                               TargetMachine="1"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+       </Configurations>
+       <References>
+       </References>
+       <Files>
+               <Filter
+                       Name="Source Files"
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+                       >
+                       <File
+                               RelativePath="..\..\..\cats\mysql.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cats\sql.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cats\sql_cmds.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cats\sql_create.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cats\sql_delete.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cats\sql_find.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cats\sql_get.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cats\sql_list.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cats\sql_update.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Header Files"
+                       Filter="h;hpp;hxx;hm;inl;inc;xsd"
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+                       >
+                       <File
+                               RelativePath="..\..\..\cats\cats.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cats\protos.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cats\sql_cmds.h"
+                               >
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Resource Files"
+                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+                       >
+               </Filter>
+               <File
+                       RelativePath=".\ReadMe.txt"
+                       >
+               </File>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>
diff --git a/bacula/src/win32/cats/cats_pgsql/cats_pgsql.vcproj b/bacula/src/win32/cats/cats_pgsql/cats_pgsql.vcproj
new file mode 100644 (file)
index 0000000..410ac41
--- /dev/null
@@ -0,0 +1,389 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="8.00"
+       Name="cats_pgsql"
+       ProjectGUID="{2FB961E5-213C-4475-8CB3-72F904D40752}"
+       RootNamespace="cats_pgsql"
+       Keyword="Win32Proj"
+       >
+       <Platforms>
+               <Platform
+                       Name="Win32"
+               />
+       </Platforms>
+       <ToolFiles>
+       </ToolFiles>
+       <Configurations>
+               <Configuration
+                       Name="Debug|Win32"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="2"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+                               AdditionalIncludeDirectories="../../compat;&quot;../../../../../depkgs-msvc/include&quot;;../../..;&quot;../../../../../depkgs-msvc/include/mysql&quot;;&quot;../../../../../depkgs-msvc/vss/inc&quot;"
+                               PreprocessorDefinitions="WIN32;_DEBUG;_LIB;HAVE_WIN32;HAVE_POSTGRESQL;USING_DLL;BUILDING_CATS;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"
+                               MinimalRebuild="true"
+                               BasicRuntimeChecks="3"
+                               RuntimeLibrary="3"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               Detect64BitPortabilityProblems="true"
+                               DebugInformationFormat="4"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="libpqdll.lib bacula_cats.exp"
+                               AdditionalLibraryDirectories="&quot;../../../../../depkgs-msvc/lib&quot;;&quot;../../$(ConfigurationName)&quot;"
+                               GenerateDebugInformation="true"
+                               SubSystem="2"
+                               TargetMachine="1"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Release|Win32"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="2"
+                       CharacterSet="2"
+                       WholeProgramOptimization="1"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               AdditionalIncludeDirectories="../../compat;&quot;../../../../../depkgs-msvc/include&quot;;../../..;&quot;../../../../../depkgs-msvc/include/mysql&quot;;&quot;../../../../../depkgs-msvc/vss/inc&quot;"
+                               PreprocessorDefinitions="WIN32;NDEBUG;_LIB;HAVE_WIN32;HAVE_POSTGRESQL;USING_DLL;BUILDING_CATS;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"
+                               RuntimeLibrary="2"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               Detect64BitPortabilityProblems="true"
+                               DebugInformationFormat="3"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="libpqdll.lib bacula_cats.exp"
+                               AdditionalLibraryDirectories="&quot;../../../../../depkgs-msvc/lib&quot;;&quot;../../$(ConfigurationName)&quot;"
+                               GenerateDebugInformation="true"
+                               SubSystem="2"
+                               OptimizeReferences="2"
+                               EnableCOMDATFolding="2"
+                               TargetMachine="1"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+       </Configurations>
+       <References>
+       </References>
+       <Files>
+               <Filter
+                       Name="Source Files"
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+                       >
+                       <File
+                               RelativePath="..\..\..\cats\postgresql.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cats\sql.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cats\sql_cmds.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cats\sql_create.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cats\sql_delete.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cats\sql_find.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cats\sql_get.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cats\sql_list.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cats\sql_update.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Header Files"
+                       Filter="h;hpp;hxx;hm;inl;inc;xsd"
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+                       >
+                       <File
+                               RelativePath="..\..\..\cats\cats.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cats\protos.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cats\sql_cmds.h"
+                               >
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Resource Files"
+                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+                       >
+               </Filter>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>
index 7026309db0016b676f296d8c6946db6c6c037068..09f97192efe0d770942fc3b3c1f883c0dd8fc124 100644 (file)
@@ -100,9 +100,8 @@ typedef UINT32 gid_t;
 typedef UINT32 uid_t;
 typedef UINT32 gid_t;
 typedef UINT32 mode_t;
-#if !defined(_WX_DEFS_H_)  /* ssize_t is defined in wx/defs.h */
-typedef INT64  ssize_t;
-#endif
+typedef INT32  ssize_t;
+#define HAVE_SSIZE_T 1
 
 #endif /* HAVE_MINGW */
 
@@ -243,20 +242,11 @@ int fork();
 int waitpid(int, int *, int);
 
 #if !defined(HAVE_MINGW)
-int strncasecmp(const char*, const char *, int);
+#define strncasecmp strnicmp
+//int strncasecmp(const char*, const char *, int);
 int utime(const char *filename, struct utimbuf *buf);
-#define vsnprintf __vsnprintf
-int __vsnprintf(char *s, size_t count, const char *format, va_list args);
-
-#define vsprintf __vsprintf
-int __vsprintf(char *s, const char *format, va_list args);
-
-#define snprintf __snprintf
-int __snprintf(char *str, size_t count, const char *fmt, ...);
-
-#define sprintf __sprintf
-int __sprintf(char *str, const char *fmt, ...);
-
+#define vsnprintf _vsnprintf
+#define snprintf _snprintf
 #endif //HAVE_MINGW
 
 
index b4f6401582620abba7ba4c79c8b2e627a6c40c44..a69878ba4181a7c07ab4026b64ac584b5556ba0f 100644 (file)
@@ -40,7 +40,7 @@
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="../compat;../..;&quot;../../../../depkgs-win32/pthreads&quot;;&quot;$(VSSSDK_DIR)&quot;"\r
+                               AdditionalIncludeDirectories="../compat;../../../../depkgs-win32/include;../..;../../../../depkgs-win32/include/pthreads;../../../../depkgs-win32/include/mysql;../../../../depkgs-win32/include/postgresql;../../../../depkgs-win32/vss/inc"\r
                                PreprocessorDefinitions="WIN32;_DEBUG;_LIB;HAVE_WIN32;WIN32_VSS;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"\r
                                MinimalRebuild="true"\r
                                BasicRuntimeChecks="3"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="../compat;../..;&quot;../../../../depkgs-win32/pthreads&quot;;&quot;$(VSSSDK_DIR)&quot;"\r
+                               AdditionalIncludeDirectories="../compat;../../../../depkgs-win32/include;../..;../../../../depkgs-win32/include/pthreads;../../../../depkgs-win32/include/mysql;../../../../depkgs-win32/include/postgresql;../../../../depkgs-win32/vss/inc"\r
                                PreprocessorDefinitions="WIN32;NDEBUG;_LIB;HAVE_WIN32;WIN32_VSS;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"\r
                                RuntimeLibrary="2"\r
                                EnableFunctionLevelLinking="true"\r
                <Filter\r
                        Name="Source Files"\r
                        Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
                        >\r
                        <File\r
                                RelativePath=".\compat.cpp"\r
                <Filter\r
                        Name="Header Files"\r
                        Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
                        >\r
                        <File\r
                                RelativePath=".\alloca.h"\r
                <Filter\r
                        Name="Resource Files"\r
                        Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
                        >\r
                </Filter>\r
        </Files>\r
index 3ca810cc06ec058474c22d5399cc23c7352e255e..87fad3ac4dc9bcb253b1e6dddd5513cfe2260381 100644 (file)
@@ -57,6 +57,9 @@ char *alloca ();
 #endif
 
 #include <stdio.h>
+#if defined(_MSC_VER)
+#include <stdlib.h>
+#endif
 
 /* Comment out all this code if we are using the GNU C Library, and are not
    actually compiling the library itself.  This code is part of the GNU C
@@ -191,8 +194,6 @@ static enum
 /* Avoid depending on library functions or files
    whose names are inconsistent.  */
 
-char *getenv ();
-
 #if 0
 static char *
 my_index (str, chr)
index f7edb452630b1e01c69904c6b0aa0e2cbf29931e..c87851db288458383ad5d9722655d3e9f422ae15 100644 (file)
 #ifndef __WINCONFIG_H
 #define __WINCONFIG_H
 
+#define HAVE_OPENSSL 1
+#define HAVE_CRYPTO 1
+#define HAVE_TLS 1
+
 /* Define if you want to use MySQL as Catalog database */
 /* #undef USE_MYSQL_DB */
 
@@ -29,7 +33,7 @@
 /* #undef ssize_t */
 
 /* Define if you want to use MySQL */
-#define HAVE_MYSQL 1
+/* #define HAVE_MYSQL 1 */
 
 /* Defined if MySQL thread safe library is present */
 /* #undef HAVE_THREAD_SAFE_MYSQL */
 
 /* Define to 1 if you have the `snprintf' function. */
 #define HAVE_SNPRINTF 1
+#define HAVE_SNPRINTF_DECL 1
 
 /* Define to 1 if you have the <stdarg.h> header file. */
-/*#define HAVE_STDARG_H 1*/
+#define HAVE_STDARG_H 1
 
 /* Define to 1 if you have the <stdint.h> header file. */
 /*#define HAVE_STDINT_H 1 */
 
 /* Define to 1 if you have the `vsnprintf' function. */
 #define HAVE_VSNPRINTF 1
+#define HAVE_VSNPRINTF_DECL 1
 
 /* Define to 1 if you have the <zlib.h> header file. */
 #define HAVE_ZLIB_H 1
 /* The size of a `int *', as computed by sizeof. */
 #define SIZEOF_INT_P 4
 
+/* The size of a `long int', as computed by sizeof. */
+#define SIZEOF_LONG 4
+
 /* The size of a `long int', as computed by sizeof. */
 #define SIZEOF_LONG_INT 4
 
 /* The size of a `short int', as computed by sizeof. */
 #define SIZEOF_SHORT_INT 2
 
+/* The size of a `void *', as computed by sizeof. */
+#define SIZEOF_VOID_P 4
+
+/* The size of a `size_t', as computed by sizeof. */
+#define SIZEOF_SIZE_T 4
+
 /* If using the C implementation of alloca, define if you know the
    direction of stack growth for your system; otherwise it will be
    automatically deduced at run-time.
index 9011642292d5129a6ed36c8070ed5eef62e851f8..f58de9368404c22deea885413bf316acef6a2b4e 100644 (file)
@@ -26,8 +26,8 @@
 #define DISTVER  "Win32"
 
 #else
-extern char WIN_VERSION_LONG[];
-extern char WIN_VERSION[];
+extern DLL_IMP_EXP char WIN_VERSION_LONG[];
+extern DLL_IMP_EXP char WIN_VERSION[];
 
 #define HOST_OS  WIN_VERSION_LONG
 #define DISTNAME "MVS"
diff --git a/bacula/src/win32/console/bconsole.conf.in b/bacula/src/win32/console/bconsole.conf.in
deleted file mode 100755 (executable)
index 010797b..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Bacula User Agent (or Console) Configuration File
-#
-
-Director {
-  Name = @hostname@-dir
-  DIRport = @dir_port@
-  address = @hostname@
-  Password = "@dir_password@"
-}
index ff5a9079d478d0f4e8f76f1999291ba068e4170f..e38c482db507d667c9204628d3b152308f641f05 100644 (file)
@@ -45,8 +45,8 @@
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="../compat;../..;../../../../depkgs-win32/pthreads,../../../../depkgs-win32/gettext/include"\r
-                               PreprocessorDefinitions="_DEBUG;HAVE_CONSOLE;_WINMAIN_;PTW32_BUILD;WIN32;_CONSOLE;HAVE_WIN32;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"\r
+                               AdditionalIncludeDirectories="../compat;&quot;../../../../depkgs-msvc/include&quot;;../..;&quot;../../../../depkgs-msvc/include/mysql&quot;"\r
+                               PreprocessorDefinitions="_DEBUG;HAVE_CONSOLE;_WINMAIN_;PTW32_BUILD;WIN32;_CONSOLE;HAVE_WIN32;USING_DLL;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"\r
                                MinimalRebuild="true"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="3"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalDependencies="wsock32.lib pthreadVCEd.lib atlsd.lib"\r
+                               AdditionalDependencies="wsock32.lib pthreadVCE.lib atlsd.lib"\r
                                OutputFile="$(OutDir)\bconsole.exe"\r
                                LinkIncremental="0"\r
                                SuppressStartupBanner="true"\r
-                               AdditionalLibraryDirectories="../../../../depkgs-win32/pthreads/debug;../../../../depkgs-win32/gettext/lib"\r
+                               AdditionalLibraryDirectories="../../../../depkgs-msvc/lib"\r
                                GenerateDebugInformation="true"\r
                                SubSystem="1"\r
                                TargetMachine="1"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="4"\r
-                               AdditionalIncludeDirectories="../compat,../..,../../../../depkgs-win32/pthreads;../../../../depkgs-win32/gettext/include"\r
-                               PreprocessorDefinitions="NDEBUG;HAVE_CONSOLE;_WINMAIN_;PTW32_BUILD;WIN32;_CONSOLE;HAVE_WIN32;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"\r
+                               AdditionalIncludeDirectories="../compat;&quot;../../../../depkgs-msvc/include&quot;;../..;&quot;../../../../depkgs-msvc/include/mysql&quot;"\r
+                               PreprocessorDefinitions="NDEBUG;HAVE_CONSOLE;_WINMAIN_;PTW32_BUILD;WIN32;_CONSOLE;HAVE_WIN32;USING_DLL;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"\r
                                StringPooling="true"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="2"\r
                                OutputFile="$(OutDir)\bconsole.exe"\r
                                LinkIncremental="0"\r
                                SuppressStartupBanner="true"\r
-                               AdditionalLibraryDirectories="&quot;../../../../depkgs-win32/pthreads/release&quot;;&quot;../../../../depkgs-win32/gettext/lib&quot;"\r
+                               AdditionalLibraryDirectories="../../../../depkgs-msvc/lib"\r
                                GenerateDebugInformation="true"\r
                                SubSystem="1"\r
                                TargetMachine="1"\r
                <Filter\r
                        Name="Source Files"\r
                        Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
                        >\r
                        <File\r
                                RelativePath="..\..\console\authenticate.c"\r
                <Filter\r
                        Name="Header Files"\r
                        Filter="h;hpp;hxx;hm;inl"\r
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
                        >\r
                </Filter>\r
                <Filter\r
                        Name="Resource Files"\r
                        Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"\r
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
                        >\r
                </Filter>\r
        </Files>\r
index fe53a08ff18f466015296c2201d884c4adc547aa..0cd5f7444b12e73c00d27fa6818e61efc1d80958 100644 (file)
@@ -12,9 +12,6 @@
                />\r
        </Platforms>\r
        <ToolFiles>\r
-               <ToolFile\r
-                       RelativePath="..\bacula.rules"\r
-               />\r
        </ToolFiles>\r
        <Configurations>\r
                <Configuration\r
@@ -34,9 +31,6 @@
                        <Tool\r
                                Name="VCCustomBuildTool"\r
                        />\r
-                       <Tool\r
-                               Name="Generated Config Files"\r
-                       />\r
                        <Tool\r
                                Name="VCXMLDataGeneratorTool"\r
                        />\r
@@ -53,8 +47,8 @@
                                Optimization="3"\r
                                InlineFunctionExpansion="2"\r
                                EnableIntrinsicFunctions="true"\r
-                               AdditionalIncludeDirectories="../compat;../..;&quot;../../../../depkgs-win32/pthreads&quot;;&quot;../../../../depkgs-win32/zlib&quot;;&quot;../../../../depkgs-win32/gettext/include&quot;"\r
-                               PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;HAVE_WIN32;_USE_32BIT_TIME_T;WIN32_VSS;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"\r
+                               AdditionalIncludeDirectories="../compat;&quot;../../../../depkgs-msvc/include&quot;;../.."\r
+                               PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;HAVE_WIN32;USING_DLL;USING_CATS;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"\r
                                StringPooling="true"\r
                                RuntimeLibrary="2"\r
                                EnableFunctionLevelLinking="true"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalDependencies="pthreadVCE.lib libmysql.lib zlib.lib wsock32.lib atls.lib"\r
+                               AdditionalDependencies="bacula_cats.lib pthreadVCE.lib libmysql.lib zlib.lib wsock32.lib atls.lib"\r
                                OutputFile="$(OutDir)\bacula-dir.exe"\r
                                LinkIncremental="0"\r
                                SuppressStartupBanner="true"\r
-                               AdditionalLibraryDirectories="&quot;..\..\..\..\depkgs-win32\pthreads\release&quot;;&quot;..\..\..\..\depkgs-win32\zlib\release&quot;;&quot;..\..\..\..\depkgs-win32\gettext\lib&quot;;&quot;%VSSSDK_DIR%\lib\win2003\obj\i386&quot;;&quot;C:\Program Files\MySQL\MySQL Server 5.0\lib\opt&quot;"\r
+                               AdditionalLibraryDirectories="&quot;../../../../depkgs-msvc/lib&quot;;&quot;$(SolutionDir)$(ConfigurationName)&quot;"\r
                                IgnoreDefaultLibraryNames=""\r
                                DelayLoadDLLs="$(NOINHERIT)"\r
                                GenerateDebugInformation="true"\r
                        <Tool\r
                                Name="VCCustomBuildTool"\r
                        />\r
-                       <Tool\r
-                               Name="Generated Config Files"\r
-                       />\r
                        <Tool\r
                                Name="VCXMLDataGeneratorTool"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="../compat;../..;&quot;../../../../depkgs-win32/pthreads&quot;;&quot;../../../../depkgs-win32/zlib&quot;;&quot;../../../../depkgs-win32/gettext/include&quot;"\r
-                               PreprocessorDefinitions="_DEBUG;_WINMAIN_;PTW32_BUILD;WIN32;_CONSOLE;HAVE_WIN32;_USE_32BIT_TIME_T;WIN32_VSS;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"\r
+                               AdditionalIncludeDirectories="../compat;&quot;../../../../depkgs-msvc/include&quot;;../.."\r
+                               PreprocessorDefinitions="_DEBUG;_WINMAIN_;PTW32_BUILD;WIN32;_CONSOLE;HAVE_WIN32;USING_DLL;USING_CATS;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"\r
                                MinimalRebuild="true"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="3"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalDependencies="pthreadVCEd.lib zlibd.lib wsock32.lib atlsd.lib libmysql.lib"\r
+                               AdditionalDependencies="bacula_cats.lib pthreadVCE.lib zlib.lib wsock32.lib atlsd.lib"\r
                                OutputFile="$(OutDir)\bacula-dir.exe"\r
                                LinkIncremental="0"\r
                                SuppressStartupBanner="true"\r
-                               AdditionalLibraryDirectories="&quot;../../../../depkgs-win32/pthreads/debug&quot;;&quot;../../../../depkgs-win32/zlib/debug&quot;;&quot;../../../../depkgs-win32/gettext/lib&quot;;&quot;C:\Program Files\MySQL\MySQL Server 5.0\lib\opt&quot;"\r
+                               AdditionalLibraryDirectories="&quot;../../../../depkgs-msvc/lib&quot;;&quot;$(SolutionDir)$(ConfigurationName)&quot;"\r
                                IgnoreDefaultLibraryNames=""\r
                                GenerateDebugInformation="true"\r
                                SubSystem="2"\r
                <Filter\r
                        Name="Source Files"\r
                        Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
                        >\r
                        <File\r
                                RelativePath="..\..\dird\admin.c"\r
                                        />\r
                                </FileConfiguration>\r
                        </File>\r
-                       <File\r
-                               RelativePath="..\..\dird\sql_cmds.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               CompileAs="2"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               CompileAs="2"\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
                        <File\r
                                RelativePath="..\..\dird\ua_acl.c"\r
                                >\r
                <Filter\r
                        Name="Header Files"\r
                        Filter="h;hpp;hxx;hm;inl"\r
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
                        >\r
                        <File\r
                                RelativePath="..\..\dird\bsr.h"\r
                <Filter\r
                        Name="Resource Files"\r
                        Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"\r
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
                        >\r
                </Filter>\r
        </Files>\r
index dad80940fe5aefd9feca0d523bd71bc2fcd5eb3f..12eec7029037db760fab4401c901aeb659b1df10 100644 (file)
@@ -1,35 +1,28 @@
 /*
-   Copyright (C) 2000-2005 Kern Sibbald
+   Copyright (C) 2000-2006 Kern Sibbald
 
    This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2 of
-   the License, or (at your option) any later version.
+   modify it under the terms of the GNU General Public License
+   version 2 as amended with additional clauses defined in the
+   file LICENSE in the main source directory.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU General Public
-   License along with this program; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-   MA 02111-1307, USA.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
+   the file LICENSE for additional details.
 
    This file is patterned after the VNC Win32 code by ATT
   
 */
 
-
 #include <unistd.h>
 #include <ctype.h>
-#include <bacula.h>
-#include <signal.h>
-#include <pthread.h>
 
+#include "bacula.h"
 #include "winbacula.h"
-//#include "wintray.h"
 #include "winservice.h"
+#include <signal.h>
+#include <pthread.h>
 
 extern int BaculaMain(int argc, char *argv[]);
 extern void terminate_dird(int sig);
@@ -39,14 +32,15 @@ extern void d_msg(const char *, int, int, const char *, ...);
 
 /* Globals */
 HINSTANCE       hAppInstance;
-const char      *szAppName = "Bacula";
+const char      *szAppName = "Bacula-dir";
 DWORD           mainthreadId;
+bool            silent = false;
 
 /* Imported variables */
 extern DWORD    g_servicethread;
 
 #define MAX_COMMAND_ARGS 100
-static char *command_args[MAX_COMMAND_ARGS] = {"bacula-dird", NULL};
+static char *command_args[MAX_COMMAND_ARGS] = {"bacula-dir", NULL};
 static int num_command_args = 1;
 static pid_t main_pid;
 static pthread_t main_tid;
@@ -97,7 +91,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
    for (i=1;i<MAX_COMMAND_ARGS;i++)
       command_args[i] = NULL;
 
-   wordPtr = szCmdLine;
+   char *pszArgs = bstrdup(szCmdLine);
+   wordPtr = pszArgs;
    quote = 0;
    while  (*wordPtr && (*wordPtr == ' ' || *wordPtr == '\t'))
       wordPtr++;
@@ -116,7 +111,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
          tempPtr = wordPtr;
          if (quote) {
             while (*tempPtr && *tempPtr != '\"')
-            tempPtr++;
+               tempPtr++;
             quote = 0;
          } else {
             while (*tempPtr && *tempPtr != ' ')
@@ -137,81 +132,55 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
 
    /*
     * Now process Windows command line options
-    *   as defined by ATT
-    *
-    * Make the command-line lowercase and parse it
     */
-   for (i = 0; i < (int)strlen(szCmdLine); i++) {
-      szCmdLine[i] = tolower(szCmdLine[i]);
-   }
-
    bool argfound = false;
    for (i = 0; i < (int)strlen(szCmdLine); i++) {
       if (szCmdLine[i] <= ' ') {
          continue;
       }
 
-      if (szCmdLine[i] == '-') {
-         while (szCmdLine[i] && szCmdLine[i] != ' ') {
-            i++;
-         }
-         continue;
+      if (szCmdLine[i] != '/') {
+         break;
       }
 
       argfound = true;
 
       /* Now check for command-line arguments */
 
-      /* /service helper - probably only needed on win9x */
-      if (strncmp(&szCmdLine[i], BaculaRunServiceHelper, strlen(BaculaRunServiceHelper)) == 0
-          && g_platform_id == VER_PLATFORM_WIN32_NT) {
-         /* exit with result "okay" */
-         return 0;          
+      /* /silent install quietly -- no prompts */
+      if (strnicmp(&szCmdLine[i], "/silent", strlen("/silent")) == 0) {
+         silent = true;
+         i += strlen("/silent");
+         continue;
       }
 
       /* /service start service */
-      if (strncmp(&szCmdLine[i], BaculaRunService, strlen(BaculaRunService)) == 0) {
+      if (strnicmp(&szCmdLine[i], BaculaRunService, strlen(BaculaRunService)) == 0) {
          /* Run Bacula as a service */
          return bacService::BaculaServiceMain();
       }
       /* /run  (this is the default if no command line arguments) */
-      if (strncmp(&szCmdLine[i], BaculaRunAsUserApp, strlen(BaculaRunAsUserApp)) == 0) {
+      if (strnicmp(&szCmdLine[i], BaculaRunAsUserApp, strlen(BaculaRunAsUserApp)) == 0) {
          /* Bacula is being run as a user-level program */
          return BaculaAppMain();
       }
       /* /install */
-      if (strncmp(&szCmdLine[i], BaculaInstallService, strlen(BaculaInstallService)) == 0) {
+      if (strnicmp(&szCmdLine[i], BaculaInstallService, strlen(BaculaInstallService)) == 0) {
          /* Install Bacula as a service */
-         bacService::InstallService();
+         bacService::InstallService(&szCmdLine[i + strlen(BaculaInstallService)]);
          i += strlen(BaculaInstallService);
          continue;
       }
       /* /remove */
-      if (strncmp(&szCmdLine[i], BaculaRemoveService, strlen(BaculaRemoveService)) == 0) {
+      if (strnicmp(&szCmdLine[i], BaculaRemoveService, strlen(BaculaRemoveService)) == 0) {
          /* Remove the Bacula service */
          bacService::RemoveService();
          i += strlen(BaculaRemoveService);
          continue;
       }
 
-      /* /about */
-      if (strncmp(&szCmdLine[i], BaculaShowAbout, strlen(BaculaShowAbout)) == 0) {
-         /* Show Bacula's about box */
-         bacService::ShowAboutBox();
-         i += strlen(BaculaShowAbout);
-         continue;
-      }
-
-      /* /status */
-      if (strncmp(&szCmdLine[i], BaculaShowStatus, strlen(BaculaShowStatus)) == 0) {
-         /* Show Bacula's status box */                             
-         bacService::ShowStatus();
-         i += strlen(BaculaShowStatus);
-         continue;
-      }
-
       /* /kill */
-      if (strncmp(&szCmdLine[i], BaculaKillRunningCopy, strlen(BaculaKillRunningCopy)) == 0) {
+      if (strnicmp(&szCmdLine[i], BaculaKillRunningCopy, strlen(BaculaKillRunningCopy)) == 0) {
          /* Kill running copy of Bacula */
          bacService::KillRunningCopy();
          i += strlen(BaculaKillRunningCopy);
@@ -219,7 +188,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
       }
 
       /* /help */
-      if (strncmp(&szCmdLine[i], BaculaShowHelp, strlen(BaculaShowHelp)) == 0) {
+      if (strnicmp(&szCmdLine[i], BaculaShowHelp, strlen(BaculaShowHelp)) == 0) {
          MessageBox(NULL, BaculaUsageText, _("Bacula Usage"), MB_OK|MB_ICONINFORMATION);
          i += strlen(BaculaShowHelp);
          continue;
@@ -258,15 +227,6 @@ void *Main_Msg_Loop(LPVOID lpwThreadParam)
     */
    g_servicethread = GetCurrentThreadId();
 
-#if 0
-   /* Create tray icon & menu if we're running as an app */
-   bacMenu *menu = new bacMenu();
-   if (menu == NULL) {
-//    log_error_message("Could not create sys tray menu");
-      PostQuitMessage(0);
-   }
-#endif
-
    /* Now enter the Windows message handling loop until told to quit! */
    MSG msg;
    while (GetMessage(&msg, NULL, 0,0) ) {
@@ -274,12 +234,6 @@ void *Main_Msg_Loop(LPVOID lpwThreadParam)
       DispatchMessage(&msg);
    }
 
-#if 0
-   if (menu != NULL) {
-      delete menu;
-   }
-#endif
-
    if (old_servicethread != 0) { /* started as NT service */
       /* Mark that we're no longer running */
       g_servicethread = 0;
@@ -328,7 +282,6 @@ int BaculaAppMain()
 #endif
 
    /* Create a thread to handle the Windows messages */
-// (void)CreateThread(NULL, 0, Main_Msg_Loop, NULL, 0, &dwThreadID);
    pthread_create(&tid, NULL,  Main_Msg_Loop, (void *)0);
 
    /* Call the "real" Bacula */
index 15521bf521a5a222cc8c0c0ca222a01f27cb083c..e9169b72fe9e502bd05e7e0c4c1cc143c7b89181 100644 (file)
@@ -25,7 +25,7 @@
 // by Kern E. Sibbald.  Many thanks to ATT and James Weatherall,
 // the original author, for providing an excellent template.
 //
-// Copyright (2000-2003) Kern E. Sibbald
+// Copyright (C) 2000-2006 Kern E. Sibbald
 //
 
 
@@ -40,8 +40,6 @@
 #include "bacula.h"
 #include "winbacula.h"
 #include "winservice.h"
-//#include "wintray.h"
-
 
 void set_service_description(SC_HANDLE hSCManager, SC_HANDLE hService,
                              LPSTR lpDesc);
@@ -53,114 +51,14 @@ void set_service_description(SC_HANDLE hSCManager, SC_HANDLE hService,
 
 bacService init;
 
-
-bacService::bacService()
-{
-   OSVERSIONINFO osversioninfo;
-   osversioninfo.dwOSVersionInfoSize = sizeof(osversioninfo);
-
-   // Get the current OS version
-   if (!GetVersionEx(&osversioninfo)) {
-      g_platform_id = 0;
-   } else {
-      g_platform_id = osversioninfo.dwPlatformId;
-   }
-}
-
-
-// IsWin95 - returns a BOOL indicating whether the current OS is Win95
-BOOL
-bacService::IsWin95()
-{
-   return (g_platform_id == VER_PLATFORM_WIN32_WINDOWS);
-}
-
-// IsWinNT - returns a bool indicating whether the current OS is WinNT
-BOOL
-bacService::IsWinNT()
-{
-   return (g_platform_id == VER_PLATFORM_WIN32_NT);
-}
-
-// Internal routine to find the  Bacula menu class window and
-// post a message to it!
-
-BOOL
-PostToBacula(UINT message, WPARAM wParam, LPARAM lParam)
-{
-#if 0
-  // Locate the hidden Bacula menu window
-  HWND hservwnd = FindWindow(MENU_CLASS_NAME, NULL);
-  if (hservwnd == NULL) {
-     return FALSE;
-  }
-
-  // Post the message to Bacula
-  PostMessage(hservwnd, message, wParam, lParam);
-#endif
-  return FALSE;
-}
-
-
-// Static routine to show the Properties dialog for a currently-running
-// copy of Bacula, (usually a servicified version.)
-
-BOOL
-bacService::ShowProperties()
-{
-   return TRUE;
-}
-
-// Static routine to show the Default Properties dialog for a currently-running
-// copy of Bacula, (usually a servicified version.)
-
-BOOL
-bacService::ShowDefaultProperties()
-{
-   return TRUE;
-}
-
-// Static routine to show the About dialog for a currently-running
-// copy of Bacula, (usually a servicified version.)
-
-BOOL
-bacService::ShowAboutBox()
-{
-#if 0
-  // Post to the Bacula menu window
-  if (!PostToBacula(MENU_ABOUTBOX_SHOW, 0, 0)) {
-     MessageBox(NULL, _("No existing instance of Bacula could be contacted"), szAppName, MB_ICONEXCLAMATION | MB_OK);
-     return FALSE;
-  }
-#endif
-  return TRUE;
-}
-
-// Static routine to show the Status dialog for a currently-running
-// copy of Bacula, (usually a servicified version.)
-
-BOOL
-bacService::ShowStatus()
-{
-#if 0
-  // Post to the Bacula menu window
-  if (!PostToBacula(MENU_STATUS_SHOW, 0, 0)) {
-     MessageBox(NULL, _("No existing instance of Bacula could be contacted"), szAppName, MB_ICONEXCLAMATION | MB_OK);
-     return FALSE;
-  }
-#endif
-  return TRUE;
-}
+extern bool    silent;
 
 // SERVICE-MODE ROUTINES
 
 // Service-mode defines:
 
-// Executable name
-#define BAC_APPNAME            "baculadir"
-
 // Internal service name
-#define BAC_SERVICENAME        "Baculadir"
+#define BAC_SERVICENAME        "Bacula-dir"
 
 // Displayed service name
 #define BAC_SERVICEDISPLAYNAME "Bacula Director"
@@ -198,8 +96,8 @@ bacService::RunningAsService()
 BOOL
 bacService::KillRunningCopy()
 {
-  while (PostToBacula(WM_CLOSE, 0, 0))
-      {  }
+//  while (PostToBacula(WM_CLOSE, 0, 0))
+//      {  }
   return TRUE;
 }
 
@@ -210,62 +108,17 @@ bacService::BaculaServiceMain()
    // Mark that we are a service
    g_servicemode = TRUE;
 
-   // How to run as a service depends upon the OS being used
-   switch (g_platform_id) {
-
-   // Windows 95/98/Me
-   case VER_PLATFORM_WIN32_WINDOWS:
-      {
-      // Obtain a handle to the kernel library
-      HINSTANCE kerneldll = LoadLibrary("KERNEL32.DLL");
-      if (kerneldll == NULL) {
-         MessageBox(NULL, _("KERNEL32.DLL not found: Bacula service not started"), 
-             "Bacula Service", MB_OK);
-         break;
-      }
-
-      // And find the RegisterServiceProcess function
-      DWORD (WINAPI *RegisterService)(DWORD, DWORD);
-      RegisterService = (DWORD (WINAPI *)(DWORD, DWORD))
-              GetProcAddress(kerneldll, "RegisterServiceProcess");
-      if (RegisterService == NULL) {
-         MessageBox(NULL, _("Registry service not found: Bacula service not started"),
-            "Bacula Service", MB_OK);
-         log_error_message(_("Registry service not found")); 
-         break;
-      }
-      
-      // Register this process with the OS as a service!
-      RegisterService(0, 1);
-
-      // Run the main program as a service
-      BaculaAppMain();
-
-      // Then remove the service from the system service table
-      RegisterService(0, 0);
-
-      // Free the kernel library
-      FreeLibrary(kerneldll);
-      break;
-      }
-
+   // Create a service entry table
+   SERVICE_TABLE_ENTRY dispatchTable[] = {
+      {BAC_SERVICENAME, (LPSERVICE_MAIN_FUNCTION)ServiceMain},
+      {NULL, NULL}
+   };
 
-   // Windows NT, Win2K, WinXP 
-   case VER_PLATFORM_WIN32_NT:
-      {
-      // Create a service entry table
-      SERVICE_TABLE_ENTRY dispatchTable[] = {
-         {BAC_SERVICENAME, (LPSERVICE_MAIN_FUNCTION)ServiceMain},
-         {NULL, NULL}
-      };
+   // Call the service control dispatcher with our entry table
+   if (!StartServiceCtrlDispatcher(dispatchTable)) {
+      log_error_message(_("StartServiceCtrlDispatcher failed."));
+   }
 
-      // Call the service control dispatcher with our entry table
-      if (!StartServiceCtrlDispatcher(dispatchTable)) {
-         log_error_message(_("StartServiceCtrlDispatcher failed."));
-      }
-      break;
-      } /* end case */
-   } /* end switch */
    return 0;
 }
 
@@ -347,32 +200,21 @@ void ServiceStop()
 
 // SERVICE INSTALL ROUTINE
 int
-bacService::InstallService()
+bacService::InstallService(const char *pszCmdLine)
 {
    const int pathlength = 2048;
    char path[pathlength];
    char servicecmd[pathlength];
-   int len;
 
    // Get the filename of this executable
    if (GetModuleFileName(NULL, path, pathlength-(strlen(BaculaRunService)+2)) == 0) {
-      MessageBox(NULL, _("Unable to install Bacula service"), szAppName, MB_ICONEXCLAMATION | MB_OK);
+      MessageBox(NULL, _("Unable to install Bacula Director service"), szAppName, MB_ICONEXCLAMATION | MB_OK);
       return 0;
    }
 
    // Append the service-start flag to the end of the path:
-   if ((int)strlen(path) + 20 + (int)strlen(BaculaRunService) < pathlength) {
-      sprintf(servicecmd, "\"%s\" %s -c \"%s", path, BaculaRunService, path);
-      len = strlen(servicecmd) - 1;
-      for ( ; len > 0; len--) {
-         if (servicecmd[len] == '\\') {
-            servicecmd[len+1] = 0;
-            break;
-         }
-         servicecmd[len] = 0;
-      }
-      strcat(servicecmd, "bacula-dir.conf\"");
-
+   if ((int)strlen(path) + 5 + (int)strlen(BaculaRunService) + (int)strlen(pszCmdLine) < pathlength) {
+      sprintf(servicecmd, "\"%s\" %s %s", path, BaculaRunService, pszCmdLine);
    } else {
       log_error_message(_("Service command length too long")); 
       MessageBox(NULL, _("Service command length too long. Service not registered."),
@@ -380,104 +222,59 @@ bacService::InstallService()
       return 0;
    }
 
-   // How to add the Bacula service depends upon the OS
-   switch (g_platform_id) {
-
-   // Windows 95/98/Me
-   case VER_PLATFORM_WIN32_WINDOWS:
-      // Locate the RunService registry entry
-      HKEY runservices;
-      if (RegCreateKey(HKEY_LOCAL_MACHINE, 
-              "Software\\Microsoft\\Windows\\CurrentVersion\\RunServices",
-              &runservices) != ERROR_SUCCESS) {
-         log_error_message(_("Cannot write System Registry")); 
-         MessageBox(NULL, _("The System Registry could not be updated - the Bacula service was not installed"), szAppName, MB_ICONEXCLAMATION | MB_OK);
-         break;
-      }
-
-      // Attempt to add a Bacula key
-      if (RegSetValueEx(runservices, szAppName, 0, REG_SZ, (unsigned char *)servicecmd, strlen(servicecmd)+1) != ERROR_SUCCESS) {
-         RegCloseKey(runservices);
-         log_error_message(_("Cannot add Bacula key to System Registry")); 
-         MessageBox(NULL, _("The Bacula service could not be installed"), szAppName, MB_ICONEXCLAMATION | MB_OK);
-         break;
-      }
-
-      RegCloseKey(runservices);
+   SC_HANDLE   hservice;
+   SC_HANDLE   hsrvmanager;
 
-      // We have successfully installed the service!
+   // Open the default, local Service Control Manager database
+   hsrvmanager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
+   if (hsrvmanager == NULL) {
+      log_error_message("OpenSCManager failed"); 
       MessageBox(NULL,
-              _("The Bacula File service was successfully installed.\n"
-              "The service may be started by double clicking on the\n"
-              "Bacula \"Start\" icon and will be automatically\n"
-              "be run the next time this machine is rebooted. "),
-              szAppName,
-              MB_ICONINFORMATION | MB_OK);
-      break;
-
-   // Windows NT, Win2K, WinXP
-   case VER_PLATFORM_WIN32_NT:
-      SC_HANDLE   hservice;
-      SC_HANDLE   hsrvmanager;
-
-      // Open the default, local Service Control Manager database
-      hsrvmanager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
-      if (hsrvmanager == NULL) {
-         log_error_message("OpenSCManager failed"); 
-         MessageBox(NULL,
-            _("The Service Control Manager could not be contacted - the Bacula service was not installed"),
-            szAppName, MB_ICONEXCLAMATION | MB_OK);
-         break;
-      }
+         _("The Service Control Manager could not be contacted - the Bacula Director service was not installed"),
+         szAppName, MB_ICONEXCLAMATION | MB_OK);
+      return 0;
+   }
 
-      // Create an entry for the Bacula service
-      hservice = CreateService(
-              hsrvmanager,                    // SCManager database
-              BAC_SERVICENAME,                // name of service
-              BAC_SERVICEDISPLAYNAME,         // name to display
-              SERVICE_ALL_ACCESS,             // desired access
-              SERVICE_WIN32_OWN_PROCESS | SERVICE_INTERACTIVE_PROCESS,
-                                                                      // service type
-              SERVICE_AUTO_START,             // start type
-              SERVICE_ERROR_NORMAL,           // error control type
-              servicecmd,                     // service's binary
-              NULL,                           // no load ordering group
-              NULL,                           // no tag identifier
-              BAC_DEPENDENCIES,               // dependencies
-              NULL,                           // LocalSystem account
-              NULL);                          // no password
-      if (hservice == NULL) {
-         CloseServiceHandle(hsrvmanager);
-         log_error_message("CreateService failed"); 
-         MessageBox(NULL,
-             _("The Bacula service could not be installed"),
-              szAppName, MB_ICONEXCLAMATION | MB_OK);
-         break;
-      }
+   // Create an entry for the Bacula service
+   hservice = CreateService(
+           hsrvmanager,                    // SCManager database
+           BAC_SERVICENAME,                // name of service
+           BAC_SERVICEDISPLAYNAME,         // name to display
+           SERVICE_ALL_ACCESS,             // desired access
+           SERVICE_WIN32_OWN_PROCESS | SERVICE_INTERACTIVE_PROCESS,
+                                                                   // service type
+           SERVICE_AUTO_START,             // start type
+           SERVICE_ERROR_NORMAL,           // error control type
+           servicecmd,                     // service's binary
+           NULL,                           // no load ordering group
+           NULL,                           // no tag identifier
+           BAC_DEPENDENCIES,               // dependencies
+           NULL,                           // LocalSystem account
+           NULL);                          // no password
+   if (hservice == NULL) {
+      CloseServiceHandle(hsrvmanager);
+      log_error_message("CreateService failed"); 
+      MessageBox(NULL,
+          _("The Bacula Director service could not be installed"),
+           szAppName, MB_ICONEXCLAMATION | MB_OK);
+      return 0;
+   }
 
-      set_service_description(hsrvmanager,hservice, 
-_("Provides file backup and restore services. Bacula -- the network backup solution."));
+   set_service_description(hsrvmanager,hservice, 
+_("Provides director services. Bacula -- the network backup solution."));
 
-      CloseServiceHandle(hsrvmanager);
-      CloseServiceHandle(hservice);
+   CloseServiceHandle(hsrvmanager);
+   CloseServiceHandle(hservice);
 
-      // Everything went fine
+   // Everything went fine
+   if (!silent) {
       MessageBox(NULL,
-              _("The Bacula File service was successfully installed.\n"
+              _("The Bacula Director service was successfully installed.\n"
               "The service may be started from the Control Panel and will\n"
               "automatically be run the next time this machine is rebooted."),
               szAppName,
               MB_ICONINFORMATION | MB_OK);
-      break;
-   default:
-      log_error_message("Unknown Windows System version"); 
-      MessageBox(NULL, 
-                 _("Unknown Windows operating system.\n"     
-                 "Cannot install Bacula service.\n"),
-                 szAppName, MB_ICONEXCLAMATION | MB_OK);
-       break;     
-   };
-
+   }
    return 0;
 }
 
@@ -486,89 +283,52 @@ _("Provides file backup and restore services. Bacula -- the network backup solut
 int
 bacService::RemoveService()
 {
-   // How to remove the Bacula service depends upon the OS
-   switch (g_platform_id) {
-
-   // Windows 95/98/Me
-   case VER_PLATFORM_WIN32_WINDOWS:
-      // Locate the RunService registry entry
-      HKEY runservices;
-      if (RegOpenKey(HKEY_LOCAL_MACHINE, 
-              "Software\\Microsoft\\Windows\\CurrentVersion\\RunServices",
-              &runservices) != ERROR_SUCCESS) {
-         MessageBox(NULL, 
-            _("Could not find registry entry.\nService probably not registerd - the Bacula service was not removed"), szAppName, MB_ICONEXCLAMATION | MB_OK);
-      } else {
-         // Attempt to delete the Bacula key
-         if (RegDeleteValue(runservices, szAppName) != ERROR_SUCCESS) {
-            RegCloseKey(runservices);
-            MessageBox(NULL, _("Could not delete Registry key.\nThe Bacula service could not be removed"), szAppName, MB_ICONEXCLAMATION | MB_OK);
-         }
-
-         RegCloseKey(runservices);
-         break;
-      }
-
-      // Try to kill any running copy of Bacula
-      if (!KillRunningCopy()) {
-         MessageBox(NULL,
-             _("Bacula could not be contacted, probably not running"),
-             szAppName, MB_ICONEXCLAMATION | MB_OK);
-         break;
-      }
-
-      // We have successfully removed the service!
-      MessageBox(NULL, _("The Bacula service has been removed"), szAppName, MB_ICONINFORMATION | MB_OK);
-      break;
-
-   // Windows NT, Win2K, WinXP
-   case VER_PLATFORM_WIN32_NT:
-      SC_HANDLE   hservice;
-      SC_HANDLE   hsrvmanager;
-
-      // Open the SCM
-      hsrvmanager = OpenSCManager(
-         NULL,                   // machine (NULL == local)
-         NULL,                   // database (NULL == default)
-         SC_MANAGER_ALL_ACCESS   // access required
-         );
-      if (hsrvmanager) {
-         hservice = OpenService(hsrvmanager, BAC_SERVICENAME, SERVICE_ALL_ACCESS);
-         if (hservice != NULL) {
-            SERVICE_STATUS status;
-
-            // Try to stop the Bacula service
-            if (ControlService(hservice, SERVICE_CONTROL_STOP, &status)) {
-               while(QueryServiceStatus(hservice, &status)) {
-                  if (status.dwCurrentState == SERVICE_STOP_PENDING) {
-                     Sleep(1000);
-                  } else {
-                     break;
-                  }
-               }
-
-               if (status.dwCurrentState != SERVICE_STOPPED) {
-                  MessageBox(NULL, _("The Bacula service could not be stopped"), szAppName, MB_ICONEXCLAMATION | MB_OK);
+   SC_HANDLE   hservice;
+   SC_HANDLE   hsrvmanager;
+
+   // Open the SCM
+   hsrvmanager = OpenSCManager(
+      NULL,                   // machine (NULL == local)
+      NULL,                   // database (NULL == default)
+      SC_MANAGER_ALL_ACCESS   // access required
+      );
+   if (hsrvmanager) {
+      hservice = OpenService(hsrvmanager, BAC_SERVICENAME, SERVICE_ALL_ACCESS);
+      if (hservice != NULL) {
+         SERVICE_STATUS status;
+
+         // Try to stop the Bacula service
+         if (ControlService(hservice, SERVICE_CONTROL_STOP, &status)) {
+            while(QueryServiceStatus(hservice, &status)) {
+               if (status.dwCurrentState == SERVICE_STOP_PENDING) {
+                  Sleep(1000);
+               } else {
+                  break;
                }
             }
 
-            // Now remove the service from the SCM
-            if(DeleteService(hservice)) {
-               MessageBox(NULL, _("The Bacula service has been removed"), szAppName, MB_ICONINFORMATION | MB_OK);
-            } else {
-               MessageBox(NULL, _("The Bacula service could not be removed"), szAppName, MB_ICONEXCLAMATION | MB_OK);
+            if (status.dwCurrentState != SERVICE_STOPPED) {
+               MessageBox(NULL, _("The Bacula Director service could not be stopped"), szAppName, MB_ICONEXCLAMATION | MB_OK);
             }
+         }
 
-            CloseServiceHandle(hservice);
+         // Now remove the service from the SCM
+         if(DeleteService(hservice)) {
+            if (!silent) {
+               MessageBox(NULL, _("The Bacula Director service has been removed"), szAppName, MB_ICONINFORMATION | MB_OK);
+            }
          } else {
-            MessageBox(NULL, _("The Bacula service could not be found"), szAppName, MB_ICONEXCLAMATION | MB_OK);
+            MessageBox(NULL, _("The Bacula Director service could not be removed"), szAppName, MB_ICONEXCLAMATION | MB_OK);
          }
 
-         CloseServiceHandle(hsrvmanager);
+         CloseServiceHandle(hservice);
       } else {
-         MessageBox(NULL, _("The SCM could not be contacted - the Bacula service was not removed"), szAppName, MB_ICONEXCLAMATION | MB_OK);
+         MessageBox(NULL, _("The Bacula Director service could not be found"), szAppName, MB_ICONEXCLAMATION | MB_OK);
       }
-      break;
+
+      CloseServiceHandle(hsrvmanager);
+   } else {
+      MessageBox(NULL, _("The SCM could not be contacted - the Bacula Director service was not removed"), szAppName, MB_ICONEXCLAMATION | MB_OK);
    }
    return 0;
 }
index ee8ac6d19cd0857c44f8b4cbadceb0995eebbbbe..841d85c6e6943060e0e612e5f853c70f339bbc63 100644 (file)
@@ -44,8 +44,6 @@
 class bacService
 {
 public:
-   bacService();
-
    // SERVICE INSTALL & START FUNCTIONS
 
    // Routine called by WinMain to cause Bacula to be installed
@@ -53,74 +51,19 @@ public:
    static int BaculaServiceMain();
 
    // Routine to install the Apcupsd service on the local machine
-   static int InstallService();
+   static int InstallService(const char *pszCmdLine);
 
    // Routine to remove the Apcupsd service from the local machine
    static int RemoveService();
 
    // SERVICE SUPPORT FUNCTIONS
 
-   // Routine to establish and return the currently logged in user name
-   static BOOL CurrentUser(char *buffer, UINT size);
-
-   // Routine to post a message to the currently running Apcupsd server
-   // to pass it a handle to the current user
-   static BOOL PostUserHelperMessage();
-   // Routine to process a user helper message
-   static BOOL ProcessUserHelperMessage(WPARAM wParam, LPARAM lParam);
-
-   // Routines to establish which OS we're running on
-   static BOOL IsWin95();
-   static BOOL IsWinNT();
-
    // Routine to establish whether the current instance is running
    // as a service or not
    static BOOL RunningAsService();
 
    // Routine to kill any other running copy of Apcupsd
    static BOOL KillRunningCopy();
-
-   // Routine to set the current thread into the given desktop
-   static BOOL SelectHDESK(HDESK newdesktop);
-
-   // Routine to set the current thread into the named desktop,
-   // or the input desktop if no name is given
-   static BOOL SelectDesktop(char *name);
-
-   // Routine to establish whether the current thread desktop is the
-   // current user input one
-   static BOOL InputDesktopSelected();
-
-   // Routine to fake a CtrlAltDel to winlogon when required.
-   // *** This is a nasty little hack...
-   static BOOL SimulateCtrlAltDel();
-
-   // Routine to make any currently running version of Apcupsd show its
-   // Properties dialog, to allow the user to make changes to their settings
-   static BOOL ShowProperties();
-
-   // Routine to make any currently running version of Apcupsd show the
-   // Properties dialog for the default settings, so the user can make changes
-   static BOOL ShowDefaultProperties();
-
-   // Routine to make the an already running copy of Apcupsd bring up its
-   // About box so you can check the version!
-   static BOOL ShowAboutBox();
-
-   // Routine to make the an already running copy of Apcupsd bring up its
-   // Status dialog
-   static BOOL ShowStatus();
-
-   // Routine to make the an already running copy of Apcupsd bring up its
-   // Events dialog
-   static BOOL ShowEvents();
-
-   // Routine to make an already running copy of Apcupsd form an outgoing
-   // connection to a new ups client
-   static BOOL PostAddNewClient(unsigned long ipaddress);
-
-private:
-
 };
 
 #endif
index d1a465c9232c45428eaeb56de6e34843dd456c9a..40e60523a098b3ebeacaf8800ad019e5ac57875e 100644 (file)
@@ -286,6 +286,7 @@ _Z16write_state_filePcPKci
 _Z2_pPP16pthread_mutex_t_
 _Z2_vPP16pthread_mutex_t_
 _Z4dropPcS_
+_Z5bfreePv
 _Z6bfgetsPciP6_iobuf
 ;_Z7bcallocjj
 _Z7bstrcmpPKcS0_
diff --git a/bacula/src/win32/filed/bacula-fd.conf.in b/bacula/src/win32/filed/bacula-fd.conf.in
deleted file mode 100644 (file)
index 137cf42..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# Default  Bacula File Daemon Configuration file
-#
-#  For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ @DISTVER@
-#
-# There is not much to change here except perhaps the
-# File daemon Name
-#
-
-#
-# List Directors who are permitted to contact this File daemon
-#
-Director {
-  Name = @director_name@
-  Password = "@director_password@"
-}
-
-#
-# Restricted Director, used by tray-monitor to get the
-#   status of the file daemon
-#
-Director {
-  Name = @monitor_name@
-  Password = "@monitor_password@"
-  Monitor = yes
-}
-
-#
-# "Global" File daemon configuration specifications
-#
-FileDaemon {                            # this is me
-  Name = @client_name@
-  FDport = @client_port@                # where we listen for the director
-  WorkingDirectory = @working_dir@
-  Pid Directory = @working_dir@
-  Maximum Concurrent Jobs = @client_maxjobs@
-}
-
-# Send all messages except skipped files back to Director
-Messages {
-  Name = Standard
-  director = @director_name@ = all, !skipped, !restored
-}
index c3c61119b5ffa1098bca362df21739b190684be5..b813a6b74f4fd383e96821c311606e05dc4d0a9c 100644 (file)
@@ -13,9 +13,6 @@
                />\r
        </Platforms>\r
        <ToolFiles>\r
-               <ToolFile\r
-                       RelativePath="..\bacula.rules"\r
-               />\r
        </ToolFiles>\r
        <Configurations>\r
                <Configuration\r
@@ -35,9 +32,6 @@
                        <Tool\r
                                Name="VCCustomBuildTool"\r
                        />\r
-                       <Tool\r
-                               Name="Generated Config Files"\r
-                       />\r
                        <Tool\r
                                Name="VCXMLDataGeneratorTool"\r
                        />\r
@@ -54,8 +48,8 @@
                                Optimization="3"\r
                                InlineFunctionExpansion="2"\r
                                EnableIntrinsicFunctions="true"\r
-                               AdditionalIncludeDirectories="../compat;../..;&quot;../../../../depkgs-win32/pthreads&quot;;&quot;../../../../depkgs-win32/zlib&quot;;&quot;../../../../depkgs-win32/gettext/include&quot;"\r
-                               PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;HAVE_WIN32;_USE_32BIT_TIME_T;WIN32_VSS;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"\r
+                               AdditionalIncludeDirectories=".;../compat;&quot;../../../../depkgs-msvc/include&quot;;../..;&quot;../../../../depkgs-msvc/include/mysql&quot;;&quot;../../../../depkgs-msvc/vss&quot;;../libwin32"\r
+                               PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;HAVE_WIN32;WIN32_VSS;USING_DLL;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"\r
                                StringPooling="true"\r
                                RuntimeLibrary="2"\r
                                EnableFunctionLevelLinking="true"\r
@@ -86,7 +80,7 @@
                                OutputFile="$(OutDir)\bacula-fd.exe"\r
                                LinkIncremental="0"\r
                                SuppressStartupBanner="true"\r
-                               AdditionalLibraryDirectories="&quot;..\..\..\..\depkgs-win32\pthreads\release&quot;;&quot;..\..\..\..\depkgs-win32\zlib\release&quot;;&quot;..\..\..\..\depkgs-win32\gettext\lib&quot;;&quot;%VSSSDK_DIR%\lib\win2003\obj\i386&quot;"\r
+                               AdditionalLibraryDirectories="..\..\..\..\depkgs-win32\pthreads\release;..\..\..\..\depkgs-win32\zlib\release;..\..\..\..\depkgs-win32\gettext\lib;%VSSSDK_DIR%\lib\win2003\obj\i386"\r
                                IgnoreDefaultLibraryNames=""\r
                                DelayLoadDLLs="$(NOINHERIT)"\r
                                GenerateDebugInformation="true"\r
                        <Tool\r
                                Name="VCCustomBuildTool"\r
                        />\r
-                       <Tool\r
-                               Name="Generated Config Files"\r
-                       />\r
                        <Tool\r
                                Name="VCXMLDataGeneratorTool"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="../compat,../..,../../../../depkgs-win32/pthreads,../../../../depkgs-win32/zlib,../../../../depkgs-win32/gettext/include"\r
-                               PreprocessorDefinitions="_DEBUG;_WINMAIN_;PTW32_BUILD;WIN32;_CONSOLE;HAVE_WIN32;_USE_32BIT_TIME_T;WIN32_VSS;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"\r
+                               AdditionalIncludeDirectories=".;../compat;&quot;../../../../depkgs-msvc/include&quot;;../..;&quot;../../../../depkgs-msvc/include/mysql&quot;;&quot;../../../../depkgs-msvc/vss&quot;;../libwin32"\r
+                               PreprocessorDefinitions="_DEBUG;_WINMAIN_;PTW32_BUILD;WIN32;_CONSOLE;HAVE_WIN32;USING_DLL;_USE_32BIT_TIME_T;WIN32_VSS;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE;__need_getopt"\r
                                MinimalRebuild="true"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="3"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalDependencies="pthreadVCEd.lib zlibd.lib wsock32.lib atlsd.lib"\r
+                               AdditionalDependencies="pthreadVCE.lib zlib.lib wsock32.lib atlsd.lib"\r
                                OutputFile="$(OutDir)\bacula-fd.exe"\r
                                LinkIncremental="0"\r
                                SuppressStartupBanner="true"\r
-                               AdditionalLibraryDirectories="&quot;../../../../depkgs-win32/pthreads/debug&quot;;&quot;../../../../depkgs-win32/zlib/debug&quot;;&quot;../../../../depkgs-win32/gettext/lib&quot;;&quot;%VSSSDK_DIR%\lib\win2003\obj\i386&quot;"\r
+                               AdditionalLibraryDirectories="&quot;../../../../depkgs-msvc/lib&quot;"\r
                                IgnoreDefaultLibraryNames=""\r
                                GenerateDebugInformation="true"\r
                                SubSystem="2"\r
                <Filter\r
                        Name="Source Files"\r
                        Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
                        >\r
                        <File\r
                                RelativePath="..\..\filed\acl.c"\r
                <Filter\r
                        Name="Header Files"\r
                        Filter="h;hpp;hxx;hm;inl"\r
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
                        >\r
                        <File\r
                                RelativePath="..\..\filed\acl.h"\r
                <Filter\r
                        Name="Resource Files"\r
                        Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"\r
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
                        >\r
                        <File\r
                                RelativePath="..\libwin32\bacula.bmp"\r
                                >\r
                        </File>\r
                </Filter>\r
-               <File\r
-                       RelativePath="..\..\filed\bacula-fd.conf.in"\r
-                       >\r
-               </File>\r
        </Files>\r
        <Globals>\r
        </Globals>\r
index 36bc4b7ba8f4a2c84817a9bc6a7f98af54533627..a6bf96034873ad9c7952d876dfbe38361b8ea579 100644 (file)
@@ -34,13 +34,12 @@ extern void VSSInit();
 
 /* Globals */
 HINSTANCE       hAppInstance;
-const char      *szAppName = "Bacula";
+const char      *szAppName = "Bacula-fd";
 DWORD           mainthreadId;
 bool            silent = false;
 
 /* Imported variables */
 extern DWORD    g_servicethread;
-extern DWORD    g_platform_id;
 
 #define MAX_COMMAND_ARGS 100
 static char *command_args[MAX_COMMAND_ARGS] = {"bacula-fd", NULL};
@@ -94,7 +93,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
    for (i=1;i<MAX_COMMAND_ARGS;i++)
       command_args[i] = NULL;
 
-   wordPtr = szCmdLine;
+   char *pszArgs = bstrdup(szCmdLine);
+   wordPtr = pszArgs;
    quote = 0;
    while  (*wordPtr && (*wordPtr == ' ' || *wordPtr == '\t'))
       wordPtr++;
@@ -113,7 +113,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
          tempPtr = wordPtr;
          if (quote) {
             while (*tempPtr && *tempPtr != '\"')
-            tempPtr++;
+               tempPtr++;
             quote = 0;
          } else {
             while (*tempPtr && *tempPtr != ' ')
@@ -134,25 +134,15 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
 
    /*
     * Now process Windows command line options
-    *   as defined by ATT
-    *
-    * Make the command-line lowercase and parse it
     */
-   for (i = 0; i < (int)strlen(szCmdLine); i++) {
-      szCmdLine[i] = tolower(szCmdLine[i]);
-   }
-
    bool argfound = false;
    for (i = 0; i < (int)strlen(szCmdLine); i++) {
       if (szCmdLine[i] <= ' ') {
          continue;
       }
 
-      if (szCmdLine[i] == '-') {
-         while (szCmdLine[i] && szCmdLine[i] != ' ') {
-            i++;
-         }
-         continue;
+      if (szCmdLine[i] != '/') {
+         break;
       }
 
       argfound = true;
@@ -160,30 +150,31 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
       /* Now check for command-line arguments */
 
       /* /silent install quietly -- no prompts */
-      if (strncmp(&szCmdLine[i], "/silent", strlen("/silent")) == 0) {
+      if (strnicmp(&szCmdLine[i], "/silent", strlen("/silent")) == 0) {
          silent = true;
          i += strlen("/silent");
+         continue;
       }
 
       /* /service start service */
-      if (strncmp(&szCmdLine[i], BaculaRunService, strlen(BaculaRunService)) == 0) {
+      if (strnicmp(&szCmdLine[i], BaculaRunService, strlen(BaculaRunService)) == 0) {
          /* Run Bacula as a service */
          return bacService::BaculaServiceMain();
       }
       /* /run  (this is the default if no command line arguments) */
-      if (strncmp(&szCmdLine[i], BaculaRunAsUserApp, strlen(BaculaRunAsUserApp)) == 0) {
+      if (strnicmp(&szCmdLine[i], BaculaRunAsUserApp, strlen(BaculaRunAsUserApp)) == 0) {
          /* Bacula is being run as a user-level program */
          return BaculaAppMain();
       }
       /* /install */
-      if (strncmp(&szCmdLine[i], BaculaInstallService, strlen(BaculaInstallService)) == 0) {
+      if (strnicmp(&szCmdLine[i], BaculaInstallService, strlen(BaculaInstallService)) == 0) {
          /* Install Bacula as a service */
-         bacService::InstallService();
+         bacService::InstallService(&szCmdLine[i + strlen(BaculaInstallService)]);
          i += strlen(BaculaInstallService);
          continue;
       }
       /* /remove */
-      if (strncmp(&szCmdLine[i], BaculaRemoveService, strlen(BaculaRemoveService)) == 0) {
+      if (strnicmp(&szCmdLine[i], BaculaRemoveService, strlen(BaculaRemoveService)) == 0) {
          /* Remove the Bacula service */
          bacService::RemoveService();
          i += strlen(BaculaRemoveService);
@@ -191,7 +182,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
       }
 
       /* /about */
-      if (strncmp(&szCmdLine[i], BaculaShowAbout, strlen(BaculaShowAbout)) == 0) {
+      if (strnicmp(&szCmdLine[i], BaculaShowAbout, strlen(BaculaShowAbout)) == 0) {
          /* Show Bacula's about box */
          bacService::ShowAboutBox();
          i += strlen(BaculaShowAbout);
@@ -199,7 +190,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
       }
 
       /* /status */
-      if (strncmp(&szCmdLine[i], BaculaShowStatus, strlen(BaculaShowStatus)) == 0) {
+      if (strnicmp(&szCmdLine[i], BaculaShowStatus, strlen(BaculaShowStatus)) == 0) {
          /* Show Bacula's status box */                             
          bacService::ShowStatus();
          i += strlen(BaculaShowStatus);
@@ -207,7 +198,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
       }
 
       /* /kill */
-      if (strncmp(&szCmdLine[i], BaculaKillRunningCopy, strlen(BaculaKillRunningCopy)) == 0) {
+      if (strnicmp(&szCmdLine[i], BaculaKillRunningCopy, strlen(BaculaKillRunningCopy)) == 0) {
          /* Kill running copy of Bacula */
          bacService::KillRunningCopy();
          i += strlen(BaculaKillRunningCopy);
@@ -215,7 +206,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
       }
 
       /* /help */
-      if (strncmp(&szCmdLine[i], BaculaShowHelp, strlen(BaculaShowHelp)) == 0) {
+      if (strnicmp(&szCmdLine[i], BaculaShowHelp, strlen(BaculaShowHelp)) == 0) {
          MessageBox(NULL, BaculaUsageText, _("Bacula Usage"), MB_OK|MB_ICONINFORMATION);
          i += strlen(BaculaShowHelp);
          continue;
@@ -261,7 +252,6 @@ void *Main_Msg_Loop(LPVOID lpwThreadParam)
       PostQuitMessage(0);
    }
 
-
    /* Now enter the Windows message handling loop until told to quit! */
    MSG msg;
    while (GetMessage(&msg, NULL, 0,0) ) {
@@ -319,9 +309,7 @@ int BaculaAppMain()
       _exit(0);
    }
 
-
    /* Create a thread to handle the Windows messages */
-// (void)CreateThread(NULL, 0, Main_Msg_Loop, NULL, 0, &dwThreadID);
    pthread_create(&tid, NULL,  Main_Msg_Loop, (void *)0);
 
    /* Call the "real" Bacula */
index c4c3ac5f286c87bd7a854df231d993a6508edc8a..bb2afa8f5089c6f7d7eec965c345f985abcd275e 100644 (file)
@@ -100,24 +100,6 @@ PostToBacula(UINT message, WPARAM wParam, LPARAM lParam)
 }
 
 
-// Static routine to show the Properties dialog for a currently-running
-// copy of Bacula, (usually a servicified version.)
-
-BOOL
-bacService::ShowProperties()
-{
-   return TRUE;
-}
-
-// Static routine to show the Default Properties dialog for a currently-running
-// copy of Bacula, (usually a servicified version.)
-
-BOOL
-bacService::ShowDefaultProperties()
-{
-   return TRUE;
-}
-
 // Static routine to show the About dialog for a currently-running
 // copy of Bacula, (usually a servicified version.)
 
@@ -126,7 +108,7 @@ bacService::ShowAboutBox()
 {
   // Post to the Bacula menu window
   if (!PostToBacula(MENU_ABOUTBOX_SHOW, 0, 0)) {
-     MessageBox(NULL, _("No existing instance of Bacula could be contacted"), szAppName, MB_ICONEXCLAMATION | MB_OK);
+     MessageBox(NULL, _("No existing instance of Bacula File service could be contacted"), szAppName, MB_ICONEXCLAMATION | MB_OK);
      return FALSE;
   }
   return TRUE;
@@ -140,7 +122,7 @@ bacService::ShowStatus()
 {
   // Post to the Bacula menu window
   if (!PostToBacula(MENU_STATUS_SHOW, 0, 0)) {
-     MessageBox(NULL, _("No existing instance of Bacula could be contacted"), szAppName, MB_ICONEXCLAMATION | MB_OK);
+     MessageBox(NULL, _("No existing instance of Bacula File service could be contacted"), szAppName, MB_ICONEXCLAMATION | MB_OK);
      return FALSE;
   }
   return TRUE;
@@ -150,11 +132,8 @@ bacService::ShowStatus()
 
 // Service-mode defines:
 
-// Executable name
-#define BAC_APPNAME            "baculafd"
-
 // Internal service name
-#define BAC_SERVICENAME        "Baculafd"
+#define BAC_SERVICENAME        "Bacula-fd"
 
 // Displayed service name
 #define BAC_SERVICEDISPLAYNAME "Bacula File Server"
@@ -341,7 +320,7 @@ void ServiceStop()
 
 // SERVICE INSTALL ROUTINE
 int
-bacService::InstallService()
+bacService::InstallService(const char *pszCmdLine)
 {
    const int pathlength = 2048;
    char path[pathlength];
@@ -350,23 +329,13 @@ bacService::InstallService()
 
    // Get the filename of this executable
    if (GetModuleFileName(NULL, path, pathlength-(strlen(BaculaRunService)+2)) == 0) {
-      MessageBox(NULL, _("Unable to install Bacula service"), szAppName, MB_ICONEXCLAMATION | MB_OK);
+      MessageBox(NULL, _("Unable to install Bacula File service"), szAppName, MB_ICONEXCLAMATION | MB_OK);
       return 0;
    }
 
    // Append the service-start flag to the end of the path:
-   if ((int)strlen(path) + 20 + (int)strlen(BaculaRunService) < pathlength) {
-      sprintf(servicecmd, "\"%s\" %s -c \"%s\"", path, BaculaRunService, path);
-      len = strlen(servicecmd) - 1;
-      for ( ; len > 0; len--) {
-         if (servicecmd[len] == '\\') {
-            servicecmd[len] = 0;
-            break;
-         }
-         servicecmd[len] = 0;
-      }
-      strcat(servicecmd, "\\bacula-fd.conf");
-
+   if ((int)strlen(path) + 5 + (int)strlen(BaculaRunService) + (int)strlen(pszCmdLine) < pathlength) {
+      sprintf(servicecmd, "\"%s\" %s %s", path, BaculaRunService, pszCmdLine);
    } else {
       log_error_message(_("Service command length too long")); 
       MessageBox(NULL, _("Service command length too long. Service not registered."),
@@ -548,27 +517,27 @@ bacService::RemoveService()
                }
 
                if (status.dwCurrentState != SERVICE_STOPPED) {
-                  MessageBox(NULL, _("The Bacula service could not be stopped"), szAppName, MB_ICONEXCLAMATION | MB_OK);
+                  MessageBox(NULL, _("The Bacula file service could not be stopped"), szAppName, MB_ICONEXCLAMATION | MB_OK);
                }
             }
 
             // Now remove the service from the SCM
             if (DeleteService(hservice)) {
                if (!silent) {
-                  MessageBox(NULL, _("The Bacula service has been removed"), szAppName, MB_ICONINFORMATION | MB_OK);
+                  MessageBox(NULL, _("The Bacula file service has been removed"), szAppName, MB_ICONINFORMATION | MB_OK);
                }
             } else {
-               MessageBox(NULL, _("The Bacula service could not be removed"), szAppName, MB_ICONEXCLAMATION | MB_OK);
+               MessageBox(NULL, _("The Bacula file service could not be removed"), szAppName, MB_ICONEXCLAMATION | MB_OK);
             }
 
             CloseServiceHandle(hservice);
          } else {
-            MessageBox(NULL, _("The Bacula service could not be found"), szAppName, MB_ICONEXCLAMATION | MB_OK);
+            MessageBox(NULL, _("The Bacula file service could not be found"), szAppName, MB_ICONEXCLAMATION | MB_OK);
          }
 
          CloseServiceHandle(hsrvmanager);
       } else {
-         MessageBox(NULL, _("The SCM could not be contacted - the Bacula service was not removed"), szAppName, MB_ICONEXCLAMATION | MB_OK);
+         MessageBox(NULL, _("The SCM could not be contacted - the Bacula file service was not removed"), szAppName, MB_ICONEXCLAMATION | MB_OK);
       }
       break;
    }
diff --git a/bacula/src/win32/installer/ConfigPage1.nsh b/bacula/src/win32/installer/ConfigPage1.nsh
new file mode 100644 (file)
index 0000000..51f82b6
--- /dev/null
@@ -0,0 +1,290 @@
+Function EnterConfigPage1
+  Call IsClientSelected
+  Pop $R0
+
+  Call IsStorageSelected
+  Pop $R1
+
+  ${If} $R0 = 0
+  ${AndIf} $R1 = 0
+    Abort
+  ${EndIf}
+  
+  FileOpen $R5 "$PLUGINSDIR\ConfigPage1.ini" w
+
+  StrCpy $R6 1  ; Field Number
+  StrCpy $R7 0  ; Top
+  
+  ${If} $R0 = 1
+    IntOp $R8 $R7 + 50
+    FileWrite $R5 '[Field $R6]$\r$\nType="GroupBox"$\r$\nText="Client"$\r$\nLeft=0$\r$\nTop=$R7$\r$\nRight=300$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 + 10
+
+    IntOp $R8 $R7 + 8
+    FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Name"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=26$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 - 2
+
+    IntOp $R8 $R8 + 2
+    FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigClientName$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=158$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 + 2
+
+    IntOp $R8 $R8 - 2
+    FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Port"$\r$\nLeft=172$\r$\nTop=$R7$\r$\nRight=188$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 - 2
+
+    IntOp $R8 $R8 + 2
+    FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigClientPort$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=218$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 + 2
+
+    IntOp $R8 $R8 - 2
+    FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Max Jobs"$\r$\nLeft=238$\r$\nTop=$R7$\r$\nRight=270$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 - 2
+
+    IntOp $R8 $R8 + 2
+    FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigClientMaxJobs$\r$\nLeft=274$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 + 16
+
+    IntOp $R8 $R7 + 8
+    FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Password"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 - 2
+
+    IntOp $R8 $R8 + 2
+    FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigClientPassword$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 + 14
+
+    IntOp $R8 $R7 + 10
+    FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigClientInstallService$\r$\nText="Install as service"$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=118$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+
+    FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigClientStartService$\r$\nText="Start after install"$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=260$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 + 16
+  ${Endif}
+
+  ${If} $R1 = 1
+    IntOp $R8 $R7 + 50
+    FileWrite $R5 '[Field $R6]$\r$\nType="GroupBox"$\r$\nText="Storage"$\r$\nLeft=0$\r$\nTop=$R7$\r$\nRight=300$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 + 10
+    
+    IntOp $R8 $R7 + 8
+    FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Name"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=26$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 - 2
+
+    IntOp $R8 $R8 + 2
+    FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigStorageName$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=158$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 + 2
+
+    IntOp $R8 $R8 - 2
+    FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Port"$\r$\nLeft=172$\r$\nTop=$R7$\r$\nRight=188$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 - 2
+
+    IntOp $R8 $R8 + 2
+    FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigStoragePort$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=218$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 + 2
+
+    IntOp $R8 $R8 - 2
+    FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Max Jobs"$\r$\nLeft=238$\r$\nTop=$R7$\r$\nRight=270$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 - 2
+
+    IntOp $R8 $R8 + 2
+    FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigStorageMaxJobs$\r$\nLeft=274$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 + 16
+
+    IntOp $R8 $R7 + 8
+    FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Password"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 - 2
+
+    IntOp $R8 $R8 + 2
+    FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigStoragePassword$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 + 14
+
+    IntOp $R8 $R7 + 10
+    FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigStorageInstallService$\r$\nText="Install as service"$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=118$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+
+    FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigStorageStartService$\r$\nText="Start after install"$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=260$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 + 16
+  ${Endif}
+
+  IntOp $R6 $R6 - 1
+
+  FileWrite $R5 "[Settings]$\r$\nNumFields=$R6$\r$\n"
+
+  FileClose $R5
+
+  !insertmacro MUI_HEADER_TEXT "$(TITLE_ConfigPage1)" "$(SUBTITLE_ConfigPage1)"
+  !insertmacro MUI_INSTALLOPTIONS_INITDIALOG "ConfigPage1.ini"
+  Pop $HDLG ;HWND of dialog
+
+  ; Initialize Controls
+
+  StrCpy $R6 1  ; Field Number
+
+  ${If} $R0 = 1
+    IntOp $R6 $R6 + 2
+
+    ; Client Name
+    !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"
+    SendMessage $HCTL ${EM_LIMITTEXT} 30 0
+
+    IntOp $R6 $R6 + 2
+
+    ; Client Port Number
+    !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"
+    SendMessage $HCTL ${EM_LIMITTEXT} 5 0
+
+    IntOp $R6 $R6 + 2
+
+    ; Max Jobs
+    !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"
+    SendMessage $HCTL ${EM_LIMITTEXT} 3 0
+
+    IntOp $R6 $R6 + 5
+  ${Endif}
+  
+  ${If} $R1 = 1
+    IntOp $R6 $R6 + 2
+
+    ; Storage Name
+    !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"
+    SendMessage $HCTL ${EM_LIMITTEXT} 30 0
+
+    IntOp $R6 $R6 + 2
+
+    ; Storage Port Number
+    !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"
+    SendMessage $HCTL ${EM_LIMITTEXT} 5 0
+
+    IntOp $R6 $R6 + 2
+
+    ; Max Jobs
+    !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"
+    SendMessage $HCTL ${EM_LIMITTEXT} 3 0
+
+    IntOp $R6 $R6 + 5
+  ${Endif}
+
+  Push $R0
+  !insertmacro MUI_INSTALLOPTIONS_SHOW
+  Pop $R0
+
+  ;
+  ; Process results
+  ;
+  StrCpy $R6 3
+  
+  ${If} $R0 = 1
+    !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientName "ConfigPage1.ini" "Field $R6" "State"
+
+    IntOp $R6 $R6 + 2
+
+    !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientPort "ConfigPage1.ini" "Field $R6" "State"
+
+    IntOp $R6 $R6 + 2
+
+    !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientMaxJobs "ConfigPage1.ini" "Field $R6" "State"
+
+    IntOp $R6 $R6 + 2
+
+    !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientPassword "ConfigPage1.ini" "Field $R6" "State"
+
+    IntOp $R6 $R6 + 1
+
+    !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientInstallService "ConfigPage1.ini" "Field $R6" "State"
+
+    IntOp $R6 $R6 + 1
+
+    !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientStartService "ConfigPage1.ini" "Field $R6" "State"
+
+    IntOp $R6 $R6 + 3
+  ${Endif}
+  
+  ${If} $R1 = 1
+    !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStorageName "ConfigPage1.ini" "Field $R6" "State"
+
+    IntOp $R6 $R6 + 2
+
+    !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStoragePort "ConfigPage1.ini" "Field $R6" "State"
+
+    IntOp $R6 $R6 + 2
+
+    !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStorageMaxJobs "ConfigPage1.ini" "Field $R6" "State"
+
+    IntOp $R6 $R6 + 2
+
+    !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStoragePassword "ConfigPage1.ini" "Field $R6" "State"
+
+    IntOp $R6 $R6 + 1
+
+    !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStorageInstallService "ConfigPage1.ini" "Field $R6" "State"
+
+    IntOp $R6 $R6 + 1
+
+    !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStorageStartService "ConfigPage1.ini" "Field $R6" "State"
+
+    IntOp $R6 $R6 + 3
+  ${Endif}
+FunctionEnd
+
+Function LeaveConfigPage1
+  StrCpy $R6 5
+  
+  ${If} $R0 = 1
+    !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage1.ini" "Field $R6" "State"
+    ${If} $R0 < 1024
+    ${OrIf} $R0 > 65535
+      MessageBox MB_OK "Port must be between 1024 and 65535 inclusive."
+      Abort
+    ${EndIf}
+
+    IntOp $R6 $R6 + 2
+
+    !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage1.ini" "Field $R6" "State"
+    ${If} $R0 < 1
+    ${OrIf} $R0 > 99
+      MessageBox MB_OK "Max Jobs must be between 1 and 99 inclusive."
+      Abort
+    ${EndIf}
+
+    IntOp $R6 $R6 + 9
+  ${Endif}
+  
+  ${If} $R1 = 1
+    !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage1.ini" "Field $R6" "State"
+    ${If} $R0 < 1024
+    ${OrIf} $R0 > 65535
+      MessageBox MB_OK "Port must be between 1024 and 65535 inclusive."
+      Abort
+    ${EndIf}
+
+    IntOp $R6 $R6 + 2
+
+    !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage1.ini" "Field $R6" "State"
+    ${If} $R0 < 1
+    ${OrIf} $R0 > 99
+      MessageBox MB_OK "Max Jobs must be between 1 and 99 inclusive."
+      Abort
+    ${EndIf}
+
+    IntOp $R6 $R6 + 9
+  ${Endif}
+FunctionEnd
diff --git a/bacula/src/win32/installer/ConfigPage2.nsh b/bacula/src/win32/installer/ConfigPage2.nsh
new file mode 100644 (file)
index 0000000..258a31e
--- /dev/null
@@ -0,0 +1,402 @@
+Function EnterConfigPage2
+  Call IsClientSelected
+  Pop $R0
+
+  Call IsStorageSelected
+  Pop $R1
+
+  Call IsDirectorSelected
+  Pop $R2
+
+  Call IsConsoleSelected
+  Pop $R3
+
+  ${If} $R0 = 0
+  ${AndIf} $R1 = 0
+  ${AndIf} $R2 = 0
+  ${AndIf} $R3 = 0
+    Abort
+  ${EndIf}
+  
+  FileOpen $R5 "$PLUGINSDIR\ConfigPage2.ini" w
+
+  StrCpy $R6 1  ; Field Number
+  StrCpy $R7 0  ; Top
+  
+  ${If} $R2 = 1
+    IntOp $R8 $R7 + 90
+  ${ElseIf} $R3 = 1
+    IntOp $R8 $R7 + 52
+  ${Else}
+    IntOp $R8 $R7 + 24
+  ${EndIf}
+
+  FileWrite $R5 '[Field $R6]$\r$\nType="GroupBox"$\r$\nText="Director"$\r$\nLeft=0$\r$\nTop=$R7$\r$\nRight=300$\r$\nBottom=$R8$\r$\n$\r$\n'
+  IntOp $R6 $R6 + 1
+  IntOp $R7 $R7 + 10
+
+  IntOp $R8 $R7 + 8
+  FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Name"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=26$\r$\nBottom=$R8$\r$\n$\r$\n'
+  IntOp $R6 $R6 + 1
+  IntOp $R7 $R7 - 2
+
+  ${If} $R2 = 1
+    ${If} "$ConfigDirectorName" == ""
+      StrCpy $ConfigDirectorName "$HostName-dir"
+    ${EndIf}
+    ${If} "$ConfigDirectorPassword" == ""
+      StrCpy $ConfigDirectorPassword "$LocalDirectorPassword"
+    ${EndIf}
+  ${Else}
+    ${If} "$ConfigDirectorName" == "$HostName-dir"
+      StrCpy $ConfigDirectorName ""
+    ${EndIf}
+  ${EndIf}
+  
+  IntOp $R8 $R8 + 2
+  FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorName$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=158$\r$\nBottom=$R8$\r$\n$\r$\n'
+  IntOp $R6 $R6 + 1
+
+  ${If} $R2 = 1
+  ${OrIf} $R3 = 1
+    IntOp $R7 $R7 + 2
+    IntOp $R8 $R8 - 2
+    FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Port"$\r$\nLeft=172$\r$\nTop=$R7$\r$\nRight=188$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 - 2
+
+    IntOp $R8 $R8 + 2
+    FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigDirectorPort$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=218$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+  ${EndIf}
+
+  ${If} $R2 = 1
+    IntOp $R7 $R7 + 2
+    IntOp $R8 $R8 - 2
+    FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Max Jobs"$\r$\nLeft=238$\r$\nTop=$R7$\r$\nRight=270$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 - 2
+
+    IntOp $R8 $R8 + 2
+    FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigDirectorMaxJobs$\r$\nLeft=274$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+  ${EndIf}
+
+  IntOp $R7 $R7 + 14
+
+  ${If} $R2 = 1
+  ${OrIf} $R3 = 1
+    IntOp $R7 $R7 + 2
+    IntOp $R8 $R7 + 8
+
+    FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Password"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n'
+
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 - 2
+    IntOp $R8 $R8 + 2
+
+    FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorPassword$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'
+
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 + 14
+  ${EndIf}
+
+  ${If} $R2 = 1
+    IntOp $R7 $R7 + 2
+    IntOp $R8 $R7 + 8
+
+    FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Mail Server"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=48$\r$\nBottom=$R8$\r$\n$\r$\n'
+
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 - 2
+    IntOp $R8 $R8 + 2
+
+    FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorMailServer$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 + 16
+    IntOp $R8 $R7 + 8
+
+    FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Mail Address"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=48$\r$\nBottom=$R8$\r$\n$\r$\n'
+
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 - 2
+    IntOp $R8 $R8 + 2
+
+    FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorMailAddress$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 + 16
+    IntOp $R8 $R7 + 8
+
+    FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Database"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n'
+
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 - 2
+    IntOp $R8 $R8 + 2
+
+    ${If} $ConfigDirectorDB = 1
+      StrCpy $R9 1
+    ${Else}
+      StrCpy $R9 0
+    ${EndIf}
+
+    FileWrite $R5 '[Field $R6]$\r$\nType="RadioButton"$\r$\nState=$R9$\r$\nText="MySQL"$\r$\nFlags="GROUP"$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=90$\r$\nBottom=$R8$\r$\n$\r$\n'
+
+    IntOp $R6 $R6 + 1
+
+    ${If} $ConfigDirectorDB = 2
+      StrCpy $R9 1
+    ${Else}
+      StrCpy $R9 0
+    ${EndIf}
+
+    FileWrite $R5 '[Field $R6]$\r$\nType="RadioButton"$\r$\nState=$R9$\r$\nText="PostgreSQL"$\r$\nFlags="NOTABSTOP"$\r$\nLeft=94$\r$\nTop=$R7$\r$\nRight=146$\r$\nBottom=$R8$\r$\n$\r$\n'
+
+    IntOp $R6 $R6 + 1
+
+    ${If} $ConfigDirectorDB = 3
+      StrCpy $R9 1
+    ${Else}
+      StrCpy $R9 0
+    ${EndIf}
+
+    FileWrite $R5 '[Field $R6]$\r$\nType="RadioButton"$\r$\nState=$R9$\r$\nText="Sqlite"$\r$\nFlags="NOTABSTOP"$\r$\nLeft=150$\r$\nTop=$R7$\r$\nRight=182$\r$\nBottom=$R8$\r$\n$\r$\n'
+
+    IntOp $R6 $R6 + 1
+
+    ${If} $ConfigDirectorDB = 4
+      StrCpy $R9 1
+    ${Else}
+      StrCpy $R9 0
+    ${EndIf}
+
+    FileWrite $R5 '[Field $R6]$\r$\nType="RadioButton"$\r$\nState=$R9$\r$\nText="Builtin"$\r$\nFlags="NOTABSTOP"$\r$\nLeft=186$\r$\nTop=$R7$\r$\nRight=222$\r$\nBottom=$R8$\r$\n$\r$\n'
+
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 + 12
+    IntOp $R8 $R7 + 10
+
+    FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigDirectorInstallService$\r$\nText="Install as service"$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=118$\r$\nBottom=$R8$\r$\n$\r$\n'
+
+    IntOp $R6 $R6 + 1
+
+    FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigDirectorStartService$\r$\nText="Start after install"$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=260$\r$\nBottom=$R8$\r$\n$\r$\n'
+
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 + 12
+  ${ElseIf} $R3 = 1
+    IntOp $R7 $R7 + 2
+    IntOp $R8 $R7 + 8
+
+    FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Address"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=48$\r$\nBottom=$R8$\r$\n$\r$\n'
+
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 - 2
+    IntOp $R8 $R8 + 2
+
+    FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorAddress$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 + 14
+    IntOp $R8 $R7 + 8
+  ${EndIf}
+
+  IntOp $R7 $R7 + 4
+  
+  ${If} $R0 = 1
+    ${OrIf} $R1 = 1
+    ${OrIf} $R2 = 1
+
+    IntOp $R8 $R7 + 40
+
+    FileWrite $R5 '[Field $R6]$\r$\nType="GroupBox"$\r$\nText="Monitor"$\r$\nLeft=0$\r$\nTop=$R7$\r$\nRight=300$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 + 10
+
+    IntOp $R8 $R7 + 8
+    FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Name"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=26$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 - 2
+
+    IntOp $R8 $R8 + 2
+    FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigMonitorName$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=150$\r$\nBottom=$R8$\r$\n$\r$\n'
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 + 16
+    IntOp $R8 $R7 + 8
+
+    FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Password"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n'
+
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 - 2
+    IntOp $R8 $R8 + 2
+
+    FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigMonitorPassword$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'
+
+    IntOp $R6 $R6 + 1
+    IntOp $R7 $R7 + 20
+  ${EndIf}
+
+  IntOp $R6 $R6 - 1
+  FileWrite $R5 "[Settings]$\r$\nNumFields=$R6$\r$\n"
+
+  FileClose $R5
+
+  ${If} $R0 = 0
+  ${AndIf} $R1 = 0
+    !insertmacro MUI_HEADER_TEXT "$(TITLE_ConfigPage1)" "$(SUBTITLE_ConfigPage1)"
+  ${Else}
+    !insertmacro MUI_HEADER_TEXT "$(TITLE_ConfigPage2)" "$(SUBTITLE_ConfigPage2)"
+  ${EndIf}
+  !insertmacro MUI_INSTALLOPTIONS_INITDIALOG "ConfigPage2.ini"
+  Pop $HDLG ;HWND of dialog
+
+  ; Initialize Controls
+  StrCpy $R6 3  ; Field Number
+
+  ; Name
+  !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND"
+  SendMessage $HCTL ${EM_LIMITTEXT} 30 0
+  IntOp $R6 $R6 + 1
+
+  ${If} $R2 = 1
+  ${OrIf} $R3 = 1
+    IntOp $R6 $R6 + 1
+    ; Port Number
+    !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND"
+    SendMessage $HCTL ${EM_LIMITTEXT} 5 0
+    IntOp $R6 $R6 + 1
+  ${EndIf}
+
+  ${If} $R2 = 1
+    IntOp $R6 $R6 + 1
+    ; Max Jobs
+    !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND"
+    SendMessage $HCTL ${EM_LIMITTEXT} 3 0
+
+    IntOp $R6 $R6 + 1
+  ${EndIf}
+
+  ${If} $R2 = 1
+  ${OrIf} $R3 = 1
+    IntOp $R6 $R6 + 2
+  ${EndIf}
+
+  ${If} $R2 = 1
+    IntOp $R6 $R6 + 11
+  ${ElseIf} $R3 = 1
+    IntOp $R6 $R6 + 2
+  ${EndIf}
+
+  ${If} $R0 = 1
+    ${OrIf} $R1 = 1
+    ${OrIf} $R2 = 1
+    IntOp $R6 $R6 + 2
+    !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND"
+    SendMessage $HCTL ${EM_LIMITTEXT} 30 0
+    IntOp $R6 $R6 + 2
+  ${EndIf}
+
+  Push $R0
+  !insertmacro MUI_INSTALLOPTIONS_SHOW
+  Pop $R0
+
+  ;
+  ; Process results
+  ;
+  StrCpy $R6 3
+
+  !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorName "ConfigPage2.ini" "Field $R6" "State"
+  IntOp $R6 $R6 + 1
+
+  ${If} $R2 = 1
+  ${OrIf} $R3 = 1
+    IntOp $R6 $R6 + 1
+    !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorPort "ConfigPage2.ini" "Field $R6" "State"
+    IntOp $R6 $R6 + 1
+  ${EndIf}
+
+  ${If} $R2 = 1
+    IntOp $R6 $R6 + 1
+    !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorMaxJobs "ConfigPage2.ini" "Field $R6" "State"
+    IntOp $R6 $R6 + 1
+  ${EndIf}
+
+  ${If} $R2 = 1
+  ${OrIf} $R3 = 1
+    IntOp $R6 $R6 + 1
+    !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorPassword "ConfigPage2.ini" "Field $R6" "State"
+    IntOp $R6 $R6 + 1
+  ${EndIf}
+
+  ${If} $R2 = 1
+    IntOp $R6 $R6 + 1
+    !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorMailServer "ConfigPage2.ini" "Field $R6" "State"
+    IntOp $R6 $R6 + 2
+    !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorMailAddress "ConfigPage2.ini" "Field $R6" "State"
+    IntOp $R6 $R6 + 2
+    !insertmacro MUI_INSTALLOPTIONS_READ $R5 "ConfigPage2.ini" "Field $R6" "State"
+    ${If} $R5 = 1
+      StrCpy $ConfigDirectorDB 1
+    ${Endif}
+    IntOp $R6 $R6 + 1
+    !insertmacro MUI_INSTALLOPTIONS_READ $R5 "ConfigPage2.ini" "Field $R6" "State"
+    ${If} $R5 = 1
+      StrCpy $ConfigDirectorDB 2
+    ${Endif}
+    IntOp $R6 $R6 + 1
+    !insertmacro MUI_INSTALLOPTIONS_READ $R5 "ConfigPage2.ini" "Field $R6" "State"
+    ${If} $R5 = 1
+      StrCpy $ConfigDirectorDB 3
+    ${Endif}
+    IntOp $R6 $R6 + 1
+    !insertmacro MUI_INSTALLOPTIONS_READ $R5 "ConfigPage2.ini" "Field $R6" "State"
+    ${If} $R5 = 1
+      StrCpy $ConfigDirectorDB 4
+    ${Endif}
+    IntOp $R6 $R6 + 1
+
+    !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorInstallService "ConfigPage2.ini" "Field $R6" "State"
+    IntOp $R6 $R6 + 1
+    !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorStartService "ConfigPage2.ini" "Field $R6" "State"
+    IntOp $R6 $R6 + 1
+  ${ElseIf} $R3 = 1
+    IntOp $R6 $R6 + 1
+    !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorAddress "ConfigPage2.ini" "Field $R6" "State"
+    IntOp $R6 $R6 + 1
+  ${EndIf}
+
+  ${If} $R0 = 1
+    ${OrIf} $R1 = 1
+    ${OrIf} $R2 = 1
+
+    IntOp $R6 $R6 + 2
+    !insertmacro MUI_INSTALLOPTIONS_READ $ConfigMonitorName "ConfigPage2.ini" "Field $R6" "State"
+    IntOp $R6 $R6 + 2
+    !insertmacro MUI_INSTALLOPTIONS_READ $ConfigMonitorPassword "ConfigPage2.ini" "Field $R6" "State"
+  ${EndIf}
+FunctionEnd
+
+Function LeaveConfigPage2
+  StrCpy $R6 4
+
+  ${If} $R2 = 1
+  ${OrIf} $R3 = 1
+    IntOp $R6 $R6 + 1
+    !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage2.ini" "Field $R6" "State"
+    ${If} $R0 < 1024
+    ${OrIf} $R0 > 65535
+      MessageBox MB_OK "Port must be between 1024 and 65535 inclusive."
+      Abort
+    ${EndIf}
+    IntOp $R6 $R6 + 1
+  ${EndIf}
+
+  ${If} $R2 = 1
+    IntOp $R6 $R6 + 1
+    !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage2.ini" "Field $R6" "State"
+    ${If} $R0 < 1
+    ${OrIf} $R0 > 99
+      MessageBox MB_OK "Max Jobs must be between 1 and 99 inclusive."
+      Abort
+    ${EndIf}
+    IntOp $R6 $R6 + 1
+  ${EndIf}
+FunctionEnd
index 8f1c7f45ccb8b1403e2c23cb3495718067ebc484..dbfba40c82ecb8638eba152b2d3ba2e52cb54d6d 100644 (file)
@@ -11,8 +11,13 @@ VERSION := $(shell sed -ne 's/.*[ \t]VERSION[ \t][ \t]*"\(.*\)"/\1/p' < ../../ve
 
 DEFINES := \
        -DVERSION=$(VERSION) \
-       -DDOCDIR=$(DOCDIR) \
-       -DMINGW_BIN=$(MINGW_BIN) 
+       -DDOC_DIR=$(DOCDIR) \
+       -DBUILD_TOOLS=MinGW \
+       -DMINGW_BIN=$(MINGW_BIN) \
+       -DDEPKGS_BIN=. \
+       -DBACULA_BIN=. \
+       -DCATS_DIR=..\\cats \
+       -DSCRIPT_DIR=..\\scripts
 
 INSTALL_EXE := winbacula-$(VERSION).exe
 
@@ -31,6 +36,7 @@ BACULA_BINARIES := \
        bscan.exe \
        btape.exe \
        dbcheck.exe \
+       scsilist.exe \
        wx-console.exe
 
 DEPKGS_BINARIES := \
@@ -43,6 +49,7 @@ DEPKGS_BINARIES := \
        mt.exe \
        mtx.exe \
        scsitape.exe \
+       sed.exe \
        tapeinfo.exe \
        wxbase26_gcc_bacula.dll \
        wxmsw26_core_gcc_bacula.dll
diff --git a/bacula/src/win32/installer/bacula-dir.conf.in b/bacula/src/win32/installer/bacula-dir.conf.in
new file mode 100644 (file)
index 0000000..75597e1
--- /dev/null
@@ -0,0 +1,284 @@
+#
+# Default Bacula Director Configuration file
+#
+#  The only thing that MUST be changed is to add one or more
+#   file or directory names in the Include directive of the
+#   FileSet resource.
+#
+#  For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ @DISTVER@
+#
+#  You might also want to change the default email address
+#   from root to your address.  See the "mail" and "operator"
+#   directives in the Messages resource.
+#
+
+Director {                            # define myself
+  Name = @director_name@
+  DIRport = @director_port@                # where we listen for UA connections
+  QueryFile = "@bin_dir@\\query.sql"
+  WorkingDirectory = "@working_dir@"
+  PidDirectory = "@working_dir@"
+  Maximum Concurrent Jobs = @director_maxjobs@
+  Password = "@director_password@"         # Console password
+  Messages = Daemon
+}
+
+JobDefs {
+  Name = "DefaultJob"
+  Type = Backup
+  Level = Incremental
+  Client = @client_name@
+  FileSet = "Full Set"
+  Schedule = "WeeklyCycle"
+  Storage = File
+  Messages = Standard
+  Pool = Default
+  Priority = 10
+}
+
+
+#
+# Define the main nightly save backup job
+#   By default, this job will back up to disk in /tmp
+Job {
+  Name = "Client1"
+  JobDefs = "DefaultJob"
+  Write Bootstrap = "@working_dir@\\Client1.bsr"
+}
+
+#Job {
+#  Name = "Client2"
+#  Client = @client_address@2-fd
+#  JobDefs = "DefaultJob"
+#  Write Bootstrap = "@working_dir@\\Client2.bsr"
+#}
+
+# Backup the catalog database (after the nightly save)
+Job {
+  Name = "BackupCatalog"
+  JobDefs = "DefaultJob"
+  Level = Full
+  FileSet="Catalog"
+  Schedule = "WeeklyCycleAfterBackup"
+  # This creates an ASCII copy of the catalog
+  RunBeforeJob = "@bin_dir@\\make_catalog_backup bacula bacula"
+  # This deletes the copy of the catalog
+  RunAfterJob  = "@bin_dir@\\delete_catalog_backup"
+  Write Bootstrap = "@working_dir@\\BackupCatalog.bsr"
+  Priority = 11                   # run after main backup
+}
+
+#
+# Standard Restore template, to be changed by Console program
+#  Only one such job is needed for all Jobs/Clients/Storage ...
+#
+Job {
+  Name = "RestoreFiles"
+  Type = Restore
+  Client=@client_name@
+  FileSet="Full Set"
+  Storage = File
+  Pool = Default
+  Messages = Standard
+  Where = /tmp/bacula-restores
+}
+
+
+# List of files to be backed up
+FileSet {
+  Name = "Full Set"
+  Include {
+    Options {
+      signature = MD5
+    }
+#    
+#  Put your list of files here, preceded by 'File =', one per line
+#    or include an external list with:
+#
+#    File = <file-name
+#
+#  Note: / backs up everything on the root partition.
+#    if you have other partitons such as /usr or /home
+#    you will probably want to add them too.
+#
+#  By default this is defined to point to the Bacula build
+#    directory to give a reasonable FileSet to backup to
+#    disk storage during initial testing.
+#
+    File = @BUILD_DIR@
+  }
+
+#
+# If you backup the root directory, the following two excluded
+#   files can be useful
+#
+  Exclude {
+    File = /proc
+    File = /tmp
+    File = /.journal
+    File = /.fsck
+  }
+}
+
+#
+# When to do the backups, full backup on first sunday of the month,
+#  differential (i.e. incremental since full) every other sunday,
+#  and incremental backups other days
+Schedule {
+  Name = "WeeklyCycle"
+  Run = Full 1st sun at 23:05
+  Run = Differential 2nd-5th sun at 23:05
+  Run = Incremental mon-sat at 23:05
+}
+
+# This schedule does the catalog. It starts after the WeeklyCycle
+Schedule {
+  Name = "WeeklyCycleAfterBackup"
+  Run = Full sun-sat at 23:10
+}
+
+# This is the backup of the catalog
+FileSet {
+  Name = "Catalog"
+  Include {
+    Options {
+      signature = MD5
+    }
+    File = @working_dir@/bacula.sql
+  }
+}
+
+# Client (File Services) to backup
+Client {
+  Name = @client_name@
+  Address = @client_address@
+  FDPort = @client_port@
+  Catalog = MyCatalog
+  Password = "@client_password@"      # password for FileDaemon
+  File Retention = 30 days            # 30 days
+  Job Retention = 6 months            # six months
+  AutoPrune = yes                     # Prune expired Jobs/Files
+}
+
+#
+# Second Client (File Services) to backup
+#  You should change Name, Address, and Password before using
+#
+#Client {
+#  Name = @client_name@2
+#  Address = @client_address@2
+#  FDPort = @client_port@
+#  Catalog = MyCatalog
+#  Password = "@client_password@2"     # password for FileDaemon 2
+#  File Retention = 30 days            # 30 days
+#  Job Retention = 6 months            # six months
+#  AutoPrune = yes                     # Prune expired Jobs/Files
+#}
+
+
+# Definition of file storage device
+Storage {
+  Name = File
+# Do not use "localhost" here    
+  Address = @storage_address@                # N.B. Use a fully qualified name here
+  SDPort = @storage_port@
+  Password = "@storage_password@"
+  Device = FileStorage
+  Media Type = File
+}
+
+
+
+# Definition of DDS tape storage device
+#Storage {
+#  Name = DDS-4    
+#  Do not use "localhost" here
+#  Address = @storage_address@                # N.B. Use a fully qualified name here
+#  SDPort = @storage_port@
+#  Password = "@storage_password@"          # password for Storage daemon
+#  Device = DDS-4                      # must be same as Device in Storage daemon
+#  Media Type = DDS-4                  # must be same as MediaType in Storage daemon
+#  Autochanger = yes                   # enable for autochanger device
+#}
+
+# Definition of 8mm tape storage device
+#Storage {
+#  Name = "8mmDrive"
+#  Do not use "localhost" here
+#  Address = @storage_address@                # N.B. Use a fully qualified name here
+#  SDPort = @storage_port@
+#  Password = "@storage_password@"
+#  Device = "Exabyte 8mm"
+#  MediaType = "8mm"
+#}
+
+# Definition of DVD storage device
+#Storage {
+#  Name = "DVD"
+#  Do not use "localhost" here
+#  Address = @storage_address@                # N.B. Use a fully qualified name here
+#  SDPort = @storage_port@
+#  Password = "@storage_password@"
+#  Device = "DVD Writer"
+#  MediaType = "DVD"
+#}
+
+
+# Generic catalog service
+Catalog {
+  Name = MyCatalog
+  dbname = bacula; user = bacula; password = ""
+}
+
+# Reasonable message delivery -- send most everything to email address
+#  and to the console
+Messages {
+  Name = Standard
+#
+# NOTE! If you send to two email or more email addresses, you will need
+#  to replace the %r in the from field (-f part) with a single valid
+#  email address in both the mailcommand and the operatorcommand.
+#
+  mailcommand = "@bin_dir@\\bsmtp -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula: %t %e of %c %l\" %r"
+  operatorcommand = "@bin_dir@\\bsmtp -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula: Intervention needed for %j\" %r"
+  mail = @job_email@ = all, !skipped            
+  operator = @job_email@ = mount
+  console = all, !skipped, !saved
+#
+# WARNING! the following will create a file that you must cycle from
+#          time to time as it will grow indefinitely. However, it will
+#          also keep all your messages if they scroll off the console.
+#
+  append = "@working_dir@\\log" = all, !skipped
+}
+
+
+#
+# Message delivery for daemon messages (no job).
+Messages {
+  Name = Daemon
+  mailcommand = "@bin_dir@\\bsmtp -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula daemon message\" %r"
+  mail = @job_email@ = all, !skipped            
+  console = all, !skipped, !saved
+  append = "@working_dir@\\log" = all, !skipped
+}
+
+
+
+# Default pool definition
+Pool {
+  Name = Default
+  Pool Type = Backup
+  Recycle = yes                       # Bacula can automatically recycle Volumes
+  AutoPrune = yes                     # Prune expired volumes
+  Volume Retention = 365 days         # one year
+}
+
+#
+# Restricted console used by tray-monitor to get the status of the director
+#
+Console {
+  Name = @monitor_name@
+  Password = "@monitor_password@"
+  CommandACL = status, .status
+}
diff --git a/bacula/src/win32/installer/bacula-fd.conf.in b/bacula/src/win32/installer/bacula-fd.conf.in
new file mode 100644 (file)
index 0000000..ae13dad
--- /dev/null
@@ -0,0 +1,43 @@
+#
+# Default  Bacula File Daemon Configuration file
+#
+#  For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ @DISTVER@
+#
+# There is not much to change here except perhaps the
+# File daemon Name
+#
+
+#
+# "Global" File daemon configuration specifications
+#
+FileDaemon {                            # this is me
+  Name = @client_name@
+  FDport = @client_port@                # where we listen for the director
+  WorkingDirectory = @working_dir@
+  Pid Directory = @working_dir@
+  Maximum Concurrent Jobs = @client_maxjobs@
+}
+
+#
+# List Directors who are permitted to contact this File daemon
+#
+Director {
+  Name = @director_name@
+  Password = "@client_password@"
+}
+
+#
+# Restricted Director, used by tray-monitor to get the
+#   status of the file daemon
+#
+Director {
+  Name = @monitor_name@
+  Password = "@monitor_password@"
+  Monitor = yes
+}
+
+# Send all messages except skipped files back to Director
+Messages {
+  Name = Standard
+  director = @director_name@ = all, !skipped, !restored
+}
diff --git a/bacula/src/win32/installer/bacula-sd.conf.in b/bacula/src/win32/installer/bacula-sd.conf.in
new file mode 100644 (file)
index 0000000..5aa3753
--- /dev/null
@@ -0,0 +1,208 @@
+#
+# Default Bacula Storage Daemon Configuration file
+#
+#  For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ @DISTVER@
+#
+# You may need to change the name of your tape drive
+#   on the "Archive Device" directive in the Device
+#   resource.  If you change the Name and/or the 
+#   "Media Type" in the Device resource, please ensure
+#   that dird.conf has corresponding changes.
+#
+
+Storage {                             # definition of myself
+  Name = @storage_name@
+  SDPort = @storage_port@                  # Director's port      
+  WorkingDirectory = "@working_dir@"
+  Pid Directory = "@working_dir@"
+  Maximum Concurrent Jobs = @storage_maxjobs@
+}
+
+#
+# List Directors who are permitted to contact Storage daemon
+#
+Director {
+  Name = @director_name@
+  Password = "@storage_password@"
+}
+
+#
+# Restricted Director, used by tray-monitor to get the
+#   status of the storage daemon
+#
+Director {
+  Name = @monitor_name@
+  Password = "@monitor_password@"
+  Monitor = yes
+}
+
+#
+# Devices supported by this Storage daemon
+# To connect, the Director's bacula-dir.conf must have the
+#  same Name and MediaType. 
+#
+
+Device {
+  Name = FileStorage
+  Media Type = File
+  Archive Device = /tmp
+  LabelMedia = yes;                   # lets Bacula label unlabeled media
+  Random Access = Yes;
+  AutomaticMount = yes;               # when device opened, read it
+  RemovableMedia = no;
+  AlwaysOpen = no;
+}
+
+#
+# An autochanger device with two drives
+#
+#Autochanger {
+#  Name = Autochanger
+#  Device = Drive-1
+#  Device = Drive-2
+#  Changer Command = "/home/kern/bacula/bin/mtx-changer %c %o %S %a %d"
+#  Changer Device = /dev/sg0
+#}
+
+#Device {
+#  Name = Drive-1                      #
+#  Drive Index = 0
+#  Media Type = DLT-8000
+#  Archive Device = /dev/nst0
+#  AutomaticMount = yes;               # when device opened, read it
+#  AlwaysOpen = yes;
+#  RemovableMedia = yes;
+#  RandomAccess = no;
+#  AutoChanger = yes
+#  # Enable the Alert command only if you have the mtx package loaded
+#  Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
+#}
+
+#Device {
+#  Name = Drive-2                      #
+#  Drive Index = 1
+#  Media Type = DLT-8000
+#  Archive Device = /dev/nst1
+#  AutomaticMount = yes;               # when device opened, read it
+#  AlwaysOpen = yes;
+#  RemovableMedia = yes;
+#  RandomAccess = no;
+#  AutoChanger = yes
+#  # Enable the Alert command only if you have the mtx package loaded
+#  Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
+#}
+
+#
+# A Linux or Solaris tape drive
+#
+#Device {
+#  Name = DDS-4                        # 
+#  Media Type = DDS-4
+#  Archive Device = @TAPEDRIVE@
+#  AutomaticMount = yes;               # when device opened, read it
+#  AlwaysOpen = yes;
+#  RemovableMedia = yes;
+#  RandomAccess = no;
+## Changer Command = "@bin_dir@\\mtx-changer %c %o %S %a %d"
+## Changer Device = /dev/sg0
+## AutoChanger = yes
+#  # Enable the Alert command only if you have the mtx package loaded
+## Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
+#}
+
+#
+# A FreeBSD tape drive
+#
+#Device {
+#  Name = DDS-4 
+#  Description = "DDS-4 for FreeBSD"
+#  Media Type = DDS-4
+#  Archive Device = /dev/nsa1
+#  AutomaticMount = yes;               # when device opened, read it
+#  AlwaysOpen = yes
+#  Offline On Unmount = no
+#  Hardware End of Medium = no
+#  BSF at EOM = yes
+#  Backward Space Record = no
+#  Fast Forward Space File = no
+#  TWO EOF = yes
+#}
+
+#
+# A OnStream tape drive. 
+# You need the kernel osst driver 0.9.14 or later, and
+#   do "mt -f /dev/nosst0 defblksize 32768" once as root.
+#
+#Device {
+#  Name = OnStream
+#  Description = "OnStream drive on Linux"
+#  Media Type = OnStream
+#  Archive Device = @TAPEDRIVE@
+#  AutomaticMount = yes;               # when device opened, read it
+#  AlwaysOpen = yes
+#  Offline On Unmount = no
+## The min/max blocksizes of 32768 are *required*
+#  Minimum Block Size = 32768
+#  Maximum Block Size = 32768
+#}
+#
+# A DVD device
+#
+#Device {
+#  Name = "DVD-Writer"
+#  Media Type = DVD
+#  Archive Device = /dev/hdc
+#  LabelMedia = yes;                   # lets Bacula label unlabeled media
+#  Random Access = Yes;
+#  AutomaticMount = yes;               # when device opened, read it
+#  RemovableMedia = yes;
+#  AlwaysOpen = no;
+#  MaximumPartSize = 800M;
+#  RequiresMount = yes;
+#  MountPoint = /mnt/cdrom;
+#  MountCommand = "/bin/mount -t iso9660 -o ro %a %m";
+#  UnmountCommand = "/bin/umount %m";
+#  SpoolDirectory = /tmp/backup;
+#  WritePartCommand = "/etc/bacula/dvd-handler %a write %e %v"
+#  FreeSpaceCommand = "/etc/bacula/dvd-handler %a free"
+#}
+
+#
+# For OpenBSD OS >= 3.6
+#
+#Device {
+#  Name = DDS-3
+#  Media Type = DDS-3
+#  Archive Device = /dev/nrst0
+#  Use MTIOCGET= no
+#  BSF at EOM = yes
+#  TWO EOF = no
+#  AutomaticMount = yes;
+#  AlwaysOpen = yes;
+#  RemovableMedia = yes;
+#  RandomAccess = no;
+#}
+
+#
+# A very old Exabyte with no end of media detection
+#
+#Device {
+#  Name = "Exabyte 8mm"
+#  Media Type = "8mm"
+#  Archive Device = @TAPEDRIVE@
+#  Hardware end of medium = No;
+#  AutomaticMount = yes;               # when device opened, read it
+#  AlwaysOpen = Yes;
+#  RemovableMedia = yes;
+#  RandomAccess = no;
+#}
+
+# 
+# Send all messages to the Director, 
+# mount messages also are sent to the email address
+#
+Messages {
+  Name = Standard
+  director = @director_name@ = all
+}
diff --git a/bacula/src/win32/installer/bconsole.conf.in b/bacula/src/win32/installer/bconsole.conf.in
new file mode 100644 (file)
index 0000000..3013fa2
--- /dev/null
@@ -0,0 +1,10 @@
+#
+# Bacula User Agent (or Console) Configuration File
+#
+
+Director {
+  Name = @director_name@
+  DIRport = @director_port@
+  address = @director_address@
+  Password = "@director_password@"
+}
diff --git a/bacula/src/win32/installer/installer.vcproj b/bacula/src/win32/installer/installer.vcproj
new file mode 100644 (file)
index 0000000..7467016
--- /dev/null
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="8.00"
+       Name="installer"
+       ProjectGUID="{6D1B0964-FB32-4916-A61C-49D7F715EAD8}"
+       RootNamespace="installer"
+       >
+       <Platforms>
+               <Platform
+                       Name="Win32"
+               />
+       </Platforms>
+       <ToolFiles>
+       </ToolFiles>
+       <Configurations>
+               <Configuration
+                       Name="Debug|Win32"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="0"
+                       >
+                       <Tool
+                               Name="VCNMakeTool"
+                               BuildCommandLine="..\..\..\..\depkgs-msvc\nsis\makensis /V3 /DVERSION=1.39.18 /DDOC_DIR=..\..\..\..\docs /DBUILD_TOOLS=VC8_DEBUG /DVC_REDIST_DIR=&quot;$(VCInstallDir)redist\Debug_NonRedist\x86\Microsoft.VC80.DebugCRT&quot; /DDEPKGS_BIN=..\..\..\..\depkgs-msvc\bin /DBACULA_BIN=..\$(ConfigurationName) /DCATS_DIR=..\cats /DSCRIPT_DIR=..\scripts winbacula.nsi"
+                               ReBuildCommandLine="del winbacula-*.exe&#x0D;&#x0A;makensis -V3 -DVERSION=$(VERSION) -DDOC_DIR=..\..\..\..\docs -DBUILD_TOOLS=VC8_DEBUG -DVC_REDIST_DIR=$(VCInstallDir)redist\Debug_NonRedist\x86\Microsoft.VC80.DebugCRT -DDEPKGS_BIN=..\..\..\..\depkgs-msvc\bin -DBACULA_BIN=..\$(ConfigurationName) -DCATS_DIR=..\cats -DSCRIPT_DIR=..\scripts winbacula.nsi&#x0D;&#x0A;"
+                               CleanCommandLine="del winbacula-*.exe"
+                               Output="winbacula-1.39.18.exe"
+                               PreprocessorDefinitions="VERSION=$(VERSION);DOC_DIR=..\..\..\..\docs;BUILD_TOOLS=VC8_DEBUG;VC_REDIST_DIR=$(VCInstallDir)redist\Debug_NonRedist\x86\Microsoft.VC80.DebugCRT;DEPKGS_BIN=..\..\..\..\depkgs-msvc\bin;BACULA_BIN=..\$(ConfigurationName);CATS_DIR=..\cats;SCRIPT_DIR=..\scripts"
+                               IncludeSearchPath=""
+                               ForcedIncludes=""
+                               AssemblySearchPath=""
+                               ForcedUsingAssemblies=""
+                               CompileAsManaged=""
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Release|Win32"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="0"
+                       >
+                       <Tool
+                               Name="VCNMakeTool"
+                               BuildCommandLine="makensis -V3 -DVERSION=$(VERSION) -DDOC_DIR=..\..\..\..\docs -DBUILD_TOOLS=VC8_DEBUG -DVC_REDIST_DIR=$(VCInstallDir)redist\x86\Microsoft.VC80.CRT -DDEPKGS_BIN=..\..\..\..\depkgs-msvc\bin -DBACULA_BIN=..\$(ConfigurationName) -DCATS_DIR=..\cats -DSCRIPT_DIR=..\scripts winbacula.nsi"
+                               ReBuildCommandLine="del winbacula-*.exe&#x0D;&#x0A;makensis -V3 -DVERSION=$(VERSION) -DDOC_DIR=..\..\..\..\docs -DBUILD_TOOLS=VC8 -DVC_REDIST_DIR=$(VCInstallDir)redist\x86\Microsoft.VC80.CRT -DDEPKGS_BIN=..\..\..\..\depkgs-msvc\bin -DBACULA_BIN=..\$(ConfigurationName) -DCATS_DIR=..\cats -DSCRIPT_DIR=..\scripts winbacula.nsi&#x0D;&#x0A;"
+                               CleanCommandLine="del winbacula-*.exe"
+                               Output=""
+                               PreprocessorDefinitions=""
+                               IncludeSearchPath=""
+                               ForcedIncludes=""
+                               AssemblySearchPath=""
+                               ForcedUsingAssemblies=""
+                               CompileAsManaged=""
+                       />
+               </Configuration>
+       </Configurations>
+       <References>
+       </References>
+       <Files>
+               <Filter
+                       Name="Source Files"
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+                       >
+               </Filter>
+               <Filter
+                       Name="Header Files"
+                       Filter="h;hpp;hxx;hm;inl;inc;xsd"
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+                       >
+                       <File
+                               RelativePath=".\resource.h"
+                               >
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Resource Files"
+                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+                       >
+                       <File
+                               RelativePath=".\Dialogs.rc"
+                               >
+                       </File>
+               </Filter>
+               <File
+                       RelativePath=".\bacula-dir.conf.in"
+                       >
+               </File>
+               <File
+                       RelativePath=".\bacula-fd.conf.in"
+                       >
+               </File>
+               <File
+                       RelativePath=".\bacula-sd.conf.in"
+                       >
+               </File>
+               <File
+                       RelativePath=".\bconsole.conf.in"
+                       >
+               </File>
+               <File
+                       RelativePath=".\ClientConfig.ini"
+                       >
+               </File>
+               <File
+                       RelativePath=".\ConfigPage1.nsh"
+                       >
+               </File>
+               <File
+                       RelativePath=".\ConfigPage2.nsh"
+                       >
+               </File>
+               <File
+                       RelativePath=".\winbacula.nsi"
+                       >
+               </File>
+               <File
+                       RelativePath=".\wx-console.conf.in"
+                       >
+               </File>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>
index 42f503696fc1ef1bc1d0b3e075d1905603cd3115..c25ca981d616dc1afe7dddc2c67bcde862bcee43 100644 (file)
@@ -35,7 +35,6 @@
 ; /start
 
 !define PRODUCT "Bacula"
-!define BUILD_TOOLS "MinGW"
 
 ;
 ; Include the Modern UI
@@ -43,6 +42,8 @@
 !include "MUI.nsh"
 !include "LogicLib.nsh"
 !include "FileFunc.nsh"
+!include "Sections.nsh"
+!include "StrFunc.nsh"
 
 ;
 ; Basics
   InstType "Server"
   InstType "Full"
 
+  ${StrCase}
+  ${StrRep}
+  ${StrTrimNewLines}
+
 ;
 ; Pull in pages
 ;
 
- !insertmacro MUI_PAGE_WELCOME
-;  !insertmacro MUI_PAGE_LICENSE "..\..\LICENSE"
- !insertmacro MUI_PAGE_COMPONENTS
- !insertmacro MUI_PAGE_DIRECTORY
- Page custom EnterClientConfig LeaveClientConfig
- Page custom EnterOptions
- !insertmacro MUI_PAGE_INSTFILES
- !insertmacro MUI_PAGE_FINISH
+!InsertMacro MUI_PAGE_WELCOME
+;  !InsertMacro MUI_PAGE_LICENSE "..\..\LICENSE"
 
- !insertmacro MUI_UNPAGE_WELCOME
- !insertmacro MUI_UNPAGE_CONFIRM
- !insertmacro MUI_UNPAGE_INSTFILES
- !insertmacro MUI_UNPAGE_FINISH
+!define      MUI_COMPONENTSPAGE_SMALLDESC
 
- !define      MUI_ABORTWARNING
+!InsertMacro MUI_PAGE_COMPONENTS
+!InsertMacro MUI_PAGE_DIRECTORY
+Page custom EnterConfigPage1 LeaveConfigPage1
+Page custom EnterConfigPage2 LeaveConfigPage2
+!InsertMacro MUI_PAGE_INSTFILES
+!InsertMacro MUI_PAGE_FINISH
 
- !insertmacro MUI_LANGUAGE "English"
+!InsertMacro MUI_UNPAGE_WELCOME
+!InsertMacro MUI_UNPAGE_CONFIRM
+!InsertMacro MUI_UNPAGE_INSTFILES
+!InsertMacro MUI_UNPAGE_FINISH
 
- !insertmacro GetParameters
- !insertmacro GetOptions
+!define      MUI_ABORTWARNING
 
-DirText "Setup will install Bacula ${VERSION} to the directory specified below. To install in a different folder, click Browse and select another folder.$\n$\nNote to CYGWIN users: please choose your CYGWIN root directory."
+!InsertMacro MUI_LANGUAGE "English"
 
-;
-; Reserve Files
-;
- ReserveFile "ClientConfig.ini"
- !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
+!InsertMacro GetParameters
+!InsertMacro GetOptions
+
+DirText "Setup will install Bacula ${VERSION} to the directory specified below. To install in a different folder, click Browse and select another folder."
+
+!InsertMacro MUI_RESERVEFILE_INSTALLOPTIONS
 ;
 ; Global Variables
 ;
@@ -102,21 +106,38 @@ Var DatabaseDone
 
 Var OsIsNT
 
+Var HostName
+
 Var ConfigClientName
 Var ConfigClientPort
-Var ConfigMaxJobs
+Var ConfigClientMaxJobs
+Var ConfigClientPassword
+Var ConfigClientInstallService
+Var ConfigClientStartService
+
+Var ConfigStorageName
+Var ConfigStoragePort
+Var ConfigStorageMaxJobs
+Var ConfigStoragePassword
+Var ConfigStorageInstallService
+Var ConfigStorageStartService
+
 Var ConfigDirectorName
-Var ConfigDirectorPW
+Var ConfigDirectorPort
+Var ConfigDirectorMaxJobs
+Var ConfigDirectorPassword
+Var ConfigDirectorAddress
+Var ConfigDirectorMailServer
+Var ConfigDirectorMailAddress
+Var ConfigDirectorDB
+Var ConfigDirectorInstallService
+Var ConfigDirectorStartService
+
 Var ConfigMonitorName
-Var ConfigMonitorPW
+Var ConfigMonitorPassword
 
-Var OptionsClientService
-Var OptionsClientStart
-Var OptionsStorageService
-Var OptionsStorageStart
-Var OptionsDirectorService
-Var OptionsDirectorStart
-Var OptionsDirectorDB
+Var LocalDirectorPassword
+Var LocalHostAddress
 
 Var HDLG
 Var HCTL
@@ -124,7 +145,7 @@ Var HCTL
 Function .onInit
   Push $R0
   Push $R1
-  
+
   ; Process Command Line Options
   StrCpy $OptCygwin 0
   StrCpy $OptService 0
@@ -133,14 +154,14 @@ Function .onInit
   StrCpy $DependenciesDone 0
   StrCpy $DatabaseDone 0
   StrCpy $OsIsNT 0
-  
+
   ${GetParameters} $R0
-  
+
   ClearErrors
   ${GetOptions} $R0 "/cygwin" $R1
   IfErrors +2
     StrCpy $OptCygwin 1
-  
+
   ClearErrors
   ${GetOptions} $R0 "/service" $R1
   IfErrors +2
@@ -153,7 +174,7 @@ Function .onInit
 
   IfSilent 0 +2
     StrCpy $OptSilent 1
-    
+
   ${If} $OptCygwin = 1
     StrCpy $INSTDIR "C:\cygwin\bacula"
   ${EndIf}
@@ -163,8 +184,92 @@ Function .onInit
     StrCpy $OsIsNT 1
   ${EndIf}
 
-  !insertmacro MUI_INSTALLOPTIONS_EXTRACT "ClientConfig.ini"
+;  ${If} $OsIsNT = 0
+;    Call DisableServerSections
+;  ${EndIf}
+
+  Call GetComputerName
+  Pop $HostName
+
+  Call GetHostName
+  Pop $LocalHostAddress
   
+  Call GetUserName
+  Pop $ConfigDirectorMailAddress
+
+  ; Configuration Defaults
+  ;
+  StrCpy $ConfigClientName              "$HostName-fd"
+  StrCpy $ConfigClientPort              "9102"
+  StrCpy $ConfigClientMaxJobs           "2"
+  ;StrCpy $ConfigClientPassword
+  StrCpy $ConfigClientInstallService    "$OptService"
+  StrCpy $ConfigClientStartService      "$OptStart"
+
+  StrCpy $ConfigStorageName             "$HostName-sd"
+  StrCpy $ConfigStoragePort             "9103"
+  StrCpy $ConfigStorageMaxJobs          "10"
+  ;StrCpy $ConfigStoragePassword
+  StrCpy $ConfigStorageInstallService   "$OptService"
+  StrCpy $ConfigStorageStartService     "$OptStart"
+
+  ;StrCpy $ConfigDirectorName            "$HostName-dir"
+  StrCpy $ConfigDirectorPort            "9101"
+  StrCpy $ConfigDirectorMaxJobs         "1"
+  ;StrCpy $ConfigDirectorPassword
+  StrCpy $ConfigDirectorDB              "1"
+  StrCpy $ConfigDirectorInstallService  "$OptService"
+  StrCpy $ConfigDirectorStartService    "$OptStart"
+
+  StrCpy $ConfigMonitorName            "$HostName-mon"
+  ;StrCpy $ConfigMonitorPassword
+
+  InitPluginsDir
+  File "/oname=$PLUGINSDIR\openssl.exe"  "${DEPKGS_BIN}\openssl.exe"
+  File "/oname=$PLUGINSDIR\libeay32.dll" "${DEPKGS_BIN}\libeay32.dll"
+  File "/oname=$PLUGINSDIR\ssleay32.dll" "${DEPKGS_BIN}\ssleay32.dll"
+  File "/oname=$PLUGINSDIR\sed.exe" "${DEPKGS_BIN}\sed.exe"
+
+  nsExec::Exec '"$PLUGINSDIR\openssl.exe" rand -base64 -out $PLUGINSDIR\pw.txt 33'
+  pop $R0
+  ${If} $R0 = 0
+   FileOpen $R1 "$PLUGINSDIR\pw.txt" r
+   IfErrors +4
+     FileRead $R1 $R0
+     ${StrTrimNewLines} $ConfigClientPassword $R0
+     FileClose $R1
+  ${EndIf}
+
+  nsExec::Exec '"$PLUGINSDIR\openssl.exe" rand -base64 -out $PLUGINSDIR\pw.txt 33'
+  pop $R0
+  ${If} $R0 = 0
+   FileOpen $R1 "$PLUGINSDIR\pw.txt" r
+   IfErrors +4
+     FileRead $R1 $R0
+     ${StrTrimNewLines} $ConfigStoragePassword $R0
+     FileClose $R1
+  ${EndIf}
+
+  nsExec::Exec '"$PLUGINSDIR\openssl.exe" rand -base64 -out $PLUGINSDIR\pw.txt 33'
+  pop $R0
+  ${If} $R0 = 0
+   FileOpen $R1 "$PLUGINSDIR\pw.txt" r
+   IfErrors +4
+     FileRead $R1 $R0
+     ${StrTrimNewLines} $LocalDirectorPassword $R0
+     FileClose $R1
+  ${EndIf}
+
+  nsExec::Exec '"$PLUGINSDIR\openssl.exe" rand -base64 -out $PLUGINSDIR\pw.txt 33'
+  pop $R0
+  ${If} $R0 = 0
+   FileOpen $R1 "$PLUGINSDIR\pw.txt" r
+   IfErrors +4
+     FileRead $R1 $R0
+     ${StrTrimNewLines} $ConfigMonitorPassword $R0
+     FileClose $R1
+  ${EndIf}
+
   Pop $R1
   Pop $R0
 FunctionEnd
@@ -178,36 +283,56 @@ Function CopyDependencies
     File "${VC_REDIST_DIR}\msvcp80.dll"
     File "${VC_REDIST_DIR}\msvcr80.dll"
     File "${VC_REDIST_DIR}\Microsoft.VC80.CRT.manifest"
+    File "${DEPKGS_BIN}\pthreadVCE.dll"
+!endif
+!if "${BUILD_TOOLS}" == "VC8_DEBUG"
+    File "${VC_REDIST_DIR}\msvcm80d.dll"
+    File "${VC_REDIST_DIR}\msvcp80d.dll"
+    File "${VC_REDIST_DIR}\msvcr80d.dll"
+    File "${VC_REDIST_DIR}\Microsoft.VC80.DebugCRT.manifest"
+    File "${DEPKGS_BIN}\pthreadVCE.dll"
 !endif
 !if "${BUILD_TOOLS}" == "MinGW"
     File "${MINGW_BIN}\..\mingw32\bin\mingwm10.dll"
+    File "${DEPKGS_BIN}\pthreadGCE.dll"
+!endif
+    File "${DEPKGS_BIN}\libeay32.dll"
+    File "${DEPKGS_BIN}\ssleay32.dll"
+    File "${DEPKGS_BIN}\zlib1.dll"
+!if "${BUILD_TOOLS}" == "VC8"
+    File "${DEPKGS_BIN}\zlib1.dll.manifest"
+!endif
+!If "${BUILD_TOOLS}" == "VC8_DEBUG"
+    File "${DEPKGS_BIN}\zlib1.dll.manifest"
 !endif
-    File "libeay32.dll"
-    File "pthreadGCE.dll"
-    File "ssleay32.dll"
-    File "zlib1.dll"
-    File "openssl.exe"
-    File "bacula.dll"
+    File "${DEPKGS_BIN}\openssl.exe"
+    File "${BACULA_BIN}\bacula.dll"
     StrCpy $DependenciesDone 1
   ${EndIf}
 FunctionEnd
 
 Function InstallDatabase
   ${If} $DatabaseDone = 0
-    ${If} $OptionsDirectorDB = 1
-      File /oname=bacula_cats.dll "cats_mysql.dll"
-      File "libmysql.dll"
-    ${ElseIf} $OptionsDirectorDB = 2
-      File /oname=bacula_cats.dll "cats_pgsql.dll"
-      File "libpq.dll"
+    ${If} $ConfigDirectorDB = 1
+      File /oname=bacula_cats.dll "${BACULA_BIN}\cats_mysql.dll"
+      File "${DEPKGS_BIN}\libmysql.dll"
+    ${ElseIf} $ConfigDirectorDB = 2
+      File /oname=bacula_cats.dll "${BACULA_BIN}\cats_pgsql.dll"
+      File "${DEPKGS_BIN}\libpq.dll"
 !if "${BUILD_TOOLS}" == "VC8"
-      File "comerr32.dll"
-      File "libintl-2.dll"
-      File "libiconv-2.dll"
-      File "krb5_32.dll"
+      File "${DEPKGS_BIN}\comerr32.dll"
+      File "${DEPKGS_BIN}\libintl-2.dll"
+      File "${DEPKGS_BIN}\libiconv-2.dll"
+      File "${DEPKGS_BIN}\krb5_32.dll"
 !endif
-    ${ElseIf} $OptionsDirectorDB = 3
-      File /oname=bacula_cats.dll "cats_bdb.dll"
+!If "${BUILD_TOOLS}" == "VC8_DEBUG"
+      File "${DEPKGS_BIN}\comerr32.dll"
+      File "${DEPKGS_BIN}\libintl-2.dll"
+      File "${DEPKGS_BIN}\libiconv-2.dll"
+      File "${DEPKGS_BIN}\krb5_32.dll"
+!endif
+    ${ElseIf} $ConfigDirectorDB = 4
+      File /oname=bacula_cats.dll "${BACULA_BIN}\cats_bdb.dll"
     ${EndIf}
 
     StrCpy $DatabaseDone 1
@@ -225,9 +350,102 @@ Section "-Initialize"
   CreateDirectory "$INSTDIR"
   CreateDirectory "$INSTDIR\bin"
   CreateDirectory "$APPDATA\Bacula"
+  CreateDirectory "$APPDATA\Bacula\Work"
+  CreateDirectory "$APPDATA\Bacula\Spool"
 
   File "..\..\..\LICENSE"
   Delete /REBOOTOK "$INSTDIR\bin\License.txt"
+
+  FileOpen $R1 $PLUGINSDIR\config.sed w
+  FileWrite $R1 "s;@VERSION@;${VERSION};$\r$\n"
+  FileWrite $R1 "s;@DATE@;${__DATE__};$\r$\n"
+  FileWrite $R1 "s;@DISTNAME@;Windows;$\r$\n"
+
+!If "$BUILD_TOOLS" == "MinGW"
+  StrCpy $R2 "MinGW32"
+!Else
+  StrCpy $R2 "MVS"
+!EndIf
+
+  Call GetHostName
+  Exch $R3
+  Pop $R3
+
+  FileWrite $R1 "s;@DISTVER@;$R2;$\r$\n"
+
+  ${StrRep} $R2 "$APPDATA\Bacula\Work" "\" "\\\\"
+  FileWrite $R1 's;@working_dir@;$R2;$\r$\n'
+
+  ${StrRep} $R2 "$INSTDIR\bin" "\" "\\\\"
+  FileWrite $R1 's;@bin_dir@;$R2;$\r$\n'
+
+  FileWrite $R1 's;@TAPEDRIVE@;Tape0;$\r$\n'
+
+  Call IsDirectorSelected
+  Pop $R2
+
+  ${If} $R2 = 1
+    FileWrite $R1 "s;@director_address@;$LocalHostAddress;$\r$\n"
+  ${Else}
+    ${If} "$ConfigDirectorAddress" != ""
+      FileWrite $R1 "s;@director_address@;$ConfigDirectorAddress;$\r$\n"
+    ${EndIf}
+  ${EndIf}
+
+  FileWrite $R1 "s;@client_address@;$LocalHostAddress;$\r$\n"
+  FileWrite $R1 "s;@storage_address@;$LocalHostAddress;$\r$\n"
+
+  ${If} "$ConfigClientName" != ""
+    FileWrite $R1 "s;@client_name@;$ConfigClientName;$\r$\n"
+  ${EndIf}
+  ${If} "$ConfigClientPort" != ""
+    FileWrite $R1 "s;@client_port@;$ConfigClientPort;$\r$\n"
+  ${EndIf}
+  ${If} "$ConfigClientMaxJobs" != ""
+    FileWrite $R1 "s;@client_maxjobs@;$ConfigClientMaxJobs;$\r$\n"
+  ${EndIf}
+  ${If} "$ConfigClientPassword" != ""
+    FileWrite $R1 "s;@client_password@;$ConfigClientPassword;$\r$\n"
+  ${EndIf}
+  ${If} "$ConfigStorageName" != ""
+    FileWrite $R1 "s;@storage_name@;$ConfigStorageName;$\r$\n"
+  ${EndIf}
+  ${If} "$ConfigStoragePort" != ""
+    FileWrite $R1 "s;@storage_port@;$ConfigStoragePort;$\r$\n"
+  ${EndIf}
+  ${If} "$ConfigStorageMaxJobs" != ""
+    FileWrite $R1 "s;@storage_maxjobs@;$ConfigStorageMaxJobs;$\r$\n"
+  ${EndIf}
+  ${If} "$ConfigStoragePassword" != ""
+    FileWrite $R1 "s;@storage_password@;$ConfigStoragePassword;$\r$\n"
+  ${EndIf}
+  ${If} "$ConfigDirectorName" != ""
+    FileWrite $R1 "s;@director_name@;$ConfigDirectorName;$\r$\n"
+  ${EndIf}
+  ${If} "$ConfigDirectorPort" != ""
+    FileWrite $R1 "s;@director_port@;$ConfigDirectorPort;$\r$\n"
+  ${EndIf}
+  ${If} "$ConfigDirectorMaxJobs" != ""
+    FileWrite $R1 "s;@director_maxjobs@;$ConfigDirectorMaxJobs;$\r$\n"
+  ${EndIf}
+  ${If} "$ConfigDirectorPassword" != ""
+    FileWrite $R1 "s;@director_password@;$ConfigDirectorPassword;$\r$\n"
+  ${EndIf}
+  ${If} "$ConfigDirectorMailServer" != ""
+    FileWrite $R1 "s;@smtp_host@;$ConfigDirectorMailServer;$\r$\n"
+  ${EndIf}
+  ${If} "$ConfigDirectorMailAddress" != ""
+    FileWrite $R1 "s;@job_email@;$ConfigDirectorMailAddress;$\r$\n"
+  ${EndIf}
+  ${If} "$ConfigMonitorName" != ""
+    FileWrite $R1 "s;@monitor_name@;$ConfigMonitorName;$\r$\n"
+  ${EndIf}
+  ${If} "$ConfigMonitorPassword" != ""
+    FileWrite $R1 "s;@monitor_password@;$ConfigMonitorPassword;$\r$\n"
+  ${EndIf}
+
+  FileClose $R1
+
 SectionEnd
 
 SectionGroup "Client"
@@ -236,30 +454,27 @@ Section "File Service" SecFileDaemon
   SectionIn 1 2 3
 
   SetOutPath "$INSTDIR\bin"
-  File "bacula-fd.exe"
+  File "${BACULA_BIN}\bacula-fd.exe"
 
   StrCpy $R0 0
   StrCpy $R1 "$APPDATA\Bacula\bacula-fd.conf"
   IfFileExists $R1 0 +3
     StrCpy $R0 1
     StrCpy $R1 "$R1.new"
-    
-  File /oname=$R1 ..\filed\bacula-fd.conf.in
-  
-  ${If} $OptSilent <> 1
-  ${AndIf} $R0 <> 1
-    MessageBox MB_OK \
-        "Please edit the configuration file $R1 to fit your installation. When you click the OK button Wordpad will open to allow you to do this. Be sure to save your changes before closing Wordpad."
-    Exec 'write "$R1"'  ; spawn wordpad with the file to be edited
-  ${EndIf}
+
+  File "/oname=$PLUGINSDIR\bacula-fd.conf.in" "bacula-fd.conf.in"
+
+  nsExec::ExecToLog '$PLUGINSDIR\sed.exe -f "$PLUGINSDIR\config.sed" -i.bak "$PLUGINSDIR\bacula-fd.conf.in"'
+  CopyFiles "$PLUGINSDIR\bacula-fd.conf.in" "$R1"
+
   ${If} $OsIsNT = 1
-    ExecWait 'cmd.exe /C echo Y|cacls "$R1" /G SYSTEM:F Administrators:F'
+    nsExec::ExecToLog 'cmd.exe /C echo Y|cacls "$R1" /G SYSTEM:F Administrators:F'
   ${EndIf}
 
   StrCpy $0 bacula-fd
   StrCpy $1 "File Service"
-  StrCpy $2 $OptionsClientService
-  StrCpy $3 $OptionsClientStart
+  StrCpy $2 $ConfigClientInstallService
+  StrCpy $3 $ConfigClientStartService
   
   Call InstallDaemon
 
@@ -274,42 +489,39 @@ Section "Storage Service" SecStorageDaemon
   SectionIn 2 3
   
   SetOutPath "$INSTDIR\bin"
-  Call InstallDatabase
-  File "loaderinfo.exe"
-  File "mt.exe"
-  File "mtx.exe"
-  File "scsitape.exe"
-  File "tapeinfo.exe"
-  File "bacula-sd.exe"
-  File "bcopy.exe"
-  File "bextract.exe"
-  File "bls.exe"
-  File "bscan.exe"
-  File "btape.exe"
-  File ..\scripts\mtx-changer.cmd
+  File "${DEPKGS_BIN}\loaderinfo.exe"
+  File "${DEPKGS_BIN}\mt.exe"
+  File "${DEPKGS_BIN}\mtx.exe"
+  File "${DEPKGS_BIN}\scsitape.exe"
+  File "${DEPKGS_BIN}\tapeinfo.exe"
+  File "${BACULA_BIN}\bacula-sd.exe"
+  File "${BACULA_BIN}\bcopy.exe"
+  File "${BACULA_BIN}\bextract.exe"
+  File "${BACULA_BIN}\bls.exe"
+  File "${BACULA_BIN}\bscan.exe"
+  File "${BACULA_BIN}\btape.exe"
+  File "${BACULA_BIN}\scsilist.exe"
+  File /oname=mtx-changer.cmd ${SCRIPT_DIR}\mtx-changer.cmd
 
   StrCpy $R0 0
   StrCpy $R1 "$APPDATA\Bacula\bacula-sd.conf"
   IfFileExists $R1 0 +3
     StrCpy $R0 1
     StrCpy $R1 "$R1.new"
-    
-  File /oname=$R1 "..\..\stored\bacula-sd.conf.in"
-  
-  ${If} $OptSilent <> 1
-  ${AndIf} $R0 <> 1
-    MessageBox MB_OK \
-        "Please edit the configuration file $R1 to fit your installation. When you click the OK button Wordpad will open to allow you to do this. Be sure to save your changes before closing Wordpad."
-    Exec 'write "$R1"'  ; spawn wordpad with the file to be edited
-  ${EndIf}
+
+  File "/oname=$PLUGINSDIR\bacula-sd.conf.in" "bacula-sd.conf.in"
+
+  nsExec::ExecToLog '$PLUGINSDIR\sed.exe -f "$PLUGINSDIR\config.sed" -i.bak "$PLUGINSDIR\bacula-sd.conf.in"'
+  CopyFiles "$PLUGINSDIR\bacula-sd.conf.in" "$R1"
+
   ${If} $OsIsNT = 1
-    ExecWait 'cmd.exe /C echo Y|cacls "$R1" /G SYSTEM:F Administrators:F'
+    nsExec::ExecToLog 'cmd.exe /C echo Y|cacls "$R1" /G SYSTEM:F Administrators:F'
   ${EndIf}
 
   StrCpy $0 bacula-sd
   StrCpy $1 "Storage Service"
-  StrCpy $2 $OptionsStorageService
-  StrCpy $3 $OptionsStorageStart
+  StrCpy $2 $ConfigStorageInstallService
+  StrCpy $3 $ConfigStorageStartService
   Call InstallDaemon
 
   CreateShortCut "$SMPROGRAMS\Bacula\Edit Storage Configuration.lnk" "write.exe" '"$APPDATA\Bacula\bacula-sd.conf"'
@@ -320,64 +532,61 @@ Section "Director Service" SecDirectorDaemon
 
   SetOutPath "$INSTDIR\bin"
   Call InstallDatabase
-  File "bacula-dir.exe"
-  File "dbcheck.exe"
-
-  ${If} $OptionsDirectorDB = 1
-    File /oname=create_database.cmd ..\cats\create_mysql_database.cmd
-    File /oname=drop_database.cmd ..\cats\drop_mysql_database.cmd
-    File /oname=make_tables.cmd ..\cats\make_mysql_tables.cmd
-    File ..\cats\make_mysql_tables.sql
-    File /oname=drop_tables.cmd ..\cats\drop_mysql_tables.cmd
-    File ..\cats\drop_mysql_tables.sql
-    File /oname=update_tables.cmd ..\cats\update_mysql_tables.cmd
-    File ..\cats\update_mysql_tables.sql
-    File /oname=grant_privileges.cmd ..\cats\grant_mysql_privileges.cmd
-    File ..\cats\grant_mysql_privileges.sql
-  ${ElseIf} $OptionsDirectorDB = 2
-    File /oname=create_database.cmd ..\cats\create_postgresql_database.cmd
-    File /oname=drop_database.cmd ..\cats\drop_postgresql_database.cmd
-    File /oname=make_tables.cmd ..\cats\make_postgresql_tables.cmd
-    File ..\cats\make_postgresql_tables.sql
-    File /oname=drop_tables.cmd ..\cats\drop_postgresql_tables.cmd
-    File ..\cats\drop_postgresql_tables.sql
-    File /oname=update_tables.cmd ..\cats\update_postgresql_tables.cmd
-    File ..\cats\update_postgresql_tables.sql
-    File /oname=grant_privileges.cmd ..\cats\grant_postgresql_privileges.cmd
-    File ..\cats\grant_postgresql_privileges.sql
-  ${ElseIf} $OptionsDirectorDB = 3
-    File /oname=create_database.cmd ../cats/create_bdb_database.cmd
-    File /oname=drop_database.cmd ../cats/drop_bdb_database.cmd
-    File /oname=make_tables.cmd ../cats/make_bdb_tables.cmd
-    File /oname=drop_tables.cmd ../cats/drop_bdb_tables.cmd
-    File /oname=update_tables.cmd ../cats/update_bdb_tables.cmd
-    File /oname=grant_privileges.cmd ../cats/grant_bdb_privileges.cmd
-  ${EndIf}
-  File ..\cats\make_catalog_backup.cmd
-  File ..\cats\delete_catalog_backup.cmd
+  File "${BACULA_BIN}\bacula-dir.exe"
+  File "${BACULA_BIN}\dbcheck.exe"
+
+  ${If} $ConfigDirectorDB = 1
+    File /oname=create_database.cmd ${CATS_DIR}\create_mysql_database.cmd
+    File /oname=drop_database.cmd ${CATS_DIR}\drop_mysql_database.cmd
+    File /oname=make_tables.cmd ${CATS_DIR}\make_mysql_tables.cmd
+    File ${CATS_DIR}\make_mysql_tables.sql
+    File /oname=drop_tables.cmd ${CATS_DIR}\drop_mysql_tables.cmd
+    File ${CATS_DIR}\drop_mysql_tables.sql
+    File /oname=update_tables.cmd ${CATS_DIR}\update_mysql_tables.cmd
+    File ${CATS_DIR}\update_mysql_tables.sql
+    File /oname=grant_privileges.cmd ${CATS_DIR}\grant_mysql_privileges.cmd
+    File ${CATS_DIR}\grant_mysql_privileges.sql
+  ${ElseIf} $ConfigDirectorDB = 2
+    File /oname=create_database.cmd ${CATS_DIR}\create_postgresql_database.cmd
+    File /oname=drop_database.cmd ${CATS_DIR}\drop_postgresql_database.cmd
+    File /oname=make_tables.cmd ${CATS_DIR}\make_postgresql_tables.cmd
+    File ${CATS_DIR}\make_postgresql_tables.sql
+    File /oname=drop_tables.cmd ${CATS_DIR}\drop_postgresql_tables.cmd
+    File ${CATS_DIR}\drop_postgresql_tables.sql
+    File /oname=update_tables.cmd ${CATS_DIR}\update_postgresql_tables.cmd
+    File ${CATS_DIR}\update_postgresql_tables.sql
+    File /oname=grant_privileges.cmd ${CATS_DIR}\grant_postgresql_privileges.cmd
+    File ${CATS_DIR}\grant_postgresql_privileges.sql
+  ${ElseIf} $ConfigDirectorDB = 3
+    File /oname=create_database.cmd ${CATS_DIR}\create_bdb_database.cmd
+    File /oname=drop_database.cmd ${CATS_DIR}\drop_bdb_database.cmd
+    File /oname=make_tables.cmd ${CATS_DIR}\make_bdb_tables.cmd
+    File /oname=drop_tables.cmd ${CATS_DIR}\drop_bdb_tables.cmd
+    File /oname=update_tables.cmd ${CATS_DIR}\update_bdb_tables.cmd
+    File /oname=grant_privileges.cmd ${CATS_DIR}\grant_bdb_privileges.cmd
+  ${EndIf}
+  File ${CATS_DIR}\make_catalog_backup.cmd
+  File ${CATS_DIR}\delete_catalog_backup.cmd
 
   StrCpy $R0 0
   StrCpy $R1 "$APPDATA\Bacula\bacula-dir.conf"
   IfFileExists $R1 0 +3
     StrCpy $R0 1
     StrCpy $R1 "$R1.new"
-    
-  File /oname=$R1 "..\..\dird\bacula-dir.conf.in"
-  
-  ${If} $OptSilent <> 1
-  ${AndIf} $R0 <> 1
-    MessageBox MB_OK \
-        "Please edit the configuration file $R1 to fit your installation. When you click the OK button Wordpad will open to allow you to do this. Be sure to save your changes before closing Wordpad."
-    Exec 'write "$R1"'  ; spawn wordpad with the file to be edited
-  ${EndIf}
+
+  File "/oname=$PLUGINSDIR\bacula-dir.conf.in" "bacula-dir.conf.in"
+
+  nsExec::ExecToLog '$PLUGINSDIR\sed.exe -f "$PLUGINSDIR\config.sed" -i.bak "$PLUGINSDIR\bacula-dir.conf.in"'
+  CopyFiles "$PLUGINSDIR\bacula-dir.conf.in" "$R1"
+
   ${If} $OsIsNT = 1
-    ExecWait 'cmd.exe /C echo Y|cacls "$R1" /G SYSTEM:F Administrators:F'
+    nsExec::ExecToLog 'cmd.exe /C echo Y|cacls "$R1" /G SYSTEM:F Administrators:F'
   ${EndIf}
 
   StrCpy $0 bacula-dir
   StrCpy $1 "Director Service"
-  StrCpy $2 $OptionsDirectorService
-  StrCpy $3 $OptionsDirectorStart
+  StrCpy $2 $ConfigDirectorInstallService
+  StrCpy $3 $ConfigDirectorStartService
   Call InstallDaemon
 
   CreateShortCut "$SMPROGRAMS\Bacula\Edit Director Configuration.lnk" "write.exe" '"$APPDATA\Bacula\bacula-dir.conf"'
@@ -390,7 +599,7 @@ SectionGroup "Consoles"
 Section "Command Console" SecConsole
   SectionIn 3
 
-  File "bconsole.exe"
+  File "${BACULA_BIN}\bconsole.exe"
   Call CopyDependencies
 
   StrCpy $R0 0
@@ -398,17 +607,14 @@ Section "Command Console" SecConsole
   IfFileExists $R1 0 +3
     StrCpy $R0 1
     StrCpy $R1 "$R1.new"
-    
-  File /oname=$R1 "..\..\console\bconsole.conf.in"
-  
-  ${If} $OptSilent <> 1
-  ${AndIf} $R0 <> 1
-    MessageBox MB_OK \
-        "Please edit the configuration file $R1 to fit your installation. When you click the OK button Wordpad will open to allow you to do this. Be sure to save your changes before closing Wordpad."
-    Exec 'write "$R1"'  ; spawn wordpad with the file to be edited
-  ${EndIf}
+
+  File "/oname=$PLUGINSDIR\bconsole.conf.in" "bconsole.conf.in"
+
+  nsExec::ExecToLog '$PLUGINSDIR\sed.exe -f "$PLUGINSDIR\config.sed" -i.bak "$PLUGINSDIR\bconsole.conf.in"'
+  CopyFiles "$PLUGINSDIR\bconsole.conf.in" "$R1"
+
   ${If} $OsIsNT = 1
-    ExecWait 'cmd.exe /C echo Y|cacls "$R1" /G SYSTEM:F Administrators:F'
+    nsExec::ExecToLog 'cmd.exe /C echo Y|cacls "$R1" /G SYSTEM:F Administrators:F'
   ${EndIf}
 
   CreateShortCut "$SMPROGRAMS\Bacula\Edit Command Console Configuration.lnk" "write.exe" '"$APPDATA\Bacula\bconsole.conf"'
@@ -419,26 +625,34 @@ Section "Graphical Console" SecWxConsole
   SectionIn 1 2 3
   
   Call CopyDependencies
-  File "wxbase26_gcc_bacula.dll"
-  File "wxmsw26_core_gcc_bacula.dll"
-  File "wx-console.exe"
+!if "${BUILD_TOOLS}" == "VC8"
+  File "${DEPKGS_BIN}\wxbase270_vc_bacula.dll"
+  File "${DEPKGS_BIN}\wxmsw270_core_vc_bacula.dll"
+!endif
+!If "${BUILD_TOOLS}" == "VC8_DEBUG"
+  File "${DEPKGS_BIN}\wxbase270_vc_bacula.dll"
+  File "${DEPKGS_BIN}\wxmsw270_core_vc_bacula.dll"
+!endif
+!if "${BUILD_TOOLS}" == "MinGW"
+  File "${DEPKGS_BIN}\wxbase26_gcc_bacula.dll"
+  File "${DEPKGS_BIN}\wxmsw26_core_gcc_bacula.dll"
+!endif
+
+  File "${BACULA_BIN}\wx-console.exe"
 
   StrCpy $R0 0
   StrCpy $R1 "$APPDATA\Bacula\wx-console.conf"
   IfFileExists $R1 0 +3
     StrCpy $R0 1
     StrCpy $R1 "$R1.new"
-    
-  File /oname=$R1 "..\..\wx-console\wx-console.conf.in"
-  
-  ${If} $OptSilent <> 1
-  ${AndIf} $R0 <> 1
-    MessageBox MB_OK \
-        "Please edit the configuration file $R1 to fit your installation. When you click the OK button Wordpad will open to allow you to do this. Be sure to save your changes before closing Wordpad."
-    Exec 'write "$R1"'  ; spawn wordpad with the file to be edited
-  ${EndIf}
+
+  File "/oname=$PLUGINSDIR\wx-console.conf.in" "wx-console.conf.in"
+
+  nsExec::ExecToLog '$PLUGINSDIR\sed.exe -f "$PLUGINSDIR\config.sed" -i.bak "$PLUGINSDIR\wx-console.conf.in"'
+  CopyFiles "$PLUGINSDIR\wx-console.conf.in" "$R1"
+
   ${If} $OsIsNT = 1
-    ExecWait 'cmd.exe /C echo Y|cacls "$R1" /G SYSTEM:F Administrators:F'
+    nsExec::ExecToLog 'cmd.exe /C echo Y|cacls "$R1" /G SYSTEM:F Administrators:F'
   ${EndIf}
 
   ; Create Start Menu entry
@@ -455,7 +669,7 @@ Section "Documentation (Acrobat Format)" SecDocPdf
 
   SetOutPath "$INSTDIR\doc"
   CreateDirectory "$INSTDIR\doc"
-  File "${DOCDIR}\manual\bacula.pdf"
+  File "${DOC_DIR}\manual\bacula.pdf"
   CreateShortCut "$SMPROGRAMS\Bacula\Manual.lnk" '"$INSTDIR\doc\bacula.pdf"'
 SectionEnd
 
@@ -464,15 +678,15 @@ Section "Documentation (HTML Format)" SecDocHtml
 
   SetOutPath "$INSTDIR\doc"
   CreateDirectory "$INSTDIR\doc"
-  File "${DOCDIR}\manual\bacula\*.html"
-  File "${DOCDIR}\manual\bacula\*.png"
-  File "${DOCDIR}\manual\bacula\*.css"
+  File "${DOC_DIR}\manual\bacula\*.html"
+  File "${DOC_DIR}\manual\bacula\*.png"
+  File "${DOC_DIR}\manual\bacula\*.css"
   CreateShortCut "$SMPROGRAMS\Bacula\Manual (HTML).lnk" '"$INSTDIR\doc\bacula.html"'
 SectionEnd
 
 SectionGroupEnd
 
-Section "-Write Installer"
+Section "-Write Uninstaller"
   ; Write the uninstall keys for Windows & create Start Menu entry
   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "DisplayName" "Bacula"
   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "UninstallString" '"$INSTDIR\uninstall.exe"'
@@ -492,21 +706,21 @@ SectionEnd
   LangString DESC_SecDocPdf ${LANG_ENGLISH} "Install documentation in Acrobat format on this system."
   LangString DESC_SecDocHtml ${LANG_ENGLISH} "Install documentation in HTML format on this system."
 
-  LangString TITLE_ClientConfig ${LANG_ENGLISH} "Configure Client"
-  LangString SUBTITLE_ClientConfig ${LANG_ENGLISH} "Create initial configuration for Client."
+  LangString TITLE_ConfigPage1 ${LANG_ENGLISH} "Configuration"
+  LangString SUBTITLE_ConfigPage1 ${LANG_ENGLISH} "Set installation configuration."
 
-  LangString TITLE_Options ${LANG_ENGLISH} "Options"
-  LangString SUBTITLE_Options ${LANG_ENGLISH} "Set installation options."
+  LangString TITLE_ConfigPage2 ${LANG_ENGLISH} "Configuration (continued)"
+  LangString SUBTITLE_ConfigPage2 ${LANG_ENGLISH} "Set installation configuration."
 
-  !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
-    !insertmacro MUI_DESCRIPTION_TEXT ${SecFileDaemon} $(DESC_SecFileDaemon)
-    !insertmacro MUI_DESCRIPTION_TEXT ${SecStorageDaemon} $(DESC_SecStorageDaemon)
-    !insertmacro MUI_DESCRIPTION_TEXT ${SecDirectorDaemon} $(DESC_SecDirectorDaemon)
-    !insertmacro MUI_DESCRIPTION_TEXT ${SecConsole} $(DESC_SecConsole)
-    !insertmacro MUI_DESCRIPTION_TEXT ${SecWxConsole} $(DESC_SecWxConsole)
-    !insertmacro MUI_DESCRIPTION_TEXT ${SecDocPdf} $(DESC_SecDocPdf)
-    !insertmacro MUI_DESCRIPTION_TEXT ${SecDocHtml} $(DESC_SecDocHtml)
-  !insertmacro MUI_FUNCTION_DESCRIPTION_END
+  !InsertMacro MUI_FUNCTION_DESCRIPTION_BEGIN
+    !InsertMacro MUI_DESCRIPTION_TEXT ${SecFileDaemon} $(DESC_SecFileDaemon)
+    !InsertMacro MUI_DESCRIPTION_TEXT ${SecStorageDaemon} $(DESC_SecStorageDaemon)
+    !InsertMacro MUI_DESCRIPTION_TEXT ${SecDirectorDaemon} $(DESC_SecDirectorDaemon)
+    !InsertMacro MUI_DESCRIPTION_TEXT ${SecConsole} $(DESC_SecConsole)
+    !InsertMacro MUI_DESCRIPTION_TEXT ${SecWxConsole} $(DESC_SecWxConsole)
+    !InsertMacro MUI_DESCRIPTION_TEXT ${SecDocPdf} $(DESC_SecDocPdf)
+    !InsertMacro MUI_DESCRIPTION_TEXT ${SecDocHtml} $(DESC_SecDocHtml)
+  !InsertMacro MUI_FUNCTION_DESCRIPTION_END
 
 ; Uninstall section
 
@@ -514,26 +728,26 @@ UninstallText "This will uninstall Bacula. Hit next to continue."
 
 Section "Uninstall"
   ; Shutdown any baculum that could be running
-  ExecWait '"$INSTDIR\bin\bacula-fd.exe" /kill'
-  ExecWait '"$INSTDIR\bin\bacula-sd.exe" /kill'
-  ExecWait '"$INSTDIR\bin\bacula-dir.exe" /kill'
+  nsExec::ExecToLog '"$INSTDIR\bin\bacula-fd.exe" /kill'
+  nsExec::ExecToLog '"$INSTDIR\bin\bacula-sd.exe" /kill'
+  nsExec::ExecToLog '"$INSTDIR\bin\bacula-dir.exe" /kill'
 
-  ReadRegDWORD $R0 HKLM "Software\Bacula" "Installed_Bacula-fd"
+  ReadRegDWORD $R0 HKLM "Software\Bacula" "Service_Bacula-fd"
   ${If} $R0 = 1
     ; Remove bacula service
-    ExecWait '"$INSTDIR\bin\bacula-fd.exe" /remove'
+    nsExec::ExecToLog '"$INSTDIR\bin\bacula-fd.exe" /remove'
   ${EndIf}
   
-  ReadRegDWORD $R0 HKLM "Software\Bacula" "Installed_Bacula-sd"
+  ReadRegDWORD $R0 HKLM "Software\Bacula" "Service_Bacula-sd"
   ${If} $R0 = 1
     ; Remove bacula service
-    ExecWait '"$INSTDIR\bin\bacula-sd.exe" /remove'
+    nsExec::ExecToLog '"$INSTDIR\bin\bacula-sd.exe" /remove'
   ${EndIf}
   
-  ReadRegDWORD $R0 HKLM "Software\Bacula" "Installed_Bacula-dir"
+  ReadRegDWORD $R0 HKLM "Software\Bacula" "Service_Bacula-dir"
   ${If} $R0 = 1
     ; Remove bacula service
-    ExecWait '"$INSTDIR\bin\bacula-dir.exe" /remove'
+    nsExec::ExecToLog '"$INSTDIR\bin\bacula-dir.exe" /remove'
   ${EndIf}
   
   ; remove registry keys
@@ -562,262 +776,6 @@ Section "Uninstall"
   RMDir "$INSTDIR"
 SectionEnd
 
-Function EnterClientConfig
-  SectionGetFlags ${SecFileDaemon} $R0
-  IntOp $R0 $R0 & 1
-  
-  SectionGetFlags ${SecStorageDaemon} $R1
-  IntOp $R1 $R1 & 1
-  
-  SectionGetFlags ${SecDirectorDaemon} $R2
-  IntOp $R2 $R2 & 1
-  
-  ${If} $R0 = 0
-  ${OrIf} $R1 = 1
-  ${OrIf} $R2 = 1
-    Abort
-  ${EndIf}
-  
-  !insertmacro MUI_HEADER_TEXT "$(TITLE_ClientConfig)" "$(SUBTITLE_ClientConfig)"
-  !insertmacro MUI_INSTALLOPTIONS_INITDIALOG "ClientConfig.ini"
-  Pop $HDLG ;HWND of dialog
-
-  ; Initialize Controls
-  ; Client Name
-  !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ClientConfig.ini" "Field 3" "HWND"
-  SendMessage $HCTL ${EM_LIMITTEXT} 30 0
-  
-  ; Client Port Number
-  !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ClientConfig.ini" "Field 6" "HWND"
-  SendMessage $HCTL ${EM_LIMITTEXT} 5 0
-  SendMessage $HCTL ${WM_SETTEXT} 0 "STR:9102"
-
-  ; Max Jobs
-  !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ClientConfig.ini" "Field 8" "HWND"
-  SendMessage $HCTL ${EM_LIMITTEXT} 2 0
-  SendMessage $HCTL ${WM_SETTEXT} 0 "STR:20"
-
-  ; Director Name
-  !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ClientConfig.ini" "Field 11" "HWND"
-  SendMessage $HCTL ${EM_LIMITTEXT} 30 0
-
-  ; Director Password
-  !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ClientConfig.ini" "Field 14" "HWND"
-  SendMessage $HCTL ${EM_LIMITTEXT} 60 0
-
-  ; Monitor Name
-  !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ClientConfig.ini" "Field 17" "HWND"
-  SendMessage $HCTL ${EM_LIMITTEXT} 30 0
-
-  ; Monitor Password
-  !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ClientConfig.ini" "Field 20" "HWND"
-  SendMessage $HCTL ${EM_LIMITTEXT} 60 0
-
-  !insertmacro MUI_INSTALLOPTIONS_SHOW
-  
-  ;
-  ; Process results
-  ;
-  ; Client Name
-  !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientName "ClientConfig.ini" "Field 3" "State"
-  ; Client Port Number
-  !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientPort "ClientConfig.ini" "Field 6" "State"
-  ; Max Jobs
-  !insertmacro MUI_INSTALLOPTIONS_READ $ConfigMaxJobs "ClientConfig.ini" "Field 8" "State"
-
-  ; Director Name
-  !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorName "ClientConfig.ini" "Field 11" "State"
-  ; Director Password
-  !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorPW "ClientConfig.ini" "Field 14" "State"
-
-  ; Monitor Name
-  !insertmacro MUI_INSTALLOPTIONS_READ $ConfigMonitorName "ClientConfig.ini" "Field 17" "State"
-  ; Monitor Password
-  !insertmacro MUI_INSTALLOPTIONS_READ $ConfigMonitorPW "ClientConfig.ini" "Field 20" "State"
-FunctionEnd
-
-Function LeaveClientConfig
-  ; Client Port Number
-  !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ClientConfig.ini" "Field 6" "State"
-  ${If} $R0 < 1024
-  ${OrIf} $R0 > 65535
-    MessageBox MB_OK "Port must be between 1024 and 65535 inclusive."
-    Abort
-  ${EndIf}
-  
-  ; Max Jobs
-  !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ClientConfig.ini" "Field 8" "State"
-  ${If} $R0 < 1
-  ${OrIf} $R0 > 99
-    MessageBox MB_OK "Max Jobs must be between 1 and 99 inclusive."
-    Abort
-  ${EndIf}
-FunctionEnd
-
-Function EnterOptions
-  SectionGetFlags ${SecFileDaemon} $R0
-  IntOp $R0 $R0 & 1
-  
-  SectionGetFlags ${SecStorageDaemon} $R1
-  IntOp $R1 $R1 & 1
-  
-  SectionGetFlags ${SecDirectorDaemon} $R2
-  IntOp $R2 $R2 & 1
-  
-  ${If} $R0 = 0
-  ${AndIf} $R1 = 0
-  ${AndIf} $R2 = 0
-    Abort
-  ${EndIf}
-  
-  FileOpen $R3 "$PLUGINSDIR\options.ini" w
-
-  StrCpy $R4 1  ; Field Number
-  StrCpy $R5 0  ; Top
-  
-  ${If} $R0 = 1
-    IntOp $R6 $R5 + 34
-
-    FileWrite $R3 '[Field $R4]$\r$\n'
-    FileWrite $R3 'Type="GroupBox"$\r$\nText="Client"$\r$\nLeft=0$\r$\nTop=$R5$\r$\nRight=300$\r$\nBottom=$R6$\r$\n'
-
-    IntOp $R4 $R4 + 1
-    IntOp $R5 $R5 + 8
-    IntOp $R6 $R5 + 12
-
-    FileWrite $R3 '[Field $R4]$\r$\nType="Checkbox"$\r$\nState=$OptService$\r$\nText="Install as service"$\r$\nLeft=6$\r$\nTop=$R5$\r$\nRight=280$\r$\nBottom=$R6$\r$\n'
-
-    IntOp $R4 $R4 + 1
-    StrCpy $R5 $R6
-    IntOp $R6 $R5 + 12
-
-    FileWrite $R3 '[Field $R4]$\r$\nType="Checkbox"$\r$\nState=$OptStart$\r$\nText="Start after install"$\r$\nLeft=6$\r$\nTop=$R5$\r$\nRight=280$\r$\nBottom=$R6$\r$\n'
-
-    IntOp $R4 $R4 + 1
-    IntOp $R5 $R6 + 8
-  ${Endif}
-  
-  ${If} $R1 = 1
-    IntOp $R6 $R5 + 34 
-
-    FileWrite $R3 '[Field $R4]$\r$\n'
-    FileWrite $R3 'Type="GroupBox"$\r$\nText="Storage"$\r$\nLeft=0$\r$\nTop=$R5$\r$\nRight=300$\r$\nBottom=$R6$\r$\n'
-
-    IntOp $R4 $R4 + 1
-    IntOp $R5 $R5 + 8
-    IntOp $R6 $R5 + 12
-
-    FileWrite $R3 '[Field $R4]$\r$\nType="Checkbox"$\r$\nState=$OptService$\r$\nText="Install as service"$\r$\nLeft=6$\r$\nTop=$R5$\r$\nRight=280$\r$\nBottom=$R6$\r$\n'
-
-    IntOp $R4 $R4 + 1
-    StrCpy $R5 $R6
-    IntOp $R6 $R5 + 12
-
-    FileWrite $R3 '[Field $R4]$\r$\nType="Checkbox"$\r$\nState=$OptStart$\r$\nText="Start after install"$\r$\nLeft=6$\r$\nTop=$R5$\r$\nRight=280$\r$\nBottom=$R6$\r$\n'
-
-    IntOp $R4 $R4 + 1
-    IntOp $R5 $R6 + 8
-  ${Endif}
-  
-  ${If} $R2 = 1
-    IntOp $R6 $R5 + 46
-
-    FileWrite $R3 '[Field $R4]$\r$\n'
-    FileWrite $R3 'Type="GroupBox"$\r$\nText="Director"$\r$\nLeft=0$\r$\nTop=$R5$\r$\nRight=300$\r$\nBottom=$R6$\r$\n'
-
-    IntOp $R4 $R4 + 1
-    IntOp $R5 $R5 + 8
-    IntOp $R6 $R5 + 12
-
-    FileWrite $R3 '[Field $R4]$\r$\nType="Checkbox"$\r$\nState=$OptService$\r$\nText="Install as service"$\r$\nLeft=6$\r$\nTop=$R5$\r$\nRight=280$\r$\nBottom=$R6$\r$\n'
-
-    IntOp $R4 $R4 + 1
-    StrCpy $R5 $R6
-    IntOp $R6 $R5 + 12
-
-    FileWrite $R3 '[Field $R4]$\r$\nType="Checkbox"$\r$\nState=$OptStart$\r$\nText="Start after install"$\r$\nLeft=6$\r$\nTop=$R5$\r$\nRight=280$\r$\nBottom=$R6$\r$\n'
-
-    IntOp $R4 $R4 + 1
-    IntOp $R5 $R6 + 8
-  ${Endif}
-  ${If} $R1 = 1
-  ${OrIf} $R2 = 1
-    IntOp $R4 $R4 + 1
-    IntOp $R5 $R6 + 2
-    IntOp $R6 $R5 + 8
-
-    FileWrite $R3 '[Field $R4]$\r$\nType="Label"$\r$\nText="Database:"$\r$\nLeft=6$\r$\nTop=$R5$\r$\nRight=46$\r$\nBottom=$R6$\r$\n'
-
-    IntOp $R4 $R4 + 1
-    IntOp $R5 $R5 - 2
-    IntOp $R6 $R5 + 12
-
-    FileWrite $R3 '[Field $R4]$\r$\nType="RadioButton"$\r$\nState=1$\r$\nText="MySQL"$\r$\nFlags="GROUP"$\r$\nLeft=46$\r$\nTop=$R5$\r$\nRight=86$\r$\nBottom=$R6$\r$\n'
-
-    IntOp $R4 $R4 + 1
-    IntOp $R6 $R5 + 12
-
-    FileWrite $R3 '[Field $R4]$\r$\nType="RadioButton"$\r$\nState=0$\r$\nText="PostgreSQL"$\r$\nFlags="NOTABSTOP"$\r$\nLeft=86$\r$\nTop=$R5$\r$\nRight=142$\r$\nBottom=$R6$\r$\n'
-
-    IntOp $R4 $R4 + 1
-    IntOp $R6 $R5 + 12
-
-    FileWrite $R3 '[Field $R4]$\r$\nType="RadioButton"$\r$\nState=0$\r$\nText="Builtin"$\r$\nFlags="NOTABSTOP"$\r$\nLeft=142$\r$\nTop=$R5$\r$\nRight=182$\r$\nBottom=$R6$\r$\n'
-
-  ${Endif}
-
-  IntOp $R4 $R4 - 1
-    
-  FileWrite $R3 "[Settings]$\r$\nNumFields=$R4$\r$\n"
-  
-  FileClose $R3
-   
-  !insertmacro MUI_HEADER_TEXT "$(TITLE_Options)" "$(SUBTITLE_Options)"
-  !insertmacro MUI_INSTALLOPTIONS_DISPLAY "Options.ini"
-  
-  ;
-  ; Process results
-  ;
-  StrCpy $R4 2
-  
-  ${If} $R0 = 1
-    ; Client
-    !insertmacro MUI_INSTALLOPTIONS_READ $OptionsClientService "Options.ini" "Field $R4" "State"
-    IntOp $R4 $R4 + 1
-    !insertmacro MUI_INSTALLOPTIONS_READ $OptionsClientStart "Options.ini" "Field $R4" "State"
-    IntOp $R4 $R4 + 2
-  ${EndIf}
-  
-  ${If} $R0 = 1
-    ; Client
-    !insertmacro MUI_INSTALLOPTIONS_READ $OptionsStorageService "Options.ini" "Field $R4" "State"
-    IntOp $R4 $R4 + 1
-    !insertmacro MUI_INSTALLOPTIONS_READ $OptionsStorageStart "Options.ini" "Field $R4" "State"
-    IntOp $R4 $R4 + 2
-  ${EndIf}
-  
-  ${If} $R0 = 1
-    ; Client
-    !insertmacro MUI_INSTALLOPTIONS_READ $OptionsDirectorService "Options.ini" "Field $R4" "State"
-    IntOp $R4 $R4 + 1
-    !insertmacro MUI_INSTALLOPTIONS_READ $OptionsDirectorStart "Options.ini" "Field $R4" "State"
-    IntOp $R4 $R4 + 2
-    !insertmacro MUI_INSTALLOPTIONS_READ $R3 "Options.ini" "Field $R4" "State"
-    ${If} $R3 = 1
-      StrCpy $OptionsDirectorDB 1
-    ${Else}
-      IntOp $R4 $R4 + 1
-      !insertmacro MUI_INSTALLOPTIONS_READ $R3 "Options.ini" "Field $R4" "State"
-      ${If} $R3 = 1
-        StrCpy $OptionsDirectorDB 2
-      ${Else}
-        StrCpy $OptionsDirectorDB 3
-      ${Endif}
-    ${Endif}
-  ${EndIf}
-FunctionEnd
-
 ;
 ; $0 - Service Name (ie Bacula-FD)
 ; $1 - Service Description (ie Bacula File Daemon)
@@ -828,13 +786,13 @@ Function InstallDaemon
   Call CopyDependencies
 
   IfFileExists "$APPDATA\Bacula\$0.conf" 0 +3
-    ExecWait '"$INSTDIR\bin\$0.exe" /kill' ; Shutdown any bacula that could be running
-    Sleep 3000  ; give it some time to shutdown
+    nsExec::ExecToLog '"$INSTDIR\bin\$0.exe" /silent /kill'     ; Shutdown any bacula that could be running
+    nsExec::ExecToLog '"$INSTDIR\bin\$0.exe" /silent /remove'   ; Remove existing service
 
   WriteRegDWORD HKLM "Software\Bacula" "Service_$0" $2
   
   ${If} $2 = 1
-    ExecWait '"$INSTDIR\bin\$0.exe" /install'
+    nsExec::ExecToLog '"$INSTDIR\bin\$0.exe" /silent /install -c "$APPDATA\Bacula\$0.conf"'
 
     ${If} $OsIsNT <> 1
       File "Start.bat"
@@ -845,8 +803,7 @@ Function InstallDaemon
 
     ${If} $3 = 1  
       ${If} $OsIsNT = 1
-        Exec 'net start baculafd'
-        Sleep 3000
+        nsExec::ExecToLog 'net start $0'
       ${Else}
         Exec '"$INSTDIR\bin\$0.exe" -c "$APPDATA\Bacula\$0.conf"'
       ${EndIf}
@@ -855,3 +812,126 @@ Function InstallDaemon
     CreateShortCut "$SMPROGRAMS\Bacula\Start $1.lnk" "$INSTDIR\bin\$0.exe" '-c "$APPDATA\Bacula\$0.conf"' "$INSTDIR\bin\$0.exe" 0
   ${EndIf}
 FunctionEnd
+
+Function GetComputerName
+  Push $0
+  Push $1
+  Push $2
+
+  System::Call "kernel32::GetComputerNameA(t .r0, *i ${NSIS_MAX_STRLEN} r1) i.r2"
+
+  StrCpy $2 $0
+  ${StrCase} $0 $2 "L"
+
+  Pop $2
+  Pop $1
+  Exch $0
+FunctionEnd
+
+!define ComputerNameDnsFullyQualified   3
+
+Function GetHostName
+  Push $0
+  Push $1
+  Push $2
+
+  ${If} $OsIsNT = 1
+    System::Call "kernel32::GetComputerNameExA(i ${ComputerNameDnsFullyQualified}, t .r0, *i ${NSIS_MAX_STRLEN} r1) i.r2 ?e"
+    ${If} $2 = 0
+      Pop $2
+      DetailPrint "GetComputerNameExA failed - LastError = $2"
+      Call GetComputerName
+      Pop $0
+    ${Else}
+      Pop $2
+    ${EndIf}
+  ${Else}
+    Call GetComputerName
+    Pop $0
+  ${EndIf}
+
+  Pop $2
+  Pop $1
+  Exch $0
+FunctionEnd
+
+!define NameUserPrincipal 8
+
+Function GetUserName
+  Push $0
+  Push $1
+  Push $2
+
+  ${If} $OsIsNT = 1
+    System::Call "secur32::GetUserNameExA(i ${NameUserPrincipal}, t .r0, *i ${NSIS_MAX_STRLEN} r1) i.r2 ?e"
+    ${If} $2 = 0
+      Pop $2
+      DetailPrint "GetUserNameExA failed - LastError = $2"
+      Pop $0
+      StrCpy $0 ""
+    ${Else}
+      Pop $2
+    ${EndIf}
+  ${Else}
+      StrCpy $0 ""
+  ${EndIf}
+
+  ${If} $0 == ""
+    System::Call "advapi32::GetUserNameA(t .r0, *i ${NSIS_MAX_STRLEN} r1) i.r2 ?e"
+    ${If} $2 = 0
+      Pop $2
+      DetailPrint "GetUserNameA failed - LastError = $2"
+      StrCpy $0 ""
+    ${Else}
+      Pop $2
+    ${EndIf}
+  ${EndIf}
+
+  Pop $2
+  Pop $1
+  Exch $0
+FunctionEnd
+
+Function IsClientSelected
+  Push $0
+  SectionGetFlags ${SecFileDaemon} $0
+  IntOp $0 $0 & ${SF_SELECTED}
+  Exch $0
+FunctionEnd
+
+Function IsDirectorSelected
+  Push $0
+  SectionGetFlags ${SecDirectorDaemon} $0
+  IntOp $0 $0 & ${SF_SELECTED}
+  Exch $0
+FunctionEnd
+
+Function IsStorageSelected
+  Push $0
+  SectionGetFlags ${SecStorageDaemon} $0
+  IntOp $R0 $R0 & ${SF_SELECTED}
+  Exch $0
+FunctionEnd
+
+Function IsConsoleSelected
+  Push $0
+  Push $1
+  SectionGetFlags ${SecConsole} $0
+  SectionGetFlags ${SecWxConsole} $1
+  IntOp $0 $0 | $1
+  IntOp $0 $0 & ${SF_SELECTED}
+  Pop $1
+  Exch $0
+FunctionEnd
+
+!If 0 = 1
+Function DisableServerSections
+  !InsertMacro UnselectSection ${SecStorageDaemon}
+  !InsertMacro SetSectionFlag ${SecStorageDaemon} SF_RO
+  !InsertMacro UnselectSection ${SecDirectorDaemon}
+  !InsertMacro SetSectionFlag ${SecDirectorDaemon} SF_RO
+FunctionEnd
+!EndIf
+
+!include "ConfigPage1.nsh"
+!include "ConfigPage2.nsh"
diff --git a/bacula/src/win32/installer/wx-console.conf.in b/bacula/src/win32/installer/wx-console.conf.in
new file mode 100644 (file)
index 0000000..3013fa2
--- /dev/null
@@ -0,0 +1,10 @@
+#
+# Bacula User Agent (or Console) Configuration File
+#
+
+Director {
+  Name = @director_name@
+  DIRport = @director_port@
+  address = @director_address@
+  Password = "@director_password@"
+}
index c830323d95278aae45f4ecf8d1e15578196addf7..8afe01fe58baed60a18cc06184fa58daa22c9ae3 100644 (file)
@@ -19,7 +19,7 @@
                        Name="Debug|Win32"\r
                        OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
                        IntermediateDirectory="$(ConfigurationName)"\r
-                       ConfigurationType="4"\r
+                       ConfigurationType="2"\r
                        CharacterSet="2"\r
                        >\r
                        <Tool\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="../compat;../..;&quot;../../../../depkgs-win32/pthreads&quot;"\r
-                               PreprocessorDefinitions="WIN32;_DEBUG;_LIB;HAVE_WIN32;WIN32_VSS;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"\r
+                               AdditionalIncludeDirectories="../compat;&quot;../../../../depkgs-msvc/include&quot;;../.."\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;_LIB;HAVE_WIN32;BUILDING_DLL;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"\r
                                MinimalRebuild="true"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="3"\r
                                UsePrecompiledHeader="0"\r
                                WarningLevel="3"\r
                                Detect64BitPortabilityProblems="false"\r
-                               DebugInformationFormat="4"\r
+                               DebugInformationFormat="3"\r
                        />\r
                        <Tool\r
                                Name="VCManagedResourceCompilerTool"\r
                                Name="VCPreLinkEventTool"\r
                        />\r
                        <Tool\r
-                               Name="VCLibrarianTool"\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="wsock32.lib pthreadVCE.lib ssleay32.lib libeay32.lib "\r
+                               OutputFile="$(OutDir)\bacula.dll"\r
+                               LinkIncremental="0"\r
+                               AdditionalLibraryDirectories="..\..\..\..\depkgs-msvc\lib"\r
+                               ModuleDefinitionFile="msvc\bacula.def"\r
+                               ImportLibrary="$(TargetDir)libbac.lib"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
                        <Tool\r
                                Name="VCXDCMakeTool"\r
                        />\r
                        <Tool\r
                                Name="VCFxCopTool"\r
                        />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
                        <Tool\r
                                Name="VCPostBuildEventTool"\r
                        />\r
@@ -82,7 +97,7 @@
                        Name="Release|Win32"\r
                        OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
                        IntermediateDirectory="$(ConfigurationName)"\r
-                       ConfigurationType="4"\r
+                       ConfigurationType="2"\r
                        UseOfATL="1"\r
                        CharacterSet="2"\r
                        WholeProgramOptimization="0"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="../compat;../..;&quot;../../../../depkgs-win32/pthreads&quot;"\r
-                               PreprocessorDefinitions="WIN32;NDEBUG;_LIB;HAVE_WIN32;WIN32_VSS;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"\r
+                               AdditionalIncludeDirectories="../compat;&quot;../../../../depkgs-msvc/include&quot;;../.."\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_LIB;HAVE_WIN32;WIN32_VSS;BUILDING_DLL;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"\r
                                RuntimeLibrary="2"\r
                                EnableFunctionLevelLinking="true"\r
                                UsePrecompiledHeader="0"\r
                                Name="VCPreLinkEventTool"\r
                        />\r
                        <Tool\r
-                               Name="VCLibrarianTool"\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="wsock32.lib pthreadVCE.lib ssleay32.lib libeay32.lib "\r
+                               OutputFile="$(OutDir)\bacula.dll"\r
+                               AdditionalLibraryDirectories="..\..\..\..\depkgs-msvc\lib"\r
+                               ModuleDefinitionFile="..\dll\bacula.def"\r
+                               ImportLibrary="$(TargetDir)libbac.lib"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
                        <Tool\r
                                Name="VCXDCMakeTool"\r
                        />\r
                        <Tool\r
                                Name="VCFxCopTool"\r
                        />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
                        <Tool\r
                                Name="VCPostBuildEventTool"\r
                        />\r
                <Filter\r
                        Name="Source Files"\r
                        Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
                        >\r
                        <File\r
                                RelativePath="..\..\lib\address_conf.c"\r
                                        />\r
                                </FileConfiguration>\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\findlib\attribs.c"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               CompileAs="2"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               CompileAs="2"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\msvc\bacula.def"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\lib\base64.c"\r
                                >\r
                                        />\r
                                </FileConfiguration>\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\findlib\bfile.c"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               CompileAs="2"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               CompileAs="2"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\lib\bget_msg.c"\r
                                >\r
                                </FileConfiguration>\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\lib\bshm.c"\r
+                               RelativePath="..\..\lib\bsnprintf.c"\r
                                >\r
                                <FileConfiguration\r
                                        Name="Debug|Win32"\r
                                        />\r
                                </FileConfiguration>\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\compat\compat.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               CompileAs="2"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               CompileAs="2"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\lib\cram-md5.c"\r
                                >\r
                                        />\r
                                </FileConfiguration>\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\findlib\create_file.c"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               CompileAs="2"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               CompileAs="2"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\lib\crypto.c"\r
                                >\r
                                        />\r
                                </FileConfiguration>\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\findlib\drivetype.c"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               CompileAs="2"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               CompileAs="2"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\lib\edit.c"\r
                                >\r
                                        />\r
                                </FileConfiguration>\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\findlib\enable_priv.c"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               CompileAs="2"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               CompileAs="2"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\lib\enh_fnmatch.c"\r
                                >\r
                                        />\r
                                </FileConfiguration>\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\findlib\find.c"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               CompileAs="2"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               CompileAs="2"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\findlib\find_one.c"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               CompileAs="2"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               CompileAs="2"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\lib\fnmatch.c"\r
                                >\r
                                        />\r
                                </FileConfiguration>\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\findlib\fstype.c"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               CompileAs="2"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               CompileAs="2"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\lib\hmac.c"\r
                                >\r
                                        />\r
                                </FileConfiguration>\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\findlib\makepath.c"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               CompileAs="2"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               CompileAs="2"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\findlib\match.c"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               CompileAs="2"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               CompileAs="2"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\lib\md5.c"\r
                                >\r
                                </FileConfiguration>\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\lib\parse_conf.c"\r
+                               RelativePath="..\..\lib\openssl.c"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               CompileAs="2"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\compat\print.cpp"\r
                                >\r
                                <FileConfiguration\r
                                        Name="Debug|Win32"\r
                                </FileConfiguration>\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\lib\res.c"\r
+                               RelativePath="..\..\lib\runscript.c"\r
                                >\r
                                <FileConfiguration\r
                                        Name="Debug|Win32"\r
                                </FileConfiguration>\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\lib\runscript.c"\r
+                               RelativePath="..\..\lib\rwlock.c"\r
                                >\r
                                <FileConfiguration\r
                                        Name="Debug|Win32"\r
                                </FileConfiguration>\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\lib\rwlock.c"\r
+                               RelativePath="..\..\findlib\save-cwd.c"\r
                                >\r
                                <FileConfiguration\r
                                        Name="Debug|Win32"\r
                                </FileConfiguration>\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\lib\winapi.c"\r
+                               RelativePath="..\compat\winapi.c"\r
                                >\r
                                <FileConfiguration\r
                                        Name="Debug|Win32"\r
                                        >\r
                                        <Tool\r
                                                Name="VCCLCompilerTool"\r
+                                               ObjectFile="$(IntDir)\$(InputName)1.obj"\r
+                                               XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"\r
                                                CompileAs="2"\r
                                        />\r
                                </FileConfiguration>\r
                                        >\r
                                        <Tool\r
                                                Name="VCCLCompilerTool"\r
+                                               ObjectFile="$(IntDir)\$(InputName)1.obj"\r
+                                               XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"\r
                                                CompileAs="2"\r
                                        />\r
                                </FileConfiguration>\r
                <Filter\r
                        Name="Header Files"\r
                        Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
                        >\r
                        <File\r
                                RelativePath="..\..\lib\address_conf.h"\r
                                RelativePath="..\..\lib\alist.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\compat\alloca.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\lib\attr.h"\r
                                >\r
                                RelativePath="..\..\lib\berrno.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\findlib\bfile.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\lib\bits.h"\r
                                >\r
                                RelativePath="..\..\lib\bsd_queue.h"\r
                                >\r
                        </File>\r
-                       <File\r
-                               RelativePath="..\..\lib\bshm.h"\r
-                               >\r
-                       </File>\r
                        <File\r
                                RelativePath="..\..\lib\bsock.h"\r
                                >\r
                                RelativePath="..\..\lib\btree.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\compat\compat.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\lib\crypto.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\compat\dirent.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\lib\dlist.h"\r
                                >\r
                                RelativePath="..\..\lib\enh_fnmatch.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\compat\sys\file.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\findlib\find.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\lib\fnmatch.h"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\lib\getopt.h"\r
+                               RelativePath="..\compat\grp.h"\r
                                >\r
                        </File>\r
                        <File\r
                                RelativePath="..\..\lib\htable.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\compat\netinet\in.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\compat\arpa\inet.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\compat\sys\ioctl.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\lib\lex.h"\r
                                >\r
                                RelativePath="..\..\lib\message.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\compat\mingwconfig.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\compat\ms_atl.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\compat\mswinver.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\compat\sys\mtio.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\compat\netdb.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\lib\openssl.h"\r
                                >\r
                                RelativePath="..\..\lib\protos.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\findlib\protos.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\compat\pwd.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\lib\queue.h"\r
                                >\r
                                RelativePath="..\..\lib\rwlock.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\findlib\save-cwd.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\compat\sched.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\lib\semlock.h"\r
                                >\r
                                RelativePath="..\..\lib\smartall.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\compat\sys\socket.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\compat\sys\stat.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\compat\stdint.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\compat\strings.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\compat\syslog.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\lib\tcpd.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\compat\sys\time.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\lib\tls.h"\r
                                >\r
                                RelativePath="..\..\lib\tree.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\compat\unistd.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\lib\var.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\compat\sys\wait.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\lib\waitq.h"\r
                                >\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\lib\winapi.h"\r
+                               RelativePath="..\compat\winconfig.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\compat\winhost.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\compat\winsock.h"\r
                                >\r
                        </File>\r
                        <File\r
                <Filter\r
                        Name="Resource Files"\r
                        Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
                        >\r
                </Filter>\r
        </Files>\r
diff --git a/bacula/src/win32/libbac/msvc/bacula.def b/bacula/src/win32/libbac/msvc/bacula.def
new file mode 100644 (file)
index 0000000..0ba2417
--- /dev/null
@@ -0,0 +1,674 @@
+LIBRARY bacula.dll
+EXPORTS
+
+; address_conf.obj 
+;?set_type@IPADDR@@QAEXW4i_type@1@@Z
+;?get_type@IPADDR@@QBE?AW4i_type@1@XZ
+?get_port_net_order@IPADDR@@QBEGXZ
+;?set_port_net@IPADDR@@QAEXG@Z
+;?get_family@IPADDR@@QBEHXZ
+;?get_sockaddr@IPADDR@@QAEPAUsockaddr@@XZ
+;?get_sockaddr_len@IPADDR@@QAEHXZ
+;?copy_addr@IPADDR@@QAEXPAV1@@Z
+;?set_addr_any@IPADDR@@QAEXXZ
+;?set_addr4@IPADDR@@QAEXPAUin_addr@@@Z
+?get_address@IPADDR@@QAEPBDPADH@Z
+;?build_address_str@IPADDR@@QAEPBDPADH@Z
+;??? ?get_port_host_order@IPADDR@@QBEGXZ
+;?build_addresses_str@@YAPBDPAVdlist@@PADH@Z
+?get_first_address@@YAPBDPAVdlist@@PADH@Z
+;?get_first_port_net_order@@YAHPAVdlist@@@Z
+?get_first_port_host_order@@YAHPAVdlist@@@Z
+?init_default_addresses@@YAXPAPAVdlist@@H@Z
+?store_addresses@@YAXPAUs_lex_context@@PAURES_ITEM@@HH@Z
+?store_addresses_address@@YAXPAUs_lex_context@@PAURES_ITEM@@HH@Z
+?store_addresses_port@@YAXPAUs_lex_context@@PAURES_ITEM@@HH@Z
+?free_addresses@@YAXPAVdlist@@@Z
+?sockaddr_get_port_net_order@@YAHPBUsockaddr@@@Z
+;?sockaddr_get_port@@YAHPBUsockaddr@@@Z
+?sockaddr_to_ascii@@YAPADPBUsockaddr@@PADH@Z
+;; alist.obj 
+;?grow_list@alist@@AAEXXZ
+?first@alist@@QAEPAXXZ
+;?last@alist@@QAEPAXXZ
+?next@alist@@QAEPAXXZ
+;?prev@alist@@QAEPAXXZ
+?prepend@alist@@QAEXPAX@Z
+?append@alist@@QAEXPAX@Z
+?remove@alist@@QAEPAXH@Z
+?get@alist@@QAEPAXH@Z
+?destroy@alist@@QAEXXZ
+; alloc.obj 
+; attr.obj 
+?new_attr@@YAPAUATTR@@XZ
+?free_attr@@YAXPAUATTR@@@Z
+?unpack_attributes_record@@YAHPAVJCR@@JPADPAUATTR@@@Z
+?build_attr_output_fnames@@YAXPAVJCR@@PAUATTR@@@Z
+?print_ls_output@@YAXPAVJCR@@PAUATTR@@@Z
+; attribs.obj 
+?select_data_stream@@YAHPAUFF_PKT@@@Z
+?encode_stat@@YAXPADPAUFF_PKT@@H@Z
+?decode_stat@@YAHPADPAUstat@@PAJ@Z
+?decode_LinkFI@@YAJPADPAUstat@@@Z
+?set_attributes@@YA_NPAVJCR@@PAUATTR@@PAUBFILE@@@Z
+?encode_attribsEx@@YAHPAVJCR@@PADPAUFF_PKT@@@Z
+;?win_error@@YAXPAVJCR@@PAD1@Z
+;?win_error@@YAXPAVJCR@@PADK@Z
+;??$plug@I@@YAXAAI_K@Z
+;??$plug@_K@@YAXAA_K_K@Z
+;??$plug@G@@YAXAAG_K@Z
+;??$plug@F@@YAXAAF_K@Z
+;??$plug@J@@YAXAAJ_K@Z
+;??$plug@K@@YAXAAK_K@Z
+; base64.obj 
+;?base64_init@@YAXXZ
+;?to_base64@@YAH_JPAD@Z
+;?from_base64@@YAHPA_JPAD@Z
+?bin_to_base64@@YAHPADH0HH@Z
+; berrno.obj 
+?strerror@berrno@@QAEPBDXZ
+?format_win32_message@berrno@@AAEXXZ
+; bfile.obj 
+?is_win32_stream@@YA_NH@Z
+?stream_to_ascii@@YAPBDH@Z
+;?int64_LE2BE@@YAXPA_J_J@Z
+;?int32_LE2BE@@YAXPAJJ@Z
+?processWin32BackupAPIBlock@@YA_NPAUBFILE@@PAXH@Z
+?binit@@YAXPAUBFILE@@@Z
+;?set_win32_backup@@YA_NPAUBFILE@@@Z
+?set_portable_backup@@YA_NPAUBFILE@@@Z
+?set_prog@@YA_NPAUBFILE@@PADPAVJCR@@@Z
+?is_portable_backup@@YA_NPAUBFILE@@@Z
+?have_win32_api@@YA_NXZ
+?is_restore_stream_supported@@YA_NH@Z
+;?bget_handle@@YAPAXPAUBFILE@@@Z
+?bopen@@YAHPAUBFILE@@PBDHI@Z
+?bclose@@YAHPAUBFILE@@@Z
+?bread@@YAHPAUBFILE@@PAXI@Z
+?bwrite@@YAHPAUBFILE@@PAXI@Z
+?is_bopen@@YA_NPAUBFILE@@@Z
+?blseek@@YAJPAUBFILE@@JH@Z
+; bget_msg.obj 
+?bget_msg@@YAHPAUBSOCK@@@Z
+; bnet.obj 
+?bnet_recv@@YAJPAUBSOCK@@@Z
+?is_bnet_stop@@YA_NPAUBSOCK@@@Z
+?is_bnet_error@@YAHPAUBSOCK@@@Z
+?bnet_suppress_error_messages@@YAXPAUBSOCK@@_N@Z
+?bnet_despool_to_bsock@@YAHPAUBSOCK@@P6AXH@ZH@Z
+?bnet_send@@YA_NPAUBSOCK@@@Z
+?bnet_tls_server@@YA_NPAUTLS_Context@@PAUBSOCK@@PAValist@@@Z
+?bnet_tls_client@@YA_NPAUTLS_Context@@PAUBSOCK@@@Z
+?bnet_wait_data@@YAHPAUBSOCK@@H@Z
+?bnet_wait_data_intr@@YAHPAUBSOCK@@H@Z
+;?bnet_host2ipaddrs@@YAPAVdlist@@PBDHPAPBD@Z
+?bnet_connect@@YAPAUBSOCK@@PAVJCR@@HHPBDPAD2HH@Z
+?bnet_strerror@@YAPBDPAUBSOCK@@@Z
+?bnet_fsend@@YA_NPAUBSOCK@@PBDZZ
+?bnet_get_peer@@YAHPAUBSOCK@@PADH@Z
+?bnet_set_buffer_size@@YA_NPAUBSOCK@@IH@Z
+;?bnet_set_nonblocking@@YAHPAUBSOCK@@@Z
+;?bnet_set_blocking@@YAHPAUBSOCK@@@Z
+;?bnet_restore_blocking@@YAXPAUBSOCK@@H@Z
+?bnet_sig@@YA_NPAUBSOCK@@H@Z
+?bnet_sig_to_ascii@@YAPBDPAUBSOCK@@@Z
+?init_bsock@@YAPAUBSOCK@@PAVJCR@@HPBD1HPAUsockaddr@@@Z
+?dup_bsock@@YAPAUBSOCK@@PAU1@@Z
+?bnet_close@@YAXPAUBSOCK@@@Z
+?term_bsock@@YAXPAUBSOCK@@@Z
+; bnet_server.obj 
+?bnet_stop_thread_server@@YAXPAUpthread_t_@@@Z
+?bnet_thread_server@@YAXPAVdlist@@HPAUworkq_tag@@P6APAXPAX@Z@Z
+; bpipe.obj 
+?run_program@@YAHPADH0@Z
+?run_program_full_output@@YAHPADH0@Z
+; bregex.obj 
+;b_re_compile_initial
+;b_re_set_syntax
+;b_re_compile_fastmap
+;b_re_compile_pattern
+b_regcomp
+b_regexec
+b_regerror
+b_regfree
+;b_re_match
+;b_re_search
+
+; bsnprintf.obj 
+?bsnprintf@@YAHPADJPBDZZ
+?bvsnprintf@@YAHPADJPBD0@Z
+; bsys.obj 
+?bmicrosleep@@YAHJJ@Z
+?bstrncpy@@YAPADPADPBDH@Z
+?bstrncpy@@YAPADPADAAVPOOL_MEM@@H@Z
+?bstrncat@@YAPADPADPBDH@Z
+;?bstrncat@@YAPADPADAAVPOOL_MEM@@H@Z
+?bstrcmp@@YA_NPBD0@Z
+?cstrlen@@YAHPBD@Z
+?bfree@@YAXPAX@Z
+?b_malloc@@YAPAXPBDHI@Z
+?brealloc@@YAPAXPAXI@Z
+;?bcalloc@@YAPAXII@Z
+;?bstrerror@@YAHHPADI@Z
+?_p@@YAXPAPAUpthread_mutex_t_@@@Z
+?_v@@YAXPAPAUpthread_mutex_t_@@@Z
+?create_pid_file@@YAXPADPBDH@Z
+?delete_pid_file@@YAHPADPBDH@Z
+?read_state_file@@YAXPADPBDH@Z
+?write_state_file@@YAXPADPBDH@Z
+?drop@@YAXPAD0@Z
+?bfgets@@YAPADPADHPAU_iobuf@@@Z
+;?make_unique_filename@@YAXPAPADHPAD@Z
+; btime.obj 
+?bstrftime@@YAPADPADH_J@Z
+?bstrftimes@@YAPADPADH_J@Z
+;?bstrftime_ny@@YAPADPADH_J@Z
+?bstrftime_nc@@YAPADPADH_J@Z
+?bstrutime@@YAPADPADH_J@Z
+?str_to_utime@@YA_JPAD@Z
+?get_current_btime@@YA_JXZ
+?btime_to_unix@@YAJ_J@Z
+?btime_to_utime@@YA_J_J@Z
+;?tm_wom@@YAHHH@Z
+?tm_woy@@YAHJ@Z
+?get_current_time@@YAXPAUdate_time@@@Z
+;?date_encode@@YANIEE@Z
+;?time_encode@@YANEEEM@Z
+;?date_time_encode@@YAXPAUdate_time@@IEEEEEM@Z
+;?date_decode@@YAXNPAIPAE1@Z
+;?time_decode@@YAXNPAE00PAM@Z
+;?date_time_decode@@YAXPAUdate_time@@PAIPAE2222PAM@Z
+;?tm_encode@@YAXPAUdate_time@@PAUtm@@@Z
+?tm_decode@@YAXPAUdate_time@@PAUtm@@@Z
+;?date_time_compare@@YAHPAUdate_time@@0@Z
+; btimers.obj 
+;?start_child_timer@@YAPAUs_btimer_t@@HI@Z
+;?stop_child_timer@@YAXPAUs_btimer_t@@@Z
+?start_thread_timer@@YAPAUs_btimer_t@@PAUpthread_t_@@I@Z
+?start_bsock_timer@@YAPAUs_btimer_t@@PAUBSOCK@@I@Z
+?stop_bsock_timer@@YAXPAUs_btimer_t@@@Z
+?stop_thread_timer@@YAXPAUs_btimer_t@@@Z
+; compat.obj 
+?SetVSSPathConvert@@YAXP6AHPBDPADH@ZP6AHPB_WPA_WH@Z@Z
+;?Win32ConvCleanupCache@@YAXXZ
+;?conv_unix_to_win32_path@@YAXPBDPADK@Z
+;?unix_name_to_win32@@YAXPAPADPAD@Z
+;?make_wchar_win32_path@@YAPADPADPAH@Z
+?wchar_2_UTF8@@YAHPADPB_WH@Z
+;?UTF8_2_wchar@@YAHPAPADPBD@Z
+;?wchar_win32_path@@YAXPBDPA_W@Z
+;?make_win32_path_UTF8_2_wchar@@YAHPAPADPBDPAH@Z
+;?fcntl@@YAHHH@Z
+;?chmod@@YAHPBDI@Z
+;?chown@@YAHPBDII@Z
+;?lchown@@YAHPBDII@Z
+?random@@YAJXZ
+?srandom@@YAXI@Z
+;?cvt_utime_to_ftime@@YAXABJAAU_FILETIME@@@Z
+;?cvt_ftime_to_utime@@YAJABU_FILETIME@@@Z
+?fstat@@YAHHPAUstat@@@Z
+?stat@@YAHPBDPAU0@@Z
+?fcntl@@YAHHHJ@Z
+?lstat@@YAHPBDPAUstat@@@Z
+?sleep@@YAXH@Z
+;?geteuid@@YAHXZ
+;?execvp@@YAHPBDQAPAD@Z
+;?fork@@YAHXZ
+;?pipe@@YAHQAH@Z
+;?waitpid@@YAHHPAHH@Z
+;?readlink@@YAHPBDPADH@Z
+?strcasecmp@@YAHPBD0@Z
+;?strncasecmp@@YAHPBD0H@Z
+?gettimeofday@@YAHPAUtimeval@@PAUtimezone@@@Z
+;?closelog@@YAXXZ
+;?getpwuid@@YAPAUpasswd@@I@Z
+;?getgrgid@@YAPAUgroup@@I@Z
+?opendir@@YAPAXPBD@Z
+?closedir@@YAHPAX@Z
+?readdir_r@@YAHPAXPAUdirent@@PAPAU1@@Z
+;?inet_aton@@YAHPBDPAUin_addr@@@Z
+;?nanosleep@@YAHPBUtimespec@@PAU1@@Z
+?init_signals@@YAXP6AXH@Z@Z
+?init_stack_dump@@YAXXZ
+?pathconf@@YAJPBDH@Z
+?WSA_Init@@YAHXZ
+;?win32_chdir@@YAHPBD@Z
+;?win32_mkdir@@YAHPBD@Z
+;?win32_getcwd@@YAPADPADH@Z
+?win32_fputs@@YAHPBDPAU_iobuf@@@Z
+?win32_cgets@@YAPADPADH@Z
+?win32_unlink@@YAHPBD@Z
+;??0winver@@QAE@XZ
+;?getArgv0@@YAPBDPBD@Z
+;?CreateChildProcess@@YAPAXPBDPAX11@Z
+;?ErrorExit@@YAXPBD@Z
+?open_bpipe@@YAPAUs_bpipe@@PADHPBD@Z
+?kill@@YAHHH@Z
+?close_bpipe@@YAHPAUs_bpipe@@@Z
+;?close_wpipe@@YAHPAUs_bpipe@@@Z
+?utime@@YAHPBDPAUutimbuf@@@Z
+; cram-md5.obj 
+?cram_md5_challenge@@YA_NPAUBSOCK@@PADHH@Z
+?cram_md5_respond@@YA_NPAUBSOCK@@PADPAH2@Z
+; crc32.obj 
+?bcrc32@@YAIPAEH@Z
+;create_file.obj 
+?create_file@@YAHPAVJCR@@PAUATTR@@PAUBFILE@@H@Z
+; crypto.obj 
+?crypto_digest_new@@YAPAUDigest@@W4crypto_digest_t@@@Z
+?crypto_digest_update@@YA_NPAUDigest@@PBEI@Z
+?crypto_digest_finalize@@YA_NPAUDigest@@PAEPAI@Z
+?crypto_digest_free@@YAXPAUDigest@@@Z
+?init_crypto@@YAHXZ
+?cleanup_crypto@@YAHXZ
+?crypto_sign_new@@YAPAUSignature@@XZ
+?crypto_sign_get_digest@@YA?AW4crypto_error_t@@PAUSignature@@PAUX509_Keypair@@PAPAUDigest@@@Z
+?crypto_sign_verify@@YA?AW4crypto_error_t@@PAUSignature@@PAUX509_Keypair@@PAUDigest@@@Z
+?crypto_sign_add_signer@@YAHPAUSignature@@PAUDigest@@PAUX509_Keypair@@@Z
+?crypto_sign_encode@@YAHPAUSignature@@PAEPAI@Z
+?crypto_sign_decode@@YAPAUSignature@@PBEI@Z
+?crypto_sign_free@@YAXPAUSignature@@@Z
+?crypto_keypair_new@@YAPAUX509_Keypair@@XZ
+?crypto_keypair_dup@@YAPAUX509_Keypair@@PAU1@@Z
+?crypto_keypair_load_cert@@YAHPAUX509_Keypair@@PBD@Z
+?crypto_keypair_has_key@@YA_NPBD@Z
+?crypto_keypair_load_key@@YAHPAUX509_Keypair@@PBDP6AHPADHPBX@Z3@Z
+?crypto_keypair_free@@YAXPAUX509_Keypair@@@Z
+?crypto_session_new@@YAPAUCrypto_Session@@W4crypto_cipher_t@@PAValist@@@Z
+?crypto_session_free@@YAXPAUCrypto_Session@@@Z
+?crypto_session_encode@@YA_NPAUCrypto_Session@@PAEPAI@Z
+?crypto_session_decode@@YA?AW4crypto_error_t@@PBEIPAValist@@PAPAUCrypto_Session@@@Z
+?crypto_cipher_new@@YAPAUCipher_Context@@PAUCrypto_Session@@_NPAI@Z
+?crypto_cipher_update@@YA_NPAUCipher_Context@@PBEI1PAI@Z
+?crypto_cipher_finalize@@YA_NPAUCipher_Context@@PAEPAI@Z
+?crypto_cipher_free@@YAXPAUCipher_Context@@@Z
+?crypto_default_pem_callback@@YAHPADHPBX@Z
+?crypto_digest_name@@YAPBDPAUDigest@@@Z
+?crypto_digest_stream_type@@YA?AW4crypto_digest_t@@H@Z
+?crypto_strerror@@YAPBDW4crypto_error_t@@@Z
+; daemon.obj 
+?daemon_start@@YAXXZ
+; dlist.obj 
+?append@dlist@@QAEXPAX@Z
+?prepend@dlist@@QAEXPAX@Z
+?insert_before@dlist@@QAEXPAX0@Z
+;?insert_after@dlist@@QAEXPAX0@Z
+?binary_insert@dlist@@QAEPAXPAXP6AH00@Z@Z
+?first@dlist@@QBEPAXXZ
+?last@dlist@@QBEPAXXZ
+?binary_insert_multiple@dlist@@QAEXPAXP6AH00@Z@Z
+?binary_search@dlist@@QAEPAXPAXP6AH00@Z@Z
+?remove@dlist@@QAEXPAX@Z
+?next@dlist@@QBEPAXPBX@Z
+;?prev@dlist@@QBEPAXPBX@Z
+?destroy@dlist@@QAEXXZ
+; drivetype.obj 
+?drivetype@@YA_NPBDPADH@Z
+; edit.obj 
+?str_to_uint64@@YA_KPAD@Z
+?str_to_int64@@YA_JPAD@Z
+?edit_uint64_with_commas@@YAPAD_KPAD@Z
+?edit_uint64_with_suffix@@YAPAD_KPAD@Z
+?edit_uint64@@YAPAD_KPAD@Z
+?edit_int64@@YAPAD_JPAD@Z
+?duration_to_utime@@YA_NPADPA_J@Z
+?edit_utime@@YAPAD_JPADH@Z
+?size_to_uint64@@YA_NPADHPA_K@Z
+?is_a_number@@YA_NPBD@Z
+?is_an_integer@@YA_NPBD@Z
+?is_name_valid@@YA_NPADPAPAD@Z
+?add_commas@@YAPADPAD0@Z
+; enable_priv.obj 
+?enable_backup_privileges@@YAHPAVJCR@@H@Z
+; enh_fnmatch.obj 
+;?enh_fnmatch_sub@@YAHPBD0HH@Z
+; find.obj 
+?init_find_files@@YAPAUFF_PKT@@XZ
+?set_find_options@@YAXPAUFF_PKT@@HJ@Z
+?get_win32_driveletters@@YAHPAUFF_PKT@@PAD@Z
+?find_files@@YAHPAVJCR@@PAUFF_PKT@@P6AH1PAX_N@Z2@Z
+?term_find_files@@YAHPAUFF_PKT@@@Z
+; find_one.obj 
+?find_one_file@@YAHPAVJCR@@PAUFF_PKT@@P6AH1PAX_N@Z2PADI3@Z
+;?term_find_one@@YAHPAUFF_PKT@@@Z
+; fnmatch.obj 
+fnmatch
+; fstype.obj 
+?fstype@@YA_NPBDPADH@Z
+; hmac.obj 
+?hmac_md5@@YAXPAEH0H0@Z
+; htable.obj 
+;?hash_index@htable@@AAEXPAD@Z
+;??0htable@@QAE@PAX0H@Z
+;?init@htable@@QAEXPAX0H@Z
+;?size@htable@@QAEIXZ
+;?stats@htable@@QAEXXZ
+;?grow_table@htable@@AAEXXZ
+;?insert@htable@@QAE_NPADPAX@Z
+;?lookup@htable@@QAEPAXPAD@Z
+;?next@htable@@QAEPAXXZ
+;?first@htable@@QAEPAXXZ
+;?destroy@htable@@QAEXXZ
+; idcache.obj 
+?getuser@@YAPADIPADH@Z
+;?free_getuser_cache@@YAXXZ
+?getgroup@@YAPADIPADH@Z
+;?free_getgroup_cache@@YAXXZ
+; jcr.obj 
+?lock_jobs@@YAXXZ
+?unlock_jobs@@YAXXZ
+;?init_last_jobs_list@@YAXXZ
+?term_last_jobs_list@@YAXXZ
+;?read_last_jobs_list@@YA_NH_K@Z
+;?write_last_jobs_list@@YA_KH_K@Z
+?lock_last_jobs_list@@YAXXZ
+?unlock_last_jobs_list@@YAXXZ
+?job_end_push@@YAXPAVJCR@@P6AX0PAX@Z1@Z
+?new_jcr@@YAPAVJCR@@HP6AXPAV1@@Z@Z
+?inc_use_count@JCR@@QAEXXZ
+?lock@JCR@@QAEXXZ
+?unlock@JCR@@QAEXXZ
+?init_mutex@JCR@@QAEXXZ
+?b_free_jcr@@YAXPBDHPAVJCR@@@Z
+?dec_use_count@JCR@@QAEXXZ
+?use_count@JCR@@QAEHXZ
+?destroy_mutex@JCR@@QAEXXZ
+?get_jcr_by_id@@YAPAVJCR@@I@Z
+?get_jcr_by_session@@YAPAVJCR@@II@Z
+?get_jcr_by_partial_name@@YAPAVJCR@@PAD@Z
+?get_jcr_by_full_name@@YAPAVJCR@@PAD@Z
+?set_jcr_job_status@@YAXPAVJCR@@H@Z
+?jcr_walk_start@@YAPAVJCR@@XZ
+?jcr_walk_next@@YAPAVJCR@@PAV1@@Z
+?jcr_walk_end@@YAXPAVJCR@@@Z
+?init_jcr_subsystem@@YA_NXZ
+; lex.obj 
+?scan_to_eol@@YAXPAUs_lex_context@@@Z
+;?scan_to_next_not_eol@@YAHPAUs_lex_context@@@Z
+?lex_set_default_error_handler@@YAXPAUs_lex_context@@@Z
+?lex_set_error_handler_error_type@@YAHPAUs_lex_context@@H@Z
+?lex_close_file@@YAPAUs_lex_context@@PAU1@@Z
+?lex_open_file@@YAPAUs_lex_context@@PAU1@PBDP6AX1H01ZZ@Z
+;?lex_get_char@@YAHPAUs_lex_context@@@Z
+;?lex_unget_char@@YAXPAUs_lex_context@@@Z
+?lex_tok_to_str@@YAPBDH@Z
+?lex_get_token@@YAHPAUs_lex_context@@H@Z
+; makepath.obj 
+;?isAbsolute@@YAHPBD@Z
+;?make_path@@YAHPAVJCR@@PBDHHIIHPAD@Z
+; match.obj 
+?match_files@@YAHPAVJCR@@PAUFF_PKT@@P6AH1PAX_N@Z2@Z
+?term_include_exclude_files@@YAXPAUFF_PKT@@@Z
+?add_fname_to_include_list@@YAXPAUFF_PKT@@HPBD@Z
+?add_fname_to_exclude_list@@YAXPAUFF_PKT@@PBD@Z
+;?get_next_included_file@@YAPAUs_included_file@@PAUFF_PKT@@PAU1@@Z
+?file_is_included@@YAHPAUFF_PKT@@PBD@Z
+?file_is_excluded@@YAHPAUFF_PKT@@PBD@Z
+; md5.obj 
+?MD5Init@@YAXPAUMD5Context@@@Z
+?MD5Update@@YAXPAUMD5Context@@PAEI@Z
+?MD5Final@@YAXQAEPAUMD5Context@@@Z
+;?MD5Transform@@YAXQAI0@Z
+; mem_pool.obj 
+?sm_get_pool_memory@@YAPADPBDHH@Z
+?sm_get_memory@@YAPADPBDHJ@Z
+?sm_sizeof_pool_memory@@YAJPBDHPAD@Z
+?sm_realloc_pool_memory@@YAPADPBDHPADJ@Z
+?sm_check_pool_memory_size@@YAPADPBDHPADJ@Z
+?sm_free_pool_memory@@YAXPBDHPAD@Z
+;?garbage_collect_memory_pool@@YAXXZ
+?close_memory_pool@@YAXXZ
+?print_memory_pool_stats@@YAXXZ
+?pm_strcat@@YAHPAPADPBD@Z
+?pm_strcat@@YAHAAPADPBD@Z
+;?pm_strcat@@YAHAAPADAAVPOOL_MEM@@@Z
+?c_str@POOL_MEM@@QBEPADXZ
+?pm_strcat@@YAHAAVPOOL_MEM@@PBD@Z
+?check_size@POOL_MEM@@QAEPADJ@Z
+?pm_strcpy@@YAHPAPADPBD@Z
+?pm_strcpy@@YAHAAPADPBD@Z
+?pm_strcpy@@YAHAAPADAAVPOOL_MEM@@@Z
+?pm_strcpy@@YAHAAVPOOL_MEM@@PBD@Z
+?max_size@POOL_MEM@@QAEJXZ
+;?realloc_pm@POOL_MEM@@QAEXJ@Z
+;?strcat@POOL_MEM@@QAEHPBD@Z
+;?strcpy@POOL_MEM@@QAEHPBD@Z
+; message.obj 
+?my_name_is@@YAXHQAPADPBD@Z
+?get_db_type@@YAPBDXZ
+?set_db_type@@YAXPBD@Z
+?init_msg@@YAXPAVJCR@@PAUMSGS@@@Z
+?init_console_msg@@YAXPBD@Z
+?add_msg_dest@@YAXPAUMSGS@@HHPAD1@Z
+?rem_msg_dest@@YAXPAUMSGS@@HHPAD@Z
+?close_msg@@YAXPAVJCR@@@Z
+?set_errno@berrno@@QAEXH@Z
+?free_msgs_res@@YAXPAUMSGS@@@Z
+?term_msg@@YAXXZ
+?dispatch_message@@YAXPAVJCR@@HJPAD@Z
+??0POOL_MEM@@QAE@H@Z
+??1POOL_MEM@@QAE@XZ
+?c_str@POOL_MEM@@QBEPADXZ
+?d_msg@@YAXPBDHH0ZZ
+?get_basename@@YAPBDPBD@Z
+?set_trace@@YAXH@Z
+?get_trace@@YA_NXZ
+?p_msg@@YAXPBDHH0ZZ
+;?t_msg@@YAXPBDHH0ZZ
+?e_msg@@YAXPBDHHH0ZZ
+?Jmsg@@YAXPAVJCR@@HJPBDZZ
+?j_msg@@YAXPBDHPAVJCR@@HJ0ZZ
+?m_msg@@YAHPBDHPAPAD0ZZ
+?m_msg@@YAHPBDHAAPAD0ZZ
+?Mmsg@@YAHPAPADPBDZZ
+?Mmsg@@YAHAAPADPBDZZ
+?Mmsg@@YAHAAVPOOL_MEM@@PBDZZ
+?Qmsg@@YAXPAVJCR@@HJPBDZZ
+?dequeue_messages@@YAXPAVJCR@@@Z
+?q_msg@@YAXPBDHPAVJCR@@HJ0ZZ
+; print.obj 
+;?dopr@@YAHPADIPBD0P6AX0PAIIH@Z@Z
+;?__sprintf@@YAHPADPBDZZ
+;?__snprintf@@YAHPADIPBDZZ
+;?__vsprintf@@YAHPADPBD0@Z
+;?__vsnprintf@@YAHPADIPBD0@Z
+; pythonlib.obj 
+?generate_daemon_event@@YAHPAVJCR@@PBD@Z
+?init_python_interpreter@@YAXPBD00@Z
+?term_python_interpreter@@YAXXZ
+; queue.obj 
+?qinsert@@YAXPAUb_queue@@0@Z
+;?qremove@@YAPAUb_queue@@PAU1@@Z
+?qnext@@YAPAUb_queue@@PAU1@0@Z
+?qdchain@@YAPAUb_queue@@PAU1@@Z
+; runscript.obj 
+?new_runscript@@YAPAVRUNSCRIPT@@XZ
+?reset_default@RUNSCRIPT@@QAEX_N@Z
+?copy_runscript@@YAPAVRUNSCRIPT@@PAV1@@Z
+?free_runscript@@YAXPAVRUNSCRIPT@@@Z
+?run_scripts@@YAHPAVJCR@@PAValist@@PBD@Z
+;?is_local@RUNSCRIPT@@QAE_NXZ
+?set_command@RUNSCRIPT@@QAEXPBD@Z
+?set_target@RUNSCRIPT@@QAEXPBD@Z
+?run@RUNSCRIPT@@QAEHPAVJCR@@PBD@Z
+?free_runscripts@@YAXPAValist@@@Z
+?debug@RUNSCRIPT@@QAEXXZ
+; rwlock.obj 
+?rwl_init@@YAHPAUs_rwlock_tag@@@Z
+?rwl_destroy@@YAHPAUs_rwlock_tag@@@Z
+;?rwl_readlock@@YAHPAUs_rwlock_tag@@@Z
+;?rwl_readtrylock@@YAHPAUs_rwlock_tag@@@Z
+;?rwl_readunlock@@YAHPAUs_rwlock_tag@@@Z
+?rwl_writelock@@YAHPAUs_rwlock_tag@@@Z
+;?rwl_writetrylock@@YAHPAUs_rwlock_tag@@@Z
+?rwl_writeunlock@@YAHPAUs_rwlock_tag@@@Z
+; save-cwd.obj 
+;?save_cwd@@YAHPAUsaved_cwd@@@Z
+;?restore_cwd@@YAHPBUsaved_cwd@@PBD1@Z
+;?free_cwd@@YAXPAUsaved_cwd@@@Z
+; scan.obj 
+?strip_leading_space@@YAXPAD@Z
+?strip_trailing_junk@@YAXPAD@Z
+?strip_trailing_newline@@YAXPAD@Z
+;?strip_trailing_slashes@@YAXPAD@Z
+?skip_spaces@@YA_NPAPAD@Z
+?skip_nonspaces@@YA_NPAPAD@Z
+?fstrsch@@YAHPBD0@Z
+?next_arg@@YAPADPAPAD@Z
+?parse_args@@YAHPADPAPADPAH11H@Z
+;?split_path_and_filename@@YAXPBDPAPADPAH12@Z
+?bsscanf@@YAHPBD0ZZ
+; semlock.obj 
+;?sem_init@@YAHPAUs_semlock_tag@@H@Z
+;?sem_destroy@@YAHPAUs_semlock_tag@@@Z
+;?sem_lock@@YAHPAUs_semlock_tag@@@Z
+;?sem_trylock@@YAHPAUs_semlock_tag@@@Z
+;?sem_unlock@@YAHPAUs_semlock_tag@@@Z
+; serial.obj 
+;?serial_int16@@YAXQAPAEF@Z
+;?serial_uint16@@YAXQAPAEG@Z
+?serial_int32@@YAXQAPAEJ@Z
+?serial_uint32@@YAXQAPAEI@Z
+;?serial_int64@@YAXPAPAE_J@Z
+?serial_uint64@@YAXQAPAE_K@Z
+?serial_btime@@YAXQAPAE_J@Z
+?serial_float64@@YAXQAPAEN@Z
+?serial_string@@YAXQAPAEQBD@Z
+;?unserial_int16@@YAFQAPAE@Z
+;?unserial_uint16@@YAGQAPAE@Z
+?unserial_int32@@YAJQAPAE@Z
+?unserial_uint32@@YAIQAPAE@Z
+?unserial_uint64@@YA_KQAPAE@Z
+?unserial_btime@@YA_JQAPAE@Z
+?unserial_float64@@YANQAPAE@Z
+?unserial_string@@YAXQAPAEQAD@Z
+; sha1.obj 
+;?SHA1Init@@YAHPAUSHA1Context@@@Z
+;?SHA1Final@@YAHPAUSHA1Context@@QAE@Z
+;?SHA1Update@@YAHPAUSHA1Context@@PBEI@Z
+; signal.obj 
+; smartall.obj 
+;?sm_new_owner@@YAXPBDHPAD@Z
+?sm_free@@YAXPBDHPAX@Z
+?sm_malloc@@YAPAXPBDHI@Z
+?sm_calloc@@YAPAXPBDHII@Z
+?sm_realloc@@YAPAXPBDHPAXI@Z
+;?actuallymalloc@@YAPAXI@Z
+;?actuallycalloc@@YAPAXII@Z
+;?actuallyrealloc@@YAPAXPAXI@Z
+;?actuallyfree@@YAXPAX@Z
+?sm_dump@@YAX_N@Z
+?sm_check@@YAXPBDH_N@Z
+;?sm_check_rtn@@YAHPBDH_N@Z
+?sm_static@@YAXH@Z
+; tls.obj 
+?new_tls_context@@YAPAUTLS_Context@@PBD000P6AHPADHPBX@Z20_N@Z
+?free_tls_context@@YAXPAUTLS_Context@@@Z
+; tree.obj 
+?new_tree@@YAPAUs_tree_root@@H@Z
+?free_tree@@YAXPAUs_tree_root@@@Z
+?insert_tree_node@@YAPAUs_tree_node@@PAD0HPAUs_tree_root@@PAU1@@Z
+?strrchr@@YAPADPADH@Z
+;?make_tree_path@@YAPAUs_tree_node@@PADPAUs_tree_root@@@Z
+?tree_getpath@@YAHPAUs_tree_node@@PADH@Z
+?tree_cwd@@YAPAUs_tree_node@@PADPAUs_tree_root@@PAU1@@Z
+;?tree_relcwd@@YAPAUs_tree_node@@PADPAUs_tree_root@@PAU1@@Z
+; util.obj 
+?is_buf_zero@@YAHPADH@Z
+?lcase@@YAXPAD@Z
+?bash_spaces@@YAXPAD@Z
+?bash_spaces@@YAXAAVPOOL_MEM@@@Z
+;??? ?c_str@POOL_MEM@@QBEPADXZ
+?unbash_spaces@@YAXPAD@Z
+?unbash_spaces@@YAXAAVPOOL_MEM@@@Z
+?encode_time@@YAPADJPAD@Z
+?jobstatus_to_ascii@@YAXHPADH@Z
+?job_status_to_str@@YAPBDH@Z
+?job_type_to_str@@YAPBDH@Z
+?job_level_to_str@@YAPBDH@Z
+?encode_mode@@YAPADIPAD@Z
+?do_shell_expansion@@YAHPADH@Z
+?make_session_key@@YAXPAD0H@Z
+?edit_job_codes@@YAPADPAVJCR@@PAD1PBD@Z
+?set_working_directory@@YAXPAD@Z
+; var.obj 
+?var_create@@YA?AW4var_rc_t@@PAPAUvar_st@@@Z
+?var_destroy@@YA?AW4var_rc_t@@PAUvar_st@@@Z
+?var_config@@YA?AW4var_rc_t@@PAUvar_st@@W4var_config_t@@ZZ
+?var_unescape@@YA?AW4var_rc_t@@PAUvar_st@@PBDHPADHH@Z
+?var_expand@@YA?AW4var_rc_t@@PAUvar_st@@PBDHPAPADPAHH@Z
+;?var_formatv@@YA?AW4var_rc_t@@PAUvar_st@@PAPADHPBDPAD@Z
+;?var_format@@YA?AW4var_rc_t@@PAUvar_st@@PAPADHPBDZZ
+?var_strerror@@YAPBDPAUvar_st@@W4var_rc_t@@@Z
+; watchdog.obj 
+?start_watchdog@@YAHXZ
+?stop_watchdog@@YAHXZ
+?new_watchdog@@YAPAUs_watchdog_t@@XZ
+?register_watchdog@@YA_NPAUs_watchdog_t@@@Z
+;?unregister_watchdog@@YA_NPAUs_watchdog_t@@@Z
+; winapi.obj 
+?InitWinAPIWrapper@@YAXXZ
+; workq.obj 
+;?workq_init@@YAHPAUworkq_tag@@HP6APAXPAX@Z@Z
+;?workq_destroy@@YAHPAUworkq_tag@@@Z
+;?workq_add@@YAHPAUworkq_tag@@PAXPAPAUworkq_ele_tag@@H@Z
+;?workq_remove@@YAHPAUworkq_tag@@PAUworkq_ele_tag@@@Z
index 1d4f6d82d4353599412f5e75d47c71acf46fe346..773426dc1925d80ccb0ad262d7a4e691ee319067 100644 (file)
@@ -40,7 +40,7 @@
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="../compat;../..;&quot;../../../../depkgs-win32/pthreads&quot;"\r
+                               AdditionalIncludeDirectories="../compat;../../../../depkgs-win32/include;../..;../../../../depkgs-win32/include/pthreads;../../../../depkgs-win32/include/mysql;../../../../depkgs-win32/include/postgresql;../../../../depkgs-win32/vss/inc"\r
                                PreprocessorDefinitions="WIN32;_DEBUG;_LIB;HAVE_WIN32;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"\r
                                MinimalRebuild="true"\r
                                BasicRuntimeChecks="3"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="../compat;../..;&quot;../../../../depkgs-win32/pthreads&quot;"\r
+                               AdditionalIncludeDirectories="../compat;../../../../depkgs-win32/include;../..;../../../../depkgs-win32/include/pthreads;../../../../depkgs-win32/include/mysql;../../../../depkgs-win32/include/postgresql;../../../../depkgs-win32/vss/inc"\r
                                PreprocessorDefinitions="WIN32;NDEBUG;_LIB;HAVE_WIN32;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"\r
                                RuntimeLibrary="2"\r
                                EnableFunctionLevelLinking="true"\r
                <Filter\r
                        Name="Source Files"\r
                        Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
                        >\r
                        <File\r
                                RelativePath="..\..\findlib\attribs.c"\r
                <Filter\r
                        Name="Header Files"\r
                        Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
                        >\r
                        <File\r
                                RelativePath="..\..\findlib\bfile.h"\r
                <Filter\r
                        Name="Resource Files"\r
                        Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
                        >\r
                </Filter>\r
                <File\r
index dde9dfaf166f8b826af190e865b217059d8f441f..99ace24f921e38cdbf00bce002b9498dfb98c5e3 100644 (file)
@@ -40,7 +40,7 @@
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="../compat;../..;&quot;../../../../depkgs-win32/pthreads&quot;"\r
+                               AdditionalIncludeDirectories="../compat;../../../../depkgs-win32/include;../..;../../../../depkgs-win32/include/pthreads;../../../../depkgs-win32/include/mysql;../../../../depkgs-win32/include/postgresql;../../../../depkgs-win32/vss/inc"\r
                                PreprocessorDefinitions="WIN32;_DEBUG;_LIB;HAVE_WIN32;WIN32_VSS;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"\r
                                MinimalRebuild="true"\r
                                BasicRuntimeChecks="3"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="../compat;../..;&quot;../../../../depkgs-win32/pthreads&quot;"\r
+                               AdditionalIncludeDirectories="../compat;../../../../depkgs-win32/include;../..;../../../../depkgs-win32/include/pthreads;../../../../depkgs-win32/include/mysql;../../../../depkgs-win32/include/postgresql;../../../../depkgs-win32/vss/inc"\r
                                PreprocessorDefinitions="WIN32;NDEBUG;_LIB;HAVE_WIN32;WIN32_VSS;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"\r
                                RuntimeLibrary="2"\r
                                EnableFunctionLevelLinking="true"\r
                <Filter\r
                        Name="Source Files"\r
                        Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
                        >\r
                </Filter>\r
                <Filter\r
                        Name="Header Files"\r
                        Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
                        >\r
                </Filter>\r
                <Filter\r
                        Name="Resource Files"\r
                        Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
                        >\r
                </Filter>\r
        </Files>\r
index 157dea3b18d94acf39fa36425073fd8c232a205c..94c9d8c9765e27320d93a6a4317f262ba57fa383 100644 (file)
@@ -55,22 +55,13 @@ public:
    static int BaculaServiceMain();
 
    // Routine to install the Apcupsd service on the local machine
-   static int InstallService();
+   static int InstallService(const char *pszCmdLine);
 
    // Routine to remove the Apcupsd service from the local machine
    static int RemoveService();
 
    // SERVICE SUPPORT FUNCTIONS
 
-   // Routine to establish and return the currently logged in user name
-   static BOOL CurrentUser(char *buffer, UINT size);
-
-   // Routine to post a message to the currently running Apcupsd server
-   // to pass it a handle to the current user
-   static BOOL PostUserHelperMessage();
-   // Routine to process a user helper message
-   static BOOL ProcessUserHelperMessage(WPARAM wParam, LPARAM lParam);
-
    // Routines to establish which OS we're running on
    static BOOL IsWin95();
    static BOOL IsWinNT();
@@ -82,29 +73,6 @@ public:
    // Routine to kill any other running copy of Apcupsd
    static BOOL KillRunningCopy();
 
-   // Routine to set the current thread into the given desktop
-   static BOOL SelectHDESK(HDESK newdesktop);
-
-   // Routine to set the current thread into the named desktop,
-   // or the input desktop if no name is given
-   static BOOL SelectDesktop(char *name);
-
-   // Routine to establish whether the current thread desktop is the
-   // current user input one
-   static BOOL InputDesktopSelected();
-
-   // Routine to fake a CtrlAltDel to winlogon when required.
-   // *** This is a nasty little hack...
-   static BOOL SimulateCtrlAltDel();
-
-   // Routine to make any currently running version of Apcupsd show its
-   // Properties dialog, to allow the user to make changes to their settings
-   static BOOL ShowProperties();
-
-   // Routine to make any currently running version of Apcupsd show the
-   // Properties dialog for the default settings, so the user can make changes
-   static BOOL ShowDefaultProperties();
-
    // Routine to make the an already running copy of Apcupsd bring up its
    // About box so you can check the version!
    static BOOL ShowAboutBox();
@@ -112,14 +80,6 @@ public:
    // Routine to make the an already running copy of Apcupsd bring up its
    // Status dialog
    static BOOL ShowStatus();
-
-   // Routine to make the an already running copy of Apcupsd bring up its
-   // Events dialog
-   static BOOL ShowEvents();
-
-   // Routine to make an already running copy of Apcupsd form an outgoing
-   // connection to a new ups client
-   static BOOL PostAddNewClient(unsigned long ipaddress);
 };
 
 #endif
diff --git a/bacula/src/win32/patches/sed.patch b/bacula/src/win32/patches/sed.patch
new file mode 100644 (file)
index 0000000..a599cb3
--- /dev/null
@@ -0,0 +1,15 @@
+Index: regex_internal.h
+--- ../released/sed-4.1.5/lib/regex_internal.h 2005-12-06 00:50:56.000000000 -0800
++++ ./lib/regex_internal.h     2006-08-31 02:24:05.000000000 -0700
+@@ -410,7 +410,11 @@
+ #define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx))
+ #define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx))
++#if defined(WIN32)
++#include <malloc.h>
++#else
+ #include <alloca.h>
++#endif
+ #ifndef _LIBC
+ # if HAVE_ALLOCA
diff --git a/bacula/src/win32/stored/baculasd/baculasd.vcproj b/bacula/src/win32/stored/baculasd/baculasd.vcproj
new file mode 100644 (file)
index 0000000..d3426c5
--- /dev/null
@@ -0,0 +1,381 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="8.00"
+       Name="baculasd"
+       ProjectGUID="{F5F063F8-11A1-475A-82E2-19759BB40B25}"
+       RootNamespace="baculasd"
+       >
+       <Platforms>
+               <Platform
+                       Name="Win32"
+               />
+       </Platforms>
+       <ToolFiles>
+       </ToolFiles>
+       <Configurations>
+               <Configuration
+                       Name="Release|Win32"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="1"
+                       InheritedPropertySheets="..\..\..\..\..\..\..\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults\UpgradeFromVC60.vsprops"
+                       UseOfMFC="0"
+                       UseOfATL="1"
+                       ATLMinimizesCRunTimeLibraryUsage="false"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                               TypeLibraryName=".\Release/baculasd.tlb"
+                               HeaderFileName=""
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="3"
+                               InlineFunctionExpansion="2"
+                               EnableIntrinsicFunctions="true"
+                               AdditionalIncludeDirectories="../../..;../../compat;../../../stored;&quot;../../../../../depkgs-msvc/include&quot;"
+                               PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;HAVE_WIN32;USING_DLL;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0501;_CRT_SECURE_NO_DEPRECATE"
+                               StringPooling="true"
+                               RuntimeLibrary="2"
+                               EnableFunctionLevelLinking="true"
+                               PrecompiledHeaderFile=".\Release/baculasd.pch"
+                               AssemblerListingLocation=".\Release/"
+                               ObjectFile=".\Release/"
+                               ProgramDataBaseFileName=".\Release/"
+                               BrowseInformation="1"
+                               WarningLevel="3"
+                               SuppressStartupBanner="true"
+                               DebugInformationFormat="3"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                               PreprocessorDefinitions="NDEBUG"
+                               Culture="1033"
+                               AdditionalIncludeDirectories=""
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="pthreadVCE.lib zlib.lib wsock32.lib atls.lib"
+                               OutputFile="$(OutDir)\bacula-sd.exe"
+                               LinkIncremental="0"
+                               SuppressStartupBanner="true"
+                               AdditionalLibraryDirectories="&quot;../../../../../depkgs-msvc/lib&quot;"
+                               DelayLoadDLLs="$(NOINHERIT)"
+                               GenerateDebugInformation="true"
+                               SubSystem="2"
+                               TargetMachine="1"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                               SuppressStartupBanner="true"
+                               OutputFile=".\Release/baculasd.bsc"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Debug|Win32"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="1"
+                       InheritedPropertySheets="..\..\..\..\..\..\..\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults\UpgradeFromVC60.vsprops"
+                       UseOfMFC="0"
+                       ATLMinimizesCRunTimeLibraryUsage="false"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                               TypeLibraryName=".\Debug/baculasd.tlb"
+                               HeaderFileName=""
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+                               AdditionalIncludeDirectories="../../..;../../compat;../../../stored;&quot;../../../../../depkgs-msvc/include&quot;"
+                               PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;HAVE_WIN32;USING_DLL;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"
+                               MinimalRebuild="true"
+                               BasicRuntimeChecks="3"
+                               RuntimeLibrary="3"
+                               PrecompiledHeaderFile=".\Debug/baculasd.pch"
+                               AssemblerListingLocation=".\Debug/"
+                               ObjectFile=".\Debug/"
+                               ProgramDataBaseFileName=".\Debug/"
+                               BrowseInformation="1"
+                               WarningLevel="3"
+                               SuppressStartupBanner="true"
+                               DebugInformationFormat="4"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                               PreprocessorDefinitions="_DEBUG"
+                               Culture="1033"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="pthreadVCE.lib zlib.lib wsock32.lib atlsd.lib"
+                               OutputFile="$(OutDir)/bacula-sd.exe"
+                               LinkIncremental="0"
+                               SuppressStartupBanner="true"
+                               AdditionalLibraryDirectories="&quot;../../../../../depkgs-msvc/lib&quot;"
+                               GenerateDebugInformation="true"
+                               SubSystem="2"
+                               TargetMachine="1"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                               SuppressStartupBanner="true"
+                               OutputFile=".\Debug/baculasd.bsc"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+       </Configurations>
+       <References>
+       </References>
+       <Files>
+               <Filter
+                       Name="Source Files"
+                       Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+                       >
+                       <File
+                               RelativePath="..\mtops.cpp"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\stored\status.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\..\..\stored\stored.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath=".\winabout.cpp"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\winevents.cpp"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\winmain.cpp"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath=".\winservice.cpp"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath=".\winstat.cpp"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\wintray.cpp"
+                               >
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Header Files"
+                       Filter="h;hpp;hxx;hm;inl"
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+                       >
+                       <File
+                               RelativePath="..\..\..\stored\block.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\stored\bsr.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\stored\dev.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\stored\protos.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\stored\record.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\stored\reserve.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\stored\stored.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\stored\stored_conf.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\winabout.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\winbacula.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\winevents.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\winres.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\winservice.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\winstat.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\wintray.h"
+                               >
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Resource Files"
+                       Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+                       >
+                       <File
+                               RelativePath=".\winres.rc"
+                               >
+                       </File>
+               </Filter>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>
index 993b1ee8a61092fedf3f455ab9dbb157c388eb7f..22c655f602775587edba86b98afc4aae12820391 100644 (file)
@@ -44,7 +44,6 @@ extern HINSTANCE        hAppInstance;
 extern const char       *szAppName;
 extern DWORD            mainthreadId;
 
-// Main UPS server routine
 extern int BaculaAppMain();
 
 extern void LogErrorMsg(char *msg);
index e673db377bc6710cfc03ce6162229aef483d0d74..f40b947b5c915a2ed481f6b75bde36449a39e023 100644 (file)
@@ -1,20 +1,15 @@
 /*
-   Copyright (C) 2000-2005 Kern Sibbald
+   Copyright (C) 2000-2006 Kern Sibbald
 
    This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2 of
-   the License, or (at your option) any later version.
+   modify it under the terms of the GNU General Public License
+   version 2 as amended with additional clauses defined in the
+   file LICENSE in the main source directory.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU General Public
-   License along with this program; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-   MA 02111-1307, USA.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
+   the file LICENSE for additional details.
 
    This file is patterned after the VNC Win32 code by ATT
   
@@ -22,6 +17,7 @@
 
 #include <unistd.h>
 #include <ctype.h>
+
 #include "bacula.h"
 #include "winbacula.h"
 #include "wintray.h"
@@ -37,8 +33,9 @@ extern void d_msg(const char *, int, int, const char *, ...);
 
 /* Globals */
 HINSTANCE       hAppInstance;
-const char      *szAppName = "Bacula";
+const char      *szAppName = "Bacula-sd";
 DWORD           mainthreadId;
+bool            silent = false;
 
 /* Imported variables */
 extern DWORD    g_servicethread;
@@ -95,7 +92,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
    for (i=1;i<MAX_COMMAND_ARGS;i++)
       command_args[i] = NULL;
 
-   wordPtr = szCmdLine;
+   char *pszArgs = bstrdup(szCmdLine);
+   wordPtr = pszArgs;
    quote = 0;
    while  (*wordPtr && (*wordPtr == ' ' || *wordPtr == '\t'))
       wordPtr++;
@@ -114,7 +112,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
          tempPtr = wordPtr;
          if (quote) {
             while (*tempPtr && *tempPtr != '\"')
-            tempPtr++;
+               tempPtr++;
             quote = 0;
          } else {
             while (*tempPtr && *tempPtr != ' ')
@@ -135,57 +133,47 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
 
    /*
     * Now process Windows command line options
-    *   as defined by ATT
-    *
-    * Make the command-line lowercase and parse it
     */
-   for (i = 0; i < (int)strlen(szCmdLine); i++) {
-      szCmdLine[i] = tolower(szCmdLine[i]);
-   }
-
    bool argfound = false;
    for (i = 0; i < (int)strlen(szCmdLine); i++) {
       if (szCmdLine[i] <= ' ') {
          continue;
       }
 
-      if (szCmdLine[i] == '-') {
-         while (szCmdLine[i] && szCmdLine[i] != ' ') {
-            i++;
-         }
-         continue;
+      if (szCmdLine[i] != '/') {
+         break;
       }
 
       argfound = true;
 
       /* Now check for command-line arguments */
 
-      /* /service helper - probably only needed on win9x */
-      if (strncmp(&szCmdLine[i], BaculaRunServiceHelper, strlen(BaculaRunServiceHelper)) == 0
-          && g_platform_id == VER_PLATFORM_WIN32_NT) {
-         /* exit with result "okay" */
-         return 0;          
+      /* /silent install quietly -- no prompts */
+      if (strnicmp(&szCmdLine[i], "/silent", strlen("/silent")) == 0) {
+         silent = true;
+         i += strlen("/silent");
+         continue;
       }
 
       /* /service start service */
-      if (strncmp(&szCmdLine[i], BaculaRunService, strlen(BaculaRunService)) == 0) {
+      if (strnicmp(&szCmdLine[i], BaculaRunService, strlen(BaculaRunService)) == 0) {
          /* Run Bacula as a service */
          return bacService::BaculaServiceMain();
       }
       /* /run  (this is the default if no command line arguments) */
-      if (strncmp(&szCmdLine[i], BaculaRunAsUserApp, strlen(BaculaRunAsUserApp)) == 0) {
+      if (strnicmp(&szCmdLine[i], BaculaRunAsUserApp, strlen(BaculaRunAsUserApp)) == 0) {
          /* Bacula is being run as a user-level program */
          return BaculaAppMain();
       }
       /* /install */
-      if (strncmp(&szCmdLine[i], BaculaInstallService, strlen(BaculaInstallService)) == 0) {
+      if (strnicmp(&szCmdLine[i], BaculaInstallService, strlen(BaculaInstallService)) == 0) {
          /* Install Bacula as a service */
-         bacService::InstallService();
+         bacService::InstallService(&szCmdLine[i + strlen(BaculaInstallService)]);
          i += strlen(BaculaInstallService);
          continue;
       }
       /* /remove */
-      if (strncmp(&szCmdLine[i], BaculaRemoveService, strlen(BaculaRemoveService)) == 0) {
+      if (strnicmp(&szCmdLine[i], BaculaRemoveService, strlen(BaculaRemoveService)) == 0) {
          /* Remove the Bacula service */
          bacService::RemoveService();
          i += strlen(BaculaRemoveService);
@@ -193,7 +181,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
       }
 
       /* /about */
-      if (strncmp(&szCmdLine[i], BaculaShowAbout, strlen(BaculaShowAbout)) == 0) {
+      if (strnicmp(&szCmdLine[i], BaculaShowAbout, strlen(BaculaShowAbout)) == 0) {
          /* Show Bacula's about box */
          bacService::ShowAboutBox();
          i += strlen(BaculaShowAbout);
@@ -201,7 +189,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
       }
 
       /* /status */
-      if (strncmp(&szCmdLine[i], BaculaShowStatus, strlen(BaculaShowStatus)) == 0) {
+      if (strnicmp(&szCmdLine[i], BaculaShowStatus, strlen(BaculaShowStatus)) == 0) {
          /* Show Bacula's status box */                             
          bacService::ShowStatus();
          i += strlen(BaculaShowStatus);
@@ -209,7 +197,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
       }
 
       /* /kill */
-      if (strncmp(&szCmdLine[i], BaculaKillRunningCopy, strlen(BaculaKillRunningCopy)) == 0) {
+      if (strnicmp(&szCmdLine[i], BaculaKillRunningCopy, strlen(BaculaKillRunningCopy)) == 0) {
          /* Kill running copy of Bacula */
          bacService::KillRunningCopy();
          i += strlen(BaculaKillRunningCopy);
@@ -217,7 +205,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
       }
 
       /* /help */
-      if (strncmp(&szCmdLine[i], BaculaShowHelp, strlen(BaculaShowHelp)) == 0) {
+      if (strnicmp(&szCmdLine[i], BaculaShowHelp, strlen(BaculaShowHelp)) == 0) {
          MessageBox(NULL, BaculaUsageText, _("Bacula Usage"), MB_OK|MB_ICONINFORMATION);
          i += strlen(BaculaShowHelp);
          continue;
@@ -320,7 +308,6 @@ int BaculaAppMain()
    }
 
    /* Create a thread to handle the Windows messages */
-// (void)CreateThread(NULL, 0, Main_Msg_Loop, NULL, 0, &dwThreadID);
    pthread_create(&tid, NULL,  Main_Msg_Loop, (void *)0);
 
    /* Call the "real" Bacula */
index cde43b64e23b934b0937a244378e5491f443766b..e0d72a7eea07bc9bd3fd57f5bbd4045ba1573ce2 100644 (file)
@@ -25,7 +25,7 @@
 // by Kern E. Sibbald.  Many thanks to ATT and James Weatherall,
 // the original author, for providing an excellent template.
 //
-// Copyright (2000-2003) Kern E. Sibbald
+// Copyright (C) 2000-2006 Kern E. Sibbald
 //
 
 
@@ -37,7 +37,7 @@
 // show events, ...)
 
 
-#include "bacula.h" 
+#include "bacula.h"
 #include "winbacula.h"
 #include "winservice.h"
 #include "wintray.h"
@@ -52,36 +52,12 @@ void set_service_description(SC_HANDLE hSCManager, SC_HANDLE hService,
 
 bacService init;
 
-bacService::bacService()
-{
-   OSVERSIONINFO osversioninfo;
-   osversioninfo.dwOSVersionInfoSize = sizeof(osversioninfo);
-
-   // Get the current OS version
-   if (!GetVersionEx(&osversioninfo)) {
-      g_platform_id = 0;
-   } else {
-      g_platform_id = osversioninfo.dwPlatformId;
-   }
-}
-
-
-// IsWin95 - returns a BOOL indicating whether the current OS is Win95
-BOOL
-bacService::IsWin95()
-{
-   return (g_platform_id == VER_PLATFORM_WIN32_WINDOWS);
-}
+extern bool    silent;
 
-// IsWinNT - returns a bool indicating whether the current OS is WinNT
-BOOL
-bacService::IsWinNT()
+bacService::bacService()
 {
-   return (g_platform_id == VER_PLATFORM_WIN32_NT);
 }
 
-// Internal routine to find the  Bacula menu class window and
-// post a message to it!
 
 BOOL
 PostToBacula(UINT message, WPARAM wParam, LPARAM lParam)
@@ -98,24 +74,6 @@ PostToBacula(UINT message, WPARAM wParam, LPARAM lParam)
 }
 
 
-// Static routine to show the Properties dialog for a currently-running
-// copy of Bacula, (usually a servicified version.)
-
-BOOL
-bacService::ShowProperties()
-{
-   return TRUE;
-}
-
-// Static routine to show the Default Properties dialog for a currently-running
-// copy of Bacula, (usually a servicified version.)
-
-BOOL
-bacService::ShowDefaultProperties()
-{
-   return TRUE;
-}
-
 // Static routine to show the About dialog for a currently-running
 // copy of Bacula, (usually a servicified version.)
 
@@ -124,7 +82,7 @@ bacService::ShowAboutBox()
 {
   // Post to the Bacula menu window
   if (!PostToBacula(MENU_ABOUTBOX_SHOW, 0, 0)) {
-     MessageBox(NULL, _("No existing instance of Bacula could be contacted"), szAppName, MB_ICONEXCLAMATION | MB_OK);
+     MessageBox(NULL, _("No existing instance of Bacula storage service could be contacted"), szAppName, MB_ICONEXCLAMATION | MB_OK);
      return FALSE;
   }
   return TRUE;
@@ -138,7 +96,7 @@ bacService::ShowStatus()
 {
   // Post to the Bacula menu window
   if (!PostToBacula(MENU_STATUS_SHOW, 0, 0)) {
-     MessageBox(NULL, _("No existing instance of Bacula could be contacted"), szAppName, MB_ICONEXCLAMATION | MB_OK);
+     MessageBox(NULL, _("No existing instance of Bacula storage service could be contacted"), szAppName, MB_ICONEXCLAMATION | MB_OK);
      return FALSE;
   }
   return TRUE;
@@ -148,17 +106,14 @@ bacService::ShowStatus()
 
 // Service-mode defines:
 
-// Executable name
-#define BAC_APPNAME            "baculasd"
-
 // Internal service name
-#define BAC_SERVICENAME        "Baculasd"
+#define BAC_SERVICENAME        "Bacula-sd"
 
 // Displayed service name
 #define BAC_SERVICEDISPLAYNAME "Bacula Storage Server"
 
-// List other required serves 
-#define BAC_DEPENDENCIES __TEXT("tcpip\0afd\0+File System\0") 
+// List other required services 
+#define BAC_DEPENDENCIES __TEXT("tcpip\0afd\0") 
 
 
 // Internal service state
@@ -202,62 +157,17 @@ bacService::BaculaServiceMain()
    // Mark that we are a service
    g_servicemode = TRUE;
 
-   // How to run as a service depends upon the OS being used
-   switch (g_platform_id) {
-
-   // Windows 95/98/Me
-   case VER_PLATFORM_WIN32_WINDOWS:
-      {
-      // Obtain a handle to the kernel library
-      HINSTANCE kerneldll = LoadLibrary("KERNEL32.DLL");
-      if (kerneldll == NULL) {
-         MessageBox(NULL, _("KERNEL32.DLL not found: Bacula service not started"), 
-             "Bacula Service", MB_OK);
-         break;
-      }
-
-      // And find the RegisterServiceProcess function
-      DWORD (WINAPI *RegisterService)(DWORD, DWORD);
-      RegisterService = (DWORD (WINAPI *)(DWORD, DWORD))
-              GetProcAddress(kerneldll, "RegisterServiceProcess");
-      if (RegisterService == NULL) {
-         MessageBox(NULL, _("Registry service not found: Bacula service not started"),
-            "Bacula Service", MB_OK);
-         log_error_message(_("Registry service not found")); 
-         break;
-      }
-      
-      // Register this process with the OS as a service!
-      RegisterService(0, 1);
-
-      // Run the main program as a service
-      BaculaAppMain();
-
-      // Then remove the service from the system service table
-      RegisterService(0, 0);
-
-      // Free the kernel library
-      FreeLibrary(kerneldll);
-      break;
-      }
-
+   // Create a service entry table
+   SERVICE_TABLE_ENTRY dispatchTable[] = {
+      {BAC_SERVICENAME, (LPSERVICE_MAIN_FUNCTION)ServiceMain},
+      {NULL, NULL}
+   };
 
-   // Windows NT, Win2K, WinXP 
-   case VER_PLATFORM_WIN32_NT:
-      {
-      // Create a service entry table
-      SERVICE_TABLE_ENTRY dispatchTable[] = {
-         {BAC_SERVICENAME, (LPSERVICE_MAIN_FUNCTION)ServiceMain},
-         {NULL, NULL}
-      };
+   // Call the service control dispatcher with our entry table
+   if (!StartServiceCtrlDispatcher(dispatchTable)) {
+      log_error_message(_("StartServiceCtrlDispatcher failed."));
+   }
 
-      // Call the service control dispatcher with our entry table
-      if (!StartServiceCtrlDispatcher(dispatchTable)) {
-         log_error_message(_("StartServiceCtrlDispatcher failed."));
-      }
-      break;
-      } /* end case */
-   } /* end switch */
    return 0;
 }
 
@@ -339,32 +249,21 @@ void ServiceStop()
 
 // SERVICE INSTALL ROUTINE
 int
-bacService::InstallService()
+bacService::InstallService(const char *pszCmdLine)
 {
    const int pathlength = 2048;
    char path[pathlength];
    char servicecmd[pathlength];
-   int len;
 
    // Get the filename of this executable
    if (GetModuleFileName(NULL, path, pathlength-(strlen(BaculaRunService)+2)) == 0) {
-      MessageBox(NULL, _("Unable to install Bacula service"), szAppName, MB_ICONEXCLAMATION | MB_OK);
+      MessageBox(NULL, _("Unable to install Bacula Storage service"), szAppName, MB_ICONEXCLAMATION | MB_OK);
       return 0;
    }
 
    // Append the service-start flag to the end of the path:
-   if ((int)strlen(path) + 20 + (int)strlen(BaculaRunService) < pathlength) {
-      sprintf(servicecmd, "\"%s\" %s -c \"%s", path, BaculaRunService, path);
-      len = strlen(servicecmd) - 1;
-      for ( ; len > 0; len--) {
-         if (servicecmd[len] == '\\') {
-            servicecmd[len+1] = 0;
-            break;
-         }
-         servicecmd[len] = 0;
-      }
-      strcat(servicecmd, "bacula-sd.conf\"");
-
+   if ((int)strlen(path) + 5 + (int)strlen(BaculaRunService) + (int)strlen(pszCmdLine) < pathlength) {
+      sprintf(servicecmd, "\"%s\" %s %s", path, BaculaRunService, pszCmdLine);
    } else {
       log_error_message(_("Service command length too long")); 
       MessageBox(NULL, _("Service command length too long. Service not registered."),
@@ -372,104 +271,59 @@ bacService::InstallService()
       return 0;
    }
 
-   // How to add the Bacula service depends upon the OS
-   switch (g_platform_id) {
-
-   // Windows 95/98/Me
-   case VER_PLATFORM_WIN32_WINDOWS:
-      // Locate the RunService registry entry
-      HKEY runservices;
-      if (RegCreateKey(HKEY_LOCAL_MACHINE, 
-              "Software\\Microsoft\\Windows\\CurrentVersion\\RunServices",
-              &runservices) != ERROR_SUCCESS) {
-         log_error_message(_("Cannot write System Registry")); 
-         MessageBox(NULL, _("The System Registry could not be updated - the Bacula service was not installed"), szAppName, MB_ICONEXCLAMATION | MB_OK);
-         break;
-      }
+   SC_HANDLE   hservice;
+   SC_HANDLE   hsrvmanager;
 
-      // Attempt to add a Bacula key
-      if (RegSetValueEx(runservices, szAppName, 0, REG_SZ, (unsigned char *)servicecmd, strlen(servicecmd)+1) != ERROR_SUCCESS) {
-         RegCloseKey(runservices);
-         log_error_message(_("Cannot add Bacula key to System Registry")); 
-         MessageBox(NULL, _("The Bacula service could not be installed"), szAppName, MB_ICONEXCLAMATION | MB_OK);
-         break;
-      }
-
-      RegCloseKey(runservices);
-
-      // We have successfully installed the service!
+   // Open the default, local Service Control Manager database
+   hsrvmanager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
+   if (hsrvmanager == NULL) {
+      log_error_message("OpenSCManager failed"); 
       MessageBox(NULL,
-              _("The Bacula File service was successfully installed.\n"
-              "The service may be started by double clicking on the\n"
-              "Bacula \"Start\" icon and will be automatically\n"
-              "be run the next time this machine is rebooted. "),
-              szAppName,
-              MB_ICONINFORMATION | MB_OK);
-      break;
-
-   // Windows NT, Win2K, WinXP
-   case VER_PLATFORM_WIN32_NT:
-      SC_HANDLE   hservice;
-      SC_HANDLE   hsrvmanager;
-
-      // Open the default, local Service Control Manager database
-      hsrvmanager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
-      if (hsrvmanager == NULL) {
-         log_error_message("OpenSCManager failed"); 
-         MessageBox(NULL,
-            _("The Service Control Manager could not be contacted - the Bacula service was not installed"),
-            szAppName, MB_ICONEXCLAMATION | MB_OK);
-         break;
-      }
+         _("The Service Control Manager could not be contacted - the Bacula Storage service was not installed"),
+         szAppName, MB_ICONEXCLAMATION | MB_OK);
+      return 0;
+   }
 
-      // Create an entry for the Bacula service
-      hservice = CreateService(
-              hsrvmanager,                    // SCManager database
-              BAC_SERVICENAME,                // name of service
-              BAC_SERVICEDISPLAYNAME,         // name to display
-              SERVICE_ALL_ACCESS,             // desired access
-              SERVICE_WIN32_OWN_PROCESS | SERVICE_INTERACTIVE_PROCESS,
-                                                                      // service type
-              SERVICE_AUTO_START,             // start type
-              SERVICE_ERROR_NORMAL,           // error control type
-              servicecmd,                     // service's binary
-              NULL,                           // no load ordering group
-              NULL,                           // no tag identifier
-              BAC_DEPENDENCIES,               // dependencies
-              NULL,                           // LocalSystem account
-              NULL);                          // no password
-      if (hservice == NULL) {
-         CloseServiceHandle(hsrvmanager);
-         log_error_message("CreateService failed"); 
-         MessageBox(NULL,
-             _("The Bacula service could not be installed"),
-              szAppName, MB_ICONEXCLAMATION | MB_OK);
-         break;
-      }
+   // Create an entry for the Bacula service
+   hservice = CreateService(
+           hsrvmanager,                    // SCManager database
+           BAC_SERVICENAME,                // name of service
+           BAC_SERVICEDISPLAYNAME,         // name to display
+           SERVICE_ALL_ACCESS,             // desired access
+           SERVICE_WIN32_OWN_PROCESS | SERVICE_INTERACTIVE_PROCESS,
+                                                                   // service type
+           SERVICE_AUTO_START,             // start type
+           SERVICE_ERROR_NORMAL,           // error control type
+           servicecmd,                     // service's binary
+           NULL,                           // no load ordering group
+           NULL,                           // no tag identifier
+           BAC_DEPENDENCIES,               // dependencies
+           NULL,                           // LocalSystem account
+           NULL);                          // no password
+   if (hservice == NULL) {
+      CloseServiceHandle(hsrvmanager);
+      log_error_message("CreateService failed"); 
+      MessageBox(NULL,
+          _("The Bacula Storage service could not be installed"),
+           szAppName, MB_ICONEXCLAMATION | MB_OK);
+      return 0;
+   }
 
-      set_service_description(hsrvmanager,hservice, 
-_("Provides file backup and restore services. Bacula -- the network backup solution."));
+   set_service_description(hsrvmanager,hservice, 
+_("Provides storage services. Bacula -- the network backup solution."));
 
-      CloseServiceHandle(hsrvmanager);
-      CloseServiceHandle(hservice);
+   CloseServiceHandle(hsrvmanager);
+   CloseServiceHandle(hservice);
 
-      // Everything went fine
+   // Everything went fine
+   if (!silent) {
       MessageBox(NULL,
-              _("The Bacula File service was successfully installed.\n"
+              _("The Bacula Storage service was successfully installed.\n"
               "The service may be started from the Control Panel and will\n"
               "automatically be run the next time this machine is rebooted."),
               szAppName,
               MB_ICONINFORMATION | MB_OK);
-      break;
-   default:
-      log_error_message("Unknown Windows System version"); 
-      MessageBox(NULL, 
-                 _("Unknown Windows operating system.\n"     
-                 "Cannot install Bacula service.\n"),
-                 szAppName, MB_ICONEXCLAMATION | MB_OK);
-       break;     
-   };
-
+   }
    return 0;
 }
 
@@ -478,89 +332,52 @@ _("Provides file backup and restore services. Bacula -- the network backup solut
 int
 bacService::RemoveService()
 {
-   // How to remove the Bacula service depends upon the OS
-   switch (g_platform_id) {
-
-   // Windows 95/98/Me
-   case VER_PLATFORM_WIN32_WINDOWS:
-      // Locate the RunService registry entry
-      HKEY runservices;
-      if (RegOpenKey(HKEY_LOCAL_MACHINE, 
-              "Software\\Microsoft\\Windows\\CurrentVersion\\RunServices",
-              &runservices) != ERROR_SUCCESS) {
-         MessageBox(NULL, 
-            _("Could not find registry entry.\nService probably not registerd - the Bacula service was not removed"), szAppName, MB_ICONEXCLAMATION | MB_OK);
-      } else {
-         // Attempt to delete the Bacula key
-         if (RegDeleteValue(runservices, szAppName) != ERROR_SUCCESS) {
-            RegCloseKey(runservices);
-            MessageBox(NULL, _("Could not delete Registry key.\nThe Bacula service could not be removed"), szAppName, MB_ICONEXCLAMATION | MB_OK);
-         }
-
-         RegCloseKey(runservices);
-         break;
-      }
-
-      // Try to kill any running copy of Bacula
-      if (!KillRunningCopy()) {
-         MessageBox(NULL,
-             _("Bacula could not be contacted, probably not running"),
-             szAppName, MB_ICONEXCLAMATION | MB_OK);
-         break;
-      }
-
-      // We have successfully removed the service!
-      MessageBox(NULL, _("The Bacula service has been removed"), szAppName, MB_ICONINFORMATION | MB_OK);
-      break;
-
-   // Windows NT, Win2K, WinXP
-   case VER_PLATFORM_WIN32_NT:
-      SC_HANDLE   hservice;
-      SC_HANDLE   hsrvmanager;
-
-      // Open the SCM
-      hsrvmanager = OpenSCManager(
-         NULL,                   // machine (NULL == local)
-         NULL,                   // database (NULL == default)
-         SC_MANAGER_ALL_ACCESS   // access required
-         );
-      if (hsrvmanager) {
-         hservice = OpenService(hsrvmanager, BAC_SERVICENAME, SERVICE_ALL_ACCESS);
-         if (hservice != NULL) {
-            SERVICE_STATUS status;
-
-            // Try to stop the Bacula service
-            if (ControlService(hservice, SERVICE_CONTROL_STOP, &status)) {
-               while(QueryServiceStatus(hservice, &status)) {
-                  if (status.dwCurrentState == SERVICE_STOP_PENDING) {
-                     Sleep(1000);
-                  } else {
-                     break;
-                  }
-               }
-
-               if (status.dwCurrentState != SERVICE_STOPPED) {
-                  MessageBox(NULL, _("The Bacula service could not be stopped"), szAppName, MB_ICONEXCLAMATION | MB_OK);
+   SC_HANDLE   hservice;
+   SC_HANDLE   hsrvmanager;
+
+   // Open the SCM
+   hsrvmanager = OpenSCManager(
+      NULL,                   // machine (NULL == local)
+      NULL,                   // database (NULL == default)
+      SC_MANAGER_ALL_ACCESS   // access required
+      );
+   if (hsrvmanager) {
+      hservice = OpenService(hsrvmanager, BAC_SERVICENAME, SERVICE_ALL_ACCESS);
+      if (hservice != NULL) {
+         SERVICE_STATUS status;
+
+         // Try to stop the Bacula service
+         if (ControlService(hservice, SERVICE_CONTROL_STOP, &status)) {
+            while(QueryServiceStatus(hservice, &status)) {
+               if (status.dwCurrentState == SERVICE_STOP_PENDING) {
+                  Sleep(1000);
+               } else {
+                  break;
                }
             }
 
-            // Now remove the service from the SCM
-            if(DeleteService(hservice)) {
-               MessageBox(NULL, _("The Bacula service has been removed"), szAppName, MB_ICONINFORMATION | MB_OK);
-            } else {
-               MessageBox(NULL, _("The Bacula service could not be removed"), szAppName, MB_ICONEXCLAMATION | MB_OK);
+            if (status.dwCurrentState != SERVICE_STOPPED) {
+               MessageBox(NULL, _("The Bacula Storage service could not be stopped"), szAppName, MB_ICONEXCLAMATION | MB_OK);
             }
+         }
 
-            CloseServiceHandle(hservice);
+         // Now remove the service from the SCM
+         if(DeleteService(hservice)) {
+            if (!silent) {
+               MessageBox(NULL, _("The Bacula Storage service has been removed"), szAppName, MB_ICONINFORMATION | MB_OK);
+            }
          } else {
-            MessageBox(NULL, _("The Bacula service could not be found"), szAppName, MB_ICONEXCLAMATION | MB_OK);
+            MessageBox(NULL, _("The Bacula Storage service could not be removed"), szAppName, MB_ICONEXCLAMATION | MB_OK);
          }
 
-         CloseServiceHandle(hsrvmanager);
+         CloseServiceHandle(hservice);
       } else {
-         MessageBox(NULL, _("The SCM could not be contacted - the Bacula service was not removed"), szAppName, MB_ICONEXCLAMATION | MB_OK);
+         MessageBox(NULL, _("The Bacula Storage service could not be found"), szAppName, MB_ICONEXCLAMATION | MB_OK);
       }
-      break;
+
+      CloseServiceHandle(hsrvmanager);
+   } else {
+      MessageBox(NULL, _("The SCM could not be contacted - the Bacula Storage service was not removed"), szAppName, MB_ICONEXCLAMATION | MB_OK);
    }
    return 0;
 }
index 2195b58fca16110d244f4e301bb19be46258c86c..c00498a0cad0c039de73a4010ddc449a7c4c5738 100644 (file)
@@ -37,8 +37,6 @@
 // Windows NT and Windows 95.  Some routines only operate under one
 // OS, others operate under any OS.
 
-class bacService;
-
 #if (!defined(_win_bacService))
 #define _win_bacService
 
@@ -55,26 +53,13 @@ public:
    static int BaculaServiceMain();
 
    // Routine to install the Apcupsd service on the local machine
-   static int InstallService();
+   static int InstallService(const char *pszCmdLine);
 
    // Routine to remove the Apcupsd service from the local machine
    static int RemoveService();
 
    // SERVICE SUPPORT FUNCTIONS
 
-   // Routine to establish and return the currently logged in user name
-   static BOOL CurrentUser(char *buffer, UINT size);
-
-   // Routine to post a message to the currently running Apcupsd server
-   // to pass it a handle to the current user
-   static BOOL PostUserHelperMessage();
-   // Routine to process a user helper message
-   static BOOL ProcessUserHelperMessage(WPARAM wParam, LPARAM lParam);
-
-   // Routines to establish which OS we're running on
-   static BOOL IsWin95();
-   static BOOL IsWinNT();
-
    // Routine to establish whether the current instance is running
    // as a service or not
    static BOOL RunningAsService();
@@ -82,29 +67,6 @@ public:
    // Routine to kill any other running copy of Apcupsd
    static BOOL KillRunningCopy();
 
-   // Routine to set the current thread into the given desktop
-   static BOOL SelectHDESK(HDESK newdesktop);
-
-   // Routine to set the current thread into the named desktop,
-   // or the input desktop if no name is given
-   static BOOL SelectDesktop(char *name);
-
-   // Routine to establish whether the current thread desktop is the
-   // current user input one
-   static BOOL InputDesktopSelected();
-
-   // Routine to fake a CtrlAltDel to winlogon when required.
-   // *** This is a nasty little hack...
-   static BOOL SimulateCtrlAltDel();
-
-   // Routine to make any currently running version of Apcupsd show its
-   // Properties dialog, to allow the user to make changes to their settings
-   static BOOL ShowProperties();
-
-   // Routine to make any currently running version of Apcupsd show the
-   // Properties dialog for the default settings, so the user can make changes
-   static BOOL ShowDefaultProperties();
-
    // Routine to make the an already running copy of Apcupsd bring up its
    // About box so you can check the version!
    static BOOL ShowAboutBox();
@@ -112,14 +74,6 @@ public:
    // Routine to make the an already running copy of Apcupsd bring up its
    // Status dialog
    static BOOL ShowStatus();
-
-   // Routine to make the an already running copy of Apcupsd bring up its
-   // Events dialog
-   static BOOL ShowEvents();
-
-   // Routine to make an already running copy of Apcupsd form an outgoing
-   // connection to a new ups client
-   static BOOL PostAddNewClient(unsigned long ipaddress);
 };
 
 #endif
index f9bf3f4eb42c1529566d5a012a90be0f531ce82e..9ccb9609ebf585e530b4d3e4b7a1ab1a1f59df0c 100644 (file)
 #include "stored.h"                   /* pull in Storage Deamon headers */
 
 #include "sys/mtio.h"
+#if defined(_MSC_VER)
+#include <winioctl.h>
+#else
 #include <ntddstor.h>
+#endif
 #include <ntddscsi.h>
 
 //
 #define SCSISTAT_COMMAND_TERMINATED    0x22
 #define SCSISTAT_QUEUE_FULL            0x28
 
-/* Forward referenced functions */
-
-extern char my_name[];
-extern int debug_level;
-
 inline   SHORT  Read16BitSigned(const unsigned char *pValue)
 {
    return (SHORT)(((USHORT)pValue[0] << 8) | (USHORT)pValue[1]);
index 5fed371f585a6cbe09af034d467d4d4449bff15b..f27a67ab10a5f55402afcced47d3e22be755720f 100644 (file)
@@ -19,6 +19,8 @@ DEFINES = \
        -DUSING_CATS \
        $(HAVES)
 
+LDFLAGS:=$(LDFLAGS) -lstdc++
+
 vpath %.c ../../tools ../../dird
 vpath %.cpp ../../tools ../../dird
 
@@ -49,7 +51,7 @@ ALL_OBJS = \
 all: \
        $(BINDIR)/dbcheck.exe $(BINDIR)/fstype.exe $(BINDIR)/drivetype.exe \
        $(BINDIR)/testfind.exe $(BINDIR)/testls.exe $(BINDIR)/bregex.exe \
-       $(BINDIR)/bwild.exe
+       $(BINDIR)/bwild.exe $(BINDIR)/scsilist.exe
 
 #
 # bsmtp needs passwd file emulation
@@ -96,4 +98,7 @@ $(BINDIR)/bregex.exe: $(OBJDIR)/bregex.o $(LIBS_BACULA)
 $(BINDIR)/bwild.exe: $(OBJDIR)/bwild.o $(LIBS_BACULA)
        $(call link_conapp,)
 
+$(BINDIR)/scsilist.exe: $(OBJDIR)/scsilist.o ScsiDeviceList.o $(LIBS_BACULA)
+       $(call link_conapp,)
+
 include ../Makefile.rules
diff --git a/bacula/src/win32/tools/ScsiDeviceList.cpp b/bacula/src/win32/tools/ScsiDeviceList.cpp
new file mode 100644 (file)
index 0000000..0fdbc2a
--- /dev/null
@@ -0,0 +1,352 @@
+/*
+ * ScsiDeviceList.cpp - Class which provides information on installed devices.
+ *
+ * Author: Robert Nelson, August, 2006 <robertn@the-nelsons.org>
+ *
+ * Version $Id$
+ *
+ * Copyright (C) 2006 Kern Sibbald
+ *
+ * This file was contributed to the Bacula project by Robert Nelson.
+ *
+ * Robert Nelson has been granted a perpetual, worldwide,
+ * non-exclusive, no-charge, royalty-free, irrevocable copyright
+ * license to reproduce, prepare derivative works of, publicly
+ * display, publicly perform, sublicense, and distribute the original
+ * work contributed by Robert Nelson to the Bacula project in source 
+ * or object form.
+ *
+ * If you wish to license contributions from Robert Nelson
+ * under an alternate open source license please contact
+ * Robert Nelson <robertn@the-nelsons.org>.
+ */
+/*
+   Copyright (C) 2006 Kern Sibbald
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License
+   version 2 as amended with additional clauses defined in the
+   file LICENSE in the main source directory.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
+   the file LICENSE for additional details.
+
+ */
+
+#if defined(_MSC_VER) && defined(_DEBUG)
+#include <afx.h>
+#else
+#include <windows.h>
+#endif
+
+#include <stdio.h>
+#include <tchar.h>
+
+#include "ScsiDeviceList.h"
+
+#if defined(_MSC_VER) && defined(_DEBUG)
+#define  new   DEBUG_NEW
+#endif
+
+TCHAR    CScsiDeviceList::c_ScsiPath[] = _T("HARDWARE\\DEVICEMAP\\Scsi");
+
+LPCTSTR  CScsiDeviceList::c_lpszFormatList[] =
+{
+   _T("Logical Unit Id %d"),
+   _T("Target Id %d"),
+   _T("Scsi Bus %d"),
+   _T("Scsi Port %d")
+};
+
+LPCTSTR  CScsiDeviceListEntry::c_DeviceTypes[] =
+{
+   _T("Unknown"),
+   _T("CDRom"),
+   _T("Changer"),
+   _T("Disk"),
+   _T("Tape")
+};
+
+CScsiDeviceListEntry::CScsiDeviceListEntry(const CScsiDeviceListEntry &other)
+{
+   m_eDeviceType = other.m_eDeviceType;
+
+   m_lpszIdentifier = other.m_lpszIdentifier != NULL ? _tcsdup(other.m_lpszIdentifier) : NULL;
+
+   m_lpszDeviceName = other.m_lpszDeviceName != NULL ? _tcsdup(other.m_lpszDeviceName) : NULL;
+
+   m_dwDeviceId = other.m_dwDeviceId;
+   _tcscpy(m_szDevicePath, other.m_szDevicePath);
+}
+
+CScsiDeviceListEntry::CScsiDeviceListEntry(void)
+{
+   m_eDeviceType = Unknown;
+   m_lpszIdentifier = NULL;
+   m_lpszDeviceName = NULL;
+   m_dwDeviceId = 0;
+   m_szDevicePath[0] = _T('\0');
+}
+
+CScsiDeviceListEntry::~CScsiDeviceListEntry(void)
+{
+   if (m_lpszIdentifier != NULL)
+   {
+      free(m_lpszIdentifier);
+   }
+
+   if (m_lpszDeviceName != NULL)
+   {
+      free(m_lpszDeviceName);
+   }
+}
+
+bool
+CScsiDeviceList::Populate()
+{
+   this->clear();
+
+   HKEY  hScsiKey;
+
+   _tcscpy(m_szLastKey, _T("\\Scsi"));
+   m_dwLastKeyLength = 5;
+
+   m_lLastError = RegOpenKeyEx(  HKEY_LOCAL_MACHINE, 
+                                 c_ScsiPath, 
+                                 0, 
+                                 KEY_READ, 
+                                 &hScsiKey);
+
+   if (m_lLastError != ERROR_SUCCESS) {
+      _tcscpy(m_szLastOperation, _T("Opening key "));
+      _tcscpy(m_szLastKey, c_ScsiPath);
+      return false;
+   }
+
+   if (!ProcessKey(hScsiKey, c_MaxKeyDepth - 1, 0)) {
+      return false;
+   }
+
+#if defined(_DEBUG)
+   _fputtc(_T('\n'), stderr);
+#endif
+
+   return true;
+}
+
+bool
+CScsiDeviceList::ProcessKey(HKEY hKey, int iLevel, DWORD dwDeviceId)
+{
+#if defined(_DEBUG)
+   switch (iLevel)
+   {
+   case 3:
+      _ftprintf(  stderr, 
+                  _T("%-64s\n"), 
+                  &m_szLastKey[1]);
+      break;
+
+   case 2:
+      _ftprintf(  stderr, 
+                  _T("%-64s%d\n"), 
+                  &m_szLastKey[1], 
+                  dwDeviceId & 0xFF);
+      break;
+
+   case 1:
+      _ftprintf(  stderr, 
+                  _T("%-64s%d:%d\n"), 
+                  &m_szLastKey[1], 
+                  (dwDeviceId >>  8) & 0xFF,
+                   dwDeviceId        & 0xFF);
+      break;
+
+   case 0:
+      _ftprintf(  stderr, 
+                  _T("%-64s%d:%d:%d\n"), 
+                  &m_szLastKey[1], 
+                  (dwDeviceId >>  16) & 0xFF,
+                  (dwDeviceId >>  8) & 0xFF,
+                   dwDeviceId        & 0xFF);
+      break;
+   }
+#endif
+
+   for (int idxSubkey = 0; ; idxSubkey++) {
+
+      TCHAR szSubkeyName[c_MaxSubkeyLength + 1];
+      DWORD dwLength;
+
+      dwLength = sizeof(szSubkeyName);
+
+      m_lLastError = RegEnumKeyEx(  hKey, 
+                                    idxSubkey, 
+                                    szSubkeyName, 
+                                    &dwLength, 
+                                    NULL, 
+                                    NULL, 
+                                    NULL, 
+                                    NULL);
+
+      if (m_lLastError == ERROR_NO_MORE_ITEMS) {
+         break;
+      } else  if (m_lLastError == ERROR_MORE_DATA) {
+#if defined(_DEBUG)
+         _tcscpy(m_szLastOperation, _T("Enumerating subkeys of "));
+         PrintLastError();
+#endif
+         // Subkey name is too long
+         continue;
+      } else if (m_lLastError != ERROR_SUCCESS) {
+         // Unexpected Error
+         _tcscpy(m_szLastOperation, _T("Enumerating subkeys of "));
+         return false;
+      }
+
+      int   iValue;
+
+      if (_stscanf(szSubkeyName, c_lpszFormatList[iLevel], &iValue) != 1) {
+         // Ignore this subkey, it is probably Initiator Id n
+         continue;
+      }
+
+      m_szLastKey[m_dwLastKeyLength++] = _T('\\');
+
+      DWORD dwSubkeyLength = (DWORD)_tcslen(szSubkeyName);
+      memcpy(&m_szLastKey[m_dwLastKeyLength], szSubkeyName, (dwSubkeyLength + 1) * sizeof(TCHAR));
+      m_dwLastKeyLength += dwSubkeyLength;
+
+      HKEY  hSubkey;
+
+      m_lLastError = RegOpenKeyEx(hKey, szSubkeyName, 0, KEY_READ, &hSubkey);
+
+      if (m_lLastError != ERROR_SUCCESS) {
+         _tcscpy(m_szLastOperation, _T("Opening key "));
+         return false;
+      }
+
+      if (iLevel == 0) {
+#if defined(_DEBUG)
+         _ftprintf(  stderr, 
+                     _T("%-64s%d:%d:%d:%d\n"), 
+                     &m_szLastKey[1], 
+                     (dwDeviceId >> 16) & 0xFF,
+                     (dwDeviceId >>  8) & 0xFF,
+                      dwDeviceId        & 0xFF,
+                      iValue);
+#endif
+
+         ProcessValues(hSubkey, (dwDeviceId << 8) | iValue);
+      } else {
+         if (!ProcessKey(hSubkey, iLevel - 1, (dwDeviceId << 8) | iValue)) {
+            return false;
+         }
+      }
+
+      m_dwLastKeyLength -= dwSubkeyLength;
+      m_dwLastKeyLength--;
+      m_szLastKey[m_dwLastKeyLength] = _T('\0');
+   }
+
+   return true;
+}
+
+bool
+CScsiDeviceList::ProcessValues(HKEY hKey, DWORD dwDeviceId)
+{
+   CScsiDeviceListEntry    EntryTemplate;
+   DWORD                   dwType;
+   DWORD                   dwSize;
+   TCHAR                   szValue[c_MaxValueLength + 1];
+
+   this->push_back(EntryTemplate);
+   CScsiDeviceListEntry &  entry = this->back();
+
+   dwSize = sizeof(szValue);
+
+   m_lLastError = RegQueryValueEx(  hKey, 
+                                    _T("Identifier"), 
+                                    NULL, 
+                                    &dwType, 
+                                    (LPBYTE)&szValue[0], 
+                                    &dwSize);
+
+   if (m_lLastError == ERROR_SUCCESS) {
+      entry.m_lpszIdentifier = _tcsdup(szValue);
+   } else {
+#if defined(_DEBUG)
+      _tcscpy(m_szLastOperation, _T("Reading value "));
+      PrintLastError(_T("Identifier"));
+#endif
+   }
+
+   dwSize = sizeof(szValue);
+
+   m_lLastError = RegQueryValueEx(  hKey, 
+                                    _T("DeviceName"), 
+                                    NULL, 
+                                    &dwType, 
+                                    (LPBYTE)&szValue[0], 
+                                    &dwSize);
+
+   if (m_lLastError == ERROR_SUCCESS) {
+      entry.m_lpszDeviceName = _tcsdup(szValue);
+   } else {
+#if defined(_DEBUG)
+      _tcscpy(m_szLastOperation, _T("Reading value "));
+      PrintLastError(_T("DeviceName"));
+#endif
+   }
+
+   dwSize = sizeof(szValue);
+
+   m_lLastError = RegQueryValueEx(  hKey, 
+                                    _T("Type"), 
+                                    NULL, 
+                                    &dwType, 
+                                    (LPBYTE)&szValue[0], 
+                                    &dwSize);
+
+   if (m_lLastError == ERROR_SUCCESS) {
+      if (_tcscmp(_T("CdRomPeripheral"), szValue) == 0) {
+         entry.m_eDeviceType = CScsiDeviceListEntry::CDRom;
+      } else if (_tcscmp(_T("DiskPeripheral"), szValue) == 0) {
+         entry.m_eDeviceType = CScsiDeviceListEntry::Disk;
+      } else if (_tcscmp(_T("MediumChangerPeripheral"), szValue) == 0) {
+         entry.m_eDeviceType = CScsiDeviceListEntry::Changer;
+      } else if (_tcscmp(_T("TapePeripheral"), szValue) == 0) {
+         entry.m_eDeviceType = CScsiDeviceListEntry::Tape;
+      }
+   } else {
+#if defined(_DEBUG)
+      _tcscpy(m_szLastOperation, _T("Reading value "));
+      PrintLastError(_T("Type"));
+#endif
+   }
+
+   entry.m_dwDeviceId = dwDeviceId;
+
+   return true;
+}
+
+void
+CScsiDeviceList::PrintLastError(LPTSTR lpszName)
+{
+   LPTSTR   lpszMessage = NULL;
+
+   _fputts(_T("Error: "), stderr);
+   _fputts(m_szLastOperation, stderr);
+   _fputtc(_T('"'), stderr);
+   _fputts(lpszName != NULL ? lpszName : m_szLastKey, stderr);
+   _fputts(_T("\" - "), stderr);
+
+   FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER, 
+                  NULL, m_lLastError, 0, (LPTSTR)&lpszMessage, 0, NULL);
+
+   if (lpszMessage != NULL) {
+      _fputts(lpszMessage, stderr);
+      LocalFree(lpszMessage);
+   }
+}
diff --git a/bacula/src/win32/tools/ScsiDeviceList.h b/bacula/src/win32/tools/ScsiDeviceList.h
new file mode 100644 (file)
index 0000000..d4cb877
--- /dev/null
@@ -0,0 +1,158 @@
+/*
+ * ScsiDeviceList.cpp - Class which provides information on installed devices.
+ *
+ * Author: Robert Nelson, August, 2006 <robertn@the-nelsons.org>
+ *
+ * Version $Id$
+ *
+ * Copyright (C) 2006 Kern Sibbald
+ *
+ * This file was contributed to the Bacula project by Robert Nelson.
+ *
+ * Robert Nelson has been granted a perpetual, worldwide,
+ * non-exclusive, no-charge, royalty-free, irrevocable copyright
+ * license to reproduce, prepare derivative works of, publicly
+ * display, publicly perform, sublicense, and distribute the original
+ * work contributed by Robert Nelson to the Bacula project in source 
+ * or object form.
+ *
+ * If you wish to license contributions from Robert Nelson
+ * under an alternate open source license please contact
+ * Robert Nelson <robertn@the-nelsons.org>.
+ */
+/*
+   Copyright (C) 2006 Kern Sibbald
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License
+   version 2 as amended with additional clauses defined in the
+   file LICENSE in the main source directory.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
+   the file LICENSE for additional details.
+
+ */
+
+#pragma once
+#include "vector"
+
+class CScsiDeviceListEntry
+{
+   friend class CScsiDeviceList;
+
+   static LPCTSTR    c_DeviceTypes[];
+   static const int  c_MaxDevicePathLength = 16;      // :255:255:255:255
+
+public:
+   enum DeviceType { Unknown, CDRom, Changer, Disk, Tape };
+
+   CScsiDeviceListEntry(void);
+   CScsiDeviceListEntry(const CScsiDeviceListEntry &other);
+   ~CScsiDeviceListEntry(void);
+
+   inline CScsiDeviceListEntry &operator =(const CScsiDeviceListEntry &other);
+
+   inline DeviceType GetType() { return m_eDeviceType; }
+   inline LPCTSTR    GetTypeName() { return c_DeviceTypes[m_eDeviceType]; }
+   inline LPCTSTR    GetIdentifier() { return m_lpszIdentifier != NULL ? m_lpszIdentifier : _T(""); }
+   inline LPCTSTR    GetDeviceName() { return m_lpszDeviceName != NULL ? m_lpszDeviceName : _T(""); }
+   inline LPCTSTR    GetDevicePath();
+
+private:
+   DeviceType  m_eDeviceType;
+   LPTSTR      m_lpszIdentifier;
+   LPTSTR      m_lpszDeviceName;
+   DWORD       m_dwDeviceId;
+   TCHAR       m_szDevicePath[c_MaxDevicePathLength + 1];
+};
+
+CScsiDeviceListEntry &
+CScsiDeviceListEntry::operator =(const CScsiDeviceListEntry &other)
+{
+   m_eDeviceType = other.m_eDeviceType;
+
+   if (m_lpszIdentifier != NULL)
+   {
+      free(m_lpszIdentifier);
+   }
+   m_lpszIdentifier = other.m_lpszIdentifier != NULL ? _tcsdup(other.m_lpszIdentifier) : NULL;
+
+   if (m_lpszDeviceName != NULL)
+   {
+      free(m_lpszDeviceName);
+   }
+   m_lpszDeviceName = other.m_lpszDeviceName != NULL ? _tcsdup(other.m_lpszDeviceName) : NULL;
+
+   m_dwDeviceId = other.m_dwDeviceId;
+   _tcscpy(m_szDevicePath, other.m_szDevicePath);
+
+   return *this;
+}
+
+LPCTSTR
+CScsiDeviceListEntry::GetDevicePath()
+{
+   if (m_szDevicePath[0] == _T('\0'))
+   {
+      _sntprintf( m_szDevicePath, c_MaxDevicePathLength, 
+                  _T("%d:%d:%d:%d"), 
+                  (m_dwDeviceId >> 24) & 0xFF,
+                  (m_dwDeviceId >> 16) & 0xFF,
+                  (m_dwDeviceId >>  8) & 0xFF,
+                  m_dwDeviceId        & 0xFF);
+      m_szDevicePath[c_MaxDevicePathLength] = _T('\0');
+   }
+
+   return m_szDevicePath;
+}
+
+class CScsiDeviceList :
+   public std::vector<CScsiDeviceListEntry>
+{
+   static TCHAR         c_ScsiPath[];
+   static LPCTSTR       c_lpszFormatList[];
+
+// \\Scsi\\Scsi Port 255\\Scsi Bus 255\\Target Id 255\\Logical Unit Id 255
+// 1 4   1 13           1 12          1 13           1 19 = 66
+   static const int     c_MaxKeyPathLength = 66;
+
+// Logical Unit Id 255
+   static const int     c_MaxSubkeyLength = 19;
+
+// Identifier = 28, DeviceName = 10+, Type = 23
+   static const int     c_MaxValueLength = 30;
+
+// Adapter \\ Bus \\ Target \\ LUN
+   static const int     c_MaxKeyDepth = 4;
+
+public:
+   inline   CScsiDeviceList(void);
+   inline   ~CScsiDeviceList(void);
+
+   bool     Populate();
+   void     PrintLastError(LPTSTR lpszName = NULL);
+
+protected:
+   bool     ProcessKey(HKEY hKey, int iLevel, DWORD dwDeviceId);
+   bool     ProcessValues(HKEY hKey, DWORD dwDeviceId);
+
+private:
+   TCHAR    m_szLastOperation[80 + 1]; // Max length "Enumerating subkeys of "
+   TCHAR    m_szLastKey[c_MaxKeyPathLength + 1];
+   DWORD    m_dwLastKeyLength;
+   LONG     m_lLastError;
+};
+
+CScsiDeviceList::CScsiDeviceList(void)
+{
+   m_szLastOperation[0] = _T('\0');
+   m_szLastKey[0] = _T('\0');
+   m_dwLastKeyLength = 0;
+   m_lLastError = 0;
+}
+
+CScsiDeviceList::~CScsiDeviceList(void)
+{
+}
diff --git a/bacula/src/win32/tools/dbcheck/dbcheck.vcproj b/bacula/src/win32/tools/dbcheck/dbcheck.vcproj
new file mode 100644 (file)
index 0000000..cbf0233
--- /dev/null
@@ -0,0 +1,284 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="8.00"
+       Name="dbcheck"
+       ProjectGUID="{85696E20-777A-41F6-BC00-2E7AB375B171}"
+       RootNamespace="dbcheck"
+       Keyword="Win32Proj"
+       >
+       <Platforms>
+               <Platform
+                       Name="Win32"
+               />
+       </Platforms>
+       <ToolFiles>
+       </ToolFiles>
+       <Configurations>
+               <Configuration
+                       Name="Debug|Win32"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="1"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+                               AdditionalIncludeDirectories="../../compat;../../..;../../stored;&quot;../../../../../depkgs-msvc/include&quot;"
+                               PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_WIN32;USING_DLL;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"
+                               MinimalRebuild="true"
+                               BasicRuntimeChecks="3"
+                               RuntimeLibrary="3"
+                               UsePrecompiledHeader="0"
+                               BrowseInformation="1"
+                               WarningLevel="3"
+                               Detect64BitPortabilityProblems="false"
+                               DebugInformationFormat="4"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="bacula_cats.lib"
+                               LinkIncremental="2"
+                               AdditionalLibraryDirectories="..\..\debug"
+                               GenerateDebugInformation="true"
+                               SubSystem="1"
+                               TargetMachine="1"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Release|Win32"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="1"
+                       CharacterSet="2"
+                       WholeProgramOptimization="1"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               AdditionalIncludeDirectories="../../compat;../../..;../../stored;&quot;../../../../../depkgs-msvc/include&quot;"
+                               PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+                               RuntimeLibrary="2"
+                               UsePrecompiledHeader="0"
+                               BrowseInformation="1"
+                               WarningLevel="3"
+                               Detect64BitPortabilityProblems="false"
+                               DebugInformationFormat="3"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="bacula_cats.lib"
+                               LinkIncremental="1"
+                               GenerateDebugInformation="true"
+                               SubSystem="1"
+                               OptimizeReferences="2"
+                               EnableCOMDATFolding="2"
+                               TargetMachine="1"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+       </Configurations>
+       <References>
+       </References>
+       <Files>
+               <Filter
+                       Name="Source Files"
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+                       >
+                       <File
+                               RelativePath="..\..\..\tools\dbcheck.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\..\..\dird\dird_conf.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\..\..\dird\inc_conf.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\..\..\dird\run_conf.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="2"
+                                       />
+                               </FileConfiguration>
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Header Files"
+                       Filter="h;hpp;hxx;hm;inl;inc;xsd"
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+                       >
+                       <File
+                               RelativePath="..\..\..\dird\dird_conf.h"
+                               >
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Resource Files"
+                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+                       >
+               </Filter>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>
diff --git a/bacula/src/win32/tools/scsilist.cpp b/bacula/src/win32/tools/scsilist.cpp
new file mode 100644 (file)
index 0000000..9640256
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+ * scsilist.cpp - Outputs the contents of a ScsiDeviceList.
+ *
+ * Author: Robert Nelson, August, 2006 <robertn@the-nelsons.org>
+ *
+ * Version $Id$
+ *
+ * Copyright (C) 2006 Kern Sibbald
+ *
+ * This file was contributed to the Bacula project by Robert Nelson.
+ *
+ * Robert Nelson has been granted a perpetual, worldwide,
+ * non-exclusive, no-charge, royalty-free, irrevocable copyright
+ * license to reproduce, prepare derivative works of, publicly
+ * display, publicly perform, sublicense, and distribute the original
+ * work contributed by Robert Nelson to the Bacula project in source 
+ * or object form.
+ *
+ * If you wish to license contributions from Robert Nelson
+ * under an alternate open source license please contact
+ * Robert Nelson <robertn@the-nelsons.org>.
+ */
+/*
+   Copyright (C) 2006 Kern Sibbald
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License
+   version 2 as amended with additional clauses defined in the
+   file LICENSE in the main source directory.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
+   the file LICENSE for additional details.
+
+ */
+
+#if defined(_MSC_VER) && defined(_DEBUG)
+#include <afx.h>
+#else
+#include <windows.h>
+#endif
+
+#include <stdio.h>
+#include <tchar.h>
+
+#include "ScsiDeviceList.h"
+
+#if defined(_MSC_VER) && defined(_DEBUG)
+#define  new   DEBUG_NEW
+#endif
+
+int _tmain(int /* argc */, _TCHAR* /* argv */[])
+{
+#if defined(_MSC_VER) && defined(_DEBUG)
+   CMemoryState InitialMemState, FinalMemState, DiffMemState;
+
+   InitialMemState.Checkpoint();
+
+   {
+#endif
+
+   CScsiDeviceList   DeviceList;
+
+   if (!DeviceList.Populate())
+   {
+      DeviceList.PrintLastError();
+      return 1;
+   }
+
+#define  HEADING \
+   _T("Device                        Type     Physical     Name\n") \
+   _T("======                        ====     ========     ====\n")
+
+   _fputts(HEADING, stdout);
+
+   for (DWORD index = 0; index < DeviceList.size(); index++) {
+
+      CScsiDeviceListEntry &entry = DeviceList[index];
+
+      if (entry.GetType() != CScsiDeviceListEntry::Disk) {
+
+         _tprintf(_T("%-28s  %-7s  %-11s  %-27s\n"), 
+                  entry.GetIdentifier(),
+                  entry.GetTypeName(),
+                  entry.GetDevicePath(),
+                  entry.GetDeviceName());
+      }
+   }
+
+#if defined(_MSC_VER) && defined(_DEBUG)
+   }
+
+   InitialMemState.DumpAllObjectsSince();
+
+   FinalMemState.Checkpoint();
+   DiffMemState.Difference(InitialMemState, FinalMemState);
+   DiffMemState.DumpStatistics();
+#endif
+
+   return 0;
+}
diff --git a/bacula/src/win32/tools/scsilist/scsilist.vcproj b/bacula/src/win32/tools/scsilist/scsilist.vcproj
new file mode 100644 (file)
index 0000000..29a995b
--- /dev/null
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="8.00"
+       Name="scsilist"
+       ProjectGUID="{56D8C233-610E-4EE4-A73A-72CEF1C6A33A}"
+       RootNamespace="scsilist"
+       Keyword="Win32Proj"
+       >
+       <Platforms>
+               <Platform
+                       Name="Win32"
+               />
+       </Platforms>
+       <ToolFiles>
+       </ToolFiles>
+       <Configurations>
+               <Configuration
+                       Name="Debug|Win32"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="1"
+                       UseOfMFC="1"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+                               PreprocessorDefinitions="WIN32;WINVER=0x0400;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
+                               MinimalRebuild="true"
+                               BasicRuntimeChecks="3"
+                               RuntimeLibrary="1"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="4"
+                               Detect64BitPortabilityProblems="true"
+                               DebugInformationFormat="4"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               LinkIncremental="2"
+                               GenerateDebugInformation="true"
+                               SubSystem="1"
+                               TargetMachine="1"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Release|Win32"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="1"
+                       UseOfMFC="1"
+                       CharacterSet="2"
+                       WholeProgramOptimization="1"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               PreprocessorDefinitions="WIN32;WINVER=0x0400;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
+                               RuntimeLibrary="0"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="4"
+                               Detect64BitPortabilityProblems="true"
+                               DebugInformationFormat="3"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               LinkIncremental="1"
+                               GenerateDebugInformation="true"
+                               SubSystem="1"
+                               OptimizeReferences="2"
+                               EnableCOMDATFolding="2"
+                               TargetMachine="1"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+       </Configurations>
+       <References>
+       </References>
+       <Files>
+               <Filter
+                       Name="Source Files"
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+                       >
+                       <File
+                               RelativePath="..\ScsiDeviceList.cpp"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\scsilist.cpp"
+                               >
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Header Files"
+                       Filter="h;hpp;hxx;hm;inl;inc;xsd"
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+                       >
+                       <File
+                               RelativePath="..\ScsiDeviceList.h"
+                               >
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Resource Files"
+                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+                       >
+               </Filter>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>
diff --git a/bacula/src/win32/wx-console/wx-console.conf.in b/bacula/src/win32/wx-console/wx-console.conf.in
deleted file mode 100644 (file)
index 010797b..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Bacula User Agent (or Console) Configuration File
-#
-
-Director {
-  Name = @hostname@-dir
-  DIRport = @dir_port@
-  address = @hostname@
-  Password = "@dir_password@"
-}
index 0e3963c410bab61f370d6b8358deff1b68ed5c3f..8165410838a431a145a876d4331ec2f89632bc34 100644 (file)
@@ -40,8 +40,8 @@
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="../..;../compat;&quot;../../../../depkgs-win32/wx/include/msvc&quot;;&quot;../../../../depkgs-win32/wx/include&quot;;&quot;../../../../depkgs-win32/pthreads&quot;;&quot;../../../../depkgs-win32/zlib&quot;;&quot;../../../../depkgs-win32/gettext/include&quot;"\r
-                               PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;wxUSE_GUI;__WXDEBUG__;_CONSOLE;HAVE_WIN32;HAVE_WXCONSOLE;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"\r
+                               AdditionalIncludeDirectories="../compat;&quot;../../../../depkgs-msvc/include&quot;;../..;&quot;../../../../depkgs-msvc\lib\wx_dll\msw&quot;"\r
+                               PreprocessorDefinitions="WIN32;_WINDOWS;wxUSE_GUI;WXUSINGDLL;__WXMSW__;_CONSOLE;HAVE_WIN32;HAVE_WXCONSOLE;USING_DLL;_STAT_H;_STAT_DEFINED;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"\r
                                MinimalRebuild="true"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="3"\r
@@ -61,9 +61,9 @@
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalDependencies="pthreadVCEd.lib zlibd.lib wsock32.lib comctl32.lib rpcrt4.lib atlsd.lib"\r
+                               AdditionalDependencies="wxmsw27_core.lib wxbase27.lib pthreadVCE.lib zlib.lib wsock32.lib comctl32.lib rpcrt4.lib atlsd.lib"\r
                                LinkIncremental="0"\r
-                               AdditionalLibraryDirectories="&quot;../../../../depkgs-win32/wx/lib/vc_lib&quot;;&quot;../../../../depkgs-win32/pthreads/debug&quot;;&quot;../../../../depkgs-win32/zlib/debug&quot;;&quot;../../../../depkgs-win32/gettext/lib&quot;"\r
+                               AdditionalLibraryDirectories="&quot;../../../../depkgs-msvc/lib&quot;;&quot;../../../../depkgs-msvc/lib/wx_dll&quot;"\r
                                GenerateDebugInformation="true"\r
                                SubSystem="2"\r
                                TargetMachine="1"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="../..;../compat;&quot;../../../../depkgs-win32/wx/include/msvc&quot;;&quot;../../../../depkgs-win32/wx/include&quot;;&quot;../../../../depkgs-win32/pthreads&quot;;&quot;../../../../depkgs-win32/zlib&quot;;&quot;../../../../depkgs-win32/gettext/include&quot;"\r
-                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;wxUSE_GUI;_CONSOLE;HAVE_WIN32;HAVE_WXCONSOLE;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"\r
+                               AdditionalIncludeDirectories="../compat;&quot;../../../../depkgs-msvc/include&quot;;../..;&quot;../../../../depkgs-msvc\lib\wx_dll\msw&quot;"\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;wxUSE_GUI;_CONSOLE;HAVE_WIN32;HAVE_WXCONSOLE;USING_DLL;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"\r
                                RuntimeLibrary="2"\r
                                UsePrecompiledHeader="0"\r
                                BrowseInformation="1"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalDependencies="pthreadVCE.lib zlib.lib wsock32.lib comctl32.lib rpcrt4.lib atls.lib"\r
+                               AdditionalDependencies="wxmsw27_core.lib wxbase27.lib pthreadVCE.lib zlib.lib wsock32.lib comctl32.lib rpcrt4.lib atls.lib"\r
                                LinkIncremental="0"\r
-                               AdditionalLibraryDirectories="&quot;../../../../depkgs-win32/wx/lib/vc_lib&quot;;&quot;../../../../depkgs-win32/pthreads/release&quot;;&quot;../../../../depkgs-win32/zlib/release&quot;;&quot;../../../../depkgs-win32/gettext/lib&quot;"\r
+                               AdditionalLibraryDirectories="&quot;../../../../depkgs-msvc/lib&quot;;&quot;../../../../depkgs-msvc/lib/wx_dll&quot;"\r
                                IgnoreDefaultLibraryNames=""\r
                                GenerateDebugInformation="true"\r
                                SubSystem="2"\r
                <Filter\r
                        Name="Header Files"\r
                        Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
                        >\r
                        <File\r
                                RelativePath="..\..\wx-console\console_conf.h"\r
                <Filter\r
                        Name="Resource Files"\r
                        Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"\r
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
                        >\r
                </Filter>\r
                <Filter\r
                        Name="Source Files"\r
                        Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
                        >\r
                        <File\r
                                RelativePath="..\..\wx-console\authenticate.c"\r
index 5c85ef7261006f307fc09ebbdbf04d10302a7634..9fb8e6107f7bf75f9d4e91a55f93bb9772ed6f39 100644 (file)
@@ -28,6 +28,8 @@
 /* _("...") macro returns a wxChar*, so if we need a char*, we need to convert it with:
  * wxString(_("...")).mb_str(*wxConvCurrent) */
 
+#undef _DEBUG
+
 #include "bacula.h"
 #include "console_conf.h"
 #include "jcr.h"
index b4b880cee43aa8247ddc839e778d163c0f164eba..d6af64e00c1822154a43f2195b5005d8a71dc625 100644 (file)
 /* _("...") macro returns a wxChar*, so if we need a char*, we need to convert it with:
  * wxString(_("...")).mb_str(*wxConvCurrent) */
 
-#include "bacula.h" 
+#undef _DEBUG
+
+#include "bacula.h"
 #include "console_conf.h"
 
 #include <wx/intl.h>
 
-
-
 /* Define the first and last resource ID record
  * types. Note, these should be unique for each
  * daemon though not a requirement.
index 97c2acc1969f0bf522e22b8d97caeaa8a2fd2810..b580b9ee0969d09455c4ac6711553e9d2c502b77 100644 (file)
@@ -26,6 +26,8 @@
 /* _("...") macro returns a wxChar*, so if we need a char*, we need to convert it with:
  * wxString(_("...")).mb_str(*wxConvCurrent) */
 
+#undef _DEBUG
+
 #include "bacula.h"
 #include "console_conf.h"
 
index e2fb8b526ab6300be9a542d971349d45a5b1dca8..90522cdddc587c628a3d870ab5962d640f3ed35e 100644 (file)
@@ -29,6 +29,8 @@
 // headers
 // ----------------------------------------------------------------------------
 
+#undef _DEBUG
+
 #include "bacula.h"
 
 #undef setlocale
index 61b0a16bc9eba5094a7469da7c38a2ab27606b23..7d1ca289d3cd0904ebe48e92e32ef52a9acfce2b 100644 (file)
@@ -21,6 +21,8 @@
 
  */
 
+#undef _DEBUG
+
 #include "bacula.h"
 #include "wxbconfigfileeditor.h"
 #include <wx/file.h>
index b378896a689e3a7869d403e3a9ef4cbd3c194c5b..46fd1d083b4d75f0530bb8843e2d3ccc9db00feb 100644 (file)
@@ -21,6 +21,8 @@
 
  */
 
+#undef _DEBUG
+
 #include "bacula.h"
 #include "wxbconfigpanel.h"
 #include <wx/arrimpl.cpp>
index e55b9c2b9be6d91096e7fea7c1fd7c922d249e43..f809fe88958d853923b2e5e0c34f9fcd1538a93e 100644 (file)
@@ -21,6 +21,8 @@
 
  */
 
+#undef _DEBUG
+
 #include "bacula.h"
 #include "wxbhistorytextctrl.h"
 
index ddfd79b6ba2421fdb6e44951e794932569deaee0..99ea98ade4f076db971e450488eb2f379c547820 100644 (file)
@@ -22,6 +22,8 @@
 
  */
 
+#undef _DEBUG
+
 #include "bacula.h"
 
 #include "wxblistctrl.h"
index e33f8a42e5779c97cf01f415f866d94d9cba5220..493eb2ee2e43e26ee41cc059dfc484ea2f543cd2 100644 (file)
@@ -21,6 +21,8 @@
 
  */
 
+#undef _DEBUG
+
 #include "bacula.h"
 
 #include "wxbmainframe.h" // class's header file
index cbbf55894bc18c26f7ce3beadea6cfac9635d3f5..6819ab895fe19e15ab9f1671ba03f2ccc7679284 100644 (file)
@@ -49,6 +49,8 @@ Parameters to modify:
 Select parameter to modify (1-11):
        */
 
+#undef _DEBUG
+
 #include "bacula.h"
 #include "wxbrestorepanel.h"
 #include "wxbmainframe.h"
index 622b17032050eea48ffa4a8c20aab2e3ebe6cd42..b0e0f52d821e986eb99afbaf116a68863437a047 100644 (file)
@@ -28,6 +28,8 @@
 
  */
 
+#undef _DEBUG
+
 #include "bacula.h"
 
 #include "wxbtableparser.h" // class's header file
index b972e9e1ae750eb7c3ff70c7e1096cc46d603140..1b6feca72d3169d4da24baf3a920cd970d0d257d 100644 (file)
@@ -22,6 +22,8 @@
 
 */
 
+#undef _DEBUG
+
 #include "bacula.h"
 
 #include "wxbtreectrl.h"
index dbcd3b61cda91387a1fee9159a1b2922619db8ab..31330c9e4527cb9a44b36be6f92bbabc82f72bab 100644 (file)
@@ -21,6 +21,8 @@
 
  */
 
+#undef _DEBUG
+
 #include "bacula.h"
 
 #include "wxbutils.h"