]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix path issues.
authorRobert Nelson <robertn@the-nelsons.org>
Fri, 1 Dec 2006 08:45:40 +0000 (08:45 +0000)
committerRobert Nelson <robertn@the-nelsons.org>
Fri, 1 Dec 2006 08:45:40 +0000 (08:45 +0000)
Fix SQLite3 build error.

Don't enable unnecessary privileges, its a security problem.

Fix bextract and bscan on Windows.

Fix comment typos.

Fix copyright changes in the tray-monitor so it builds.

Add SQLite3 support to the Windows build.

Remove bdb support from Windows version.

Reworked the installer to facilitate the regression tests.

Improved the database support in the installer.

Automatically detect installed database and program paths.

Start external programs minimized so they don't bother the user.

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

60 files changed:
bacula/src/baconfig.h
bacula/src/cats/sqlite.c
bacula/src/findlib/enable_priv.c
bacula/src/lib/tree.c
bacula/src/stored/bextract.c
bacula/src/stored/bscan.c
bacula/src/stored/read_record.c
bacula/src/tray-monitor/eggmarshalers.c
bacula/src/tray-monitor/eggmarshalers.h
bacula/src/tray-monitor/tray-monitor.c
bacula/src/win32/External-msvc
bacula/src/win32/bacula.sln
bacula/src/win32/build-depkgs-msvc.cmd
bacula/src/win32/build.bat [deleted file]
bacula/src/win32/cats/Makefile
bacula/src/win32/cats/bacula_cats/bacula_cats.vcproj
bacula/src/win32/cats/cats_bdb/cats_bdb.vcproj [deleted file]
bacula/src/win32/cats/cats_mysql/cats_mysql.vcproj
bacula/src/win32/cats/cats_pgsql/cats_pgsql.vcproj
bacula/src/win32/cats/cats_sqlite/cats_sqlite.vcproj [new file with mode: 0644]
bacula/src/win32/cats/create_bdb_database.cmd [deleted file]
bacula/src/win32/cats/create_mysql_database.cmd
bacula/src/win32/cats/create_postgresql_database.cmd
bacula/src/win32/cats/delete_catalog_backup.cmd
bacula/src/win32/cats/drop_bdb_database.cmd [deleted file]
bacula/src/win32/cats/drop_bdb_tables.cmd [deleted file]
bacula/src/win32/cats/drop_mysql_database.cmd
bacula/src/win32/cats/drop_mysql_tables.cmd
bacula/src/win32/cats/drop_postgresql_database.cmd
bacula/src/win32/cats/drop_postgresql_tables.cmd
bacula/src/win32/cats/fix_postgresql_tables [deleted file]
bacula/src/win32/cats/fix_postgresql_tables.cmd [deleted file]
bacula/src/win32/cats/fix_postgresql_tables.sql [deleted file]
bacula/src/win32/cats/grant_mysql_privileges.cmd
bacula/src/win32/cats/grant_postgresql_privileges.cmd
bacula/src/win32/cats/make_bdb_tables.cmd [deleted file]
bacula/src/win32/cats/make_catalog_backup.cmd [deleted file]
bacula/src/win32/cats/make_mysql_tables.cmd
bacula/src/win32/cats/make_postgresql_tables.cmd
bacula/src/win32/cats/update_bdb_tables.cmd [deleted file]
bacula/src/win32/cats/update_mysql_tables.cmd [deleted file]
bacula/src/win32/cats/update_mysql_tables.sql [deleted file]
bacula/src/win32/cats/update_postgresql_tables.cmd [deleted file]
bacula/src/win32/cats/update_postgresql_tables.sql [deleted file]
bacula/src/win32/compat/compat.cpp
bacula/src/win32/dird/dird.vcproj
bacula/src/win32/filed/baculafd.vcproj
bacula/src/win32/filed/winmain.cpp
bacula/src/win32/installer/ConfigPage2.nsh
bacula/src/win32/installer/InstallType.nsh
bacula/src/win32/installer/Makefile
bacula/src/win32/installer/bacula-dir.conf.in
bacula/src/win32/installer/bacula-sd.conf.in
bacula/src/win32/installer/build-installer.cmd
bacula/src/win32/installer/winbacula.nsi
bacula/src/win32/libbac/libbac.vcproj
bacula/src/win32/libbac/msvc/bacula.def
bacula/src/win32/scripts/mtx-changer.cmd
bacula/src/win32/stored/baculasd/baculasd.vcproj
bacula/src/win32/stored/bextract/bextract.vcproj

index d1c533fe0a2f9e20c2bf68f7c9af2b42e7aa2975..67f88f498f6c5c5ccdfad23ce6d5ef2a071392a9 100644 (file)
@@ -618,8 +618,8 @@ extern "C" int mknod ( const char *path, int mode, dev_t device );
 #define DEFAULT_CONFIGDIR "C:\\Documents and Settings\\All Users\\Application Data\\Bacula"
 
 inline bool IsPathSeparator(int ch) { return ch == '/' || ch == '\\'; }
-inline char *first_path_separator(char *path) { return strpbrk(path, ":/\\"); }
-inline const char *first_path_separator(const char *path) { return strpbrk(path, ":/\\"); }
+inline char *first_path_separator(char *path) { return strpbrk(path, "/\\"); }
+inline const char *first_path_separator(const char *path) { return strpbrk(path, "/\\"); }
 
 #else
 /* Define Winsock functions if we aren't on Windows */
index 838ad5d2436a431c1a7365177004915f3d051838..9fd557174fc9c0894cfe9480eab08d5668414e3b 100644 (file)
@@ -353,7 +353,11 @@ int my_sqlite_query(B_DB *mdb, const char *cmd)
    int stat;
 
    if (mdb->sqlite_errmsg) {
+#ifdef HAVE_SQLITE3
+      sqlite3_free(mdb->sqlite_errmsg);
+#else
       actuallyfree(mdb->sqlite_errmsg);
+#endif
       mdb->sqlite_errmsg = NULL;
    }
    stat = sqlite_get_table(mdb->db, (char *)cmd, &mdb->result, &mdb->nrow, &mdb->ncolumn,
index f7cc045a89ff325f7a3df539e663ce919c306f39..ff6623f70a1570ba48d6c283bb6439d9d58368c0 100755 (executable)
@@ -124,15 +124,16 @@ int enable_backup_privileges(JCR *jcr, int ignore_errors)
     }
 
     /* Return a bit map of permissions set. */
-    if (enable_priv(jcr, hToken, SE_SECURITY_NAME, ignore_errors)) {
-       stat |= 1<<0;
-    }
     if (enable_priv(jcr, hToken, SE_BACKUP_NAME, ignore_errors)) {
        stat |= 1<<1;
     }
     if (enable_priv(jcr, hToken, SE_RESTORE_NAME, ignore_errors)) {
        stat |= 1<<2;
     }
+#if 0
+    if (enable_priv(jcr, hToken, SE_SECURITY_NAME, ignore_errors)) {
+       stat |= 1<<0;
+    }
     if (enable_priv(jcr, hToken, SE_TAKE_OWNERSHIP_NAME, ignore_errors)) {
        stat |= 1<<3;
     }
@@ -154,6 +155,7 @@ int enable_backup_privileges(JCR *jcr, int ignore_errors)
     if (enable_priv(jcr, hToken, SE_CREATE_PERMANENT_NAME, ignore_errors)) {
        stat |= 1<<10;
     }
+#endif
     if (stat) {
        stat |= 1<<9;
     }
index 0d8f24db8c155fa51b6bb543b8058eb73196adea..708e524c53b88fe149bee937122354d6117b527f 100755 (executable)
@@ -352,11 +352,11 @@ int tree_getpath(TREE_NODE *node, char *buf, int buf_size)
  */
 TREE_NODE *tree_cwd(char *path, TREE_ROOT *root, TREE_NODE *node)
 {
-   if (strcmp(path, ".") == 0) {
+   if (path[0] == '.' && path[1] == '\0') {
       return node;
    }
    /* Handle relative path */
-   if (strncmp(path, "..", 2) == 0 && (path[2] == '/' || path[2] == 0)) {
+   if (path[0] == '.' && path[1] == '.' && (IsPathSeparator(path[2]) || path[2] == '\0')) {
       TREE_NODE *parent = node->parent ? node->parent : node;
       if (path[2] == 0) { 
          return parent;
index 06566e7327a902f14d7a6cf056421da05c0a60e4..051be3d1ab3badad5f03e243a7a725bc78dda92f 100644 (file)
@@ -220,6 +220,9 @@ int main (int argc, char *argv[])
 static void do_extract(char *devname)
 {
    struct stat statp;
+
+   enable_backup_privileges(NULL, 1);
+
    jcr = setup_jcr("bextract", devname, bsr, VolumeName, 1); /* acquire for read */
    if (!jcr) {
       exit(1);
index 904ddacaa965f7cfa0ecbdfb7d54685706e2ace6..f3f0270a89a5fbd4796a0de439569c434d00375d 100644 (file)
@@ -147,6 +147,7 @@ int main (int argc, char *argv[])
    my_name_is(argc, argv, "bscan");
    init_msg(NULL, NULL);
 
+   OSDependentInit();
 
    while ((ch = getopt(argc, argv, "b:c:d:h:mn:pP:rsSu:vV:w:?")) != -1) {
       switch (ch) {
index 8f43ec09ef76eeb9f15663679de576d5ae129463..ae512567e6ac686b0e2d01ca48ca9ec6586322ce 100644 (file)
@@ -275,7 +275,7 @@ bool read_records(DCR *dcr,
          /*
           * If we have a digest stream, we check to see if we have 
           *  finished the current bsr, and if so, repositioning will
-          *  be truned on.
+          *  be turned on.
           */
          if (crypto_digest_stream_type(rec->Stream) != CRYPTO_DIGEST_NONE) {
             Dmsg3(dbglvl, "Have digest FI=%u before bsr check pos %u:%u\n", rec->FileIndex,
index e886831412cae613c27f29e2f066650c80d22e0e..b568bed1388bc9a171affade7993e845cc0429e2 100644 (file)
@@ -28,7 +28,7 @@
 
 extern "C" {
 
-#include        <glib-object.h>
+#include <glib-object.h>
 
 
 #ifdef G_ENABLE_DEBUG
index d69553d4e351c162573706bbe145de7ec4b38a23..0a9db05664f8c508e95fa878375639f4658b52c5 100644 (file)
@@ -31,7 +31,7 @@
 #ifndef ___egg_marshal_MARSHAL_H__
 #define ___egg_marshal_MARSHAL_H__
 
-#include        <glib-object.h>
+#include <glib-object.h>
 
 G_BEGIN_DECLS
 
index 492b1c401e21abaec0536e6c3ef35f066cbc800a..0baf511675280e2bb2497be4a537b1ba3c77a258 100644 (file)
@@ -504,23 +504,25 @@ static void MonitorAbout(GtkWidget *widget, gpointer data) {
 #if HAVE_GTK_2_4
    GtkWidget* about = gtk_message_dialog_new_with_markup(GTK_WINDOW(window),GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE,
       "<span size='x-large' weight='bold'>%s</span>\n\n"
+      PROG_COPYRIGHT
       "%s"
       "\n<small>%s: %s (%s) %s %s %s</small>",
       _("Bacula Tray Monitor"),
-      PROG_COPYRIGHT
-        "Written by Nicolas Boichat\n"),
-      _("Version:"),
-      VERSION, BDATE, HOST_OS, DISTNAME, DISTVER, 2004);
+        2004,
+      _("Written by Nicolas Boichat\n"),
+      _("Version"),
+      VERSION, BDATE, HOST_OS, DISTNAME, DISTVER);
 #else
    GtkWidget* about = gtk_message_dialog_new(GTK_WINDOW(window),GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE,   
       "%s\n\n"
+      PROG_COPYRIGHT
       "%s"
-      "\n%s %s (%s) %s %s %s",
+      "\n%s: %s (%s) %s %s %s",
       _("Bacula Tray Monitor"),
-      PROG_COPYRIGHT
-        "Written by Nicolas Boichat\n"),
-      _("Version:"),
-      BYEAR, VERSION, BDATE, HOST_OS, DISTNAME, 2004);
+        2004,
+      _("Written by Nicolas Boichat\n"),
+      _("Version"),
+      VERSION, BDATE, HOST_OS, DISTNAME, DISTVER);
 #endif
    gtk_dialog_run(GTK_DIALOG(about));
    gtk_widget_destroy(about);
index 62702a82fb41bb58ab33881bd23d45d8af2057e5..f64d2d14d53ff8f1d8364916dada6339ee721e7d 100644 (file)
@@ -31,3 +31,4 @@ NSIS_BIN|http://superb-west.dl.sourceforge.net/sourceforge/nsis/nsis-2.17.zip
 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
+SQLITE|http://www.sqlite.org/sqlite-3.3.8.tar.gz
index cc768f2ed9bf9df28ef256849c73cd2aa506212f..a34993378b373cce764912f03b4682168bf0876b 100644 (file)
@@ -41,14 +41,9 @@ EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{825DFFD0-4747-43CA-8326-529655E31935}"
        ProjectSection(SolutionItems) = preProject
                build-depkgs-mingw32 = build-depkgs-mingw32
-               build-depkgs-msvc.cmd = build-depkgs-msvc.cmd
                build-msvc.cmd = build-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
                README.mingw32 = README.mingw32
                README.vc8 = README.vc8
                README.win32 = README.win32
@@ -154,11 +149,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cats_pgsql", "cats\cats_pgs
 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}
@@ -167,6 +157,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "installer", "installer\inst
                {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}
+               {23BFE838-5682-4F39-969F-0B40366D4D98} = {23BFE838-5682-4F39-969F-0B40366D4D98}
                {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}
@@ -178,7 +169,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "installer", "installer\inst
                {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}
@@ -195,283 +185,185 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bsmtp", "tools\bsmtp\bsmtp.
                {2D729599-C008-4154-BCCB-53E6A260F220} = {2D729599-C008-4154-BCCB-53E6A260F220}
        EndProjectSection
 EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Scripts", "Scripts", "{40CADEE4-8D53-4157-AA36-B256F4934FC3}"
+       ProjectSection(SolutionItems) = preProject
+               scripts\disk-changer.cmd = scripts\disk-changer.cmd
+               scripts\mtx-changer.cmd = scripts\mtx-changer.cmd
+       EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cats_sqlite", "cats\cats_sqlite\cats_sqlite.vcproj", "{23BFE838-5682-4F39-969F-0B40366D4D98}"
+       ProjectSection(ProjectDependencies) = postProject
+               {2D729599-C008-4154-BCCB-53E6A260F220} = {2D729599-C008-4154-BCCB-53E6A260F220}
+       EndProjectSection
+EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|Any CPU = Debug|Any CPU
-               Debug|Mixed Platforms = Debug|Mixed Platforms
                Debug|Win32 = Debug|Win32
                Release|Any CPU = Release|Any CPU
-               Release|Mixed Platforms = Release|Mixed Platforms
                Release|Win32 = Release|Win32
        EndGlobalSection
        GlobalSection(ProjectConfigurationPlatforms) = postSolution
                {9BA8E10D-0D82-4B25-8543-DE34641FBC10}.Debug|Any CPU.ActiveCfg = Debug|Win32
-               {9BA8E10D-0D82-4B25-8543-DE34641FBC10}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-               {9BA8E10D-0D82-4B25-8543-DE34641FBC10}.Debug|Mixed Platforms.Build.0 = Debug|Win32
                {9BA8E10D-0D82-4B25-8543-DE34641FBC10}.Debug|Win32.ActiveCfg = Debug|Win32
                {9BA8E10D-0D82-4B25-8543-DE34641FBC10}.Debug|Win32.Build.0 = Debug|Win32
                {9BA8E10D-0D82-4B25-8543-DE34641FBC10}.Release|Any CPU.ActiveCfg = Release|Win32
-               {9BA8E10D-0D82-4B25-8543-DE34641FBC10}.Release|Mixed Platforms.ActiveCfg = Debug|Win32
-               {9BA8E10D-0D82-4B25-8543-DE34641FBC10}.Release|Mixed Platforms.Build.0 = Debug|Win32
                {9BA8E10D-0D82-4B25-8543-DE34641FBC10}.Release|Win32.ActiveCfg = Release|Win32
                {9BA8E10D-0D82-4B25-8543-DE34641FBC10}.Release|Win32.Build.0 = Release|Win32
                {A0F65E06-9F18-40AC-81F6-A080852F1104}.Debug|Any CPU.ActiveCfg = Debug|Win32
-               {A0F65E06-9F18-40AC-81F6-A080852F1104}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-               {A0F65E06-9F18-40AC-81F6-A080852F1104}.Debug|Mixed Platforms.Build.0 = Debug|Win32
                {A0F65E06-9F18-40AC-81F6-A080852F1104}.Debug|Win32.ActiveCfg = Debug|Win32
                {A0F65E06-9F18-40AC-81F6-A080852F1104}.Debug|Win32.Build.0 = Debug|Win32
                {A0F65E06-9F18-40AC-81F6-A080852F1104}.Release|Any CPU.ActiveCfg = Release|Win32
-               {A0F65E06-9F18-40AC-81F6-A080852F1104}.Release|Mixed Platforms.ActiveCfg = Debug|Win32
-               {A0F65E06-9F18-40AC-81F6-A080852F1104}.Release|Mixed Platforms.Build.0 = Debug|Win32
                {A0F65E06-9F18-40AC-81F6-A080852F1104}.Release|Win32.ActiveCfg = Release|Win32
                {A0F65E06-9F18-40AC-81F6-A080852F1104}.Release|Win32.Build.0 = Release|Win32
                {AAF33ADD-A4F9-4BCA-B7F9-0C35C843CC7E}.Debug|Any CPU.ActiveCfg = Debug|Win32
-               {AAF33ADD-A4F9-4BCA-B7F9-0C35C843CC7E}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-               {AAF33ADD-A4F9-4BCA-B7F9-0C35C843CC7E}.Debug|Mixed Platforms.Build.0 = Debug|Win32
                {AAF33ADD-A4F9-4BCA-B7F9-0C35C843CC7E}.Debug|Win32.ActiveCfg = Debug|Win32
                {AAF33ADD-A4F9-4BCA-B7F9-0C35C843CC7E}.Debug|Win32.Build.0 = Debug|Win32
                {AAF33ADD-A4F9-4BCA-B7F9-0C35C843CC7E}.Release|Any CPU.ActiveCfg = Release|Win32
-               {AAF33ADD-A4F9-4BCA-B7F9-0C35C843CC7E}.Release|Mixed Platforms.ActiveCfg = Debug|Win32
-               {AAF33ADD-A4F9-4BCA-B7F9-0C35C843CC7E}.Release|Mixed Platforms.Build.0 = Debug|Win32
                {AAF33ADD-A4F9-4BCA-B7F9-0C35C843CC7E}.Release|Win32.ActiveCfg = Release|Win32
                {AAF33ADD-A4F9-4BCA-B7F9-0C35C843CC7E}.Release|Win32.Build.0 = Release|Win32
                {374BF775-AF68-4A88-814A-48F692DFFE5A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-               {374BF775-AF68-4A88-814A-48F692DFFE5A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-               {374BF775-AF68-4A88-814A-48F692DFFE5A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
                {374BF775-AF68-4A88-814A-48F692DFFE5A}.Debug|Win32.ActiveCfg = Debug|Win32
                {374BF775-AF68-4A88-814A-48F692DFFE5A}.Debug|Win32.Build.0 = Debug|Win32
                {374BF775-AF68-4A88-814A-48F692DFFE5A}.Release|Any CPU.ActiveCfg = Release|Win32
-               {374BF775-AF68-4A88-814A-48F692DFFE5A}.Release|Mixed Platforms.ActiveCfg = Debug|Win32
-               {374BF775-AF68-4A88-814A-48F692DFFE5A}.Release|Mixed Platforms.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
                {E5BC5B2E-976D-4DED-AA07-5DD52BF2163F}.Debug|Any CPU.ActiveCfg = Debug|Win32
-               {E5BC5B2E-976D-4DED-AA07-5DD52BF2163F}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-               {E5BC5B2E-976D-4DED-AA07-5DD52BF2163F}.Debug|Mixed Platforms.Build.0 = Debug|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|Any CPU.ActiveCfg = Release|Win32
-               {E5BC5B2E-976D-4DED-AA07-5DD52BF2163F}.Release|Mixed Platforms.ActiveCfg = Debug|Win32
-               {E5BC5B2E-976D-4DED-AA07-5DD52BF2163F}.Release|Mixed Platforms.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
                {558838F9-D792-4F56-AAB2-99C03687C5FF}.Debug|Any CPU.ActiveCfg = Debug|Win32
-               {558838F9-D792-4F56-AAB2-99C03687C5FF}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-               {558838F9-D792-4F56-AAB2-99C03687C5FF}.Debug|Mixed Platforms.Build.0 = Debug|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|Any CPU.ActiveCfg = Release|Win32
-               {558838F9-D792-4F56-AAB2-99C03687C5FF}.Release|Mixed Platforms.ActiveCfg = Debug|Win32
-               {558838F9-D792-4F56-AAB2-99C03687C5FF}.Release|Mixed Platforms.Build.0 = Debug|Win32
                {558838F9-D792-4F56-AAB2-99C03687C5FF}.Release|Win32.ActiveCfg = Release|Win32
                {558838F9-D792-4F56-AAB2-99C03687C5FF}.Release|Win32.Build.0 = Release|Win32
                {28FB58CE-AB8C-4C60-83DA-BC1BFCC59BFF}.Debug|Any CPU.ActiveCfg = Debug|Win32
-               {28FB58CE-AB8C-4C60-83DA-BC1BFCC59BFF}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-               {28FB58CE-AB8C-4C60-83DA-BC1BFCC59BFF}.Debug|Mixed Platforms.Build.0 = Debug|Win32
                {28FB58CE-AB8C-4C60-83DA-BC1BFCC59BFF}.Debug|Win32.ActiveCfg = Debug|Win32
                {28FB58CE-AB8C-4C60-83DA-BC1BFCC59BFF}.Debug|Win32.Build.0 = Debug|Win32
                {28FB58CE-AB8C-4C60-83DA-BC1BFCC59BFF}.Release|Any CPU.ActiveCfg = Release|Win32
-               {28FB58CE-AB8C-4C60-83DA-BC1BFCC59BFF}.Release|Mixed Platforms.ActiveCfg = Debug|Win32
-               {28FB58CE-AB8C-4C60-83DA-BC1BFCC59BFF}.Release|Mixed Platforms.Build.0 = Debug|Win32
                {28FB58CE-AB8C-4C60-83DA-BC1BFCC59BFF}.Release|Win32.ActiveCfg = Release|Win32
                {28FB58CE-AB8C-4C60-83DA-BC1BFCC59BFF}.Release|Win32.Build.0 = Release|Win32
                {6A435DBB-4D3D-4DAE-8CB3-E0AF169A240B}.Debug|Any CPU.ActiveCfg = Debug|Win32
-               {6A435DBB-4D3D-4DAE-8CB3-E0AF169A240B}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-               {6A435DBB-4D3D-4DAE-8CB3-E0AF169A240B}.Debug|Mixed Platforms.Build.0 = Debug|Win32
                {6A435DBB-4D3D-4DAE-8CB3-E0AF169A240B}.Debug|Win32.ActiveCfg = Debug|Win32
                {6A435DBB-4D3D-4DAE-8CB3-E0AF169A240B}.Debug|Win32.Build.0 = Debug|Win32
                {6A435DBB-4D3D-4DAE-8CB3-E0AF169A240B}.Release|Any CPU.ActiveCfg = Release|Win32
-               {6A435DBB-4D3D-4DAE-8CB3-E0AF169A240B}.Release|Mixed Platforms.ActiveCfg = Debug|Win32
-               {6A435DBB-4D3D-4DAE-8CB3-E0AF169A240B}.Release|Mixed Platforms.Build.0 = Debug|Win32
                {6A435DBB-4D3D-4DAE-8CB3-E0AF169A240B}.Release|Win32.ActiveCfg = Release|Win32
                {6A435DBB-4D3D-4DAE-8CB3-E0AF169A240B}.Release|Win32.Build.0 = Release|Win32
                {D03415F7-654E-42F4-B0E9-CB8FBE3F22FA}.Debug|Any CPU.ActiveCfg = Debug|Win32
-               {D03415F7-654E-42F4-B0E9-CB8FBE3F22FA}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-               {D03415F7-654E-42F4-B0E9-CB8FBE3F22FA}.Debug|Mixed Platforms.Build.0 = Debug|Win32
                {D03415F7-654E-42F4-B0E9-CB8FBE3F22FA}.Debug|Win32.ActiveCfg = Debug|Win32
                {D03415F7-654E-42F4-B0E9-CB8FBE3F22FA}.Debug|Win32.Build.0 = Debug|Win32
                {D03415F7-654E-42F4-B0E9-CB8FBE3F22FA}.Release|Any CPU.ActiveCfg = Release|Win32
-               {D03415F7-654E-42F4-B0E9-CB8FBE3F22FA}.Release|Mixed Platforms.ActiveCfg = Debug|Win32
-               {D03415F7-654E-42F4-B0E9-CB8FBE3F22FA}.Release|Mixed Platforms.Build.0 = Debug|Win32
                {D03415F7-654E-42F4-B0E9-CB8FBE3F22FA}.Release|Win32.ActiveCfg = Release|Win32
                {D03415F7-654E-42F4-B0E9-CB8FBE3F22FA}.Release|Win32.Build.0 = Release|Win32
                {F5F063F8-11A1-475A-82E2-19759BB40B25}.Debug|Any CPU.ActiveCfg = Debug|Win32
-               {F5F063F8-11A1-475A-82E2-19759BB40B25}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-               {F5F063F8-11A1-475A-82E2-19759BB40B25}.Debug|Mixed Platforms.Build.0 = Debug|Win32
                {F5F063F8-11A1-475A-82E2-19759BB40B25}.Debug|Win32.ActiveCfg = Debug|Win32
                {F5F063F8-11A1-475A-82E2-19759BB40B25}.Debug|Win32.Build.0 = Debug|Win32
                {F5F063F8-11A1-475A-82E2-19759BB40B25}.Release|Any CPU.ActiveCfg = Release|Win32
-               {F5F063F8-11A1-475A-82E2-19759BB40B25}.Release|Mixed Platforms.ActiveCfg = Debug|Win32
-               {F5F063F8-11A1-475A-82E2-19759BB40B25}.Release|Mixed Platforms.Build.0 = Debug|Win32
                {F5F063F8-11A1-475A-82E2-19759BB40B25}.Release|Win32.ActiveCfg = Release|Win32
                {F5F063F8-11A1-475A-82E2-19759BB40B25}.Release|Win32.Build.0 = Release|Win32
                {614CE916-0972-4126-9392-CD9FC0ADD7DE}.Debug|Any CPU.ActiveCfg = Debug|Win32
-               {614CE916-0972-4126-9392-CD9FC0ADD7DE}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-               {614CE916-0972-4126-9392-CD9FC0ADD7DE}.Debug|Mixed Platforms.Build.0 = Debug|Win32
                {614CE916-0972-4126-9392-CD9FC0ADD7DE}.Debug|Win32.ActiveCfg = Debug|Win32
                {614CE916-0972-4126-9392-CD9FC0ADD7DE}.Debug|Win32.Build.0 = Debug|Win32
                {614CE916-0972-4126-9392-CD9FC0ADD7DE}.Release|Any CPU.ActiveCfg = Release|Win32
-               {614CE916-0972-4126-9392-CD9FC0ADD7DE}.Release|Mixed Platforms.ActiveCfg = Debug|Win32
-               {614CE916-0972-4126-9392-CD9FC0ADD7DE}.Release|Mixed Platforms.Build.0 = Debug|Win32
                {614CE916-0972-4126-9392-CD9FC0ADD7DE}.Release|Win32.ActiveCfg = Release|Win32
                {614CE916-0972-4126-9392-CD9FC0ADD7DE}.Release|Win32.Build.0 = Release|Win32
                {6A7AA493-E46C-4994-B8D6-AA6C9C19C9BA}.Debug|Any CPU.ActiveCfg = Debug|Win32
-               {6A7AA493-E46C-4994-B8D6-AA6C9C19C9BA}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-               {6A7AA493-E46C-4994-B8D6-AA6C9C19C9BA}.Debug|Mixed Platforms.Build.0 = Debug|Win32
                {6A7AA493-E46C-4994-B8D6-AA6C9C19C9BA}.Debug|Win32.ActiveCfg = Debug|Win32
                {6A7AA493-E46C-4994-B8D6-AA6C9C19C9BA}.Debug|Win32.Build.0 = Debug|Win32
                {6A7AA493-E46C-4994-B8D6-AA6C9C19C9BA}.Release|Any CPU.ActiveCfg = Release|Win32
-               {6A7AA493-E46C-4994-B8D6-AA6C9C19C9BA}.Release|Mixed Platforms.ActiveCfg = Debug|Win32
-               {6A7AA493-E46C-4994-B8D6-AA6C9C19C9BA}.Release|Mixed Platforms.Build.0 = Debug|Win32
                {6A7AA493-E46C-4994-B8D6-AA6C9C19C9BA}.Release|Win32.ActiveCfg = Release|Win32
                {6A7AA493-E46C-4994-B8D6-AA6C9C19C9BA}.Release|Win32.Build.0 = Release|Win32
                {F8AF7D74-2918-422B-A7B6-4D98566B7160}.Debug|Any CPU.ActiveCfg = Debug|Win32
-               {F8AF7D74-2918-422B-A7B6-4D98566B7160}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-               {F8AF7D74-2918-422B-A7B6-4D98566B7160}.Debug|Mixed Platforms.Build.0 = Debug|Win32
                {F8AF7D74-2918-422B-A7B6-4D98566B7160}.Debug|Win32.ActiveCfg = Debug|Win32
                {F8AF7D74-2918-422B-A7B6-4D98566B7160}.Debug|Win32.Build.0 = Debug|Win32
                {F8AF7D74-2918-422B-A7B6-4D98566B7160}.Release|Any CPU.ActiveCfg = Release|Win32
-               {F8AF7D74-2918-422B-A7B6-4D98566B7160}.Release|Mixed Platforms.ActiveCfg = Debug|Win32
-               {F8AF7D74-2918-422B-A7B6-4D98566B7160}.Release|Mixed Platforms.Build.0 = Debug|Win32
                {F8AF7D74-2918-422B-A7B6-4D98566B7160}.Release|Win32.ActiveCfg = Release|Win32
                {F8AF7D74-2918-422B-A7B6-4D98566B7160}.Release|Win32.Build.0 = Release|Win32
                {56EADEDB-FBED-4758-8B54-7B0B47ABDABF}.Debug|Any CPU.ActiveCfg = Debug|Win32
-               {56EADEDB-FBED-4758-8B54-7B0B47ABDABF}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-               {56EADEDB-FBED-4758-8B54-7B0B47ABDABF}.Debug|Mixed Platforms.Build.0 = Debug|Win32
                {56EADEDB-FBED-4758-8B54-7B0B47ABDABF}.Debug|Win32.ActiveCfg = Debug|Win32
                {56EADEDB-FBED-4758-8B54-7B0B47ABDABF}.Debug|Win32.Build.0 = Debug|Win32
                {56EADEDB-FBED-4758-8B54-7B0B47ABDABF}.Release|Any CPU.ActiveCfg = Release|Win32
-               {56EADEDB-FBED-4758-8B54-7B0B47ABDABF}.Release|Mixed Platforms.ActiveCfg = Debug|Win32
-               {56EADEDB-FBED-4758-8B54-7B0B47ABDABF}.Release|Mixed Platforms.Build.0 = Debug|Win32
                {56EADEDB-FBED-4758-8B54-7B0B47ABDABF}.Release|Win32.ActiveCfg = Release|Win32
                {56EADEDB-FBED-4758-8B54-7B0B47ABDABF}.Release|Win32.Build.0 = Release|Win32
                {496415E0-AF44-4AD8-8C99-91B837DDF469}.Debug|Any CPU.ActiveCfg = Debug|Win32
-               {496415E0-AF44-4AD8-8C99-91B837DDF469}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-               {496415E0-AF44-4AD8-8C99-91B837DDF469}.Debug|Mixed Platforms.Build.0 = Debug|Win32
                {496415E0-AF44-4AD8-8C99-91B837DDF469}.Debug|Win32.ActiveCfg = Debug|Win32
                {496415E0-AF44-4AD8-8C99-91B837DDF469}.Debug|Win32.Build.0 = Debug|Win32
                {496415E0-AF44-4AD8-8C99-91B837DDF469}.Release|Any CPU.ActiveCfg = Release|Win32
-               {496415E0-AF44-4AD8-8C99-91B837DDF469}.Release|Mixed Platforms.ActiveCfg = Debug|Win32
-               {496415E0-AF44-4AD8-8C99-91B837DDF469}.Release|Mixed Platforms.Build.0 = Debug|Win32
                {496415E0-AF44-4AD8-8C99-91B837DDF469}.Release|Win32.ActiveCfg = Release|Win32
                {496415E0-AF44-4AD8-8C99-91B837DDF469}.Release|Win32.Build.0 = Release|Win32
                {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}.Debug|Any CPU.ActiveCfg = Debug|Win32
-               {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-               {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}.Debug|Mixed Platforms.Build.0 = Debug|Win32
                {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}.Debug|Win32.ActiveCfg = Debug|Win32
                {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}.Debug|Win32.Build.0 = Debug|Win32
                {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}.Release|Any CPU.ActiveCfg = Release|Win32
-               {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}.Release|Mixed Platforms.ActiveCfg = Debug|Win32
-               {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}.Release|Mixed Platforms.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
                {208D3989-794B-47A2-9D04-D7AEE1524078}.Debug|Any CPU.ActiveCfg = Debug|Win32
-               {208D3989-794B-47A2-9D04-D7AEE1524078}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-               {208D3989-794B-47A2-9D04-D7AEE1524078}.Debug|Mixed Platforms.Build.0 = Debug|Win32
                {208D3989-794B-47A2-9D04-D7AEE1524078}.Debug|Win32.ActiveCfg = Debug|Win32
                {208D3989-794B-47A2-9D04-D7AEE1524078}.Release|Any CPU.ActiveCfg = Release|Win32
-               {208D3989-794B-47A2-9D04-D7AEE1524078}.Release|Mixed Platforms.ActiveCfg = Debug|Win32
                {208D3989-794B-47A2-9D04-D7AEE1524078}.Release|Win32.ActiveCfg = Release|Win32
                {2D729599-C008-4154-BCCB-53E6A260F220}.Debug|Any CPU.ActiveCfg = Debug|Win32
-               {2D729599-C008-4154-BCCB-53E6A260F220}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-               {2D729599-C008-4154-BCCB-53E6A260F220}.Debug|Mixed Platforms.Build.0 = Debug|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|Any CPU.ActiveCfg = Release|Win32
-               {2D729599-C008-4154-BCCB-53E6A260F220}.Release|Mixed Platforms.ActiveCfg = Debug|Win32
-               {2D729599-C008-4154-BCCB-53E6A260F220}.Release|Mixed Platforms.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|Any CPU.ActiveCfg = Debug|Win32
-               {B52BD53B-0E57-4E9A-A601-8E8171BA1CFC}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-               {B52BD53B-0E57-4E9A-A601-8E8171BA1CFC}.Debug|Mixed Platforms.Build.0 = Debug|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|Any CPU.ActiveCfg = Release|Win32
-               {B52BD53B-0E57-4E9A-A601-8E8171BA1CFC}.Release|Mixed Platforms.ActiveCfg = Debug|Win32
-               {B52BD53B-0E57-4E9A-A601-8E8171BA1CFC}.Release|Mixed Platforms.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|Any CPU.ActiveCfg = Debug|Win32
-               {8B79A2B5-8889-43D4-9B92-9AE8A6F00413}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-               {8B79A2B5-8889-43D4-9B92-9AE8A6F00413}.Debug|Mixed Platforms.Build.0 = Debug|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|Any CPU.ActiveCfg = Release|Win32
-               {8B79A2B5-8889-43D4-9B92-9AE8A6F00413}.Release|Mixed Platforms.ActiveCfg = Debug|Win32
-               {8B79A2B5-8889-43D4-9B92-9AE8A6F00413}.Release|Mixed Platforms.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|Any CPU.ActiveCfg = Debug|Win32
-               {85696E20-777A-41F6-BC00-2E7AB375B171}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-               {85696E20-777A-41F6-BC00-2E7AB375B171}.Debug|Mixed Platforms.Build.0 = Debug|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|Any CPU.ActiveCfg = Release|Win32
-               {85696E20-777A-41F6-BC00-2E7AB375B171}.Release|Mixed Platforms.ActiveCfg = Debug|Win32
-               {85696E20-777A-41F6-BC00-2E7AB375B171}.Release|Mixed Platforms.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|Any CPU.ActiveCfg = Debug|Win32
-               {2FB961E5-213C-4475-8CB3-72F904D40752}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-               {2FB961E5-213C-4475-8CB3-72F904D40752}.Debug|Mixed Platforms.Build.0 = Debug|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|Any CPU.ActiveCfg = Release|Win32
-               {2FB961E5-213C-4475-8CB3-72F904D40752}.Release|Mixed Platforms.ActiveCfg = Debug|Win32
-               {2FB961E5-213C-4475-8CB3-72F904D40752}.Release|Mixed Platforms.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|Any CPU.ActiveCfg = Debug|Win32
-               {56D8C233-610E-4EE4-A73A-72CEF1C6A33A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-               {56D8C233-610E-4EE4-A73A-72CEF1C6A33A}.Debug|Mixed Platforms.Build.0 = Debug|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|Any CPU.ActiveCfg = Release|Win32
-               {56D8C233-610E-4EE4-A73A-72CEF1C6A33A}.Release|Mixed Platforms.ActiveCfg = Debug|Win32
-               {56D8C233-610E-4EE4-A73A-72CEF1C6A33A}.Release|Mixed Platforms.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|Any CPU.ActiveCfg = Debug|Win32
-               {1E6FC8D7-0A08-461A-B9AB-FD3CC5DC0B9C}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-               {1E6FC8D7-0A08-461A-B9AB-FD3CC5DC0B9C}.Debug|Mixed Platforms.Build.0 = Debug|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|Any CPU.ActiveCfg = Release|Win32
-               {1E6FC8D7-0A08-461A-B9AB-FD3CC5DC0B9C}.Release|Mixed Platforms.ActiveCfg = Debug|Win32
-               {1E6FC8D7-0A08-461A-B9AB-FD3CC5DC0B9C}.Release|Mixed Platforms.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|Any CPU.ActiveCfg = Debug|Win32
-               {6D1B0964-FB32-4916-A61C-49D7F715EAD8}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-               {6D1B0964-FB32-4916-A61C-49D7F715EAD8}.Debug|Mixed Platforms.Build.0 = Debug|Win32
                {6D1B0964-FB32-4916-A61C-49D7F715EAD8}.Debug|Win32.ActiveCfg = Debug|Win32
                {6D1B0964-FB32-4916-A61C-49D7F715EAD8}.Debug|Win32.Build.0 = Debug|Win32
                {6D1B0964-FB32-4916-A61C-49D7F715EAD8}.Release|Any CPU.ActiveCfg = Release|Win32
-               {6D1B0964-FB32-4916-A61C-49D7F715EAD8}.Release|Mixed Platforms.ActiveCfg = Debug|Win32
-               {6D1B0964-FB32-4916-A61C-49D7F715EAD8}.Release|Mixed Platforms.Build.0 = Debug|Win32
                {6D1B0964-FB32-4916-A61C-49D7F715EAD8}.Release|Win32.ActiveCfg = Release|Win32
                {6D1B0964-FB32-4916-A61C-49D7F715EAD8}.Release|Win32.Build.0 = Release|Win32
                {0F56AEB0-14DA-4A80-8962-1F85A17339D0}.Debug|Any CPU.ActiveCfg = Debug|Win32
-               {0F56AEB0-14DA-4A80-8962-1F85A17339D0}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-               {0F56AEB0-14DA-4A80-8962-1F85A17339D0}.Debug|Mixed Platforms.Build.0 = Debug|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|Any CPU.ActiveCfg = Release|Win32
-               {0F56AEB0-14DA-4A80-8962-1F85A17339D0}.Release|Mixed Platforms.ActiveCfg = Debug|Win32
-               {0F56AEB0-14DA-4A80-8962-1F85A17339D0}.Release|Mixed Platforms.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
                {AB67F297-8491-4515-8E52-BFF5340EC242}.Debug|Any CPU.ActiveCfg = Debug|Win32
-               {AB67F297-8491-4515-8E52-BFF5340EC242}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-               {AB67F297-8491-4515-8E52-BFF5340EC242}.Debug|Mixed Platforms.Build.0 = Debug|Win32
                {AB67F297-8491-4515-8E52-BFF5340EC242}.Debug|Win32.ActiveCfg = Debug|Win32
                {AB67F297-8491-4515-8E52-BFF5340EC242}.Debug|Win32.Build.0 = Debug|Win32
                {AB67F297-8491-4515-8E52-BFF5340EC242}.Release|Any CPU.ActiveCfg = Release|Win32
-               {AB67F297-8491-4515-8E52-BFF5340EC242}.Release|Mixed Platforms.ActiveCfg = Debug|Win32
-               {AB67F297-8491-4515-8E52-BFF5340EC242}.Release|Mixed Platforms.Build.0 = Debug|Win32
                {AB67F297-8491-4515-8E52-BFF5340EC242}.Release|Win32.ActiveCfg = Release|Win32
                {AB67F297-8491-4515-8E52-BFF5340EC242}.Release|Win32.Build.0 = Release|Win32
+               {23BFE838-5682-4F39-969F-0B40366D4D98}.Debug|Any CPU.ActiveCfg = Debug|Win32
+               {23BFE838-5682-4F39-969F-0B40366D4D98}.Debug|Win32.ActiveCfg = Debug|Win32
+               {23BFE838-5682-4F39-969F-0B40366D4D98}.Debug|Win32.Build.0 = Debug|Win32
+               {23BFE838-5682-4F39-969F-0B40366D4D98}.Release|Any CPU.ActiveCfg = Release|Win32
+               {23BFE838-5682-4F39-969F-0B40366D4D98}.Release|Win32.ActiveCfg = Release|Win32
+               {23BFE838-5682-4F39-969F-0B40366D4D98}.Release|Win32.Build.0 = Release|Win32
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
@@ -490,11 +382,12 @@ Global
                {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}
+               {23BFE838-5682-4F39-969F-0B40366D4D98} = {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}
                {C8301485-CFD1-43D4-827C-8EA050C8E256} = {825DFFD0-4747-43CA-8326-529655E31935}
+               {40CADEE4-8D53-4157-AA36-B256F4934FC3} = {825DFFD0-4747-43CA-8326-529655E31935}
                {6A7AA493-E46C-4994-B8D6-AA6C9C19C9BA} = {37F903FE-3474-4C93-AD5B-987CB6A92E62}
                {F8AF7D74-2918-422B-A7B6-4D98566B7160} = {37F903FE-3474-4C93-AD5B-987CB6A92E62}
                {56EADEDB-FBED-4758-8B54-7B0B47ABDABF} = {37F903FE-3474-4C93-AD5B-987CB6A92E62}
index 7c2d05f65d36cc6711656b5c2e4d608204d59104..fffdc757d912bb81a08d8b0bd6fc913c08ea932f 100644 (file)
@@ -65,7 +65,7 @@ REM   CALL :process_pcre
        CALL :process_pthreads
        CALL :process_openssl
        CALL :process_mysql
-REM    CALL :process_sqlite
+       CALL :process_sqlite
        CALL :process_postgreSQL
        CALL :process_wx
 REM    CALL :process_scons
@@ -229,21 +229,26 @@ REM       do_patch postgresql.patch
 
 :process_sqlite
        CALL :get_source %URL_SQLITE% %DIR_SQLITE% %MKD_SQLITE%
-       CALL :get_source %URL_SQLITE_WINSRC% %DIR_SQLITE_WINSRC% %MKD_SQLITE_WINSRC%
-REM    ECHO Patching SQLite
-REM    COPY /Y nul patch.log
-REM    do_patch sqlite.patch
+       IF ERRORLEVEL 2 GOTO :sqlite_error
+       IF ERRORLEVEL 1 GOTO :sqlite_skip_patch
+       ECHO Patching SQLite
+       COPY /Y nul patch.log
+       CALL :do_patch sqlite_msc.patch
+:sqlite_skip_patch
        ECHO Configuring SQLite
        IF NOT EXIST bld/nul MKDIR bld
        CD bld
        ECHO Building SQLite
        COPY /Y nul make.log
-       do_make ../Makefile.mingw32 CROSSTOOLS=%BIN_DIR% TLIBS="-L%DEPPKG_DIR%/lib" TCL_FLAGS="-I%DEPPKG_DIR%/include" clean all
+       CALL :do_nmake ../Makefile.msvc clean all
        ECHO Installing SQLite
-       cp -p sqlite3.exe %DEPPKG_DIR%/bin
-       cp -p libsqlite3.a %DEPPKG_DIR%/lib
-       cp -p sqlite3.h %DEPPKG_DIR%/include
+       COPY sqlite3.exe %DEPPKG_DIR%\bin
+       COPY sqlite3.lib %DEPPKG_DIR%\lib
+       COPY sqlite3.h %DEPPKG_DIR%\include
        EXIT /B 0
+:sqlite_error
+       ECHO Unable to download sqlite source from %URL_SQLITE%
+       EXIT /B 1
 
 :process_wx
        CALL :get_source %URL_WX% %DIR_WX% %MKD_WX%
diff --git a/bacula/src/win32/build.bat b/bacula/src/win32/build.bat
deleted file mode 100755 (executable)
index 1b678a3..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-REM build release if cygwin make not available.
-
-cd zlib
-nmake /f win32\Makefile.msc
-cd ..
-cd pthreads
-nmake VCE
-cd ..
-cd baculafd
-nmake CFG="baculafd - Win32 Release" /f baculafd.mak
-cd ..
-makensis winbacula.nsi
index 3db07cceedc1adb29702ca788ca87dc3d6433dd1..fa76b9100b8000ef422e453b08b6acf80eeb8a17 100644 (file)
@@ -24,15 +24,6 @@ vpath %.cpp ../../cats
 
 # Files files in src/lib
 
-BDB_OBJS = \
-       bdb.o \
-       bdb_create.o \
-       bdb_delete.o \
-       bdb_find.o \
-       bdb_get.o \
-       bdb_list.o \
-       bdb_update.o \
-
 SQL_OBJS = \
        sql.o \
        sql_cmds.o \
@@ -52,16 +43,16 @@ LIBS_DLL = \
 
 .PHONY: all clean
 
-all: $(LIBDIR)/libcats.a $(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_sqlite.dll
 
 clean:
        @echo "Cleaning `pwd`"
        $(call clean_obj,$(addprefix $(OBJDIR)/cats_mysql/,mysql.o $(SQL_OBJS)))
        $(call clean_obj,$(addprefix $(OBJDIR)/cats_pgsql/,postgresql.o $(SQL_OBJS)))
-       $(call clean_obj,$(addprefix $(OBJDIR)/cats_bdb/,sql_cmds.o $(BDB_OBJS)))
+       $(call clean_obj,$(addprefix $(OBJDIR)/cats_sqlite/,sqlite.o $(SQL_OBJS)))
        $(call clean_exe,$(BINDIR)/cats_mysql.dll)
        $(call clean_exe,$(BINDIR)/cats_pgsql.dll)
-       $(call clean_exe,$(BINDIR)/cats_bdb.dll)
+       $(call clean_exe,$(BINDIR)/cats_sqlite.dll)
        $(ECHO_CMD)rm -f $(OBJDIR)/libcats.exp $(LIBDIR)/libcats.a
 
 $(LIBDIR)/libcats.a $(OBJDIR)/libcats.exp: bacula_cats.def
@@ -77,10 +68,10 @@ $(BINDIR)/cats_pgsql.dll: $(addprefix $(OBJDIR)/cats_pgsql/,postgresql.o $(SQL_O
        $(call checkdir,$@)
        $(ECHO_CMD)$(CXX) $(LDFLAGS) -mdll -mwindows $^ $(LIBS_POSTGRESQL) $(LIBS_DLL) -o $@
 
-$(BINDIR)/cats_bdb.dll: $(addprefix $(OBJDIR)/cats_bdb/,sql_cmds.o $(BDB_OBJS)) $(OBJDIR)/libcats.exp
+$(BINDIR)/cats_sqlite.dll: $(addprefix $(OBJDIR)/cats_sqlite/,sqlite.o $(SQL_OBJS)) $(OBJDIR)/libcats.exp
        @echo "Linking $@"
        $(call checkdir,$@)
-       $(ECHO_CMD)$(CXX) $(LDFLAGS) -mdll -mwindows $^ $(LIBS_DLL) -o $@
+       $(ECHO_CMD)$(CXX) $(LDFLAGS) -mdll -mwindows $^ $(LIBS_SQLITE) $(LIBS_DLL) -o $@
 
 #
 # Rules for generating from ../cats
@@ -105,5 +96,5 @@ $(eval $(call Link_Dll,cats_mysql,MYSQL))
 
 $(eval $(call Link_Dll,cats_pgsql,POSTGRESQL))
 
-$(eval $(call Link_Dll,cats_bdb,BACULA_DB))
+$(eval $(call Link_Dll,cats_sqlite,SQLITE3))
 
index 6c471eb5648f1710dcadcc1a567c379abb1d07a1..4dd74d80725ebe9e1699079308a66ac5309da9d9 100644 (file)
                        <File
                                RelativePath=".\bacula_cats.def"
                                >
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                               </FileConfiguration>
                        </File>
                </Filter>
                <Filter
                        UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
                        >
                </Filter>
+               <Filter
+                       Name="Script Files"
+                       >
+                       <File
+                               RelativePath="..\delete_catalog_backup.cmd"
+                               >
+                       </File>
+               </Filter>
        </Files>
        <Globals>
        </Globals>
diff --git a/bacula/src/win32/cats/cats_bdb/cats_bdb.vcproj b/bacula/src/win32/cats/cats_bdb/cats_bdb.vcproj
deleted file mode 100644 (file)
index 24fc148..0000000
+++ /dev/null
@@ -1,368 +0,0 @@
-<?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"
-       >
-       <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;../../../../../depkgs-msvc/include;../../.."
-                               PreprocessorDefinitions="_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="false"
-                               DebugInformationFormat="4"
-                       />
-                       <Tool
-                               Name="VCManagedResourceCompilerTool"
-                       />
-                       <Tool
-                               Name="VCResourceCompilerTool"
-                       />
-                       <Tool
-                               Name="VCPreLinkEventTool"
-                       />
-                       <Tool
-                               Name="VCLinkerTool"
-                               AdditionalDependencies="bacula_cats.exp"
-                               AdditionalLibraryDirectories="../../../../../depkgs-msvc/lib;../../$(ConfigurationName)"
-                               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;../../../../../depkgs-msvc/include;../../.."
-                               PreprocessorDefinitions="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="false"
-                               DebugInformationFormat="3"
-                       />
-                       <Tool
-                               Name="VCManagedResourceCompilerTool"
-                       />
-                       <Tool
-                               Name="VCResourceCompilerTool"
-                       />
-                       <Tool
-                               Name="VCPreLinkEventTool"
-                       />
-                       <Tool
-                               Name="VCLinkerTool"
-                               AdditionalDependencies="bacula_cats.exp"
-                               AdditionalLibraryDirectories="../../../../../depkgs-msvc/lib;../../$(ConfigurationName)"
-                               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>
index 9b1372dfcca1ef4b8b6c4e131c2a7f6d8da367bc..2106901ad937f0f37fc1bba69a34b0275713ee34 100644 (file)
                        UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
                        >
                </Filter>
+               <Filter
+                       Name="Script Files"
+                       >
+                       <File
+                               RelativePath="..\create_mysql_database.cmd"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\drop_mysql_database.cmd"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\drop_mysql_tables.cmd"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\drop_mysql_tables.sql"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\grant_mysql_privileges.cmd"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\grant_mysql_privileges.sql"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\make_mysql_catalog_backup.cmd"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\make_mysql_tables.cmd"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\make_mysql_tables.sql"
+                               >
+                       </File>
+               </Filter>
        </Files>
        <Globals>
        </Globals>
index 471006dd89ce792e30e72e92650a67b9ed8b87e6..8c2bff07c0f71edbe16fdc110be6cd0042ab27a9 100644 (file)
                        UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
                        >
                </Filter>
+               <Filter
+                       Name="Script Files"
+                       >
+                       <File
+                               RelativePath="..\create_postgresql_database.cmd"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\create_postgresql_database.sql"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\drop_postgresql_database.cmd"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\drop_postgresql_tables.cmd"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\drop_postgresql_tables.sql"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\grant_postgresql_privileges.cmd"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\grant_postgresql_privileges.sql"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\make_postgresql_catalog_backup.cmd"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\make_postgresql_tables.cmd"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\make_postgresql_tables.sql"
+                               >
+                       </File>
+               </Filter>
        </Files>
        <Globals>
        </Globals>
diff --git a/bacula/src/win32/cats/cats_sqlite/cats_sqlite.vcproj b/bacula/src/win32/cats/cats_sqlite/cats_sqlite.vcproj
new file mode 100644 (file)
index 0000000..4cf8315
--- /dev/null
@@ -0,0 +1,421 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="8.00"
+       Name="cats_sqlite"
+       ProjectGUID="{23BFE838-5682-4F39-969F-0B40366D4D98}"
+       RootNamespace="cats_sqlite"
+       >
+       <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;../../../../../depkgs-msvc/include;../../.."
+                               PreprocessorDefinitions="_DEBUG;_LIB;HAVE_WIN32;HAVE_SQLITE3;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="false"
+                               DebugInformationFormat="4"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="sqlite3.lib bacula_cats.exp"
+                               AdditionalLibraryDirectories="../../../../../depkgs-msvc/lib;../../$(ConfigurationName)"
+                               IgnoreDefaultLibraryNames="msvcrt"
+                               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;../../../../../depkgs-msvc/include;../../.."
+                               PreprocessorDefinitions="NDEBUG;_LIB;HAVE_WIN32;HAVE_SQLITE3;USING_DLL;BUILDING_CATS;_USE_32BIT_TIME_T;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE"
+                               RuntimeLibrary="2"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               Detect64BitPortabilityProblems="false"
+                               DebugInformationFormat="3"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="sqlite3.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\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>
+                       <File
+                               RelativePath="..\..\..\cats\sqlite.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>
+               <Filter
+                       Name="Script Files"
+                       >
+                       <File
+                               RelativePath="..\create_sqlite3_database.cmd"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\drop_sqlite3_database.cmd"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\drop_sqlite3_tables.cmd"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\grant_sqlite3_privileges.cmd"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\make_sqlite3_catalog_backup.cmd"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\make_sqlite3_tables.cmd"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\make_sqlite3_tables.sql"
+                               >
+                       </File>
+               </Filter>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>
diff --git a/bacula/src/win32/cats/create_bdb_database.cmd b/bacula/src/win32/cats/create_bdb_database.cmd
deleted file mode 100644 (file)
index 71355cc..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-rem \r
-rem  shell script to create Bacula database(s)\r
-rem \r
-rem   Nothing to do \r
index bc079b1d7f7739ad9239f941a0eabafc50f7555c..550c83bb9405a1331fd0b0714dad4520105b4211 100644 (file)
@@ -1,14 +1,14 @@
-@echo off\r
-rem\r
-rem Script to create Bacula database(s)\r
-rem\r
+@ECHO off\r
+REM\r
+REM Script to create Bacula database(s)\r
+REM\r
 \r
-"%SQL_BINDIR%\mysql" %* -e "CREATE DATABASE bacula;"\r
-set RESULT=%ERRORLEVEL%\r
-if %RESULT% GTR 0 goto :ERROR\r
-echo "Creation of bacula database succeeded."\r
-exit /b 0\r
+"@SQL_BINDIR@\mysql" %* -e "CREATE DATABASE bacula;"\r
+SET RESULT=%ERRORLEVEL%\r
+IF %RESULT% GTR 0 GOTO :ERROR\r
+ECHO Creation of bacula database succeeded.\r
+EXIT /b 0\r
 \r
 :ERROR\r
-echo "Creation of bacula database failed."\r
-exit /b %RESULT%\r
+ECHO Creation of bacula database failed.\r
+EXIT /b %RESULT%\r
index e47eaad23cba28a819281d078d734dd2a5e3f0a8..90b029cb67d1e46ebd37b17f0dde76fe60227ee5 100644 (file)
@@ -1,23 +1,23 @@
-rem \r
-rem  shell script to create Bacula database(s)\r
-rem \r
+@ECHO off\r
+REM\r
+REM  Script to create Bacula database(s)\r
+REM\r
 \r
-bindir=@SQL_BINDIR@\r
+REM use SQL_ASCII to be able to put any filename into\r
+REM  the database even those created with unusual character sets\r
+SET ENCODING=ENCODING 'SQL_ASCII'\r
 \r
-rem use SQL_ASCII to be able to put any filename into\r
-rem  the database even those created with unusual character sets\r
-ENCODING="ENCODING 'SQL_ASCII'"\r
-rem use UTF8 if you are using standard Unix/Linux LANG specifications\r
-rem  that use UTF8 -- this is normally the default and *should* be\r
-rem  your standard.  Bacula consoles work correctly *only* with UTF8.\r
-rem ENCODING="ENCODING 'UTF8'"\r
-     \r
-$bindir/psql -f create_postgresql_database.sql -d template1 $*\r
-if ERRORLEVEL 1 GOTO :ERROR\r
-echo "Creation of bacula database succeeded."\r
+REM use UTF8 if you are using standard Unix/Linux LANG specifications\r
+REM  that use UTF8 -- this is normally the default and *should* be\r
+REM  your standard.  Bacula consoles work correctly *only* with UTF8.\r
+REM SET ENCODING=ENCODING 'UTF8'\r
+\r
+"@SQL_BINDIR@\psql" -f "@bin_dir_cmd@\create_postgresql_database.sql" -d template1 %*\r
+IF ERRORLEVEL 1 GOTO :ERROR\r
+ECHO Creation of bacula database succeeded.\r
 EXIT /b 0\r
 GOTO :EOF\r
 \r
 :ERROR\r
-echo "Creation of bacula database failed."\r
+ECHO Creation of bacula database failed.\r
 EXIT /b 1\r
index f25a676da45e8d437b86fa1809c76dc6640abee6..30c84a213aac6c1dd00e8643b1b143205878a56d 100644 (file)
@@ -1,4 +1,5 @@
-rem\r
-rem This script deletes a catalog dump\r
-rem\r
-del /f "@working_dir_cmd@\bacula.sql"\r
+REM\r
+REM This script deletes a catalog dump\r
+REM\r
+DEL /f "@working_dir_cmd@\bacula.sql"\r
+EXIT /b 0\r
diff --git a/bacula/src/win32/cats/drop_bdb_database.cmd b/bacula/src/win32/cats/drop_bdb_database.cmd
deleted file mode 100644 (file)
index 9338c8f..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-rem\r
-rem \r
-rem  shell script to drop Bacula database(s)\r
-rem \r
-rem   Nothing to do \r
diff --git a/bacula/src/win32/cats/drop_bdb_tables.cmd b/bacula/src/win32/cats/drop_bdb_tables.cmd
deleted file mode 100644 (file)
index e90fef9..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-rem \r
-rem  shell script to Delete the Bacula database (same as deleting \r
-rem   the tables)\r
-rem \r
-\r
-del /f @working_dir@/control.db\r
-del /f @working_dir@/jobs.db\r
-del /f @working_dir@/pools.db\r
-del /f @working_dir@/media.db\r
-del /f @working_dir@/jobmedia.db\r
-del /f @working_dir@/client.db\r
-del /f @working_dir@/fileset.db\r
index 7289c5377388e2402f1f565c6a44615e32cc18b7..a6cd0a9d1204b765da4f5f596a9468455d4c2e3d 100644 (file)
@@ -1,13 +1,14 @@
-rem\r
-rem shell script to drop Bacula database(s)\r
-rem\r
+@ECHO off\r
+REM\r
+REM Script to drop Bacula database(s)\r
+REM\r
 \r
-"%SQL_BINDIR%/mysql" %* -f -e "DROP DATABASE bacula;"\r
-set RESULT=%ERRORLEVEL%\r
-if %RESULT% GTR 0 goto :ERROR\r
-echo "Drop of bacula database succeeded."\r
-exit /b 0\r
+"@SQL_BINDIR@\mysql" %* -f -e "DROP DATABASE bacula;"\r
+SET RESULT=%ERRORLEVEL%\r
+IF %RESULT% GTR 0 GOTO :ERROR\r
+ECHO Drop of bacula database succeeded.\r
+EXIT /b 0\r
 \r
 :ERROR\r
-echo "Drop of bacula database failed."\r
-exit /b %RESULT%\r
+ECHO Drop of bacula database failed.\r
+EXIT /b %RESULT%\r
index 0dd328ad5582b43b1391717843509376c854879e..fd7cc332b83eb1e3e8fa28866cf258afe7d274e6 100644 (file)
@@ -1,14 +1,14 @@
-@echo off\r
-rem\r
-rem Script to delete Bacula tables for MySQL\r
-rem\r
+@ECHO off\r
+REM\r
+REM Script to delete Bacula tables for MySQL\r
+REM\r
 \r
-"%SQL_BINDIR%/mysql" %* < drop_mysql_tables.sql\r
-set RESULT=%ERRORLEVEL%\r
-if %RESULT% GTR 0 goto :ERROR\r
-echo "Deletion of Bacula MySQL tables succeeded."\r
-exit /b 0\r
+"@SQL_BINDIR@\mysql" %* < "@bin_dir_cmd@\drop_mysql_tables.sql"\r
+SET RESULT=%ERRORLEVEL%\r
+IF %RESULT% GTR 0 goto :ERROR\r
+ECHO Deletion of Bacula MySQL tables succeeded.\r
+EXIT /b 0\r
 \r
 :ERROR\r
-echo "Deletion of Bacula MySQL tables failed."\r
-exit /b %RESULT%\r
+ECHO Deletion of Bacula MySQL tables failed.\r
+EXIT /b %RESULT%\r
index 553ae3cf5cc426e320e0a7bade3d4a81b0005a48..f5979a52d0bfb3a62e9995e0e1c7f9c4451a225b 100644 (file)
@@ -1,15 +1,14 @@
-rem \r
-rem  shell script to drop Bacula database(s)\r
-rem \r
+@ECHO off\r
+REM\r
+REM  Script to drop Bacula database(s)\r
+REM\r
 \r
-bindir=@SQL_BINDIR@\r
-\r
-$bindir/dropdb bacula\r
-if ERRORLEVEL 1 GOTO :ERROR\r
-echo "Drop of bacula database succeeded."\r
+"@SQL_BINDIR@\dropdb" %* bacula\r
+IF ERRORLEVEL 1 GOTO :ERROR\r
+ECHO Drop of bacula database succeeded.\r
 EXIT /b 0\r
 GOTO :EOF\r
 \r
 :ERROR\r
-echo "Drop of bacula database failed."\r
+ECHO Drop of bacula database failed.\r
 EXIT /b 1\r
index f25037edc462e1fc9760dd7af3eedb8b647bdecd..ae6215cade72fbeb47939a3ad96ec23024db3cae 100644 (file)
@@ -1,15 +1,14 @@
-rem \r
-rem  shell script to delete Bacula tables for PostgreSQL\r
-rem\r
+@ECHO off\r
+REM\r
+REM  Script to delete Bacula tables for PostgreSQL\r
+REM\r
 \r
-bindir=@SQL_BINDIR@\r
-\r
-$bindir/psql -f drop_postgresql_tables.sql -d bacula $*\r
-if ERRORLEVEL 1 GOTO :ERROR\r
-echo "Deletion of Bacula PostgreSQL tables succeeded."\r
+"@SQL_BINDIR@\psql" -f "@bin_dir_cmd@\drop_postgresql_tables.sql" -d bacula %*\r
+IF ERRORLEVEL 1 GOTO :ERROR\r
+ECHO Deletion of Bacula PostgreSQL tables succeeded.\r
 EXIT /b 0\r
 GOTO :EOF\r
 \r
 :ERROR\r
-echo "Deletion of Bacula PostgreSQL tables failed."\r
+ECHO Deletion of Bacula PostgreSQL tables failed.\r
 EXIT /b 1\r
diff --git a/bacula/src/win32/cats/fix_postgresql_tables b/bacula/src/win32/cats/fix_postgresql_tables
deleted file mode 100755 (executable)
index 2d69f89..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-#
-# Shell script to fix PostgreSQL tables in version 8
-#
-echo " "
-echo "This script will fix a Bacula PostgreSQL database version 8"
-echo "Depending on the size of your database,"
-echo "this script may take several minutes to run."
-echo " "
-#
-# Set the following to the path to psql.
-bindir=****EDIT-ME to be the path to psql****
-
-if $bindir/psql $* -f - <<END-OF-DATA
-\c bacula
-
-begin;
-
-alter table media rename column endblock to endblock_old;
-alter table media add column endblock bigint;
-update media set endblock = endblock_old;
-alter table media alter column endblock set not null;
-alter table media drop column endblock_old;
-
-commit;
-
-vacuum;
-
-END-OF-DATA
-then
-   echo "Update of Bacula PostgreSQL tables succeeded."
-else
-   echo "Update of Bacula PostgreSQL tables failed."
-fi
-exit 0
diff --git a/bacula/src/win32/cats/fix_postgresql_tables.cmd b/bacula/src/win32/cats/fix_postgresql_tables.cmd
deleted file mode 100644 (file)
index 0a5d5a1..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-rem \r
-rem  Shell script to fix PostgreSQL tables in version 8\r
-rem \r
-\r
-echo " "\r
-echo "This script will fix a Bacula PostgreSQL database version 8"\r
-echo "Depending on the size of your database,"\r
-echo "this script may take several minutes to run."\r
-echo " "\r
-#\r
-# Set the following to the path to psql.\r
-bindir=****EDIT-ME to be the path to psql****\r
-\r
-$bindir/psql $* -f fix_postgresql_tables.sql\r
-if ERRORLEVEL 1 GOTO :ERROR\r
-echo "Update of Bacula PostgreSQL tables succeeded."\r
-EXIT /b 0\r
-GOTO :EOF\r
-\r
-:ERROR\r
-echo "Update of Bacula PostgreSQL tables failed."\r
-EXIT /b 1\r
diff --git a/bacula/src/win32/cats/fix_postgresql_tables.sql b/bacula/src/win32/cats/fix_postgresql_tables.sql
deleted file mode 100644 (file)
index 3f1238d..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-\c bacula\r
-\r
-begin;\r
-\r
-alter table media rename column endblock to endblock_old;\r
-alter table media add column endblock bigint;\r
-update media set endblock = endblock_old;\r
-alter table media alter column endblock set not null;\r
-alter table media drop column endblock_old;\r
-\r
-commit;\r
-\r
-vacuum;\r
index e94f3af3bc45f0e9c8edc44a854632ab76f53f90..c37c5d8ac6fea4f68cef6885b4a0ff4889b8dbd0 100644 (file)
@@ -1,14 +1,14 @@
-@echo off\r
-rem\r
-rem Script to grant privileges to the bacula database\r
-rem\r
+@ECHO off\r
+REM\r
+REM Script to grant privileges to the bacula database\r
+REM\r
 \r
-"%SQL_BINDIR%\mysql" -u root -f %* < grant_mysql_privileges.sql\r
-set RESULT=%ERRORLEVEL%\r
-if %RESULT% GTR 0 goto :ERROR\r
-echo "Privileges for bacula granted."\r
-exit /b 0\r
+"@SQL_BINDIR@\mysql" -u root -f %* < "@bin_dir_cmd@\grant_mysql_privileges.sql"\r
+SET RESULT=%ERRORLEVEL%\r
+IF %RESULT% GTR 0 GOTO :ERROR\r
+ECHO Privileges for bacula granted.\r
+EXIT /b 0\r
 \r
 :ERROR\r
-echo "Error creating privileges."\r
-exit /b %RESULT%\r
+ECHO Error creating privileges.\r
+EXIT /b %RESULT%\r
index cdaa4c78b10789d2513d6b8964b259626bd4161a..69e8076833319e9cb471ae809313b69ac5f0e5b2 100644 (file)
@@ -1,15 +1,15 @@
-rem \r
-rem  shell script to grant privileges to the bacula database\r
-rem \r
+@ECHO off\r
+REM\r
+REM  Script to grant privileges to the bacula database\r
+REM\r
 USER=bacula\r
-bindir=@SQL_BINDIR@\r
 \r
-$bindir/psql -f grant_postgresql_privileges.sql -d bacula $*\r
-if ERRORLEVEL 1 GOTO :ERROR\r
-echo "Error creating privileges."\r
+"@SQL_BINDIR@\psql" -f "@bin_dir_cmd@\grant_postgresql_privileges.sql" -d bacula %*\r
+IF ERRORLEVEL 1 GOTO :ERROR\r
+ECHO Error creating privileges.\r
 EXIT /b 0\r
 GOTO :EOF\r
 \r
 :ERROR\r
-echo "Drop of bacula database failed."\r
+ECHO Drop of bacula database failed.\r
 EXIT /b 1\r
diff --git a/bacula/src/win32/cats/make_bdb_tables.cmd b/bacula/src/win32/cats/make_bdb_tables.cmd
deleted file mode 100644 (file)
index ac2142a..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-rem \r
-rem  shell script to create Bacula tables\r
-rem \r
-rem  Nothing to do -- created by Bacula\r
-rem \r
diff --git a/bacula/src/win32/cats/make_catalog_backup.cmd b/bacula/src/win32/cats/make_catalog_backup.cmd
deleted file mode 100644 (file)
index ef0cdea..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-@echo off\r
-rem \r
-rem  This script dumps your Bacula catalog in ASCII format\r
-rem  It works for MySQL, SQLite, and PostgreSQL\r
-rem \r
-rem   %1 is the name of the database to be backed up and the name\r
-rem      of the output file (default = bacula\r
-rem   %2 is the user name with which to access the database\r
-rem      (default = bacula).\r
-rem   %3 is the password with which to access the database or "" if no password\r
-rem      (default "")\r
-rem \r
-rem \r
-@echo on\r
-\r
-cd @working_dir_cmd@\r
-del /f bacula.sql 2>nul\r
-\r
-set MYSQLPASSWORD=\r
-\r
-if not "%3"=="" set MYSQLPASSWORD=--password=%3\r
-"@SQL_BINDIR@\mysqldump" -u %2 %MYSQLPASSWORD% -f --opt %1 >%1.sql\r
-\r
-@echo off\r
-rem \r
-rem   To read back a MySQL database use: \r
-rem      cd @working_dir_cmd@\r
-rem      rd /s /q @SQL_BINDIR@\..\data\bacula\r
-rem      mysql < bacula.sql\r
-rem \r
-rem   To read back a SQLite database use:\r
-rem      cd @working_dir_cmd@\r
-rem      del /f bacula.db\r
-rem      sqlite bacula.db < bacula.sql\r
-rem \r
-rem   To read back a PostgreSQL database use:\r
-rem      cd @working_dir_cmd@\r
-rem      dropdb bacula\r
-rem      createdb bacula\r
-rem      psql bacula < bacula.sql\r
-rem \r
index 1d3906f7a056004f85a4aa6cab041871a0c396cf..bab38d865dec7c1393a6027d70536c5a73247e36 100644 (file)
@@ -1,14 +1,14 @@
-@echo off\r
-rem\r
-rem Script to create Bacula MySQL tables\r
-rem\r
+@ECHO off\r
+REM\r
+REM Script to create Bacula MySQL tables\r
+REM\r
 \r
-"%SQL_BINDIR%\mysql" -f %* < make_mysql_tables.sql\r
-set RESULT=%ERRORLEVEL%\r
-if %RESULT% GTR 0 goto :ERROR\r
-echo "Creation of Bacula MySQL tables succeeded."\r
-exit /b 0\r
+"@SQL_BINDIR@\mysql" -f %* < "@bin_dir_cmd@\make_mysql_tables.sql"\r
+SET RESULT=%ERRORLEVEL%\r
+IF %RESULT% GTR 0 GOTO :ERROR\r
+ECHO Creation of Bacula MySQL tables succeeded.\r
+EXIT /b 0\r
 \r
 :ERROR\r
-echo "Creation of Bacula MySQL tables failed."\r
-exit /b %RESULT%\r
+ECHO Creation of Bacula MySQL tables failed.\r
+EXIT /b %RESULT%\r
index ed2172208270d2d3ee9f37566d40de30b7c89472..0dae458541a3f1f01861cd8c2d443a838b4f9a78 100644 (file)
@@ -1,14 +1,14 @@
-rem \r
-rem  shell script to create Bacula PostgreSQL tables\r
-rem \r
-bindir=@SQL_BINDIR@\r
+@ECHO off\r
+REM\r
+REM  Script to create Bacula PostgreSQL tables\r
+REM\r
 \r
-$bindir/psql -f make_postgresql_tables.sql -d bacula $*\r
-if ERRORLEVEL 1 GOTO :ERROR\r
-echo "Creation of Bacula PostgreSQL tables succeeded."\r
+"@SQL_BINDIR@\psql" -f "@bin_dir_cmd@\make_postgresql_tables.sql" -d bacula %*\r
+IF ERRORLEVEL 1 GOTO :ERROR\r
+ECHO Creation of Bacula PostgreSQL tables succeeded.\r
 EXIT /b 0\r
 GOTO :EOF\r
 \r
 :ERROR\r
-echo "Creation of Bacula PostgreSQL tables failed."\r
+ECHO Creation of Bacula PostgreSQL tables failed.\r
 EXIT /b 1\r
diff --git a/bacula/src/win32/cats/update_bdb_tables.cmd b/bacula/src/win32/cats/update_bdb_tables.cmd
deleted file mode 100644 (file)
index 4d11f8d..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-rem \r
-rem  Shell script to update bdb tables\r
-rem  Nothing to do here.\r
-rem \r
diff --git a/bacula/src/win32/cats/update_mysql_tables.cmd b/bacula/src/win32/cats/update_mysql_tables.cmd
deleted file mode 100644 (file)
index 377d4a1..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-@echo off\r
-rem\r
-rem Script to update MySQL tables from version 1.38 to 1.39\r
-rem\r
-echo.\r
-echo This script will update a Bacula MySQL database from version 9 to 10\r
-echo Depending on the size of your database,\r
-echo this script may take several minutes to run.\r
-echo.\r
-\r
-"%SQL_BINDIR%\mysql" %* -f -u bacula bacula < update_mysql_tables.sql\r
-set RESULT=%ERRORLEVEL%\r
-if %RESULT% GTR 0 goto :ERROR\r
-echo "Update of Bacula MySQL tables succeeded."\r
-exit /b 0\r
-\r
-:ERROR\r
-echo Update of Bacula MySQL tables failed.\r
-exit /b %RESULT%\r
diff --git a/bacula/src/win32/cats/update_mysql_tables.sql b/bacula/src/win32/cats/update_mysql_tables.sql
deleted file mode 100644 (file)
index b48b885..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-USE bacula;\r
-\r
-DROP TABLE IF EXISTS MAC;\r
-DROP TABLE IF EXISTS Log;\r
-DROP TABLE IF EXISTS Location;\r
-DROP TABLE IF EXISTS LocationLog;\r
-\r
-CREATE TABLE Log (\r
-   LogId INTEGER UNSIGNED AUTO_INCREMENT,\r
-   JobId INTEGER UNSIGNED DEFAULT 0 REFERENCES Job,\r
-   Time DATETIME DEFAULT 0,\r
-   LogText BLOB NOT NULL,\r
-   PRIMARY KEY(LogId),\r
-   INDEX (JobId)\r
-   );\r
-\r
-CREATE TABLE Location (\r
-   LocationId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,\r
-   Location TINYBLOB NOT NULL,\r
-   Cost INTEGER DEFAULT 0,\r
-   Enabled TINYINT,\r
-   PRIMARY KEY(LocationId)\r
-   );\r
-\r
-CREATE TABLE LocationLog (\r
-   LocLogId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,\r
-   Date DATETIME DEFAULT 0,\r
-   Comment BLOB,\r
-   MediaId INTEGER UNSIGNED DEFAULT 0 REFERENCES Media,\r
-   LocationId INTEGER UNSIGNED DEFAULT 0 REFERENCES Location,\r
-   NewVolStatus ENUM('Full', 'Archive', 'Append', 'Recycle', 'Purged',\r
-    'Read-Only', 'Disabled', 'Error', 'Busy', 'Used', 'Cleaning') NOT NULL,\r
-   NewEnabled TINYINT,\r
-   PRIMARY KEY(LocLogId)\r
-);\r
-\r
-ALTER TABLE Media ADD COLUMN MediaTypeId INTEGER UNSIGNED DEFAULT 0 REFERENCES MediaType;\r
-ALTER TABLE Media ADD COLUMN DeviceId INTEGER UNSIGNED DEFAULT 0 REFERENCES Device;\r
-ALTER TABLE Media ADD COLUMN LocationId INTEGER UNSIGNED DEFAULT 0 REFERENCES Location;\r
-ALTER TABLE Media ADD COLUMN RecycleCount INTEGER UNSIGNED DEFAULT 0;\r
-ALTER TABLE Media ADD COLUMN InitialWrite DATETIME DEFAULT 0;\r
-ALTER TABLE Media ADD COLUMN ScratchPoolId INTEGER UNSIGNED DEFAULT 0 REFERENCES Pool;\r
-ALTER TABLE Media ADD COLUMN RecyclePoolId INTEGER UNSIGNED DEFAULT 0 REFERENCES Pool;\r
-ALTER TABLE Media ADD COLUMN Enabled TINYINT DEFAULT 1;\r
-ALTER TABLE Media ADD COLUMN Comment BLOB;\r
-\r
-ALTER TABLE JobMedia DROP COLUMN Stripe;\r
-\r
-ALTER TABLE Job ADD COLUMN PriorJobId INTEGER UNSIGNED DEFAULT 0 REFERENCES Job;\r
-ALTER TABLE Job ADD COLUMN RealEndTime DATETIME DEFAULT 0;\r
-\r
-\r
-\r
-DELETE FROM Version;\r
-INSERT INTO Version (VersionId) VALUES (10);\r
diff --git a/bacula/src/win32/cats/update_postgresql_tables.cmd b/bacula/src/win32/cats/update_postgresql_tables.cmd
deleted file mode 100644 (file)
index c3157d3..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-rem \r
-rem  Shell script to update PostgreSQL tables from version 1.38 to 1.39\r
-rem \r
-\r
-echo " "\r
-echo "This script will update a Bacula PostgreSQL database from version 9 to 10"\r
-echo " which is needed to convert from Bacula version 1.38.x to 1.39.x or higher"\r
-echo "Depending on the size of your database,"\r
-echo "this script may take several minutes to run."\r
-echo " "\r
-bindir=@SQL_BINDIR@\r
-\r
-$bindir/psql -f update_postgresql_tables.sql -d bacula $*\r
-if ERRORLEVEL 1 GOTO :ERROR\r
-echo "Update of Bacula PostgreSQL tables succeeded."\r
-EXIT /b 0\r
-GOTO :EOF\r
-\r
-:ERROR\r
-echo "Update of Bacula PostgreSQL tables failed."\r
-EXIT /b 1\r
diff --git a/bacula/src/win32/cats/update_postgresql_tables.sql b/bacula/src/win32/cats/update_postgresql_tables.sql
deleted file mode 100644 (file)
index c1a7042..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-ALTER TABLE media ADD COLUMN DeviceId integer;\r
-UPDATE media SET DeviceId=0;\r
-ALTER TABLE media ADD COLUMN MediaTypeId integer;\r
-UPDATE media SET MediaTypeId=0;\r
-ALTER TABLE media ADD COLUMN LocationId integer;\r
-UPDATE media SET LocationId=0;\r
-ALTER TABLE media ADD COLUMN RecycleCount integer;\r
-UPDATE media SET RecycleCount=0;\r
-ALTER TABLE media ADD COLUMN InitialWrite timestamp without time zone;\r
-ALTER TABLE media ADD COLUMN scratchpoolid integer;\r
-UPDATE media SET scratchpoolid=0;\r
-ALTER TABLE media ADD COLUMN recyclepoolid integer;\r
-UPDATE media SET recyclepoolid=0;\r
-ALTER TABLE media ADD COLUMN enabled integer;\r
-UPDATE media SET enabled=1;\r
-ALTER TABLE media ADD COLUMN Comment TEXT;\r
-\r
-ALTER TABLE job ADD COLUMN RealEndTime timestamp without time zone;\r
-ALTER TABLE job ADD COLUMN PriorJobId integer;\r
-UPDATE job SET PriorJobId=0;\r
-\r
-ALTER TABLE jobmedia DROP COLUMN Stripe;\r
-\r
-CREATE TABLE Location (\r
-   LocationId SERIAL NOT NULL,\r
-   Location TEXT NOT NULL,\r
-   Cost integer default 0,\r
-   Enabled integer,\r
-   PRIMARY KEY (LocationId)\r
-);\r
-\r
-CREATE TABLE LocationLog (\r
-   LocLogId SERIAL NOT NULL,\r
-   Date timestamp   without time zone,\r
-   Comment TEXT NOT NULL,\r
-   MediaId INTEGER DEFAULT 0,\r
-   LocationId INTEGER DEFAULT 0,\r
-   newvolstatus text not null\r
-       check (newvolstatus in ('Full','Archive','Append',\r
-             'Recycle','Purged','Read-Only','Disabled',\r
-             'Error','Busy','Used','Cleaning','Scratch')),\r
-   newenabled smallint,\r
-   PRIMARY KEY(LocLogId)\r
-);\r
-\r
-\r
-CREATE TABLE Log\r
-(\r
-    LogId            serial      not null,\r
-    JobId            integer     not null,\r
-    Time             timestamp   without time zone,\r
-    LogText          text        not null,\r
-    primary key (LogId)\r
-);\r
-create index log_name_idx on Log (JobId);\r
-\r
-\r
-DELETE FROM version;\r
-INSERT INTO version (versionId) VALUES (10);\r
-\r
-vacuum;\r
index e04a4c71e880fa8c8c0475ab2740903fd108b4d0..e481b6d21bf63ac88d98857131ef8bbfcb528467 100644 (file)
@@ -1604,6 +1604,7 @@ GetApplicationName(const char *cmdline, char **pexe, const char **pargs)
    }
 
    *pargs = NULL;
+   *pexe = NULL;
 
    /* 
     * Scan command line looking for path separators (/ and \\) and the 
@@ -1695,17 +1696,16 @@ GetApplicationName(const char *cmdline, char **pexe, const char **pargs)
             if (GetFileAttributes(pPathname) != INVALID_FILE_ATTRIBUTES) {
                break;
             }
+            pPathname[dwBasePathLength] = '\0';
          }
       }
    } else if (!bHasPathSeparators) {
       /* There are no path separators, search in the standard locations */
       dwAltNameLength = SearchPath(NULL, pPathname, NULL, MAX_PATHLENGTH, pAltPathname, NULL);
-      if (dwAltNameLength == 0 || dwAltNameLength > MAX_PATHLENGTH) {
-         return false;
+      if (dwAltNameLength > 0 && dwAltNameLength < MAX_PATHLENGTH) {
+         memcpy(pPathname, pAltPathname, dwAltNameLength);
+         pPathname[dwAltNameLength] = '\0';
       }
-
-      memcpy(pPathname, pAltPathname, dwAltNameLength);
-      pPathname[dwAltNameLength] = '\0';
    }
 
    if (strchr(pPathname, ' ') != NULL) {
@@ -1713,22 +1713,20 @@ GetApplicationName(const char *cmdline, char **pexe, const char **pargs)
 
       if (dwAltNameLength > 0 && dwAltNameLength <= MAX_PATHLENGTH) {
          *pexe = (char *)malloc(dwAltNameLength + 1);
-         if (*pexe != NULL) {
-            memcpy(*pexe, pAltPathname, dwAltNameLength + 1);
-         } else {
+         if (*pexe == NULL) {
             return false;
          }
-      } else {
-         return false;
+         memcpy(*pexe, pAltPathname, dwAltNameLength + 1);
       }
-   } else {
+   }
+
+   if (*pexe == NULL) {
       DWORD dwPathnameLength = strlen(pPathname);
       *pexe = (char *)malloc(dwPathnameLength + 1);
-      if (*pexe != NULL) {
-         memcpy(*pexe, pPathname, dwPathnameLength + 1);
-      } else {
+      if (*pexe == NULL) {
          return false;
       }
+      memcpy(*pexe, pPathname, dwPathnameLength + 1);
    }
 
    return true;
@@ -1762,7 +1760,8 @@ CreateChildProcess(const char *cmdline, HANDLE in, HANDLE out, HANDLE err)
    // setup new process to use supplied handles for stdin,stdout,stderr
    // if supplied handles are not used the send a copy of our STD_HANDLE
    // as appropriate
-   siStartInfo.dwFlags = STARTF_USESTDHANDLES;
+   siStartInfo.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
+   siStartInfo.wShowWindow = SW_SHOWMINNOACTIVE;
 
    if (in != INVALID_HANDLE_VALUE)
       siStartInfo.hStdInput = in;
index 3d6e1990d22b6438056f88e08d7615d13d4fa922..ba0db569a33146d1852e3d90601d0e0bb7937bac 100644 (file)
@@ -78,6 +78,7 @@
                                LinkIncremental="0"\r
                                SuppressStartupBanner="true"\r
                                AdditionalLibraryDirectories="&quot;../../../../depkgs-msvc/lib&quot;;&quot;$(SolutionDir)$(ConfigurationName)&quot;"\r
+                               IgnoreDefaultLibraryNames="msvcrt"\r
                                GenerateDebugInformation="true"\r
                                SubSystem="2"\r
                                TargetMachine="1"\r
index 9efc132f77f584ab9fdaa1b8ba147b9d480ca03a..3a0aecada8a16d6130e432725a83da66e9321ff6 100644 (file)
@@ -73,6 +73,7 @@
                                LinkIncremental="0"\r
                                SuppressStartupBanner="true"\r
                                AdditionalLibraryDirectories="../../../../depkgs-msvc/lib"\r
+                               IgnoreDefaultLibraryNames="msvcrt"\r
                                GenerateDebugInformation="true"\r
                                SubSystem="2"\r
                                TargetMachine="1"\r
index d8dfed4bc85f5e6a8a0bec65cb8f584149dc4cf6..bab23b45cfd366db6367c02b0ab399c41a93abdd 100644 (file)
@@ -301,7 +301,7 @@ int BaculaAppMain()
    pthread_t tid;
    DWORD dwCharsWritten;
 
-   InitWinAPIWrapper();
+   OSDependentInit();
 
    /* If no arguments were given then just run */
    if (p_AttachConsole == NULL || !p_AttachConsole(ATTACH_PARENT_PROCESS)) {
index f120259576e6df4e8424d4a5f41f8e762e765a83..e4b72bfe49eb62b742cd29e4d790da7c55039f6f 100644 (file)
@@ -145,6 +145,16 @@ Function EnterConfigPage2
     IntOp $R7 $R7 - 2
     IntOp $R8 $R8 + 2
 
+    ${If} $ConfigDirectorDB = 0
+      ${If} $MySQLPath != ""
+        StrCpy $ConfigDirectorDB 1
+      ${ElseIf} $PostgreSQLPath != ""
+        StrCpy $ConfigDirectorDB 2
+      ${Else}
+        StrCpy $ConfigDirectorDB 3
+      ${EndIf}
+    ${EndIf}
+
     ${If} $ConfigDirectorDB = 1
       StrCpy $R9 1
     ${Else}
@@ -173,16 +183,6 @@ Function EnterConfigPage2
 
     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
 
@@ -396,11 +396,6 @@ Function EnterConfigPage2
       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
 
     ${If} $AutomaticInstall = 0
       !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorInstallService "ConfigPage2.ini" "Field $R6" "State"
index 91f3e37d4867f1ac49944293fe4bed4478fb25d4..1c7f5bbf4aab9b061842f23e398fb7a38ca6c3c3 100644 (file)
@@ -25,6 +25,15 @@ Function EnterInstallType
       WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 1" "Text" "A previous installation has been found in $OldInstallDir.  Please choose the installation type for any additional components you select."
       WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 5" "Text" "The configuration files for additional components will be generated using defaults applicable to most installations."
       WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 6" "Text" "The configuration defaults for additional components will be displayed and you will be given the chance to make changes before the configuration files are written."
+
+      ReadRegDWORD $ConfigDirectorDB HKLM Software\Bacula Database
+
+      ${If} $ConfigDirectorDB = 0
+        IntOp $R0 $PreviousComponents & ${ComponentDirector}
+        ${If} $R0 <> 0
+          StrCpy $ConfigDirectorDB 1
+        ${EndIf}
+      ${EndIf}
     ${Else}
       ; Processing Upgrade - Get Install Directory
       ${StrRep} $R0 $R0 '"' ''
index c5f449c3820aa79b0cbfde4a4640bca07772add5..45896685b264a87bbf26ee2f04fb981d6c38be3f 100644 (file)
@@ -12,13 +12,8 @@ VERSION := $(shell sed -ne 's/.*[ \t]VERSION[ \t][ \t]*"\(.*\)"/\1/p' < ../../ve
 DEFINES := \
        -DVERSION=$(VERSION) \
        -DOUT_DIR=..\\release \
-       -DDOC_DIR=$(DOCDIR) \
+       -DSRC_DIR=release \
        -DBUILD_TOOLS=MinGW \
-       -DMINGW_BIN=$(MINGW_BIN) \
-       -DDEPKGS_BIN=. \
-       -DBACULA_BIN=. \
-       -DCATS_DIR=..\\cats \
-       -DSCRIPT_DIR=..\\scripts
 
 INSTALL_EXE := ../release/winbacula-$(VERSION).exe
 
@@ -26,7 +21,7 @@ BACULA_BINARIES := \
        bacula.dll \
        cats_mysql.dll \
        cats_pgsql.dll \
-       cats_bdb.dll \
+       cats_sqlite.dll \
        bacula-dir.exe \
        bacula-fd.exe \
        bacula-sd.exe \
@@ -47,6 +42,7 @@ DEPKGS_BINARIES := \
        pthreadGCE.dll \
        ssleay32.dll \
        zlib1.dll \
+       sqlite3.exe \
        openssl.exe \
        loaderinfo.exe \
        mt.exe \
@@ -63,36 +59,38 @@ NONGCC_BINARIES := \
 NONGCC_LIBRARIES := \
        libpq.dll
 
-SCRIPTS := \
-       ../scripts/mtx-changer.cmd \
-       ../cats/create_bdb_database.cmd \
-       ../cats/drop_bdb_database.cmd \
-       ../cats/make_bdb_tables.cmd \
-       ../cats/drop_bdb_tables.cmd \
-       ../cats/update_bdb_tables.cmd \
-       ../cats/grant_bdb_privileges.cmd \
-       ../cats/create_mysql_database.cmd \
-       ../cats/drop_mysql_database.cmd \
-       ../cats/make_mysql_tables.cmd \
-       ../cats/make_mysql_tables.sql \
-       ../cats/drop_mysql_tables.cmd \
-       ../cats/drop_mysql_tables.sql \
-       ../cats/update_mysql_tables.cmd \
-       ../cats/update_mysql_tables.sql \
-       ../cats/grant_mysql_privileges.cmd \
-       ../cats/grant_mysql_privileges.sql \
-       ../cats/create_postgresql_database.cmd \
-       ../cats/drop_postgresql_database.cmd \
-       ../cats/make_postgresql_tables.cmd \
-       ../cats/make_postgresql_tables.sql \
-       ../cats/drop_postgresql_tables.cmd \
-       ../cats/drop_postgresql_tables.sql \
-       ../cats/update_postgresql_tables.cmd \
-       ../cats/update_postgresql_tables.sql \
-       ../cats/grant_postgresql_privileges.cmd \
-       ../cats/grant_postgresql_privileges.sql \
-       ../cats/make_catalog_backup.cmd \
-       ../cats/delete_catalog_backup.cmd
+MINGW_BINARIES := \
+       mingwm10.dll
+
+SCRIPT_FILES := \
+       mtx-changer.cmd
+
+CAT_FILES := \
+       create_mysql_database.cmd \
+       drop_mysql_database.cmd \
+       make_mysql_tables.cmd \
+       make_mysql_tables.sql \
+       drop_mysql_tables.cmd \
+       drop_mysql_tables.sql \
+       grant_mysql_privileges.cmd \
+       grant_mysql_privileges.sql \
+       make_mysql_catalog_backup.cmd \
+       create_postgresql_database.cmd \
+       drop_postgresql_database.cmd \
+       make_postgresql_tables.cmd \
+       make_postgresql_tables.sql \
+       drop_postgresql_tables.cmd \
+       drop_postgresql_tables.sql \
+       grant_postgresql_privileges.cmd \
+       grant_postgresql_privileges.sql \
+       make_postgresql_catalog_backup.cmd \
+       create_sqlite3_database.cmd \
+       drop_sqlite3_database.cmd \
+       make_sqlite3_tables.cmd \
+       drop_sqlite3_tables.cmd \
+       grant_sqlite3_privileges.cmd \
+       make_sqlite3_catalog_backup.cmd \
+       delete_catalog_backup.cmd
 
 DIRD_FILES := \
        query.sql
@@ -100,6 +98,12 @@ DIRD_FILES := \
 SSL_FILES := \
        openssl.cnf
 
+DOC_FILES := \
+       manual/bacula.pdf \
+       manual/bacula/*.html \
+       manual/bacula/*.png  \
+       manual/bacula/*.css
+
 ##########################################################################
 
 # Targets
@@ -112,26 +116,32 @@ installer:        $(INSTALL_EXE)
 
 clean:
        @echo "Cleaning `pwd`"
-       $(CMD_ECHO)-rm -f $(INSTALL_EXE) $(BACULA_BINARIES) $(DEPKGS_BINARIES) $(NONGCC_BINARIES) $(NONGCC_LIBRARIES) $(SSL_FILES) $(DIRD_FILES)
-       $(CMD_ECHO)-rm -f $(BACULA_BINARIES) $(addsuffix .dbg,$(basename $(BACULA_BINARIES)))
-       $(CMD_ECHO)-rm -f $(DEPKGS_BINARIES) $(addsuffix .dbg,$(basename $(DEPKGS_BINARIES)))
-       $(CMD_ECHO)-rm -f *.exe
+       $(CMD_ECHO)-rm -f $(INSTALL_EXE)
+       $(CMD_ECHO)-rm -rf release
 
 #
 # Rules
 #
 
 define Convert_Binary
-$$(notdir $(1)): $(1)
+release/$$(notdir $(1)): $(1)
+       $$(call checkdir,$$@)
        $(ECHO_CMD)cp -f $$^ $$@ ; \
        $(STAB2CV) $$@
 endef
 
 define Copy_Binary
-$$(notdir $(1)): $(1)
+release/$$(notdir $(1)): $(1)
+       $$(call checkdir,$$@)
        $(ECHO_CMD)cp -f $$^ $$@
 endef
 
+define Copy_Docs
+release/$(1): $(DOCDIR)/$(1)
+       $$(call checkdir,$$@)
+       $(ECHO_CMD)cp -f $$^ $$(dir $$@)
+endef
+
 $(foreach file,$(addprefix $(DEPKGS)/bin/, $(DEPKGS_BINARIES)),$(eval $(call Convert_Binary,$(file))))
 
 $(foreach file,$(addprefix $(DEPKGS)/bin/, $(NONGCC_BINARIES)),$(eval $(call Copy_Binary,$(file))))
@@ -140,11 +150,19 @@ $(foreach file,$(addprefix $(DEPKGS)/lib/, $(NONGCC_LIBRARIES)),$(eval $(call Co
 
 $(foreach file,$(addprefix $(BINDIR)/, $(BACULA_BINARIES)),$(eval $(call Convert_Binary,$(file))))
 
+$(foreach file,$(addprefix $(MINGW_DLLDIR)/, $(MINGW_BINARIES)),$(eval $(call Copy_Binary,$(file))))
+
 $(foreach file,$(addprefix $(DEPKGS)/ssl/, $(SSL_FILES)),$(eval $(call Copy_Binary,$(file))))
 
+$(foreach file,$(addprefix ../scripts/, $(SCRIPT_FILES)),$(eval $(call Copy_Binary,$(file))))
+
+$(foreach file,$(addprefix ../cats/, $(CAT_FILES)),$(eval $(call Copy_Binary,$(file))))
+
 $(foreach file,$(addprefix ../../dird/, $(DIRD_FILES)),$(eval $(call Copy_Binary,$(file))))
 
-$(INSTALL_EXE): winbacula.nsi $(BACULA_BINARIES) $(SCRIPTS) $(DEPKGS_BINARIES) $(NONGCC_BINARIES) $(NONGCC_LIBRARIES) $(SSL_FILES) $(DIRD_FILES)
+$(foreach file,$(DOC_FILES),$(eval $(call Copy_Docs,$(file))))
+
+$(INSTALL_EXE): winbacula.nsi $(addprefix release/,$(BACULA_BINARIES) $(SCRIPT_FILES) $(CAT_FILES) $(DEPKGS_BINARIES) $(NONGCC_BINARIES) $(NONGCC_LIBRARIES) $(MINGW_BINARIES) $(SSL_FILES) $(DIRD_FILES) $(DOC_FILES))
        NSISDIR=$(NSIS_DIR) \
        $(NSIS_DIR)/makensis -V3 $(DEFINES) winbacula.nsi
 
index a65bf1ed1baf3b0dd90d77ed8bcf3d797118a65a..91bfe65fe756f2d5645972e7fc104efe0862808c 100644 (file)
@@ -108,7 +108,7 @@ FileSet {
 #    directory to give a reasonable FileSet to backup to
 #    disk storage during initial testing.
 #
-    File = "C:/Program Files/Bacula"
+    File = "@BUILD_DIR@"
   }
 
 #
index d5e7834a1cbc93e838bef32c0e24b276dea93e32..3a09eb4198440830acaa2b1c7e05aa1efa937f97 100644 (file)
@@ -45,7 +45,7 @@ Director {
 Device {
   Name = FileStorage
   Media Type = File
-  Archive Device = "C:\\Temp"
+  Archive Device = "C:\\Tmp"
   LabelMedia = yes                   # lets Bacula label unlabeled media
   Random Access = Yes
   AutomaticMount = yes               # when device opened, read it
index 0415cf2aeff969b8fd9f085b86dc47cf49df5872..c9ed4d103348062d29b175ed9ac7d6ff8c28db8c 100644 (file)
@@ -1,7 +1,71 @@
 @ECHO OFF
 SETLOCAL
-PATH ..\..\..\..\depkgs-msvc\nsis;..\..\..\..\depkgs-msvc\tools;%PATH%
+
+SET CWD=%CD%
+CD %1..\..\..
+SET TOP_DIR=%CD%
+CD %CWD%
+SET DEPKG_DIR=%TOP_DIR%\depkgs-msvc
+SET DOCS_DIR=%TOP_DIR%\docs\manual
+
+SET BACULA_DLLS=bacula.dll cats_mysql.dll cats_pgsql.dll cats_sqlite.dll
+SET BACULA_EXES=bacula-dir.exe bacula-fd.exe bacula-sd.exe bconsole.exe wx-console.exe
+SET BACULA_TOOLS=bcopy.exe bextract.exe bls.exe bscan.exe bsleep.exe bsmtp.exe btape.exe dbcheck.exe scsilist.exe
+
+SET DEP_DLLS=libeay32.dll pthreadVCE.dll ssleay32.dll zlib1.dll zlib1.dll.manifest wxbase270_vc_bacula.dll wxmsw270_core_vc_bacula.dll libmysql.dll libpq.dll comerr32.dll libintl-2.dll libiconv-2.dll krb5_32.dll
+SET DEP_EXES=openssl.exe loaderinfo.exe mt.exe mtx.exe scsitape.exe sed.exe tapeinfo.exe sqlite3.exe sqlite3.exe.manifest
+
+SET SCRIPTS=mtx-changer.cmd 
+SET CATS_MYSQL_CMD=create_mysql_database.cmd drop_mysql_database.cmd make_mysql_tables.cmd drop_mysql_tables.cmd grant_mysql_privileges.cmd
+SET CATS_MYSQL_SQL=make_mysql_tables.sql drop_mysql_tables.sql grant_mysql_privileges.sql
+SET CATS_PGSQL_CMD=create_postgresql_database.cmd drop_postgresql_database.cmd make_postgresql_tables.cmd drop_postgresql_tables.cmd grant_postgresql_privileges.cmd
+SET CATS_PGSQL_SQL=make_postgresql_tables.sql drop_postgresql_tables.sql grant_postgresql_privileges.sql
+SET CATS_SQLITE_CMD=create_sqlite3_database.cmd drop_sqlite3_database.cmd make_sqlite3_tables.cmd drop_sqlite3_tables.cmd grant_sqlite3_privileges.cmd
+SET CATS_SQLITE_SQL=make_sqlite3_tables.sql
+SET CATS_CATALOG=make_mysql_catalog_backup.cmd make_postgresql_catalog_backup.cmd make_sqlite3_catalog_backup.cmd delete_catalog_backup.cmd
+SET DIRD_FILES=query.sql
+SET SSL_FILES=openssl.cnf
+
+SET DOC_PDF_FILES=%DOCS_DIR%\bacula.pdf %DOCS_DIR%\bacula\*.html %DOCS_DIR%\bacula\*.png %DOCS_DIR%\bacula\*.css
+SET DOC_HTML_FILES=%DOCS_DIR%\bacula\*.html %DOCS_DIR%\bacula\*.png %DOCS_DIR%\bacula\*.css
+
+FOR %%i in ( %BACULA_DLLS% )     DO COPY %1%2\%%i %1installer\%2
+FOR %%i in ( %BACULA_EXES% )     DO COPY %1%2\%%i %1installer\%2
+FOR %%i in ( %BACULA_TOOLS% )    DO COPY %1%2\%%i %1installer\%2
+
+FOR %%i in ( %DEP_DLLS% )        DO COPY %DEPKG_DIR%\bin\%%i %1installer\%2
+FOR %%i in ( %DEP_EXES% )        DO COPY %DEPKG_DIR%\bin\%%i %1installer\%2
+
+FOR %%i in ( %SCRIPTS% )         DO COPY %1scripts\%%i %1installer\%2
+FOR %%i in ( %CATS_MYSQL_CMD% )  DO COPY %1cats\%%i %1installer\%2
+FOR %%i in ( %CATS_MYSQL_SQL% )  DO COPY %1cats\%%i %1installer\%2
+FOR %%i in ( %CATS_PGSQL_CMD% )  DO COPY %1cats\%%i %1installer\%2
+FOR %%i in ( %CATS_PGSQL_SQL% )  DO COPY %1cats\%%i %1installer\%2
+FOR %%i in ( %CATS_SQLITE_CMD% ) DO COPY %1cats\%%i %1installer\%2
+FOR %%i in ( %CATS_SQLITE_SQL% ) DO COPY %1cats\%%i %1installer\%2
+
+FOR %%i in ( %CATS_CATALOG% )    DO COPY %1cats\%%i %1installer\%2
+
+FOR %%i in ( %DIRD_FILES% )      DO COPY %1..\dird\%%i %1installer\%2
+FOR %%i in ( %SSL_FILES% )       DO COPY %DEPKG_DIR%\%%i %1installer\%2
+
+IF NOT EXIST %1installer\%2\manual MKDIR %1installer\%2\manual
+FOR %%i in ( %DOC_PDF_FILES% )   DO COPY %%i %1installer\%2\manual
+
+IF NOT EXIST %1installer\%2\manual\bacula MKDIR %1installer\%2\manual\bacula
+FOR %%i in ( %DOC_HTML_FILES% )  DO COPY %%i %1installer\%2\manual\bacula
+
+COPY %4\x86\Microsoft.VC80.CRT\msvcm80.dll %1installer\%2
+COPY %4\x86\Microsoft.VC80.CRT\msvcp80.dll %1installer\%2
+COPY %4\x86\Microsoft.VC80.CRT\msvcr80.dll %1installer\%2
+COPY %4\x86\Microsoft.VC80.CRT\Microsoft.VC80.CRT.manifest %1installer\%2
+COPY %4\Debug_NonRedist\x86\Microsoft.VC80.DebugCRT\msvcm80d.dll %1installer\%2
+COPY %4\Debug_NonRedist\x86\Microsoft.VC80.DebugCRT\msvcp80d.dll %1installer\%2
+COPY %4\Debug_NonRedist\x86\Microsoft.VC80.DebugCRT\msvcr80d.dll %1installer\%2
+COPY %4\Debug_NonRedist\x86\Microsoft.VC80.DebugCRT\Microsoft.VC80.DebugCRT.manifest %1installer\%2
+
+PATH %DEPKG_DIR%\nsis;%DEPKG_DIR%\tools;%PATH%
+
 FOR /F %%i IN ( 'sed -ne "s/.*[ \t]VERSION[ \t][ \t]*\x22\(.*\)\x22/\1/p" ^< ..\..\version.h' ) DO @SET VERSION=%%i 
-makensis /V3 /DVERSION=%VERSION% /DOUT_DIR=%1%2 /DDOC_DIR=..\..\..\..\docs /DBUILD_TOOLS=%3 /DVC_REDIST_DIR=%4 /DDEPKGS_BIN=..\..\..\..\depkgs-msvc\bin /DBACULA_BIN=..\%2 /DCATS_DIR=..\cats /DSCRIPT_DIR=..\scripts winbacula.nsi
+makensis /V3 /DVERSION=%VERSION% /DSRC_DIR=%1installer\%2 /DOUT_DIR=%1%2 /DBUILD_TOOLS=%3 winbacula.nsi
 EXIT /B %ERRORLEVEL%
-ENDLOCAL
index 6005bc06c046a3fb3065bf0b7ff4cac0e95f429a..a50649c2766c92cea86340ce63b304b95c99dd56 100644 (file)
@@ -30,7 +30,6 @@
 ;
 ; Command line options:
 ;
-; /cygwin     -  do cygwin install into c:\cygwin\bacula
 ; /service    - 
 ; /start
 
@@ -109,13 +108,11 @@ DirText "Setup will install Bacula ${VERSION} to the directory specified below.
 ;
 ; Global Variables
 ;
-Var OptCygwin
 Var OptService
 Var OptStart
 Var OptSilent
 
 Var CommonFilesDone
-Var DatabaseDone
 
 Var OsIsNT
 
@@ -152,6 +149,11 @@ Var ConfigMonitorPassword
 Var LocalDirectorPassword
 Var LocalHostAddress
 
+Var MySQLPath
+Var MySQLVersion
+Var PostgreSQLPath
+Var PostgreSQLVersion
+
 Var AutomaticInstall
 Var InstallType
 !define NewInstall      0
@@ -192,26 +194,23 @@ Function .onInit
   Push $R1
 
   ; Process Command Line Options
-  StrCpy $OptCygwin 0
   StrCpy $OptService 1
   StrCpy $OptStart 1
   StrCpy $OptSilent 0
   StrCpy $CommonFilesDone 0
-  StrCpy $DatabaseDone 0
   StrCpy $OsIsNT 0
   StrCpy $AutomaticInstall 0
   StrCpy $InstallType ${NewInstall}
   StrCpy $OldInstallDir ""
   StrCpy $PreviousComponents 0
   StrCpy $NewComponents 0
+  StrCpy $MySQLPath ""
+  StrCpy $MySQLVersion ""
+  StrCpy $PostgreSQLPath ""
+  StrCpy $PostgreSQLVersion ""
 
   ${GetParameters} $R0
 
-  ClearErrors
-  ${GetOptions} $R0 "/cygwin" $R1
-  IfErrors +2
-    StrCpy $OptCygwin 1
-
   ClearErrors
   ${GetOptions} $R0 "/noservice" $R1
   IfErrors +2
@@ -225,10 +224,6 @@ Function .onInit
   IfSilent 0 +2
     StrCpy $OptSilent 1
 
-  ${If} $OptCygwin = 1
-    StrCpy $INSTDIR "C:\cygwin\bacula"
-  ${EndIf}
-
   ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
   ${If} $R0 != ""
     StrCpy $OsIsNT 1
@@ -243,38 +238,40 @@ Function .onInit
   Call GetUserName
   Pop $ConfigDirectorMailAddress
 
+  Call FindDatabaseApps
+
   ; Configuration Defaults
 
-  StrCpy $ConfigClientName              "$HostName-fd"
-  StrCpy $ConfigClientPort              "9102"
-  StrCpy $ConfigClientMaxJobs           "2"
+  StrCpy $ConfigClientName               "$HostName-fd"
+  StrCpy $ConfigClientPort               9102
+  StrCpy $ConfigClientMaxJobs            2
   ;StrCpy $ConfigClientPassword
-  StrCpy $ConfigClientInstallService    "$OptService"
-  StrCpy $ConfigClientStartService      "$OptStart"
+  StrCpy $ConfigClientInstallService     "$OptService"
+  StrCpy $ConfigClientStartService       "$OptStart"
 
-  StrCpy $ConfigStorageName             "$HostName-sd"
-  StrCpy $ConfigStoragePort             "9103"
-  StrCpy $ConfigStorageMaxJobs          "10"
+  StrCpy $ConfigStorageName              "$HostName-sd"
+  StrCpy $ConfigStoragePort              9103
+  StrCpy $ConfigStorageMaxJobs           10
   ;StrCpy $ConfigStoragePassword
-  StrCpy $ConfigStorageInstallService   "$OptService"
-  StrCpy $ConfigStorageStartService     "$OptStart"
+  StrCpy $ConfigStorageInstallService    "$OptService"
+  StrCpy $ConfigStorageStartService      "$OptStart"
 
   ;StrCpy $ConfigDirectorName            "$HostName-dir"
-  StrCpy $ConfigDirectorPort            "9101"
-  StrCpy $ConfigDirectorMaxJobs         "1"
+  StrCpy $ConfigDirectorPort             9101
+  StrCpy $ConfigDirectorMaxJobs          1
   ;StrCpy $ConfigDirectorPassword
-  StrCpy $ConfigDirectorDB              "1"
-  StrCpy $ConfigDirectorInstallService  "$OptService"
-  StrCpy $ConfigDirectorStartService    "$OptStart"
+  StrCpy $ConfigDirectorDB               0
+  StrCpy $ConfigDirectorInstallService   "$OptService"
+  StrCpy $ConfigDirectorStartService     "$OptStart"
 
-  StrCpy $ConfigMonitorName            "$HostName-mon"
+  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"
+  File "/oname=$PLUGINSDIR\openssl.exe"  "${SRC_DIR}\openssl.exe"
+  File "/oname=$PLUGINSDIR\libeay32.dll" "${SRC_DIR}\libeay32.dll"
+  File "/oname=$PLUGINSDIR\ssleay32.dll" "${SRC_DIR}\ssleay32.dll"
+  File "/oname=$PLUGINSDIR\sed.exe"      "${SRC_DIR}\sed.exe"
 
   !InsertMacro MUI_INSTALLOPTIONS_EXTRACT "InstallType.ini"
   !InsertMacro MUI_INSTALLOPTIONS_EXTRACT "WriteTemplates.ini"
@@ -338,45 +335,41 @@ Function InstallCommonFiles
 
     SetOutPath "$INSTDIR\bin"
 !if "${BUILD_TOOLS}" == "VC8"
-    File "${VC_REDIST_DIR}\x86\Microsoft.VC80.CRT\msvcm80.dll"
-    File "${VC_REDIST_DIR}\x86\Microsoft.VC80.CRT\msvcp80.dll"
-    File "${VC_REDIST_DIR}\x86\Microsoft.VC80.CRT\msvcr80.dll"
-    File "${VC_REDIST_DIR}\x86\Microsoft.VC80.CRT\Microsoft.VC80.CRT.manifest"
-    File "${DEPKGS_BIN}\pthreadVCE.dll"
+    File "${SRC_DIR}\msvcm80.dll"
+    File "${SRC_DIR}\msvcp80.dll"
+    File "${SRC_DIR}\msvcr80.dll"
+    File "${SRC_DIR}\Microsoft.VC80.CRT.manifest"
+    File "${SRC_DIR}\pthreadVCE.dll"
 !endif
 !if "${BUILD_TOOLS}" == "VC8_DEBUG"
-    File "${VC_REDIST_DIR}\x86\Microsoft.VC80.CRT\msvcm80.dll"
-    File "${VC_REDIST_DIR}\x86\Microsoft.VC80.CRT\msvcp80.dll"
-    File "${VC_REDIST_DIR}\x86\Microsoft.VC80.CRT\msvcr80.dll"
-    File "${VC_REDIST_DIR}\x86\Microsoft.VC80.CRT\Microsoft.VC80.CRT.manifest"
-    File "${VC_REDIST_DIR}\Debug_NonRedist\x86\Microsoft.VC80.DebugCRT\msvcm80d.dll"
-    File "${VC_REDIST_DIR}\Debug_NonRedist\x86\Microsoft.VC80.DebugCRT\msvcp80d.dll"
-    File "${VC_REDIST_DIR}\Debug_NonRedist\x86\Microsoft.VC80.DebugCRT\msvcr80d.dll"
-    File "${VC_REDIST_DIR}\Debug_NonRedist\x86\Microsoft.VC80.DebugCRT\Microsoft.VC80.DebugCRT.manifest"
-    File "${DEPKGS_BIN}\pthreadVCE.dll"
+    File "${SRC_DIR}\msvcm80.dll"
+    File "${SRC_DIR}\msvcp80.dll"
+    File "${SRC_DIR}\msvcr80.dll"
+    File "${SRC_DIR}\Microsoft.VC80.CRT.manifest"
+    File "${SRC_DIR}\msvcm80d.dll"
+    File "${SRC_DIR}\msvcp80d.dll"
+    File "${SRC_DIR}\msvcr80d.dll"
+    File "${SRC_DIR}\Microsoft.VC80.DebugCRT.manifest"
+    File "${SRC_DIR}\pthreadVCE.dll"
 !endif
 !if "${BUILD_TOOLS}" == "MinGW"
-    File "${MINGW_BIN}\..\mingw32\bin\mingwm10.dll"
-    File "${DEPKGS_BIN}\pthreadGCE.dll"
+    File "${SRC_DIR}\mingwm10.dll"
+    File "${SRC_DIR}\pthreadGCE.dll"
 !endif
-    File "${DEPKGS_BIN}\libeay32.dll"
-    File "${DEPKGS_BIN}\ssleay32.dll"
-    File "${DEPKGS_BIN}\zlib1.dll"
+    File "${SRC_DIR}\libeay32.dll"
+    File "${SRC_DIR}\ssleay32.dll"
+    File "${SRC_DIR}\zlib1.dll"
 !if "${BUILD_TOOLS}" == "VC8"
-    File "${DEPKGS_BIN}\zlib1.dll.manifest"
-    File "/oname=$INSTDIR\openssl.cnf" "${DEPKGS_BIN}\..\openssl.cnf"
+    File "${SRC_DIR}\zlib1.dll.manifest"
 !endif
 !If "${BUILD_TOOLS}" == "VC8_DEBUG"
-    File "${DEPKGS_BIN}\zlib1.dll.manifest"
-    File "/oname=$INSTDIR\openssl.cnf" "${DEPKGS_BIN}\..\openssl.cnf"
-!endif
-!if "${BUILD_TOOLS}" == "MinGW"
-    File "/oname=$INSTDIR\openssl.cnf" "${DEPKGS_BIN}\openssl.cnf"
+    File "${SRC_DIR}\zlib1.dll.manifest"
 !endif
-    File "${DEPKGS_BIN}\openssl.exe"
-    File "${BACULA_BIN}\bsleep.exe"
-    File "${BACULA_BIN}\bsmtp.exe"
-    File "${BACULA_BIN}\bacula.dll"
+    File "/oname=$INSTDIR\openssl.cnf" "${SRC_DIR}\openssl.cnf"
+    File "${SRC_DIR}\openssl.exe"
+    File "${SRC_DIR}\bsleep.exe"
+    File "${SRC_DIR}\bsmtp.exe"
+    File "${SRC_DIR}\bacula.dll"
 
     CreateShortCut "$SMPROGRAMS\Bacula\Documentation\View Readme.lnk" "write.exe" '"$INSTDIR\Readme.txt"'
 
@@ -384,43 +377,22 @@ Function InstallCommonFiles
   ${EndIf}
 FunctionEnd
 
-Function InstallDatabase
-  SetOutPath "$INSTDIR\bin"
-
-  ${If} $DatabaseDone = 0
-    ${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 "${DEPKGS_BIN}\comerr32.dll"
-      File "${DEPKGS_BIN}\libintl-2.dll"
-      File "${DEPKGS_BIN}\libiconv-2.dll"
-      File "${DEPKGS_BIN}\krb5_32.dll"
-!endif
-!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
+Section "-Initialize"
+  ${If} $MySQLPath != ""
+    DetailPrint "Found MySQL (version $MySQLVersion)"
+  ${EndIf}
+  ${If} $PostgreSQLPath != ""
+    DetailPrint "Found PostgreSQL (version $PostgreSQLVersion)"
   ${EndIf}
-FunctionEnd
 
-Section "-Initialize"
   WriteRegStr   HKLM Software\Bacula InstallLocation "$INSTDIR"
 
   Call GetSelectedComponents
   Pop $R2
   WriteRegDWORD HKLM Software\Bacula Components $R2
 
+  WriteRegDWORD HKLM Software\Bacula Database $ConfigDirectorDB
+
   ; remove start menu items
   SetShellVarContext all
 
@@ -470,6 +442,9 @@ Section "-Initialize"
   ${StrRep} $R2 "$INSTDIR\bin" "\" "\\"
   FileWrite $R1 's;@bin_dir_cmd@;$R2;$\r$\n'
 
+  ${StrRep} $R2 "$INSTDIR" "\" "/"
+  FileWrite $R1 "s;@BUILD_DIR@;$R2;$\r$\n"
+
   Call IsDirectorSelected
   Pop $R2
   ${If} $R2 = 1
@@ -532,6 +507,18 @@ Section "-Initialize"
     FileWrite $R1 "s;@monitor_password@;$ConfigMonitorPassword;$\r$\n"
   ${EndIf}
 
+  ${If} $ConfigDirectorDB = 1
+    ${If} $MySQLPath != ""
+      ${StrRep} $R2 "$MySQLPath\bin" "\" "\\"
+      FileWrite $R1 "s;@SQL_BINDIR@;$R2;$\r$\n"
+    ${EndIf}
+  ${ElseIf} $ConfigDirectorDB = 2
+    ${If} $PostgreSQLPath != ""
+      ${StrRep} $R2 "$PostgreSQLPath\bin" "\" "\\"
+      FileWrite $R1 "s;@SQL_BINDIR@;$R2;$\r$\n"
+    ${EndIf}
+  ${EndIf}
+
   FileClose $R1
 
   ${If} $InstallType = ${MigrateInstall}
@@ -569,23 +556,18 @@ Section "File Service" SecFileDaemon
 
   SetOutPath "$INSTDIR\bin"
 
-  File "${BACULA_BIN}\bacula-fd.exe"
+  File "${SRC_DIR}\bacula-fd.exe"
 
   ${If} $InstallType = ${MigrateInstall}
   ${AndIf} ${FileExists} "$OldInstallDir\bin\bacula-fd.conf"
     CopyFiles "$OldInstallDir\bin\bacula-fd.conf" "$APPDATA\Bacula"
     nsExec::ExecToLog '$PLUGINSDIR\sed.exe -f "$PLUGINSDIR\migrate.sed" -i.bak "$APPDATA\Bacula\bacula-fd.conf"'
   ${Else}
-    ${Unless} ${FileExists} "$APPDATA\Bacula\bacula-fd.conf"
-      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" "$APPDATA\Bacula\bacula-fd.conf"
-    ${EndUnless}
-  ${EndIf}
+    File "/oname=$PLUGINSDIR\bacula-fd.conf" "bacula-fd.conf.in"
 
-  ${If} $OsIsNT = 1
-    nsExec::ExecToLog 'cmd.exe /C echo Y|cacls "$R1" /G SYSTEM:F Administrators:F'
+    StrCpy $0 "$APPDATA\Bacula"
+    StrCpy $1 bacula-fd.conf
+    Call ConfigEditAndCopy
   ${EndIf}
 
   StrCpy $0 bacula-fd
@@ -607,36 +589,30 @@ Section "Storage Service" SecStorageDaemon
 
   SetOutPath "$INSTDIR\bin"
 
-  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"
-
-  ${Unless} ${FileExists} "${BACULA_BIN}\mtx-changer.cmd"
-    File "/oname=$PLUGINSDIR\mtx-changer.cmd" "${SCRIPT_DIR}\mtx-changer.cmd"
-
-    nsExec::ExecToLog '$PLUGINSDIR\sed.exe -f "$PLUGINSDIR\config.sed" -i.bak "$PLUGINSDIR\mtx-changer.cmd"'
-    CopyFiles "$PLUGINSDIR\mtx-changer.cmd" "$INSTDIR\bin\mtx-changer.cmd"
-  ${EndUnless}
-
-  ${Unless} ${FileExists} "$APPDATA\Bacula\bacula-sd.conf"
-    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" "$APPDATA\Bacula\bacula-sd.conf"
-  ${EndUnless}
+  File "${SRC_DIR}\loaderinfo.exe"
+  File "${SRC_DIR}\mt.exe"
+  File "${SRC_DIR}\mtx.exe"
+  File "${SRC_DIR}\scsitape.exe"
+  File "${SRC_DIR}\tapeinfo.exe"
+  File "${SRC_DIR}\bacula-sd.exe"
+  File "${SRC_DIR}\bcopy.exe"
+  File "${SRC_DIR}\bextract.exe"
+  File "${SRC_DIR}\bls.exe"
+  File "${SRC_DIR}\bscan.exe"
+  File "${SRC_DIR}\btape.exe"
+  File "${SRC_DIR}\scsilist.exe"
 
-  ${If} $OsIsNT = 1
-    nsExec::ExecToLog 'cmd.exe /C echo Y|cacls "$R1" /G SYSTEM:F Administrators:F'
-  ${EndIf}
+  File "/oname=$PLUGINSDIR\mtx-changer.cmd" "${SRC_DIR}\mtx-changer.cmd"
+
+  StrCpy $0 "$INSTDIR\bin"
+  StrCpy $1 mtx-changer.cmd
+  Call ConfigEditAndCopy
+
+  File "/oname=$PLUGINSDIR\bacula-sd.conf" "bacula-sd.conf.in"
+
+  StrCpy $0 "$APPDATA\Bacula"
+  StrCpy $1 bacula-sd.conf
+  Call ConfigEditAndCopy
 
   StrCpy $0 bacula-sd
   StrCpy $1 "Storage Service"
@@ -653,61 +629,94 @@ Section "Director Service" SecDirectorDaemon
 
   SetOutPath "$INSTDIR\bin"
 
-  Call InstallDatabase
-  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
+    File /oname=bacula_cats.dll "${SRC_DIR}\cats_mysql.dll"
+    File "${SRC_DIR}\libmysql.dll"
+    File /oname=$PLUGINSDIR\create_database.cmd ${SRC_DIR}\create_mysql_database.cmd
+    File /oname=$PLUGINSDIR\drop_database.cmd ${SRC_DIR}\drop_mysql_database.cmd
+    File /oname=$PLUGINSDIR\make_tables.cmd ${SRC_DIR}\make_mysql_tables.cmd
+    File ${SRC_DIR}\make_mysql_tables.sql
+    File /oname=$PLUGINSDIR\drop_tables.cmd ${SRC_DIR}\drop_mysql_tables.cmd
+    File ${SRC_DIR}\drop_mysql_tables.sql
+    File /oname=$PLUGINSDIR\grant_privileges.cmd ${SRC_DIR}\grant_mysql_privileges.cmd
+    File ${SRC_DIR}\grant_mysql_privileges.sql
+    File /oname=$PLUGINSDIR\make_catalog_backup.cmd ${SRC_DIR}\make_mysql_catalog_backup.cmd
   ${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 = 4
-    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
+    File /oname=bacula_cats.dll "${SRC_DIR}\cats_pgsql.dll"
+    File "${SRC_DIR}\libpq.dll"
+!if "${BUILD_TOOLS}" == "VC8"
+    File "${SRC_DIR}\comerr32.dll"
+    File "${SRC_DIR}\libintl-2.dll"
+    File "${SRC_DIR}\libiconv-2.dll"
+    File "${SRC_DIR}\krb5_32.dll"
+!endif
+!If "${BUILD_TOOLS}" == "VC8_DEBUG"
+    File "${SRC_DIR}\comerr32.dll"
+    File "${SRC_DIR}\libintl-2.dll"
+    File "${SRC_DIR}\libiconv-2.dll"
+    File "${SRC_DIR}\krb5_32.dll"
+!endif
+    File /oname=$PLUGINSDIR\create_database.cmd ${SRC_DIR}\create_postgresql_database.cmd
+    File /oname=$PLUGINSDIR\drop_database.cmd ${SRC_DIR}\drop_postgresql_database.cmd
+    File /oname=$PLUGINSDIR\make_tables.cmd ${SRC_DIR}\make_postgresql_tables.cmd
+    File ${SRC_DIR}\make_postgresql_tables.sql
+    File /oname=$PLUGINSDIR\drop_tables.cmd ${SRC_DIR}\drop_postgresql_tables.cmd
+    File ${SRC_DIR}\drop_postgresql_tables.sql
+    File /oname=$PLUGINSDIR\grant_privileges.cmd ${SRC_DIR}\grant_postgresql_privileges.cmd
+    File ${SRC_DIR}\grant_postgresql_privileges.sql
+    File /oname=$PLUGINSDIR\make_catalog_backup.cmd ${SRC_DIR}\make_postgresql_catalog_backup.cmd
+  ${ElseIf} $ConfigDirectorDB = 3
+    File "${SRC_DIR}\sqlite3.exe"
+!if "${BUILD_TOOLS}" == "VC8"
+    File "${SRC_DIR}\sqlite3.exe.manifest"
+!endif
+!If "${BUILD_TOOLS}" == "VC8_DEBUG"
+    File "${SRC_DIR}\sqlite3.exe.manifest"
+!endif
+    File /oname=bacula_cats.dll "${SRC_DIR}\cats_sqlite.dll"
+    File /oname=$PLUGINSDIR\create_database.cmd ${SRC_DIR}\create_sqlite3_database.cmd
+    File /oname=$PLUGINSDIR\drop_database.cmd ${SRC_DIR}\drop_sqlite3_database.cmd
+    File /oname=$PLUGINSDIR\make_tables.cmd ${SRC_DIR}\make_sqlite3_tables.cmd
+    File /oname=$PLUGINSDIR\drop_tables.cmd ${SRC_DIR}\drop_sqlite3_tables.cmd
+    File /oname=$PLUGINSDIR\grant_privileges.cmd ${SRC_DIR}\grant_sqlite3_privileges.cmd
+    File /oname=$PLUGINSDIR\make_catalog_backup.cmd ${SRC_DIR}\make_sqlite3_catalog_backup.cmd
   ${EndIf}
-  ${Unless} ${FileExists} "$INSTDIR\bin\make_catalog_backup.cmd"
-    File "/oname=$PLUGINSDIR\make_catalog_backup.cmd" "${CATS_DIR}\make_catalog_backup.cmd"
-    nsExec::ExecToLog '$PLUGINSDIR\sed.exe -f "$PLUGINSDIR\config.sed" -i.bak "$PLUGINSDIR\make_catalog_backup.cmd"'
-    CopyFiles "$PLUGINSDIR\make_catalog_backup.cmd" "$INSTDIR\bin\make_catalog_backup.cmd"
-  ${EndUnless}
-  ${Unless} ${FileExists} "$INSTDIR\bin\delete_catalog_backup.cmd"
-    File "/oname=$PLUGINSDIR\delete_catalog_backup.cmd" "${CATS_DIR}\delete_catalog_backup.cmd"
-    nsExec::ExecToLog '$PLUGINSDIR\sed.exe -f "$PLUGINSDIR\config.sed" -i.bak "$PLUGINSDIR\delete_catalog_backup.cmd"'
-    CopyFiles "$PLUGINSDIR\delete_catalog_backup.cmd" "$INSTDIR\bin\delete_catalog_backup.cmd"
-  ${EndUnless}
-  File "query.sql"
-
-  ${Unless} ${FileExists} "$APPDATA\Bacula\bacula-dir.conf"
-    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" "$APPDATA\Bacula\bacula-dir.conf"
-  ${EndUnless}
 
-  ${If} $OsIsNT = 1
-    nsExec::ExecToLog 'cmd.exe /C echo Y|cacls "$R1" /G SYSTEM:F Administrators:F'
-  ${EndIf}
+  File "${SRC_DIR}\bacula-dir.exe"
+  File "${SRC_DIR}\dbcheck.exe"
+
+  File "/oname=$PLUGINSDIR\delete_catalog_backup.cmd" "${SRC_DIR}\delete_catalog_backup.cmd"
+
+  StrCpy $0 "$INSTDIR\bin"
+  
+  StrCpy $1 create_database.cmd
+  Call ConfigEditAndCopy
+
+  StrCpy $1 drop_database.cmd
+  Call ConfigEditAndCopy
+
+  StrCpy $1 make_tables.cmd
+  Call ConfigEditAndCopy
+
+  StrCpy $1 drop_tables.cmd
+  Call ConfigEditAndCopy
+
+  StrCpy $1 grant_privileges.cmd
+  Call ConfigEditAndCopy
+
+  StrCpy $1 make_catalog_backup.cmd
+  Call ConfigEditAndCopy
+
+  StrCpy $1 delete_catalog_backup.cmd
+  Call ConfigEditAndCopy
+
+  File "${SRC_DIR}\query.sql"
+
+  File "/oname=$PLUGINSDIR\bacula-dir.conf" "bacula-dir.conf.in"
+
+  StrCpy $0 "$APPDATA\Bacula"
+  StrCpy $1 bacula-dir.conf
+  Call ConfigEditAndCopy
 
   StrCpy $0 bacula-dir
   StrCpy $1 "Director Service"
@@ -727,22 +736,17 @@ Section "Command Console" SecConsole
 
   SetOutPath "$INSTDIR\bin"
 
-  File "${BACULA_BIN}\bconsole.exe"
+  File "${SRC_DIR}\bconsole.exe"
   Call InstallCommonFiles
 
   ${If} $InstallType = ${MigrateInstall}
   ${AndIf} ${FileExists} "$OldInstallDir\bin\bconsole.conf"
     CopyFiles "$OldInstallDir\bin\bconsole.conf" "$APPDATA\Bacula"
   ${Else}
-    ${Unless} ${FileExists} "$APPDATA\Bacula\bconsole.conf"
-      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" "$APPDATA\Bacula\bconsole.conf"
-    ${EndUnless}
-  ${EndIf}
-
-  ${If} $OsIsNT = 1
-    nsExec::ExecToLog 'cmd.exe /C echo Y|cacls "$R1" /G SYSTEM:F Administrators:F'
+    File "/oname=$PLUGINSDIR\bconsole.conf" "bconsole.conf.in"
+    StrCpy $0 "$APPDATA\Bacula"
+    StrCpy $1 bconsole.conf
+    Call ConfigEditAndCopy
   ${EndIf}
 
   CreateShortCut "$SMPROGRAMS\Bacula\bconsole.lnk" "$INSTDIR\bin\bconsole.exe" '-c "$APPDATA\Bacula\bconsole.conf"' "$INSTDIR\bin\bconsole.exe" 0
@@ -757,33 +761,28 @@ Section "Graphical Console" SecWxConsole
 
   Call InstallCommonFiles
 !if "${BUILD_TOOLS}" == "VC8"
-  File "${DEPKGS_BIN}\wxbase270_vc_bacula.dll"
-  File "${DEPKGS_BIN}\wxmsw270_core_vc_bacula.dll"
+  File "${SRC_DIR}\wxbase270_vc_bacula.dll"
+  File "${SRC_DIR}\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"
+  File "${SRC_DIR}\wxbase270_vc_bacula.dll"
+  File "${SRC_DIR}\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"
+  File "${SRC_DIR}\wxbase26_gcc_bacula.dll"
+  File "${SRC_DIR}\wxmsw26_core_gcc_bacula.dll"
 !endif
 
-  File "${BACULA_BIN}\wx-console.exe"
+  File "${SRC_DIR}\wx-console.exe"
 
   ${If} $InstallType = ${MigrateInstall}
   ${AndIf} ${FileExists} "$OldInstallDir\bin\wx-console.conf"
     CopyFiles "$OldInstallDir\bin\wx-console.conf" "$APPDATA\Bacula"
   ${Else}
-    ${Unless} ${FileExists} "$APPDATA\Bacula\wx-console.conf"
-      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" "$APPDATA\Bacula\wx-console.conf"
-    ${EndUnless}
-  ${EndIf}
-
-  ${If} $OsIsNT = 1
-    nsExec::ExecToLog 'cmd.exe /C echo Y|cacls "$R1" /G SYSTEM:F Administrators:F'
+    File "/oname=$PLUGINSDIR\wx-console.conf" "wx-console.conf.in"
+    StrCpy $0 "$APPDATA\Bacula"
+    StrCpy $1 wx-console.conf
+    Call ConfigEditAndCopy
   ${EndIf}
 
   ; Create Start Menu entry
@@ -801,7 +800,7 @@ Section "Documentation (Acrobat Format)" SecDocPdf
   SetOutPath "$INSTDIR\doc"
   CreateDirectory "$INSTDIR\doc"
 
-  File "${DOC_DIR}\manual\bacula.pdf"
+  File "${SRC_DIR}\manual\bacula.pdf"
   CreateShortCut "$SMPROGRAMS\Bacula\Documentation\Manual.lnk" '"$INSTDIR\doc\bacula.pdf"'
 SectionEnd
 
@@ -811,16 +810,22 @@ Section "Documentation (HTML Format)" SecDocHtml
   SetOutPath "$INSTDIR\doc"
   CreateDirectory "$INSTDIR\doc"
 
-  File "${DOC_DIR}\manual\bacula\*.html"
-  File "${DOC_DIR}\manual\bacula\*.png"
-  File "${DOC_DIR}\manual\bacula\*.css"
+  File "${SRC_DIR}\manual\bacula\*.html"
+  File "${SRC_DIR}\manual\bacula\*.png"
+  File "${SRC_DIR}\manual\bacula\*.css"
   CreateShortCut "$SMPROGRAMS\Bacula\Documentation\Manual (HTML).lnk" '"$INSTDIR\doc\bacula.html"'
 SectionEnd
 
 SectionGroupEnd
 
-Section "-Write Uninstaller"
+Section "-Finish"
   Push $R0
+
+  ${If} $OsIsNT = 1
+    nsExec::ExecToLog 'cmd.exe /C echo Y|cacls "$INSTDIR" /T /G SYSTEM:F Administrators:F'
+    nsExec::ExecToLog 'cmd.exe /C echo Y|cacls "$APPDATA\Bacula" /T /G SYSTEM:F Administrators:F'
+  ${EndIf}
+
   ; 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" "InstallLocation" "$INSTDIR"
@@ -1042,6 +1047,54 @@ Function GetUserName
   Exch $R0
 FunctionEnd
 
+Function ConfigEditAndCopy
+  Push $R1
+
+  ${If} ${FileExists} "$0\$1"
+    StrCpy $R1 ".new"
+  ${Else}
+    StrCpy $R1 ""
+  ${EndIf}
+
+  nsExec::ExecToLog '$PLUGINSDIR\sed.exe -f "$PLUGINSDIR\config.sed" -i.bak "$PLUGINSDIR\$1"'
+  CopyFiles "$PLUGINSDIR\$1" "$0\$1$R1"
+
+  Pop $R1
+FunctionEnd
+
+Function FindDatabaseApps
+  Push $R1
+
+  ReadRegStr $0 HKLM "Software\MySQL AB\MySQL Server 5.0" "Location"
+
+  ${If} $0 != ""
+    Call RemoveTrailingSlash
+    StrCpy $MySQLPath $0
+    ReadRegStr $0 HKLM "Software\MySQL AB\MySQL Server 5.0" "Version"
+    StrCpy $MySQLVersion $0
+  ${EndIf}
+
+  EnumRegKey $R1 HKLM "Software\PostgreSQL\Installations" 0
+  ${If} $R1 != ""
+    ReadRegStr $0 HKLM "Software\PostgreSQL\Installations\$R1" "Base Directory"
+    Call RemoveTrailingSlash
+    StrCpy $PostgreSQLPath $0
+    ReadRegStr $0 HKLM "Software\PostgreSQL\Installations\$R1" "Version"
+    StrCpy $PostgreSQLVersion $0
+  ${EndIf}
+
+  Pop $R1
+FunctionEnd
+
+Function RemoveTrailingSlash
+  Push $R1
+  StrCpy $R1 $0 "" -1
+  ${If} $R1 == "\"
+    StrCpy $0 $0 -1
+  ${EndIf}
+  Pop $R1
+FunctionEnd
+
 Function IsDirectorSelected
   Push $R0
   SectionGetFlags ${SecDirectorDaemon} $R0
@@ -1077,7 +1130,7 @@ Function GetSelectedComponents
 FunctionEnd
 
 Function PageComponentsShow
-  ${If} $OsIsNT != 1
+  ${If} $OsIsNT <> 1
     Call DisableServerSections
   ${EndIf}
 
index e9d00418a424c9c620fc73a5184a0658dd0cce52..a6fb6065330deb43211763f5a9d108c38507fbd2 100644 (file)
                                        />\r
                                </FileConfiguration>\r
                        </File>\r
-                       <File\r
-                               RelativePath="..\..\lib\alloc.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\attr.c"\r
                                >\r
                                        />\r
                                </FileConfiguration>\r
                        </File>\r
-                       <File\r
-                               RelativePath="..\..\lib\semlock.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\serial.c"\r
                                >\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\findlib\protos.h"\r
+                               RelativePath="..\..\lib\protos.h"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\lib\protos.h"\r
+                               RelativePath="..\..\findlib\protos.h"\r
                                >\r
                        </File>\r
                        <File\r
                                RelativePath="..\compat\sched.h"\r
                                >\r
                        </File>\r
-                       <File\r
-                               RelativePath="..\..\lib\semlock.h"\r
-                               >\r
-                       </File>\r
                        <File\r
                                RelativePath="..\..\lib\serial.h"\r
                                >\r
index a4a121dd4eb5c29f86344b6741df95419095b91d..71519ae20a3f4a3497e8ae2f653fd67c7b29cce4 100644 (file)
@@ -23,8 +23,6 @@ EXPORTS
 ?get@alist@@QAEPAXH@Z
 ?destroy@alist@@QAEXXZ
  
-; alloc.obj 
 ; attr.obj 
 ?new_attr@@YAPAUATTR@@XZ
 ?free_attr@@YAXPAUATTR@@@Z
@@ -364,8 +362,6 @@ fnmatch
 ?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
@@ -427,8 +423,6 @@ fnmatch
 ?parse_args@@YAHPADPAPADPAH11H@Z
 ?bsscanf@@YAHPBD0ZZ
  
-; semlock.obj 
 ; serial.obj 
 ?serial_int32@@YAXQAPAEJ@Z
 ?serial_uint32@@YAXQAPAEI@Z
index 4e263283750e548dab5a48ec67094e69754ebe06..8b4978c46678e4913f03e13cae7596d84c56bcb6 100644 (file)
@@ -11,7 +11,7 @@ REM  Changer Command = "mtx-changer %c %o %S %a %d"
 REM    you will have the following input to this script:
 REM
 REM  Bacula will always call with all the following arguments, even though
-REM    in come cases, not all are used.
+REM    in some cases, not all are used.
 REM
 REM  mtx-changer "changer-device" "command" "slot" "archive-device" "drive-index"
 REM                     %1           %2       %3          %4             %5
@@ -42,7 +42,7 @@ SET working_dir=@working_dir_cmd@
 SET dbgfile="%working_dir%\mtx.log"
 
 REM to turn on logging, uncomment the following line
-REM findstr xxx <nul >>"%working_dir%\mtx.log"
+REM copy nul "%working_dir%\mtx.log"
 
 REM
 REM check parameter count on commandline
index 8d72b7f9fa69e146c8556318a2e00de3fa345231..72f86f03dfb0f5442c2f5612f51cd83a102b94d6 100644 (file)
@@ -72,6 +72,7 @@
                                LinkIncremental="0"
                                SuppressStartupBanner="true"
                                AdditionalLibraryDirectories="../../../../../depkgs-msvc/lib"
+                               IgnoreDefaultLibraryNames="msvcrt"
                                GenerateDebugInformation="true"
                                SubSystem="2"
                                TargetMachine="1"
index e875c5c83e4609c2e332a5d8d5459259b360d947..8a173434047aa3a35551e29d676c3a2c2569ceb3 100644 (file)
@@ -46,8 +46,8 @@
                                RuntimeLibrary="3"\r
                                UsePrecompiledHeader="0"\r
                                WarningLevel="3"\r
-                               Detect64BitPortabilityProblems="false"\r
                                SuppressStartupBanner="true"\r
+                               Detect64BitPortabilityProblems="false"\r
                                DebugInformationFormat="4"\r
                        />\r
                        <Tool\r
@@ -64,6 +64,7 @@
                                AdditionalDependencies="wsock32.lib zlib.lib pthreadVCE.lib atlsd.lib"\r
                                LinkIncremental="0"\r
                                AdditionalLibraryDirectories="../../../../../depkgs-msvc/lib"\r
+                               IgnoreDefaultLibraryNames="msvcrt"\r
                                GenerateDebugInformation="true"\r
                                SubSystem="1"\r
                                TargetMachine="1"\r
                                UsePrecompiledHeader="0"\r
                                BrowseInformation="1"\r
                                WarningLevel="3"\r
-                               Detect64BitPortabilityProblems="false"\r
                                SuppressStartupBanner="true"\r
+                               Detect64BitPortabilityProblems="false"\r
                                DebugInformationFormat="3"\r
                        />\r
                        <Tool\r