]> git.sur5r.net Git - bacula/bacula/commitdiff
Change Groupbox name to Remote Director in Configuration page if Director is not...
authorRobert Nelson <robertn@the-nelsons.org>
Fri, 1 Sep 2006 11:55:42 +0000 (11:55 +0000)
committerRobert Nelson <robertn@the-nelsons.org>
Fri, 1 Sep 2006 11:55:42 +0000 (11:55 +0000)
Disable installer going to finish page automatically so Details log can be viewed.

Change default to install as service and start immediately.

Change command line options to /noservice and /nostart.

Add bconsole to all components.

Add /pause command line option to scsilist.exe so that it can be executed from a menu item without the console window disappearing after execution.

Add shortcut to Bacula menu to execute scsilist.cpp

Fix /kill AGAIN.

Add Comment for #undef _DEBUG

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

17 files changed:
bacula/src/win32/installer/ConfigPage1.nsh
bacula/src/win32/installer/ConfigPage2.nsh
bacula/src/win32/installer/winbacula.nsi
bacula/src/win32/tools/scsilist.cpp
bacula/src/wx-console/authenticate.c
bacula/src/wx-console/console_conf.c
bacula/src/wx-console/console_thread.cpp
bacula/src/wx-console/main.cpp
bacula/src/wx-console/wxbconfigfileeditor.cpp
bacula/src/wx-console/wxbconfigpanel.cpp
bacula/src/wx-console/wxbhistorytextctrl.cpp
bacula/src/wx-console/wxblistctrl.cpp
bacula/src/wx-console/wxbmainframe.cpp
bacula/src/wx-console/wxbrestorepanel.cpp
bacula/src/wx-console/wxbtableparser.cpp
bacula/src/wx-console/wxbtreectrl.cpp
bacula/src/wx-console/wxbutils.cpp

index 51f82b6121b3571f886adfcd220aa9a8a602651f..0eb9c166525f2a448d0081086aaed1f2cad00a12 100644 (file)
@@ -16,10 +16,10 @@ Function EnterConfigPage1
   StrCpy $R7 0  ; Top
   
   ${If} $R0 = 1
-    IntOp $R8 $R7 + 50
+    IntOp $R8 $R7 + 52
     FileWrite $R5 '[Field $R6]$\r$\nType="GroupBox"$\r$\nText="Client"$\r$\nLeft=0$\r$\nTop=$R7$\r$\nRight=300$\r$\nBottom=$R8$\r$\n$\r$\n'
     IntOp $R6 $R6 + 1
-    IntOp $R7 $R7 + 10
+    IntOp $R7 $R7 + 12
 
     IntOp $R8 $R7 + 8
     FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Name"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=26$\r$\nBottom=$R8$\r$\n$\r$\n'
@@ -71,10 +71,10 @@ Function EnterConfigPage1
   ${Endif}
 
   ${If} $R1 = 1
-    IntOp $R8 $R7 + 50
+    IntOp $R8 $R7 + 52
     FileWrite $R5 '[Field $R6]$\r$\nType="GroupBox"$\r$\nText="Storage"$\r$\nLeft=0$\r$\nTop=$R7$\r$\nRight=300$\r$\nBottom=$R8$\r$\n$\r$\n'
     IntOp $R6 $R6 + 1
-    IntOp $R7 $R7 + 10
+    IntOp $R7 $R7 + 12
     
     IntOp $R8 $R7 + 8
     FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Name"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=26$\r$\nBottom=$R8$\r$\n$\r$\n'
index 258a31e33a1ceb896d9386f6456da5d402a42b3e..d5b07163d7ccd63b4ae45a66813e40139cd9d4cc 100644 (file)
@@ -24,16 +24,19 @@ Function EnterConfigPage2
   StrCpy $R7 0  ; Top
   
   ${If} $R2 = 1
-    IntOp $R8 $R7 + 90
-  ${ElseIf} $R3 = 1
-    IntOp $R8 $R7 + 52
+    IntOp $R8 $R7 + 92
+  FileWrite $R5 '[Field $R6]$\r$\nType="GroupBox"$\r$\nText="Director"$\r$\nLeft=0$\r$\nTop=$R7$\r$\nRight=300$\r$\nBottom=$R8$\r$\n$\r$\n'
   ${Else}
-    IntOp $R8 $R7 + 24
+    ${If} $R3 = 1
+      IntOp $R8 $R7 + 54
+    ${Else}
+      IntOp $R8 $R7 + 26
+    ${EndIf}
+    FileWrite $R5 '[Field $R6]$\r$\nType="GroupBox"$\r$\nText="Remote Director"$\r$\nLeft=0$\r$\nTop=$R7$\r$\nRight=300$\r$\nBottom=$R8$\r$\n$\r$\n'
   ${EndIf}
 
-  FileWrite $R5 '[Field $R6]$\r$\nType="GroupBox"$\r$\nText="Director"$\r$\nLeft=0$\r$\nTop=$R7$\r$\nRight=300$\r$\nBottom=$R8$\r$\n$\r$\n'
   IntOp $R6 $R6 + 1
-  IntOp $R7 $R7 + 10
+  IntOp $R7 $R7 + 12
 
   IntOp $R8 $R7 + 8
   FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Name"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=26$\r$\nBottom=$R8$\r$\n$\r$\n'
@@ -205,11 +208,11 @@ Function EnterConfigPage2
     ${OrIf} $R1 = 1
     ${OrIf} $R2 = 1
 
-    IntOp $R8 $R7 + 40
+    IntOp $R8 $R7 + 42
 
     FileWrite $R5 '[Field $R6]$\r$\nType="GroupBox"$\r$\nText="Monitor"$\r$\nLeft=0$\r$\nTop=$R7$\r$\nRight=300$\r$\nBottom=$R8$\r$\n$\r$\n'
     IntOp $R6 $R6 + 1
-    IntOp $R7 $R7 + 10
+    IntOp $R7 $R7 + 12
 
     IntOp $R8 $R7 + 8
     FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Name"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=26$\r$\nBottom=$R8$\r$\n$\r$\n'
index c25ca981d616dc1afe7dddc2c67bcde862bcee43..73fc306734e21f1f2f6b2409e488bf3c80fa9612 100644 (file)
 ; Pull in pages
 ;
 
+!define      MUI_COMPONENTSPAGE_SMALLDESC
+!define      MUI_FINISHPAGE_NOAUTOCLOSE
+
 !InsertMacro MUI_PAGE_WELCOME
 ;  !InsertMacro MUI_PAGE_LICENSE "..\..\LICENSE"
 
-!define      MUI_COMPONENTSPAGE_SMALLDESC
-
 !InsertMacro MUI_PAGE_COMPONENTS
 !InsertMacro MUI_PAGE_DIRECTORY
 Page custom EnterConfigPage1 LeaveConfigPage1
@@ -148,8 +149,8 @@ Function .onInit
 
   ; Process Command Line Options
   StrCpy $OptCygwin 0
-  StrCpy $OptService 0
-  StrCpy $OptStart 0
+  StrCpy $OptService 1
+  StrCpy $OptStart 1
   StrCpy $OptSilent 0
   StrCpy $DependenciesDone 0
   StrCpy $DatabaseDone 0
@@ -163,14 +164,14 @@ Function .onInit
     StrCpy $OptCygwin 1
 
   ClearErrors
-  ${GetOptions} $R0 "/service" $R1
+  ${GetOptions} $R0 "/noservice" $R1
   IfErrors +2
-    StrCpy $OptService 1
+    StrCpy $OptService 0
 
   ClearErrors
-  ${GetOptions} $R0 "/start" $R1
+  ${GetOptions} $R0 "/nostart" $R1
   IfErrors +2
-    StrCpy $OptStart 1
+    StrCpy $OptStart 0
 
   IfSilent 0 +2
     StrCpy $OptSilent 1
@@ -230,6 +231,8 @@ Function .onInit
   File "/oname=$PLUGINSDIR\ssleay32.dll" "${DEPKGS_BIN}\ssleay32.dll"
   File "/oname=$PLUGINSDIR\sed.exe" "${DEPKGS_BIN}\sed.exe"
 
+  SetPluginUnload alwaysoff
+
   nsExec::Exec '"$PLUGINSDIR\openssl.exe" rand -base64 -out $PLUGINSDIR\pw.txt 33'
   pop $R0
   ${If} $R0 = 0
@@ -260,6 +263,8 @@ Function .onInit
      FileClose $R1
   ${EndIf}
 
+  SetPluginUnload manual
+
   nsExec::Exec '"$PLUGINSDIR\openssl.exe" rand -base64 -out $PLUGINSDIR\pw.txt 33'
   pop $R0
   ${If} $R0 = 0
@@ -312,6 +317,8 @@ Function CopyDependencies
 FunctionEnd
 
 Function InstallDatabase
+  SetOutPath "$INSTDIR\bin"
+
   ${If} $DatabaseDone = 0
     ${If} $ConfigDirectorDB = 1
       File /oname=bacula_cats.dll "${BACULA_BIN}\cats_mysql.dll"
@@ -454,6 +461,7 @@ Section "File Service" SecFileDaemon
   SectionIn 1 2 3
 
   SetOutPath "$INSTDIR\bin"
+
   File "${BACULA_BIN}\bacula-fd.exe"
 
   StrCpy $R0 0
@@ -487,8 +495,9 @@ SectionGroup "Server"
 
 Section "Storage Service" SecStorageDaemon
   SectionIn 2 3
-  
+
   SetOutPath "$INSTDIR\bin"
+
   File "${DEPKGS_BIN}\loaderinfo.exe"
   File "${DEPKGS_BIN}\mt.exe"
   File "${DEPKGS_BIN}\mtx.exe"
@@ -524,6 +533,7 @@ 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"'
 SectionEnd
 
@@ -531,6 +541,7 @@ Section "Director Service" SecDirectorDaemon
   SectionIn 2 3
 
   SetOutPath "$INSTDIR\bin"
+
   Call InstallDatabase
   File "${BACULA_BIN}\bacula-dir.exe"
   File "${BACULA_BIN}\dbcheck.exe"
@@ -597,7 +608,9 @@ SectionGroupEnd
 SectionGroup "Consoles"
 
 Section "Command Console" SecConsole
-  SectionIn 3
+  SectionIn 1 2 3
+
+  SetOutPath "$INSTDIR\bin"
 
   File "${BACULA_BIN}\bconsole.exe"
   Call CopyDependencies
@@ -624,6 +637,8 @@ SectionEnd
 Section "Graphical Console" SecWxConsole
   SectionIn 1 2 3
   
+  SetOutPath "$INSTDIR\bin"
+
   Call CopyDependencies
 !if "${BUILD_TOOLS}" == "VC8"
   File "${DEPKGS_BIN}\wxbase270_vc_bacula.dll"
@@ -669,6 +684,7 @@ Section "Documentation (Acrobat Format)" SecDocPdf
 
   SetOutPath "$INSTDIR\doc"
   CreateDirectory "$INSTDIR\doc"
+
   File "${DOC_DIR}\manual\bacula.pdf"
   CreateShortCut "$SMPROGRAMS\Bacula\Manual.lnk" '"$INSTDIR\doc\bacula.pdf"'
 SectionEnd
@@ -678,6 +694,7 @@ 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"
@@ -731,6 +748,8 @@ Section "Uninstall"
   nsExec::ExecToLog '"$INSTDIR\bin\bacula-fd.exe" /kill'
   nsExec::ExecToLog '"$INSTDIR\bin\bacula-sd.exe" /kill'
   nsExec::ExecToLog '"$INSTDIR\bin\bacula-dir.exe" /kill'
+  Sleep 3000
+
 
   ReadRegDWORD $R0 HKLM "Software\Bacula" "Service_Bacula-fd"
   ${If} $R0 = 1
@@ -785,9 +804,10 @@ SectionEnd
 Function InstallDaemon
   Call CopyDependencies
 
-  IfFileExists "$APPDATA\Bacula\$0.conf" 0 +3
+  IfFileExists "$APPDATA\Bacula\$0.conf" 0 +4
     nsExec::ExecToLog '"$INSTDIR\bin\$0.exe" /silent /kill'     ; Shutdown any bacula that could be running
     nsExec::ExecToLog '"$INSTDIR\bin\$0.exe" /silent /remove'   ; Remove existing service
+    Sleep 3000
 
   WriteRegDWORD HKLM "Software\Bacula" "Service_$0" $2
   
index 9640256391c033ba1f13fda0c23c025730f098fb..65182bfd7f2224eccc5a8aca7e6dc83b1e5adc18 100644 (file)
@@ -43,6 +43,7 @@
 
 #include <stdio.h>
 #include <tchar.h>
+#include <conio.h>
 
 #include "ScsiDeviceList.h"
 
@@ -50,7 +51,7 @@
 #define  new   DEBUG_NEW
 #endif
 
-int _tmain(int /* argc */, _TCHAR* /* argv */[])
+int _tmain(int argc, _TCHAR* argv[])
 {
 #if defined(_MSC_VER) && defined(_DEBUG)
    CMemoryState InitialMemState, FinalMemState, DiffMemState;
@@ -98,5 +99,10 @@ int _tmain(int /* argc */, _TCHAR* /* argv */[])
    DiffMemState.DumpStatistics();
 #endif
 
+   if (argc > 1 && _tcsnicmp(argv[1], _T("/pause"), sizeof(_T("/pause")) - sizeof(TCHAR)) == 0) {
+      _fputts(_T("\nPress any key to continue\n"), stderr);
+      _getch();
+   }
+
    return 0;
 }
index 9fb8e6107f7bf75f9d4e91a55f93bb9772ed6f39..4d40c460cd066765fb28920626490a0d324fb082 100644 (file)
 /* _("...") macro returns a wxChar*, so if we need a char*, we need to convert it with:
  * wxString(_("...")).mb_str(*wxConvCurrent) */
 
+/*  Windows debug builds set _DEBUG which is used by wxWidgets to select their
+ *  debug memory allocator.  Unfortunately it conflicts with Bacula's SmartAlloc.
+ * So we turn _DEBUG off since we aren't interested in things it enables.
+ */
+
 #undef _DEBUG
 
 #include "bacula.h"
index d6af64e00c1822154a43f2195b5005d8a71dc625..c7d61e271dd8e59ce25f61a54a03bdba975f1c89 100644 (file)
 /* _("...") macro returns a wxChar*, so if we need a char*, we need to convert it with:
  * wxString(_("...")).mb_str(*wxConvCurrent) */
 
+/*  Windows debug builds set _DEBUG which is used by wxWidgets to select their
+ *  debug memory allocator.  Unfortunately it conflicts with Bacula's SmartAlloc.
+ * So we turn _DEBUG off since we aren't interested in things it enables.
+ */
+
 #undef _DEBUG
 
 #include "bacula.h"
index b580b9ee0969d09455c4ac6711553e9d2c502b77..6adce12512807b7f4e4dae9a72af6d21752eb525 100644 (file)
 /* _("...") macro returns a wxChar*, so if we need a char*, we need to convert it with:
  * wxString(_("...")).mb_str(*wxConvCurrent) */
 
+/*  Windows debug builds set _DEBUG which is used by wxWidgets to select their
+ *  debug memory allocator.  Unfortunately it conflicts with Bacula's SmartAlloc.
+ * So we turn _DEBUG off since we aren't interested in things it enables.
+ */
+
 #undef _DEBUG
 
 #include "bacula.h"
index 90522cdddc587c628a3d870ab5962d640f3ed35e..1721ea7ae6c3674f0d97a6b9aca4155b513dd681 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
+/*  Windows debug builds set _DEBUG which is used by wxWidgets to select their
+ *  debug memory allocator.  Unfortunately it conflicts with Bacula's SmartAlloc.
+ * So we turn _DEBUG off since we aren't interested in things it enables.
+ */
+
 #undef _DEBUG
 
 #include "bacula.h"
index 7d1ca289d3cd0904ebe48e92e32ef52a9acfce2b..64f0c07e7bd1f46297a110a4acff7bf60560ec73 100644 (file)
 
  */
 
+/*  Windows debug builds set _DEBUG which is used by wxWidgets to select their
+ *  debug memory allocator.  Unfortunately it conflicts with Bacula's SmartAlloc.
+ * So we turn _DEBUG off since we aren't interested in things it enables.
+ */
+
 #undef _DEBUG
 
 #include "bacula.h"
index 46fd1d083b4d75f0530bb8843e2d3ccc9db00feb..c024f4ca25ae564fc020092b6168a276cb6698a0 100644 (file)
 
  */
 
+/*  Windows debug builds set _DEBUG which is used by wxWidgets to select their
+ *  debug memory allocator.  Unfortunately it conflicts with Bacula's SmartAlloc.
+ * So we turn _DEBUG off since we aren't interested in things it enables.
+ */
+
 #undef _DEBUG
 
 #include "bacula.h"
index f809fe88958d853923b2e5e0c34f9fcd1538a93e..f1b285a14235531de5e29f7e72ed232d19a45941 100644 (file)
 
  */
 
+/*  Windows debug builds set _DEBUG which is used by wxWidgets to select their
+ *  debug memory allocator.  Unfortunately it conflicts with Bacula's SmartAlloc.
+ * So we turn _DEBUG off since we aren't interested in things it enables.
+ */
+
 #undef _DEBUG
 
 #include "bacula.h"
index 99ea98ade4f076db971e450488eb2f379c547820..64c50b94bbbd40596412f23b1ddb84019acd8ad7 100644 (file)
 
  */
 
+/*  Windows debug builds set _DEBUG which is used by wxWidgets to select their
+ *  debug memory allocator.  Unfortunately it conflicts with Bacula's SmartAlloc.
+ * So we turn _DEBUG off since we aren't interested in things it enables.
+ */
+
 #undef _DEBUG
 
 #include "bacula.h"
index 493eb2ee2e43e26ee41cc059dfc484ea2f543cd2..b7d8db547783d87c0e89a3fd3602974f198a23ba 100644 (file)
 
  */
 
+/*  Windows debug builds set _DEBUG which is used by wxWidgets to select their
+ *  debug memory allocator.  Unfortunately it conflicts with Bacula's SmartAlloc.
+ * So we turn _DEBUG off since we aren't interested in things it enables.
+ */
+
 #undef _DEBUG
 
 #include "bacula.h"
index 6819ab895fe19e15ab9f1671ba03f2ccc7679284..926223b6c56c2f3340d1ebd2d1fa0f7eae7ee5e7 100644 (file)
@@ -49,6 +49,11 @@ Parameters to modify:
 Select parameter to modify (1-11):
        */
 
+/*  Windows debug builds set _DEBUG which is used by wxWidgets to select their
+ *  debug memory allocator.  Unfortunately it conflicts with Bacula's SmartAlloc.
+ * So we turn _DEBUG off since we aren't interested in things it enables.
+ */
+
 #undef _DEBUG
 
 #include "bacula.h"
index b0e0f52d821e986eb99afbaf116a68863437a047..34fcb42e54c4608e2e9cdd08778e7d178649ce2f 100644 (file)
 
  */
 
+/*  Windows debug builds set _DEBUG which is used by wxWidgets to select their
+ *  debug memory allocator.  Unfortunately it conflicts with Bacula's SmartAlloc.
+ * So we turn _DEBUG off since we aren't interested in things it enables.
+ */
+
 #undef _DEBUG
 
 #include "bacula.h"
index 1b6feca72d3169d4da24baf3a920cd970d0d257d..a0431e3dfbf5f957da61fffe39fbe0467f2d64c1 100644 (file)
 
 */
 
+/*  Windows debug builds set _DEBUG which is used by wxWidgets to select their
+ *  debug memory allocator.  Unfortunately it conflicts with Bacula's SmartAlloc.
+ * So we turn _DEBUG off since we aren't interested in things it enables.
+ */
+
 #undef _DEBUG
 
 #include "bacula.h"
index 31330c9e4527cb9a44b36be6f92bbabc82f72bab..1b7e9fb8eca1e209669150869a1c63f435395a33 100644 (file)
 
  */
 
+/*  Windows debug builds set _DEBUG which is used by wxWidgets to select their
+ *  debug memory allocator.  Unfortunately it conflicts with Bacula's SmartAlloc.
+ * So we turn _DEBUG off since we aren't interested in things it enables.
+ */
+
 #undef _DEBUG
 
 #include "bacula.h"