]> git.sur5r.net Git - bacula/bacula/commitdiff
Ignore UTF-8 marker at the start of .conf files.
authorRobert Nelson <robertn@the-nelsons.org>
Wed, 1 Nov 2006 04:53:27 +0000 (04:53 +0000)
committerRobert Nelson <robertn@the-nelsons.org>
Wed, 1 Nov 2006 04:53:27 +0000 (04:53 +0000)
Add stab2cv to 3rd party dependencies.  This is a utility I wrote that is licensed under the GPL and available on SourceForge.  It converts the stab debugging info generated by gcc into Codeview format.  Currently it just translates function names to global symbols.  This is sufficient to get reasonable stack traces from Dr Watson and to look at minidumps.

Fix bug # 699 - winbacula client crashes whilerunning bat scripts.

Enable Windows XP look and feel for the tray icons and wx-console.

Add Windows specific FileSet example to bacula-dir.conf.

Reorganize Start menu so that documentation and configuration are in subfolders.

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

25 files changed:
bacula/src/lib/lex.c
bacula/src/lib/lex.h
bacula/src/lib/parse_conf.c
bacula/src/win32/External-mingw32
bacula/src/win32/build-depkgs-mingw32
bacula/src/win32/compat/compat.cpp
bacula/src/win32/dird/Makefile
bacula/src/win32/dird/dird.vcproj
bacula/src/win32/dird/winres.rc [new file with mode: 0644]
bacula/src/win32/filed/Makefile
bacula/src/win32/filed/bacula-fd.manifest [new file with mode: 0644]
bacula/src/win32/filed/baculafd.vcproj
bacula/src/win32/filed/winmain.cpp
bacula/src/win32/installer/Makefile
bacula/src/win32/installer/bacula-dir.conf.in
bacula/src/win32/installer/winbacula.nsi
bacula/src/win32/libwin32/winres.rc
bacula/src/win32/stored/Makefile
bacula/src/win32/stored/baculasd/bacula-sd.manifest [new file with mode: 0644]
bacula/src/win32/stored/baculasd/baculasd.vcproj
bacula/src/win32/stored/baculasd/winmain.cpp
bacula/src/win32/stored/baculasd/winres.rc
bacula/src/win32/wx-console/wx-console.manifest [new file with mode: 0644]
bacula/src/win32/wx-console/wx-console.vcproj
bacula/src/wx-console/wx-console_private.rc

index 13b2cb9ab2a4ab1c0da93132631bf0a204797d7f..2fa93a7d13e5ea0fd4413d4b960f124c30265be7 100644 (file)
@@ -324,6 +324,7 @@ lex_get_token(LEX *lf, int expect)
    int ch;
    int token = T_NONE;
    bool esc_next = false;
+   int unicode_count = 0;
 
    Dmsg0(dbglvl, "enter lex_get_token\n");
    while (token == T_NONE) {
@@ -395,6 +396,16 @@ lex_get_token(LEX *lf, int expect)
             lf->state = lex_include;
             begin_str(lf, 0);
             break;
+         case 0xEF:
+            if (lf->line_no != 1 || lf->col_no != 1)
+            {
+               lf->state = lex_string;
+               begin_str(lf, ch);
+               break;
+            }
+            lf->state = lex_unicode_mark;
+            unicode_count = 1;
+            break;
          default:
             lf->state = lex_string;
             begin_str(lf, ch);
@@ -526,6 +537,27 @@ lex_get_token(LEX *lf, int expect)
          }
          add_str(lf, ch);
          break;
+      case lex_unicode_mark:
+         if (ch == L_EOF) {
+            token = T_ERROR;
+            break;
+         }
+         unicode_count++;
+         if (unicode_count == 2) {
+            if (ch != 0xBB) {
+               token = T_ERROR;
+               break;
+            }
+         } else if (unicode_count == 3) {
+            if (ch != 0xBF) {
+               token = T_ERROR;
+               break;
+            }
+            token = T_UNICODE_MARK;
+            lf->state = lex_none;
+            break;
+         }
+         break;
       }
       Dmsg4(dbglvl, "ch=%d state=%s token=%s %c\n", ch, lex_state_to_str(lf->state),
         lex_tok_to_str(token), ch);
index 1a05225d0ea65a003674a0f113edbe0ebbcaf70f..bf0bd1aac1be5ed11a920f096fc099048b788ed2 100644 (file)
@@ -46,6 +46,8 @@
 #define T_COMMA                       111
 #define T_EOL                         112
 #define T_ERROR                       200
+#define T_UNICODE_MARK                201
+
 /*
  * The following will be returned only if
  * the appropriate expect flag has been set
@@ -69,7 +71,8 @@ enum lex_state {
    lex_identifier,
    lex_string,
    lex_quoted_string,
-   lex_include
+   lex_include,
+   lex_unicode_mark
 };
 
 /* Lex scan options */
index fb18ada83cf6efb0b66cd25ad1c01ec874bfcaf3..b3f6804312fcc95c620a3e4838cbde1423179ae9 100755 (executable)
@@ -813,6 +813,9 @@ parse_config(const char *cf, LEX_ERROR_HANDLER *scan_error, int err_type)
             if (token == T_EOL) {
                break;
             }
+            if (token == T_UNICODE_MARK) {
+               break;
+            }
             if (token != T_IDENTIFIER) {
                scan_err1(lc, _("Expected a Resource name identifier, got: %s"), lc->str);
                return 0;
@@ -827,7 +830,7 @@ parse_config(const char *cf, LEX_ERROR_HANDLER *scan_error, int err_type)
                }
             if (state == p_none) {
                scan_err1(lc, _("expected resource name, got: %s"), lc->str);
-          return 0;
+               return 0;
             }
             break;
          case p_resource:
index 2241801c26558920f6e21d57a7a4be1f72eb9bc2..41cc42106929b2b318793cbdf0d9a378ec80d5a5 100644 (file)
@@ -35,3 +35,4 @@ 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
 MT|http://www.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
+STAB2CV|http://superb-west.dl.sourceforge.net/sourceforge/stab2cv/stab2cv-0.1.tar.bz2
index dc5a31fb7956c97f19625ea5c9ba3f96666447e8..49838f3bcde672900eb1192c1324d73f5a0b2c99 100644 (file)
@@ -99,7 +99,7 @@ get_source()
                 rm -rf ${SRC_DIR}
                 [ "${MAKE_DIR}" = "true" ] && mkdir ${SRC_DIR} && cd ${SRC_DIR}
                 echo Extracting ${ARCHIVE}
-                ${ARCHIVER} ${ARCHIVE} &> ${ARCHIVE}.log
+                ${ARCHIVER} ${ARCHIVE} 2>&1 > ${ARCHIVE}.log
                 cd ${SRC_DIR}
                 return 0
         fi
@@ -174,7 +174,7 @@ process_pcre()
                             --host=mingw32 \
                             --prefix=${DEPPKG_DIR} \
                             --enable-utf8 \
-                            --enable-unicode-properties &>make.log
+                            --enable-unicode-properties 2>&1 >make.log
         fi
         echo Building PCRE
         do_make Makefile PREFIX=${DEPPKG_DIR} all
@@ -213,7 +213,7 @@ process_openssl()
                             shared zlib-dynamic \
                             threads \
                             --with-zlib-include=${DEPPKG_DIR}/include \
-                            mingw32 &> make.log
+                            mingw32 2>&1 > make.log
         fi
         echo Building openssl
         perl util/mkdef.pl 32 libeay no-static-engine >ms/libeay32.def
@@ -334,7 +334,7 @@ process_scons()
 {
         get_source "${URL_SCONS}" "${DIR_SCONS}" "${MKD_SCONS}"
         echo Installing scons
-        if python setup.py install --prefix=${DEPPKG_DIR}/scons &> make.log
+        if python setup.py install --prefix=${DEPPKG_DIR}/scons 2>&1 > make.log
         then
                 :
         else
@@ -413,7 +413,7 @@ process_sed()
                 echo Configuring sed
                 ./configure --host=mingw32 \
                             --prefix=${DEPPKG_DIR} \
-                            --disable-nls &>make.log
+                            --disable-nls 2>&1 >make.log
         fi
         echo Building sed
         do_make Makefile all
@@ -421,6 +421,23 @@ process_sed()
         do_make Makefile install
 }
 
+process_stab2cv()
+{
+        if get_source "${URL_STAB2CV}" "${DIR_STAB2CV}" "${MKD_STAB2CV}"
+        then
+                # echo Patching stab2cv
+                # >patch.log
+                # do_patch stab2cv.patch
+                echo Configuring stab2cv
+                ./configure --prefix=${DEPPKG_DIR}/tools \
+                            2>&1 >make.log
+        fi
+        echo Building stab2c
+        do_make Makefile 
+        echo Installing stab2c
+        do_make Makefile install
+}
+
 if [ "$#" -eq 0 ]
 then
         process_zlib
@@ -436,6 +453,7 @@ then
         process_mtx
         process_mt
         process_sed
+        process_stab2cv
 else
         for dependency in "$@"
         do
index b01c6ca2e5e6de00512fb7aed91568f18c117c7c..001e82bc57847b0f37ecb84ca9769c3c7ce14ccd 100644 (file)
@@ -1628,6 +1628,11 @@ GetApplicationName(const char *cmdline, char **pexe, const char **pargs)
       pExeEnd = current;
    }
 
+   if (*pargs == NULL)
+   {
+      *pargs = current;
+   }
+
    bool bHasPathSeparators = pExeStart != pBasename;
 
    /* We have pointers to all the useful parts of the name */
index 9ac9599b1388f5c57213dc7b70f8960260ace112..de5b657b7043fca1f56b6c14c8658f71a5e349a0 100644 (file)
@@ -98,7 +98,7 @@ clean:
 $(BINDIR)/bacula-dir.exe: $(DIRD_OBJS) $(LIBS_CATS) $(LIBS_BACULA)
        $(call link_winapp,$(DIRD_LIBS))
 
-$(OBJDIR)/winres.res: ../libwin32/winres.rc
+$(OBJDIR)/winres.res: winres.rc
        $(WINDRES) $(INCLUDE_ICONS) -O coff $< -o $@
 
 include ../Makefile.rules
index fc985cdeddd95b28d6a71367ef46673f66474522..724f669b038741b2271ee6d1d679eae5eb838f57 100644 (file)
@@ -66,6 +66,7 @@
                                Name="VCResourceCompilerTool"\r
                                PreprocessorDefinitions="_DEBUG"\r
                                Culture="1033"\r
+                               AdditionalIncludeDirectories="../libwin32"\r
                        />\r
                        <Tool\r
                                Name="VCPreLinkEventTool"\r
                        Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"\r
                        UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
                        >\r
+                       <File\r
+                               RelativePath="..\libwin32\bacula.bmp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\libwin32\bacula.ico"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\winres.rc"\r
+                               >\r
+                       </File>\r
                </Filter>\r
        </Files>\r
        <Globals>\r
diff --git a/bacula/src/win32/dird/winres.rc b/bacula/src/win32/dird/winres.rc
new file mode 100644 (file)
index 0000000..48b4d7f
--- /dev/null
@@ -0,0 +1,76 @@
+#include <winuser.h>
+#include <winver.h>
+#include "winres.h"
+#include "../../version.h"
+
+/* NB: Internationalization of this file will require some work... */
+#define N_(s) s
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icons
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_BACULA              ICON    "bacula.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,1,0,0
+ PRODUCTVERSION 1,1,0,0
+ FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0 //
+#endif
+ FILEOS VOS_NT_WINDOWS32
+ FILETYPE VFT_APP
+ FILESUBTYPE 0
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904E0" // Lang=US English, CharSet=Windows Multiligual
+        BEGIN
+            VALUE "Comments", "by Kern Sibbald\0"
+            VALUE "CompanyName", "            \0"
+            VALUE "FileDescription", "Bacula Director for Win32\0"
+            VALUE "FileVersion", VERSION "\0"
+            VALUE "InternalName", "Bacula\0"
+            VALUE "LegalCopyright", "Copyright Kern Sibbald, 1999-2006\0"
+            VALUE "LegalTrademarks", "Licensed under GNU GPL 2.0\0"
+            VALUE "OriginalFilename", "bacula-fd.exe\0"
+            VALUE "PrivateBuild", "\0"
+            VALUE "ProductName", "Bacula - Win32 Version\0"
+            VALUE "ProductVersion", VERSION
+            VALUE "SpecialBuild", "\0"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1252 // US English, Multilingual
+    END
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Bitmap
+//
+
+IDB_BACULABMP           BITMAP  DISCARDABLE     "bacula.bmp"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE 
+BEGIN
+    IDI_BACULA              "Bacula"
+END
index b887e5c7d3ed743c8cc61d34e8d23a4eb224dacd..6e2cab8bb0a08c6d4acf03899bb0176dd28b162d 100644 (file)
@@ -57,7 +57,8 @@ FILED_LIBS = \
        -lole32 \
        -loleaut32 \
        -lwsock32 \
-       -luuid
+       -luuid \
+       -lcomctl32
 
 ######################################################################
 
diff --git a/bacula/src/win32/filed/bacula-fd.manifest b/bacula/src/win32/filed/bacula-fd.manifest
new file mode 100644 (file)
index 0000000..95deb2f
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> 
+  <assemblyIdentity 
+    version="1.0.0.0" 
+    processorArchitecture="X86" 
+    name="Bacula.Bacula-fd" 
+    type="win32" /> 
+  <description>Bacula File daemon for Win32</description> 
+  <dependency> 
+    <dependentAssembly> 
+      <assemblyIdentity 
+        type="win32" 
+        name="Microsoft.Windows.Common-Controls" 
+        version="6.0.0.0" 
+        processorArchitecture="X86" 
+        publicKeyToken="6595b64144ccf1df" 
+        language="*" /> 
+    </dependentAssembly> 
+  </dependency> 
+</assembly> 
+
index 2ac1bf3aa83723f14b553718a37f5e342c264905..9efc132f77f584ab9fdaa1b8ba147b9d480ca03a 100644 (file)
@@ -68,7 +68,7 @@
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalDependencies="pthreadVCE.lib zlib.lib wsock32.lib atlsd.lib"\r
+                               AdditionalDependencies="pthreadVCE.lib zlib.lib comctl32.lib wsock32.lib atlsd.lib"\r
                                OutputFile="$(OutDir)\bacula-fd.exe"\r
                                LinkIncremental="0"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalDependencies="pthreadVCE.lib zlib.lib wsock32.lib atls.lib"\r
+                               AdditionalDependencies="pthreadVCE.lib zlib.lib wsock32.lib comctl32.lib atls.lib"\r
                                OutputFile="$(OutDir)\bacula-fd.exe"\r
                                LinkIncremental="0"\r
                                SuppressStartupBanner="true"\r
                        Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"\r
                        UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
                        >\r
+                       <File\r
+                               RelativePath=".\bacula-fd.manifest"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\libwin32\bacula.bmp"\r
                                >\r
index 5b540af89c8ecf714b5f1e4a7d37a175bd018a66..9636380099c32c17015d09bae5b0df12afbb4624 100644 (file)
 #include <signal.h>
 #include <pthread.h>
 
+#undef  _WIN32_IE
+#define _WIN32_IE 0x0401
+#undef  _WIN32_WINNT
+#define _WIN32_WINNT 0x0501
+#include <commctrl.h>
+
 extern int BaculaMain(int argc, char *argv[]);
 extern void terminate_filed(int sig);
 extern DWORD g_error;
@@ -65,6 +71,13 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
    main_pid = getpid();
    main_tid = pthread_self();
 
+   INITCOMMONCONTROLSEX    initCC = {
+      sizeof(INITCOMMONCONTROLSEX), 
+      ICC_STANDARD_CLASSES
+   };
+
+   InitCommonControlsEx(&initCC);
+
    /*
     * Funny things happen with the command line if the
     * execution comes from c:/Program Files/bacula/bacula.exe
index 61708ffb2154b6396756b71ea8c5c681b2014a9e..c5f449c3820aa79b0cbfde4a4640bca07772add5 100644 (file)
@@ -112,7 +112,7 @@ installer:  $(INSTALL_EXE)
 
 clean:
        @echo "Cleaning `pwd`"
-       $(CMD_ECHO)-rm -f $(INSTALL_EXE) $(BACULA_BINARIES) $(DEPKGS_BINARIES) $(NONGCC_BINARIES) $(NONGCC_LIBRARIES) $(SSL_FILES)
+       $(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
@@ -121,10 +121,10 @@ clean:
 # Rules
 #
 
-define Strip_Binary
+define Convert_Binary
 $$(notdir $(1)): $(1)
-       $(ECHO_CMD)cp -f $$^ $$@
-       $$(call makedbg,$$@)
+       $(ECHO_CMD)cp -f $$^ $$@ ; \
+       $(STAB2CV) $$@
 endef
 
 define Copy_Binary
@@ -132,13 +132,13 @@ $$(notdir $(1)): $(1)
        $(ECHO_CMD)cp -f $$^ $$@
 endef
 
-$(foreach file,$(addprefix $(DEPKGS)/bin/, $(DEPKGS_BINARIES)),$(eval $(call Strip_Binary,$(file))))
+$(foreach file,$(addprefix $(DEPKGS)/bin/, $(DEPKGS_BINARIES)),$(eval $(call Convert_Binary,$(file))))
 
 $(foreach file,$(addprefix $(DEPKGS)/bin/, $(NONGCC_BINARIES)),$(eval $(call Copy_Binary,$(file))))
 
 $(foreach file,$(addprefix $(DEPKGS)/lib/, $(NONGCC_LIBRARIES)),$(eval $(call Copy_Binary,$(file))))
 
-$(foreach file,$(addprefix $(BINDIR)/, $(BACULA_BINARIES)),$(eval $(call Strip_Binary,$(file))))
+$(foreach file,$(addprefix $(BINDIR)/, $(BACULA_BINARIES)),$(eval $(call Convert_Binary,$(file))))
 
 $(foreach file,$(addprefix $(DEPKGS)/ssl/, $(SSL_FILES)),$(eval $(call Copy_Binary,$(file))))
 
index d609e85ee92bb3dcc5d33de3855fc6a800d0a5f9..a65bf1ed1baf3b0dd90d77ed8bcf3d797118a65a 100644 (file)
@@ -28,7 +28,7 @@ JobDefs {
   Type = Backup
   Level = Incremental
   Client = @client_name@
-  FileSet = "Full Set"
+  FileSet = "Test Set"
   Schedule = "WeeklyCycle"
   Storage = File
   Messages = Standard
@@ -76,20 +76,23 @@ Job {
   Name = "RestoreFiles"
   Type = Restore
   Client=@client_name@
-  FileSet="Full Set"
+  FileSet="Test Set"
   Storage = File
   Pool = Default
   Messages = Standard
   Where = "C:\\tmp\\bacula-restores"
 }
 
-
+#
+# Note: Windows path separators do NOT work correctly in FileSets.
+#
 # List of files to be backed up
 FileSet {
-  Name = "Full Set"
+  Name = "Test Set"
   Include {
     Options {
       signature = MD5
+      ignore case = yes
     }
 #    
 #  Put your list of files here, preceded by 'File =', one per line
@@ -97,26 +100,128 @@ FileSet {
 #
 #    File = <file-name
 #
-#  Note: / backs up everything on the root partition.
-#    if you have other partitons such as /usr or /home
+#  Note: C:/ backs up everything on drive C.
+#    if you have other drives such as D:/
 #    you will probably want to add them too.
 #
-#  By default this is defined to point to the Bacula build
+#  By default this is defined to point to the Bacula 
 #    directory to give a reasonable FileSet to backup to
 #    disk storage during initial testing.
 #
-    File = "@bin_dir@"
+    File = "C:/Program Files/Bacula"
   }
 
 #
-# If you backup the root directory, the following two excluded
+# If you backup the root directory, the following excluded
 #   files can be useful
 #
   Exclude {
-    File = /proc
-    File = /tmp
-    File = /.journal
-    File = /.fsck
+    Options {
+      signature = MD5
+      ignore case = yes
+    }
+    File = C:/Temp
+    File = C:/tmp
+  }
+}
+
+#
+# This is an example which will backup all the hard drives of a Windows System.
+#
+FileSet {
+  Name = "Windows Full Set"
+  Enable VSS = yes
+  Include {
+    Options {
+      Signature = MD5
+      Exclude = yes
+      IgnoreCase = yes
+      EnhancedWild = yes
+      DriveType = fixed
+
+      # Exclude directories full of lots and lots of useless little files
+      WildDir = "[A-Z]:/Documents and Settings/*/Cookies"
+      WildDir = "[A-Z]:/Documents and Settings/*/Recent"
+      WildDir = "[A-Z]:/Documents and Settings/*/{Local Settings,LOCALS~1}/History"
+      WildDir = "[A-Z]:/Documents and Settings/*/{Local Settings,LOCALS~1}/Temp"
+      WildDir = "[A-Z]:/Documents and Settings/*/{Local Settings,LOCALS~1}/Temporary Internet Files"
+
+      # Exclude directories full of lots and lots of useless little files
+      WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/Cookies"
+      WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/Recent"
+      WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/{Local Settings,LOCALS~1}/History"
+      WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/{Local Settings,LOCALS~1}/Temp"
+      WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/{Local Settings,LOCALS~1}/Temporary Internet Files"
+
+      # Exclude directories full of lots and lots of useless little files
+      WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/Cookies"
+      WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/Recent"
+      WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/{Local Settings,LOCALS~1}/History"
+      WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/{Local Settings,LOCALS~1}/Temp"
+      WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/{Local Settings,LOCALS~1}/Temporary Internet Files"
+
+      # Some random bits of Windows we want to ignore
+      WildDir = "[A-Z]:/{WINNT,Windows}/Prefetch"
+      WildDir = "[A-Z]:/{WINNT,Windows}/msdownld.tmp"
+      WildDir = "[A-Z]:/{WINNT,Windows}/Internet Logs"
+      WildDir = "[A-Z]:/{WINNT,Windows}/$Nt*Uninstall*"
+      WildDir = "[A-Z]:/{WINNT,Windows}/Downloaded Installations"
+
+      # Temporary directories & files
+      WildDir = "[A-Z]:/{WINNT,Windows}/Temp"
+      WildDir = "[A-Z]:/Temp"
+      WildFile = "*.tmp"
+      WildDir = "[A-Z]:/tmp"
+
+      # Fast Find
+      WildFile = "[A-Z]:/ffastun*"
+
+      # System Restore
+      WildDir = "[A-Z]:/System Volume Information"
+
+      # Windows Update
+      WildDir = "[A-Z]:/WUTemp"
+
+      # Recycle bins
+      WildDir = "[A-Z]:/RECYCLE[DR]"
+
+      # Swap files
+      WildFile = "[A-Z]:/pagefile.sys"
+      WildFile = "[A-Z]:/hiberfil.sys"
+
+      # These are programs and are easier to reinstall than restore from
+      # backup
+      WildDir = "[A-Z]:/cygwin"
+      WildDir = "[A-Z]:/{Program Files,PROGRA~1}/Java"
+      WildDir = "[A-Z]:/{Program Files,PROGRA~1}/Java Web Start"
+      WildDir = "[A-Z]:/{Program Files,PROGRA~1}/JavaSoft"
+      WildDir = "[A-Z]:/{Program Files,PROGRA~1}/Microsoft Office"
+    }
+
+    File = "C:/"
+    File = "D:/"
+    File = "E:/"
+    File = "F:/"
+    File = "G:/"
+    File = "H:/"
+    File = "I:/"
+    File = "J:/"
+    File = "K:/"
+    File = "L:/"
+    File = "M:/"
+    File = "N:/"
+    File = "O:/"
+    File = "P:/"
+    File = "Q:/"
+    File = "R:/"
+    File = "S:/"
+    File = "T:/"
+    File = "U:/"
+    File = "V:/"
+    File = "W:/"
+    File = "X:/"
+    File = "Y:/"
+    File = "Z:/"
   }
 }
 
index 13d4413536b09a16c5bd369f8e68e265299fe075..6005bc06c046a3fb3065bf0b7ff4cac0e95f429a 100644 (file)
@@ -378,7 +378,7 @@ Function InstallCommonFiles
     File "${BACULA_BIN}\bsmtp.exe"
     File "${BACULA_BIN}\bacula.dll"
 
-    CreateShortCut "$SMPROGRAMS\Bacula\View Readme.lnk" "write.exe" '"$INSTDIR\Readme.txt"'
+    CreateShortCut "$SMPROGRAMS\Bacula\Documentation\View Readme.lnk" "write.exe" '"$INSTDIR\Readme.txt"'
 
     StrCpy $CommonFilesDone 1
   ${EndIf}
@@ -421,8 +421,18 @@ Section "-Initialize"
   Pop $R2
   WriteRegDWORD HKLM Software\Bacula Components $R2
 
+  ; remove start menu items
   SetShellVarContext all
+
+  Delete /REBOOTOK "$SMPROGRAMS\Bacula\Configuration\*"
+  Delete /REBOOTOK "$SMPROGRAMS\Bacula\Documentation\*"
+  Delete /REBOOTOK "$SMPROGRAMS\Bacula\*"
+  RMDir "$SMPROGRAMS\Bacula\Configuration"
+  RMDir "$SMPROGRAMS\Bacula\Documentation"
+  RMDir "$SMPROGRAMS\Bacula"
   CreateDirectory "$SMPROGRAMS\Bacula"
+  CreateDirectory "$SMPROGRAMS\Bacula\Configuration"
+  CreateDirectory "$SMPROGRAMS\Bacula\Documentation"
 
   CreateDirectory "$INSTDIR"
   CreateDirectory "$INSTDIR\bin"
@@ -585,7 +595,7 @@ Section "File Service" SecFileDaemon
 
   Call InstallDaemon
 
-  CreateShortCut "$SMPROGRAMS\Bacula\Edit Client Configuration.lnk" "write.exe" '"$APPDATA\Bacula\bacula-fd.conf"'
+  CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Client Configuration.lnk" "write.exe" '"$APPDATA\Bacula\bacula-fd.conf"'
 SectionEnd
 
 SectionGroupEnd
@@ -634,8 +644,8 @@ Section "Storage Service" SecStorageDaemon
   StrCpy $3 $ConfigStorageStartService
   Call InstallDaemon
 
-  CreateShortCut "$SMPROGRAMS\Bacula\List Devices.lnk" "$INSTDIR\bin\scsilist.exe" "/pause"
-  CreateShortCut "$SMPROGRAMS\Bacula\Edit Storage Configuration.lnk" "write.exe" '"$APPDATA\Bacula\bacula-sd.conf"'
+  CreateShortCut "$SMPROGRAMS\Bacula\Configuration\List Devices.lnk" "$INSTDIR\bin\scsilist.exe" "/pause"
+  CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Storage Configuration.lnk" "write.exe" '"$APPDATA\Bacula\bacula-sd.conf"'
 SectionEnd
 
 Section "Director Service" SecDirectorDaemon
@@ -705,7 +715,7 @@ Section "Director Service" SecDirectorDaemon
   StrCpy $3 $ConfigDirectorStartService
   Call InstallDaemon
 
-  CreateShortCut "$SMPROGRAMS\Bacula\Edit Director Configuration.lnk" "write.exe" '"$APPDATA\Bacula\bacula-dir.conf"'
+  CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Director Configuration.lnk" "write.exe" '"$APPDATA\Bacula\bacula-dir.conf"'
 SectionEnd
 
 SectionGroupEnd
@@ -736,7 +746,7 @@ Section "Command Console" SecConsole
   ${EndIf}
 
   CreateShortCut "$SMPROGRAMS\Bacula\bconsole.lnk" "$INSTDIR\bin\bconsole.exe" '-c "$APPDATA\Bacula\bconsole.conf"' "$INSTDIR\bin\bconsole.exe" 0
-  CreateShortCut "$SMPROGRAMS\Bacula\Edit Command Console Configuration.lnk" "write.exe" '"$APPDATA\Bacula\bconsole.conf"'
+  CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Command Console Configuration.lnk" "write.exe" '"$APPDATA\Bacula\bconsole.conf"'
 
 SectionEnd
 
@@ -778,7 +788,7 @@ Section "Graphical Console" SecWxConsole
 
   ; Create Start Menu entry
   CreateShortCut "$SMPROGRAMS\Bacula\wx-console.lnk" "$INSTDIR\bin\wx-console.exe" '-c "$APPDATA\Bacula\wx-console.conf"' "$INSTDIR\bin\wx-console.exe" 0
-  CreateShortCut "$SMPROGRAMS\Bacula\Edit Graphical Console Configuration.lnk" "write.exe" '"$APPDATA\Bacula\wx-console.conf"'
+  CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Graphical Console Configuration.lnk" "write.exe" '"$APPDATA\Bacula\wx-console.conf"'
 SectionEnd
 
 SectionGroupEnd
@@ -792,7 +802,7 @@ Section "Documentation (Acrobat Format)" SecDocPdf
   CreateDirectory "$INSTDIR\doc"
 
   File "${DOC_DIR}\manual\bacula.pdf"
-  CreateShortCut "$SMPROGRAMS\Bacula\Manual.lnk" '"$INSTDIR\doc\bacula.pdf"'
+  CreateShortCut "$SMPROGRAMS\Bacula\Documentation\Manual.lnk" '"$INSTDIR\doc\bacula.pdf"'
 SectionEnd
 
 Section "Documentation (HTML Format)" SecDocHtml
@@ -804,7 +814,7 @@ Section "Documentation (HTML Format)" SecDocHtml
   File "${DOC_DIR}\manual\bacula\*.html"
   File "${DOC_DIR}\manual\bacula\*.png"
   File "${DOC_DIR}\manual\bacula\*.css"
-  CreateShortCut "$SMPROGRAMS\Bacula\Manual (HTML).lnk" '"$INSTDIR\doc\bacula.html"'
+  CreateShortCut "$SMPROGRAMS\Bacula\Documentation\Manual (HTML).lnk" '"$INSTDIR\doc\bacula.html"'
 SectionEnd
 
 SectionGroupEnd
index 5bb64d4703d6b0efa69e192191934cdb156439b6..161ce0cb43374f686cc80ad9406c6ff78a26ae54 100644 (file)
@@ -79,6 +79,13 @@ BEGIN
     END
 END
 
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// RT_MANIFEST
+//
+CREATEPROCESS_MANIFEST_RESOURCE_ID     RT_MANIFEST    "bacula-fd.manifest"
+
 /////////////////////////////////////////////////////////////////////////////
 //
 // Bitmap
index 3caa0f8e88096aa6e6077a11d31c47937c40e833..f0532f99726004ace31820714fe60dd54bd2fc35 100644 (file)
@@ -90,7 +90,8 @@ ALL_OBJS = \
 
 LIBS_STORED = \
        $(LIBS_PTHREADS) \
-       -lwsock32
+       -lwsock32 \
+       -lcomctl32
 
 ######################################################################
 
@@ -141,9 +142,9 @@ $(OBJDIR)/mtops.o: mtops.cpp
        $(call checkdir,$@)
        $(ECHO_CMD)$(CXX) $(CFLAGS) $(INCLUDE_DDK) -I../../stored -c $< -o $@
 
-$(OBJDIR)/winres.res:    ../libwin32/winres.rc
+$(OBJDIR)/winres.res:    baculasd/winres.rc
        @echo "Compiling $@"
        $(call checkdir,$@)
-       $(ECHO_CMD)$(WINDRES) $(INCLUDE_ICONS) -O coff $< -o $@
+       $(ECHO_CMD)$(WINDRES) $(INCLUDE_ICONS) -I baculasd -O coff $< -o $@
 
 include ../Makefile.rules
diff --git a/bacula/src/win32/stored/baculasd/bacula-sd.manifest b/bacula/src/win32/stored/baculasd/bacula-sd.manifest
new file mode 100644 (file)
index 0000000..ffc1c94
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> 
+  <assemblyIdentity 
+    version="1.0.0.0" 
+    processorArchitecture="X86" 
+    name="Bacula.Bacula-sd" 
+    type="win32" /> 
+  <description>Bacula Storage daemon for Win32</description> 
+  <dependency> 
+    <dependentAssembly> 
+      <assemblyIdentity 
+        type="win32" 
+        name="Microsoft.Windows.Common-Controls" 
+        version="6.0.0.0" 
+        processorArchitecture="X86" 
+        publicKeyToken="6595b64144ccf1df" 
+        language="*" /> 
+    </dependentAssembly> 
+  </dependency> 
+</assembly> 
+
index 4fc4417e72c6f3e17e5a7e102f6920a7b56b41f9..8d72b7f9fa69e146c8556318a2e00de3fa345231 100644 (file)
@@ -67,7 +67,7 @@
                        />
                        <Tool
                                Name="VCLinkerTool"
-                               AdditionalDependencies="pthreadVCE.lib zlib.lib wsock32.lib atlsd.lib"
+                               AdditionalDependencies="pthreadVCE.lib zlib.lib wsock32.lib comctl32.lib atlsd.lib"
                                OutputFile="$(OutDir)/bacula-sd.exe"
                                LinkIncremental="0"
                                SuppressStartupBanner="true"
                                UsePrecompiledHeader="0"
                                BrowseInformation="1"
                                WarningLevel="3"
-                               Detect64BitPortabilityProblems="false"
                                SuppressStartupBanner="true"
+                               Detect64BitPortabilityProblems="false"
                                DebugInformationFormat="3"
                        />
                        <Tool
                        />
                        <Tool
                                Name="VCLinkerTool"
-                               AdditionalDependencies="pthreadVCE.lib zlib.lib wsock32.lib atls.lib"
+                               AdditionalDependencies="pthreadVCE.lib zlib.lib wsock32.lib comctl32.lib atls.lib"
                                OutputFile="$(OutDir)\bacula-sd.exe"
                                LinkIncremental="0"
                                SuppressStartupBanner="true"
                                RelativePath="..\..\..\stored\status.c"
                                >
                                <FileConfiguration
-                                       Name="Release|Win32"
+                                       Name="Debug|Win32"
                                        >
                                        <Tool
                                                Name="VCCLCompilerTool"
                                        />
                                </FileConfiguration>
                                <FileConfiguration
-                                       Name="Debug|Win32"
+                                       Name="Release|Win32"
                                        >
                                        <Tool
                                                Name="VCCLCompilerTool"
                                RelativePath="..\..\..\stored\stored.c"
                                >
                                <FileConfiguration
-                                       Name="Release|Win32"
+                                       Name="Debug|Win32"
                                        >
                                        <Tool
                                                Name="VCCLCompilerTool"
                                        />
                                </FileConfiguration>
                                <FileConfiguration
-                                       Name="Debug|Win32"
+                                       Name="Release|Win32"
                                        >
                                        <Tool
                                                Name="VCCLCompilerTool"
                        Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
                        UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
                        >
+                       <File
+                               RelativePath=".\bacula-sd.manifest"
+                               >
+                       </File>
                        <File
                                RelativePath=".\bacula.bmp"
                                >
index b665df7934f6130b47247f38e8b28cc33d1f77ce..3230340c68fdb48ba07a04435efdcd0c67cd5c65 100644 (file)
 #include <signal.h>
 #include <pthread.h>
 
+#undef  _WIN32_IE
+#define _WIN32_IE 0x0501
+#undef  _WIN32_WINNT
+#define _WIN32_WINNT 0x0501
+#include <commctrl.h>
+
 extern int BaculaMain(int argc, char *argv[]);
 extern void terminate_stored(int sig);
 extern DWORD g_error;
@@ -64,6 +70,13 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
    main_pid = getpid();
    main_tid = pthread_self();
 
+   INITCOMMONCONTROLSEX    initCC = {
+      sizeof(INITCOMMONCONTROLSEX), 
+      ICC_STANDARD_CLASSES
+   };
+
+   InitCommonControlsEx(&initCC);
+
    /*
     * Funny things happen with the command line if the
     * execution comes from c:/Program Files/bacula/bacula.exe
index 129fd587090668c3733d0244e2ddc8ff8cb29ed8..78f64b151c8ed1de1e04ba952988f92b1efa095f 100644 (file)
@@ -79,6 +79,13 @@ BEGIN
     END
 END
 
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// RT_MANIFEST
+//
+CREATEPROCESS_MANIFEST_RESOURCE_ID     RT_MANIFEST    "bacula-sd.manifest"
+
 /////////////////////////////////////////////////////////////////////////////
 //
 // Bitmap
diff --git a/bacula/src/win32/wx-console/wx-console.manifest b/bacula/src/win32/wx-console/wx-console.manifest
new file mode 100644 (file)
index 0000000..ef25e47
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> 
+  <assemblyIdentity 
+    version="1.0.0.0" 
+    processorArchitecture="X86" 
+    name="Bacula.WX-Console" 
+    type="win32" /> 
+  <description>Bacula wx Console for Win32</description> 
+  <dependency> 
+    <dependentAssembly> 
+      <assemblyIdentity 
+        type="win32" 
+        name="Microsoft.Windows.Common-Controls" 
+        version="6.0.0.0" 
+        processorArchitecture="X86" 
+        publicKeyToken="6595b64144ccf1df" 
+        language="*" /> 
+    </dependentAssembly> 
+  </dependency> 
+</assembly> 
+
index 960f10ea198156df6dbcbe1c243eda4f8355ec4e..ee93c79d5987a0cd95a5adcf171140ce0e04e5bc 100644 (file)
@@ -48,8 +48,8 @@
                                UsePrecompiledHeader="0"\r
                                BrowseInformation="1"\r
                                WarningLevel="3"\r
-                               Detect64BitPortabilityProblems="false"\r
                                SuppressStartupBanner="true"\r
+                               Detect64BitPortabilityProblems="false"\r
                                DebugInformationFormat="4"\r
                        />\r
                        <Tool\r
                        Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"\r
                        UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
                        >\r
+                       <File\r
+                               RelativePath=".\wx-console.manifest"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\wx-console\wx-console_private.rc"\r
+                               >\r
+                       </File>\r
                </Filter>\r
                <Filter\r
                        Name="Source Files"\r
                                RelativePath="..\..\wx-console\main.cpp"\r
                                >\r
                        </File>\r
-                       <File\r
-                               RelativePath="..\..\wx-console\wx-console_private.rc"\r
-                               >\r
-                       </File>\r
                        <File\r
                                RelativePath="..\..\wx-console\wxbconfigfileeditor.cpp"\r
                                >\r
index 9cc0d98f63ae36db94fcdc6cd841ac8dc07423e0..5672be173a31c098bb638cc620e2b1ce7b934898 100644 (file)
@@ -1,2 +1,8 @@
 
 A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "wx-console.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// RT_MANIFEST
+//
+CREATEPROCESS_MANIFEST_RESOURCE_ID     RT_MANIFEST    "wx-console.manifest"