]> git.sur5r.net Git - bacula/bacula/commitdiff
Add support for gettext in VC++ 8.0.
authorNicolas Boichat <nicolas@boichat.ch>
Sat, 27 Aug 2005 22:37:09 +0000 (22:37 +0000)
committerNicolas Boichat <nicolas@boichat.ch>
Sat, 27 Aug 2005 22:37:09 +0000 (22:37 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2361 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/baconfig.h
bacula/src/filed/win32/winmain.cpp
bacula/src/filed/win32/winres.rc
bacula/src/filed/win32/winservice.cpp
bacula/src/win32/README.vc8
bacula/src/win32/baculafd/baculafd.vcproj
bacula/src/win32/compat/winconfig.h
bacula/src/win32/console/console.vcproj
bacula/src/win32/wx-console/wx-console.vcproj
bacula/src/wx-console/wxbmainframe.cpp

index a9aec181428c7db499a74c5ae63fe65326ad1e37..04dc8c6617aeeee2575bb238800111c7a90758f9 100644 (file)
 /* Allow printing of NULL pointers */
 #define NPRT(x) (x)?(x):_("*None*")
 
-/* NLS not yet supported on Win32 */
-#ifdef WIN32
-#undef ENABLE_NLS
-#endif
 #ifdef ENABLE_NLS
    #include <libintl.h>
    #include <locale.h>
index 19216ea41b752353a9685b22f0d93fa43a19c854..ffb62a8482f0fbd16e9ba5158cab88fe6be1d558 100755 (executable)
@@ -33,6 +33,7 @@
 #include <signal.h>
 #include <pthread.h>
 #include "../../lib/winapi.h"
+#include "baconfig.h"
 
 extern int BaculaMain(int argc, char *argv[]);
 extern void terminate_filed(int sig);
@@ -224,15 +225,15 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
 
       /* /help */
       if (strncmp(&szCmdLine[i], BaculaShowHelp, strlen(BaculaShowHelp)) == 0) {
-         MessageBox(NULL, BaculaUsageText, "Bacula Usage", MB_OK|MB_ICONINFORMATION);
+         MessageBox(NULL, BaculaUsageText, _("Bacula Usage"), MB_OK|MB_ICONINFORMATION);
          i += strlen(BaculaShowHelp);
          continue;
       }
       
-      MessageBox(NULL, szCmdLine, "Bad Command Line Options", MB_OK);
+      MessageBox(NULL, szCmdLine, _("Bad Command Line Options"), MB_OK);
 
       /* Show the usage dialog */
-      MessageBox(NULL, BaculaUsageText, "Bacula Usage", MB_OK | MB_ICONINFORMATION);
+      MessageBox(NULL, BaculaUsageText, _("Bacula Usage"), MB_OK | MB_ICONINFORMATION);
       break;
    }
 
@@ -322,7 +323,7 @@ int BaculaAppMain()
    HWND hservwnd = FindWindow(MENU_CLASS_NAME, NULL);
    if (hservwnd != NULL) {
       /* We don't allow multiple instances! */
-      MessageBox(NULL, "Another instance of Bacula is already running", szAppName, MB_OK);
+      MessageBox(NULL, _("Another instance of Bacula is already running"), szAppName, MB_OK);
       _exit(0);
    }
 
index 3c19cc85ef9191756b4c6c2b00872ce2c6c84763..83a61471849bf0ff60aeb074aa0b4f2e3af4e22c 100644 (file)
@@ -3,6 +3,9 @@
 #include "winres.h"
 #include "../../version.h"
 
+/* NB: Internationalization of this file will require some work... */
+#define N_(s) s
+
 /////////////////////////////////////////////////////////////////////////////
 //
 // Icons
@@ -25,15 +28,15 @@ IDR_TRAYMENU MENU DISCARDABLE
 BEGIN
     POPUP "tray"
     BEGIN
-        MENUITEM "&Status",                     ID_STATUS
-        MENUITEM "&Events",                     ID_EVENTS
+        MENUITEM N_("&Status"),                     ID_STATUS
+        MENUITEM N_("&Events"),                     ID_EVENTS
 #ifdef properties_implemented
-        MENUITEM "&Properties",                 ID_PROPERTIES
+        MENUITEM N_("&Properties"),                 ID_PROPERTIES
 #endif
         MENUITEM SEPARATOR
-        MENUITEM "&About Bacula",               ID_ABOUT
+        MENUITEM N_("&About Bacula"),               ID_ABOUT
         MENUITEM SEPARATOR
-        MENUITEM "&Close Bacula",               ID_CLOSE
+        MENUITEM N_("&Close Bacula"),               ID_CLOSE
     END
 END
 
@@ -109,8 +112,8 @@ STYLE DS_MODALFRAME | DS_3DLOOK | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP |
 CAPTION "Bacula Properties"
 FONT 8, "MS Sans Serif"
 BEGIN
-    PUSHBUTTON      "&Cancel",IDCANCEL,165,25,51,15
-    DEFPUSHBUTTON   "&OK",IDOK,165,5,51,15
+    PUSHBUTTON      N_("&Cancel"),IDCANCEL,165,25,51,15
+    DEFPUSHBUTTON   N_("&OK"),IDOK,165,5,51,15
     LTEXT           "No Properites yet",IDC_NONYET_LABEL,19,30,56,15,
                     SS_CENTERIMAGE
 END
@@ -133,15 +136,15 @@ BEGIN
     CONTROL         IDB_BACULABMP,IDB_BACULABMP,"Static",SS_BITMAP|SS_SUNKEN,7,5,32,32
 #endif
 
-    LTEXT           "      by Kern Sibbald",IDC_NAME,134,38,78,10
-    LTEXT           "For more information, see:",-1,115,60,100,10
-    LTEXT           "         www.sibbald.com/bacula",IDC_WWW,115,70,100,10
+    LTEXT           N_("      by Kern Sibbald"),IDC_NAME,134,38,78,10
+    LTEXT           N_("For more information, see:"),-1,115,60,100,10
+    LTEXT           "         www.bacula.ord",IDC_WWW,115,70,100,10
 //    LTEXT           "                 ",-1,69,81,100,10
 //    LTEXT           "                 ",-1,90,70,100,10
     LTEXT           "Copyright (C) 1999-2004, Kern Sibbald",IDC_COPYRIGHT,7,120,175,10
-    LTEXT           "Licensed under GNU GPL 2.0.",IDC_TRADEMARK,7,130,175,10
-    RTEXT           "Build Date:",-1,108,24,42,8
-    RTEXT           "Bacula Version:",-1,100,9,50,8
+    LTEXT           N_("Licensed under GNU GPL 2.0."),IDC_TRADEMARK,7,130,175,10
+    RTEXT           N_("Build Date:"),-1,108,24,42,8
+    RTEXT           N_("Bacula Version:"),-1,100,9,50,8
     LTEXT           VERSION,IDC_VERSION,159,10,65,8
     LTEXT           BDATE,-1,159,24,65,10
 
@@ -155,7 +158,7 @@ END
 IDD_STATUS DIALOG DISCARDABLE  0, 0, 411, 244
 STYLE DS_MODALFRAME | DS_3DLOOK | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP |
     WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "Bacula Status"
+CAPTION N_("Bacula Status")
 FONT 8, "Courier New"
 BEGIN
     DEFPUSHBUTTON   "&OK",IDOK,355,5,51,15
@@ -170,7 +173,7 @@ END
 IDD_EVENTS DIALOG DISCARDABLE  0, 0, 411, 204
 STYLE DS_MODALFRAME | DS_3DLOOK | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP |
     WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "Bacula Events"
+CAPTION N_("Bacula Events")
 FONT 8, "Courier New"
 BEGIN
     DEFPUSHBUTTON   "&OK",IDOK,355,5,51,15
index 54b8ac56a11cc233070bbbe38d3d0f9de894342d..759e748deb464b5be0bde537d68146dad608e46b 100755 (executable)
@@ -42,7 +42,7 @@
 #include "winbacula.h"
 #include "winservice.h"
 #include "wintray.h"
-                       
+#include "bacula.h" 
 
 void set_service_description(SC_HANDLE hSCManager, SC_HANDLE hService,
                              LPSTR lpDesc);
@@ -128,7 +128,7 @@ bacService::ShowAboutBox()
 {
   // Post to the Bacula menu window
   if (!PostToBacula(MENU_ABOUTBOX_SHOW, 0, 0)) {
-     MessageBox(NULL, "No existing instance of Bacula could be contacted", szAppName, MB_ICONEXCLAMATION | MB_OK);
+     MessageBox(NULL, _("No existing instance of Bacula could be contacted"), szAppName, MB_ICONEXCLAMATION | MB_OK);
      return FALSE;
   }
   return TRUE;
@@ -142,7 +142,7 @@ bacService::ShowStatus()
 {
   // Post to the Bacula menu window
   if (!PostToBacula(MENU_STATUS_SHOW, 0, 0)) {
-     MessageBox(NULL, "No existing instance of Bacula could be contacted", szAppName, MB_ICONEXCLAMATION | MB_OK);
+     MessageBox(NULL, _("No existing instance of Bacula could be contacted"), szAppName, MB_ICONEXCLAMATION | MB_OK);
      return FALSE;
   }
   return TRUE;
@@ -215,7 +215,7 @@ bacService::BaculaServiceMain()
       // Obtain a handle to the kernel library
       HINSTANCE kerneldll = LoadLibrary("KERNEL32.DLL");
       if (kerneldll == NULL) {
-         MessageBox(NULL, "KERNEL32.DLL not found: Bacula service not started"
+         MessageBox(NULL, _("KERNEL32.DLL not found: Bacula service not started")
              "Bacula Service", MB_OK);
          break;
       }
@@ -225,9 +225,9 @@ bacService::BaculaServiceMain()
       RegisterService = (DWORD (WINAPI *)(DWORD, DWORD))
               GetProcAddress(kerneldll, "RegisterServiceProcess");
       if (RegisterService == NULL) {
-         MessageBox(NULL, "Registry service not found: Bacula service not started",
+         MessageBox(NULL, _("Registry service not found: Bacula service not started"),
             "Bacula Service", MB_OK);
-         log_error_message("Registry service not found"); 
+         log_error_message(_("Registry service not found")); 
          break;
       }
       
@@ -257,7 +257,7 @@ bacService::BaculaServiceMain()
 
       // Call the service control dispatcher with our entry table
       if (!StartServiceCtrlDispatcher(dispatchTable)) {
-         log_error_message("StartServiceCtrlDispatcher failed.");
+         log_error_message(_("StartServiceCtrlDispatcher failed."));
       }
       break;
       } /* end case */
@@ -275,8 +275,8 @@ void WINAPI ServiceMain(DWORD argc, char **argv)
     g_hstatus = RegisterServiceCtrlHandler(BAC_SERVICENAME, ServiceCtrl);
 
     if (g_hstatus == 0) {
-       log_error_message("RegisterServiceCtlHandler failed"); 
-       MessageBox(NULL, "Contact Register Service Handler failure",
+       log_error_message(_("RegisterServiceCtlHandler failed")); 
+       MessageBox(NULL, _("Contact Register Service Handler failure"),
           "Bacula service", MB_OK);
        return;
     }
@@ -292,7 +292,7 @@ void WINAPI ServiceMain(DWORD argc, char **argv)
             45000)) {                       // Hint as to how long Bacula should have hung before you assume error
 
         ReportStatus(SERVICE_STOPPED, g_error,  0);
-        log_error_message("ReportStatus STOPPED failed 1"); 
+        log_error_message(_("ReportStatus STOPPED failed 1")); 
         return;
     }
 
@@ -315,7 +315,7 @@ DWORD WINAPI ServiceWorkThread(LPVOID lpwThreadParam)
           SERVICE_RUNNING,       // service state
           NO_ERROR,              // exit code
           0)) {                  // wait hint
-       MessageBox(NULL, "Report Service failure", "Bacula Service", MB_OK);
+       MessageBox(NULL, _("Report Service failure"), "Bacula Service", MB_OK);
        log_error_message("ReportStatus RUNNING failed"); 
        return 0;
     }
@@ -352,7 +352,7 @@ bacService::InstallService()
 
    // Get the filename of this executable
    if (GetModuleFileName(NULL, path, pathlength-(strlen(BaculaRunService)+2)) == 0) {
-      MessageBox(NULL, "Unable to install Bacula service", szAppName, MB_ICONEXCLAMATION | MB_OK);
+      MessageBox(NULL, _("Unable to install Bacula service"), szAppName, MB_ICONEXCLAMATION | MB_OK);
       return 0;
    }
 
@@ -370,8 +370,8 @@ bacService::InstallService()
       strcat(servicecmd, "\\bacula-fd.conf");
 
    } else {
-      log_error_message("Service command length too long"); 
-      MessageBox(NULL, "Service command length too long. Service not registered.",
+      log_error_message(_("Service command length too long")); 
+      MessageBox(NULL, _("Service command length too long. Service not registered."),
           szAppName, MB_ICONEXCLAMATION | MB_OK);
       return 0;
    }
@@ -386,16 +386,16 @@ bacService::InstallService()
       if (RegCreateKey(HKEY_LOCAL_MACHINE, 
               "Software\\Microsoft\\Windows\\CurrentVersion\\RunServices",
               &runservices) != ERROR_SUCCESS) {
-         log_error_message("Cannot write System Registry"); 
-         MessageBox(NULL, "The System Registry could not be updated - the Bacula service was not installed", szAppName, MB_ICONEXCLAMATION | MB_OK);
+         log_error_message(_("Cannot write System Registry")); 
+         MessageBox(NULL, _("The System Registry could not be updated - the Bacula service was not installed"), szAppName, MB_ICONEXCLAMATION | MB_OK);
          break;
       }
 
       // Attempt to add a Bacula key
       if (RegSetValueEx(runservices, szAppName, 0, REG_SZ, (unsigned char *)servicecmd, strlen(servicecmd)+1) != ERROR_SUCCESS) {
          RegCloseKey(runservices);
-         log_error_message("Cannot add Bacula key to System Registry"); 
-         MessageBox(NULL, "The Bacula service could not be installed", szAppName, MB_ICONEXCLAMATION | MB_OK);
+         log_error_message(_("Cannot add Bacula key to System Registry")); 
+         MessageBox(NULL, _("The Bacula service could not be installed"), szAppName, MB_ICONEXCLAMATION | MB_OK);
          break;
       }
 
@@ -403,10 +403,10 @@ bacService::InstallService()
 
       // We have successfully installed the service!
       MessageBox(NULL,
-              "The Bacula File service was successfully installed.\n"
+              _("The Bacula File service was successfully installed.\n"
               "The service may be started by double clicking on the\n"
               "Bacula \"Start\" icon and will be automatically\n"
-              "be run the next time this machine is rebooted. ",
+              "be run the next time this machine is rebooted. "),
               szAppName,
               MB_ICONINFORMATION | MB_OK);
       break;
@@ -421,7 +421,7 @@ bacService::InstallService()
       if (hsrvmanager == NULL) {
          log_error_message("OpenSCManager failed"); 
          MessageBox(NULL,
-            "The Service Control Manager could not be contacted - the Bacula service was not installed",
+            _("The Service Control Manager could not be contacted - the Bacula service was not installed"),
             szAppName, MB_ICONEXCLAMATION | MB_OK);
          break;
       }
@@ -446,13 +446,13 @@ bacService::InstallService()
          CloseServiceHandle(hsrvmanager);
          log_error_message("CreateService failed"); 
          MessageBox(NULL,
-             "The Bacula service could not be installed",
+             _("The Bacula service could not be installed"),
               szAppName, MB_ICONEXCLAMATION | MB_OK);
          break;
       }
 
       set_service_description(hsrvmanager,hservice, 
-"Provides file backup and restore services. Bacula -- the network backup solution.");
+_("Provides file backup and restore services. Bacula -- the network backup solution."));
 
       CloseServiceHandle(hsrvmanager);
       CloseServiceHandle(hservice);
@@ -485,17 +485,17 @@ bacService::InstallService()
 
       // Everything went fine
       MessageBox(NULL,
-              "The Bacula File service was successfully installed.\n"
+              _("The Bacula File service was successfully installed.\n"
               "The service may be started from the Control Panel and will\n"
-              "automatically be run the next time this machine is rebooted.",
+              "automatically be run the next time this machine is rebooted."),
               szAppName,
               MB_ICONINFORMATION | MB_OK);
       break;
    default:
       log_error_message("Unknown Windows System version"); 
       MessageBox(NULL, 
-                 "Unknown Windows operating system.\n"     
-                 "Cannot install Bacula service.\n",
+                 _("Unknown Windows operating system.\n"     
+                 "Cannot install Bacula service.\n"),
                  szAppName, MB_ICONEXCLAMATION | MB_OK);
        break;     
    };
@@ -519,12 +519,12 @@ bacService::RemoveService()
               "Software\\Microsoft\\Windows\\CurrentVersion\\RunServices",
               &runservices) != ERROR_SUCCESS) {
          MessageBox(NULL, 
-            "Could not find registry entry.\nService probably not registerd - the Bacula service was not removed", szAppName, MB_ICONEXCLAMATION | MB_OK);
+            _("Could not find registry entry.\nService probably not registerd - the Bacula service was not removed"), szAppName, MB_ICONEXCLAMATION | MB_OK);
       } else {
          // Attempt to delete the Bacula key
          if (RegDeleteValue(runservices, szAppName) != ERROR_SUCCESS) {
             RegCloseKey(runservices);
-            MessageBox(NULL, "Could not delete Registry key.\nThe Bacula service could not be removed", szAppName, MB_ICONEXCLAMATION | MB_OK);
+            MessageBox(NULL, _("Could not delete Registry key.\nThe Bacula service could not be removed"), szAppName, MB_ICONEXCLAMATION | MB_OK);
          }
 
          RegCloseKey(runservices);
@@ -534,13 +534,13 @@ bacService::RemoveService()
       // Try to kill any running copy of Bacula
       if (!KillRunningCopy()) {
          MessageBox(NULL,
-             "Bacula could not be contacted, probably not running",
+             _("Bacula could not be contacted, probably not running"),
              szAppName, MB_ICONEXCLAMATION | MB_OK);
          break;
       }
 
       // We have successfully removed the service!
-      MessageBox(NULL, "The Bacula service has been removed", szAppName, MB_ICONINFORMATION | MB_OK);
+      MessageBox(NULL, _("The Bacula service has been removed"), szAppName, MB_ICONINFORMATION | MB_OK);
       break;
 
    // Windows NT, Win2K, WinXP
@@ -583,25 +583,25 @@ bacService::RemoveService()
                }
 
                if (status.dwCurrentState != SERVICE_STOPPED) {
-                  MessageBox(NULL, "The Bacula service could not be stopped", szAppName, MB_ICONEXCLAMATION | MB_OK);
+                  MessageBox(NULL, _("The Bacula service could not be stopped"), szAppName, MB_ICONEXCLAMATION | MB_OK);
                }
             }
 
             // Now remove the service from the SCM
             if(DeleteService(hservice)) {
-               MessageBox(NULL, "The Bacula service has been removed", szAppName, MB_ICONINFORMATION | MB_OK);
+               MessageBox(NULL, _("The Bacula service has been removed"), szAppName, MB_ICONINFORMATION | MB_OK);
             } else {
-               MessageBox(NULL, "The Bacula service could not be removed", szAppName, MB_ICONEXCLAMATION | MB_OK);
+               MessageBox(NULL, _("The Bacula service could not be removed"), szAppName, MB_ICONEXCLAMATION | MB_OK);
             }
 
             CloseServiceHandle(hservice);
          } else {
-            MessageBox(NULL, "The Bacula service could not be found", szAppName, MB_ICONEXCLAMATION | MB_OK);
+            MessageBox(NULL, _("The Bacula service could not be found"), szAppName, MB_ICONEXCLAMATION | MB_OK);
          }
 
          CloseServiceHandle(hsrvmanager);
       } else {
-         MessageBox(NULL, "The SCM could not be contacted - the Bacula service was not removed", szAppName, MB_ICONEXCLAMATION | MB_OK);
+         MessageBox(NULL, _("The SCM could not be contacted - the Bacula service was not removed"), szAppName, MB_ICONEXCLAMATION | MB_OK);
       }
       break;
    }
@@ -665,7 +665,7 @@ BOOL ReportStatus(DWORD state,
 
     // Tell the SCM our new status
     if (!(result = SetServiceStatus(g_hstatus, &g_srvstatus))) {
-       log_error_message("SetServiceStatus failed");
+       log_error_message(_("SetServiceStatus failed"));
     }
 
     return result;
@@ -693,7 +693,7 @@ void LogErrorMsg(char *message, char *fname, int lineno)
    // Use event logging to log the error
    heventsrc = RegisterEventSource(NULL, BAC_SERVICENAME);
 
-   sprintf(msgbuff, "\n\n%s error: %ld at %s:%d"
+   sprintf(msgbuff, _("\n\n%s error: %ld at %s:%d")
       BAC_SERVICENAME, g_error, fname, lineno);
    strings[0] = msgbuff;
    strings[1] = message;
@@ -768,15 +768,15 @@ void set_service_description(SC_HANDLE hSCManager, SC_HANDLE hService,
        }
  
        if (lpqslsBuf->fIsLocked) {
-          printf("Locked by: %s, duration: %ld seconds\n"
+          printf(_("Locked by: %s, duration: %ld seconds\n")
                 lpqslsBuf->lpLockOwner, 
                 lpqslsBuf->dwLockDuration); 
        } else {
-          printf("No longer locked\n"); 
+          printf(_("No longer locked\n")); 
        }
  
        LocalFree(lpqslsBuf); 
-       log_error_message("Could not lock database"); 
+       log_error_message(_("Could not lock database")); 
        return;
     } 
  
index 5382346f17b7ce628cf93ad303707d8b7990557e..43c1f62d835b75833157ee2c2e44f762e220b61b 100644 (file)
@@ -1,6 +1,8 @@
 Instructions to build Bacula with Microsoft Visual C++ 2005 Express Edition (free version).
 ---
 
+(Note: for the moment VSS support has been disabled)
+
 What you need to download:
 - Visual C++ Express Edition Beta 2 (2MB + 66MB)
   http://lab.msdn.microsoft.com/express/visualc/default.aspx
@@ -12,6 +14,11 @@ What you need to download:
 - wxWidgets for Win32 (17MB) (exe file)
   http://www.wxwidgets.org/dl_msw2.htm#stable
 
+- gettext packages (2MB)
+  + http://mirror.switch.ch/ftp/mirror/gnu/gettext/gettext-runtime-0.13.1.bin.woe32.zip
+  + http://mirror.switch.ch/ftp/mirror/gnu/gettext/gettext-tools-0.13.1.bin.woe32.zip
+  + http://mirror.switch.ch/ftp/mirror/gnu/libiconv/libiconv-1.9.1.bin.woe32.zip
+
 - Bacula source files:
   + deppkgs-win32 from SF download page (extracted in <dev dir>/deppkgs-win32)
   + latest source from the CVS (maybe you want to use mingw-msys to checkout them) (in <dev dir>/bacula)
@@ -28,7 +35,10 @@ Installation instructions:
    + Run <temp directory>\setup.exe
    + When asked for the installation directory, choose <vc++ install dir>\VC\PlatformSDK
      (e.g. E:\Microsoft Visual Studio 8\VC\PlatformSDK\)
-   + When asked for components, you can safely remove documentation, samples, and all 64-bit tools and libs.
+   + When asked for components, you can safely remove documentation, samples, and all 64-bit tools and libs if you want to save disk space.
+
+ - gettext packages
+   + extract them all in <dev dir>/deppkgs-win32/gettext
 
  - wxWidgets for Win32
    + delete <dev dir>/deppkgs-win32/wx directory
@@ -61,5 +71,7 @@ Build instructions:
    + Open <dev dir>/bacula/src/win32/bacula.sln
    + Launch Build->Configuration Manager, then select your configuration.
    + Then run Build->Build Solution (this will build wx-console, bconsole and bacula-fd).
-   + Don't forget to copy pthreadVCE.dll from <dev dir>/deppkgs-win32/pthreads to
-     the Release and Debug directories in src/win32/baculafd and src/win32/wx-console
\ No newline at end of file
+   + Don't forget to copy pthreadVCE.dll from <dev dir>/deppkgs-win32/pthreads and
+     iconv.dll and intl.dll from <dev dir>/deppkgs-win32/gettext/bin to
+     the Release and Debug directories in src/win32/baculafd, src/win32/wx-console
+     and src/win32/console.
index e96227d0fc771fcbabbc92e9ffd71aef7e0a9a62..c3d818b78cfa322d3b60784ff45ade4a084324ed 100644 (file)
@@ -4,8 +4,8 @@
        Version="8.00"
        Name="baculafd"
        ProjectGUID="{6A435DBB-4D3D-4DAE-8CB3-E0AF169A240B}"
+       RootNamespace="baculafd"
        Keyword="MFCProj"
-       SignManifests="true"
        >
        <Platforms>
                <Platform
@@ -46,7 +46,7 @@
                                Name="VCCLCompilerTool"
                                Optimization="2"
                                InlineFunctionExpansion="1"
-                               AdditionalIncludeDirectories="../compat,../..,../../../../depkgs-win32/pthreads,../../../../depkgs-win32/zlib,."
+                               AdditionalIncludeDirectories="../compat,../..,../../../../depkgs-win32/pthreads,../../../../depkgs-win32/zlib;../../../../depkgs-win32/gettext/include"
                                PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;HAVE_WIN32"
                                StringPooling="true"
                                RuntimeLibrary="0"
                                Name="VCResourceCompilerTool"
                                PreprocessorDefinitions="NDEBUG"
                                Culture="1033"
+                               AdditionalIncludeDirectories=""
                        />
                        <Tool
                                Name="VCPreLinkEventTool"
                        />
                        <Tool
                                Name="VCLinkerTool"
-                               AdditionalDependencies="wsock32.lib pthreadVCE.lib zlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"
+                               AdditionalDependencies="wsock32.lib pthreadVCE.lib zlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib uuid.lib intl.lib"
                                OutputFile="Release/bacula-fd.exe"
-                               LinkIncremental="1"
+                               LinkIncremental="0"
                                SuppressStartupBanner="true"
-                               AdditionalLibraryDirectories="../../../../depkgs-win32/pthreads,../../../../depkgs-win32/zlib"
+                               AdditionalLibraryDirectories="../../../../depkgs-win32/pthreads,../../../../depkgs-win32/zlib;../../../../depkgs-win32/gettext/lib"
                                IgnoreDefaultLibraryNames="MSVCRT.lib"
+                               DelayLoadDLLs="$(NOINHERIT)"
                                SubSystem="2"
                                TargetMachine="1"
                        />
                        <Tool
                                Name="VCCLCompilerTool"
                                Optimization="0"
-                               AdditionalIncludeDirectories="../compat,../..,../../../../depkgs-win32/pthreads,../../../../depkgs-win32/zlib,."
+                               AdditionalIncludeDirectories="../compat,../..,../../../../depkgs-win32/pthreads,../../../../depkgs-win32/zlib,../../../../depkgs-win32/gettext/include"
                                PreprocessorDefinitions="_DEBUG;_WINMAIN_;PTW32_BUILD;WIN32;_CONSOLE;HAVE_WIN32"
                                MinimalRebuild="true"
                                BasicRuntimeChecks="3"
                        />
                        <Tool
                                Name="VCLinkerTool"
-                               AdditionalDependencies="wsock32.lib pthreadVCE.lib zlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"
+                               AdditionalDependencies="wsock32.lib pthreadVCE.lib zlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib intl.lib"
                                OutputFile="Debug/bacula-fd.exe"
-                               LinkIncremental="2"
+                               LinkIncremental="0"
                                SuppressStartupBanner="true"
-                               AdditionalLibraryDirectories="../../../../depkgs-win32/pthreads,../../../../depkgs-win32/zlib"
+                               AdditionalLibraryDirectories="../../../../depkgs-win32/pthreads,../../../../depkgs-win32/zlib,../../../../depkgs-win32/gettext/lib"
                                IgnoreDefaultLibraryNames="MSVCRT.lib"
                                GenerateDebugInformation="true"
                                SubSystem="2"
                                RelativePath="..\..\filed\win32\winmain.cpp"
                                >
                        </File>
-                       <File
-                               RelativePath="..\..\filed\win32\winres.rc"
-                               >
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCResourceCompilerTool"
-                                               PreprocessorDefinitions="NDEBUG;$(NoInherit)"
-                                               AdditionalIncludeDirectories="\Nicolas\bacula\src\filed\win32"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCResourceCompilerTool"
-                                               PreprocessorDefinitions="_DEBUG;$(NoInherit)"
-                                               AdditionalIncludeDirectories="\Nicolas\bacula\src\filed\win32"
-                                       />
-                               </FileConfiguration>
-                       </File>
                        <File
                                RelativePath="..\..\filed\win32\winservice.cpp"
                                >
                        Name="Header Files"
                        Filter="h;hpp;hxx;hm;inl"
                        >
+                       <File
+                               RelativePath=".\StdAfx.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\filed\win32\winabout.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\filed\win32\winbacula.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\compat\winconfig.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\filed\win32\winevents.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\filed\win32\winres.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\filed\win32\winservice.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\filed\win32\winstat.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\filed\win32\wintray.h"
+                               >
+                       </File>
                </Filter>
                <Filter
                        Name="Resource Files"
                                RelativePath="..\..\src\filed\win32\saving.ico"
                                >
                        </File>
+                       <File
+                               RelativePath="..\..\filed\win32\winres.rc"
+                               >
+                       </File>
                </Filter>
                <File
                        RelativePath="ReadMe.txt"
index 35157b3d322178f3a83fc71d0e928de9d9144f4a..e7365b65e670efce61e5a9132183587850fa6ef1 100644 (file)
 #define HAVE_SETENV 1
 
 /* Define to 1 if you have the `setlocale' function. */
-#undef HAVE_SETLOCALE  
-
-#undef HAVEL_NLS
+#undef HAVE_SETLOCALE
+
+/* Define to 1 if translation of program messages to the user's native
+   language is requested. */
+#if (defined _MSC_VER) && (_MSC_VER >= 1400) // VC8+
+/* Enable NLS only if we are using the new VC++.
+ * NLS should also work with VC++ 7.1, but the Makefiles are
+ * not adapted to support it (include, lib...). */
+#define ENABLE_NLS 1
+#endif
 
 #define LOCALEDIR "."
 
index 754390443301259e649b8e4990306146c7322dc2..dc5fe36f02834ab02c91868b0242b1dcfc0b9f25 100644 (file)
@@ -5,6 +5,7 @@
        Name="console"\r
        ProjectGUID="{A0F65E06-9F18-40AC-81F6-A080852F1104}"\r
        Keyword="MFCProj"\r
+       SignManifests="true"\r
        >\r
        <Platforms>\r
                <Platform\r
@@ -44,7 +45,7 @@
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="../compat;../..;../../../../depkgs-win32/pthreads"\r
+                               AdditionalIncludeDirectories="../compat;../..;../../../../depkgs-win32/pthreads,../../../../depkgs-win32/gettext/include"\r
                                PreprocessorDefinitions="_DEBUG;HAVE_CONSOLE;_WINMAIN_;PTW32_BUILD;WIN32;_CONSOLE;HAVE_WIN32"\r
                                MinimalRebuild="true"\r
                                BasicRuntimeChecks="3"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalDependencies="wsock32.lib pthreadVCE.lib"\r
+                               AdditionalDependencies="wsock32.lib pthreadVCE.lib intl.lib"\r
                                OutputFile="Debug/bconsole.exe"\r
-                               LinkIncremental="2"\r
+                               LinkIncremental="0"\r
                                SuppressStartupBanner="true"\r
-                               AdditionalLibraryDirectories="../../../../depkgs-win32/pthreads"\r
+                               AdditionalLibraryDirectories="../../../../depkgs-win32/pthreads;,../../../../depkgs-win32/gettext/lib"\r
                                GenerateDebugInformation="true"\r
                                SubSystem="1"\r
                                TargetMachine="1"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="4"\r
-                               AdditionalIncludeDirectories="../compat,../..,../../../../depkgs-win32/pthreads,."\r
+                               AdditionalIncludeDirectories="../compat,../..,../../../../depkgs-win32/pthreads;../../../../depkgs-win32/gettext/include"\r
                                PreprocessorDefinitions="_DEBUG;HAVE_CONSOLE;_WINMAIN_;PTW32_BUILD;WIN32;_CONSOLE;HAVE_WIN32"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="2"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalDependencies="wsock32.lib pthreadVCE.lib"\r
+                               AdditionalDependencies="wsock32.lib pthreadVCE.lib intl.lib"\r
                                OutputFile="Release/bconsole.exe"\r
-                               LinkIncremental="1"\r
+                               LinkIncremental="0"\r
                                SuppressStartupBanner="true"\r
-                               AdditionalLibraryDirectories="../../../../depkgs-win32/pthreads"\r
+                               AdditionalLibraryDirectories="../../../../depkgs-win32/pthreads;../../../../depkgs-win32/gettext/lib"\r
                                SubSystem="1"\r
                                TargetMachine="1"\r
                        />\r
index 40cb5836a7f327eb9da455b199ebe09f6ea75155..47c4c886cab407974b40d51552444478636990a2 100644 (file)
@@ -5,6 +5,7 @@
        Name="wx-console"\r
        ProjectGUID="{9BA8E10D-0D82-4B25-8543-DE34641FBC10}"\r
        Keyword="Win32Proj"\r
+       SignManifests="true"\r
        >\r
        <Platforms>\r
                <Platform\r
@@ -38,7 +39,7 @@
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="../..;../compat;../../../../depkgs-win32/wx/include;../../../../depkgs-win32/pthreads;../../../../depkgs-win32/zlib;../../../../depkgs-win32/wx/lib/vc_lib/mswud"\r
+                               AdditionalIncludeDirectories="../..;../compat;../../../../depkgs-win32/wx/include;../../../../depkgs-win32/pthreads;../../../../depkgs-win32/zlib;../../../../depkgs-win32/wx/lib/vc_lib/mswud,../../../../depkgs-win32/gettext/include"\r
                                PreprocessorDefinitions="UNICODE;WIN32;_DEBUG;_WINDOWS;__WXMSW__;_CONSOLE;_MBCS;HAVE_WIN32;HAVE_WXCONSOLE"\r
                                MinimalRebuild="true"\r
                                BasicRuntimeChecks="3"\r
@@ -59,9 +60,9 @@
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalDependencies="wxbase26ud.lib wxbase26ud_net.lib wxbase26ud_odbc.lib wxbase26ud_xml.lib wxexpatd.lib wxjpegd.lib wxmsw26ud_adv.lib wxmsw26ud_core.lib wxmsw26ud_dbgrid.lib wxmsw26ud_gl.lib wxmsw26ud_html.lib wxmsw26ud_media.lib wxmsw26ud_qa.lib wxmsw26ud_xrc.lib wxpngd.lib wxregexud.lib wxtiffd.lib wxzlibd.lib pthreadVCE.lib zlib.lib wsock32.lib comctl32.lib rpcrt4.lib gdi32.lib user32.lib ole32.lib ComDlg32.Lib shell32.lib AdvAPI32.Lib"\r
-                               LinkIncremental="2"\r
-                               AdditionalLibraryDirectories="../../../../depkgs-win32/wx/lib/vc_lib;../../../../depkgs-win32/pthreads;../../../../depkgs-win32/zlib"\r
+                               AdditionalDependencies="wxbase26ud.lib wxbase26ud_net.lib wxbase26ud_odbc.lib wxbase26ud_xml.lib wxexpatd.lib wxjpegd.lib wxmsw26ud_adv.lib wxmsw26ud_core.lib wxmsw26ud_dbgrid.lib wxmsw26ud_gl.lib wxmsw26ud_html.lib wxmsw26ud_media.lib wxmsw26ud_qa.lib wxmsw26ud_xrc.lib wxpngd.lib wxregexud.lib wxtiffd.lib wxzlibd.lib pthreadVCE.lib zlib.lib wsock32.lib comctl32.lib rpcrt4.lib gdi32.lib user32.lib ole32.lib ComDlg32.Lib shell32.lib AdvAPI32.Lib intl.lib"\r
+                               LinkIncremental="0"\r
+                               AdditionalLibraryDirectories="../../../../depkgs-win32/wx/lib/vc_lib;../../../../depkgs-win32/pthreads;../../../../depkgs-win32/zlib;../../../../depkgs-win32/gettext/lib"\r
                                GenerateDebugInformation="true"\r
                                SubSystem="2"\r
                                TargetMachine="1"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="../..;../compat;../../../../depkgs-win32/wx/include;../../../../depkgs-win32/pthreads;../../../../depkgs-win32/zlib;../../../../depkgs-win32/wx/lib/vc_lib/mswu"\r
+                               AdditionalIncludeDirectories="../..;../compat;../../../../depkgs-win32/wx/include;../../../../depkgs-win32/pthreads;../../../../depkgs-win32/zlib;../../../../depkgs-win32/wx/lib/vc_lib/mswu,../../../../depkgs-win32/gettext/include"\r
                                PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;__WXMSW__;_CONSOLE;_MBCS;HAVE_WIN32;HAVE_WXCONSOLE"\r
                                RuntimeLibrary="2"\r
                                UsePrecompiledHeader="0"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalDependencies="wxbase26u.lib wxbase26u_net.lib wxbase26u_odbc.lib wxbase26u_xml.lib wxexpat.lib wxjpeg.lib wxmsw26u_adv.lib wxmsw26u_core.lib wxmsw26u_dbgrid.lib wxmsw26u_gl.lib wxmsw26u_html.lib wxmsw26u_media.lib wxmsw26u_qa.lib wxmsw26u_xrc.lib wxpng.lib wxregexu.lib wxtiff.lib wxzlib.lib pthreadVCE.lib zlib.lib wsock32.lib comctl32.lib rpcrt4.lib gdi32.lib user32.lib ole32.lib ComDlg32.Lib shell32.lib AdvAPI32.Lib"\r
-                               LinkIncremental="2"\r
-                               AdditionalLibraryDirectories="../../../../depkgs-win32/wx/lib/vc_lib;../../../../depkgs-win32/pthreads;../../../../depkgs-win32/zlib"\r
+                               AdditionalDependencies="wxbase26u.lib wxbase26u_net.lib wxbase26u_odbc.lib wxbase26u_xml.lib wxexpat.lib wxjpeg.lib wxmsw26u_adv.lib wxmsw26u_core.lib wxmsw26u_dbgrid.lib wxmsw26u_gl.lib wxmsw26u_html.lib wxmsw26u_media.lib wxmsw26u_qa.lib wxmsw26u_xrc.lib wxpng.lib wxregexu.lib wxtiff.lib wxzlib.lib pthreadVCE.lib zlib.lib wsock32.lib comctl32.lib rpcrt4.lib gdi32.lib user32.lib ole32.lib ComDlg32.Lib shell32.lib AdvAPI32.Lib intl.lib"\r
+                               LinkIncremental="0"\r
+                               AdditionalLibraryDirectories="../../../../depkgs-win32/wx/lib/vc_lib;../../../../depkgs-win32/pthreads;../../../../depkgs-win32/zlib;../../../../depkgs-win32/gettext/lib"\r
                                GenerateDebugInformation="true"\r
                                SubSystem="2"\r
                                OptimizeReferences="2"\r
index e7b984dc0cc42982e5c9f0fcdb1d0aa857a4a9fa..dba00827658a5d3d32306e4ad6b4806856f567b3 100644 (file)
@@ -742,7 +742,7 @@ void wxbMainFrame::Print(wxString str, int status)
 void wxbMainFrame::Send(wxString str)
 {
    if (ct != NULL) {
-      ct->Write(str.mb_str(wxConvUTF8));
+      ct->Write(str.mb_str(*wxConvCurrent));
       typeCtrl->SetValue(wxT(""));
       consoleCtrl->SetDefaultStyle(wxTextAttr(*wxRED));
       consoleCtrl->AppendText(wxbUtils::ConvertToPrintable(str));