From: Kern Sibbald Date: Sat, 4 Apr 2009 07:03:07 +0000 (+0000) Subject: Add bconsole to Win64 installer X-Git-Tag: Release-3.0.0~20 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c50d3567de490838456c856052d6dbc42dc17c89;p=bacula%2Fbacula Add bconsole to Win64 installer git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8683 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/win32/Makefile b/bacula/src/win32/Makefile index abf998b2bb..61ca0b5cd7 100644 --- a/bacula/src/win32/Makefile +++ b/bacula/src/win32/Makefile @@ -4,6 +4,7 @@ ifeq ($(WIN64),yes) DIRS= lib \ filed \ filed/plugins \ + console \ scripts INSTALLER=win64_installer @@ -26,7 +27,8 @@ else SPECIAL= endif -.PHONY: $(DIRS) clean all Makefile.inc win32_installer newinstaller win64_installer bsmtp +.PHONY: $(DIRS) clean all Makefile.inc win32_installer newinstaller \ + win64_installer bsmtp all: Makefile.inc $(DIRS) $(SPECIAL) $(INSTALLER) @@ -79,6 +81,8 @@ bsmtp: fi ; \ fi + + Makefile.inc: @echo Creating $@ $(ECHO_CMD)TOPDIR=`(cd ../../..;pwd)`; \ diff --git a/bacula/src/win32/filed/plugins/api.c b/bacula/src/win32/filed/plugins/api.c index 2f01d84441..cde58e5f8c 100644 --- a/bacula/src/win32/filed/plugins/api.c +++ b/bacula/src/win32/filed/plugins/api.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2008-2008 Free Software Foundation Europe e.V. + Copyright (C) 2008-2009 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. @@ -117,11 +117,10 @@ printf("Got value %S\n", buf); return bRC_OK; } -char * +const char * ESEErrorMessage(HRESULT result) { - switch (result) - { + switch (result) { case 0: return "No error."; case hrLogfileHasBadSignature: @@ -142,4 +141,3 @@ ESEErrorMessage(HRESULT result) return "Unknown error."; } } - diff --git a/bacula/src/win32/filed/plugins/api.h b/bacula/src/win32/filed/plugins/api.h index 105e9640fc..f67b453f92 100644 --- a/bacula/src/win32/filed/plugins/api.h +++ b/bacula/src/win32/filed/plugins/api.h @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2008-2008 Free Software Foundation Europe e.V. + Copyright (C) 2008-2009 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. @@ -249,7 +249,7 @@ typedef HRESULT (WINAPI *HrESERestoreOpenFile_t) bRC loadExchangeApi(); -char * +const char * ESEErrorMessage(HRESULT result); #define hrLogfileHasBadSignature (HRESULT)0xC8000262L diff --git a/bacula/src/win32/win64_installer/Makefile b/bacula/src/win32/win64_installer/Makefile index 89a8fad7bf..8ae5b1f147 100644 --- a/bacula/src/win32/win64_installer/Makefile +++ b/bacula/src/win32/win64_installer/Makefile @@ -24,6 +24,7 @@ BACULA_BINARIES := \ exchange-fd.dll \ bsleep.exe \ bsmtp.exe \ + bconsole.exe \ bacula-fd.exe DEPKGS32_BINARIES := \ diff --git a/bacula/src/win32/win64_installer/winbacula.nsi b/bacula/src/win32/win64_installer/winbacula.nsi index bc8b81d00f..f00db372d5 100644 --- a/bacula/src/win32/win64_installer/winbacula.nsi +++ b/bacula/src/win32/win64_installer/winbacula.nsi @@ -45,7 +45,7 @@ ; netsh firewall add portopening protocol=tcp port=9102 name="Bacula-FD" -!define PRODUCT "Bacula Systems" +!define PRODUCT "Bacula" ; ; Include the Modern UI @@ -61,7 +61,7 @@ ; Basics ; Name "Bacula" -OutFile "${OUT_DIR}\win${WINVER}baculasystems-${VERSION}.exe" +OutFile "${OUT_DIR}\win${WINVER}bacula-${VERSION}.exe" SetCompressor lzma InstallDir "$PROGRAMFILES\bacula" @@ -113,7 +113,7 @@ Page custom EnterWriteTemplates !InsertMacro GetParameters !InsertMacro GetOptions -DirText "Setup will install Bacula Systems ${VERSION} to the directory specified below. To install in a different folder, click Browse and select another folder." +DirText "Setup will install Bacula ${VERSION} to the directory specified below. To install in a different folder, click Browse and select another folder." !InsertMacro MUI_RESERVEFILE_INSTALLOPTIONS ; @@ -466,6 +466,47 @@ SectionEnd SectionGroupEnd +SectionGroup "Consoles" SecGroupConsoles + +Section "Command Console" SecConsole + SectionIn 1 2 3 + + SetOutPath "$INSTDIR" + + File "${SRC_DIR}\bconsole.exe" + Call InstallCommonFiles + + CreateShortCut "$SMPROGRAMS\Bacula\bconsole.lnk" "$INSTDIR\bconsole.exe" '-c "$INSTDIR\bconsole.conf"' "$INSTDIR\bconsole.exe" 0 + CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Command Console Configuration.lnk" "write.exe" '"$INSTDIR\bconsole.conf"' + +SectionEnd + +Section "Graphical Console" SecWxConsole + SectionIn 1 2 3 + + SetOutPath "$INSTDIR" + +; Call InstallCommonFiles +;!if "${BUILD_TOOLS}" == "MinGW64" +; File "${SRC_DIR}\wxbase28_gcc_bacula.dll" +; File "${SRC_DIR}\wxmsw28_core_gcc_bacula.dll" +;!endif + +; File "${SRC_DIR}\bwx-console.exe" + +; File "/oname=$PLUGINSDIR\bwx-console.conf" "bwx-console.conf.in" +; StrCpy $0 "$INSTDIR" +; StrCpy $1 bwx-console.conf +; Call ConfigEditAndCopy + + ; Create Start Menu entry +; CreateShortCut "$SMPROGRAMS\Bacula\bwx-console.lnk" "$INSTDIR\bwx-console.exe" '-c "$INSTDIR\bwx-console.conf"' "$INSTDIR\bwx-console.exe" 0 +; CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Graphical Console Configuration.lnk" "write.exe" '"$INSTDIR\bwx-console.conf"' +SectionEnd + +SectionGroupEnd + + Section "-Finish" Push $R0 @@ -484,9 +525,9 @@ Section "-Finish" WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "VersionMinor" $R0 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "NoModify" 1 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "NoRepair" 1 - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "URLUpdateInfo" "http://www.baculasystems.com" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "URLInfoAbout" "http://www.baculasystems.com" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "HelpLink" "https://www.baculasystems.com/rt/" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "URLUpdateInfo" "http://www.bacula.org" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "URLInfoAbout" "http://www.bacula.org" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "HelpLink" "http://www.bacula.org?page=support" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "UninstallString" '"$INSTDIR\uninstall.exe"' WriteUninstaller "$INSTDIR\Uninstall.exe" CreateShortCut "$SMPROGRAMS\Bacula\Uninstall Bacula.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0 @@ -495,11 +536,11 @@ SectionEnd ; Extra Page descriptions -LangString DESC_SecFileDaemon ${LANG_ENGLISH} "Install Bacula Systems File Daemon on this system." +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_SecWxConsole ${LANG_ENGLISH} "Install graphical console program on this system." -LangString DESC_SecDocPdf ${LANG_ENGLISH} "Install documentation in Acrobat format on this system." -LangString DESC_SecDocHtml ${LANG_ENGLISH} "Install documentation in HTML format on this system." +;LangString DESC_SecWxConsole ${LANG_ENGLISH} "Install graphical console program on this system." +;LangString DESC_SecDocPdf ${LANG_ENGLISH} "Install documentation in Acrobat format on this system." +;LangString DESC_SecDocHtml ${LANG_ENGLISH} "Install documentation in HTML format on this system." LangString TITLE_ConfigPage1 ${LANG_ENGLISH} "Configuration" LangString SUBTITLE_ConfigPage1 ${LANG_ENGLISH} "Set installation configuration." @@ -516,9 +557,9 @@ LangString SUBTITLE_WriteTemplates ${LANG_ENGLISH} "Create resource templates fo !InsertMacro MUI_FUNCTION_DESCRIPTION_BEGIN !InsertMacro MUI_DESCRIPTION_TEXT ${SecFileDaemon} $(DESC_SecFileDaemon) !InsertMacro MUI_DESCRIPTION_TEXT ${SecConsole} $(DESC_SecConsole) - !InsertMacro MUI_DESCRIPTION_TEXT ${SecWxConsole} $(DESC_SecWxConsole) - !InsertMacro MUI_DESCRIPTION_TEXT ${SecDocPdf} $(DESC_SecDocPdf) - !InsertMacro MUI_DESCRIPTION_TEXT ${SecDocHtml} $(DESC_SecDocHtml) +; !InsertMacro MUI_DESCRIPTION_TEXT ${SecWxConsole} $(DESC_SecWxConsole) +; !InsertMacro MUI_DESCRIPTION_TEXT ${SecDocPdf} $(DESC_SecDocPdf) +; !InsertMacro MUI_DESCRIPTION_TEXT ${SecDocHtml} $(DESC_SecDocHtml) !InsertMacro MUI_FUNCTION_DESCRIPTION_END ; Uninstall section @@ -712,15 +753,15 @@ Function GetSelectedComponents ${If} ${SectionIsSelected} ${SecConsole} IntOp $R0 $R0 | ${ComponentTextConsole} ${EndIf} - ${If} ${SectionIsSelected} ${SecWxConsole} - IntOp $R0 $R0 | ${ComponentGUIConsole} - ${EndIf} - ${If} ${SectionIsSelected} ${SecDocPdf} - IntOp $R0 $R0 | ${ComponentPDFDocs} - ${EndIf} - ${If} ${SectionIsSelected} ${SecDocHtml} - IntOp $R0 $R0 | ${ComponentHTMLDocs} - ${EndIf} +; ${If} ${SectionIsSelected} ${SecWxConsole} +; IntOp $R0 $R0 | ${ComponentGUIConsole} +; ${EndIf} +; ${If} ${SectionIsSelected} ${SecDocPdf} +; IntOp $R0 $R0 | ${ComponentPDFDocs} +; ${EndIf} +; ${If} ${SectionIsSelected} ${SecDocHtml} +; IntOp $R0 $R0 | ${ComponentHTMLDocs} +; ${EndIf} Exch $R0 FunctionEnd @@ -810,30 +851,30 @@ Function SelectPreviousComponents !InsertMacro UnselectSection ${SecConsole} !InsertMacro ClearSectionFlag ${SecConsole} ${SF_RO} ${EndIf} - IntOp $R1 $PreviousComponents & ${ComponentGUIConsole} - ${If} $R1 <> 0 - !InsertMacro SelectSection ${SecWxConsole} - !InsertMacro SetSectionFlag ${SecWxConsole} ${SF_RO} - ${Else} - !InsertMacro UnselectSection ${SecWxConsole} - !InsertMacro ClearSectionFlag ${SecWxConsole} ${SF_RO} - ${EndIf} - IntOp $R1 $PreviousComponents & ${ComponentPDFDocs} - ${If} $R1 <> 0 - !InsertMacro SelectSection ${SecDocPdf} - !InsertMacro SetSectionFlag ${SecDocPdf} ${SF_RO} - ${Else} - !InsertMacro UnselectSection ${SecDocPdf} - !InsertMacro ClearSectionFlag ${SecDocPdf} ${SF_RO} - ${EndIf} - IntOp $R1 $PreviousComponents & ${ComponentHTMLDocs} - ${If} $R1 <> 0 - !InsertMacro SelectSection ${SecDocHtml} - !InsertMacro SetSectionFlag ${SecDocHtml} ${SF_RO} - ${Else} - !InsertMacro UnselectSection ${SecDocHtml} - !InsertMacro ClearSectionFlag ${SecDocHtml} ${SF_RO} - ${EndIf} +; IntOp $R1 $PreviousComponents & ${ComponentGUIConsole} +; ${If} $R1 <> 0 +; !InsertMacro SelectSection ${SecWxConsole} +; !InsertMacro SetSectionFlag ${SecWxConsole} ${SF_RO} +; ${Else} +; !InsertMacro UnselectSection ${SecWxConsole} +; !InsertMacro ClearSectionFlag ${SecWxConsole} ${SF_RO} +; ${EndIf} +; IntOp $R1 $PreviousComponents & ${ComponentPDFDocs} +; ${If} $R1 <> 0 +; !InsertMacro SelectSection ${SecDocPdf} +; !InsertMacro SetSectionFlag ${SecDocPdf} ${SF_RO} +; ${Else} +; !InsertMacro UnselectSection ${SecDocPdf} +; !InsertMacro ClearSectionFlag ${SecDocPdf} ${SF_RO} +; ${EndIf} +; IntOp $R1 $PreviousComponents & ${ComponentHTMLDocs} +; ${If} $R1 <> 0 +; !InsertMacro SelectSection ${SecDocHtml} +; !InsertMacro SetSectionFlag ${SecDocHtml} ${SF_RO} +; ${Else} +; !InsertMacro UnselectSection ${SecDocHtml} +; !InsertMacro ClearSectionFlag ${SecDocHtml} ${SF_RO} +; ${EndIf} ${EndIf} FunctionEnd @@ -860,24 +901,24 @@ Function UpdateComponentUI ${Else} !InsertMacro ClearSectionFlag ${SecConsole} ${SF_BOLD} ${EndIf} - IntOp $R1 $NewComponents & ${ComponentGUIConsole} - ${If} $R1 <> 0 - !InsertMacro SetSectionFlag ${SecWxConsole} ${SF_BOLD} - ${Else} - !InsertMacro ClearSectionFlag ${SecWxConsole} ${SF_BOLD} - ${EndIf} - IntOp $R1 $NewComponents & ${ComponentPDFDocs} - ${If} $R1 <> 0 - !InsertMacro SetSectionFlag ${SecDocPdf} ${SF_BOLD} - ${Else} - !InsertMacro ClearSectionFlag ${SecDocPdf} ${SF_BOLD} - ${EndIf} - IntOp $R1 $NewComponents & ${ComponentHTMLDocs} - ${If} $R1 <> 0 - !InsertMacro SetSectionFlag ${SecDocHtml} ${SF_BOLD} - ${Else} - !InsertMacro ClearSectionFlag ${SecDocHtml} ${SF_BOLD} - ${EndIf} +; IntOp $R1 $NewComponents & ${ComponentGUIConsole} +; ${If} $R1 <> 0 +; !InsertMacro SetSectionFlag ${SecWxConsole} ${SF_BOLD} +; ${Else} +; !InsertMacro ClearSectionFlag ${SecWxConsole} ${SF_BOLD} +; ${EndIf} +; IntOp $R1 $NewComponents & ${ComponentPDFDocs} +; ${If} $R1 <> 0 +; !InsertMacro SetSectionFlag ${SecDocPdf} ${SF_BOLD} +; ${Else} +; !InsertMacro ClearSectionFlag ${SecDocPdf} ${SF_BOLD} +; ${EndIf} +; IntOp $R1 $NewComponents & ${ComponentHTMLDocs} +; ${If} $R1 <> 0 +; !InsertMacro SetSectionFlag ${SecDocHtml} ${SF_BOLD} +; ${Else} +; !InsertMacro ClearSectionFlag ${SecDocHtml} ${SF_BOLD} +; ${EndIf} ${EndIf} GetDlgItem $R0 $HWNDPARENT 1 diff --git a/bacula/technotes b/bacula/technotes index a7137a8485..9e7789cf5e 100644 --- a/bacula/technotes +++ b/bacula/technotes @@ -2,6 +2,8 @@ General: +04Apr09 +kes Add bconsole to Win64 installer. 03Apr09 kes Implement more automatic build of Win64 client. Note, there are still lots of warning messages, but it seems to build a correct binary.