]> git.sur5r.net Git - bacula/bacula/commitdiff
Add tray monitor to windows installer
authorEric Bollengier <eric@eb.homelinux.org>
Thu, 3 Mar 2011 14:57:23 +0000 (15:57 +0100)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:43:39 +0000 (14:43 +0200)
bacula/src/win32/Makefile
bacula/src/win32/win32_installer/Makefile
bacula/src/win32/win32_installer/tray-monitor.conf.in [new file with mode: 0644]
bacula/src/win32/win32_installer/winbacula.nsi
bacula/src/win32/win64_installer/Makefile
bacula/src/win32/win64_installer/tray-monitor.conf.in [new file with mode: 0644]
bacula/src/win32/win64_installer/winbacula.nsi

index 3bea6ece63999e3b23cb2a8c65ff5ea3597abe0a..01809c9e22aefb62a79124a45e6e82cd154b2be0 100644 (file)
@@ -35,7 +35,10 @@ all: Makefile.inc $(DIRS) $(SPECIAL) $(INSTALLER)
 
 clean: $(DIRS) win32_installer win64_installer
        $(MAKE) -C tools clean
-       $(ECHO_CMD)-rm -rf release32 release64
+       $(ECHO_CMD)-rm -rf release32 release64 ../qt-console/obj32 ../cats/obj32 ../wx-console/obj32
+       $(ECHO_CMD)-rm -rf stored/obj32 dird/obj32 cats/obj32 wx-console/obj32
+       $(ECHO_CMD)-rm -f ../qt-console/release/bat.exe ../qt-console/debug/bat.exe
+       $(ECHO_CMD)-rm -f ../qt-console/tray-monitor/release/bacula-tray-monitor.exe ../qt-console/tray-monitor/debug/bacula-tray-monitor.exe
 
 bat:
        (cd ../qt-console; ./make-win32)
index 1004c67b803fbef7aba8815b68f7bb935db3e83f..e41d5bafbc8956913fca60d4afae333c82c1373c 100644 (file)
@@ -31,7 +31,7 @@ ifeq ($(bat),no)
        BACULA_BINARIES=$(BACULABINARIES)
        HELP=
 else
-       BACULA_BINARIES=$(BACULABINARIES) bat.exe
+       BACULA_BINARIES=$(BACULABINARIES) bat.exe bacula-tray-monitor.exe
        HELP=help
 endif
 
diff --git a/bacula/src/win32/win32_installer/tray-monitor.conf.in b/bacula/src/win32/win32_installer/tray-monitor.conf.in
new file mode 100644 (file)
index 0000000..a981225
--- /dev/null
@@ -0,0 +1,30 @@
+#
+# Bacula Tray Monitor Configuration File
+#
+
+Monitor {
+  Name = @monitor_name@
+  Password = "@mon_password@"         # password for the Directors   
+  RefreshInterval = 30 seconds
+}
+   
+Client {
+  Name = @client_name@
+  Address = localhost
+  FDPort = @client_port@
+  Password = "@monitor_password@"
+}
+
+#Storage {
+#  Name = @basename@-sd
+#  Address = @hostname@
+#  SDPort = @sd_port@
+#  Password = "@mon_sd_password@"          # password for StorageDaemon
+#}
+#
+#Director {
+#  Name = @basename@-dir
+#  DIRport = @dir_port@
+#  address = @hostname@
+#}
+#
index 49da832148da0cd321679d533f21dcf51c4c7b1b..941295e223e06befa2f15338f8a46285de49eb11 100644 (file)
@@ -182,6 +182,7 @@ Var NewComponents
 ;     5 = wxWidgits Console
 ;     6 = Documentation (PDF)
 ;     7 = Documentation (HTML)
+;    10 = Tray Monitor
 
 !define ComponentFile                   1
 !define ComponentStorage                2
@@ -191,6 +192,7 @@ Var NewComponents
 !define ComponentGUIConsole             32
 !define ComponentPDFDocs                64
 !define ComponentHTMLDocs               128
+!define ComponentTrayMonitor            1024
 
 !define ComponentsRequiringUserConfig           63
 !define ComponentsFileAndStorage                3
@@ -524,6 +526,30 @@ Section "Bat Console" SecBatConsole
 
 SectionEnd
 
+Section "Bacula Tray Monitor" SecTrayMonitor
+  SectionIn 1 2 3
+
+  SetOutPath "$INSTDIR"
+
+!if "${BUILD_BAT}" == "yes"
+  Call InstallCommonFiles
+  File "${SRC_DIR}\QtCore4.dll"
+  File "${SRC_DIR}\QtGui4.dll"
+  File "${SRC_DIR}\libgcc_s_dw2-1.dll"
+
+  File "${SRC_DIR}\bacula-tray-monitor.exe"
+
+  File "/oname=$PLUGINSDIR\tray-monitor.conf" "tray-monitor.conf.in"
+  StrCpy $0 "$INSTDIR"
+  StrCpy $1 tray-monitor.conf
+  Call ConfigEditAndCopy
+
+  ; Create Start Menu entry
+  CreateShortCut "$SMPROGRAMS\Bacula\TrayMonitor.lnk" "$INSTDIR\bacula-tray-monitor.exe" '-c "$INSTDIR\tray-monitor.conf"' "$INSTDIR\bacula-tray-monitor.exe" 0
+  CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Tray Monitor Configuration.lnk" "write.exe" '"$INSTDIR\tray-monitor.conf"'
+!endif
+
+SectionEnd
 
 ; Deleted because wxconsole is deprecated
 ;Section "Graphical Console" SecWxConsole
@@ -601,6 +627,7 @@ SectionEnd
 LangString DESC_SecFileDaemon ${LANG_ENGLISH} "Install Bacula File Daemon on this system."
 LangString DESC_SecConsole ${LANG_ENGLISH} "Install command console program on this system."
 LangString DESC_SecBatConsole ${LANG_ENGLISH} "Install Bat graphical console program on this system."
+LangString DESC_SecTrayMonitor ${LANG_ENGLISH} "Install Tray Monitor graphical program on this system."
 
 LangString TITLE_ConfigPage1 ${LANG_ENGLISH} "Configuration"
 LangString SUBTITLE_ConfigPage1 ${LANG_ENGLISH} "Set installation configuration."
@@ -618,6 +645,7 @@ LangString SUBTITLE_WriteTemplates ${LANG_ENGLISH} "Create a resource template f
   !InsertMacro MUI_DESCRIPTION_TEXT ${SecFileDaemon} $(DESC_SecFileDaemon)
   !InsertMacro MUI_DESCRIPTION_TEXT ${SecConsole} $(DESC_SecConsole)
   !InsertMacro MUI_DESCRIPTION_TEXT ${SecBatConsole} $(DESC_SecBatConsole)
+  !InsertMacro MUI_DESCRIPTION_TEXT ${SecTrayMonitor} $(DESC_SecTrayMonitor)
 !InsertMacro MUI_FUNCTION_DESCRIPTION_END
 
 ; Uninstall section
@@ -817,6 +845,9 @@ Function GetSelectedComponents
   ${If} ${SectionIsSelected} ${SecBatConsole}
     IntOp $R0 $R0 | ${ComponentBatConsole}
   ${EndIf}
+  ${If} ${SectionIsSelected} ${SecTrayMonitor}
+    IntOp $R0 $R0 | ${ComponentTrayMonitor}
+  ${EndIf}
   ${If} ${SectionIsSelected} ${SecDocPdf}
     IntOp $R0 $R0 | ${ComponentPDFDocs}
   ${EndIf}
@@ -915,6 +946,14 @@ Function SelectPreviousComponents
       !InsertMacro UnselectSection ${SecBatConsole}
       !InsertMacro ClearSectionFlag ${SecBatConsole} ${SF_RO}
     ${EndIf}
+    IntOp $R1 $PreviousComponents & ${ComponentTrayMonitor}
+    ${If} $R1 <> 0
+      !InsertMacro SelectSection ${SecTrayMonitor}
+      !InsertMacro SetSectionFlag ${SecTrayMonitor} ${SF_RO}
+    ${Else}
+      !InsertMacro UnselectSection ${SecTrayMonitor}
+      !InsertMacro ClearSectionFlag ${SecTrayMonitor} ${SF_RO}
+    ${EndIf}
     ${If} $R1 <> 0
       !InsertMacro SelectSection ${SecDocPdf}
       !InsertMacro SetSectionFlag ${SecDocPdf} ${SF_RO}
@@ -954,6 +993,12 @@ Function UpdateComponentUI
     ${Else}
       !InsertMacro ClearSectionFlag ${SecBatConsole} ${SF_BOLD}
     ${EndIf}
+    IntOp $R1 $NewComponents & ${ComponentTrayMonitor}
+    ${If} $R1 <> 0
+      !InsertMacro SetSectionFlag ${SecTrayMonitor} ${SF_BOLD}
+    ${Else}
+      !InsertMacro ClearSectionFlag ${SecTrayMonitor} ${SF_BOLD}
+    ${EndIf}
     IntOp $R1 $NewComponents & ${ComponentPDFDocs}
     ${If} $R1 <> 0
       !InsertMacro SetSectionFlag ${SecDocPdf} ${SF_BOLD}
index eddc9a8273b414a843b6edc511129b0a1c4f2728..ba8e0caa91d985de0cee4537dda72eb5cc957d36 100644 (file)
@@ -157,6 +157,7 @@ $(foreach file,$(addprefix $(DEPKGS32)/ssl/, $(SSL_FILES)),$(eval $(call Copy_Bi
 
 $(INSTALL_EXE): winbacula.nsi $(addprefix release64/,$(BACULA_BINARIES) $(DEPKGS_BINARIES) $(DEPKGS32_BINARIES) $(SSL_FILES) )
        cp -f ../release32/bat.exe release64
+       cp -f ../release32/bacula-tray-monitor.exe release64
        cp -f ../release32/QtCore4.dll release64
        cp -f ../release32/QtGui4.dll release64
        cp -f ../win32_installer/release32/libgcc_s_dw2-1.dll release64
diff --git a/bacula/src/win32/win64_installer/tray-monitor.conf.in b/bacula/src/win32/win64_installer/tray-monitor.conf.in
new file mode 100644 (file)
index 0000000..a981225
--- /dev/null
@@ -0,0 +1,30 @@
+#
+# Bacula Tray Monitor Configuration File
+#
+
+Monitor {
+  Name = @monitor_name@
+  Password = "@mon_password@"         # password for the Directors   
+  RefreshInterval = 30 seconds
+}
+   
+Client {
+  Name = @client_name@
+  Address = localhost
+  FDPort = @client_port@
+  Password = "@monitor_password@"
+}
+
+#Storage {
+#  Name = @basename@-sd
+#  Address = @hostname@
+#  SDPort = @sd_port@
+#  Password = "@mon_sd_password@"          # password for StorageDaemon
+#}
+#
+#Director {
+#  Name = @basename@-dir
+#  DIRport = @dir_port@
+#  address = @hostname@
+#}
+#
index 59b5a15c93c52573ed82b1eab4d6c7f9810d04ee..b9f5772e04dbc65fb4e1cd3c31dae49f6dbc2c0f 100644 (file)
@@ -189,6 +189,7 @@ Var NewComponents
 ;     5 = wxWidgits Console
 ;     6 = Documentation (PDF)
 ;     7 = Documentation (HTML)
+;    10 = Tray Monitor
 
 !define ComponentFile                   1
 !define ComponentStorage                2
@@ -198,6 +199,7 @@ Var NewComponents
 !define ComponentGUIConsole             32
 !define ComponentPDFDocs                64
 !define ComponentHTMLDocs               128
+!define ComponentTrayMonitor            1024
 
 !define ComponentsRequiringUserConfig           63
 !define ComponentsFileAndStorage                3
@@ -534,6 +536,43 @@ Section "Bat Console" SecBatConsole
   SetOutPath "$INSTDIR"
 SectionEnd
 
+Section "Tray Monitor" SecTrayMonitor
+  SectionIn 1 2 3
+
+  SetOutPath "$INSTDIR\bin32"
+
+  Call InstallCommonFiles
+  File "${SRC_DIR}\QtCore4.dll"
+  File "${SRC_DIR}\QtGui4.dll"
+  File "${SRC_DIR}\libgcc_s_dw2-1.dll"
+  File "${SRC_DIR}\mingwm10.dll"
+  File "${SRC_DIR}\ssleay32.dll"
+  File "${SRC_DIR}\libeay32.dll"
+  File "${SRC_DIR}\bacula-tray-monitor.exe"
+  File "/oname=$INSTDIR\bin32\bacula.dll" "${SRC_DIR}\bacula32.dll"
+  File "/oname=$INSTDIR\bin32\pthreadGCE.dll" "${SRC_DIR}\pthreadGCE32.dll"
+  File "/oname=$INSTDIR\bin32\zlib1.dll" "${SRC_DIR}\zlib132.dll"
+
+  File "/oname=$PLUGINSDIR\tray-monitor.conf" "tray-monitor.conf.in"
+  StrCpy $0 "$INSTDIR\bin32"
+  StrCpy $1 tray-monitor.conf
+  Call ConfigEditAndCopy
+
+  ; Create Start Menu entry
+  CreateShortCut "$SMPROGRAMS\Bacula\TrayMonitor.lnk" "$INSTDIR\bin32\bacula-tray-monitor.exe" '-c "$INSTDIR\bin32\tray-monitor.conf"' "$INSTDIR\bin32\bacula-tray-monitor.exe" 0
+  CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Tray Monitor Configuration.lnk" "write.exe" '"$INSTDIR\bin32\tray-monitor.conf"'
+  SetOutPath "$INSTDIR"
+
+SectionEnd
+
+; Deleted because wxconsole is deprecated
+;Section "Graphical Console" SecWxConsole
+;  SectionIn 1 2 3
+  
+;  SetOutPath "$INSTDIR"
+;
+;SectionEnd
+
 SectionGroupEnd
 
 
@@ -568,6 +607,7 @@ SectionEnd
 LangString DESC_SecFileDaemon ${LANG_ENGLISH} "Install Bacula File Daemon on this system."
 LangString DESC_SecConsole ${LANG_ENGLISH} "Install command console program on this system."
 LangString DESC_SecBatConsole ${LANG_ENGLISH} "Install Bat graphical console program on this system."
+LangString DESC_SecTrayMonitor ${LANG_ENGLISH} "Install Tray Monitor graphical program on this system."
 
 LangString TITLE_ConfigPage1 ${LANG_ENGLISH} "Configuration"
 LangString SUBTITLE_ConfigPage1 ${LANG_ENGLISH} "Set installation configuration."
@@ -585,6 +625,7 @@ LangString SUBTITLE_WriteTemplates ${LANG_ENGLISH} "Create a resource template f
   !InsertMacro MUI_DESCRIPTION_TEXT ${SecFileDaemon} $(DESC_SecFileDaemon)
   !InsertMacro MUI_DESCRIPTION_TEXT ${SecConsole} $(DESC_SecConsole)
   !InsertMacro MUI_DESCRIPTION_TEXT ${SecBatConsole} $(DESC_SecBatConsole)
+  !InsertMacro MUI_DESCRIPTION_TEXT ${SecTrayMonitor} $(DESC_SecTrayMonitor)
 !InsertMacro MUI_FUNCTION_DESCRIPTION_END
 
 ; Uninstall section
@@ -786,6 +827,9 @@ Function GetSelectedComponents
   ${If} ${SectionIsSelected} ${SecBatConsole}
     IntOp $R0 $R0 | ${ComponentBatConsole}
   ${EndIf}
+  ${If} ${SectionIsSelected} ${SecTrayMonitor}
+    IntOp $R0 $R0 | ${ComponentTrayMonitor}
+  ${EndIf}
   Exch $R0
 FunctionEnd
 
@@ -882,6 +926,14 @@ Function SelectPreviousComponents
       !InsertMacro UnselectSection ${SecBatConsole}
       !InsertMacro ClearSectionFlag ${SecBatConsole} ${SF_RO}
     ${EndIf}
+    IntOp $R1 $PreviousComponents & ${ComponentTrayMonitor}
+    ${If} $R1 <> 0
+      !InsertMacro SelectSection ${SecTrayMonitor}
+      !InsertMacro SetSectionFlag ${SecTrayMonitor} ${SF_RO}
+    ${Else}
+      !InsertMacro UnselectSection ${SecTrayMonitor}
+      !InsertMacro ClearSectionFlag ${SecTrayMonitor} ${SF_RO}
+    ${EndIf}
   ${EndIf}
 FunctionEnd
 
@@ -914,6 +966,12 @@ Function UpdateComponentUI
     ${Else}
       !InsertMacro ClearSectionFlag ${SecBatConsole} ${SF_BOLD}
     ${EndIf}
+    IntOp $R1 $NewComponents & ${ComponentTrayMonitor}
+    ${If} $R1 <> 0
+      !InsertMacro SetSectionFlag ${SecTrayMonitor} ${SF_BOLD}
+    ${Else}
+      !InsertMacro ClearSectionFlag ${SecTrayMonitor} ${SF_BOLD}
+    ${EndIf}
   ${EndIf}
 
   GetDlgItem $R0 $HWNDPARENT 1