From f009f49fee07ef5d4350c831757555ce2c0dfe25 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 6 Feb 2010 17:12:12 +0100 Subject: [PATCH] Win -- add help files to installer + stop any running bacula-fd before install --- bacula/src/host.h.in | 8 +++++--- bacula/src/qt-console/help/help.cpp | 7 +++++-- bacula/src/qt-console/mainwin.cpp | 3 +-- bacula/src/qt-console/make-win32 | 5 +++++ bacula/src/version.h | 6 +++--- bacula/src/win32/win32_installer/Makefile | 7 +++++++ bacula/src/win32/win32_installer/winbacula.nsi | 12 +++++++++++- bacula/src/win32/win64_installer/winbacula.nsi | 9 +++++++++ 8 files changed, 46 insertions(+), 11 deletions(-) diff --git a/bacula/src/host.h.in b/bacula/src/host.h.in index d3615e9bf6..6da98286a3 100644 --- a/bacula/src/host.h.in +++ b/bacula/src/host.h.in @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2000-2009 Free Software Foundation Europe e.V. + Copyright (C) 2000-2010 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -28,12 +28,14 @@ /* * Define Host machine * - * Version $Id$ - * */ #define HOST_OS "@host@@post_host@" #define BACULA "@BACULA@" #define DISTNAME "@DISTNAME@" #define DISTVER "@DISTVER@" +#ifdef HAVE_WIN32 +#define HELPDIR "c://Program Files//Bacula//help" +#else #define HELPDIR "@htmldir@" +#endif diff --git a/bacula/src/qt-console/help/help.cpp b/bacula/src/qt-console/help/help.cpp index fe6f6662b4..8fb1278204 100644 --- a/bacula/src/qt-console/help/help.cpp +++ b/bacula/src/qt-console/help/help.cpp @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2007-2009 Free Software Foundation Europe e.V. + Copyright (C) 2007-2010 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -31,12 +31,15 @@ * * Kern Sibbald, May MMVII * - * $Id$ */ #include "bat.h" #include "help.h" +/* + * Note: HELPDIR is defined in src/host.h + */ + Help::Help(const QString &path, const QString &file, QWidget *parent) : QWidget(parent) { diff --git a/bacula/src/qt-console/mainwin.cpp b/bacula/src/qt-console/mainwin.cpp index 13640735fd..8859416f52 100644 --- a/bacula/src/qt-console/mainwin.cpp +++ b/bacula/src/qt-console/mainwin.cpp @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2007-2009 Free Software Foundation Europe e.V. + Copyright (C) 2007-2010 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -27,7 +27,6 @@ */ /* - * Version $Id$ * * Main Window control for bat (qt-console) * diff --git a/bacula/src/qt-console/make-win32 b/bacula/src/qt-console/make-win32 index 4b4ed4a27d..b75ff1723b 100755 --- a/bacula/src/qt-console/make-win32 +++ b/bacula/src/qt-console/make-win32 @@ -15,4 +15,9 @@ if test -d ../win32/release32; then cp -f debug/bat.exe ../win32/release32 cp -f ${DEPKGS}/depkgs-mingw32/lib/qt/QtGui4.dll ../win32/release32 cp -f ${DEPKGS}/depkgs-mingw32/lib/qt/QtCore4.dll ../win32/release32 + rm -rf ../win32/release32/help + mkdir ../win32/release32/help + cp -f help/*.html ../win32/release32/help/ + cp -f images/status.png ../win32/release32/help/ + cp -f images/mail-message-new.png ../win32/release32/help/ fi diff --git a/bacula/src/version.h b/bacula/src/version.h index a72041ca45..245fcfe628 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -1,8 +1,8 @@ #undef VERSION -#define VERSION "5.1.0" -#define BDATE "26 January 2010" -#define LSMDATE "26Jan10" +#define VERSION "5.1.1" +#define BDATE "06 February 2010" +#define LSMDATE "06Feb10" #define PROG_COPYRIGHT "Copyright (C) %d-2010 Free Software Foundation Europe e.V.\n" #define BYEAR "2010" /* year for copyright messages in progs */ diff --git a/bacula/src/win32/win32_installer/Makefile b/bacula/src/win32/win32_installer/Makefile index 0f3ab9ffb7..5d70841c7a 100644 --- a/bacula/src/win32/win32_installer/Makefile +++ b/bacula/src/win32/win32_installer/Makefile @@ -64,6 +64,8 @@ DOC_FILES := \ docs/manuals/en/problems/problems.pdf \ docs/manuals/en/utility/utility.pdf +HELP_FILES := help/* + ########################################################################## # Targets @@ -122,7 +124,12 @@ $(foreach file,$(addprefix ../../dird/, $(DIRD_FILES)),$(eval $(call Copy_Binary $(foreach file,$(DOC_FILES),$(eval $(call Copy_Docs,$(file)))) + + $(INSTALL_EXE): winbacula.nsi $(addprefix release32/,$(BACULA_BINARIES) $(SCRIPT_FILES) $(CAT_FILES) $(DEPKGS_BINARIES) $(NONGCC_BINARIES) $(NONGCC_LIBRARIES) $(MINGW_BINARIES) $(SSL_FILES) $(DIRD_FILES) $(DOC_FILES)) + rm -rf release32/help + mkdir release32/help + cp -f $(BINDIR)/$(HELP_FILES) release32/help/ NSISDIR=$(NSIS_DIR) \ $(NSIS_DIR)/makensis -V3 $(DEFINES) winbacula.nsi diff --git a/bacula/src/win32/win32_installer/winbacula.nsi b/bacula/src/win32/win32_installer/winbacula.nsi index af6b16c85d..552a03faa4 100644 --- a/bacula/src/win32/win32_installer/winbacula.nsi +++ b/bacula/src/win32/win32_installer/winbacula.nsi @@ -435,8 +435,15 @@ Section "-Initialize" FileClose $R1 + ${If} ${FileExists} "$OldInstallDir\bacula-fd.exe" + nsExec::ExecToLog '"$OldInstallDir\bacula-fd.exe" /kill' ; Shutdown any bacula that could be running + Sleep 3000 + nsExec::ExecToLog '"$OldInstallDir\bacula-fd.exe" /remove' ; Remove existing service + ${EndIf} + SectionEnd + SectionGroup "Client" SecGroupClient Section "File Service" SecFileDaemon @@ -503,6 +510,9 @@ Section "Bat Console" SecBatConsole StrCpy $1 bat.conf Call ConfigEditAndCopy + File "${SRC_DIR}\help\*" + + ; Create Start Menu entry CreateShortCut "$SMPROGRAMS\Bacula\Bat.lnk" "$INSTDIR\bat.exe" '-c "$INSTDIR\bat.conf"' "$INSTDIR\bat.exe" 0 CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Bat Configuration.lnk" "write.exe" '"$INSTDIR\bat.conf"' @@ -611,7 +621,7 @@ UninstallText "This will uninstall Bacula. Click Uninstall to continue." Section "Uninstall" ; Shutdown any baculum that could be running nsExec::ExecToLog '"$INSTDIR\bacula-fd.exe" /kill' - Sleep 5000 + Sleep 3000 ; ReadRegDWORD $R0 HKLM "Software\Bacula" "Service_Bacula-fd" ; Remove bacula service diff --git a/bacula/src/win32/win64_installer/winbacula.nsi b/bacula/src/win32/win64_installer/winbacula.nsi index f89cd47b22..0dbc90f03c 100644 --- a/bacula/src/win32/win64_installer/winbacula.nsi +++ b/bacula/src/win32/win64_installer/winbacula.nsi @@ -443,6 +443,12 @@ Section "-Initialize" FileClose $R1 + ${If} ${FileExists} "$OldInstallDir\bacula-fd.exe" + nsExec::ExecToLog '"$OldInstallDir\bacula-fd.exe" /kill' ; Shutdown any bacula that could be running + Sleep 3000 + nsExec::ExecToLog '"$OldInstallDir\bacula-fd.exe" /remove' ; Remove existing service + ${EndIf} + SectionEnd SectionGroup "Client" SecGroupClient @@ -516,6 +522,9 @@ Section "Bat Console" SecBatConsole StrCpy $1 bat.conf Call ConfigEditAndCopy + File "${SRC_DIR}\help\*" + + ; Create Start Menu entry CreateShortCut "$SMPROGRAMS\Bacula\Bat.lnk" "$INSTDIR\bin32\bat.exe" '-c "$INSTDIR\bin32\bat.conf"' "$INSTDIR\bin32\bat.exe" 0 CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Bat Configuration.lnk" "write.exe" '"$INSTDIR\bin32\bat.conf"' -- 2.39.5