/* Forward referenced subroutines */
static bool set_win32_attributes(JCR *jcr, ATTR *attr, BFILE *ofd);
void unix_name_to_win32(POOLMEM **win32_name, char *name);
-void win_error(JCR *jcr, char *prefix, POOLMEM *ofile);
+void win_error(JCR *jcr, const char *prefix, POOLMEM *ofile);
HANDLE bget_handle(BFILE *bfd);
#endif /* HAVE_WIN32 */
return true;
}
-void win_error(JCR *jcr, char *prefix, POOLMEM *win32_ofile)
+void win_error(JCR *jcr, const char *prefix, POOLMEM *win32_ofile)
{
DWORD lerror = GetLastError();
LPTSTR msg;
LocalFree(msg);
}
-void win_error(JCR *jcr, char *prefix, DWORD lerror)
+void win_error(JCR *jcr, const char *prefix, DWORD lerror)
{
LPTSTR msg;
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2003-2008 Free Software Foundation Europe e.V.
+ Copyright (C) 2003-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.
#if defined(HAVE_WIN32)
-void win_error(JCR *jcr, char *prefix, DWORD lerror);
+void win_error(JCR *jcr, const char *prefix, DWORD lerror);
static int
-enable_priv(JCR *jcr, HANDLE hToken, char *name, int ignore_errors)
+enable_priv(JCR *jcr, HANDLE hToken, const char *name, int ignore_errors)
{
TOKEN_PRIVILEGES tkp;
DWORD lerror;
ECHO_CMD=@
ifeq ($(WIN64),yes)
- DIRS= lib \
- filed \
- filed/plugins \
- scripts
+ DIRS= lib \
+ filed \
+ filed/plugins \
+ scripts
+
+ INSTALLER=win64_installer
+
+ SPECIAL=bsmtp
else
DIRS= lib \
cats \
wx-console \
tools \
scripts
-endif
-.PHONY: $(DIRS) clean all Makefile.inc installer newinstaller
+ INSTALLER=win32_installer newinstaller
-all: Makefile.inc $(DIRS) installer newinstaller
+ SPECIAL=
+endif
+
+.PHONY: $(DIRS) clean all Makefile.inc win32_installer newinstaller win64_installer bsmtp
+all: Makefile.inc $(DIRS) $(SPECIAL) $(INSTALLER)
-clean: $(DIRS) installer newinstaller
+clean: $(DIRS) win32_installer newinstaller win64_installer
$(ECHO_CMD)-rm -rf release
newinstaller:
fi ; \
fi
-installer:
+win32_installer:
+ @if test -f Makefile.inc; then \
+ if $(MAKE) -C $@ $(MAKECMDGOALS); then \
+ echo "\n===== Make of $@ succeeded =====\n\n" ; \
+ else \
+ echo "\n!!!!! Make of $@ failed !!!!!\n\n" ; \
+ fi ; \
+ fi
+
+win64_installer:
@if test -f Makefile.inc; then \
if $(MAKE) -C $@ $(MAKECMDGOALS); then \
echo "\n===== Make of $@ succeeded =====\n\n" ; \
fi ; \
fi
+
$(DIRS):
@if test -f Makefile.inc; then \
if $(MAKE) -C $@ $(MAKECMDGOALS); then \
fi ; \
fi
+bsmtp:
+ @if test -f Makefile.inc; then \
+ if $(MAKE) -C tools bsmtp $(MAKECMDGOALS); then \
+ echo "\n===== Make of tools/bsmtp succeeded =====\n\n" ; \
+ else \
+ echo "\n!!!!! Make of tools/bsmtp failed !!!!!\n\n" ; \
+ fi ; \
+ fi
+
Makefile.inc:
@echo Creating $@
$(ECHO_CMD)TOPDIR=`(cd ../../..;pwd)`; \
- if test "$(WIN64)" = yes -a -e ../../../cross-tools/mingw-w64/bin/x86_64-pc-mingw32-gcc; then \
+ if test "$(WIN64)" = yes -a -e $${TOPDIR}/cross-tools/mingw-w64/bin/x86_64-pc-mingw32-gcc; then \
BINDIR=$${TOPDIR}/cross-tools/mingw-w64/bin; \
INCDIR=$${TOPDIR}/cross-tools/mingw-w64/x86_64-pc-mingw32/include; \
DLLDIR=$${TOPDIR}/cross-tools/mingw-w64/x86_64-pc-mingw32/bin; \
DEPKGSDIR=depkgs-mingw-w64; \
DEPKGSDIR32=depkgs-mingw32; \
- elif test -e ../../../cross-tools/mingw32/bin/mingw32-gcc; then \
+ elif test -e $${TOPDIR}/cross-tools/mingw32/bin/mingw32-gcc; then \
BINDIR=$${TOPDIR}/cross-tools/mingw32/bin; \
INCDIR=$${TOPDIR}/cross-tools/mingw32/mingw32/include; \
DLLDIR=$${TOPDIR}/cross-tools/mingw32/mingw32/bin; \
int cnt = 0;
if (value == NULL)
- value = "<NULL>";
+ value = (char *)"<NULL>";
for (strln = 0; value[strln]; ++strln); /* strlen */
padlen = min - strln;
+++ /dev/null
-Function EnterConfigPage1\r
- ${If} $AutomaticInstall = 1\r
- Abort\r
- ${EndIf}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentsFileAndStorage}\r
-\r
- ${If} $R0 = 0\r
- Abort\r
- ${EndIf}\r
-\r
- FileOpen $R5 "$PLUGINSDIR\ConfigPage1.ini" w\r
-\r
- StrCpy $R6 1 ; Field Number\r
- StrCpy $R7 0 ; Top\r
-\r
- IntOp $R0 $NewComponents & ${ComponentFile}\r
- ${If} $R0 <> 0\r
- IntOp $R8 $R7 + 52\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 12\r
-\r
- IntOp $R8 $R7 + 8\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
-\r
- IntOp $R8 $R8 + 2\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigClientName$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=158$\r$\nBottom=$R8$\r$\n$\r$\n'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 2\r
-\r
- IntOp $R8 $R8 - 2\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Port"$\r$\nLeft=172$\r$\nTop=$R7$\r$\nRight=188$\r$\nBottom=$R8$\r$\n$\r$\n'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
-\r
- IntOp $R8 $R8 + 2\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigClientPort$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=218$\r$\nBottom=$R8$\r$\n$\r$\n'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 2\r
-\r
- IntOp $R8 $R8 - 2\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Max Jobs"$\r$\nLeft=238$\r$\nTop=$R7$\r$\nRight=270$\r$\nBottom=$R8$\r$\n$\r$\n'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
-\r
- IntOp $R8 $R8 + 2\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigClientMaxJobs$\r$\nLeft=274$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 16\r
-\r
- IntOp $R8 $R7 + 8\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Password"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
-\r
- IntOp $R8 $R8 + 2\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigClientPassword$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 14\r
-\r
- IntOp $R8 $R7 + 10\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigClientInstallService$\r$\nText="Install as service"$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=118$\r$\nBottom=$R8$\r$\n$\r$\n'\r
- IntOp $R6 $R6 + 1\r
-\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigClientStartService$\r$\nText="Start after install"$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=260$\r$\nBottom=$R8$\r$\n$\r$\n'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 16\r
- ${Endif}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentStorage}\r
- ${If} $R0 <> 0\r
- IntOp $R8 $R7 + 52\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 12\r
- \r
- IntOp $R8 $R7 + 8\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
-\r
- IntOp $R8 $R8 + 2\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigStorageName$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=158$\r$\nBottom=$R8$\r$\n$\r$\n'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 2\r
-\r
- IntOp $R8 $R8 - 2\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Port"$\r$\nLeft=172$\r$\nTop=$R7$\r$\nRight=188$\r$\nBottom=$R8$\r$\n$\r$\n'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
-\r
- IntOp $R8 $R8 + 2\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigStoragePort$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=218$\r$\nBottom=$R8$\r$\n$\r$\n'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 2\r
-\r
- IntOp $R8 $R8 - 2\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Max Jobs"$\r$\nLeft=238$\r$\nTop=$R7$\r$\nRight=270$\r$\nBottom=$R8$\r$\n$\r$\n'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
-\r
- IntOp $R8 $R8 + 2\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigStorageMaxJobs$\r$\nLeft=274$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 16\r
-\r
- IntOp $R8 $R7 + 8\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Password"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
-\r
- IntOp $R8 $R8 + 2\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigStoragePassword$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 14\r
-\r
- IntOp $R8 $R7 + 10\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigStorageInstallService$\r$\nText="Install as service"$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=118$\r$\nBottom=$R8$\r$\n$\r$\n'\r
- IntOp $R6 $R6 + 1\r
-\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigStorageStartService$\r$\nText="Start after install"$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=260$\r$\nBottom=$R8$\r$\n$\r$\n'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 16\r
- ${Endif}\r
-\r
- IntOp $R6 $R6 - 1\r
-\r
- FileWrite $R5 "[Settings]$\r$\nNumFields=$R6$\r$\n"\r
-\r
- FileClose $R5\r
-\r
- !insertmacro MUI_HEADER_TEXT "$(TITLE_ConfigPage1)" "$(SUBTITLE_ConfigPage1)"\r
- !insertmacro MUI_INSTALLOPTIONS_INITDIALOG "ConfigPage1.ini"\r
- Pop $HDLG ;HWND of dialog\r
-\r
- ; Initialize Controls\r
-\r
- StrCpy $R6 1 ; Field Number\r
-\r
- IntOp $R0 $NewComponents & ${ComponentFile}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 2\r
-\r
- ; Client Name\r
- !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"\r
- SendMessage $HCTL ${EM_LIMITTEXT} 30 0\r
-\r
- IntOp $R6 $R6 + 2\r
-\r
- ; Client Port Number\r
- !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"\r
- SendMessage $HCTL ${EM_LIMITTEXT} 5 0\r
-\r
- IntOp $R6 $R6 + 2\r
-\r
- ; Max Jobs\r
- !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"\r
- SendMessage $HCTL ${EM_LIMITTEXT} 3 0\r
-\r
- IntOp $R6 $R6 + 5\r
- ${Endif}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentStorage}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 2\r
-\r
- ; Storage Name\r
- !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"\r
- SendMessage $HCTL ${EM_LIMITTEXT} 30 0\r
-\r
- IntOp $R6 $R6 + 2\r
-\r
- ; Storage Port Number\r
- !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"\r
- SendMessage $HCTL ${EM_LIMITTEXT} 5 0\r
-\r
- IntOp $R6 $R6 + 2\r
-\r
- ; Max Jobs\r
- !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"\r
- SendMessage $HCTL ${EM_LIMITTEXT} 3 0\r
-\r
- IntOp $R6 $R6 + 5\r
- ${Endif}\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_SHOW\r
-\r
- ; Process results\r
-\r
- StrCpy $R6 3\r
-\r
- IntOp $R0 $NewComponents & ${ComponentFile}\r
- ${If} $R0 <> 0\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientName "ConfigPage1.ini" "Field $R6" "State"\r
-\r
- IntOp $R6 $R6 + 2\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientPort "ConfigPage1.ini" "Field $R6" "State"\r
-\r
- IntOp $R6 $R6 + 2\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientMaxJobs "ConfigPage1.ini" "Field $R6" "State"\r
-\r
- IntOp $R6 $R6 + 2\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientPassword "ConfigPage1.ini" "Field $R6" "State"\r
-\r
- IntOp $R6 $R6 + 1\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientInstallService "ConfigPage1.ini" "Field $R6" "State"\r
-\r
- IntOp $R6 $R6 + 1\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientStartService "ConfigPage1.ini" "Field $R6" "State"\r
-\r
- IntOp $R6 $R6 + 3\r
- ${Endif}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentStorage}\r
- ${If} $R0 <> 0\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStorageName "ConfigPage1.ini" "Field $R6" "State"\r
-\r
- IntOp $R6 $R6 + 2\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStoragePort "ConfigPage1.ini" "Field $R6" "State"\r
-\r
- IntOp $R6 $R6 + 2\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStorageMaxJobs "ConfigPage1.ini" "Field $R6" "State"\r
-\r
- IntOp $R6 $R6 + 2\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStoragePassword "ConfigPage1.ini" "Field $R6" "State"\r
-\r
- IntOp $R6 $R6 + 1\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStorageInstallService "ConfigPage1.ini" "Field $R6" "State"\r
-\r
- IntOp $R6 $R6 + 1\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStorageStartService "ConfigPage1.ini" "Field $R6" "State"\r
-\r
- IntOp $R6 $R6 + 3\r
- ${Endif}\r
-FunctionEnd\r
-\r
-Function LeaveConfigPage1\r
- StrCpy $R6 5\r
-\r
- IntOp $R0 $NewComponents & ${ComponentFile}\r
- ${If} $R0 <> 0\r
- !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage1.ini" "Field $R6" "State"\r
- ${If} $R0 < 1024\r
- ${OrIf} $R0 > 65535\r
- MessageBox MB_OK "Port must be between 1024 and 65535 inclusive."\r
- Abort\r
- ${EndIf}\r
-\r
- IntOp $R6 $R6 + 2\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage1.ini" "Field $R6" "State"\r
- ${If} $R0 < 1\r
- ${OrIf} $R0 > 99\r
- MessageBox MB_OK "Max Jobs must be between 1 and 99 inclusive."\r
- Abort\r
- ${EndIf}\r
-\r
- IntOp $R6 $R6 + 9\r
- ${Endif}\r
- \r
- IntOp $R0 $NewComponents & ${ComponentStorage}\r
- ${If} $R0 <> 0\r
- !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage1.ini" "Field $R6" "State"\r
- ${If} $R0 < 1024\r
- ${OrIf} $R0 > 65535\r
- MessageBox MB_OK "Port must be between 1024 and 65535 inclusive."\r
- Abort\r
- ${EndIf}\r
-\r
- IntOp $R6 $R6 + 2\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage1.ini" "Field $R6" "State"\r
- ${If} $R0 < 1\r
- ${OrIf} $R0 > 99\r
- MessageBox MB_OK "Max Jobs must be between 1 and 99 inclusive."\r
- Abort\r
- ${EndIf}\r
-\r
- IntOp $R6 $R6 + 9\r
- ${Endif}\r
-FunctionEnd\r
+++ /dev/null
-Function EnterConfigPage2\r
- IntOp $R0 $NewComponents & ${ComponentsRequiringUserConfig}\r
-\r
- ${If} $R0 = 0\r
- Abort\r
- ${EndIf}\r
-\r
- FileOpen $R5 "$PLUGINSDIR\ConfigPage2.ini" w\r
-\r
- StrCpy $R6 1 ; Field Number\r
- StrCpy $R7 0 ; Top\r
-\r
- IntOp $R0 $NewComponents & ${ComponentDirector}\r
- ${If} $R0 <> 0\r
- ${If} $AutomaticInstall = 1\r
- IntOp $R8 $R7 + 54\r
- ${Else}\r
- IntOp $R8 $R7 + 92\r
- ${EndIf}\r
- 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'\r
- ${Else}\r
- IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}\r
- ${If} $R0 <> 0\r
- IntOp $R8 $R7 + 54\r
- ${Else}\r
- IntOp $R8 $R7 + 26\r
- ${EndIf}\r
- 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'\r
- ${EndIf}\r
-\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 12\r
-\r
- IntOp $R0 $NewComponents & ${ComponentDirector}\r
- ${If} $R0 <> 0\r
- ${If} "$ConfigDirectorName" == ""\r
- StrCpy $ConfigDirectorName "$HostName-dir"\r
- ${EndIf}\r
- ${If} "$ConfigDirectorPassword" == ""\r
- StrCpy $ConfigDirectorPassword "$LocalDirectorPassword"\r
- ${EndIf}\r
- ${Else}\r
- ${If} "$ConfigDirectorName" == "$HostName-dir"\r
- StrCpy $ConfigDirectorName ""\r
- ${EndIf}\r
- ${If} "$ConfigDirectorPassword" == "$LocalDirectorPassword"\r
- StrCpy $ConfigDirectorPassword ""\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentDirector}\r
- ${If} $R0 = 0\r
- ${OrIf} $AutomaticInstall = 0\r
- IntOp $R8 $R7 + 8\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
-\r
- IntOp $R8 $R8 + 2\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorName$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=158$\r$\nBottom=$R8$\r$\n$\r$\n'\r
- IntOp $R6 $R6 + 1\r
-\r
- ${If} $AutomaticInstall = 0\r
- IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}\r
- ${If} $R0 <> 0\r
- IntOp $R7 $R7 + 2\r
- IntOp $R8 $R8 - 2\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Port"$\r$\nLeft=172$\r$\nTop=$R7$\r$\nRight=188$\r$\nBottom=$R8$\r$\n$\r$\n'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
-\r
- IntOp $R8 $R8 + 2\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigDirectorPort$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=218$\r$\nBottom=$R8$\r$\n$\r$\n'\r
- IntOp $R6 $R6 + 1\r
- ${EndIf}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentDirector}\r
- ${If} $R0 <> 0\r
- IntOp $R7 $R7 + 2\r
- IntOp $R8 $R8 - 2\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Max Jobs"$\r$\nLeft=238$\r$\nTop=$R7$\r$\nRight=270$\r$\nBottom=$R8$\r$\n$\r$\n'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
-\r
- IntOp $R8 $R8 + 2\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigDirectorMaxJobs$\r$\nLeft=274$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
- IntOp $R6 $R6 + 1\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- IntOp $R7 $R7 + 14\r
- ${EndIf}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}\r
- ${If} $R0 <> 0\r
- ${OrIf} $AutomaticInstall = 0\r
- IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}\r
- ${If} $R0 <> 0\r
- IntOp $R7 $R7 + 2\r
- IntOp $R8 $R7 + 8\r
-\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Password"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n'\r
-\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
- IntOp $R8 $R8 + 2\r
-\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorPassword$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
-\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 14\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentDirector}\r
- ${If} $R0 <> 0\r
- IntOp $R7 $R7 + 2\r
- IntOp $R8 $R7 + 8\r
-\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Mail Server"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=48$\r$\nBottom=$R8$\r$\n$\r$\n'\r
-\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
- IntOp $R8 $R8 + 2\r
-\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorMailServer$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 16\r
- IntOp $R8 $R7 + 8\r
-\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Mail Address"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=48$\r$\nBottom=$R8$\r$\n$\r$\n'\r
-\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
- IntOp $R8 $R8 + 2\r
-\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorMailAddress$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 16\r
- IntOp $R8 $R7 + 8\r
-\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Database"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n'\r
-\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
- IntOp $R8 $R8 + 2\r
-\r
- ${If} $ConfigDirectorDB = 0\r
- ${If} $MySQLPath != ""\r
- StrCpy $ConfigDirectorDB 1\r
- ${ElseIf} $PostgreSQLPath != ""\r
- StrCpy $ConfigDirectorDB 2\r
- ${Else}\r
- StrCpy $ConfigDirectorDB 3\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- ${If} $ConfigDirectorDB = 1\r
- StrCpy $R9 1\r
- ${Else}\r
- StrCpy $R9 0\r
- ${EndIf}\r
-\r
- FileWrite $R5 '[Field $R6]$\r$\nType="RadioButton"$\r$\nState=$R9$\r$\nText="MySQL"$\r$\nFlags="GROUP"$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=90$\r$\nBottom=$R8$\r$\n$\r$\n'\r
-\r
- IntOp $R6 $R6 + 1\r
-\r
- ${If} $ConfigDirectorDB = 2\r
- StrCpy $R9 1\r
- ${Else}\r
- StrCpy $R9 0\r
- ${EndIf}\r
-\r
- FileWrite $R5 '[Field $R6]$\r$\nType="RadioButton"$\r$\nState=$R9$\r$\nText="PostgreSQL"$\r$\nFlags="NOTABSTOP"$\r$\nLeft=94$\r$\nTop=$R7$\r$\nRight=146$\r$\nBottom=$R8$\r$\n$\r$\n'\r
-\r
- IntOp $R6 $R6 + 1\r
-\r
- ${If} $ConfigDirectorDB = 3\r
- StrCpy $R9 1\r
- ${Else}\r
- StrCpy $R9 0\r
- ${EndIf}\r
-\r
- FileWrite $R5 '[Field $R6]$\r$\nType="RadioButton"$\r$\nState=$R9$\r$\nText="Sqlite"$\r$\nFlags="NOTABSTOP"$\r$\nLeft=150$\r$\nTop=$R7$\r$\nRight=182$\r$\nBottom=$R8$\r$\n$\r$\n'\r
-\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 12\r
-\r
- ${If} $AutomaticInstall = 0\r
- IntOp $R8 $R7 + 10\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigDirectorInstallService$\r$\nText="Install as service"$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=118$\r$\nBottom=$R8$\r$\n$\r$\n'\r
- IntOp $R6 $R6 + 1\r
-\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigDirectorStartService$\r$\nText="Start after install"$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=260$\r$\nBottom=$R8$\r$\n$\r$\n'\r
-\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 12\r
- ${EndIf}\r
- ${Else}\r
- IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}\r
- ${If} $R0 <> 0\r
- IntOp $R7 $R7 + 2\r
- IntOp $R8 $R7 + 8\r
-\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Address"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=48$\r$\nBottom=$R8$\r$\n$\r$\n'\r
-\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
- IntOp $R8 $R8 + 2\r
-\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorAddress$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 14\r
- IntOp $R8 $R7 + 8\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- IntOp $R7 $R7 + 4\r
-\r
- ${If} $AutomaticInstall = 0\r
- IntOp $R0 $NewComponents & ${ComponentsFileAndStorageAndDirector}\r
- ${If} $R0 <> 0\r
- IntOp $R8 $R7 + 42\r
-\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 12\r
-\r
- IntOp $R8 $R7 + 8\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
-\r
- IntOp $R8 $R8 + 2\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigMonitorName$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=150$\r$\nBottom=$R8$\r$\n$\r$\n'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 16\r
- IntOp $R8 $R7 + 8\r
-\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Password"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n'\r
-\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
- IntOp $R8 $R8 + 2\r
-\r
- FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigMonitorPassword$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
-\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 20\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- IntOp $R6 $R6 - 1\r
- FileWrite $R5 "[Settings]$\r$\nNumFields=$R6$\r$\n"\r
-\r
- FileClose $R5\r
-\r
- IntOp $R0 $NewComponents & ${ComponentsFileAndStorage}\r
- ${If} $R0 = 0\r
- ${OrIf} $AutomaticInstall = 1\r
- !insertmacro MUI_HEADER_TEXT "$(TITLE_ConfigPage1)" "$(SUBTITLE_ConfigPage1)"\r
- ${Else}\r
- !insertmacro MUI_HEADER_TEXT "$(TITLE_ConfigPage2)" "$(SUBTITLE_ConfigPage2)"\r
- ${EndIf}\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_INITDIALOG "ConfigPage2.ini"\r
- Pop $HDLG ;HWND of dialog\r
-\r
- ; Initialize Controls\r
- StrCpy $R6 2 ; Field Number\r
-\r
- IntOp $R0 $NewComponents & ${ComponentDirector}\r
- ${If} $R0 = 0\r
- ${OrIf} $AutomaticInstall = 0\r
- ; Name\r
- IntOp $R6 $R6 + 1\r
- !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND"\r
- SendMessage $HCTL ${EM_LIMITTEXT} 30 0\r
- IntOp $R6 $R6 + 1\r
-\r
- ${If} $AutomaticInstall = 0\r
- IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 1\r
- ; Port Number\r
- !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND"\r
- SendMessage $HCTL ${EM_LIMITTEXT} 5 0\r
- IntOp $R6 $R6 + 1\r
- ${EndIf}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentDirector}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 1\r
- ; Max Jobs\r
- !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND"\r
- SendMessage $HCTL ${EM_LIMITTEXT} 3 0\r
-\r
- IntOp $R6 $R6 + 1\r
- ${EndIf}\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}\r
- ${If} $R0 <> 0\r
- ${OrIf} $AutomaticInstall = 0\r
- IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 2\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentDirector}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 9\r
-\r
- ${If} $AutomaticInstall = 0\r
- IntOp $R6 $R6 + 2\r
- ${EndIf}\r
- ${Else}\r
- IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 2\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- ${If} $AutomaticInstall = 0\r
- IntOp $R0 $NewComponents & ${ComponentsFileAndStorageAndDirector}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 2\r
- !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND"\r
- SendMessage $HCTL ${EM_LIMITTEXT} 30 0\r
- IntOp $R6 $R6 + 2\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_SHOW\r
-\r
- ; Process results\r
-\r
- StrCpy $R6 2\r
-\r
- IntOp $R0 $NewComponents & ${ComponentDirector}\r
- ${If} $R0 = 0\r
- ${OrIf} $AutomaticInstall = 0\r
- IntOp $R6 $R6 + 1\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorName "ConfigPage2.ini" "Field $R6" "State"\r
- IntOp $R6 $R6 + 1\r
-\r
- ${If} $AutomaticInstall = 0\r
- IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 1\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorPort "ConfigPage2.ini" "Field $R6" "State"\r
- IntOp $R6 $R6 + 1\r
- ${EndIf}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentDirector}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 1\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorMaxJobs "ConfigPage2.ini" "Field $R6" "State"\r
- IntOp $R6 $R6 + 1\r
- ${EndIf}\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}\r
- ${If} $R0 <> 0\r
- ${OrIf} $AutomaticInstall = 0\r
- IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 1\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorPassword "ConfigPage2.ini" "Field $R6" "State"\r
- IntOp $R6 $R6 + 1\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentDirector}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 1\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorMailServer "ConfigPage2.ini" "Field $R6" "State"\r
- IntOp $R6 $R6 + 2\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorMailAddress "ConfigPage2.ini" "Field $R6" "State"\r
- IntOp $R6 $R6 + 2\r
- !insertmacro MUI_INSTALLOPTIONS_READ $R5 "ConfigPage2.ini" "Field $R6" "State"\r
- ${If} $R5 = 1\r
- StrCpy $ConfigDirectorDB 1\r
- ${Endif}\r
- IntOp $R6 $R6 + 1\r
- !insertmacro MUI_INSTALLOPTIONS_READ $R5 "ConfigPage2.ini" "Field $R6" "State"\r
- ${If} $R5 = 1\r
- StrCpy $ConfigDirectorDB 2\r
- ${Endif}\r
- IntOp $R6 $R6 + 1\r
- !insertmacro MUI_INSTALLOPTIONS_READ $R5 "ConfigPage2.ini" "Field $R6" "State"\r
- ${If} $R5 = 1\r
- StrCpy $ConfigDirectorDB 3\r
- ${Endif}\r
- IntOp $R6 $R6 + 1\r
-\r
- ${If} $AutomaticInstall = 0\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorInstallService "ConfigPage2.ini" "Field $R6" "State"\r
- IntOp $R6 $R6 + 1\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorStartService "ConfigPage2.ini" "Field $R6" "State"\r
- IntOp $R6 $R6 + 1\r
- ${EndIf}\r
- ${Else}\r
- IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 1\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorAddress "ConfigPage2.ini" "Field $R6" "State"\r
- IntOp $R6 $R6 + 1\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- ${If} $AutomaticInstall = 0\r
- IntOp $R0 $NewComponents & ${ComponentsFileAndStorageAndDirector}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 2\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigMonitorName "ConfigPage2.ini" "Field $R6" "State"\r
- IntOp $R6 $R6 + 2\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigMonitorPassword "ConfigPage2.ini" "Field $R6" "State"\r
- ${EndIf}\r
- ${EndIf}\r
-FunctionEnd\r
-\r
-Function LeaveConfigPage2\r
- ${If} $AutomaticInstall = 0\r
- StrCpy $R6 4\r
-\r
- IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 1\r
- !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage2.ini" "Field $R6" "State"\r
- ${If} $R0 < 1024\r
- ${OrIf} $R0 > 65535\r
- MessageBox MB_OK "Port must be between 1024 and 65535 inclusive."\r
- Abort\r
- ${EndIf}\r
- IntOp $R6 $R6 + 1\r
- ${EndIf}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentDirector}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 1\r
- !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage2.ini" "Field $R6" "State"\r
- ${If} $R0 < 1\r
- ${OrIf} $R0 > 99\r
- MessageBox MB_OK "Max Jobs must be between 1 and 99 inclusive."\r
- Abort\r
- ${EndIf}\r
- IntOp $R6 $R6 + 1\r
- ${EndIf}\r
- ${EndIf}\r
-FunctionEnd\r
+++ /dev/null
-!define LVM_GETITEMCOUNT 0x1004\r
-!define LVM_GETITEMTEXT 0x102D\r
-\r
-Function DumpLog\r
- Exch $5\r
- Push $0\r
- Push $1\r
- Push $2\r
- Push $3\r
- Push $4\r
- Push $6\r
-\r
- FindWindow $0 "#32770" "" $HWNDPARENT\r
- GetDlgItem $0 $0 1016\r
- StrCmp $0 0 error\r
- FileOpen $5 $5 "w"\r
- StrCmp $5 0 error\r
- SendMessage $0 ${LVM_GETITEMCOUNT} 0 0 $6\r
- System::Alloc ${NSIS_MAX_STRLEN}\r
- Pop $3\r
- StrCpy $2 0\r
- System::Call "*(i, i, i, i, i, i, i, i, i) i \\r
- (0, 0, 0, 0, 0, r3, ${NSIS_MAX_STRLEN}) .r1"\r
- loop: StrCmp $2 $6 done\r
- System::Call "User32::SendMessageA(i, i, i, i) i \\r
- ($0, ${LVM_GETITEMTEXT}, $2, r1)"\r
- System::Call "*$3(&t${NSIS_MAX_STRLEN} .r4)"\r
- FileWrite $5 "$4$\r$\n"\r
- IntOp $2 $2 + 1\r
- Goto loop\r
- done:\r
- FileClose $5\r
- System::Free $1\r
- System::Free $3\r
- Goto exit\r
- error:\r
- MessageBox MB_OK error\r
- exit:\r
- Pop $6\r
- Pop $4\r
- Pop $3\r
- Pop $2\r
- Pop $1\r
- Pop $0\r
- Exch $5\r
-FunctionEnd\r
+++ /dev/null
-[Settings]\r
-NumFields=6\r
-\r
-[Field 1]\r
-Type=Label\r
-Text=This is a new installation. Please choose the installation type.\r
-Left=0\r
-Right=300\r
-Top=0\r
-Bottom=28\r
-\r
-[Field 2]\r
-Type=GroupBox\r
-Text=Installation Type\r
-Left=0\r
-Right=300\r
-Top=32\r
-Bottom=136\r
-\r
-[Field 3]\r
-Type=RadioButton\r
-Text=Automatic\r
-State=1\r
-Left=6\r
-Right=52\r
-Top=44\r
-Bottom=54\r
-\r
-[Field 4]\r
-Type=RadioButton\r
-Text=Custom\r
-Left=6\r
-Right=44\r
-Top=90\r
-Bottom=100\r
-\r
-[Field 5]\r
-Type=Label\r
-Text=The software will be installed in the default directory "Program Files\\Bacula". The configuration files will be generated using defaults applicable to most installations.\r
-Left=17\r
-Right=295\r
-Top=58\r
-Bottom=86\r
-\r
-[Field 6]\r
-Type=Label\r
-Text=You may choose the installation directory. The configuration defaults will be displayed and you will be given the chance to make changes before the configuration files are written.\r
-Left=17\r
-Right=295\r
-Top=104\r
-Bottom=132\r
+++ /dev/null
-Function EnterInstallType\r
- Push $R0\r
- Push $R1\r
- Push $R2\r
-\r
- ; Check if this is an upgrade by looking for an uninstaller configured \r
- ; in the registry.\r
- ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "UninstallString"\r
-\r
- ${If} "$R0" != ""\r
- ; Check registry for new installer\r
- ReadRegStr $R1 HKLM "Software\Bacula" "InstallLocation"\r
- ${If} "$R1" != ""\r
- ; New Installer \r
- StrCpy $OldInstallDir $R1\r
- StrCpy $InstallType ${UpgradeInstall}\r
-\r
- SetShellVarContext all\r
-\r
- StrCpy $R1 "$APPDATA\Bacula"\r
- StrCpy $R2 "$INSTDIR\Doc"\r
-\r
- ReadRegDWORD $PreviousComponents HKLM "Software\Bacula" "Components"\r
-\r
- WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 1" "Text" "A previous installation has been found in $OldInstallDir. Please choose the installation type for any additional components you select."\r
- WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 5" "Text" "The configuration files for additional components will be generated using defaults applicable to most installations."\r
- WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 6" "Text" "The configuration defaults for additional components will be displayed and you will be given the chance to make changes before the configuration files are written."\r
-\r
- ReadRegDWORD $ConfigDirectorDB HKLM Software\Bacula Database\r
-\r
- ${If} $ConfigDirectorDB = 0\r
- IntOp $R0 $PreviousComponents & ${ComponentDirector}\r
- ${If} $R0 <> 0\r
- StrCpy $ConfigDirectorDB 1\r
- ${EndIf}\r
- ${EndIf}\r
- ${Else}\r
- ; Processing Upgrade - Get Install Directory\r
- ${StrRep} $R0 $R0 '"' ''\r
- ${GetParent} $R0 $OldInstallDir\r
-\r
- ; Old Installer \r
- StrCpy $InstallType ${MigrateInstall}\r
- StrCpy $R1 "$OldInstallDir\bin"\r
- StrCpy $R2 "$OldInstallDir\Doc"\r
-\r
- WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 1" "Text" "An old installation has been found in $OldInstallDir. The Configuration will be migrated. Please choose the installation type for any additional components you select."\r
- WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 5" "Text" "The software will be installed in the default directory $\"$PROGRAMFILES\Bacula$\". The configuration files for additional components will be generated using defaults applicable to most installations."\r
- WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 6" "Text" "You may choose the installation directory. The configuration defaults will be displayed and you will be given the chance to make changes before the configuration files are written."\r
- ${EndIf}\r
- ${Else}\r
- ; New Install\r
- StrCpy $InstallType ${NewInstall}\r
- WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 5" "Text" "The software will be installed in the default directory $\"$PROGRAMFILES\Bacula$\". The configuration files will be generated using defaults applicable to most installations."\r
- ${EndIf}\r
-\r
- ${If} $InstallType <> ${NewInstall}\r
- ${AndIf} $PreviousComponents = 0\r
- ${If} ${FileExists} "$R1\bacula-fd.conf"\r
- IntOp $PreviousComponents $PreviousComponents | ${ComponentFile}\r
- ${EndIf}\r
- ${If} ${FileExists} "$R1\bconsole.conf"\r
- IntOp $PreviousComponents $PreviousComponents | ${ComponentTextConsole}\r
- ${EndIf}\r
- ${If} ${FileExists} "$R1\wx-console.conf"\r
- IntOp $PreviousComponents $PreviousComponents | ${ComponentGUIConsole}\r
- ${EndIf}\r
- ${If} ${FileExists} "$R2\bacula.pdf"\r
- IntOp $PreviousComponents $PreviousComponents | ${ComponentPDFDocs}\r
- ${EndIf}\r
- ${If} ${FileExists} "$R2\bacula\bacula.html"\r
- IntOp $PreviousComponents $PreviousComponents | ${ComponentHTMLDocs}\r
- ${EndIf}\r
- ${If} ${FileExists} "$R2\bacula.html"\r
- IntOp $PreviousComponents $PreviousComponents | ${ComponentHTMLDocs}\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- !InsertMacro MUI_HEADER_TEXT "$(TITLE_InstallType)" "$(SUBTITLE_InstallType)"\r
- !InsertMacro MUI_INSTALLOPTIONS_INITDIALOG "InstallType.ini"\r
- Pop $HDLG ;HWND of dialog\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_SHOW\r
-\r
- ; Process Results\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_READ $R0 "InstallType.ini" "Field 3" "State"\r
-\r
- ${If} $R0 = 1\r
- StrCpy $AutomaticInstall 1\r
- ${Else}\r
- StrCpy $AutomaticInstall 0\r
- ${EndIf}\r
-\r
- Pop $R2\r
- Pop $R1\r
- Pop $R0\r
-FunctionEnd\r
+++ /dev/null
-#
-# Makefile for win32 bacula executables
-# Using MinGW cross-compiler on GNU/Linux
-#
-# Written by Robert Nelson, June 2006
-#
-
-include ../Makefile.inc
-
-VERSION := $(shell sed -ne 's/.*[ \t]VERSION[ \t][ \t]*"\(.*\)"/\1/p' < ../../version.h)
-
-DEFINES := \
- -DVERSION=$(VERSION) \
- -DOUT_DIR=..\\release \
- -DSRC_DIR=release \
- -DBUILD_TOOLS=MinGW \
-
-INSTALL_EXE := $(BUILDDIR)/release/winbacula-$(VERSION).exe
-
-BACULA_BINARIES := \
- bacula.dll \
- cats_mysql.dll \
- cats_postgresql.dll \
- cats_sqlite3.dll \
- exchange-fd.dll \
- bacula-dir.exe \
- bacula-fd.exe \
- bacula-sd.exe \
- bconsole.exe \
- bcopy.exe \
- bextract.exe \
- bls.exe \
- bscan.exe \
- bsleep.exe \
- bsmtp.exe \
- btape.exe \
- dbcheck.exe \
- scsilist.exe \
- bwx-console.exe
-
-DEPKGS_BINARIES := \
- libeay32.dll \
- pthreadGCE.dll \
- ssleay32.dll \
- zlib1.dll \
- sqlite3.exe \
- openssl.exe \
- loaderinfo.exe \
- mt.exe \
- mtx.exe \
- scsitape.exe \
- sed.exe \
- tapeinfo.exe \
- expr64.exe \
- snooze.exe \
- mkisofs.exe \
- growisofs.exe \
- dvd-ram-control.exe \
- dvd+rw-booktype.exe \
- dvd+rw-format.exe \
- dvd+rw-mediainfo.exe \
- wxbase28_gcc_bacula.dll \
- wxmsw28_core_gcc_bacula.dll
-
-NONGCC_BINARIES := \
- libmysql.dll
-
-NONGCC_LIBRARIES := \
- libpq.dll
-
-MINGW_BINARIES := \
- mingwm10.dll
-
-SCRIPT_FILES := \
- mtx-changer.cmd \
- disk-changer.cmd \
- dvd-handler.cmd
-
-CAT_FILES := \
- create_mysql_database.cmd \
- drop_mysql_database.cmd \
- make_mysql_tables.cmd \
- make_mysql_tables.sql \
- drop_mysql_tables.cmd \
- drop_mysql_tables.sql \
- grant_mysql_privileges.cmd \
- grant_mysql_privileges.sql \
- make_mysql_catalog_backup.cmd \
- create_postgresql_database.cmd \
- create_postgresql_database.sql \
- drop_postgresql_database.cmd \
- make_postgresql_tables.cmd \
- make_postgresql_tables.sql \
- drop_postgresql_tables.cmd \
- drop_postgresql_tables.sql \
- grant_postgresql_privileges.cmd \
- grant_postgresql_privileges.sql \
- make_postgresql_catalog_backup.cmd \
- create_sqlite3_database.cmd \
- drop_sqlite3_database.cmd \
- make_sqlite3_tables.cmd \
- make_sqlite3_tables.sql \
- drop_sqlite3_tables.cmd \
- grant_sqlite3_privileges.cmd \
- make_sqlite3_catalog_backup.cmd \
- delete_catalog_backup.cmd
-
-DIRD_FILES := \
- query.sql
-
-SSL_FILES := \
- openssl.cnf
-
-DOC_FILES := \
- manual/bacula.pdf \
- manual/bacula/*.html \
- manual/bacula/*.png \
- manual/bacula/*.css
-
-##########################################################################
-
-# Targets
-
-.PHONY: all clean installer
-
-all: $(INSTALL_EXE)
-
-installer: $(INSTALL_EXE)
-
-clean:
- @echo "Cleaning `pwd`"
- $(CMD_ECHO)-rm -f $(INSTALL_EXE)
- $(CMD_ECHO)-rm -rf release
-
-#
-# Rules
-#
-
-define Convert_Binary
-release/$$(notdir $(1)): $(1)
- $$(call checkdir,$$@)
- $(ECHO_CMD)cp -f $$^ $$@ ; \
- $(STAB2CV) $$@
-endef
-
-define Copy_Binary
-release/$$(notdir $(1)): $(1)
- $$(call checkdir,$$@)
- $(ECHO_CMD)cp -f $$^ $$@
-endef
-
-define Copy_Docs
-release/$(1): $(DOCDIR)/$(1)
- $$(call checkdir,$$@)
- $(ECHO_CMD)cp -f $$^ $$(dir $$@)
-endef
-
-$(foreach file,$(addprefix $(DEPKGS)/bin/, $(DEPKGS_BINARIES)),$(eval $(call Convert_Binary,$(file))))
-
-$(foreach file,$(addprefix $(DEPKGS)/bin/, $(NONGCC_BINARIES)),$(eval $(call Copy_Binary,$(file))))
-
-$(foreach file,$(addprefix $(DEPKGS)/lib/, $(NONGCC_LIBRARIES)),$(eval $(call Copy_Binary,$(file))))
-
-$(foreach file,$(addprefix $(BINDIR)/, $(BACULA_BINARIES)),$(eval $(call Convert_Binary,$(file))))
-
-$(foreach file,$(addprefix $(MINGW_DLLDIR)/, $(MINGW_BINARIES)),$(eval $(call Copy_Binary,$(file))))
-
-$(foreach file,$(addprefix $(DEPKGS)/ssl/, $(SSL_FILES)),$(eval $(call Copy_Binary,$(file))))
-
-$(foreach file,$(addprefix ../scripts/, $(SCRIPT_FILES)),$(eval $(call Copy_Binary,$(file))))
-
-$(foreach file,$(addprefix ../cats/, $(CAT_FILES)),$(eval $(call Copy_Binary,$(file))))
-
-$(foreach file,$(addprefix ../../dird/, $(DIRD_FILES)),$(eval $(call Copy_Binary,$(file))))
-
-$(foreach file,$(DOC_FILES),$(eval $(call Copy_Docs,$(file))))
-
-$(INSTALL_EXE): winbacula.nsi $(addprefix release/,$(BACULA_BINARIES) $(SCRIPT_FILES) $(CAT_FILES) $(DEPKGS_BINARIES) $(NONGCC_BINARIES) $(NONGCC_LIBRARIES) $(MINGW_BINARIES) $(SSL_FILES) $(DIRD_FILES) $(DOC_FILES))
- NSISDIR=$(NSIS_DIR) \
- $(NSIS_DIR)/makensis -V3 $(DEFINES) winbacula.nsi
-
-include $(BUILDDIR)/Makefile.rules
+++ /dev/null
-Bacula - Windows Version Disclaimer\r
-===================================\r
-\r
-Please note, only the Win32 Client (File daemon) is supported. All the\r
-other components (Director, Storage daemon, their utilities) are provided\r
-on an "as is" basis. Unfortunately, they are neither properly tested, \r
-documented, or supported. This means that we cannot ensure that bug reports\r
-against the non-supported components will be fixed. For them to be supported, \r
-we need three things from the Open Source community:\r
-\r
-1. Full documentation of the Windows particularities of the Director,\r
- the Storage daemon, and their utilities in the Bacula manual.\r
-\r
-2. Someone to periodically and on demand run the regressions tests.\r
-\r
-3. One or more developers who are willing to accept and correct Windows\r
- related bugs as they occur.\r
-\r
-4. A certain Win32 community that will respond to user support questions\r
- on the bacula-users list. (This is probably already fullfilled). \r
- \r
-\r
-Bacula - Windows Version Notes\r
-==============================\r
-\r
-These notes highlight how the Windows version of Bacula differs from the \r
-other versions. It also provides any notes additional to the documentation.\r
-\r
-For detailed documentation on using, configuring and troubleshooting Bacula,\r
-please consult the installed documentation or the online documentation at\r
-http://www.bacula.org/?page=documentation.\r
-\r
-\r
-Start Menu Items\r
-----------------\r
-A number of menu items have been created in the Start menu under All Programs\r
-in the Bacula submenu. They may be selected to edit the configuration files,\r
-view the documentation or run one of the console or utility programs. The \r
-choices available will vary depending on the options you chose to install.\r
-\r
-\r
-File Locations\r
---------------\r
-The programs and documentation are installed in the directory \r
-"C:\Program Files\Bacula" unless a different directory was selected during\r
-installation. The configuration and other application data files are in the\r
-"C:\Documents and Settings\All Users\Application Data\Bacula" directory.\r
-\r
-Code Page Problems\r
--------------------\r
-Please note that Bacula expects the contents of the configuration files to be \r
-written in UTF-8 format. Some translations of "Application Data" have accented\r
-characters, and apparently the installer writes this translated data in the\r
-standard Windows code page coding. This occurs for the Working Directory, and \r
-when it happens the daemon will not start since Bacula cannot find the directory.\r
-The workaround is to manually edit the appropriate conf file and ensure that it\r
-is written out in UTF-8 format.\r
-\r
-The conf files can be edited with any UTF-8 compatible editor, or on most \r
-modern Win32 machines, you can edit them with notepad, then choose UTF-8\r
-output encoding before saving them.\r
-\r
-\r
-Storage and Director Services\r
------------------------------\r
-These services are still considered experimental in this release. Use of \r
-them should be approached with caution since they haven't received the\r
-same level of extensive usage and testing that the File service has \r
-received.\r
-\r
-Storage Device Names\r
---------------------\r
-There is a utility installed called scsilist.exe which displays the installed \r
-devices, their physical address and their device name. A link to it is \r
-created in the Bacula menu when the Storage service is installed.\r
-\r
-Changer and Tape device names in Windows are Changer0, Changer1, etc and \r
-Tape0, Tape1, etc. If there isn't a device driver loaded for the Changer \r
-then you need to use the address <Port>:<Bus>:<Target>:<Lun>. Port is the \r
-SCSI Adapter Number, Bus is the Bus Number on the adapter (usually 0 since \r
-most adapters only have one bus), Target is the device's Target Device ID, \r
-Lun is the Logical Unit Number.\r
- \r
-You must specify DeviceType = tape in the Device resource in bacula-sd.conf \r
-since auto detection of device type doesn't work at the present time.\r
+++ /dev/null
-rem\r
-rem Bacula start file for Win95/98/Me\r
-rem\r
-cd c:\bacula\bin\r
-c:\bacula\bin\bacula-fd.exe /service -c c:\bacula\bin\bacula-fd.conf\r
+++ /dev/null
-rem\r
-rem Bacula stop file for Win95/98/Me\r
-rem\r
-cd c:\bacula\bin\r
-c:\bacula\bin\bacula-fd.exe /kill\r
+++ /dev/null
-[Settings]\r
-NumFields=5\r
-CancelEnabled=0\r
-BackEnabled=0\r
-\r
-[Field 1]\r
-Type="Label"\r
-Text="Templates of the Client and Storage resources can be generated that are customized with the information about this system. These templates can then be copied to the Director computer and included in the Director's configuration file."\r
-Left=7\r
-Right=293\r
-Top=6\r
-Bottom=32\r
-\r
-[Field 2]\r
-Type="CheckBox"\r
-Text="Client"\r
-Left=6\r
-Right=40\r
-Top=38\r
-Bottom=48\r
-\r
-[Field 3]\r
-Type="FileRequest"\r
-State="Client.conf"\r
-Flags=\r
-Filter=Configuration Files|*.conf|All Files|*.*\r
-Left=16\r
-Right=288\r
-Top=50\r
-Bottom=62\r
-\r
-[Field 4]\r
-Type="CheckBox"\r
-Text="Storage"\r
-Left=6\r
-Right=48\r
-Top=70\r
-Bottom=80\r
-\r
-[Field 5]\r
-Type="FileRequest"\r
-State="Storage.conf"\r
-Flags=REQ_SAVE|FILE_EXPLORER|WARN_IF_EXIST\r
-Filter=Configuration Files|*.conf|All Files|*.*\r
-Left=16\r
-Right=288\r
-Top=82\r
-Bottom=94\r
+++ /dev/null
-#\r
-# Default Bacula Director Configuration file\r
-#\r
-# The only thing that MUST be changed is to add one or more\r
-# file or directory names in the Include directive of the\r
-# FileSet resource.\r
-#\r
-# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ @DISTVER@\r
-#\r
-# You might also want to change the default email address\r
-# from root to your address. See the "mail" and "operator"\r
-# directives in the Messages resource.\r
-#\r
-\r
-Director { # define myself\r
- Name = @director_name@\r
- DIRport = @director_port@ # where we listen for UA connections\r
- QueryFile = "@bin_dir@\\query.sql"\r
- WorkingDirectory = "@working_dir@"\r
- PidDirectory = "@working_dir@"\r
- Maximum Concurrent Jobs = @director_maxjobs@\r
- Password = "@director_password@" # Console password\r
- Messages = Daemon\r
-}\r
-\r
-JobDefs {\r
- Name = "DefaultJob"\r
- Type = Backup\r
- Level = Incremental\r
- Client = @client_name@\r
- FileSet = "Test Set"\r
- Schedule = "WeeklyCycle"\r
- Storage = File\r
- Messages = Standard\r
- Pool = Default\r
- Priority = 10\r
-}\r
-\r
-\r
-#\r
-# Define the main nightly save backup job\r
-# By default, this job will back up to disk in C:/tmp\r
-Job {\r
- Name = "Client1"\r
- JobDefs = "DefaultJob"\r
- Write Bootstrap = "@working_dir@\\Client1.bsr"\r
-}\r
-\r
-#Job {\r
-# Name = "Client2"\r
-# Client = @client_name@2\r
-# JobDefs = "DefaultJob"\r
-# Write Bootstrap = "@working_dir@\\Client2.bsr"\r
-#}\r
-\r
-# Backup the catalog database (after the nightly save)\r
-Job {\r
- Name = "BackupCatalog"\r
- JobDefs = "DefaultJob"\r
- Level = Full\r
- FileSet="Catalog"\r
- Schedule = "WeeklyCycleAfterBackup"\r
- # This creates an ASCII copy of the catalog\r
- RunBeforeJob = "\"@bin_dir@\\make_catalog_backup\" bacula bacula"\r
- # This deletes the copy of the catalog\r
- RunAfterJob = "\"@bin_dir@\\delete_catalog_backup\""\r
- Write Bootstrap = "@working_dir@\\BackupCatalog.bsr"\r
- Priority = 11 # run after main backup\r
-}\r
-\r
-#\r
-# Standard Restore template, to be changed by Console program\r
-# Only one such job is needed for all Jobs/Clients/Storage ...\r
-#\r
-Job {\r
- Name = "RestoreFiles"\r
- Type = Restore\r
- Client=@client_name@\r
- FileSet="Test Set"\r
- Storage = File\r
- Pool = Default\r
- Messages = Standard\r
- Where = "C:\\tmp\\bacula-restores"\r
-}\r
-\r
-#\r
-# Note: Windows path separators do NOT work correctly in FileSets.\r
-#\r
-# List of files to be backed up\r
-FileSet {\r
- Name = "Test Set"\r
- Include {\r
- Options {\r
- signature = MD5\r
- ignore case = yes\r
- }\r
-# \r
-# Put your list of files here, preceded by 'File =', one per line\r
-# or include an external list with:\r
-#\r
-# File = <file-name\r
-#\r
-# Note: C:/ backs up everything on drive C.\r
-# if you have other drives such as D:/\r
-# you will probably want to add them too.\r
-#\r
-# By default this is defined to point to the Bacula \r
-# directory to give a reasonable FileSet to backup to\r
-# disk storage during initial testing.\r
-#\r
- File = "@BUILD_DIR@"\r
- }\r
-\r
-#\r
-# If you backup the root directory, the following excluded\r
-# files can be useful\r
-#\r
- Exclude {\r
- Options {\r
- signature = MD5\r
- ignore case = yes\r
- }\r
- File = C:/Temp\r
- File = C:/tmp\r
- }\r
-}\r
-\r
-#\r
-# This is an example which will backup all the hard drives of a Windows System.\r
-#\r
-FileSet {\r
- Name = "Windows Full Set"\r
- Enable VSS = yes\r
- Include {\r
- Options {\r
- Signature = MD5\r
- Exclude = yes\r
- IgnoreCase = yes\r
- EnhancedWild = yes\r
- DriveType = fixed\r
-\r
- # Exclude directories full of lots and lots of useless little files\r
- WildDir = "[A-Z]:/Documents and Settings/*/Cookies"\r
- WildDir = "[A-Z]:/Documents and Settings/*/Recent"\r
- WildDir = "[A-Z]:/Documents and Settings/*/{Local Settings,LOCALS~1}/History"\r
- WildDir = "[A-Z]:/Documents and Settings/*/{Local Settings,LOCALS~1}/Temp"\r
- WildDir = "[A-Z]:/Documents and Settings/*/{Local Settings,LOCALS~1}/Temporary Internet Files"\r
-\r
- # Exclude directories full of lots and lots of useless little files\r
- WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/Cookies"\r
- WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/Recent"\r
- WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/{Local Settings,LOCALS~1}/History"\r
- WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/{Local Settings,LOCALS~1}/Temp"\r
- WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/{Local Settings,LOCALS~1}/Temporary Internet Files"\r
-\r
- # Exclude directories full of lots and lots of useless little files\r
- WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/Cookies"\r
- WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/Recent"\r
- WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/{Local Settings,LOCALS~1}/History"\r
- WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/{Local Settings,LOCALS~1}/Temp"\r
- WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/{Local Settings,LOCALS~1}/Temporary Internet Files"\r
-\r
- # Some random bits of Windows we want to ignore\r
- WildDir = "[A-Z]:/{WINNT,Windows}/Prefetch"\r
- WildDir = "[A-Z]:/{WINNT,Windows}/msdownld.tmp"\r
- WildDir = "[A-Z]:/{WINNT,Windows}/Internet Logs"\r
- WildDir = "[A-Z]:/{WINNT,Windows}/$Nt*Uninstall*"\r
- WildDir = "[A-Z]:/{WINNT,Windows}/Downloaded Installations"\r
-\r
- # Temporary directories & files\r
- WildDir = "[A-Z]:/{WINNT,Windows}/Temp"\r
- WildDir = "[A-Z]:/Temp"\r
- WildFile = "*.tmp"\r
- WildDir = "[A-Z]:/tmp"\r
-\r
- # Fast Find\r
- WildFile = "[A-Z]:/ffastun*"\r
-\r
- # System Restore\r
- WildDir = "[A-Z]:/System Volume Information"\r
-\r
- # Windows Update\r
- WildDir = "[A-Z]:/WUTemp"\r
-\r
- # Recycle bins\r
- WildDir = "[A-Z]:/RECYCLE[DR]"\r
-\r
- # Swap files\r
- WildFile = "[A-Z]:/pagefile.sys"\r
- WildFile = "[A-Z]:/hiberfil.sys"\r
-\r
- # These are programs and are easier to reinstall than restore from\r
- # backup\r
- WildDir = "[A-Z]:/cygwin"\r
- WildDir = "[A-Z]:/{Program Files,PROGRA~1}/Java"\r
- WildDir = "[A-Z]:/{Program Files,PROGRA~1}/Java Web Start"\r
- WildDir = "[A-Z]:/{Program Files,PROGRA~1}/JavaSoft"\r
- WildDir = "[A-Z]:/{Program Files,PROGRA~1}/Microsoft Office"\r
- }\r
-\r
- File = "C:/"\r
- File = "D:/"\r
- File = "E:/"\r
- File = "F:/"\r
- File = "G:/"\r
- File = "H:/"\r
- File = "I:/"\r
- File = "J:/"\r
- File = "K:/"\r
- File = "L:/"\r
- File = "M:/"\r
- File = "N:/"\r
- File = "O:/"\r
- File = "P:/"\r
- File = "Q:/"\r
- File = "R:/"\r
- File = "S:/"\r
- File = "T:/"\r
- File = "U:/"\r
- File = "V:/"\r
- File = "W:/"\r
- File = "X:/"\r
- File = "Y:/"\r
- File = "Z:/"\r
- }\r
-}\r
-\r
-#\r
-# When to do the backups, full backup on first sunday of the month,\r
-# differential (i.e. incremental since full) every other sunday,\r
-# and incremental backups other days\r
-Schedule {\r
- Name = "WeeklyCycle"\r
- Run = Full 1st sun at 23:05\r
- Run = Differential 2nd-5th sun at 23:05\r
- Run = Incremental mon-sat at 23:05\r
-}\r
-\r
-# This schedule does the catalog. It starts after the WeeklyCycle\r
-Schedule {\r
- Name = "WeeklyCycleAfterBackup"\r
- Run = Full sun-sat at 23:10\r
-}\r
-\r
-# This is the backup of the catalog\r
-FileSet {\r
- Name = "Catalog"\r
- Include {\r
- Options {\r
- signature = MD5\r
- }\r
- File = "@working_dir@\\bacula.sql"\r
- }\r
-}\r
-\r
-# Client (File Services) to backup\r
-Client {\r
- Name = @client_name@\r
- Address = @client_address@\r
- FDPort = @client_port@\r
- Catalog = MyCatalog\r
- Password = "@client_password@" # password for FileDaemon\r
- File Retention = 30 days # 30 days\r
- Job Retention = 6 months # six months\r
- AutoPrune = yes # Prune expired Jobs/Files\r
-}\r
-\r
-#\r
-# Second Client (File Services) to backup\r
-# You should change Name, Address, and Password before using\r
-#\r
-#Client {\r
-# Name = @client_name@2\r
-# Address = @client_address@2\r
-# FDPort = @client_port@\r
-# Catalog = MyCatalog\r
-# Password = "@client_password@2" # password for FileDaemon 2\r
-# File Retention = 30 days # 30 days\r
-# Job Retention = 6 months # six months\r
-# AutoPrune = yes # Prune expired Jobs/Files\r
-#}\r
-\r
-\r
-# Definition of file storage device\r
-Storage {\r
- Name = File\r
-# Do not use "localhost" here\r
- Address = @storage_address@ # N.B. Use a fully qualified name here\r
- SDPort = @storage_port@\r
- Password = "@storage_password@"\r
- Device = FileStorage\r
- Media Type = File\r
-}\r
-\r
-\r
-\r
-# Definition of DDS tape storage device\r
-#Storage {\r
-# Name = DDS-4 \r
-# Do not use "localhost" here\r
-# Address = @storage_address@ # N.B. Use a fully qualified name here\r
-# SDPort = @storage_port@\r
-# Password = "@storage_password@" # password for Storage daemon\r
-# Device = DDS-4 # must be same as Device in Storage daemon\r
-# Media Type = DDS-4 # must be same as MediaType in Storage daemon\r
-# Autochanger = yes # enable for autochanger device\r
-#}\r
-\r
-# Definition of 8mm tape storage device\r
-#Storage {\r
-# Name = "8mmDrive"\r
-# Do not use "localhost" here\r
-# Address = @storage_address@ # N.B. Use a fully qualified name here\r
-# SDPort = @storage_port@\r
-# Password = "@storage_password@"\r
-# Device = "Exabyte 8mm"\r
-# MediaType = "8mm"\r
-#}\r
-\r
-\r
-# Generic catalog service\r
-Catalog {\r
- Name = MyCatalog\r
- dbname = bacula; user = bacula; password = ""\r
-}\r
-\r
-# Reasonable message delivery -- send most everything to email address\r
-# and to the console\r
-Messages {\r
- Name = Standard\r
-#\r
-# NOTE! If you send to two email or more email addresses, you will need\r
-# to replace the %r in the from field (-f part) with a single valid\r
-# email address in both the mailcommand and the operatorcommand.\r
-#\r
- mailcommand = "\"@bin_dir@\\bsmtp\" -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula: %t %e of %c %l\" %r"\r
- operatorcommand = "\"@bin_dir@\\bsmtp\" -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula: Intervention needed for %j\" %r"\r
- mail = @job_email@ = all, !skipped \r
- operator = @job_email@ = mount\r
- console = all, !skipped, !saved\r
-#\r
-# WARNING! the following will create a file that you must cycle from\r
-# time to time as it will grow indefinitely. However, it will\r
-# also keep all your messages if they scroll off the console.\r
-#\r
- append = "@working_dir@\\log" = all, !skipped\r
-}\r
-\r
-\r
-#\r
-# Message delivery for daemon messages (no job).\r
-Messages {\r
- Name = Daemon\r
- mailcommand = "\"@bin_dir@\\bsmtp\" -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula daemon message\" %r"\r
- mail = @job_email@ = all, !skipped \r
- console = all, !skipped, !saved\r
- append = "@working_dir@\\log" = all, !skipped\r
-}\r
-\r
-\r
-\r
-# Default pool definition\r
-Pool {\r
- Name = Default\r
- Pool Type = Backup\r
- Recycle = yes # Bacula can automatically recycle Volumes\r
- AutoPrune = yes # Prune expired volumes\r
- Volume Retention = 365 days # one year\r
-}\r
-\r
-# Scratch pool definition\r
-Pool {\r
- Name = Scratch\r
- Pool Type = Backup\r
-}\r
-\r
-#\r
-# Restricted console used by tray-monitor to get the status of the director\r
-#\r
-Console {\r
- Name = @monitor_name@\r
- Password = "@monitor_password@"\r
- CommandACL = status, .status\r
-}\r
+++ /dev/null
-#\r
-# Default Bacula File Daemon Configuration file\r
-#\r
-# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ @DISTVER@\r
-#\r
-# There is not much to change here except perhaps the\r
-# File daemon Name\r
-#\r
-\r
-#\r
-# "Global" File daemon configuration specifications\r
-#\r
-FileDaemon { # this is me\r
- Name = @client_name@\r
- FDport = @client_port@ # where we listen for the director\r
- WorkingDirectory = "@working_dir@"\r
- Pid Directory = "@working_dir@"\r
- #Plugin Directory = "@fdplugins_dir@"\r
- Maximum Concurrent Jobs = @client_maxjobs@\r
-}\r
-\r
-#\r
-# List Directors who are permitted to contact this File daemon\r
-#\r
-Director {\r
- Name = @director_name@\r
- Password = "@client_password@"\r
-}\r
-\r
-#\r
-# Restricted Director, used by tray-monitor to get the\r
-# status of the file daemon\r
-#\r
-Director {\r
- Name = @monitor_name@\r
- Password = "@monitor_password@"\r
- Monitor = yes\r
-}\r
-\r
-# Send all messages except skipped files back to Director\r
-Messages {\r
- Name = Standard\r
- director = @director_name@ = all, !skipped, !restored\r
-}\r
+++ /dev/null
-#\r
-# Default Bacula Storage Daemon Configuration file\r
-#\r
-# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ @DISTVER@\r
-#\r
-# You may need to change the name of your tape drive\r
-# on the "Archive Device" directive in the Device\r
-# resource. If you change the Name and/or the \r
-# "Media Type" in the Device resource, please ensure\r
-# that bacula-dir.conf has corresponding changes.\r
-#\r
-\r
-Storage { # definition of myself\r
- Name = @storage_name@\r
- SDPort = @storage_port@ # Director's port \r
- WorkingDirectory = "@working_dir@"\r
- Pid Directory = "@working_dir@"\r
- Maximum Concurrent Jobs = @storage_maxjobs@\r
-}\r
-\r
-#\r
-# List Directors who are permitted to contact Storage daemon\r
-#\r
-Director {\r
- Name = @director_name@\r
- Password = "@storage_password@"\r
-}\r
-\r
-#\r
-# Restricted Director, used by tray-monitor to get the\r
-# status of the storage daemon\r
-#\r
-Director {\r
- Name = @monitor_name@\r
- Password = "@monitor_password@"\r
- Monitor = yes\r
-}\r
-\r
-#\r
-# Devices supported by this Storage daemon\r
-# To connect, the Director's bacula-dir.conf must have the\r
-# same Name and MediaType. \r
-#\r
-\r
-Device {\r
- Name = FileStorage\r
- Media Type = File\r
- Archive Device = "C:\\Tmp"\r
- LabelMedia = yes # lets Bacula label unlabeled media\r
- Random Access = Yes\r
- AutomaticMount = yes # when device opened, read it\r
- RemovableMedia = no\r
- AlwaysOpen = no\r
-}\r
-\r
-#\r
-# An autochanger device with two drives\r
-#\r
-#Autochanger {\r
-# Name = Autochanger\r
-# Device = Drive-1\r
-# Device = Drive-2\r
-# Changer Command = "mtx-changer %c %o %S %a %d"\r
-# Changer Device = Changer0\r
-#}\r
-\r
-#Device {\r
-# Name = Drive-1 #\r
-# Drive Index = 0\r
-# Media Type = DLT-8000\r
-# Device Type = Tape\r
-# Archive Device = Tape0\r
-# AutomaticMount = yes # when device opened, read it\r
-# AlwaysOpen = yes\r
-# RemovableMedia = yes\r
-# RandomAccess = no\r
-# AutoChanger = yes\r
-# Alert Command = "tapeinfo -f %c | findstr TapeAlert"\r
-#}\r
-\r
-#Device {\r
-# Name = Drive-2 #\r
-# Drive Index = 1\r
-# Media Type = DLT-8000\r
-# Device Type = Tape\r
-# Archive Device = Tape1\r
-# AutomaticMount = yes # when device opened, read it\r
-# AlwaysOpen = yes\r
-# RemovableMedia = yes\r
-# RandomAccess = no\r
-# AutoChanger = yes\r
-# Alert Command = "tapeinfo -f %c | findstr TapeAlert"\r
-#}\r
-\r
-#\r
-#Device {\r
-# Name = DDS-4 # \r
-# Media Type = DDS-4\r
-# Device Type = Tape\r
-# Archive Device = Tape0\r
-# AutomaticMount = yes # when device opened, read it\r
-# AlwaysOpen = yes\r
-# RemovableMedia = yes\r
-# RandomAccess = no\r
-# Alert Command = "tapeinfo -f %c | findstr TapeAlert"\r
-#}\r
-\r
-# \r
-# Send all messages to the Director, \r
-# mount messages also are sent to the email address\r
-#\r
-Messages {\r
- Name = Standard\r
- director = @director_name@ = all\r
-}\r
+++ /dev/null
-#\r
-# Bacula User Agent (or Console) Configuration File\r
-#\r
-\r
-Director {\r
- Name = @director_name@\r
- DIRport = @director_port@\r
- address = @director_address@\r
- Password = "@director_password@"\r
-}\r
+++ /dev/null
-@ECHO OFF\r
-SETLOCAL\r
-\r
-SET CWD=%CD%\r
-CD %1..\..\..\r
-SET TOP_DIR=%CD%\r
-CD %CWD%\r
-SET DEPKG_DIR=%TOP_DIR%\depkgs-msvc\r
-SET DOCS_DIR=%TOP_DIR%\docs\manual\r
-\r
-SET BACULA_DLLS=bacula.dll cats_mysql.dll cats_postgresql.dll cats_sqlite3.dll\r
-SET BACULA_EXES=bacula-dir.exe bacula-fd.exe bacula-sd.exe bconsole.exe wx-console.exe\r
-SET BACULA_TOOLS=bcopy.exe bextract.exe bls.exe bscan.exe bsleep.exe bsmtp.exe btape.exe dbcheck.exe scsilist.exe\r
-\r
-SET DEP_DLLS=libeay32.dll pthreadVCE.dll ssleay32.dll zlib1.dll zlib1.dll.manifest wxbase28_vc_bacula.dll wxmsw28_core_vc_bacula.dll libmysql.dll libpq.dll comerr32.dll libintl-2.dll libiconv-2.dll krb5_32.dll\r
-SET DEP_EXES=openssl.exe loaderinfo.exe mt.exe mtx.exe scsitape.exe sed.exe tapeinfo.exe sqlite3.exe sqlite3.exe.manifest expr64.exe snooze.exe mkisofs.exe growisofs.exe dvd-ram-control.exe dvd+rw-booktype.exe dvd+rw-format.exe dvd+rw-mediainfo.exe\r
-\r
-SET SCRIPTS=mtx-changer.cmd disk-changer.cmd dvd-handler.cmd\r
-\r
-SET CATS_MYSQL_CMD=create_mysql_database.cmd drop_mysql_database.cmd make_mysql_tables.cmd drop_mysql_tables.cmd grant_mysql_privileges.cmd\r
-SET CATS_MYSQL_SQL=make_mysql_tables.sql drop_mysql_tables.sql grant_mysql_privileges.sql\r
-SET CATS_PGSQL_CMD=create_postgresql_database.cmd drop_postgresql_database.cmd make_postgresql_tables.cmd drop_postgresql_tables.cmd grant_postgresql_privileges.cmd\r
-SET CATS_PGSQL_SQL=create_postgresql_database.sql make_postgresql_tables.sql drop_postgresql_tables.sql grant_postgresql_privileges.sql\r
-SET CATS_SQLITE_CMD=create_sqlite3_database.cmd drop_sqlite3_database.cmd make_sqlite3_tables.cmd drop_sqlite3_tables.cmd grant_sqlite3_privileges.cmd\r
-SET CATS_SQLITE_SQL=make_sqlite3_tables.sql\r
-SET CATS_CATALOG=make_mysql_catalog_backup.cmd make_postgresql_catalog_backup.cmd make_sqlite3_catalog_backup.cmd delete_catalog_backup.cmd\r
-SET DIRD_FILES=query.sql\r
-SET SSL_FILES=openssl.cnf\r
-\r
-SET DOC_PDF_FILES=%DOCS_DIR%\bacula.pdf %DOCS_DIR%\bacula\*.html %DOCS_DIR%\bacula\*.png %DOCS_DIR%\bacula\*.css\r
-SET DOC_HTML_FILES=%DOCS_DIR%\bacula\*.html %DOCS_DIR%\bacula\*.png %DOCS_DIR%\bacula\*.css\r
-\r
-FOR %%i in ( %BACULA_DLLS% ) DO XCOPY %1%2\%%i %1installer\%2\ /y\r
-FOR %%i in ( %BACULA_EXES% ) DO XCOPY %1%2\%%i %1installer\%2\ /y\r
-FOR %%i in ( %BACULA_TOOLS% ) DO XCOPY %1%2\%%i %1installer\%2\ /y\r
-\r
-FOR %%i in ( %DEP_DLLS% ) DO XCOPY %DEPKG_DIR%\bin\%%i %1installer\%2\ /y\r
-FOR %%i in ( %DEP_EXES% ) DO XCOPY %DEPKG_DIR%\bin\%%i %1installer\%2\ /y\r
-\r
-FOR %%i in ( %SCRIPTS% ) DO XCOPY %1scripts\%%i %1installer\%2\ /y\r
-FOR %%i in ( %CATS_MYSQL_CMD% ) DO XCOPY %1cats\%%i %1installer\%2\ /y\r
-FOR %%i in ( %CATS_MYSQL_SQL% ) DO XCOPY %1cats\%%i %1installer\%2\ /y\r
-FOR %%i in ( %CATS_PGSQL_CMD% ) DO XCOPY %1cats\%%i %1installer\%2\ /y\r
-FOR %%i in ( %CATS_PGSQL_SQL% ) DO XCOPY %1cats\%%i %1installer\%2\ /y\r
-FOR %%i in ( %CATS_SQLITE_CMD% ) DO XCOPY %1cats\%%i %1installer\%2\ /y\r
-FOR %%i in ( %CATS_SQLITE_SQL% ) DO XCOPY %1cats\%%i %1installer\%2\ /y\r
-\r
-FOR %%i in ( %CATS_CATALOG% ) DO XCOPY %1cats\%%i %1installer\%2\ /y\r
-\r
-FOR %%i in ( %DIRD_FILES% ) DO XCOPY %1..\dird\%%i %1installer\%2\ /y\r
-FOR %%i in ( %SSL_FILES% ) DO XCOPY %DEPKG_DIR%\%%i %1installer\%2\ /y\r
-\r
-FOR %%i in ( %DOC_PDF_FILES% ) DO XCOPY %%i %1installer\%2\manual\ /y\r
-\r
-FOR %%i in ( %DOC_HTML_FILES% ) DO XCOPY %%i %1installer\%2\manual\bacula\ /y\r
-\r
-XCOPY %4\x86\Microsoft.VC80.CRT\msvcm80.dll %1installer\%2\ /y\r
-XCOPY %4\x86\Microsoft.VC80.CRT\msvcp80.dll %1installer\%2\ /y\r
-XCOPY %4\x86\Microsoft.VC80.CRT\msvcr80.dll %1installer\%2\ /y\r
-XCOPY %4\x86\Microsoft.VC80.CRT\Microsoft.VC80.CRT.manifest %1installer\%2\ /y\r
-XCOPY %4\Debug_NonRedist\x86\Microsoft.VC80.DebugCRT\msvcm80d.dll %1installer\%2\ /y\r
-XCOPY %4\Debug_NonRedist\x86\Microsoft.VC80.DebugCRT\msvcp80d.dll %1installer\%2\ /y\r
-XCOPY %4\Debug_NonRedist\x86\Microsoft.VC80.DebugCRT\msvcr80d.dll %1installer\%2\ /y\r
-XCOPY %4\Debug_NonRedist\x86\Microsoft.VC80.DebugCRT\Microsoft.VC80.DebugCRT.manifest %1installer\%2\ /y\r
-\r
-PATH %DEPKG_DIR%\nsis;%DEPKG_DIR%\tools;%PATH%\r
-\r
-FOR /F %%i IN ( 'sed -ne "s/.*[ \t]VERSION[ \t][ \t]*\x22\(.*\)\x22/\1/p" ^< ..\..\version.h' ) DO @SET VERSION=%%i \r
-makensis /V3 /DVERSION=%VERSION% /DSRC_DIR=%1installer\%2 /DOUT_DIR=%1%2 /DBUILD_TOOLS=%3 winbacula.nsi\r
-EXIT /B %ERRORLEVEL%\r
+++ /dev/null
-#\r
-# Bacula User Agent (or Console) Configuration File\r
-#\r
-\r
-Director {\r
- Name = @director_name@\r
- DIRport = @director_port@\r
- address = @director_address@\r
- Password = "@director_password@"\r
-}\r
+++ /dev/null
-# Client (File Services) to backup\r
-Client {\r
- Name = @client_name@\r
- Address = @client_address@\r
- FDPort = @client_port@\r
- Catalog = MyCatalog\r
- Password = "@client_password@" # password for FileDaemon\r
- File Retention = 30 days # 30 days\r
- Job Retention = 6 months # six months\r
- AutoPrune = yes # Prune expired Jobs/Files\r
-}\r
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="8.00"\r
- Name="installer"\r
- ProjectGUID="{6D1B0964-FB32-4916-A61C-49D7F715EAD8}"\r
- RootNamespace="installer"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="0"\r
- >\r
- <Tool\r
- Name="VCNMakeTool"\r
- BuildCommandLine="build-installer $(SolutionDir) $(ConfigurationName) VC8_DEBUG "$(VCInstallDir)redist"
"\r
- ReBuildCommandLine="del $(SolutionDir)$(ConfigurationName)\winbacula-*.exe
build-installer $(SolutionDir) $(ConfigurationName) VC8_DEBUG "$(VCInstallDir)redist"
"\r
- CleanCommandLine="del $(SolutionDir)$(ConfigurationName)\winbacula-*.exe"\r
- Output=""\r
- PreprocessorDefinitions="VERSION=$(VERSION);DOC_DIR=..\..\..\..\docs;BUILD_TOOLS=VC8_DEBUG;VC_REDIST_DIR=$(VCInstallDir)redist\Debug_NonRedist\x86\Microsoft.VC80.DebugCRT;DEPKGS_BIN=..\..\..\..\depkgs-msvc\bin;BACULA_BIN=..\$(ConfigurationName);CATS_DIR=..\cats;SCRIPT_DIR=..\scripts"\r
- IncludeSearchPath=""\r
- ForcedIncludes=""\r
- AssemblySearchPath=""\r
- ForcedUsingAssemblies=""\r
- CompileAsManaged=""\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="0"\r
- >\r
- <Tool\r
- Name="VCNMakeTool"\r
- BuildCommandLine="build-installer $(SolutionDir) $(ConfigurationName) VC8 "$(VCInstallDir)redist"
"\r
- ReBuildCommandLine="del $(SolutionDir)$(ConfigurationName)\winbacula-*.exe
build-installer $(SolutionDir) $(ConfigurationName) VC8 "$(VCInstallDir)redist"
"\r
- CleanCommandLine="del $(SolutionDir)$(ConfigurationName)\winbacula-*.exe"\r
- Output=""\r
- PreprocessorDefinitions=""\r
- IncludeSearchPath=""\r
- ForcedIncludes=""\r
- AssemblySearchPath=""\r
- ForcedUsingAssemblies=""\r
- CompileAsManaged=""\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="Source Files"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
- >\r
- </Filter>\r
- <Filter\r
- Name="Header Files"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- <File\r
- RelativePath=".\resource.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="Resource Files"\r
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
- >\r
- <File\r
- RelativePath=".\Dialogs.rc"\r
- >\r
- </File>\r
- </Filter>\r
- <File\r
- RelativePath=".\bacula-dir.conf.in"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\bacula-fd.conf.in"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\bacula-sd.conf.in"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\bconsole.conf.in"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\build-installer.cmd"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\client.conf.in"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\ConfigPage1.nsh"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\ConfigPage2.nsh"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\DumpLog.nsh"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\InstallType.ini"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\InstallType.nsh"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Readme.txt"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\storage.conf.in"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\winbacula.nsi"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\WriteTemplates.ini"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\wx-console.conf.in"\r
- >\r
- </File>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+++ /dev/null
-# Definition of file storage device\r
-Storage {\r
- Name = File\r
-# Do not use "localhost" here \r
- Address = @storage_address@ # N.B. Use a fully qualified name here\r
- SDPort = @storage_port@\r
- Password = "@storage_password@"\r
- Device = FileStorage\r
- Media Type = File\r
-}\r
+++ /dev/null
-; winbacula.nsi\r
-;\r
-; Began as a version written by Michel Meyers (michel@tcnnet.dyndns.org)\r
-;\r
-; Adapted by Kern Sibbald for native Win32 Bacula\r
-; added a number of elements from Christopher Hull's installer\r
-;\r
-; D. Scott Barninger Nov 13 2004\r
-; added configuration editing for bconsole.conf and bwx-console.conf\r
-; better explanation in dialog boxes for editing config files\r
-; added Start Menu items\r
-; fix uninstall of config files to do all not just bacula-fd.conf\r
-;\r
-; D. Scott Barninger Dec 05 2004\r
-; added specification of default permissions for bacula-fd.conf\r
-; - thanks to Jamie Ffolliott for pointing me at cacls\r
-; added removal of working-dir files if user selects to remove config\r
-; uninstall is now 100% clean\r
-;\r
-; D. Scott Barninger Apr 17 2005\r
-; 1.36.3 release docs update\r
-; add pdf manual and menu shortcut\r
-;\r
-; Robert Nelson May 15 2006\r
-; Added server installs and implemented Microsoft install locations\r
-; Use LogicLib.nsh\r
-; Added Bacula-SD and Bacula-DIR\r
-; Replaced ParameterGiven with standard GetOptions\r
-;\r
-; Version $Id$\r
-;\r
-; Command line options:\r
-;\r
-; /service - \r
-; /start\r
-;\r
-; netsh firewall add portopening protocol=tcp port=9102 name="Bacula-FD"\r
-\r
-\r
-!define PRODUCT "Bacula"\r
-\r
-;\r
-; Include the Modern UI\r
-;\r
-\r
-!include "MUI.nsh"\r
-!include "LogicLib.nsh"\r
-!include "FileFunc.nsh"\r
-!include "Sections.nsh"\r
-!include "StrFunc.nsh"\r
-!include "WinMessages.nsh"\r
-;\r
-; Basics\r
-;\r
-Name "Bacula"\r
-OutFile "${OUT_DIR}\winbacula-${VERSION}.exe"\r
-SetCompressor lzma\r
-InstallDir "$PROGRAMFILES\Bacula"\r
-InstallDirRegKey HKLM "Software\Bacula" "InstallLocation"\r
-\r
-InstType "Client"\r
-InstType "Server"\r
-InstType "Full"\r
-\r
-!insertmacro GetParent\r
-\r
-${StrCase}\r
-${StrRep}\r
-${StrTok}\r
-${StrTrimNewLines}\r
-\r
-;\r
-; Pull in pages\r
-;\r
-\r
-!define MUI_COMPONENTSPAGE_SMALLDESC\r
-\r
-!define MUI_HEADERIMAGE\r
-!define MUI_BGCOLOR 739AB9\r
-!define MUI_HEADERIMAGE_BITMAP "bacula-logo.bmp"\r
-\r
-!InsertMacro MUI_PAGE_WELCOME\r
-!InsertMacro MUI_PAGE_LICENSE "..\..\..\LICENSE"\r
-Page custom EnterInstallType\r
-!define MUI_PAGE_CUSTOMFUNCTION_SHOW PageComponentsShow\r
-!InsertMacro MUI_PAGE_COMPONENTS\r
-!define MUI_PAGE_CUSTOMFUNCTION_PRE PageDirectoryPre\r
-!InsertMacro MUI_PAGE_DIRECTORY\r
-Page custom EnterConfigPage1 LeaveConfigPage1\r
-Page custom EnterConfigPage2 LeaveConfigPage2\r
-!Define MUI_PAGE_CUSTOMFUNCTION_LEAVE LeaveInstallPage\r
-!InsertMacro MUI_PAGE_INSTFILES\r
-Page custom EnterWriteTemplates\r
-!Define MUI_FINISHPAGE_SHOWREADME $INSTDIR\Readme.txt\r
-!InsertMacro MUI_PAGE_FINISH\r
-\r
-!InsertMacro MUI_UNPAGE_WELCOME\r
-!InsertMacro MUI_UNPAGE_CONFIRM\r
-!InsertMacro MUI_UNPAGE_INSTFILES\r
-!InsertMacro MUI_UNPAGE_FINISH\r
-\r
-!define MUI_ABORTWARNING\r
-\r
-!InsertMacro MUI_LANGUAGE "English"\r
-\r
-!InsertMacro GetParameters\r
-!InsertMacro GetOptions\r
-\r
-DirText "Setup will install Bacula ${VERSION} to the directory specified below. To install in a different folder, click Browse and select another folder."\r
-\r
-!InsertMacro MUI_RESERVEFILE_INSTALLOPTIONS\r
-;\r
-; Global Variables\r
-;\r
-Var OptService\r
-Var OptStart\r
-Var OptSilent\r
-\r
-Var CommonFilesDone\r
-\r
-Var OsIsNT\r
-\r
-Var HostName\r
-\r
-Var ConfigClientName\r
-Var ConfigClientPort\r
-Var ConfigClientMaxJobs\r
-Var ConfigClientPassword\r
-Var ConfigClientInstallService\r
-Var ConfigClientStartService\r
-\r
-Var ConfigStorageName\r
-Var ConfigStoragePort\r
-Var ConfigStorageMaxJobs\r
-Var ConfigStoragePassword\r
-Var ConfigStorageInstallService\r
-Var ConfigStorageStartService\r
-\r
-Var ConfigDirectorName\r
-Var ConfigDirectorPort\r
-Var ConfigDirectorMaxJobs\r
-Var ConfigDirectorPassword\r
-Var ConfigDirectorAddress\r
-Var ConfigDirectorMailServer\r
-Var ConfigDirectorMailAddress\r
-Var ConfigDirectorDB\r
-Var ConfigDirectorInstallService\r
-Var ConfigDirectorStartService\r
-\r
-Var ConfigMonitorName\r
-Var ConfigMonitorPassword\r
-\r
-Var LocalDirectorPassword\r
-Var LocalHostAddress\r
-\r
-Var MySQLPath\r
-Var MySQLVersion\r
-Var PostgreSQLPath\r
-Var PostgreSQLVersion\r
-\r
-Var AutomaticInstall\r
-Var InstallType\r
-!define NewInstall 0\r
-!define UpgradeInstall 1\r
-!define MigrateInstall 2\r
-\r
-Var OldInstallDir\r
-Var PreviousComponents\r
-Var NewComponents\r
-\r
-; Bit 0 = File Service\r
-; 1 = Storage Service\r
-; 2 = Director Service\r
-; 3 = Command Console\r
-; 4 = Graphical Console\r
-; 5 = Documentation (PDF)\r
-; 6 = Documentation (HTML)\r
-\r
-!define ComponentFile 1\r
-!define ComponentStorage 2\r
-!define ComponentDirector 4\r
-!define ComponentTextConsole 8\r
-!define ComponentGUIConsole 16\r
-!define ComponentPDFDocs 32\r
-!define ComponentHTMLDocs 64\r
-\r
-!define ComponentsRequiringUserConfig 31\r
-!define ComponentsFileAndStorage 3\r
-!define ComponentsFileAndStorageAndDirector 7\r
-!define ComponentsDirectorAndTextGuiConsoles 28\r
-!define ComponentsTextAndGuiConsoles 24\r
-\r
-Var HDLG\r
-Var HCTL\r
-\r
-Function .onInit\r
- Push $R0\r
- Push $R1\r
-\r
- ; Process Command Line Options\r
- StrCpy $OptService 1\r
- StrCpy $OptStart 1\r
- StrCpy $OptSilent 0\r
- StrCpy $CommonFilesDone 0\r
- StrCpy $OsIsNT 0\r
- StrCpy $AutomaticInstall 0\r
- StrCpy $InstallType ${NewInstall}\r
- StrCpy $OldInstallDir ""\r
- StrCpy $PreviousComponents 0\r
- StrCpy $NewComponents 0\r
- StrCpy $MySQLPath ""\r
- StrCpy $MySQLVersion ""\r
- StrCpy $PostgreSQLPath ""\r
- StrCpy $PostgreSQLVersion ""\r
-\r
- ${GetParameters} $R0\r
-\r
- ClearErrors\r
- ${GetOptions} $R0 "/noservice" $R1\r
- IfErrors +2\r
- StrCpy $OptService 0\r
-\r
- ClearErrors\r
- ${GetOptions} $R0 "/nostart" $R1\r
- IfErrors +2\r
- StrCpy $OptStart 0\r
-\r
- IfSilent 0 +2\r
- StrCpy $OptSilent 1\r
-\r
- ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion\r
- ${If} $R0 != ""\r
- StrCpy $OsIsNT 1\r
- ${EndIf}\r
-\r
- Call GetComputerName\r
- Pop $HostName\r
-\r
- Call GetHostName\r
- Pop $LocalHostAddress\r
-\r
- Call GetUserName\r
- Pop $ConfigDirectorMailAddress\r
-\r
- Call FindDatabaseApps\r
-\r
- ; Configuration Defaults\r
-\r
- StrCpy $ConfigClientName "$HostName-fd"\r
- StrCpy $ConfigClientPort 9102\r
- StrCpy $ConfigClientMaxJobs 2\r
- ;StrCpy $ConfigClientPassword\r
- StrCpy $ConfigClientInstallService "$OptService"\r
- StrCpy $ConfigClientStartService "$OptStart"\r
-\r
- StrCpy $ConfigStorageName "$HostName-sd"\r
- StrCpy $ConfigStoragePort 9103\r
- StrCpy $ConfigStorageMaxJobs 10\r
- ;StrCpy $ConfigStoragePassword\r
- StrCpy $ConfigStorageInstallService "$OptService"\r
- StrCpy $ConfigStorageStartService "$OptStart"\r
-\r
- ;StrCpy $ConfigDirectorName "$HostName-dir"\r
- StrCpy $ConfigDirectorPort 9101\r
- StrCpy $ConfigDirectorMaxJobs 1\r
- ;StrCpy $ConfigDirectorPassword\r
- StrCpy $ConfigDirectorDB 0\r
- StrCpy $ConfigDirectorInstallService "$OptService"\r
- StrCpy $ConfigDirectorStartService "$OptStart"\r
-\r
- StrCpy $ConfigMonitorName "$HostName-mon"\r
- ;StrCpy $ConfigMonitorPassword\r
-\r
- InitPluginsDir\r
- File "/oname=$PLUGINSDIR\openssl.exe" "${SRC_DIR}\openssl.exe"\r
- File "/oname=$PLUGINSDIR\libeay32.dll" "${SRC_DIR}\libeay32.dll"\r
- File "/oname=$PLUGINSDIR\ssleay32.dll" "${SRC_DIR}\ssleay32.dll"\r
- File "/oname=$PLUGINSDIR\sed.exe" "${SRC_DIR}\sed.exe"\r
-\r
- !InsertMacro MUI_INSTALLOPTIONS_EXTRACT "InstallType.ini"\r
- !InsertMacro MUI_INSTALLOPTIONS_EXTRACT "WriteTemplates.ini"\r
-\r
- SetPluginUnload alwaysoff\r
-\r
- nsExec::Exec '"$PLUGINSDIR\openssl.exe" rand -base64 -out $PLUGINSDIR\pw.txt 33'\r
- pop $R0\r
- ${If} $R0 = 0\r
- FileOpen $R1 "$PLUGINSDIR\pw.txt" r\r
- IfErrors +4\r
- FileRead $R1 $R0\r
- ${StrTrimNewLines} $ConfigClientPassword $R0\r
- FileClose $R1\r
- ${EndIf}\r
-\r
- nsExec::Exec '"$PLUGINSDIR\openssl.exe" rand -base64 -out $PLUGINSDIR\pw.txt 33'\r
- pop $R0\r
- ${If} $R0 = 0\r
- FileOpen $R1 "$PLUGINSDIR\pw.txt" r\r
- IfErrors +4\r
- FileRead $R1 $R0\r
- ${StrTrimNewLines} $ConfigStoragePassword $R0\r
- FileClose $R1\r
- ${EndIf}\r
-\r
- nsExec::Exec '"$PLUGINSDIR\openssl.exe" rand -base64 -out $PLUGINSDIR\pw.txt 33'\r
- pop $R0\r
- ${If} $R0 = 0\r
- FileOpen $R1 "$PLUGINSDIR\pw.txt" r\r
- IfErrors +4\r
- FileRead $R1 $R0\r
- ${StrTrimNewLines} $LocalDirectorPassword $R0\r
- FileClose $R1\r
- ${EndIf}\r
-\r
- SetPluginUnload manual\r
-\r
- nsExec::Exec '"$PLUGINSDIR\openssl.exe" rand -base64 -out $PLUGINSDIR\pw.txt 33'\r
- pop $R0\r
- ${If} $R0 = 0\r
- FileOpen $R1 "$PLUGINSDIR\pw.txt" r\r
- IfErrors +4\r
- FileRead $R1 $R0\r
- ${StrTrimNewLines} $ConfigMonitorPassword $R0\r
- FileClose $R1\r
- ${EndIf}\r
-\r
- Pop $R1\r
- Pop $R0\r
-FunctionEnd\r
-\r
-Function .onSelChange\r
- Call UpdateComponentUI\r
-FunctionEnd\r
-\r
-Function InstallCommonFiles\r
- ${If} $CommonFilesDone = 0\r
- SetOutPath "$INSTDIR"\r
- File "Readme.txt"\r
-\r
- SetOutPath "$INSTDIR\bin"\r
-!if "${BUILD_TOOLS}" == "VC8"\r
- File "${SRC_DIR}\msvcm80.dll"\r
- File "${SRC_DIR}\msvcp80.dll"\r
- File "${SRC_DIR}\msvcr80.dll"\r
- File "${SRC_DIR}\Microsoft.VC80.CRT.manifest"\r
- File "${SRC_DIR}\pthreadVCE.dll"\r
-!endif\r
-!if "${BUILD_TOOLS}" == "VC8_DEBUG"\r
- File "${SRC_DIR}\msvcm80.dll"\r
- File "${SRC_DIR}\msvcp80.dll"\r
- File "${SRC_DIR}\msvcr80.dll"\r
- File "${SRC_DIR}\Microsoft.VC80.CRT.manifest"\r
- File "${SRC_DIR}\msvcm80d.dll"\r
- File "${SRC_DIR}\msvcp80d.dll"\r
- File "${SRC_DIR}\msvcr80d.dll"\r
- File "${SRC_DIR}\Microsoft.VC80.DebugCRT.manifest"\r
- File "${SRC_DIR}\pthreadVCE.dll"\r
-!endif\r
-!if "${BUILD_TOOLS}" == "MinGW"\r
- File "${SRC_DIR}\mingwm10.dll"\r
- File "${SRC_DIR}\pthreadGCE.dll"\r
-!endif\r
- File "${SRC_DIR}\libeay32.dll"\r
- File "${SRC_DIR}\ssleay32.dll"\r
- File "${SRC_DIR}\zlib1.dll"\r
-!if "${BUILD_TOOLS}" == "VC8"\r
- File "${SRC_DIR}\zlib1.dll.manifest"\r
-!endif\r
-!If "${BUILD_TOOLS}" == "VC8_DEBUG"\r
- File "${SRC_DIR}\zlib1.dll.manifest"\r
-!endif\r
- File "/oname=$INSTDIR\openssl.cnf" "${SRC_DIR}\openssl.cnf"\r
- File "${SRC_DIR}\openssl.exe"\r
- File "${SRC_DIR}\bsleep.exe"\r
- File "${SRC_DIR}\bsmtp.exe"\r
- File "${SRC_DIR}\bacula.dll"\r
- File "${SRC_DIR}\expr64.exe"\r
- File "${SRC_DIR}\snooze.exe"\r
-\r
- CreateShortCut "$SMPROGRAMS\Bacula\Documentation\View Readme.lnk" "write.exe" '"$INSTDIR\Readme.txt"'\r
-\r
- StrCpy $CommonFilesDone 1\r
- ${EndIf}\r
-FunctionEnd\r
-\r
-Section "-Initialize"\r
- ${If} $MySQLPath != ""\r
- DetailPrint "Found MySQL (version $MySQLVersion)"\r
- ${EndIf}\r
- ${If} $PostgreSQLPath != ""\r
- DetailPrint "Found PostgreSQL (version $PostgreSQLVersion)"\r
- ${EndIf}\r
-\r
- WriteRegStr HKLM Software\Bacula InstallLocation "$INSTDIR"\r
-\r
- Call GetSelectedComponents\r
- Pop $R2\r
- WriteRegDWORD HKLM Software\Bacula Components $R2\r
-\r
- WriteRegDWORD HKLM Software\Bacula Database $ConfigDirectorDB\r
-\r
- ; remove start menu items\r
- SetShellVarContext all\r
-\r
- Delete /REBOOTOK "$SMPROGRAMS\Bacula\Configuration\*"\r
- Delete /REBOOTOK "$SMPROGRAMS\Bacula\Documentation\*"\r
- Delete /REBOOTOK "$SMPROGRAMS\Bacula\*"\r
- RMDir "$SMPROGRAMS\Bacula\Configuration"\r
- RMDir "$SMPROGRAMS\Bacula\Documentation"\r
- RMDir "$SMPROGRAMS\Bacula"\r
- CreateDirectory "$SMPROGRAMS\Bacula"\r
- CreateDirectory "$SMPROGRAMS\Bacula\Configuration"\r
- CreateDirectory "$SMPROGRAMS\Bacula\Documentation"\r
-\r
- CreateDirectory "$INSTDIR"\r
- CreateDirectory "$INSTDIR\bin"\r
- CreateDirectory "$APPDATA\Bacula"\r
- CreateDirectory "$APPDATA\Bacula\Work"\r
- CreateDirectory "$APPDATA\Bacula\Spool"\r
-\r
- SetOutPath "$INSTDIR"\r
- File "..\..\..\LICENSE"\r
- Delete /REBOOTOK "$INSTDIR\bin\License.txt"\r
-\r
- FileOpen $R1 $PLUGINSDIR\config.sed w\r
- FileWrite $R1 "s;@VERSION@;${VERSION};g$\r$\n"\r
- FileWrite $R1 "s;@DATE@;${__DATE__};g$\r$\n"\r
- FileWrite $R1 "s;@DISTNAME@;Windows;g$\r$\n"\r
-\r
-!If "$BUILD_TOOLS" == "MinGW"\r
- StrCpy $R2 "MinGW32"\r
-!Else\r
- StrCpy $R2 "MVS"\r
-!EndIf\r
-\r
- Call GetHostName\r
- Exch $R3\r
- Pop $R3\r
-\r
- FileWrite $R1 "s;@DISTVER@;$R2;g$\r$\n"\r
-\r
- ${StrRep} $R2 "$APPDATA\Bacula\Work" "\" "\\\\"\r
- FileWrite $R1 's;@working_dir@;$R2;g$\r$\n'\r
- ${StrRep} $R2 "$APPDATA\Bacula\Work" "\" "\\"\r
- FileWrite $R1 's;@working_dir_cmd@;$R2;g$\r$\n'\r
-\r
- ${StrRep} $R2 "$INSTDIR\bin" "\" "\\\\"\r
- FileWrite $R1 's;@bin_dir@;$R2;g$\r$\n'\r
- ${StrRep} $R2 "$INSTDIR\bin" "\" "\\"\r
- FileWrite $R1 's;@bin_dir_cmd@;$R2;g$\r$\n'\r
-\r
- ${StrRep} $R2 "$INSTDIR\bin\fdplugins" "\" "\\\\"\r
- FileWrite $R1 's;@fdplugins_dir@;$R2;g$\r$\n'\r
-\r
- ${StrRep} $R2 "$INSTDIR" "\" "/"\r
- FileWrite $R1 "s;@BUILD_DIR@;$R2;g$\r$\n"\r
-\r
- Call IsDirectorSelected\r
- Pop $R2\r
- ${If} $R2 = 1\r
- FileWrite $R1 "s;@director_address@;$LocalHostAddress;g$\r$\n"\r
- ${Else}\r
- ${If} "$ConfigDirectorAddress" != ""\r
- FileWrite $R1 "s;@director_address@;$ConfigDirectorAddress;g$\r$\n"\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- FileWrite $R1 "s;@client_address@;$LocalHostAddress;g$\r$\n"\r
- FileWrite $R1 "s;@storage_address@;$LocalHostAddress;g$\r$\n"\r
-\r
- ${If} "$ConfigClientName" != ""\r
- FileWrite $R1 "s;@client_name@;$ConfigClientName;g$\r$\n"\r
- ${EndIf}\r
- ${If} "$ConfigClientPort" != ""\r
- FileWrite $R1 "s;@client_port@;$ConfigClientPort;g$\r$\n"\r
- ${EndIf}\r
- ${If} "$ConfigClientMaxJobs" != ""\r
- FileWrite $R1 "s;@client_maxjobs@;$ConfigClientMaxJobs;g$\r$\n"\r
- ${EndIf}\r
- ${If} "$ConfigClientPassword" != ""\r
- FileWrite $R1 "s;@client_password@;$ConfigClientPassword;g$\r$\n"\r
- ${EndIf}\r
- ${If} "$ConfigStorageName" != ""\r
- FileWrite $R1 "s;@storage_name@;$ConfigStorageName;g$\r$\n"\r
- ${EndIf}\r
- ${If} "$ConfigStoragePort" != ""\r
- FileWrite $R1 "s;@storage_port@;$ConfigStoragePort;g$\r$\n"\r
- ${EndIf}\r
- ${If} "$ConfigStorageMaxJobs" != ""\r
- FileWrite $R1 "s;@storage_maxjobs@;$ConfigStorageMaxJobs;g$\r$\n"\r
- ${EndIf}\r
- ${If} "$ConfigStoragePassword" != ""\r
- FileWrite $R1 "s;@storage_password@;$ConfigStoragePassword;g$\r$\n"\r
- ${EndIf}\r
- ${If} "$ConfigDirectorName" != ""\r
- FileWrite $R1 "s;@director_name@;$ConfigDirectorName;g$\r$\n"\r
- ${EndIf}\r
- ${If} "$ConfigDirectorPort" != ""\r
- FileWrite $R1 "s;@director_port@;$ConfigDirectorPort;g$\r$\n"\r
- ${EndIf}\r
- ${If} "$ConfigDirectorMaxJobs" != ""\r
- FileWrite $R1 "s;@director_maxjobs@;$ConfigDirectorMaxJobs;g$\r$\n"\r
- ${EndIf}\r
- ${If} "$ConfigDirectorPassword" != ""\r
- FileWrite $R1 "s;@director_password@;$ConfigDirectorPassword;g$\r$\n"\r
- ${EndIf}\r
- ${If} "$ConfigDirectorMailServer" != ""\r
- FileWrite $R1 "s;@smtp_host@;$ConfigDirectorMailServer;g$\r$\n"\r
- ${EndIf}\r
- ${If} "$ConfigDirectorMailAddress" != ""\r
- FileWrite $R1 "s;@job_email@;$ConfigDirectorMailAddress;g$\r$\n"\r
- ${EndIf}\r
- ${If} "$ConfigMonitorName" != ""\r
- FileWrite $R1 "s;@monitor_name@;$ConfigMonitorName;g$\r$\n"\r
- ${EndIf}\r
- ${If} "$ConfigMonitorPassword" != ""\r
- FileWrite $R1 "s;@monitor_password@;$ConfigMonitorPassword;g$\r$\n"\r
- ${EndIf}\r
-\r
- ${If} $ConfigDirectorDB = 1\r
- ${If} $MySQLPath != ""\r
- ${StrRep} $R2 "$MySQLPath\bin" "\" "\\"\r
- FileWrite $R1 "s;@SQL_BINDIR@;$R2;g$\r$\n"\r
- ${EndIf}\r
- ${ElseIf} $ConfigDirectorDB = 2\r
- ${If} $PostgreSQLPath != ""\r
- ${StrRep} $R2 "$PostgreSQLPath\bin" "\" "\\"\r
- FileWrite $R1 "s;@SQL_BINDIR@;$R2;g$\r$\n"\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- FileClose $R1\r
-\r
- ${If} $InstallType = ${MigrateInstall}\r
- FileOpen $R1 $PLUGINSDIR\migrate.sed w\r
- ${StrRep} $R2 "$APPDATA\Bacula\Work" "\" "\\\\"\r
- FileWrite $R1 's;\(Working *Directory *= *\)[^ ][^ ]*.*$$;\1"$R2";$\r$\n'\r
- FileWrite $R1 's;\(Pid *Directory *= *\)[^ ][^ ]*.*$$;\1"$R2";$\r$\n'\r
- FileClose $R1\r
- ${EndIf}\r
-\r
- ${If} ${FileExists} "$OldInstallDir\bin\bacula-fd.exe"\r
- nsExec::ExecToLog '"$OldInstallDir\bin\bacula-fd.exe" /kill' ; Shutdown any bacula that could be running\r
- Sleep 3000\r
- nsExec::ExecToLog '"$OldInstallDir\bin\bacula-fd.exe" /remove' ; Remove existing service\r
- ${EndIf}\r
-\r
- ${If} ${FileExists} "$OldInstallDir\bin\bacula-sd.exe"\r
- nsExec::ExecToLog '"$OldInstallDir\bin\bacula-sd.exe" /kill' ; Shutdown any bacula that could be running\r
- Sleep 3000\r
- nsExec::ExecToLog '"$OldInstallDir\bin\bacula-sd.exe" /remove' ; Remove existing service\r
- ${EndIf}\r
-\r
- ${If} ${FileExists} "$OldInstallDir\bin\bacula-dir.exe"\r
- nsExec::ExecToLog '"$OldInstallDir\bin\bacula-dir.exe" /kill' ; Shutdown any bacula that could be running\r
- Sleep 3000\r
- nsExec::ExecToLog '"$OldInstallDir\bin\bacula-dir.exe" /remove' ; Remove existing service\r
- ${EndIf}\r
-\r
-SectionEnd\r
-\r
-SectionGroup "Client" SecGroupClient\r
-\r
-Section "File Service" SecFileDaemon\r
- SectionIn 1 2 3\r
-\r
- SetOutPath "$INSTDIR\bin\fdplugins"\r
- File "${SRC_DIR}\exchange-fd.dll"\r
-\r
- SetOutPath "$INSTDIR\bin"\r
-\r
- File "${SRC_DIR}\bacula-fd.exe"\r
-\r
- ${If} $InstallType = ${MigrateInstall}\r
- ${AndIf} ${FileExists} "$OldInstallDir\bin\bacula-fd.conf"\r
- CopyFiles "$OldInstallDir\bin\bacula-fd.conf" "$APPDATA\Bacula"\r
- nsExec::ExecToLog '$PLUGINSDIR\sed.exe -f "$PLUGINSDIR\migrate.sed" -i.bak "$APPDATA\Bacula\bacula-fd.conf"'\r
- ${Else}\r
- File "/oname=$PLUGINSDIR\bacula-fd.conf" "bacula-fd.conf.in"\r
-\r
- StrCpy $0 "$APPDATA\Bacula"\r
- StrCpy $1 bacula-fd.conf\r
- Call ConfigEditAndCopy\r
- ${EndIf}\r
-\r
- StrCpy $0 bacula-fd\r
- StrCpy $1 "File Service"\r
- StrCpy $2 $ConfigClientInstallService\r
- StrCpy $3 $ConfigClientStartService\r
-\r
- Call InstallDaemon\r
-\r
- CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Client Configuration.lnk" "write.exe" '"$APPDATA\Bacula\bacula-fd.conf"'\r
-SectionEnd\r
-\r
-SectionGroupEnd\r
-\r
-SectionGroup "Server" SecGroupServer\r
-\r
-Section "Storage Service" SecStorageDaemon\r
- SectionIn 2 3\r
-\r
- SetOutPath "$INSTDIR\bin"\r
-\r
- File "${SRC_DIR}\loaderinfo.exe"\r
- File "${SRC_DIR}\mt.exe"\r
- File "${SRC_DIR}\mtx.exe"\r
- File "${SRC_DIR}\scsitape.exe"\r
- File "${SRC_DIR}\tapeinfo.exe"\r
- File "${SRC_DIR}\bacula-sd.exe"\r
- File "${SRC_DIR}\bcopy.exe"\r
- File "${SRC_DIR}\bextract.exe"\r
- File "${SRC_DIR}\bls.exe"\r
- File "${SRC_DIR}\bscan.exe"\r
- File "${SRC_DIR}\btape.exe"\r
- File "${SRC_DIR}\scsilist.exe"\r
- File "${SRC_DIR}\mkisofs.exe"\r
- File "${SRC_DIR}\growisofs.exe"\r
- File "${SRC_DIR}\dvd-ram-control.exe"\r
- File "${SRC_DIR}\dvd+rw-booktype.exe"\r
- File "${SRC_DIR}\dvd+rw-format.exe"\r
- File "${SRC_DIR}\dvd+rw-mediainfo.exe"\r
-\r
- File "/oname=$PLUGINSDIR\mtx-changer.cmd" "${SRC_DIR}\mtx-changer.cmd"\r
-\r
- StrCpy $0 "$INSTDIR\bin"\r
- StrCpy $1 mtx-changer.cmd\r
- Call ConfigEditAndCopy\r
-\r
- File "/oname=$PLUGINSDIR\disk-changer.cmd" "${SRC_DIR}\disk-changer.cmd"\r
-\r
- StrCpy $0 "$INSTDIR\bin"\r
- StrCpy $1 disk-changer.cmd\r
- Call ConfigEditAndCopy\r
-\r
- File "/oname=$PLUGINSDIR\dvd-handler.cmd" "${SRC_DIR}\dvd-handler.cmd"\r
-\r
- StrCpy $0 "$INSTDIR\bin"\r
- StrCpy $1 dvd-handler.cmd\r
- Call ConfigEditAndCopy\r
-\r
- File "/oname=$PLUGINSDIR\bacula-sd.conf" "bacula-sd.conf.in"\r
-\r
- StrCpy $0 "$APPDATA\Bacula"\r
- StrCpy $1 bacula-sd.conf\r
- Call ConfigEditAndCopy\r
-\r
- StrCpy $0 bacula-sd\r
- StrCpy $1 "Storage Service"\r
- StrCpy $2 $ConfigStorageInstallService\r
- StrCpy $3 $ConfigStorageStartService\r
- Call InstallDaemon\r
-\r
- CreateShortCut "$SMPROGRAMS\Bacula\Configuration\List Devices.lnk" "$INSTDIR\bin\scsilist.exe" "/pause"\r
- CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Storage Configuration.lnk" "write.exe" '"$APPDATA\Bacula\bacula-sd.conf"'\r
-SectionEnd\r
-\r
-Section "Director Service" SecDirectorDaemon\r
- SectionIn 2 3\r
-\r
- SetOutPath "$INSTDIR\bin"\r
-\r
- ${If} $ConfigDirectorDB = 1\r
- File /oname=bacula_cats.dll "${SRC_DIR}\cats_mysql.dll"\r
- File "${SRC_DIR}\libmysql.dll"\r
- File /oname=$PLUGINSDIR\create_database.cmd ${SRC_DIR}\create_mysql_database.cmd\r
- File /oname=$PLUGINSDIR\drop_database.cmd ${SRC_DIR}\drop_mysql_database.cmd\r
- File /oname=$PLUGINSDIR\make_tables.cmd ${SRC_DIR}\make_mysql_tables.cmd\r
- File ${SRC_DIR}\make_mysql_tables.sql\r
- File /oname=$PLUGINSDIR\drop_tables.cmd ${SRC_DIR}\drop_mysql_tables.cmd\r
- File ${SRC_DIR}\drop_mysql_tables.sql\r
- File /oname=$PLUGINSDIR\grant_privileges.cmd ${SRC_DIR}\grant_mysql_privileges.cmd\r
- File ${SRC_DIR}\grant_mysql_privileges.sql\r
- File /oname=$PLUGINSDIR\make_catalog_backup.cmd ${SRC_DIR}\make_mysql_catalog_backup.cmd\r
- ${ElseIf} $ConfigDirectorDB = 2\r
- File /oname=bacula_cats.dll "${SRC_DIR}\cats_postgresql.dll"\r
- File "${SRC_DIR}\libpq.dll"\r
-!if "${BUILD_TOOLS}" == "VC8"\r
- File "${SRC_DIR}\comerr32.dll"\r
- File "${SRC_DIR}\libintl-2.dll"\r
- File "${SRC_DIR}\libiconv-2.dll"\r
- File "${SRC_DIR}\krb5_32.dll"\r
-!endif\r
-!If "${BUILD_TOOLS}" == "VC8_DEBUG"\r
- File "${SRC_DIR}\comerr32.dll"\r
- File "${SRC_DIR}\libintl-2.dll"\r
- File "${SRC_DIR}\libiconv-2.dll"\r
- File "${SRC_DIR}\krb5_32.dll"\r
-!endif\r
- File /oname=$PLUGINSDIR\create_database.cmd ${SRC_DIR}\create_postgresql_database.cmd\r
- File /oname=$PLUGINSDIR\drop_database.cmd ${SRC_DIR}\drop_postgresql_database.cmd\r
- File /oname=$PLUGINSDIR\make_tables.cmd ${SRC_DIR}\make_postgresql_tables.cmd\r
- File ${SRC_DIR}\create_postgresql_database.sql\r
- File ${SRC_DIR}\make_postgresql_tables.sql\r
- File /oname=$PLUGINSDIR\drop_tables.cmd ${SRC_DIR}\drop_postgresql_tables.cmd\r
- File ${SRC_DIR}\drop_postgresql_tables.sql\r
- File /oname=$PLUGINSDIR\grant_privileges.cmd ${SRC_DIR}\grant_postgresql_privileges.cmd\r
- File ${SRC_DIR}\grant_postgresql_privileges.sql\r
- File /oname=$PLUGINSDIR\make_catalog_backup.cmd ${SRC_DIR}\make_postgresql_catalog_backup.cmd\r
- ${ElseIf} $ConfigDirectorDB = 3\r
- File "${SRC_DIR}\sqlite3.exe"\r
-!if "${BUILD_TOOLS}" == "VC8"\r
- File "${SRC_DIR}\sqlite3.exe.manifest"\r
-!endif\r
-!If "${BUILD_TOOLS}" == "VC8_DEBUG"\r
- File "${SRC_DIR}\sqlite3.exe.manifest"\r
-!endif\r
- File /oname=bacula_cats.dll "${SRC_DIR}\cats_sqlite3.dll"\r
- File /oname=$PLUGINSDIR\create_database.cmd ${SRC_DIR}\create_sqlite3_database.cmd\r
- File /oname=$PLUGINSDIR\drop_database.cmd ${SRC_DIR}\drop_sqlite3_database.cmd\r
- File /oname=$PLUGINSDIR\make_tables.cmd ${SRC_DIR}\make_sqlite3_tables.cmd\r
- File ${SRC_DIR}\make_sqlite3_tables.sql\r
- File /oname=$PLUGINSDIR\drop_tables.cmd ${SRC_DIR}\drop_sqlite3_tables.cmd\r
- File /oname=$PLUGINSDIR\grant_privileges.cmd ${SRC_DIR}\grant_sqlite3_privileges.cmd\r
- File /oname=$PLUGINSDIR\make_catalog_backup.cmd ${SRC_DIR}\make_sqlite3_catalog_backup.cmd\r
- ${EndIf}\r
-\r
- File "${SRC_DIR}\bacula-dir.exe"\r
- File "${SRC_DIR}\dbcheck.exe"\r
-\r
- File "/oname=$PLUGINSDIR\delete_catalog_backup.cmd" "${SRC_DIR}\delete_catalog_backup.cmd"\r
-\r
- StrCpy $0 "$INSTDIR\bin"\r
- \r
- StrCpy $1 create_database.cmd\r
- Call ConfigEditAndCopy\r
-\r
- StrCpy $1 drop_database.cmd\r
- Call ConfigEditAndCopy\r
-\r
- StrCpy $1 make_tables.cmd\r
- Call ConfigEditAndCopy\r
-\r
- StrCpy $1 drop_tables.cmd\r
- Call ConfigEditAndCopy\r
-\r
- StrCpy $1 grant_privileges.cmd\r
- Call ConfigEditAndCopy\r
-\r
- StrCpy $1 make_catalog_backup.cmd\r
- Call ConfigEditAndCopy\r
-\r
- StrCpy $1 delete_catalog_backup.cmd\r
- Call ConfigEditAndCopy\r
-\r
- File "${SRC_DIR}\query.sql"\r
-\r
- File "/oname=$PLUGINSDIR\bacula-dir.conf" "bacula-dir.conf.in"\r
-\r
- StrCpy $0 "$APPDATA\Bacula"\r
- StrCpy $1 bacula-dir.conf\r
- Call ConfigEditAndCopy\r
-\r
- StrCpy $0 bacula-dir\r
- StrCpy $1 "Director Service"\r
- StrCpy $2 $ConfigDirectorInstallService\r
- StrCpy $3 $ConfigDirectorStartService\r
- Call InstallDaemon\r
-\r
- CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Director Configuration.lnk" "write.exe" '"$APPDATA\Bacula\bacula-dir.conf"'\r
-SectionEnd\r
-\r
-SectionGroupEnd\r
-\r
-SectionGroup "Consoles" SecGroupConsoles\r
-\r
-Section "Command Console" SecConsole\r
- SectionIn 1 2 3\r
-\r
- SetOutPath "$INSTDIR\bin"\r
-\r
- File "${SRC_DIR}\bconsole.exe"\r
- Call InstallCommonFiles\r
-\r
- ${If} $InstallType = ${MigrateInstall}\r
- ${AndIf} ${FileExists} "$OldInstallDir\bin\bconsole.conf"\r
- CopyFiles "$OldInstallDir\bin\bconsole.conf" "$APPDATA\Bacula"\r
- ${Else}\r
- File "/oname=$PLUGINSDIR\bconsole.conf" "bconsole.conf.in"\r
- StrCpy $0 "$APPDATA\Bacula"\r
- StrCpy $1 bconsole.conf\r
- Call ConfigEditAndCopy\r
- ${EndIf}\r
-\r
- CreateShortCut "$SMPROGRAMS\Bacula\bconsole.lnk" "$INSTDIR\bin\bconsole.exe" '-c "$APPDATA\Bacula\bconsole.conf"' "$INSTDIR\bin\bconsole.exe" 0\r
- CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Command Console Configuration.lnk" "write.exe" '"$APPDATA\Bacula\bconsole.conf"'\r
-\r
-SectionEnd\r
-\r
-Section "Graphical Console" SecWxConsole\r
- SectionIn 1 2 3\r
- \r
- SetOutPath "$INSTDIR\bin"\r
-\r
- Call InstallCommonFiles\r
-!if "${BUILD_TOOLS}" == "VC8"\r
- File "${SRC_DIR}\wxbase28_vc_bacula.dll"\r
- File "${SRC_DIR}\wxmsw28_core_vc_bacula.dll"\r
-!endif\r
-!If "${BUILD_TOOLS}" == "VC8_DEBUG"\r
- File "${SRC_DIR}\wxbase28_vc_bacula.dll"\r
- File "${SRC_DIR}\wxmsw28_core_vc_bacula.dll"\r
-!endif\r
-!if "${BUILD_TOOLS}" == "MinGW"\r
- File "${SRC_DIR}\wxbase28_gcc_bacula.dll"\r
- File "${SRC_DIR}\wxmsw28_core_gcc_bacula.dll"\r
-!endif\r
-\r
- File "${SRC_DIR}\bwx-console.exe"\r
-\r
- ${If} $InstallType = ${MigrateInstall}\r
- ${AndIf} ${FileExists} "$OldInstallDir\bin\bwx-console.conf"\r
- CopyFiles "$OldInstallDir\bin\bwx-console.conf" "$APPDATA\Bacula"\r
- ${Else}\r
- File "/oname=$PLUGINSDIR\bwx-console.conf" "bwx-console.conf.in"\r
- StrCpy $0 "$APPDATA\Bacula"\r
- StrCpy $1 bwx-console.conf\r
- Call ConfigEditAndCopy\r
- ${EndIf}\r
-\r
- ; Create Start Menu entry\r
- CreateShortCut "$SMPROGRAMS\Bacula\bwx-console.lnk" "$INSTDIR\bin\bwx-console.exe" '-c "$APPDATA\Bacula\bwx-console.conf"' "$INSTDIR\bin\bwx-console.exe" 0\r
- CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Graphical Console Configuration.lnk" "write.exe" '"$APPDATA\Bacula\bwx-console.conf"'\r
-SectionEnd\r
-\r
-SectionGroupEnd\r
-\r
-SectionGroup "Documentation" SecGroupDocumentation\r
-\r
-Section "Documentation (Acrobat Format)" SecDocPdf\r
- SectionIn 1 2 3\r
-\r
- SetOutPath "$INSTDIR\doc"\r
- CreateDirectory "$INSTDIR\doc"\r
-\r
- File "${SRC_DIR}\manual\bacula.pdf"\r
- CreateShortCut "$SMPROGRAMS\Bacula\Documentation\Manual.lnk" '"$INSTDIR\doc\bacula.pdf"'\r
-SectionEnd\r
-\r
-Section "Documentation (HTML Format)" SecDocHtml\r
- SectionIn 3\r
-\r
- SetOutPath "$INSTDIR\doc"\r
- CreateDirectory "$INSTDIR\doc"\r
-\r
- File "${SRC_DIR}\manual\bacula\*.html"\r
- File "${SRC_DIR}\manual\bacula\*.png"\r
- File "${SRC_DIR}\manual\bacula\*.css"\r
- CreateShortCut "$SMPROGRAMS\Bacula\Documentation\Manual (HTML).lnk" '"$INSTDIR\doc\index.html"'\r
-SectionEnd\r
-\r
-SectionGroupEnd\r
-\r
-Section "-Finish"\r
- Push $R0\r
-\r
- ${If} $OsIsNT = 1\r
- nsExec::ExecToLog 'cmd.exe /C echo Y|cacls "$INSTDIR" /T /G SYSTEM:F Administrators:F'\r
- nsExec::ExecToLog 'cmd.exe /C echo Y|cacls "$APPDATA\Bacula" /T /G SYSTEM:F Administrators:F'\r
- ${EndIf}\r
-\r
- ; Write the uninstall keys for Windows & create Start Menu entry\r
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "DisplayName" "Bacula"\r
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "InstallLocation" "$INSTDIR"\r
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "DisplayVersion" "${VERSION}"\r
- ${StrTok} $R0 "${VERSION}" "." 0 0\r
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "VersionMajor" $R0\r
- ${StrTok} $R0 "${VERSION}" "." 1 0\r
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "VersionMinor" $R0\r
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "NoModify" 1\r
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "NoRepair" 1\r
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "URLUpdateInfo" "http://sourceforge.net/project/showfiles.php?group_id=50727"\r
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "URLInfoAbout" "http://www.bacula.org"\r
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "HelpLink" "http://www.bacula.org/?page=support"\r
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "UninstallString" '"$INSTDIR\uninstall.exe"'\r
- WriteUninstaller "$INSTDIR\Uninstall.exe"\r
- CreateShortCut "$SMPROGRAMS\Bacula\Uninstall Bacula.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0\r
- Pop $R0\r
-SectionEnd\r
-\r
-; Extra Page descriptions\r
-\r
-LangString DESC_SecFileDaemon ${LANG_ENGLISH} "Install Bacula File Daemon on this system."\r
-LangString DESC_SecStorageDaemon ${LANG_ENGLISH} "Install Bacula Storage Daemon on this system."\r
-LangString DESC_SecDirectorDaemon ${LANG_ENGLISH} "Install Bacula Director Daemon on this system."\r
-LangString DESC_SecConsole ${LANG_ENGLISH} "Install command console program on this system."\r
-LangString DESC_SecWxConsole ${LANG_ENGLISH} "Install graphical console program on this system."\r
-LangString DESC_SecDocPdf ${LANG_ENGLISH} "Install documentation in Acrobat format on this system."\r
-LangString DESC_SecDocHtml ${LANG_ENGLISH} "Install documentation in HTML format on this system."\r
-\r
-LangString TITLE_ConfigPage1 ${LANG_ENGLISH} "Configuration"\r
-LangString SUBTITLE_ConfigPage1 ${LANG_ENGLISH} "Set installation configuration."\r
-\r
-LangString TITLE_ConfigPage2 ${LANG_ENGLISH} "Configuration (continued)"\r
-LangString SUBTITLE_ConfigPage2 ${LANG_ENGLISH} "Set installation configuration."\r
-\r
-LangString TITLE_InstallType ${LANG_ENGLISH} "Installation Type"\r
-LangString SUBTITLE_InstallType ${LANG_ENGLISH} "Choose installation type."\r
-\r
-LangString TITLE_WriteTemplates ${LANG_ENGLISH} "Create Templates"\r
-LangString SUBTITLE_WriteTemplates ${LANG_ENGLISH} "Create resource templates for inclusion in the Director's configuration file."\r
-\r
-!InsertMacro MUI_FUNCTION_DESCRIPTION_BEGIN\r
- !InsertMacro MUI_DESCRIPTION_TEXT ${SecFileDaemon} $(DESC_SecFileDaemon)\r
- !InsertMacro MUI_DESCRIPTION_TEXT ${SecStorageDaemon} $(DESC_SecStorageDaemon)\r
- !InsertMacro MUI_DESCRIPTION_TEXT ${SecDirectorDaemon} $(DESC_SecDirectorDaemon)\r
- !InsertMacro MUI_DESCRIPTION_TEXT ${SecConsole} $(DESC_SecConsole)\r
- !InsertMacro MUI_DESCRIPTION_TEXT ${SecWxConsole} $(DESC_SecWxConsole)\r
- !InsertMacro MUI_DESCRIPTION_TEXT ${SecDocPdf} $(DESC_SecDocPdf)\r
- !InsertMacro MUI_DESCRIPTION_TEXT ${SecDocHtml} $(DESC_SecDocHtml)\r
-!InsertMacro MUI_FUNCTION_DESCRIPTION_END\r
-\r
-; Uninstall section\r
-\r
-UninstallText "This will uninstall Bacula. Hit next to continue."\r
-\r
-Section "Uninstall"\r
- ; Shutdown any baculum that could be running\r
- nsExec::ExecToLog '"$INSTDIR\bin\bacula-fd.exe" /kill'\r
- nsExec::ExecToLog '"$INSTDIR\bin\bacula-sd.exe" /kill'\r
- nsExec::ExecToLog '"$INSTDIR\bin\bacula-dir.exe" /kill'\r
- Sleep 3000\r
-\r
- ReadRegDWORD $R0 HKLM "Software\Bacula" "Service_Bacula-fd"\r
- ${If} $R0 = 1\r
- ; Remove bacula service\r
- nsExec::ExecToLog '"$INSTDIR\bin\bacula-fd.exe" /remove'\r
- nsExec::ExecToLog '"$INSTDIR\bin\exchange-fd.dll" /remove'\r
- ${EndIf}\r
- \r
- ReadRegDWORD $R0 HKLM "Software\Bacula" "Service_Bacula-sd"\r
- ${If} $R0 = 1\r
- ; Remove bacula service\r
- nsExec::ExecToLog '"$INSTDIR\bin\bacula-sd.exe" /remove'\r
- ${EndIf}\r
- \r
- ReadRegDWORD $R0 HKLM "Software\Bacula" "Service_Bacula-dir"\r
- ${If} $R0 = 1\r
- ; Remove bacula service\r
- nsExec::ExecToLog '"$INSTDIR\bin\bacula-dir.exe" /remove'\r
- ${EndIf}\r
- \r
- ; remove registry keys\r
- DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula"\r
- DeleteRegKey HKLM "Software\Bacula"\r
-\r
- ; remove start menu items\r
- SetShellVarContext all\r
- Delete /REBOOTOK "$SMPROGRAMS\Bacula\*"\r
- RMDir "$SMPROGRAMS\Bacula"\r
-\r
- ; remove files and uninstaller (preserving config for now)\r
- Delete /REBOOTOK "$INSTDIR\bin\*"\r
- Delete /REBOOTOK "$INSTDIR\doc\*"\r
- Delete /REBOOTOK "$INSTDIR\*"\r
-\r
- ; Check for existing installation\r
- MessageBox MB_YESNO|MB_ICONQUESTION \\r
- "Would you like to delete the current configuration files and the working state file?" IDNO NoDel\r
- Delete /REBOOTOK "$APPDATA\Bacula\*"\r
- Delete /REBOOTOK "$APPDATA\Bacula\Work\*"\r
- Delete /REBOOTOK "$APPDATA\Bacula\Spool\*"\r
- Delete /REBOOTOK "$PLUGINSDIR\bacula-*.conf"\r
- Delete /REBOOTOK "$PLUGINSDIR\*console.conf"\r
- Delete /REBOOTOK "$PLUGINSDIR\*conf.in"\r
- Delete /REBOOTOK "$PLUGINSDIR\openssl.exe"\r
- Delete /REBOOTOK "$PLUGINSDIR\libeay32.dll"\r
- Delete /REBOOTOK "$PLUGINSDIR\ssleay32.dll"\r
- Delete /REBOOTOK "$PLUGINSDIR\sed.exe" \r
- Delete /REBOOTOK "$PLUGINSDIR\pw.txt" \r
- Delete /REBOOTOK "$PLUGINSDIR\*.sed" \r
- Delete /REBOOTOK "$PLUGINSDIR\*.cmd" \r
- Delete /REBOOTOK "$PLUGINSDIR\*.sql" \r
- RMDir "$APPDATA\Bacula\Work"\r
- RMDir "$APPDATA\Bacula\Spool"\r
- RMDir "$APPDATA\Bacula"\r
-NoDel:\r
-\r
- ; remove directories used\r
- RMDir "$INSTDIR\bin"\r
- RMDir "$INSTDIR\doc"\r
- RMDir "$INSTDIR"\r
-SectionEnd\r
-\r
-;\r
-; $0 - Service Name (ie Bacula-FD)\r
-; $1 - Service Description (ie Bacula File Daemon)\r
-; $2 - Install as Service\r
-; $3 - Start Service now\r
-;\r
-Function InstallDaemon\r
- Call InstallCommonFiles\r
-\r
- WriteRegDWORD HKLM "Software\Bacula" "Service_$0" $2\r
- \r
- ${If} $2 = 1\r
- nsExec::ExecToLog '"$INSTDIR\bin\$0.exe" /install -c "$APPDATA\Bacula\$0.conf"'\r
-\r
- ${If} $OsIsNT <> 1\r
- File "Start.bat"\r
- File "Stop.bat"\r
- ${EndIf}\r
-\r
- ; Start the service?\r
-\r
- ${If} $3 = 1 \r
- ${If} $OsIsNT = 1\r
- nsExec::ExecToLog 'net start $0'\r
- ${Else}\r
- Exec '"$INSTDIR\bin\$0.exe" -c "$APPDATA\Bacula\$0.conf"'\r
- ${EndIf}\r
- ${EndIf}\r
- ${Else}\r
- CreateShortCut "$SMPROGRAMS\Bacula\Start $1.lnk" "$INSTDIR\bin\$0.exe" '-c "$APPDATA\Bacula\$0.conf"' "$INSTDIR\bin\$0.exe" 0\r
- ${EndIf}\r
-FunctionEnd\r
-\r
-Function GetComputerName\r
- Push $R0\r
- Push $R1\r
- Push $R2\r
-\r
- System::Call "kernel32::GetComputerNameA(t .R0, *i ${NSIS_MAX_STRLEN} R1) i.R2"\r
-\r
- ${StrCase} $R0 $R0 "L"\r
-\r
- Pop $R2\r
- Pop $R1\r
- Exch $R0\r
-FunctionEnd\r
-\r
-!define ComputerNameDnsFullyQualified 3\r
-\r
-Function GetHostName\r
- Push $R0\r
- Push $R1\r
- Push $R2\r
-\r
- ${If} $OsIsNT = 1\r
- System::Call "kernel32::GetComputerNameExA(i ${ComputerNameDnsFullyQualified}, t .R0, *i ${NSIS_MAX_STRLEN} R1) i.R2 ?e"\r
- ${If} $R2 = 0\r
- Pop $R2\r
- DetailPrint "GetComputerNameExA failed - LastError = $R2"\r
- Call GetComputerName\r
- Pop $R0\r
- ${Else}\r
- Pop $R2\r
- ${EndIf}\r
- ${Else}\r
- Call GetComputerName\r
- Pop $R0\r
- ${EndIf}\r
-\r
- Pop $R2\r
- Pop $R1\r
- Exch $R0\r
-FunctionEnd\r
-\r
-!define NameUserPrincipal 8\r
-\r
-Function GetUserName\r
- Push $R0\r
- Push $R1\r
- Push $R2\r
-\r
- ${If} $OsIsNT = 1\r
- System::Call "secur32::GetUserNameExA(i ${NameUserPrincipal}, t .R0, *i ${NSIS_MAX_STRLEN} R1) i.R2 ?e"\r
- ${If} $R2 = 0\r
- Pop $R2\r
- DetailPrint "GetUserNameExA failed - LastError = $R2"\r
- Pop $R0\r
- StrCpy $R0 ""\r
- ${Else}\r
- Pop $R2\r
- ${EndIf}\r
- ${Else}\r
- StrCpy $R0 ""\r
- ${EndIf}\r
-\r
- ${If} $R0 == ""\r
- System::Call "advapi32::GetUserNameA(t .R0, *i ${NSIS_MAX_STRLEN} R1) i.R2 ?e"\r
- ${If} $R2 = 0\r
- Pop $R2\r
- DetailPrint "GetUserNameA failed - LastError = $R2"\r
- StrCpy $R0 ""\r
- ${Else}\r
- Pop $R2\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- Pop $R2\r
- Pop $R1\r
- Exch $R0\r
-FunctionEnd\r
-\r
-Function ConfigEditAndCopy\r
- Push $R1\r
-\r
- ${If} ${FileExists} "$0\$1"\r
- StrCpy $R1 ".new"\r
- ${Else}\r
- StrCpy $R1 ""\r
- ${EndIf}\r
-\r
- nsExec::ExecToLog '$PLUGINSDIR\sed.exe -f "$PLUGINSDIR\config.sed" -i.bak "$PLUGINSDIR\$1"'\r
- CopyFiles "$PLUGINSDIR\$1" "$0\$1$R1"\r
-\r
- Pop $R1\r
-FunctionEnd\r
-\r
-Function FindDatabaseApps\r
- Push $R1\r
-\r
- ReadRegStr $0 HKLM "Software\MySQL AB\MySQL Server 5.0" "Location"\r
-\r
- ${If} $0 != ""\r
- Call RemoveTrailingSlash\r
- StrCpy $MySQLPath $0\r
- ReadRegStr $0 HKLM "Software\MySQL AB\MySQL Server 5.0" "Version"\r
- StrCpy $MySQLVersion $0\r
- ${EndIf}\r
-\r
- EnumRegKey $R1 HKLM "Software\PostgreSQL\Installations" 0\r
- ${If} $R1 != ""\r
- ReadRegStr $0 HKLM "Software\PostgreSQL\Installations\$R1" "Base Directory"\r
- Call RemoveTrailingSlash\r
- StrCpy $PostgreSQLPath $0\r
- ReadRegStr $0 HKLM "Software\PostgreSQL\Installations\$R1" "Version"\r
- StrCpy $PostgreSQLVersion $0\r
- ${EndIf}\r
-\r
- Pop $R1\r
-FunctionEnd\r
-\r
-Function RemoveTrailingSlash\r
- Push $R1\r
- StrCpy $R1 $0 "" -1\r
- ${If} $R1 == "\"\r
- StrCpy $0 $0 -1\r
- ${EndIf}\r
- Pop $R1\r
-FunctionEnd\r
-\r
-Function IsDirectorSelected\r
- Push $R0\r
- SectionGetFlags ${SecDirectorDaemon} $R0\r
- IntOp $R0 $R0 & ${SF_SELECTED}\r
- Exch $R0\r
-FunctionEnd\r
-\r
-Function GetSelectedComponents\r
- Push $R0\r
- StrCpy $R0 0\r
- ${If} ${SectionIsSelected} ${SecFileDaemon}\r
- IntOp $R0 $R0 | ${ComponentFile}\r
- ${EndIf}\r
- ${If} ${SectionIsSelected} ${SecStorageDaemon}\r
- IntOp $R0 $R0 | ${ComponentStorage}\r
- ${EndIf}\r
- ${If} ${SectionIsSelected} ${SecDirectorDaemon}\r
- IntOp $R0 $R0 | ${ComponentDirector}\r
- ${EndIf}\r
- ${If} ${SectionIsSelected} ${SecConsole}\r
- IntOp $R0 $R0 | ${ComponentTextConsole}\r
- ${EndIf}\r
- ${If} ${SectionIsSelected} ${SecWxConsole}\r
- IntOp $R0 $R0 | ${ComponentGUIConsole}\r
- ${EndIf}\r
- ${If} ${SectionIsSelected} ${SecDocPdf}\r
- IntOp $R0 $R0 | ${ComponentPDFDocs}\r
- ${EndIf}\r
- ${If} ${SectionIsSelected} ${SecDocHtml}\r
- IntOp $R0 $R0 | ${ComponentHTMLDocs}\r
- ${EndIf}\r
- Exch $R0\r
-FunctionEnd\r
-\r
-Function PageComponentsShow\r
- ${If} $OsIsNT <> 1\r
- Call DisableServerSections\r
- ${EndIf}\r
-\r
- Call SelectPreviousComponents\r
- Call UpdateComponentUI\r
-FunctionEnd\r
-\r
-Function PageDirectoryPre\r
- ${If} $AutomaticInstall = 1\r
- ${OrIf} $InstallType = ${UpgradeInstall}\r
- Abort\r
- ${EndIf}\r
-FunctionEnd\r
-\r
-Function LeaveInstallPage\r
- Push "$INSTDIR\install.log"\r
- Call DumpLog\r
-FunctionEnd\r
-\r
-Function EnterWriteTemplates\r
- Push $R0\r
- Push $R1\r
-\r
- Call GetSelectedComponents\r
- Pop $R0\r
-\r
- IntOp $R0 $R0 & ${ComponentDirector}\r
- IntOp $R1 $NewComponents & ${ComponentsFileAndStorage}\r
-\r
- ${If} $R0 <> 0\r
- ${OrIf} $R1 = 0\r
- Pop $R1\r
- Pop $R0\r
- Abort\r
- ${EndIf}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentFile}\r
- ${If} $R0 = 0\r
- WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 2" State 0\r
- WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 2" Flags DISABLED\r
- DeleteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 3" State\r
- WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 3" Flags REQ_SAVE|FILE_EXPLORER|WARN_IF_EXIST|DISABLED\r
- ${Else}\r
- WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 2" State 1\r
- DeleteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 2" Flags\r
- WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 3" State "C:\$ConfigClientName.conf"\r
- WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 5" Flags REQ_SAVE|FILE_EXPLORER|WARN_IF_EXIST\r
- ${EndIf}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentStorage}\r
- ${If} $R0 = 0\r
- WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 4" State 0\r
- WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 4" Flags DISABLED\r
- DeleteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 5" State\r
- WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 5" Flags REQ_SAVE|FILE_EXPLORER|WARN_IF_EXIST|DISABLED\r
- ${Else}\r
- WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 4" State 1\r
- DeleteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 4" Flags\r
- WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 5" State "C:\$ConfigStorageName.conf"\r
- WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 5" Flags REQ_SAVE|FILE_EXPLORER|WARN_IF_EXIST\r
- ${EndIf}\r
-\r
- !InsertMacro MUI_HEADER_TEXT "$(TITLE_WriteTemplates)" "$(SUBTITLE_WriteTemplates)"\r
- !InsertMacro MUI_INSTALLOPTIONS_DISPLAY "WriteTemplates.ini"\r
-\r
- !InsertMacro MUI_INSTALLOPTIONS_READ $R0 "WriteTemplates.ini" "Field 2" State\r
- ${If} $R0 <> 0\r
- File "/oname=$PLUGINSDIR\client.conf.in" "client.conf.in"\r
-\r
- nsExec::ExecToLog '$PLUGINSDIR\sed.exe -f "$PLUGINSDIR\config.sed" -i.bak "$PLUGINSDIR\client.conf.in"'\r
- !InsertMacro MUI_INSTALLOPTIONS_READ $R0 "WriteTemplates.ini" "Field 3" State\r
- ${If} $R0 != ""\r
- CopyFiles "$PLUGINSDIR\client.conf.in" "$R0"\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- !InsertMacro MUI_INSTALLOPTIONS_READ $R0 "WriteTemplates.ini" "Field 4" State\r
- ${If} $R0 <> 0\r
- File "/oname=$PLUGINSDIR\storage.conf.in" "storage.conf.in"\r
-\r
- nsExec::ExecToLog '$PLUGINSDIR\sed.exe -f "$PLUGINSDIR\config.sed" -i.bak "$PLUGINSDIR\storage.conf.in"'\r
- !InsertMacro MUI_INSTALLOPTIONS_READ $R0 "WriteTemplates.ini" "Field 5" State\r
- ${If} $R0 != ""\r
- CopyFiles "$PLUGINSDIR\storage.conf.in" "$R0"\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- Pop $R1\r
- Pop $R0\r
-FunctionEnd\r
-\r
-Function SelectPreviousComponents\r
- ${If} $InstallType <> ${NewInstall}\r
- IntOp $R1 $PreviousComponents & ${ComponentFile}\r
- ${If} $R1 <> 0\r
- !InsertMacro SelectSection ${SecFileDaemon}\r
- !InsertMacro SetSectionFlag ${SecFileDaemon} ${SF_RO}\r
- ${Else}\r
- !InsertMacro UnselectSection ${SecFileDaemon}\r
- !InsertMacro ClearSectionFlag ${SecFileDaemon} ${SF_RO}\r
- ${EndIf}\r
- IntOp $R1 $PreviousComponents & ${ComponentStorage}\r
- ${If} $R1 <> 0\r
- !InsertMacro SelectSection ${SecStorageDaemon}\r
- !InsertMacro SetSectionFlag ${SecStorageDaemon} ${SF_RO}\r
- ${Else}\r
- !InsertMacro UnselectSection ${SecStorageDaemon}\r
- !InsertMacro ClearSectionFlag ${SecStorageDaemon} ${SF_RO}\r
- ${EndIf}\r
- IntOp $R1 $PreviousComponents & ${ComponentDirector}\r
- ${If} $R1 <> 0\r
- !InsertMacro SelectSection ${SecDirectorDaemon}\r
- !InsertMacro SetSectionFlag ${SecDirectorDaemon} ${SF_RO}\r
- ${Else}\r
- !InsertMacro UnselectSection ${SecDirectorDaemon}\r
- !InsertMacro ClearSectionFlag ${SecDirectorDaemon} ${SF_RO}\r
- ${EndIf}\r
- IntOp $R1 $PreviousComponents & ${ComponentTextConsole}\r
- ${If} $R1 <> 0\r
- !InsertMacro SelectSection ${SecConsole}\r
- !InsertMacro SetSectionFlag ${SecConsole} ${SF_RO}\r
- ${Else}\r
- !InsertMacro UnselectSection ${SecConsole}\r
- !InsertMacro ClearSectionFlag ${SecConsole} ${SF_RO}\r
- ${EndIf}\r
- IntOp $R1 $PreviousComponents & ${ComponentGUIConsole}\r
- ${If} $R1 <> 0\r
- !InsertMacro SelectSection ${SecWxConsole}\r
- !InsertMacro SetSectionFlag ${SecWxConsole} ${SF_RO}\r
- ${Else}\r
- !InsertMacro UnselectSection ${SecWxConsole}\r
- !InsertMacro ClearSectionFlag ${SecWxConsole} ${SF_RO}\r
- ${EndIf}\r
- IntOp $R1 $PreviousComponents & ${ComponentPDFDocs}\r
- ${If} $R1 <> 0\r
- !InsertMacro SelectSection ${SecDocPdf}\r
- !InsertMacro SetSectionFlag ${SecDocPdf} ${SF_RO}\r
- ${Else}\r
- !InsertMacro UnselectSection ${SecDocPdf}\r
- !InsertMacro ClearSectionFlag ${SecDocPdf} ${SF_RO}\r
- ${EndIf}\r
- IntOp $R1 $PreviousComponents & ${ComponentHTMLDocs}\r
- ${If} $R1 <> 0\r
- !InsertMacro SelectSection ${SecDocHtml}\r
- !InsertMacro SetSectionFlag ${SecDocHtml} ${SF_RO}\r
- ${Else}\r
- !InsertMacro UnselectSection ${SecDocHtml}\r
- !InsertMacro ClearSectionFlag ${SecDocHtml} ${SF_RO}\r
- ${EndIf}\r
- ${EndIf}\r
-FunctionEnd\r
-\r
-Function DisableServerSections\r
- !InsertMacro UnselectSection ${SecGroupServer}\r
- !InsertMacro SetSectionFlag ${SecGroupServer} ${SF_RO}\r
- !InsertMacro UnselectSection ${SecStorageDaemon}\r
- !InsertMacro SetSectionFlag ${SecStorageDaemon} ${SF_RO}\r
- !InsertMacro UnselectSection ${SecDirectorDaemon}\r
- !InsertMacro SetSectionFlag ${SecDirectorDaemon} ${SF_RO}\r
-FunctionEnd\r
-\r
-Function UpdateComponentUI\r
- Push $R0\r
- Push $R1\r
-\r
- Call GetSelectedComponents\r
- Pop $R0\r
-\r
- IntOp $R1 $R0 ^ $PreviousComponents\r
- IntOp $NewComponents $R0 & $R1\r
-\r
- ${If} $InstallType <> ${NewInstall}\r
- IntOp $R1 $NewComponents & ${ComponentFile}\r
- ${If} $R1 <> 0\r
- !InsertMacro SetSectionFlag ${SecFileDaemon} ${SF_BOLD}\r
- ${Else}\r
- !InsertMacro ClearSectionFlag ${SecFileDaemon} ${SF_BOLD}\r
- ${EndIf}\r
- IntOp $R1 $NewComponents & ${ComponentStorage}\r
- ${If} $R1 <> 0\r
- !InsertMacro SetSectionFlag ${SecStorageDaemon} ${SF_BOLD}\r
- ${Else}\r
- !InsertMacro ClearSectionFlag ${SecStorageDaemon} ${SF_BOLD}\r
- ${EndIf}\r
- IntOp $R1 $NewComponents & ${ComponentDirector}\r
- ${If} $R1 <> 0\r
- !InsertMacro SetSectionFlag ${SecDirectorDaemon} ${SF_BOLD}\r
- ${Else}\r
- !InsertMacro ClearSectionFlag ${SecDirectorDaemon} ${SF_BOLD}\r
- ${EndIf}\r
- IntOp $R1 $NewComponents & ${ComponentTextConsole}\r
- ${If} $R1 <> 0\r
- !InsertMacro SetSectionFlag ${SecConsole} ${SF_BOLD}\r
- ${Else}\r
- !InsertMacro ClearSectionFlag ${SecConsole} ${SF_BOLD}\r
- ${EndIf}\r
- IntOp $R1 $NewComponents & ${ComponentGUIConsole}\r
- ${If} $R1 <> 0\r
- !InsertMacro SetSectionFlag ${SecWxConsole} ${SF_BOLD}\r
- ${Else}\r
- !InsertMacro ClearSectionFlag ${SecWxConsole} ${SF_BOLD}\r
- ${EndIf}\r
- IntOp $R1 $NewComponents & ${ComponentPDFDocs}\r
- ${If} $R1 <> 0\r
- !InsertMacro SetSectionFlag ${SecDocPdf} ${SF_BOLD}\r
- ${Else}\r
- !InsertMacro ClearSectionFlag ${SecDocPdf} ${SF_BOLD}\r
- ${EndIf}\r
- IntOp $R1 $NewComponents & ${ComponentHTMLDocs}\r
- ${If} $R1 <> 0\r
- !InsertMacro SetSectionFlag ${SecDocHtml} ${SF_BOLD}\r
- ${Else}\r
- !InsertMacro ClearSectionFlag ${SecDocHtml} ${SF_BOLD}\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- GetDlgItem $R0 $HWNDPARENT 1\r
-\r
- IntOp $R1 $NewComponents & ${ComponentsRequiringUserConfig}\r
- ${If} $R1 = 0\r
- SendMessage $R0 ${WM_SETTEXT} 0 "STR:Install"\r
- ${Else}\r
- SendMessage $R0 ${WM_SETTEXT} 0 "STR:&Next >"\r
- ${EndIf}\r
-\r
- Pop $R1\r
- Pop $R0\r
-FunctionEnd\r
-\r
-!include "InstallType.nsh"\r
-!include "ConfigPage1.nsh"\r
-!include "ConfigPage2.nsh"\r
-!include "DumpLog.nsh"\r
_Z4plugIsEvRT_y
_Z4plugItEvRT_y
_Z4plugIyEvRT_y
-_Z9win_errorP3JCRPcS1_
-_Z9win_errorP3JCRPcm
+_Z9win_errorP3JCRPKcm
+_Z9win_errorP3JCRPKcPc
; bfile.o
_Z11bget_handleP5BFILE
; plugins.o
_Z10new_pluginv
-_Z12load_pluginsPvS_PKcS1_
+_Z12load_pluginsPvS_PKcS1_PFbP6PluginE
_Z14unload_pluginsv
_Z19dbg_plugin_add_hookPFvP6PluginP6_iobufE
_Z14set_attributesP3JCRP4ATTRP5BFILE
_Z16encode_attribsExP3JCRPcP6FF_PKT
_Z18select_data_streamP6FF_PKT
-_Z9win_errorP3JCRPcS1_
-_Z9win_errorP3JCRPcm
+_Z9win_errorP3JCRPKcm
+_Z9win_errorP3JCRPKcPc
; bfile.o
_Z11bget_handleP5BFILE
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2007-2008 Free Software Foundation Europe e.V.
+ Copyright (C) 2007-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.
#define log_error_message(msg) LogErrorMsg((msg), __FILE__, __LINE__)
extern int BaculaAppMain();
-extern void LogErrorMsg(char *msg, char *fname, int lineno);
+extern void LogErrorMsg(const char *msg, const char *fname, int lineno);
extern int BaculaMain(int argc, char *argv[]);
extern BOOL ReportStatus(DWORD state, DWORD exitcode, DWORD waithint);
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2007-2008 Free Software Foundation Europe e.V.
+ Copyright (C) 2007-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.
}
/* Log an error message */
-void LogErrorMsg(char *message, char *fname, int lineno)
+void LogErrorMsg(const char *message, const char *fname, int lineno)
{
char msgbuf[500];
HANDLE eventHandler;
- char *strings[3];
+ const char *strings[3];
LPTSTR msg;
service_error = GetLastError();
--- /dev/null
+#!/bin/sh
+make WIN64=yes
# Targets
-.PHONY: all clean
+.PHONY: all clean bsmtp
all: \
$(BINDIR)/bsmtp.exe $(BINDIR)/dbcheck.exe $(BINDIR)/scsilist.exe \
$(BINDIR)/testfind.exe $(BINDIR)/testls.exe \
$(BINDIR)/bregex.exe $(BINDIR)/bwild.exe
+bsmtp: \
+ $(BINDIR)/bsmtp.exe
+
clean:
@echo "Cleaning `pwd`"
$(call clean_obj,$(ALL_OBJS))
--- /dev/null
+Function EnterConfigPage1\r
+ ${If} $AutomaticInstall = 1\r
+ Abort\r
+ ${EndIf}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentsFileAndStorage}\r
+\r
+ ${If} $R0 = 0\r
+ Abort\r
+ ${EndIf}\r
+\r
+ FileOpen $R5 "$PLUGINSDIR\ConfigPage1.ini" w\r
+\r
+ StrCpy $R6 1 ; Field Number\r
+ StrCpy $R7 0 ; Top\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentFile}\r
+ ${If} $R0 <> 0\r
+ IntOp $R8 $R7 + 52\r
+ 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'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 12\r
+\r
+ IntOp $R8 $R7 + 8\r
+ 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'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+\r
+ IntOp $R8 $R8 + 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigClientName$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=158$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 2\r
+\r
+ IntOp $R8 $R8 - 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Port"$\r$\nLeft=172$\r$\nTop=$R7$\r$\nRight=188$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+\r
+ IntOp $R8 $R8 + 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigClientPort$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=218$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 2\r
+\r
+ IntOp $R8 $R8 - 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Max Jobs"$\r$\nLeft=238$\r$\nTop=$R7$\r$\nRight=270$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+\r
+ IntOp $R8 $R8 + 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigClientMaxJobs$\r$\nLeft=274$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 16\r
+\r
+ IntOp $R8 $R7 + 8\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Password"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+\r
+ IntOp $R8 $R8 + 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigClientPassword$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 14\r
+\r
+ IntOp $R8 $R7 + 10\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigClientInstallService$\r$\nText="Install as service"$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=118$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigClientStartService$\r$\nText="Start after install"$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=260$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 16\r
+ ${Endif}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentStorage}\r
+ ${If} $R0 <> 0\r
+ IntOp $R8 $R7 + 52\r
+ 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'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 12\r
+ \r
+ IntOp $R8 $R7 + 8\r
+ 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'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+\r
+ IntOp $R8 $R8 + 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigStorageName$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=158$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 2\r
+\r
+ IntOp $R8 $R8 - 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Port"$\r$\nLeft=172$\r$\nTop=$R7$\r$\nRight=188$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+\r
+ IntOp $R8 $R8 + 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigStoragePort$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=218$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 2\r
+\r
+ IntOp $R8 $R8 - 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Max Jobs"$\r$\nLeft=238$\r$\nTop=$R7$\r$\nRight=270$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+\r
+ IntOp $R8 $R8 + 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigStorageMaxJobs$\r$\nLeft=274$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 16\r
+\r
+ IntOp $R8 $R7 + 8\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Password"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+\r
+ IntOp $R8 $R8 + 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigStoragePassword$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 14\r
+\r
+ IntOp $R8 $R7 + 10\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigStorageInstallService$\r$\nText="Install as service"$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=118$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigStorageStartService$\r$\nText="Start after install"$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=260$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 16\r
+ ${Endif}\r
+\r
+ IntOp $R6 $R6 - 1\r
+\r
+ FileWrite $R5 "[Settings]$\r$\nNumFields=$R6$\r$\n"\r
+\r
+ FileClose $R5\r
+\r
+ !insertmacro MUI_HEADER_TEXT "$(TITLE_ConfigPage1)" "$(SUBTITLE_ConfigPage1)"\r
+ !insertmacro MUI_INSTALLOPTIONS_INITDIALOG "ConfigPage1.ini"\r
+ Pop $HDLG ;HWND of dialog\r
+\r
+ ; Initialize Controls\r
+\r
+ StrCpy $R6 1 ; Field Number\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentFile}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 2\r
+\r
+ ; Client Name\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"\r
+ SendMessage $HCTL ${EM_LIMITTEXT} 30 0\r
+\r
+ IntOp $R6 $R6 + 2\r
+\r
+ ; Client Port Number\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"\r
+ SendMessage $HCTL ${EM_LIMITTEXT} 5 0\r
+\r
+ IntOp $R6 $R6 + 2\r
+\r
+ ; Max Jobs\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"\r
+ SendMessage $HCTL ${EM_LIMITTEXT} 3 0\r
+\r
+ IntOp $R6 $R6 + 5\r
+ ${Endif}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentStorage}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 2\r
+\r
+ ; Storage Name\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"\r
+ SendMessage $HCTL ${EM_LIMITTEXT} 30 0\r
+\r
+ IntOp $R6 $R6 + 2\r
+\r
+ ; Storage Port Number\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"\r
+ SendMessage $HCTL ${EM_LIMITTEXT} 5 0\r
+\r
+ IntOp $R6 $R6 + 2\r
+\r
+ ; Max Jobs\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"\r
+ SendMessage $HCTL ${EM_LIMITTEXT} 3 0\r
+\r
+ IntOp $R6 $R6 + 5\r
+ ${Endif}\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_SHOW\r
+\r
+ ; Process results\r
+\r
+ StrCpy $R6 3\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentFile}\r
+ ${If} $R0 <> 0\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientName "ConfigPage1.ini" "Field $R6" "State"\r
+\r
+ IntOp $R6 $R6 + 2\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientPort "ConfigPage1.ini" "Field $R6" "State"\r
+\r
+ IntOp $R6 $R6 + 2\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientMaxJobs "ConfigPage1.ini" "Field $R6" "State"\r
+\r
+ IntOp $R6 $R6 + 2\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientPassword "ConfigPage1.ini" "Field $R6" "State"\r
+\r
+ IntOp $R6 $R6 + 1\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientInstallService "ConfigPage1.ini" "Field $R6" "State"\r
+\r
+ IntOp $R6 $R6 + 1\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientStartService "ConfigPage1.ini" "Field $R6" "State"\r
+\r
+ IntOp $R6 $R6 + 3\r
+ ${Endif}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentStorage}\r
+ ${If} $R0 <> 0\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStorageName "ConfigPage1.ini" "Field $R6" "State"\r
+\r
+ IntOp $R6 $R6 + 2\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStoragePort "ConfigPage1.ini" "Field $R6" "State"\r
+\r
+ IntOp $R6 $R6 + 2\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStorageMaxJobs "ConfigPage1.ini" "Field $R6" "State"\r
+\r
+ IntOp $R6 $R6 + 2\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStoragePassword "ConfigPage1.ini" "Field $R6" "State"\r
+\r
+ IntOp $R6 $R6 + 1\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStorageInstallService "ConfigPage1.ini" "Field $R6" "State"\r
+\r
+ IntOp $R6 $R6 + 1\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStorageStartService "ConfigPage1.ini" "Field $R6" "State"\r
+\r
+ IntOp $R6 $R6 + 3\r
+ ${Endif}\r
+FunctionEnd\r
+\r
+Function LeaveConfigPage1\r
+ StrCpy $R6 5\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentFile}\r
+ ${If} $R0 <> 0\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage1.ini" "Field $R6" "State"\r
+ ${If} $R0 < 1024\r
+ ${OrIf} $R0 > 65535\r
+ MessageBox MB_OK "Port must be between 1024 and 65535 inclusive."\r
+ Abort\r
+ ${EndIf}\r
+\r
+ IntOp $R6 $R6 + 2\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage1.ini" "Field $R6" "State"\r
+ ${If} $R0 < 1\r
+ ${OrIf} $R0 > 99\r
+ MessageBox MB_OK "Max Jobs must be between 1 and 99 inclusive."\r
+ Abort\r
+ ${EndIf}\r
+\r
+ IntOp $R6 $R6 + 9\r
+ ${Endif}\r
+ \r
+ IntOp $R0 $NewComponents & ${ComponentStorage}\r
+ ${If} $R0 <> 0\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage1.ini" "Field $R6" "State"\r
+ ${If} $R0 < 1024\r
+ ${OrIf} $R0 > 65535\r
+ MessageBox MB_OK "Port must be between 1024 and 65535 inclusive."\r
+ Abort\r
+ ${EndIf}\r
+\r
+ IntOp $R6 $R6 + 2\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage1.ini" "Field $R6" "State"\r
+ ${If} $R0 < 1\r
+ ${OrIf} $R0 > 99\r
+ MessageBox MB_OK "Max Jobs must be between 1 and 99 inclusive."\r
+ Abort\r
+ ${EndIf}\r
+\r
+ IntOp $R6 $R6 + 9\r
+ ${Endif}\r
+FunctionEnd\r
--- /dev/null
+Function EnterConfigPage2\r
+ IntOp $R0 $NewComponents & ${ComponentsRequiringUserConfig}\r
+\r
+ ${If} $R0 = 0\r
+ Abort\r
+ ${EndIf}\r
+\r
+ FileOpen $R5 "$PLUGINSDIR\ConfigPage2.ini" w\r
+\r
+ StrCpy $R6 1 ; Field Number\r
+ StrCpy $R7 0 ; Top\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentDirector}\r
+ ${If} $R0 <> 0\r
+ ${If} $AutomaticInstall = 1\r
+ IntOp $R8 $R7 + 54\r
+ ${Else}\r
+ IntOp $R8 $R7 + 92\r
+ ${EndIf}\r
+ 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'\r
+ ${Else}\r
+ IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}\r
+ ${If} $R0 <> 0\r
+ IntOp $R8 $R7 + 54\r
+ ${Else}\r
+ IntOp $R8 $R7 + 26\r
+ ${EndIf}\r
+ 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'\r
+ ${EndIf}\r
+\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 12\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentDirector}\r
+ ${If} $R0 <> 0\r
+ ${If} "$ConfigDirectorName" == ""\r
+ StrCpy $ConfigDirectorName "$HostName-dir"\r
+ ${EndIf}\r
+ ${If} "$ConfigDirectorPassword" == ""\r
+ StrCpy $ConfigDirectorPassword "$LocalDirectorPassword"\r
+ ${EndIf}\r
+ ${Else}\r
+ ${If} "$ConfigDirectorName" == "$HostName-dir"\r
+ StrCpy $ConfigDirectorName ""\r
+ ${EndIf}\r
+ ${If} "$ConfigDirectorPassword" == "$LocalDirectorPassword"\r
+ StrCpy $ConfigDirectorPassword ""\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentDirector}\r
+ ${If} $R0 = 0\r
+ ${OrIf} $AutomaticInstall = 0\r
+ IntOp $R8 $R7 + 8\r
+ 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'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+\r
+ IntOp $R8 $R8 + 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorName$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=158$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+\r
+ ${If} $AutomaticInstall = 0\r
+ IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}\r
+ ${If} $R0 <> 0\r
+ IntOp $R7 $R7 + 2\r
+ IntOp $R8 $R8 - 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Port"$\r$\nLeft=172$\r$\nTop=$R7$\r$\nRight=188$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+\r
+ IntOp $R8 $R8 + 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigDirectorPort$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=218$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ ${EndIf}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentDirector}\r
+ ${If} $R0 <> 0\r
+ IntOp $R7 $R7 + 2\r
+ IntOp $R8 $R8 - 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Max Jobs"$\r$\nLeft=238$\r$\nTop=$R7$\r$\nRight=270$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+\r
+ IntOp $R8 $R8 + 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigDirectorMaxJobs$\r$\nLeft=274$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ IntOp $R7 $R7 + 14\r
+ ${EndIf}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}\r
+ ${If} $R0 <> 0\r
+ ${OrIf} $AutomaticInstall = 0\r
+ IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}\r
+ ${If} $R0 <> 0\r
+ IntOp $R7 $R7 + 2\r
+ IntOp $R8 $R7 + 8\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Password"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+ IntOp $R8 $R8 + 2\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorPassword$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 14\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentDirector}\r
+ ${If} $R0 <> 0\r
+ IntOp $R7 $R7 + 2\r
+ IntOp $R8 $R7 + 8\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Mail Server"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=48$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+ IntOp $R8 $R8 + 2\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorMailServer$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 16\r
+ IntOp $R8 $R7 + 8\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Mail Address"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=48$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+ IntOp $R8 $R8 + 2\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorMailAddress$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 16\r
+ IntOp $R8 $R7 + 8\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Database"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+ IntOp $R8 $R8 + 2\r
+\r
+ ${If} $ConfigDirectorDB = 0\r
+ ${If} $MySQLPath != ""\r
+ StrCpy $ConfigDirectorDB 1\r
+ ${ElseIf} $PostgreSQLPath != ""\r
+ StrCpy $ConfigDirectorDB 2\r
+ ${Else}\r
+ StrCpy $ConfigDirectorDB 3\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ ${If} $ConfigDirectorDB = 1\r
+ StrCpy $R9 1\r
+ ${Else}\r
+ StrCpy $R9 0\r
+ ${EndIf}\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="RadioButton"$\r$\nState=$R9$\r$\nText="MySQL"$\r$\nFlags="GROUP"$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=90$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+\r
+ IntOp $R6 $R6 + 1\r
+\r
+ ${If} $ConfigDirectorDB = 2\r
+ StrCpy $R9 1\r
+ ${Else}\r
+ StrCpy $R9 0\r
+ ${EndIf}\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="RadioButton"$\r$\nState=$R9$\r$\nText="PostgreSQL"$\r$\nFlags="NOTABSTOP"$\r$\nLeft=94$\r$\nTop=$R7$\r$\nRight=146$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+\r
+ IntOp $R6 $R6 + 1\r
+\r
+ ${If} $ConfigDirectorDB = 3\r
+ StrCpy $R9 1\r
+ ${Else}\r
+ StrCpy $R9 0\r
+ ${EndIf}\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="RadioButton"$\r$\nState=$R9$\r$\nText="Sqlite"$\r$\nFlags="NOTABSTOP"$\r$\nLeft=150$\r$\nTop=$R7$\r$\nRight=182$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 12\r
+\r
+ ${If} $AutomaticInstall = 0\r
+ IntOp $R8 $R7 + 10\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigDirectorInstallService$\r$\nText="Install as service"$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=118$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigDirectorStartService$\r$\nText="Start after install"$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=260$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 12\r
+ ${EndIf}\r
+ ${Else}\r
+ IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}\r
+ ${If} $R0 <> 0\r
+ IntOp $R7 $R7 + 2\r
+ IntOp $R8 $R7 + 8\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Address"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=48$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+ IntOp $R8 $R8 + 2\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorAddress$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 14\r
+ IntOp $R8 $R7 + 8\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ IntOp $R7 $R7 + 4\r
+\r
+ ${If} $AutomaticInstall = 0\r
+ IntOp $R0 $NewComponents & ${ComponentsFileAndStorageAndDirector}\r
+ ${If} $R0 <> 0\r
+ IntOp $R8 $R7 + 42\r
+\r
+ 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'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 12\r
+\r
+ IntOp $R8 $R7 + 8\r
+ 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'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+\r
+ IntOp $R8 $R8 + 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigMonitorName$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=150$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 16\r
+ IntOp $R8 $R7 + 8\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Password"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+ IntOp $R8 $R8 + 2\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigMonitorPassword$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 20\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ IntOp $R6 $R6 - 1\r
+ FileWrite $R5 "[Settings]$\r$\nNumFields=$R6$\r$\n"\r
+\r
+ FileClose $R5\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentsFileAndStorage}\r
+ ${If} $R0 = 0\r
+ ${OrIf} $AutomaticInstall = 1\r
+ !insertmacro MUI_HEADER_TEXT "$(TITLE_ConfigPage1)" "$(SUBTITLE_ConfigPage1)"\r
+ ${Else}\r
+ !insertmacro MUI_HEADER_TEXT "$(TITLE_ConfigPage2)" "$(SUBTITLE_ConfigPage2)"\r
+ ${EndIf}\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_INITDIALOG "ConfigPage2.ini"\r
+ Pop $HDLG ;HWND of dialog\r
+\r
+ ; Initialize Controls\r
+ StrCpy $R6 2 ; Field Number\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentDirector}\r
+ ${If} $R0 = 0\r
+ ${OrIf} $AutomaticInstall = 0\r
+ ; Name\r
+ IntOp $R6 $R6 + 1\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND"\r
+ SendMessage $HCTL ${EM_LIMITTEXT} 30 0\r
+ IntOp $R6 $R6 + 1\r
+\r
+ ${If} $AutomaticInstall = 0\r
+ IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 1\r
+ ; Port Number\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND"\r
+ SendMessage $HCTL ${EM_LIMITTEXT} 5 0\r
+ IntOp $R6 $R6 + 1\r
+ ${EndIf}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentDirector}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 1\r
+ ; Max Jobs\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND"\r
+ SendMessage $HCTL ${EM_LIMITTEXT} 3 0\r
+\r
+ IntOp $R6 $R6 + 1\r
+ ${EndIf}\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}\r
+ ${If} $R0 <> 0\r
+ ${OrIf} $AutomaticInstall = 0\r
+ IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 2\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentDirector}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 9\r
+\r
+ ${If} $AutomaticInstall = 0\r
+ IntOp $R6 $R6 + 2\r
+ ${EndIf}\r
+ ${Else}\r
+ IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 2\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ ${If} $AutomaticInstall = 0\r
+ IntOp $R0 $NewComponents & ${ComponentsFileAndStorageAndDirector}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 2\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND"\r
+ SendMessage $HCTL ${EM_LIMITTEXT} 30 0\r
+ IntOp $R6 $R6 + 2\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_SHOW\r
+\r
+ ; Process results\r
+\r
+ StrCpy $R6 2\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentDirector}\r
+ ${If} $R0 = 0\r
+ ${OrIf} $AutomaticInstall = 0\r
+ IntOp $R6 $R6 + 1\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorName "ConfigPage2.ini" "Field $R6" "State"\r
+ IntOp $R6 $R6 + 1\r
+\r
+ ${If} $AutomaticInstall = 0\r
+ IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 1\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorPort "ConfigPage2.ini" "Field $R6" "State"\r
+ IntOp $R6 $R6 + 1\r
+ ${EndIf}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentDirector}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 1\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorMaxJobs "ConfigPage2.ini" "Field $R6" "State"\r
+ IntOp $R6 $R6 + 1\r
+ ${EndIf}\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}\r
+ ${If} $R0 <> 0\r
+ ${OrIf} $AutomaticInstall = 0\r
+ IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 1\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorPassword "ConfigPage2.ini" "Field $R6" "State"\r
+ IntOp $R6 $R6 + 1\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentDirector}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 1\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorMailServer "ConfigPage2.ini" "Field $R6" "State"\r
+ IntOp $R6 $R6 + 2\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorMailAddress "ConfigPage2.ini" "Field $R6" "State"\r
+ IntOp $R6 $R6 + 2\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $R5 "ConfigPage2.ini" "Field $R6" "State"\r
+ ${If} $R5 = 1\r
+ StrCpy $ConfigDirectorDB 1\r
+ ${Endif}\r
+ IntOp $R6 $R6 + 1\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $R5 "ConfigPage2.ini" "Field $R6" "State"\r
+ ${If} $R5 = 1\r
+ StrCpy $ConfigDirectorDB 2\r
+ ${Endif}\r
+ IntOp $R6 $R6 + 1\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $R5 "ConfigPage2.ini" "Field $R6" "State"\r
+ ${If} $R5 = 1\r
+ StrCpy $ConfigDirectorDB 3\r
+ ${Endif}\r
+ IntOp $R6 $R6 + 1\r
+\r
+ ${If} $AutomaticInstall = 0\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorInstallService "ConfigPage2.ini" "Field $R6" "State"\r
+ IntOp $R6 $R6 + 1\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorStartService "ConfigPage2.ini" "Field $R6" "State"\r
+ IntOp $R6 $R6 + 1\r
+ ${EndIf}\r
+ ${Else}\r
+ IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 1\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorAddress "ConfigPage2.ini" "Field $R6" "State"\r
+ IntOp $R6 $R6 + 1\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ ${If} $AutomaticInstall = 0\r
+ IntOp $R0 $NewComponents & ${ComponentsFileAndStorageAndDirector}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 2\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigMonitorName "ConfigPage2.ini" "Field $R6" "State"\r
+ IntOp $R6 $R6 + 2\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigMonitorPassword "ConfigPage2.ini" "Field $R6" "State"\r
+ ${EndIf}\r
+ ${EndIf}\r
+FunctionEnd\r
+\r
+Function LeaveConfigPage2\r
+ ${If} $AutomaticInstall = 0\r
+ StrCpy $R6 4\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 1\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage2.ini" "Field $R6" "State"\r
+ ${If} $R0 < 1024\r
+ ${OrIf} $R0 > 65535\r
+ MessageBox MB_OK "Port must be between 1024 and 65535 inclusive."\r
+ Abort\r
+ ${EndIf}\r
+ IntOp $R6 $R6 + 1\r
+ ${EndIf}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentDirector}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 1\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage2.ini" "Field $R6" "State"\r
+ ${If} $R0 < 1\r
+ ${OrIf} $R0 > 99\r
+ MessageBox MB_OK "Max Jobs must be between 1 and 99 inclusive."\r
+ Abort\r
+ ${EndIf}\r
+ IntOp $R6 $R6 + 1\r
+ ${EndIf}\r
+ ${EndIf}\r
+FunctionEnd\r
--- /dev/null
+!define LVM_GETITEMCOUNT 0x1004\r
+!define LVM_GETITEMTEXT 0x102D\r
+\r
+Function DumpLog\r
+ Exch $5\r
+ Push $0\r
+ Push $1\r
+ Push $2\r
+ Push $3\r
+ Push $4\r
+ Push $6\r
+\r
+ FindWindow $0 "#32770" "" $HWNDPARENT\r
+ GetDlgItem $0 $0 1016\r
+ StrCmp $0 0 error\r
+ FileOpen $5 $5 "w"\r
+ StrCmp $5 0 error\r
+ SendMessage $0 ${LVM_GETITEMCOUNT} 0 0 $6\r
+ System::Alloc ${NSIS_MAX_STRLEN}\r
+ Pop $3\r
+ StrCpy $2 0\r
+ System::Call "*(i, i, i, i, i, i, i, i, i) i \\r
+ (0, 0, 0, 0, 0, r3, ${NSIS_MAX_STRLEN}) .r1"\r
+ loop: StrCmp $2 $6 done\r
+ System::Call "User32::SendMessageA(i, i, i, i) i \\r
+ ($0, ${LVM_GETITEMTEXT}, $2, r1)"\r
+ System::Call "*$3(&t${NSIS_MAX_STRLEN} .r4)"\r
+ FileWrite $5 "$4$\r$\n"\r
+ IntOp $2 $2 + 1\r
+ Goto loop\r
+ done:\r
+ FileClose $5\r
+ System::Free $1\r
+ System::Free $3\r
+ Goto exit\r
+ error:\r
+ MessageBox MB_OK error\r
+ exit:\r
+ Pop $6\r
+ Pop $4\r
+ Pop $3\r
+ Pop $2\r
+ Pop $1\r
+ Pop $0\r
+ Exch $5\r
+FunctionEnd\r
--- /dev/null
+[Settings]\r
+NumFields=6\r
+\r
+[Field 1]\r
+Type=Label\r
+Text=This is a new installation. Please choose the installation type.\r
+Left=0\r
+Right=300\r
+Top=0\r
+Bottom=28\r
+\r
+[Field 2]\r
+Type=GroupBox\r
+Text=Installation Type\r
+Left=0\r
+Right=300\r
+Top=32\r
+Bottom=136\r
+\r
+[Field 3]\r
+Type=RadioButton\r
+Text=Automatic\r
+State=1\r
+Left=6\r
+Right=52\r
+Top=44\r
+Bottom=54\r
+\r
+[Field 4]\r
+Type=RadioButton\r
+Text=Custom\r
+Left=6\r
+Right=44\r
+Top=90\r
+Bottom=100\r
+\r
+[Field 5]\r
+Type=Label\r
+Text=The software will be installed in the default directory "Program Files\\Bacula". The configuration files will be generated using defaults applicable to most installations.\r
+Left=17\r
+Right=295\r
+Top=58\r
+Bottom=86\r
+\r
+[Field 6]\r
+Type=Label\r
+Text=You may choose the installation directory. The configuration defaults will be displayed and you will be given the chance to make changes before the configuration files are written.\r
+Left=17\r
+Right=295\r
+Top=104\r
+Bottom=132\r
--- /dev/null
+Function EnterInstallType\r
+ Push $R0\r
+ Push $R1\r
+ Push $R2\r
+\r
+ ; Check if this is an upgrade by looking for an uninstaller configured \r
+ ; in the registry.\r
+ ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "UninstallString"\r
+\r
+ ${If} "$R0" != ""\r
+ ; Check registry for new installer\r
+ ReadRegStr $R1 HKLM "Software\Bacula" "InstallLocation"\r
+ ${If} "$R1" != ""\r
+ ; New Installer \r
+ StrCpy $OldInstallDir $R1\r
+ StrCpy $InstallType ${UpgradeInstall}\r
+\r
+ SetShellVarContext all\r
+\r
+ StrCpy $R1 "$APPDATA\Bacula"\r
+ StrCpy $R2 "$INSTDIR\Doc"\r
+\r
+ ReadRegDWORD $PreviousComponents HKLM "Software\Bacula" "Components"\r
+\r
+ WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 1" "Text" "A previous installation has been found in $OldInstallDir. Please choose the installation type for any additional components you select."\r
+ WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 5" "Text" "The configuration files for additional components will be generated using defaults applicable to most installations."\r
+ WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 6" "Text" "The configuration defaults for additional components will be displayed and you will be given the chance to make changes before the configuration files are written."\r
+\r
+ ReadRegDWORD $ConfigDirectorDB HKLM Software\Bacula Database\r
+\r
+ ${If} $ConfigDirectorDB = 0\r
+ IntOp $R0 $PreviousComponents & ${ComponentDirector}\r
+ ${If} $R0 <> 0\r
+ StrCpy $ConfigDirectorDB 1\r
+ ${EndIf}\r
+ ${EndIf}\r
+ ${Else}\r
+ ; Processing Upgrade - Get Install Directory\r
+ ${StrRep} $R0 $R0 '"' ''\r
+ ${GetParent} $R0 $OldInstallDir\r
+\r
+ ; Old Installer \r
+ StrCpy $InstallType ${MigrateInstall}\r
+ StrCpy $R1 "$OldInstallDir\bin"\r
+ StrCpy $R2 "$OldInstallDir\Doc"\r
+\r
+ WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 1" "Text" "An old installation has been found in $OldInstallDir. The Configuration will be migrated. Please choose the installation type for any additional components you select."\r
+ WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 5" "Text" "The software will be installed in the default directory $\"$PROGRAMFILES\Bacula$\". The configuration files for additional components will be generated using defaults applicable to most installations."\r
+ WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 6" "Text" "You may choose the installation directory. The configuration defaults will be displayed and you will be given the chance to make changes before the configuration files are written."\r
+ ${EndIf}\r
+ ${Else}\r
+ ; New Install\r
+ StrCpy $InstallType ${NewInstall}\r
+ WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 5" "Text" "The software will be installed in the default directory $\"$PROGRAMFILES\Bacula$\". The configuration files will be generated using defaults applicable to most installations."\r
+ ${EndIf}\r
+\r
+ ${If} $InstallType <> ${NewInstall}\r
+ ${AndIf} $PreviousComponents = 0\r
+ ${If} ${FileExists} "$R1\bacula-fd.conf"\r
+ IntOp $PreviousComponents $PreviousComponents | ${ComponentFile}\r
+ ${EndIf}\r
+ ${If} ${FileExists} "$R1\bconsole.conf"\r
+ IntOp $PreviousComponents $PreviousComponents | ${ComponentTextConsole}\r
+ ${EndIf}\r
+ ${If} ${FileExists} "$R1\wx-console.conf"\r
+ IntOp $PreviousComponents $PreviousComponents | ${ComponentGUIConsole}\r
+ ${EndIf}\r
+ ${If} ${FileExists} "$R2\bacula.pdf"\r
+ IntOp $PreviousComponents $PreviousComponents | ${ComponentPDFDocs}\r
+ ${EndIf}\r
+ ${If} ${FileExists} "$R2\bacula\bacula.html"\r
+ IntOp $PreviousComponents $PreviousComponents | ${ComponentHTMLDocs}\r
+ ${EndIf}\r
+ ${If} ${FileExists} "$R2\bacula.html"\r
+ IntOp $PreviousComponents $PreviousComponents | ${ComponentHTMLDocs}\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ !InsertMacro MUI_HEADER_TEXT "$(TITLE_InstallType)" "$(SUBTITLE_InstallType)"\r
+ !InsertMacro MUI_INSTALLOPTIONS_INITDIALOG "InstallType.ini"\r
+ Pop $HDLG ;HWND of dialog\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_SHOW\r
+\r
+ ; Process Results\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $R0 "InstallType.ini" "Field 3" "State"\r
+\r
+ ${If} $R0 = 1\r
+ StrCpy $AutomaticInstall 1\r
+ ${Else}\r
+ StrCpy $AutomaticInstall 0\r
+ ${EndIf}\r
+\r
+ Pop $R2\r
+ Pop $R1\r
+ Pop $R0\r
+FunctionEnd\r
--- /dev/null
+#
+# Makefile for win32 bacula executables
+# Using MinGW cross-compiler on GNU/Linux
+#
+# Written by Robert Nelson, June 2006
+#
+
+include ../Makefile.inc
+
+VERSION := $(shell sed -ne 's/.*[ \t]VERSION[ \t][ \t]*"\(.*\)"/\1/p' < ../../version.h)
+
+DEFINES := \
+ -DVERSION=$(VERSION) \
+ -DOUT_DIR=..\\release \
+ -DSRC_DIR=release \
+ -DBUILD_TOOLS=MinGW \
+
+INSTALL_EXE := $(BUILDDIR)/release/winbacula-$(VERSION).exe
+
+BACULA_BINARIES := \
+ bacula.dll \
+ cats_mysql.dll \
+ cats_postgresql.dll \
+ cats_sqlite3.dll \
+ exchange-fd.dll \
+ bacula-dir.exe \
+ bacula-fd.exe \
+ bacula-sd.exe \
+ bconsole.exe \
+ bcopy.exe \
+ bextract.exe \
+ bls.exe \
+ bscan.exe \
+ bsleep.exe \
+ bsmtp.exe \
+ btape.exe \
+ dbcheck.exe \
+ scsilist.exe \
+ bwx-console.exe
+
+DEPKGS_BINARIES := \
+ libeay32.dll \
+ pthreadGCE.dll \
+ ssleay32.dll \
+ zlib1.dll \
+ sqlite3.exe \
+ openssl.exe \
+ loaderinfo.exe \
+ mt.exe \
+ mtx.exe \
+ scsitape.exe \
+ sed.exe \
+ tapeinfo.exe \
+ expr64.exe \
+ snooze.exe \
+ mkisofs.exe \
+ growisofs.exe \
+ dvd-ram-control.exe \
+ dvd+rw-booktype.exe \
+ dvd+rw-format.exe \
+ dvd+rw-mediainfo.exe \
+ wxbase28_gcc_bacula.dll \
+ wxmsw28_core_gcc_bacula.dll
+
+NONGCC_BINARIES := \
+ libmysql.dll
+
+NONGCC_LIBRARIES := \
+ libpq.dll
+
+MINGW_BINARIES := \
+ mingwm10.dll
+
+SCRIPT_FILES := \
+ mtx-changer.cmd \
+ disk-changer.cmd \
+ dvd-handler.cmd
+
+CAT_FILES := \
+ create_mysql_database.cmd \
+ drop_mysql_database.cmd \
+ make_mysql_tables.cmd \
+ make_mysql_tables.sql \
+ drop_mysql_tables.cmd \
+ drop_mysql_tables.sql \
+ grant_mysql_privileges.cmd \
+ grant_mysql_privileges.sql \
+ make_mysql_catalog_backup.cmd \
+ create_postgresql_database.cmd \
+ create_postgresql_database.sql \
+ drop_postgresql_database.cmd \
+ make_postgresql_tables.cmd \
+ make_postgresql_tables.sql \
+ drop_postgresql_tables.cmd \
+ drop_postgresql_tables.sql \
+ grant_postgresql_privileges.cmd \
+ grant_postgresql_privileges.sql \
+ make_postgresql_catalog_backup.cmd \
+ create_sqlite3_database.cmd \
+ drop_sqlite3_database.cmd \
+ make_sqlite3_tables.cmd \
+ make_sqlite3_tables.sql \
+ drop_sqlite3_tables.cmd \
+ grant_sqlite3_privileges.cmd \
+ make_sqlite3_catalog_backup.cmd \
+ delete_catalog_backup.cmd
+
+DIRD_FILES := \
+ query.sql
+
+SSL_FILES := \
+ openssl.cnf
+
+DOC_FILES := \
+ manual/bacula.pdf \
+ manual/bacula/*.html \
+ manual/bacula/*.png \
+ manual/bacula/*.css
+
+##########################################################################
+
+# Targets
+
+.PHONY: all clean installer
+
+all: $(INSTALL_EXE)
+
+installer: $(INSTALL_EXE)
+
+clean:
+ @echo "Cleaning `pwd`"
+ $(CMD_ECHO)-rm -f $(INSTALL_EXE)
+ $(CMD_ECHO)-rm -rf release
+
+#
+# Rules
+#
+
+define Convert_Binary
+release/$$(notdir $(1)): $(1)
+ $$(call checkdir,$$@)
+ $(ECHO_CMD)cp -f $$^ $$@ ; \
+ $(STAB2CV) $$@
+endef
+
+define Copy_Binary
+release/$$(notdir $(1)): $(1)
+ $$(call checkdir,$$@)
+ $(ECHO_CMD)cp -f $$^ $$@
+endef
+
+define Copy_Docs
+release/$(1): $(DOCDIR)/$(1)
+ $$(call checkdir,$$@)
+ $(ECHO_CMD)cp -f $$^ $$(dir $$@)
+endef
+
+$(foreach file,$(addprefix $(DEPKGS)/bin/, $(DEPKGS_BINARIES)),$(eval $(call Convert_Binary,$(file))))
+
+$(foreach file,$(addprefix $(DEPKGS)/bin/, $(NONGCC_BINARIES)),$(eval $(call Copy_Binary,$(file))))
+
+$(foreach file,$(addprefix $(DEPKGS)/lib/, $(NONGCC_LIBRARIES)),$(eval $(call Copy_Binary,$(file))))
+
+$(foreach file,$(addprefix $(BINDIR)/, $(BACULA_BINARIES)),$(eval $(call Convert_Binary,$(file))))
+
+$(foreach file,$(addprefix $(MINGW_DLLDIR)/, $(MINGW_BINARIES)),$(eval $(call Copy_Binary,$(file))))
+
+$(foreach file,$(addprefix $(DEPKGS)/ssl/, $(SSL_FILES)),$(eval $(call Copy_Binary,$(file))))
+
+$(foreach file,$(addprefix ../scripts/, $(SCRIPT_FILES)),$(eval $(call Copy_Binary,$(file))))
+
+$(foreach file,$(addprefix ../cats/, $(CAT_FILES)),$(eval $(call Copy_Binary,$(file))))
+
+$(foreach file,$(addprefix ../../dird/, $(DIRD_FILES)),$(eval $(call Copy_Binary,$(file))))
+
+$(foreach file,$(DOC_FILES),$(eval $(call Copy_Docs,$(file))))
+
+$(INSTALL_EXE): winbacula.nsi $(addprefix release/,$(BACULA_BINARIES) $(SCRIPT_FILES) $(CAT_FILES) $(DEPKGS_BINARIES) $(NONGCC_BINARIES) $(NONGCC_LIBRARIES) $(MINGW_BINARIES) $(SSL_FILES) $(DIRD_FILES) $(DOC_FILES))
+ NSISDIR=$(NSIS_DIR) \
+ $(NSIS_DIR)/makensis -V3 $(DEFINES) winbacula.nsi
+
+include $(BUILDDIR)/Makefile.rules
--- /dev/null
+Bacula - Windows Version Disclaimer\r
+===================================\r
+\r
+Please note, only the Win32 Client (File daemon) is supported. All the\r
+other components (Director, Storage daemon, their utilities) are provided\r
+on an "as is" basis. Unfortunately, they are neither properly tested, \r
+documented, or supported. This means that we cannot ensure that bug reports\r
+against the non-supported components will be fixed. For them to be supported, \r
+we need three things from the Open Source community:\r
+\r
+1. Full documentation of the Windows particularities of the Director,\r
+ the Storage daemon, and their utilities in the Bacula manual.\r
+\r
+2. Someone to periodically and on demand run the regressions tests.\r
+\r
+3. One or more developers who are willing to accept and correct Windows\r
+ related bugs as they occur.\r
+\r
+4. A certain Win32 community that will respond to user support questions\r
+ on the bacula-users list. (This is probably already fullfilled). \r
+ \r
+\r
+Bacula - Windows Version Notes\r
+==============================\r
+\r
+These notes highlight how the Windows version of Bacula differs from the \r
+other versions. It also provides any notes additional to the documentation.\r
+\r
+For detailed documentation on using, configuring and troubleshooting Bacula,\r
+please consult the installed documentation or the online documentation at\r
+http://www.bacula.org/?page=documentation.\r
+\r
+\r
+Start Menu Items\r
+----------------\r
+A number of menu items have been created in the Start menu under All Programs\r
+in the Bacula submenu. They may be selected to edit the configuration files,\r
+view the documentation or run one of the console or utility programs. The \r
+choices available will vary depending on the options you chose to install.\r
+\r
+\r
+File Locations\r
+--------------\r
+The programs and documentation are installed in the directory \r
+"C:\Program Files\Bacula" unless a different directory was selected during\r
+installation. The configuration and other application data files are in the\r
+"C:\Documents and Settings\All Users\Application Data\Bacula" directory.\r
+\r
+Code Page Problems\r
+-------------------\r
+Please note that Bacula expects the contents of the configuration files to be \r
+written in UTF-8 format. Some translations of "Application Data" have accented\r
+characters, and apparently the installer writes this translated data in the\r
+standard Windows code page coding. This occurs for the Working Directory, and \r
+when it happens the daemon will not start since Bacula cannot find the directory.\r
+The workaround is to manually edit the appropriate conf file and ensure that it\r
+is written out in UTF-8 format.\r
+\r
+The conf files can be edited with any UTF-8 compatible editor, or on most \r
+modern Win32 machines, you can edit them with notepad, then choose UTF-8\r
+output encoding before saving them.\r
+\r
+\r
+Storage and Director Services\r
+-----------------------------\r
+These services are still considered experimental in this release. Use of \r
+them should be approached with caution since they haven't received the\r
+same level of extensive usage and testing that the File service has \r
+received.\r
+\r
+Storage Device Names\r
+--------------------\r
+There is a utility installed called scsilist.exe which displays the installed \r
+devices, their physical address and their device name. A link to it is \r
+created in the Bacula menu when the Storage service is installed.\r
+\r
+Changer and Tape device names in Windows are Changer0, Changer1, etc and \r
+Tape0, Tape1, etc. If there isn't a device driver loaded for the Changer \r
+then you need to use the address <Port>:<Bus>:<Target>:<Lun>. Port is the \r
+SCSI Adapter Number, Bus is the Bus Number on the adapter (usually 0 since \r
+most adapters only have one bus), Target is the device's Target Device ID, \r
+Lun is the Logical Unit Number.\r
+ \r
+You must specify DeviceType = tape in the Device resource in bacula-sd.conf \r
+since auto detection of device type doesn't work at the present time.\r
--- /dev/null
+rem\r
+rem Bacula start file for Win95/98/Me\r
+rem\r
+cd c:\bacula\bin\r
+c:\bacula\bin\bacula-fd.exe /service -c c:\bacula\bin\bacula-fd.conf\r
--- /dev/null
+rem\r
+rem Bacula stop file for Win95/98/Me\r
+rem\r
+cd c:\bacula\bin\r
+c:\bacula\bin\bacula-fd.exe /kill\r
--- /dev/null
+[Settings]\r
+NumFields=5\r
+CancelEnabled=0\r
+BackEnabled=0\r
+\r
+[Field 1]\r
+Type="Label"\r
+Text="Templates of the Client and Storage resources can be generated that are customized with the information about this system. These templates can then be copied to the Director computer and included in the Director's configuration file."\r
+Left=7\r
+Right=293\r
+Top=6\r
+Bottom=32\r
+\r
+[Field 2]\r
+Type="CheckBox"\r
+Text="Client"\r
+Left=6\r
+Right=40\r
+Top=38\r
+Bottom=48\r
+\r
+[Field 3]\r
+Type="FileRequest"\r
+State="Client.conf"\r
+Flags=\r
+Filter=Configuration Files|*.conf|All Files|*.*\r
+Left=16\r
+Right=288\r
+Top=50\r
+Bottom=62\r
+\r
+[Field 4]\r
+Type="CheckBox"\r
+Text="Storage"\r
+Left=6\r
+Right=48\r
+Top=70\r
+Bottom=80\r
+\r
+[Field 5]\r
+Type="FileRequest"\r
+State="Storage.conf"\r
+Flags=REQ_SAVE|FILE_EXPLORER|WARN_IF_EXIST\r
+Filter=Configuration Files|*.conf|All Files|*.*\r
+Left=16\r
+Right=288\r
+Top=82\r
+Bottom=94\r
--- /dev/null
+#\r
+# Default Bacula Director Configuration file\r
+#\r
+# The only thing that MUST be changed is to add one or more\r
+# file or directory names in the Include directive of the\r
+# FileSet resource.\r
+#\r
+# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ @DISTVER@\r
+#\r
+# You might also want to change the default email address\r
+# from root to your address. See the "mail" and "operator"\r
+# directives in the Messages resource.\r
+#\r
+\r
+Director { # define myself\r
+ Name = @director_name@\r
+ DIRport = @director_port@ # where we listen for UA connections\r
+ QueryFile = "@bin_dir@\\query.sql"\r
+ WorkingDirectory = "@working_dir@"\r
+ PidDirectory = "@working_dir@"\r
+ Maximum Concurrent Jobs = @director_maxjobs@\r
+ Password = "@director_password@" # Console password\r
+ Messages = Daemon\r
+}\r
+\r
+JobDefs {\r
+ Name = "DefaultJob"\r
+ Type = Backup\r
+ Level = Incremental\r
+ Client = @client_name@\r
+ FileSet = "Test Set"\r
+ Schedule = "WeeklyCycle"\r
+ Storage = File\r
+ Messages = Standard\r
+ Pool = Default\r
+ Priority = 10\r
+}\r
+\r
+\r
+#\r
+# Define the main nightly save backup job\r
+# By default, this job will back up to disk in C:/tmp\r
+Job {\r
+ Name = "Client1"\r
+ JobDefs = "DefaultJob"\r
+ Write Bootstrap = "@working_dir@\\Client1.bsr"\r
+}\r
+\r
+#Job {\r
+# Name = "Client2"\r
+# Client = @client_name@2\r
+# JobDefs = "DefaultJob"\r
+# Write Bootstrap = "@working_dir@\\Client2.bsr"\r
+#}\r
+\r
+# Backup the catalog database (after the nightly save)\r
+Job {\r
+ Name = "BackupCatalog"\r
+ JobDefs = "DefaultJob"\r
+ Level = Full\r
+ FileSet="Catalog"\r
+ Schedule = "WeeklyCycleAfterBackup"\r
+ # This creates an ASCII copy of the catalog\r
+ RunBeforeJob = "\"@bin_dir@\\make_catalog_backup\" bacula bacula"\r
+ # This deletes the copy of the catalog\r
+ RunAfterJob = "\"@bin_dir@\\delete_catalog_backup\""\r
+ Write Bootstrap = "@working_dir@\\BackupCatalog.bsr"\r
+ Priority = 11 # run after main backup\r
+}\r
+\r
+#\r
+# Standard Restore template, to be changed by Console program\r
+# Only one such job is needed for all Jobs/Clients/Storage ...\r
+#\r
+Job {\r
+ Name = "RestoreFiles"\r
+ Type = Restore\r
+ Client=@client_name@\r
+ FileSet="Test Set"\r
+ Storage = File\r
+ Pool = Default\r
+ Messages = Standard\r
+ Where = "C:\\tmp\\bacula-restores"\r
+}\r
+\r
+#\r
+# Note: Windows path separators do NOT work correctly in FileSets.\r
+#\r
+# List of files to be backed up\r
+FileSet {\r
+ Name = "Test Set"\r
+ Include {\r
+ Options {\r
+ signature = MD5\r
+ ignore case = yes\r
+ }\r
+# \r
+# Put your list of files here, preceded by 'File =', one per line\r
+# or include an external list with:\r
+#\r
+# File = <file-name\r
+#\r
+# Note: C:/ backs up everything on drive C.\r
+# if you have other drives such as D:/\r
+# you will probably want to add them too.\r
+#\r
+# By default this is defined to point to the Bacula \r
+# directory to give a reasonable FileSet to backup to\r
+# disk storage during initial testing.\r
+#\r
+ File = "@BUILD_DIR@"\r
+ }\r
+\r
+#\r
+# If you backup the root directory, the following excluded\r
+# files can be useful\r
+#\r
+ Exclude {\r
+ Options {\r
+ signature = MD5\r
+ ignore case = yes\r
+ }\r
+ File = C:/Temp\r
+ File = C:/tmp\r
+ }\r
+}\r
+\r
+#\r
+# This is an example which will backup all the hard drives of a Windows System.\r
+#\r
+FileSet {\r
+ Name = "Windows Full Set"\r
+ Enable VSS = yes\r
+ Include {\r
+ Options {\r
+ Signature = MD5\r
+ Exclude = yes\r
+ IgnoreCase = yes\r
+ EnhancedWild = yes\r
+ DriveType = fixed\r
+\r
+ # Exclude directories full of lots and lots of useless little files\r
+ WildDir = "[A-Z]:/Documents and Settings/*/Cookies"\r
+ WildDir = "[A-Z]:/Documents and Settings/*/Recent"\r
+ WildDir = "[A-Z]:/Documents and Settings/*/{Local Settings,LOCALS~1}/History"\r
+ WildDir = "[A-Z]:/Documents and Settings/*/{Local Settings,LOCALS~1}/Temp"\r
+ WildDir = "[A-Z]:/Documents and Settings/*/{Local Settings,LOCALS~1}/Temporary Internet Files"\r
+\r
+ # Exclude directories full of lots and lots of useless little files\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/Cookies"\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/Recent"\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/{Local Settings,LOCALS~1}/History"\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/{Local Settings,LOCALS~1}/Temp"\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/{Local Settings,LOCALS~1}/Temporary Internet Files"\r
+\r
+ # Exclude directories full of lots and lots of useless little files\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/Cookies"\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/Recent"\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/{Local Settings,LOCALS~1}/History"\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/{Local Settings,LOCALS~1}/Temp"\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/{Local Settings,LOCALS~1}/Temporary Internet Files"\r
+\r
+ # Some random bits of Windows we want to ignore\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/Prefetch"\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/msdownld.tmp"\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/Internet Logs"\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/$Nt*Uninstall*"\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/Downloaded Installations"\r
+\r
+ # Temporary directories & files\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/Temp"\r
+ WildDir = "[A-Z]:/Temp"\r
+ WildFile = "*.tmp"\r
+ WildDir = "[A-Z]:/tmp"\r
+\r
+ # Fast Find\r
+ WildFile = "[A-Z]:/ffastun*"\r
+\r
+ # System Restore\r
+ WildDir = "[A-Z]:/System Volume Information"\r
+\r
+ # Windows Update\r
+ WildDir = "[A-Z]:/WUTemp"\r
+\r
+ # Recycle bins\r
+ WildDir = "[A-Z]:/RECYCLE[DR]"\r
+\r
+ # Swap files\r
+ WildFile = "[A-Z]:/pagefile.sys"\r
+ WildFile = "[A-Z]:/hiberfil.sys"\r
+\r
+ # These are programs and are easier to reinstall than restore from\r
+ # backup\r
+ WildDir = "[A-Z]:/cygwin"\r
+ WildDir = "[A-Z]:/{Program Files,PROGRA~1}/Java"\r
+ WildDir = "[A-Z]:/{Program Files,PROGRA~1}/Java Web Start"\r
+ WildDir = "[A-Z]:/{Program Files,PROGRA~1}/JavaSoft"\r
+ WildDir = "[A-Z]:/{Program Files,PROGRA~1}/Microsoft Office"\r
+ }\r
+\r
+ File = "C:/"\r
+ File = "D:/"\r
+ File = "E:/"\r
+ File = "F:/"\r
+ File = "G:/"\r
+ File = "H:/"\r
+ File = "I:/"\r
+ File = "J:/"\r
+ File = "K:/"\r
+ File = "L:/"\r
+ File = "M:/"\r
+ File = "N:/"\r
+ File = "O:/"\r
+ File = "P:/"\r
+ File = "Q:/"\r
+ File = "R:/"\r
+ File = "S:/"\r
+ File = "T:/"\r
+ File = "U:/"\r
+ File = "V:/"\r
+ File = "W:/"\r
+ File = "X:/"\r
+ File = "Y:/"\r
+ File = "Z:/"\r
+ }\r
+}\r
+\r
+#\r
+# When to do the backups, full backup on first sunday of the month,\r
+# differential (i.e. incremental since full) every other sunday,\r
+# and incremental backups other days\r
+Schedule {\r
+ Name = "WeeklyCycle"\r
+ Run = Full 1st sun at 23:05\r
+ Run = Differential 2nd-5th sun at 23:05\r
+ Run = Incremental mon-sat at 23:05\r
+}\r
+\r
+# This schedule does the catalog. It starts after the WeeklyCycle\r
+Schedule {\r
+ Name = "WeeklyCycleAfterBackup"\r
+ Run = Full sun-sat at 23:10\r
+}\r
+\r
+# This is the backup of the catalog\r
+FileSet {\r
+ Name = "Catalog"\r
+ Include {\r
+ Options {\r
+ signature = MD5\r
+ }\r
+ File = "@working_dir@\\bacula.sql"\r
+ }\r
+}\r
+\r
+# Client (File Services) to backup\r
+Client {\r
+ Name = @client_name@\r
+ Address = @client_address@\r
+ FDPort = @client_port@\r
+ Catalog = MyCatalog\r
+ Password = "@client_password@" # password for FileDaemon\r
+ File Retention = 30 days # 30 days\r
+ Job Retention = 6 months # six months\r
+ AutoPrune = yes # Prune expired Jobs/Files\r
+}\r
+\r
+#\r
+# Second Client (File Services) to backup\r
+# You should change Name, Address, and Password before using\r
+#\r
+#Client {\r
+# Name = @client_name@2\r
+# Address = @client_address@2\r
+# FDPort = @client_port@\r
+# Catalog = MyCatalog\r
+# Password = "@client_password@2" # password for FileDaemon 2\r
+# File Retention = 30 days # 30 days\r
+# Job Retention = 6 months # six months\r
+# AutoPrune = yes # Prune expired Jobs/Files\r
+#}\r
+\r
+\r
+# Definition of file storage device\r
+Storage {\r
+ Name = File\r
+# Do not use "localhost" here\r
+ Address = @storage_address@ # N.B. Use a fully qualified name here\r
+ SDPort = @storage_port@\r
+ Password = "@storage_password@"\r
+ Device = FileStorage\r
+ Media Type = File\r
+}\r
+\r
+\r
+\r
+# Definition of DDS tape storage device\r
+#Storage {\r
+# Name = DDS-4 \r
+# Do not use "localhost" here\r
+# Address = @storage_address@ # N.B. Use a fully qualified name here\r
+# SDPort = @storage_port@\r
+# Password = "@storage_password@" # password for Storage daemon\r
+# Device = DDS-4 # must be same as Device in Storage daemon\r
+# Media Type = DDS-4 # must be same as MediaType in Storage daemon\r
+# Autochanger = yes # enable for autochanger device\r
+#}\r
+\r
+# Definition of 8mm tape storage device\r
+#Storage {\r
+# Name = "8mmDrive"\r
+# Do not use "localhost" here\r
+# Address = @storage_address@ # N.B. Use a fully qualified name here\r
+# SDPort = @storage_port@\r
+# Password = "@storage_password@"\r
+# Device = "Exabyte 8mm"\r
+# MediaType = "8mm"\r
+#}\r
+\r
+\r
+# Generic catalog service\r
+Catalog {\r
+ Name = MyCatalog\r
+ dbname = bacula; user = bacula; password = ""\r
+}\r
+\r
+# Reasonable message delivery -- send most everything to email address\r
+# and to the console\r
+Messages {\r
+ Name = Standard\r
+#\r
+# NOTE! If you send to two email or more email addresses, you will need\r
+# to replace the %r in the from field (-f part) with a single valid\r
+# email address in both the mailcommand and the operatorcommand.\r
+#\r
+ mailcommand = "\"@bin_dir@\\bsmtp\" -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula: %t %e of %c %l\" %r"\r
+ operatorcommand = "\"@bin_dir@\\bsmtp\" -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula: Intervention needed for %j\" %r"\r
+ mail = @job_email@ = all, !skipped \r
+ operator = @job_email@ = mount\r
+ console = all, !skipped, !saved\r
+#\r
+# WARNING! the following will create a file that you must cycle from\r
+# time to time as it will grow indefinitely. However, it will\r
+# also keep all your messages if they scroll off the console.\r
+#\r
+ append = "@working_dir@\\log" = all, !skipped\r
+}\r
+\r
+\r
+#\r
+# Message delivery for daemon messages (no job).\r
+Messages {\r
+ Name = Daemon\r
+ mailcommand = "\"@bin_dir@\\bsmtp\" -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula daemon message\" %r"\r
+ mail = @job_email@ = all, !skipped \r
+ console = all, !skipped, !saved\r
+ append = "@working_dir@\\log" = all, !skipped\r
+}\r
+\r
+\r
+\r
+# Default pool definition\r
+Pool {\r
+ Name = Default\r
+ Pool Type = Backup\r
+ Recycle = yes # Bacula can automatically recycle Volumes\r
+ AutoPrune = yes # Prune expired volumes\r
+ Volume Retention = 365 days # one year\r
+}\r
+\r
+# Scratch pool definition\r
+Pool {\r
+ Name = Scratch\r
+ Pool Type = Backup\r
+}\r
+\r
+#\r
+# Restricted console used by tray-monitor to get the status of the director\r
+#\r
+Console {\r
+ Name = @monitor_name@\r
+ Password = "@monitor_password@"\r
+ CommandACL = status, .status\r
+}\r
--- /dev/null
+#\r
+# Default Bacula File Daemon Configuration file\r
+#\r
+# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ @DISTVER@\r
+#\r
+# There is not much to change here except perhaps the\r
+# File daemon Name\r
+#\r
+\r
+#\r
+# "Global" File daemon configuration specifications\r
+#\r
+FileDaemon { # this is me\r
+ Name = @client_name@\r
+ FDport = @client_port@ # where we listen for the director\r
+ WorkingDirectory = "@working_dir@"\r
+ Pid Directory = "@working_dir@"\r
+ #Plugin Directory = "@fdplugins_dir@"\r
+ Maximum Concurrent Jobs = @client_maxjobs@\r
+}\r
+\r
+#\r
+# List Directors who are permitted to contact this File daemon\r
+#\r
+Director {\r
+ Name = @director_name@\r
+ Password = "@client_password@"\r
+}\r
+\r
+#\r
+# Restricted Director, used by tray-monitor to get the\r
+# status of the file daemon\r
+#\r
+Director {\r
+ Name = @monitor_name@\r
+ Password = "@monitor_password@"\r
+ Monitor = yes\r
+}\r
+\r
+# Send all messages except skipped files back to Director\r
+Messages {\r
+ Name = Standard\r
+ director = @director_name@ = all, !skipped, !restored\r
+}\r
--- /dev/null
+#\r
+# Default Bacula Storage Daemon Configuration file\r
+#\r
+# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ @DISTVER@\r
+#\r
+# You may need to change the name of your tape drive\r
+# on the "Archive Device" directive in the Device\r
+# resource. If you change the Name and/or the \r
+# "Media Type" in the Device resource, please ensure\r
+# that bacula-dir.conf has corresponding changes.\r
+#\r
+\r
+Storage { # definition of myself\r
+ Name = @storage_name@\r
+ SDPort = @storage_port@ # Director's port \r
+ WorkingDirectory = "@working_dir@"\r
+ Pid Directory = "@working_dir@"\r
+ Maximum Concurrent Jobs = @storage_maxjobs@\r
+}\r
+\r
+#\r
+# List Directors who are permitted to contact Storage daemon\r
+#\r
+Director {\r
+ Name = @director_name@\r
+ Password = "@storage_password@"\r
+}\r
+\r
+#\r
+# Restricted Director, used by tray-monitor to get the\r
+# status of the storage daemon\r
+#\r
+Director {\r
+ Name = @monitor_name@\r
+ Password = "@monitor_password@"\r
+ Monitor = yes\r
+}\r
+\r
+#\r
+# Devices supported by this Storage daemon\r
+# To connect, the Director's bacula-dir.conf must have the\r
+# same Name and MediaType. \r
+#\r
+\r
+Device {\r
+ Name = FileStorage\r
+ Media Type = File\r
+ Archive Device = "C:\\Tmp"\r
+ LabelMedia = yes # lets Bacula label unlabeled media\r
+ Random Access = Yes\r
+ AutomaticMount = yes # when device opened, read it\r
+ RemovableMedia = no\r
+ AlwaysOpen = no\r
+}\r
+\r
+#\r
+# An autochanger device with two drives\r
+#\r
+#Autochanger {\r
+# Name = Autochanger\r
+# Device = Drive-1\r
+# Device = Drive-2\r
+# Changer Command = "mtx-changer %c %o %S %a %d"\r
+# Changer Device = Changer0\r
+#}\r
+\r
+#Device {\r
+# Name = Drive-1 #\r
+# Drive Index = 0\r
+# Media Type = DLT-8000\r
+# Device Type = Tape\r
+# Archive Device = Tape0\r
+# AutomaticMount = yes # when device opened, read it\r
+# AlwaysOpen = yes\r
+# RemovableMedia = yes\r
+# RandomAccess = no\r
+# AutoChanger = yes\r
+# Alert Command = "tapeinfo -f %c | findstr TapeAlert"\r
+#}\r
+\r
+#Device {\r
+# Name = Drive-2 #\r
+# Drive Index = 1\r
+# Media Type = DLT-8000\r
+# Device Type = Tape\r
+# Archive Device = Tape1\r
+# AutomaticMount = yes # when device opened, read it\r
+# AlwaysOpen = yes\r
+# RemovableMedia = yes\r
+# RandomAccess = no\r
+# AutoChanger = yes\r
+# Alert Command = "tapeinfo -f %c | findstr TapeAlert"\r
+#}\r
+\r
+#\r
+#Device {\r
+# Name = DDS-4 # \r
+# Media Type = DDS-4\r
+# Device Type = Tape\r
+# Archive Device = Tape0\r
+# AutomaticMount = yes # when device opened, read it\r
+# AlwaysOpen = yes\r
+# RemovableMedia = yes\r
+# RandomAccess = no\r
+# Alert Command = "tapeinfo -f %c | findstr TapeAlert"\r
+#}\r
+\r
+# \r
+# Send all messages to the Director, \r
+# mount messages also are sent to the email address\r
+#\r
+Messages {\r
+ Name = Standard\r
+ director = @director_name@ = all\r
+}\r
--- /dev/null
+#\r
+# Bacula User Agent (or Console) Configuration File\r
+#\r
+\r
+Director {\r
+ Name = @director_name@\r
+ DIRport = @director_port@\r
+ address = @director_address@\r
+ Password = "@director_password@"\r
+}\r
--- /dev/null
+@ECHO OFF\r
+SETLOCAL\r
+\r
+SET CWD=%CD%\r
+CD %1..\..\..\r
+SET TOP_DIR=%CD%\r
+CD %CWD%\r
+SET DEPKG_DIR=%TOP_DIR%\depkgs-msvc\r
+SET DOCS_DIR=%TOP_DIR%\docs\manual\r
+\r
+SET BACULA_DLLS=bacula.dll cats_mysql.dll cats_postgresql.dll cats_sqlite3.dll\r
+SET BACULA_EXES=bacula-dir.exe bacula-fd.exe bacula-sd.exe bconsole.exe wx-console.exe\r
+SET BACULA_TOOLS=bcopy.exe bextract.exe bls.exe bscan.exe bsleep.exe bsmtp.exe btape.exe dbcheck.exe scsilist.exe\r
+\r
+SET DEP_DLLS=libeay32.dll pthreadVCE.dll ssleay32.dll zlib1.dll zlib1.dll.manifest wxbase28_vc_bacula.dll wxmsw28_core_vc_bacula.dll libmysql.dll libpq.dll comerr32.dll libintl-2.dll libiconv-2.dll krb5_32.dll\r
+SET DEP_EXES=openssl.exe loaderinfo.exe mt.exe mtx.exe scsitape.exe sed.exe tapeinfo.exe sqlite3.exe sqlite3.exe.manifest expr64.exe snooze.exe mkisofs.exe growisofs.exe dvd-ram-control.exe dvd+rw-booktype.exe dvd+rw-format.exe dvd+rw-mediainfo.exe\r
+\r
+SET SCRIPTS=mtx-changer.cmd disk-changer.cmd dvd-handler.cmd\r
+\r
+SET CATS_MYSQL_CMD=create_mysql_database.cmd drop_mysql_database.cmd make_mysql_tables.cmd drop_mysql_tables.cmd grant_mysql_privileges.cmd\r
+SET CATS_MYSQL_SQL=make_mysql_tables.sql drop_mysql_tables.sql grant_mysql_privileges.sql\r
+SET CATS_PGSQL_CMD=create_postgresql_database.cmd drop_postgresql_database.cmd make_postgresql_tables.cmd drop_postgresql_tables.cmd grant_postgresql_privileges.cmd\r
+SET CATS_PGSQL_SQL=create_postgresql_database.sql make_postgresql_tables.sql drop_postgresql_tables.sql grant_postgresql_privileges.sql\r
+SET CATS_SQLITE_CMD=create_sqlite3_database.cmd drop_sqlite3_database.cmd make_sqlite3_tables.cmd drop_sqlite3_tables.cmd grant_sqlite3_privileges.cmd\r
+SET CATS_SQLITE_SQL=make_sqlite3_tables.sql\r
+SET CATS_CATALOG=make_mysql_catalog_backup.cmd make_postgresql_catalog_backup.cmd make_sqlite3_catalog_backup.cmd delete_catalog_backup.cmd\r
+SET DIRD_FILES=query.sql\r
+SET SSL_FILES=openssl.cnf\r
+\r
+SET DOC_PDF_FILES=%DOCS_DIR%\bacula.pdf %DOCS_DIR%\bacula\*.html %DOCS_DIR%\bacula\*.png %DOCS_DIR%\bacula\*.css\r
+SET DOC_HTML_FILES=%DOCS_DIR%\bacula\*.html %DOCS_DIR%\bacula\*.png %DOCS_DIR%\bacula\*.css\r
+\r
+FOR %%i in ( %BACULA_DLLS% ) DO XCOPY %1%2\%%i %1installer\%2\ /y\r
+FOR %%i in ( %BACULA_EXES% ) DO XCOPY %1%2\%%i %1installer\%2\ /y\r
+FOR %%i in ( %BACULA_TOOLS% ) DO XCOPY %1%2\%%i %1installer\%2\ /y\r
+\r
+FOR %%i in ( %DEP_DLLS% ) DO XCOPY %DEPKG_DIR%\bin\%%i %1installer\%2\ /y\r
+FOR %%i in ( %DEP_EXES% ) DO XCOPY %DEPKG_DIR%\bin\%%i %1installer\%2\ /y\r
+\r
+FOR %%i in ( %SCRIPTS% ) DO XCOPY %1scripts\%%i %1installer\%2\ /y\r
+FOR %%i in ( %CATS_MYSQL_CMD% ) DO XCOPY %1cats\%%i %1installer\%2\ /y\r
+FOR %%i in ( %CATS_MYSQL_SQL% ) DO XCOPY %1cats\%%i %1installer\%2\ /y\r
+FOR %%i in ( %CATS_PGSQL_CMD% ) DO XCOPY %1cats\%%i %1installer\%2\ /y\r
+FOR %%i in ( %CATS_PGSQL_SQL% ) DO XCOPY %1cats\%%i %1installer\%2\ /y\r
+FOR %%i in ( %CATS_SQLITE_CMD% ) DO XCOPY %1cats\%%i %1installer\%2\ /y\r
+FOR %%i in ( %CATS_SQLITE_SQL% ) DO XCOPY %1cats\%%i %1installer\%2\ /y\r
+\r
+FOR %%i in ( %CATS_CATALOG% ) DO XCOPY %1cats\%%i %1installer\%2\ /y\r
+\r
+FOR %%i in ( %DIRD_FILES% ) DO XCOPY %1..\dird\%%i %1installer\%2\ /y\r
+FOR %%i in ( %SSL_FILES% ) DO XCOPY %DEPKG_DIR%\%%i %1installer\%2\ /y\r
+\r
+FOR %%i in ( %DOC_PDF_FILES% ) DO XCOPY %%i %1installer\%2\manual\ /y\r
+\r
+FOR %%i in ( %DOC_HTML_FILES% ) DO XCOPY %%i %1installer\%2\manual\bacula\ /y\r
+\r
+XCOPY %4\x86\Microsoft.VC80.CRT\msvcm80.dll %1installer\%2\ /y\r
+XCOPY %4\x86\Microsoft.VC80.CRT\msvcp80.dll %1installer\%2\ /y\r
+XCOPY %4\x86\Microsoft.VC80.CRT\msvcr80.dll %1installer\%2\ /y\r
+XCOPY %4\x86\Microsoft.VC80.CRT\Microsoft.VC80.CRT.manifest %1installer\%2\ /y\r
+XCOPY %4\Debug_NonRedist\x86\Microsoft.VC80.DebugCRT\msvcm80d.dll %1installer\%2\ /y\r
+XCOPY %4\Debug_NonRedist\x86\Microsoft.VC80.DebugCRT\msvcp80d.dll %1installer\%2\ /y\r
+XCOPY %4\Debug_NonRedist\x86\Microsoft.VC80.DebugCRT\msvcr80d.dll %1installer\%2\ /y\r
+XCOPY %4\Debug_NonRedist\x86\Microsoft.VC80.DebugCRT\Microsoft.VC80.DebugCRT.manifest %1installer\%2\ /y\r
+\r
+PATH %DEPKG_DIR%\nsis;%DEPKG_DIR%\tools;%PATH%\r
+\r
+FOR /F %%i IN ( 'sed -ne "s/.*[ \t]VERSION[ \t][ \t]*\x22\(.*\)\x22/\1/p" ^< ..\..\version.h' ) DO @SET VERSION=%%i \r
+makensis /V3 /DVERSION=%VERSION% /DSRC_DIR=%1installer\%2 /DOUT_DIR=%1%2 /DBUILD_TOOLS=%3 winbacula.nsi\r
+EXIT /B %ERRORLEVEL%\r
--- /dev/null
+#\r
+# Bacula User Agent (or Console) Configuration File\r
+#\r
+\r
+Director {\r
+ Name = @director_name@\r
+ DIRport = @director_port@\r
+ address = @director_address@\r
+ Password = "@director_password@"\r
+}\r
--- /dev/null
+# Client (File Services) to backup\r
+Client {\r
+ Name = @client_name@\r
+ Address = @client_address@\r
+ FDPort = @client_port@\r
+ Catalog = MyCatalog\r
+ Password = "@client_password@" # password for FileDaemon\r
+ File Retention = 30 days # 30 days\r
+ Job Retention = 6 months # six months\r
+ AutoPrune = yes # Prune expired Jobs/Files\r
+}\r
--- /dev/null
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+ ProjectType="Visual C++"\r
+ Version="8.00"\r
+ Name="installer"\r
+ ProjectGUID="{6D1B0964-FB32-4916-A61C-49D7F715EAD8}"\r
+ RootNamespace="installer"\r
+ >\r
+ <Platforms>\r
+ <Platform\r
+ Name="Win32"\r
+ />\r
+ </Platforms>\r
+ <ToolFiles>\r
+ </ToolFiles>\r
+ <Configurations>\r
+ <Configuration\r
+ Name="Debug|Win32"\r
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
+ IntermediateDirectory="$(ConfigurationName)"\r
+ ConfigurationType="0"\r
+ >\r
+ <Tool\r
+ Name="VCNMakeTool"\r
+ BuildCommandLine="build-installer $(SolutionDir) $(ConfigurationName) VC8_DEBUG "$(VCInstallDir)redist"
"\r
+ ReBuildCommandLine="del $(SolutionDir)$(ConfigurationName)\winbacula-*.exe
build-installer $(SolutionDir) $(ConfigurationName) VC8_DEBUG "$(VCInstallDir)redist"
"\r
+ CleanCommandLine="del $(SolutionDir)$(ConfigurationName)\winbacula-*.exe"\r
+ Output=""\r
+ PreprocessorDefinitions="VERSION=$(VERSION);DOC_DIR=..\..\..\..\docs;BUILD_TOOLS=VC8_DEBUG;VC_REDIST_DIR=$(VCInstallDir)redist\Debug_NonRedist\x86\Microsoft.VC80.DebugCRT;DEPKGS_BIN=..\..\..\..\depkgs-msvc\bin;BACULA_BIN=..\$(ConfigurationName);CATS_DIR=..\cats;SCRIPT_DIR=..\scripts"\r
+ IncludeSearchPath=""\r
+ ForcedIncludes=""\r
+ AssemblySearchPath=""\r
+ ForcedUsingAssemblies=""\r
+ CompileAsManaged=""\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Release|Win32"\r
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
+ IntermediateDirectory="$(ConfigurationName)"\r
+ ConfigurationType="0"\r
+ >\r
+ <Tool\r
+ Name="VCNMakeTool"\r
+ BuildCommandLine="build-installer $(SolutionDir) $(ConfigurationName) VC8 "$(VCInstallDir)redist"
"\r
+ ReBuildCommandLine="del $(SolutionDir)$(ConfigurationName)\winbacula-*.exe
build-installer $(SolutionDir) $(ConfigurationName) VC8 "$(VCInstallDir)redist"
"\r
+ CleanCommandLine="del $(SolutionDir)$(ConfigurationName)\winbacula-*.exe"\r
+ Output=""\r
+ PreprocessorDefinitions=""\r
+ IncludeSearchPath=""\r
+ ForcedIncludes=""\r
+ AssemblySearchPath=""\r
+ ForcedUsingAssemblies=""\r
+ CompileAsManaged=""\r
+ />\r
+ </Configuration>\r
+ </Configurations>\r
+ <References>\r
+ </References>\r
+ <Files>\r
+ <Filter\r
+ Name="Source Files"\r
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
+ >\r
+ </Filter>\r
+ <Filter\r
+ Name="Header Files"\r
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
+ >\r
+ <File\r
+ RelativePath=".\resource.h"\r
+ >\r
+ </File>\r
+ </Filter>\r
+ <Filter\r
+ Name="Resource Files"\r
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
+ >\r
+ <File\r
+ RelativePath=".\Dialogs.rc"\r
+ >\r
+ </File>\r
+ </Filter>\r
+ <File\r
+ RelativePath=".\bacula-dir.conf.in"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\bacula-fd.conf.in"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\bacula-sd.conf.in"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\bconsole.conf.in"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\build-installer.cmd"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\client.conf.in"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\ConfigPage1.nsh"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\ConfigPage2.nsh"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\DumpLog.nsh"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\InstallType.ini"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\InstallType.nsh"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\Readme.txt"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\storage.conf.in"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\winbacula.nsi"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\WriteTemplates.ini"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\wx-console.conf.in"\r
+ >\r
+ </File>\r
+ </Files>\r
+ <Globals>\r
+ </Globals>\r
+</VisualStudioProject>\r
--- /dev/null
+# Definition of file storage device\r
+Storage {\r
+ Name = File\r
+# Do not use "localhost" here \r
+ Address = @storage_address@ # N.B. Use a fully qualified name here\r
+ SDPort = @storage_port@\r
+ Password = "@storage_password@"\r
+ Device = FileStorage\r
+ Media Type = File\r
+}\r
--- /dev/null
+; winbacula.nsi\r
+;\r
+; Began as a version written by Michel Meyers (michel@tcnnet.dyndns.org)\r
+;\r
+; Adapted by Kern Sibbald for native Win32 Bacula\r
+; added a number of elements from Christopher Hull's installer\r
+;\r
+; D. Scott Barninger Nov 13 2004\r
+; added configuration editing for bconsole.conf and bwx-console.conf\r
+; better explanation in dialog boxes for editing config files\r
+; added Start Menu items\r
+; fix uninstall of config files to do all not just bacula-fd.conf\r
+;\r
+; D. Scott Barninger Dec 05 2004\r
+; added specification of default permissions for bacula-fd.conf\r
+; - thanks to Jamie Ffolliott for pointing me at cacls\r
+; added removal of working-dir files if user selects to remove config\r
+; uninstall is now 100% clean\r
+;\r
+; D. Scott Barninger Apr 17 2005\r
+; 1.36.3 release docs update\r
+; add pdf manual and menu shortcut\r
+;\r
+; Robert Nelson May 15 2006\r
+; Added server installs and implemented Microsoft install locations\r
+; Use LogicLib.nsh\r
+; Added Bacula-SD and Bacula-DIR\r
+; Replaced ParameterGiven with standard GetOptions\r
+;\r
+; Version $Id$\r
+;\r
+; Command line options:\r
+;\r
+; /service - \r
+; /start\r
+;\r
+; netsh firewall add portopening protocol=tcp port=9102 name="Bacula-FD"\r
+\r
+\r
+!define PRODUCT "Bacula"\r
+\r
+;\r
+; Include the Modern UI\r
+;\r
+\r
+!include "MUI.nsh"\r
+!include "LogicLib.nsh"\r
+!include "FileFunc.nsh"\r
+!include "Sections.nsh"\r
+!include "StrFunc.nsh"\r
+!include "WinMessages.nsh"\r
+;\r
+; Basics\r
+;\r
+Name "Bacula"\r
+OutFile "${OUT_DIR}\winbacula-${VERSION}.exe"\r
+SetCompressor lzma\r
+InstallDir "$PROGRAMFILES\Bacula"\r
+InstallDirRegKey HKLM "Software\Bacula" "InstallLocation"\r
+\r
+InstType "Client"\r
+InstType "Server"\r
+InstType "Full"\r
+\r
+!insertmacro GetParent\r
+\r
+${StrCase}\r
+${StrRep}\r
+${StrTok}\r
+${StrTrimNewLines}\r
+\r
+;\r
+; Pull in pages\r
+;\r
+\r
+!define MUI_COMPONENTSPAGE_SMALLDESC\r
+\r
+!define MUI_HEADERIMAGE\r
+!define MUI_BGCOLOR 739AB9\r
+!define MUI_HEADERIMAGE_BITMAP "bacula-logo.bmp"\r
+\r
+!InsertMacro MUI_PAGE_WELCOME\r
+!InsertMacro MUI_PAGE_LICENSE "..\..\..\LICENSE"\r
+Page custom EnterInstallType\r
+!define MUI_PAGE_CUSTOMFUNCTION_SHOW PageComponentsShow\r
+!InsertMacro MUI_PAGE_COMPONENTS\r
+!define MUI_PAGE_CUSTOMFUNCTION_PRE PageDirectoryPre\r
+!InsertMacro MUI_PAGE_DIRECTORY\r
+Page custom EnterConfigPage1 LeaveConfigPage1\r
+Page custom EnterConfigPage2 LeaveConfigPage2\r
+!Define MUI_PAGE_CUSTOMFUNCTION_LEAVE LeaveInstallPage\r
+!InsertMacro MUI_PAGE_INSTFILES\r
+Page custom EnterWriteTemplates\r
+!Define MUI_FINISHPAGE_SHOWREADME $INSTDIR\Readme.txt\r
+!InsertMacro MUI_PAGE_FINISH\r
+\r
+!InsertMacro MUI_UNPAGE_WELCOME\r
+!InsertMacro MUI_UNPAGE_CONFIRM\r
+!InsertMacro MUI_UNPAGE_INSTFILES\r
+!InsertMacro MUI_UNPAGE_FINISH\r
+\r
+!define MUI_ABORTWARNING\r
+\r
+!InsertMacro MUI_LANGUAGE "English"\r
+\r
+!InsertMacro GetParameters\r
+!InsertMacro GetOptions\r
+\r
+DirText "Setup will install Bacula ${VERSION} to the directory specified below. To install in a different folder, click Browse and select another folder."\r
+\r
+!InsertMacro MUI_RESERVEFILE_INSTALLOPTIONS\r
+;\r
+; Global Variables\r
+;\r
+Var OptService\r
+Var OptStart\r
+Var OptSilent\r
+\r
+Var CommonFilesDone\r
+\r
+Var OsIsNT\r
+\r
+Var HostName\r
+\r
+Var ConfigClientName\r
+Var ConfigClientPort\r
+Var ConfigClientMaxJobs\r
+Var ConfigClientPassword\r
+Var ConfigClientInstallService\r
+Var ConfigClientStartService\r
+\r
+Var ConfigStorageName\r
+Var ConfigStoragePort\r
+Var ConfigStorageMaxJobs\r
+Var ConfigStoragePassword\r
+Var ConfigStorageInstallService\r
+Var ConfigStorageStartService\r
+\r
+Var ConfigDirectorName\r
+Var ConfigDirectorPort\r
+Var ConfigDirectorMaxJobs\r
+Var ConfigDirectorPassword\r
+Var ConfigDirectorAddress\r
+Var ConfigDirectorMailServer\r
+Var ConfigDirectorMailAddress\r
+Var ConfigDirectorDB\r
+Var ConfigDirectorInstallService\r
+Var ConfigDirectorStartService\r
+\r
+Var ConfigMonitorName\r
+Var ConfigMonitorPassword\r
+\r
+Var LocalDirectorPassword\r
+Var LocalHostAddress\r
+\r
+Var MySQLPath\r
+Var MySQLVersion\r
+Var PostgreSQLPath\r
+Var PostgreSQLVersion\r
+\r
+Var AutomaticInstall\r
+Var InstallType\r
+!define NewInstall 0\r
+!define UpgradeInstall 1\r
+!define MigrateInstall 2\r
+\r
+Var OldInstallDir\r
+Var PreviousComponents\r
+Var NewComponents\r
+\r
+; Bit 0 = File Service\r
+; 1 = Storage Service\r
+; 2 = Director Service\r
+; 3 = Command Console\r
+; 4 = Graphical Console\r
+; 5 = Documentation (PDF)\r
+; 6 = Documentation (HTML)\r
+\r
+!define ComponentFile 1\r
+!define ComponentStorage 2\r
+!define ComponentDirector 4\r
+!define ComponentTextConsole 8\r
+!define ComponentGUIConsole 16\r
+!define ComponentPDFDocs 32\r
+!define ComponentHTMLDocs 64\r
+\r
+!define ComponentsRequiringUserConfig 31\r
+!define ComponentsFileAndStorage 3\r
+!define ComponentsFileAndStorageAndDirector 7\r
+!define ComponentsDirectorAndTextGuiConsoles 28\r
+!define ComponentsTextAndGuiConsoles 24\r
+\r
+Var HDLG\r
+Var HCTL\r
+\r
+Function .onInit\r
+ Push $R0\r
+ Push $R1\r
+\r
+ ; Process Command Line Options\r
+ StrCpy $OptService 1\r
+ StrCpy $OptStart 1\r
+ StrCpy $OptSilent 0\r
+ StrCpy $CommonFilesDone 0\r
+ StrCpy $OsIsNT 0\r
+ StrCpy $AutomaticInstall 0\r
+ StrCpy $InstallType ${NewInstall}\r
+ StrCpy $OldInstallDir ""\r
+ StrCpy $PreviousComponents 0\r
+ StrCpy $NewComponents 0\r
+ StrCpy $MySQLPath ""\r
+ StrCpy $MySQLVersion ""\r
+ StrCpy $PostgreSQLPath ""\r
+ StrCpy $PostgreSQLVersion ""\r
+\r
+ ${GetParameters} $R0\r
+\r
+ ClearErrors\r
+ ${GetOptions} $R0 "/noservice" $R1\r
+ IfErrors +2\r
+ StrCpy $OptService 0\r
+\r
+ ClearErrors\r
+ ${GetOptions} $R0 "/nostart" $R1\r
+ IfErrors +2\r
+ StrCpy $OptStart 0\r
+\r
+ IfSilent 0 +2\r
+ StrCpy $OptSilent 1\r
+\r
+ ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion\r
+ ${If} $R0 != ""\r
+ StrCpy $OsIsNT 1\r
+ ${EndIf}\r
+\r
+ Call GetComputerName\r
+ Pop $HostName\r
+\r
+ Call GetHostName\r
+ Pop $LocalHostAddress\r
+\r
+ Call GetUserName\r
+ Pop $ConfigDirectorMailAddress\r
+\r
+ Call FindDatabaseApps\r
+\r
+ ; Configuration Defaults\r
+\r
+ StrCpy $ConfigClientName "$HostName-fd"\r
+ StrCpy $ConfigClientPort 9102\r
+ StrCpy $ConfigClientMaxJobs 2\r
+ ;StrCpy $ConfigClientPassword\r
+ StrCpy $ConfigClientInstallService "$OptService"\r
+ StrCpy $ConfigClientStartService "$OptStart"\r
+\r
+ StrCpy $ConfigStorageName "$HostName-sd"\r
+ StrCpy $ConfigStoragePort 9103\r
+ StrCpy $ConfigStorageMaxJobs 10\r
+ ;StrCpy $ConfigStoragePassword\r
+ StrCpy $ConfigStorageInstallService "$OptService"\r
+ StrCpy $ConfigStorageStartService "$OptStart"\r
+\r
+ ;StrCpy $ConfigDirectorName "$HostName-dir"\r
+ StrCpy $ConfigDirectorPort 9101\r
+ StrCpy $ConfigDirectorMaxJobs 1\r
+ ;StrCpy $ConfigDirectorPassword\r
+ StrCpy $ConfigDirectorDB 0\r
+ StrCpy $ConfigDirectorInstallService "$OptService"\r
+ StrCpy $ConfigDirectorStartService "$OptStart"\r
+\r
+ StrCpy $ConfigMonitorName "$HostName-mon"\r
+ ;StrCpy $ConfigMonitorPassword\r
+\r
+ InitPluginsDir\r
+ File "/oname=$PLUGINSDIR\openssl.exe" "${SRC_DIR}\openssl.exe"\r
+ File "/oname=$PLUGINSDIR\libeay32.dll" "${SRC_DIR}\libeay32.dll"\r
+ File "/oname=$PLUGINSDIR\ssleay32.dll" "${SRC_DIR}\ssleay32.dll"\r
+ File "/oname=$PLUGINSDIR\sed.exe" "${SRC_DIR}\sed.exe"\r
+\r
+ !InsertMacro MUI_INSTALLOPTIONS_EXTRACT "InstallType.ini"\r
+ !InsertMacro MUI_INSTALLOPTIONS_EXTRACT "WriteTemplates.ini"\r
+\r
+ SetPluginUnload alwaysoff\r
+\r
+ nsExec::Exec '"$PLUGINSDIR\openssl.exe" rand -base64 -out $PLUGINSDIR\pw.txt 33'\r
+ pop $R0\r
+ ${If} $R0 = 0\r
+ FileOpen $R1 "$PLUGINSDIR\pw.txt" r\r
+ IfErrors +4\r
+ FileRead $R1 $R0\r
+ ${StrTrimNewLines} $ConfigClientPassword $R0\r
+ FileClose $R1\r
+ ${EndIf}\r
+\r
+ nsExec::Exec '"$PLUGINSDIR\openssl.exe" rand -base64 -out $PLUGINSDIR\pw.txt 33'\r
+ pop $R0\r
+ ${If} $R0 = 0\r
+ FileOpen $R1 "$PLUGINSDIR\pw.txt" r\r
+ IfErrors +4\r
+ FileRead $R1 $R0\r
+ ${StrTrimNewLines} $ConfigStoragePassword $R0\r
+ FileClose $R1\r
+ ${EndIf}\r
+\r
+ nsExec::Exec '"$PLUGINSDIR\openssl.exe" rand -base64 -out $PLUGINSDIR\pw.txt 33'\r
+ pop $R0\r
+ ${If} $R0 = 0\r
+ FileOpen $R1 "$PLUGINSDIR\pw.txt" r\r
+ IfErrors +4\r
+ FileRead $R1 $R0\r
+ ${StrTrimNewLines} $LocalDirectorPassword $R0\r
+ FileClose $R1\r
+ ${EndIf}\r
+\r
+ SetPluginUnload manual\r
+\r
+ nsExec::Exec '"$PLUGINSDIR\openssl.exe" rand -base64 -out $PLUGINSDIR\pw.txt 33'\r
+ pop $R0\r
+ ${If} $R0 = 0\r
+ FileOpen $R1 "$PLUGINSDIR\pw.txt" r\r
+ IfErrors +4\r
+ FileRead $R1 $R0\r
+ ${StrTrimNewLines} $ConfigMonitorPassword $R0\r
+ FileClose $R1\r
+ ${EndIf}\r
+\r
+ Pop $R1\r
+ Pop $R0\r
+FunctionEnd\r
+\r
+Function .onSelChange\r
+ Call UpdateComponentUI\r
+FunctionEnd\r
+\r
+Function InstallCommonFiles\r
+ ${If} $CommonFilesDone = 0\r
+ SetOutPath "$INSTDIR"\r
+ File "Readme.txt"\r
+\r
+ SetOutPath "$INSTDIR\bin"\r
+!if "${BUILD_TOOLS}" == "VC8"\r
+ File "${SRC_DIR}\msvcm80.dll"\r
+ File "${SRC_DIR}\msvcp80.dll"\r
+ File "${SRC_DIR}\msvcr80.dll"\r
+ File "${SRC_DIR}\Microsoft.VC80.CRT.manifest"\r
+ File "${SRC_DIR}\pthreadVCE.dll"\r
+!endif\r
+!if "${BUILD_TOOLS}" == "VC8_DEBUG"\r
+ File "${SRC_DIR}\msvcm80.dll"\r
+ File "${SRC_DIR}\msvcp80.dll"\r
+ File "${SRC_DIR}\msvcr80.dll"\r
+ File "${SRC_DIR}\Microsoft.VC80.CRT.manifest"\r
+ File "${SRC_DIR}\msvcm80d.dll"\r
+ File "${SRC_DIR}\msvcp80d.dll"\r
+ File "${SRC_DIR}\msvcr80d.dll"\r
+ File "${SRC_DIR}\Microsoft.VC80.DebugCRT.manifest"\r
+ File "${SRC_DIR}\pthreadVCE.dll"\r
+!endif\r
+!if "${BUILD_TOOLS}" == "MinGW"\r
+ File "${SRC_DIR}\mingwm10.dll"\r
+ File "${SRC_DIR}\pthreadGCE.dll"\r
+!endif\r
+ File "${SRC_DIR}\libeay32.dll"\r
+ File "${SRC_DIR}\ssleay32.dll"\r
+ File "${SRC_DIR}\zlib1.dll"\r
+!if "${BUILD_TOOLS}" == "VC8"\r
+ File "${SRC_DIR}\zlib1.dll.manifest"\r
+!endif\r
+!If "${BUILD_TOOLS}" == "VC8_DEBUG"\r
+ File "${SRC_DIR}\zlib1.dll.manifest"\r
+!endif\r
+ File "/oname=$INSTDIR\openssl.cnf" "${SRC_DIR}\openssl.cnf"\r
+ File "${SRC_DIR}\openssl.exe"\r
+ File "${SRC_DIR}\bsleep.exe"\r
+ File "${SRC_DIR}\bsmtp.exe"\r
+ File "${SRC_DIR}\bacula.dll"\r
+ File "${SRC_DIR}\expr64.exe"\r
+ File "${SRC_DIR}\snooze.exe"\r
+\r
+ CreateShortCut "$SMPROGRAMS\Bacula\Documentation\View Readme.lnk" "write.exe" '"$INSTDIR\Readme.txt"'\r
+\r
+ StrCpy $CommonFilesDone 1\r
+ ${EndIf}\r
+FunctionEnd\r
+\r
+Section "-Initialize"\r
+ ${If} $MySQLPath != ""\r
+ DetailPrint "Found MySQL (version $MySQLVersion)"\r
+ ${EndIf}\r
+ ${If} $PostgreSQLPath != ""\r
+ DetailPrint "Found PostgreSQL (version $PostgreSQLVersion)"\r
+ ${EndIf}\r
+\r
+ WriteRegStr HKLM Software\Bacula InstallLocation "$INSTDIR"\r
+\r
+ Call GetSelectedComponents\r
+ Pop $R2\r
+ WriteRegDWORD HKLM Software\Bacula Components $R2\r
+\r
+ WriteRegDWORD HKLM Software\Bacula Database $ConfigDirectorDB\r
+\r
+ ; remove start menu items\r
+ SetShellVarContext all\r
+\r
+ Delete /REBOOTOK "$SMPROGRAMS\Bacula\Configuration\*"\r
+ Delete /REBOOTOK "$SMPROGRAMS\Bacula\Documentation\*"\r
+ Delete /REBOOTOK "$SMPROGRAMS\Bacula\*"\r
+ RMDir "$SMPROGRAMS\Bacula\Configuration"\r
+ RMDir "$SMPROGRAMS\Bacula\Documentation"\r
+ RMDir "$SMPROGRAMS\Bacula"\r
+ CreateDirectory "$SMPROGRAMS\Bacula"\r
+ CreateDirectory "$SMPROGRAMS\Bacula\Configuration"\r
+ CreateDirectory "$SMPROGRAMS\Bacula\Documentation"\r
+\r
+ CreateDirectory "$INSTDIR"\r
+ CreateDirectory "$INSTDIR\bin"\r
+ CreateDirectory "$APPDATA\Bacula"\r
+ CreateDirectory "$APPDATA\Bacula\Work"\r
+ CreateDirectory "$APPDATA\Bacula\Spool"\r
+\r
+ SetOutPath "$INSTDIR"\r
+ File "..\..\..\LICENSE"\r
+ Delete /REBOOTOK "$INSTDIR\bin\License.txt"\r
+\r
+ FileOpen $R1 $PLUGINSDIR\config.sed w\r
+ FileWrite $R1 "s;@VERSION@;${VERSION};g$\r$\n"\r
+ FileWrite $R1 "s;@DATE@;${__DATE__};g$\r$\n"\r
+ FileWrite $R1 "s;@DISTNAME@;Windows;g$\r$\n"\r
+\r
+!If "$BUILD_TOOLS" == "MinGW"\r
+ StrCpy $R2 "MinGW32"\r
+!Else\r
+ StrCpy $R2 "MVS"\r
+!EndIf\r
+\r
+ Call GetHostName\r
+ Exch $R3\r
+ Pop $R3\r
+\r
+ FileWrite $R1 "s;@DISTVER@;$R2;g$\r$\n"\r
+\r
+ ${StrRep} $R2 "$APPDATA\Bacula\Work" "\" "\\\\"\r
+ FileWrite $R1 's;@working_dir@;$R2;g$\r$\n'\r
+ ${StrRep} $R2 "$APPDATA\Bacula\Work" "\" "\\"\r
+ FileWrite $R1 's;@working_dir_cmd@;$R2;g$\r$\n'\r
+\r
+ ${StrRep} $R2 "$INSTDIR\bin" "\" "\\\\"\r
+ FileWrite $R1 's;@bin_dir@;$R2;g$\r$\n'\r
+ ${StrRep} $R2 "$INSTDIR\bin" "\" "\\"\r
+ FileWrite $R1 's;@bin_dir_cmd@;$R2;g$\r$\n'\r
+\r
+ ${StrRep} $R2 "$INSTDIR\bin\fdplugins" "\" "\\\\"\r
+ FileWrite $R1 's;@fdplugins_dir@;$R2;g$\r$\n'\r
+\r
+ ${StrRep} $R2 "$INSTDIR" "\" "/"\r
+ FileWrite $R1 "s;@BUILD_DIR@;$R2;g$\r$\n"\r
+\r
+ Call IsDirectorSelected\r
+ Pop $R2\r
+ ${If} $R2 = 1\r
+ FileWrite $R1 "s;@director_address@;$LocalHostAddress;g$\r$\n"\r
+ ${Else}\r
+ ${If} "$ConfigDirectorAddress" != ""\r
+ FileWrite $R1 "s;@director_address@;$ConfigDirectorAddress;g$\r$\n"\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ FileWrite $R1 "s;@client_address@;$LocalHostAddress;g$\r$\n"\r
+ FileWrite $R1 "s;@storage_address@;$LocalHostAddress;g$\r$\n"\r
+\r
+ ${If} "$ConfigClientName" != ""\r
+ FileWrite $R1 "s;@client_name@;$ConfigClientName;g$\r$\n"\r
+ ${EndIf}\r
+ ${If} "$ConfigClientPort" != ""\r
+ FileWrite $R1 "s;@client_port@;$ConfigClientPort;g$\r$\n"\r
+ ${EndIf}\r
+ ${If} "$ConfigClientMaxJobs" != ""\r
+ FileWrite $R1 "s;@client_maxjobs@;$ConfigClientMaxJobs;g$\r$\n"\r
+ ${EndIf}\r
+ ${If} "$ConfigClientPassword" != ""\r
+ FileWrite $R1 "s;@client_password@;$ConfigClientPassword;g$\r$\n"\r
+ ${EndIf}\r
+ ${If} "$ConfigStorageName" != ""\r
+ FileWrite $R1 "s;@storage_name@;$ConfigStorageName;g$\r$\n"\r
+ ${EndIf}\r
+ ${If} "$ConfigStoragePort" != ""\r
+ FileWrite $R1 "s;@storage_port@;$ConfigStoragePort;g$\r$\n"\r
+ ${EndIf}\r
+ ${If} "$ConfigStorageMaxJobs" != ""\r
+ FileWrite $R1 "s;@storage_maxjobs@;$ConfigStorageMaxJobs;g$\r$\n"\r
+ ${EndIf}\r
+ ${If} "$ConfigStoragePassword" != ""\r
+ FileWrite $R1 "s;@storage_password@;$ConfigStoragePassword;g$\r$\n"\r
+ ${EndIf}\r
+ ${If} "$ConfigDirectorName" != ""\r
+ FileWrite $R1 "s;@director_name@;$ConfigDirectorName;g$\r$\n"\r
+ ${EndIf}\r
+ ${If} "$ConfigDirectorPort" != ""\r
+ FileWrite $R1 "s;@director_port@;$ConfigDirectorPort;g$\r$\n"\r
+ ${EndIf}\r
+ ${If} "$ConfigDirectorMaxJobs" != ""\r
+ FileWrite $R1 "s;@director_maxjobs@;$ConfigDirectorMaxJobs;g$\r$\n"\r
+ ${EndIf}\r
+ ${If} "$ConfigDirectorPassword" != ""\r
+ FileWrite $R1 "s;@director_password@;$ConfigDirectorPassword;g$\r$\n"\r
+ ${EndIf}\r
+ ${If} "$ConfigDirectorMailServer" != ""\r
+ FileWrite $R1 "s;@smtp_host@;$ConfigDirectorMailServer;g$\r$\n"\r
+ ${EndIf}\r
+ ${If} "$ConfigDirectorMailAddress" != ""\r
+ FileWrite $R1 "s;@job_email@;$ConfigDirectorMailAddress;g$\r$\n"\r
+ ${EndIf}\r
+ ${If} "$ConfigMonitorName" != ""\r
+ FileWrite $R1 "s;@monitor_name@;$ConfigMonitorName;g$\r$\n"\r
+ ${EndIf}\r
+ ${If} "$ConfigMonitorPassword" != ""\r
+ FileWrite $R1 "s;@monitor_password@;$ConfigMonitorPassword;g$\r$\n"\r
+ ${EndIf}\r
+\r
+ ${If} $ConfigDirectorDB = 1\r
+ ${If} $MySQLPath != ""\r
+ ${StrRep} $R2 "$MySQLPath\bin" "\" "\\"\r
+ FileWrite $R1 "s;@SQL_BINDIR@;$R2;g$\r$\n"\r
+ ${EndIf}\r
+ ${ElseIf} $ConfigDirectorDB = 2\r
+ ${If} $PostgreSQLPath != ""\r
+ ${StrRep} $R2 "$PostgreSQLPath\bin" "\" "\\"\r
+ FileWrite $R1 "s;@SQL_BINDIR@;$R2;g$\r$\n"\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ FileClose $R1\r
+\r
+ ${If} $InstallType = ${MigrateInstall}\r
+ FileOpen $R1 $PLUGINSDIR\migrate.sed w\r
+ ${StrRep} $R2 "$APPDATA\Bacula\Work" "\" "\\\\"\r
+ FileWrite $R1 's;\(Working *Directory *= *\)[^ ][^ ]*.*$$;\1"$R2";$\r$\n'\r
+ FileWrite $R1 's;\(Pid *Directory *= *\)[^ ][^ ]*.*$$;\1"$R2";$\r$\n'\r
+ FileClose $R1\r
+ ${EndIf}\r
+\r
+ ${If} ${FileExists} "$OldInstallDir\bin\bacula-fd.exe"\r
+ nsExec::ExecToLog '"$OldInstallDir\bin\bacula-fd.exe" /kill' ; Shutdown any bacula that could be running\r
+ Sleep 3000\r
+ nsExec::ExecToLog '"$OldInstallDir\bin\bacula-fd.exe" /remove' ; Remove existing service\r
+ ${EndIf}\r
+\r
+ ${If} ${FileExists} "$OldInstallDir\bin\bacula-sd.exe"\r
+ nsExec::ExecToLog '"$OldInstallDir\bin\bacula-sd.exe" /kill' ; Shutdown any bacula that could be running\r
+ Sleep 3000\r
+ nsExec::ExecToLog '"$OldInstallDir\bin\bacula-sd.exe" /remove' ; Remove existing service\r
+ ${EndIf}\r
+\r
+ ${If} ${FileExists} "$OldInstallDir\bin\bacula-dir.exe"\r
+ nsExec::ExecToLog '"$OldInstallDir\bin\bacula-dir.exe" /kill' ; Shutdown any bacula that could be running\r
+ Sleep 3000\r
+ nsExec::ExecToLog '"$OldInstallDir\bin\bacula-dir.exe" /remove' ; Remove existing service\r
+ ${EndIf}\r
+\r
+SectionEnd\r
+\r
+SectionGroup "Client" SecGroupClient\r
+\r
+Section "File Service" SecFileDaemon\r
+ SectionIn 1 2 3\r
+\r
+ SetOutPath "$INSTDIR\bin\fdplugins"\r
+ File "${SRC_DIR}\exchange-fd.dll"\r
+\r
+ SetOutPath "$INSTDIR\bin"\r
+\r
+ File "${SRC_DIR}\bacula-fd.exe"\r
+\r
+ ${If} $InstallType = ${MigrateInstall}\r
+ ${AndIf} ${FileExists} "$OldInstallDir\bin\bacula-fd.conf"\r
+ CopyFiles "$OldInstallDir\bin\bacula-fd.conf" "$APPDATA\Bacula"\r
+ nsExec::ExecToLog '$PLUGINSDIR\sed.exe -f "$PLUGINSDIR\migrate.sed" -i.bak "$APPDATA\Bacula\bacula-fd.conf"'\r
+ ${Else}\r
+ File "/oname=$PLUGINSDIR\bacula-fd.conf" "bacula-fd.conf.in"\r
+\r
+ StrCpy $0 "$APPDATA\Bacula"\r
+ StrCpy $1 bacula-fd.conf\r
+ Call ConfigEditAndCopy\r
+ ${EndIf}\r
+\r
+ StrCpy $0 bacula-fd\r
+ StrCpy $1 "File Service"\r
+ StrCpy $2 $ConfigClientInstallService\r
+ StrCpy $3 $ConfigClientStartService\r
+\r
+ Call InstallDaemon\r
+\r
+ CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Client Configuration.lnk" "write.exe" '"$APPDATA\Bacula\bacula-fd.conf"'\r
+SectionEnd\r
+\r
+SectionGroupEnd\r
+\r
+SectionGroup "Server" SecGroupServer\r
+\r
+Section "Storage Service" SecStorageDaemon\r
+ SectionIn 2 3\r
+\r
+ SetOutPath "$INSTDIR\bin"\r
+\r
+ File "${SRC_DIR}\loaderinfo.exe"\r
+ File "${SRC_DIR}\mt.exe"\r
+ File "${SRC_DIR}\mtx.exe"\r
+ File "${SRC_DIR}\scsitape.exe"\r
+ File "${SRC_DIR}\tapeinfo.exe"\r
+ File "${SRC_DIR}\bacula-sd.exe"\r
+ File "${SRC_DIR}\bcopy.exe"\r
+ File "${SRC_DIR}\bextract.exe"\r
+ File "${SRC_DIR}\bls.exe"\r
+ File "${SRC_DIR}\bscan.exe"\r
+ File "${SRC_DIR}\btape.exe"\r
+ File "${SRC_DIR}\scsilist.exe"\r
+ File "${SRC_DIR}\mkisofs.exe"\r
+ File "${SRC_DIR}\growisofs.exe"\r
+ File "${SRC_DIR}\dvd-ram-control.exe"\r
+ File "${SRC_DIR}\dvd+rw-booktype.exe"\r
+ File "${SRC_DIR}\dvd+rw-format.exe"\r
+ File "${SRC_DIR}\dvd+rw-mediainfo.exe"\r
+\r
+ File "/oname=$PLUGINSDIR\mtx-changer.cmd" "${SRC_DIR}\mtx-changer.cmd"\r
+\r
+ StrCpy $0 "$INSTDIR\bin"\r
+ StrCpy $1 mtx-changer.cmd\r
+ Call ConfigEditAndCopy\r
+\r
+ File "/oname=$PLUGINSDIR\disk-changer.cmd" "${SRC_DIR}\disk-changer.cmd"\r
+\r
+ StrCpy $0 "$INSTDIR\bin"\r
+ StrCpy $1 disk-changer.cmd\r
+ Call ConfigEditAndCopy\r
+\r
+ File "/oname=$PLUGINSDIR\dvd-handler.cmd" "${SRC_DIR}\dvd-handler.cmd"\r
+\r
+ StrCpy $0 "$INSTDIR\bin"\r
+ StrCpy $1 dvd-handler.cmd\r
+ Call ConfigEditAndCopy\r
+\r
+ File "/oname=$PLUGINSDIR\bacula-sd.conf" "bacula-sd.conf.in"\r
+\r
+ StrCpy $0 "$APPDATA\Bacula"\r
+ StrCpy $1 bacula-sd.conf\r
+ Call ConfigEditAndCopy\r
+\r
+ StrCpy $0 bacula-sd\r
+ StrCpy $1 "Storage Service"\r
+ StrCpy $2 $ConfigStorageInstallService\r
+ StrCpy $3 $ConfigStorageStartService\r
+ Call InstallDaemon\r
+\r
+ CreateShortCut "$SMPROGRAMS\Bacula\Configuration\List Devices.lnk" "$INSTDIR\bin\scsilist.exe" "/pause"\r
+ CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Storage Configuration.lnk" "write.exe" '"$APPDATA\Bacula\bacula-sd.conf"'\r
+SectionEnd\r
+\r
+Section "Director Service" SecDirectorDaemon\r
+ SectionIn 2 3\r
+\r
+ SetOutPath "$INSTDIR\bin"\r
+\r
+ ${If} $ConfigDirectorDB = 1\r
+ File /oname=bacula_cats.dll "${SRC_DIR}\cats_mysql.dll"\r
+ File "${SRC_DIR}\libmysql.dll"\r
+ File /oname=$PLUGINSDIR\create_database.cmd ${SRC_DIR}\create_mysql_database.cmd\r
+ File /oname=$PLUGINSDIR\drop_database.cmd ${SRC_DIR}\drop_mysql_database.cmd\r
+ File /oname=$PLUGINSDIR\make_tables.cmd ${SRC_DIR}\make_mysql_tables.cmd\r
+ File ${SRC_DIR}\make_mysql_tables.sql\r
+ File /oname=$PLUGINSDIR\drop_tables.cmd ${SRC_DIR}\drop_mysql_tables.cmd\r
+ File ${SRC_DIR}\drop_mysql_tables.sql\r
+ File /oname=$PLUGINSDIR\grant_privileges.cmd ${SRC_DIR}\grant_mysql_privileges.cmd\r
+ File ${SRC_DIR}\grant_mysql_privileges.sql\r
+ File /oname=$PLUGINSDIR\make_catalog_backup.cmd ${SRC_DIR}\make_mysql_catalog_backup.cmd\r
+ ${ElseIf} $ConfigDirectorDB = 2\r
+ File /oname=bacula_cats.dll "${SRC_DIR}\cats_postgresql.dll"\r
+ File "${SRC_DIR}\libpq.dll"\r
+!if "${BUILD_TOOLS}" == "VC8"\r
+ File "${SRC_DIR}\comerr32.dll"\r
+ File "${SRC_DIR}\libintl-2.dll"\r
+ File "${SRC_DIR}\libiconv-2.dll"\r
+ File "${SRC_DIR}\krb5_32.dll"\r
+!endif\r
+!If "${BUILD_TOOLS}" == "VC8_DEBUG"\r
+ File "${SRC_DIR}\comerr32.dll"\r
+ File "${SRC_DIR}\libintl-2.dll"\r
+ File "${SRC_DIR}\libiconv-2.dll"\r
+ File "${SRC_DIR}\krb5_32.dll"\r
+!endif\r
+ File /oname=$PLUGINSDIR\create_database.cmd ${SRC_DIR}\create_postgresql_database.cmd\r
+ File /oname=$PLUGINSDIR\drop_database.cmd ${SRC_DIR}\drop_postgresql_database.cmd\r
+ File /oname=$PLUGINSDIR\make_tables.cmd ${SRC_DIR}\make_postgresql_tables.cmd\r
+ File ${SRC_DIR}\create_postgresql_database.sql\r
+ File ${SRC_DIR}\make_postgresql_tables.sql\r
+ File /oname=$PLUGINSDIR\drop_tables.cmd ${SRC_DIR}\drop_postgresql_tables.cmd\r
+ File ${SRC_DIR}\drop_postgresql_tables.sql\r
+ File /oname=$PLUGINSDIR\grant_privileges.cmd ${SRC_DIR}\grant_postgresql_privileges.cmd\r
+ File ${SRC_DIR}\grant_postgresql_privileges.sql\r
+ File /oname=$PLUGINSDIR\make_catalog_backup.cmd ${SRC_DIR}\make_postgresql_catalog_backup.cmd\r
+ ${ElseIf} $ConfigDirectorDB = 3\r
+ File "${SRC_DIR}\sqlite3.exe"\r
+!if "${BUILD_TOOLS}" == "VC8"\r
+ File "${SRC_DIR}\sqlite3.exe.manifest"\r
+!endif\r
+!If "${BUILD_TOOLS}" == "VC8_DEBUG"\r
+ File "${SRC_DIR}\sqlite3.exe.manifest"\r
+!endif\r
+ File /oname=bacula_cats.dll "${SRC_DIR}\cats_sqlite3.dll"\r
+ File /oname=$PLUGINSDIR\create_database.cmd ${SRC_DIR}\create_sqlite3_database.cmd\r
+ File /oname=$PLUGINSDIR\drop_database.cmd ${SRC_DIR}\drop_sqlite3_database.cmd\r
+ File /oname=$PLUGINSDIR\make_tables.cmd ${SRC_DIR}\make_sqlite3_tables.cmd\r
+ File ${SRC_DIR}\make_sqlite3_tables.sql\r
+ File /oname=$PLUGINSDIR\drop_tables.cmd ${SRC_DIR}\drop_sqlite3_tables.cmd\r
+ File /oname=$PLUGINSDIR\grant_privileges.cmd ${SRC_DIR}\grant_sqlite3_privileges.cmd\r
+ File /oname=$PLUGINSDIR\make_catalog_backup.cmd ${SRC_DIR}\make_sqlite3_catalog_backup.cmd\r
+ ${EndIf}\r
+\r
+ File "${SRC_DIR}\bacula-dir.exe"\r
+ File "${SRC_DIR}\dbcheck.exe"\r
+\r
+ File "/oname=$PLUGINSDIR\delete_catalog_backup.cmd" "${SRC_DIR}\delete_catalog_backup.cmd"\r
+\r
+ StrCpy $0 "$INSTDIR\bin"\r
+ \r
+ StrCpy $1 create_database.cmd\r
+ Call ConfigEditAndCopy\r
+\r
+ StrCpy $1 drop_database.cmd\r
+ Call ConfigEditAndCopy\r
+\r
+ StrCpy $1 make_tables.cmd\r
+ Call ConfigEditAndCopy\r
+\r
+ StrCpy $1 drop_tables.cmd\r
+ Call ConfigEditAndCopy\r
+\r
+ StrCpy $1 grant_privileges.cmd\r
+ Call ConfigEditAndCopy\r
+\r
+ StrCpy $1 make_catalog_backup.cmd\r
+ Call ConfigEditAndCopy\r
+\r
+ StrCpy $1 delete_catalog_backup.cmd\r
+ Call ConfigEditAndCopy\r
+\r
+ File "${SRC_DIR}\query.sql"\r
+\r
+ File "/oname=$PLUGINSDIR\bacula-dir.conf" "bacula-dir.conf.in"\r
+\r
+ StrCpy $0 "$APPDATA\Bacula"\r
+ StrCpy $1 bacula-dir.conf\r
+ Call ConfigEditAndCopy\r
+\r
+ StrCpy $0 bacula-dir\r
+ StrCpy $1 "Director Service"\r
+ StrCpy $2 $ConfigDirectorInstallService\r
+ StrCpy $3 $ConfigDirectorStartService\r
+ Call InstallDaemon\r
+\r
+ CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Director Configuration.lnk" "write.exe" '"$APPDATA\Bacula\bacula-dir.conf"'\r
+SectionEnd\r
+\r
+SectionGroupEnd\r
+\r
+SectionGroup "Consoles" SecGroupConsoles\r
+\r
+Section "Command Console" SecConsole\r
+ SectionIn 1 2 3\r
+\r
+ SetOutPath "$INSTDIR\bin"\r
+\r
+ File "${SRC_DIR}\bconsole.exe"\r
+ Call InstallCommonFiles\r
+\r
+ ${If} $InstallType = ${MigrateInstall}\r
+ ${AndIf} ${FileExists} "$OldInstallDir\bin\bconsole.conf"\r
+ CopyFiles "$OldInstallDir\bin\bconsole.conf" "$APPDATA\Bacula"\r
+ ${Else}\r
+ File "/oname=$PLUGINSDIR\bconsole.conf" "bconsole.conf.in"\r
+ StrCpy $0 "$APPDATA\Bacula"\r
+ StrCpy $1 bconsole.conf\r
+ Call ConfigEditAndCopy\r
+ ${EndIf}\r
+\r
+ CreateShortCut "$SMPROGRAMS\Bacula\bconsole.lnk" "$INSTDIR\bin\bconsole.exe" '-c "$APPDATA\Bacula\bconsole.conf"' "$INSTDIR\bin\bconsole.exe" 0\r
+ CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Command Console Configuration.lnk" "write.exe" '"$APPDATA\Bacula\bconsole.conf"'\r
+\r
+SectionEnd\r
+\r
+Section "Graphical Console" SecWxConsole\r
+ SectionIn 1 2 3\r
+ \r
+ SetOutPath "$INSTDIR\bin"\r
+\r
+ Call InstallCommonFiles\r
+!if "${BUILD_TOOLS}" == "VC8"\r
+ File "${SRC_DIR}\wxbase28_vc_bacula.dll"\r
+ File "${SRC_DIR}\wxmsw28_core_vc_bacula.dll"\r
+!endif\r
+!If "${BUILD_TOOLS}" == "VC8_DEBUG"\r
+ File "${SRC_DIR}\wxbase28_vc_bacula.dll"\r
+ File "${SRC_DIR}\wxmsw28_core_vc_bacula.dll"\r
+!endif\r
+!if "${BUILD_TOOLS}" == "MinGW"\r
+ File "${SRC_DIR}\wxbase28_gcc_bacula.dll"\r
+ File "${SRC_DIR}\wxmsw28_core_gcc_bacula.dll"\r
+!endif\r
+\r
+ File "${SRC_DIR}\bwx-console.exe"\r
+\r
+ ${If} $InstallType = ${MigrateInstall}\r
+ ${AndIf} ${FileExists} "$OldInstallDir\bin\bwx-console.conf"\r
+ CopyFiles "$OldInstallDir\bin\bwx-console.conf" "$APPDATA\Bacula"\r
+ ${Else}\r
+ File "/oname=$PLUGINSDIR\bwx-console.conf" "bwx-console.conf.in"\r
+ StrCpy $0 "$APPDATA\Bacula"\r
+ StrCpy $1 bwx-console.conf\r
+ Call ConfigEditAndCopy\r
+ ${EndIf}\r
+\r
+ ; Create Start Menu entry\r
+ CreateShortCut "$SMPROGRAMS\Bacula\bwx-console.lnk" "$INSTDIR\bin\bwx-console.exe" '-c "$APPDATA\Bacula\bwx-console.conf"' "$INSTDIR\bin\bwx-console.exe" 0\r
+ CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Graphical Console Configuration.lnk" "write.exe" '"$APPDATA\Bacula\bwx-console.conf"'\r
+SectionEnd\r
+\r
+SectionGroupEnd\r
+\r
+SectionGroup "Documentation" SecGroupDocumentation\r
+\r
+Section "Documentation (Acrobat Format)" SecDocPdf\r
+ SectionIn 1 2 3\r
+\r
+ SetOutPath "$INSTDIR\doc"\r
+ CreateDirectory "$INSTDIR\doc"\r
+\r
+ File "${SRC_DIR}\manual\bacula.pdf"\r
+ CreateShortCut "$SMPROGRAMS\Bacula\Documentation\Manual.lnk" '"$INSTDIR\doc\bacula.pdf"'\r
+SectionEnd\r
+\r
+Section "Documentation (HTML Format)" SecDocHtml\r
+ SectionIn 3\r
+\r
+ SetOutPath "$INSTDIR\doc"\r
+ CreateDirectory "$INSTDIR\doc"\r
+\r
+ File "${SRC_DIR}\manual\bacula\*.html"\r
+ File "${SRC_DIR}\manual\bacula\*.png"\r
+ File "${SRC_DIR}\manual\bacula\*.css"\r
+ CreateShortCut "$SMPROGRAMS\Bacula\Documentation\Manual (HTML).lnk" '"$INSTDIR\doc\index.html"'\r
+SectionEnd\r
+\r
+SectionGroupEnd\r
+\r
+Section "-Finish"\r
+ Push $R0\r
+\r
+ ${If} $OsIsNT = 1\r
+ nsExec::ExecToLog 'cmd.exe /C echo Y|cacls "$INSTDIR" /T /G SYSTEM:F Administrators:F'\r
+ nsExec::ExecToLog 'cmd.exe /C echo Y|cacls "$APPDATA\Bacula" /T /G SYSTEM:F Administrators:F'\r
+ ${EndIf}\r
+\r
+ ; Write the uninstall keys for Windows & create Start Menu entry\r
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "DisplayName" "Bacula"\r
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "InstallLocation" "$INSTDIR"\r
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "DisplayVersion" "${VERSION}"\r
+ ${StrTok} $R0 "${VERSION}" "." 0 0\r
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "VersionMajor" $R0\r
+ ${StrTok} $R0 "${VERSION}" "." 1 0\r
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "VersionMinor" $R0\r
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "NoModify" 1\r
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "NoRepair" 1\r
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "URLUpdateInfo" "http://sourceforge.net/project/showfiles.php?group_id=50727"\r
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "URLInfoAbout" "http://www.bacula.org"\r
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "HelpLink" "http://www.bacula.org/?page=support"\r
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "UninstallString" '"$INSTDIR\uninstall.exe"'\r
+ WriteUninstaller "$INSTDIR\Uninstall.exe"\r
+ CreateShortCut "$SMPROGRAMS\Bacula\Uninstall Bacula.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0\r
+ Pop $R0\r
+SectionEnd\r
+\r
+; Extra Page descriptions\r
+\r
+LangString DESC_SecFileDaemon ${LANG_ENGLISH} "Install Bacula File Daemon on this system."\r
+LangString DESC_SecStorageDaemon ${LANG_ENGLISH} "Install Bacula Storage Daemon on this system."\r
+LangString DESC_SecDirectorDaemon ${LANG_ENGLISH} "Install Bacula Director Daemon on this system."\r
+LangString DESC_SecConsole ${LANG_ENGLISH} "Install command console program on this system."\r
+LangString DESC_SecWxConsole ${LANG_ENGLISH} "Install graphical console program on this system."\r
+LangString DESC_SecDocPdf ${LANG_ENGLISH} "Install documentation in Acrobat format on this system."\r
+LangString DESC_SecDocHtml ${LANG_ENGLISH} "Install documentation in HTML format on this system."\r
+\r
+LangString TITLE_ConfigPage1 ${LANG_ENGLISH} "Configuration"\r
+LangString SUBTITLE_ConfigPage1 ${LANG_ENGLISH} "Set installation configuration."\r
+\r
+LangString TITLE_ConfigPage2 ${LANG_ENGLISH} "Configuration (continued)"\r
+LangString SUBTITLE_ConfigPage2 ${LANG_ENGLISH} "Set installation configuration."\r
+\r
+LangString TITLE_InstallType ${LANG_ENGLISH} "Installation Type"\r
+LangString SUBTITLE_InstallType ${LANG_ENGLISH} "Choose installation type."\r
+\r
+LangString TITLE_WriteTemplates ${LANG_ENGLISH} "Create Templates"\r
+LangString SUBTITLE_WriteTemplates ${LANG_ENGLISH} "Create resource templates for inclusion in the Director's configuration file."\r
+\r
+!InsertMacro MUI_FUNCTION_DESCRIPTION_BEGIN\r
+ !InsertMacro MUI_DESCRIPTION_TEXT ${SecFileDaemon} $(DESC_SecFileDaemon)\r
+ !InsertMacro MUI_DESCRIPTION_TEXT ${SecStorageDaemon} $(DESC_SecStorageDaemon)\r
+ !InsertMacro MUI_DESCRIPTION_TEXT ${SecDirectorDaemon} $(DESC_SecDirectorDaemon)\r
+ !InsertMacro MUI_DESCRIPTION_TEXT ${SecConsole} $(DESC_SecConsole)\r
+ !InsertMacro MUI_DESCRIPTION_TEXT ${SecWxConsole} $(DESC_SecWxConsole)\r
+ !InsertMacro MUI_DESCRIPTION_TEXT ${SecDocPdf} $(DESC_SecDocPdf)\r
+ !InsertMacro MUI_DESCRIPTION_TEXT ${SecDocHtml} $(DESC_SecDocHtml)\r
+!InsertMacro MUI_FUNCTION_DESCRIPTION_END\r
+\r
+; Uninstall section\r
+\r
+UninstallText "This will uninstall Bacula. Hit next to continue."\r
+\r
+Section "Uninstall"\r
+ ; Shutdown any baculum that could be running\r
+ nsExec::ExecToLog '"$INSTDIR\bin\bacula-fd.exe" /kill'\r
+ nsExec::ExecToLog '"$INSTDIR\bin\bacula-sd.exe" /kill'\r
+ nsExec::ExecToLog '"$INSTDIR\bin\bacula-dir.exe" /kill'\r
+ Sleep 3000\r
+\r
+ ReadRegDWORD $R0 HKLM "Software\Bacula" "Service_Bacula-fd"\r
+ ${If} $R0 = 1\r
+ ; Remove bacula service\r
+ nsExec::ExecToLog '"$INSTDIR\bin\bacula-fd.exe" /remove'\r
+ nsExec::ExecToLog '"$INSTDIR\bin\exchange-fd.dll" /remove'\r
+ ${EndIf}\r
+ \r
+ ReadRegDWORD $R0 HKLM "Software\Bacula" "Service_Bacula-sd"\r
+ ${If} $R0 = 1\r
+ ; Remove bacula service\r
+ nsExec::ExecToLog '"$INSTDIR\bin\bacula-sd.exe" /remove'\r
+ ${EndIf}\r
+ \r
+ ReadRegDWORD $R0 HKLM "Software\Bacula" "Service_Bacula-dir"\r
+ ${If} $R0 = 1\r
+ ; Remove bacula service\r
+ nsExec::ExecToLog '"$INSTDIR\bin\bacula-dir.exe" /remove'\r
+ ${EndIf}\r
+ \r
+ ; remove registry keys\r
+ DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula"\r
+ DeleteRegKey HKLM "Software\Bacula"\r
+\r
+ ; remove start menu items\r
+ SetShellVarContext all\r
+ Delete /REBOOTOK "$SMPROGRAMS\Bacula\*"\r
+ RMDir "$SMPROGRAMS\Bacula"\r
+\r
+ ; remove files and uninstaller (preserving config for now)\r
+ Delete /REBOOTOK "$INSTDIR\bin\*"\r
+ Delete /REBOOTOK "$INSTDIR\doc\*"\r
+ Delete /REBOOTOK "$INSTDIR\*"\r
+\r
+ ; Check for existing installation\r
+ MessageBox MB_YESNO|MB_ICONQUESTION \\r
+ "Would you like to delete the current configuration files and the working state file?" IDNO NoDel\r
+ Delete /REBOOTOK "$APPDATA\Bacula\*"\r
+ Delete /REBOOTOK "$APPDATA\Bacula\Work\*"\r
+ Delete /REBOOTOK "$APPDATA\Bacula\Spool\*"\r
+ Delete /REBOOTOK "$PLUGINSDIR\bacula-*.conf"\r
+ Delete /REBOOTOK "$PLUGINSDIR\*console.conf"\r
+ Delete /REBOOTOK "$PLUGINSDIR\*conf.in"\r
+ Delete /REBOOTOK "$PLUGINSDIR\openssl.exe"\r
+ Delete /REBOOTOK "$PLUGINSDIR\libeay32.dll"\r
+ Delete /REBOOTOK "$PLUGINSDIR\ssleay32.dll"\r
+ Delete /REBOOTOK "$PLUGINSDIR\sed.exe" \r
+ Delete /REBOOTOK "$PLUGINSDIR\pw.txt" \r
+ Delete /REBOOTOK "$PLUGINSDIR\*.sed" \r
+ Delete /REBOOTOK "$PLUGINSDIR\*.cmd" \r
+ Delete /REBOOTOK "$PLUGINSDIR\*.sql" \r
+ RMDir "$APPDATA\Bacula\Work"\r
+ RMDir "$APPDATA\Bacula\Spool"\r
+ RMDir "$APPDATA\Bacula"\r
+NoDel:\r
+\r
+ ; remove directories used\r
+ RMDir "$INSTDIR\bin"\r
+ RMDir "$INSTDIR\doc"\r
+ RMDir "$INSTDIR"\r
+SectionEnd\r
+\r
+;\r
+; $0 - Service Name (ie Bacula-FD)\r
+; $1 - Service Description (ie Bacula File Daemon)\r
+; $2 - Install as Service\r
+; $3 - Start Service now\r
+;\r
+Function InstallDaemon\r
+ Call InstallCommonFiles\r
+\r
+ WriteRegDWORD HKLM "Software\Bacula" "Service_$0" $2\r
+ \r
+ ${If} $2 = 1\r
+ nsExec::ExecToLog '"$INSTDIR\bin\$0.exe" /install -c "$APPDATA\Bacula\$0.conf"'\r
+\r
+ ${If} $OsIsNT <> 1\r
+ File "Start.bat"\r
+ File "Stop.bat"\r
+ ${EndIf}\r
+\r
+ ; Start the service?\r
+\r
+ ${If} $3 = 1 \r
+ ${If} $OsIsNT = 1\r
+ nsExec::ExecToLog 'net start $0'\r
+ ${Else}\r
+ Exec '"$INSTDIR\bin\$0.exe" -c "$APPDATA\Bacula\$0.conf"'\r
+ ${EndIf}\r
+ ${EndIf}\r
+ ${Else}\r
+ CreateShortCut "$SMPROGRAMS\Bacula\Start $1.lnk" "$INSTDIR\bin\$0.exe" '-c "$APPDATA\Bacula\$0.conf"' "$INSTDIR\bin\$0.exe" 0\r
+ ${EndIf}\r
+FunctionEnd\r
+\r
+Function GetComputerName\r
+ Push $R0\r
+ Push $R1\r
+ Push $R2\r
+\r
+ System::Call "kernel32::GetComputerNameA(t .R0, *i ${NSIS_MAX_STRLEN} R1) i.R2"\r
+\r
+ ${StrCase} $R0 $R0 "L"\r
+\r
+ Pop $R2\r
+ Pop $R1\r
+ Exch $R0\r
+FunctionEnd\r
+\r
+!define ComputerNameDnsFullyQualified 3\r
+\r
+Function GetHostName\r
+ Push $R0\r
+ Push $R1\r
+ Push $R2\r
+\r
+ ${If} $OsIsNT = 1\r
+ System::Call "kernel32::GetComputerNameExA(i ${ComputerNameDnsFullyQualified}, t .R0, *i ${NSIS_MAX_STRLEN} R1) i.R2 ?e"\r
+ ${If} $R2 = 0\r
+ Pop $R2\r
+ DetailPrint "GetComputerNameExA failed - LastError = $R2"\r
+ Call GetComputerName\r
+ Pop $R0\r
+ ${Else}\r
+ Pop $R2\r
+ ${EndIf}\r
+ ${Else}\r
+ Call GetComputerName\r
+ Pop $R0\r
+ ${EndIf}\r
+\r
+ Pop $R2\r
+ Pop $R1\r
+ Exch $R0\r
+FunctionEnd\r
+\r
+!define NameUserPrincipal 8\r
+\r
+Function GetUserName\r
+ Push $R0\r
+ Push $R1\r
+ Push $R2\r
+\r
+ ${If} $OsIsNT = 1\r
+ System::Call "secur32::GetUserNameExA(i ${NameUserPrincipal}, t .R0, *i ${NSIS_MAX_STRLEN} R1) i.R2 ?e"\r
+ ${If} $R2 = 0\r
+ Pop $R2\r
+ DetailPrint "GetUserNameExA failed - LastError = $R2"\r
+ Pop $R0\r
+ StrCpy $R0 ""\r
+ ${Else}\r
+ Pop $R2\r
+ ${EndIf}\r
+ ${Else}\r
+ StrCpy $R0 ""\r
+ ${EndIf}\r
+\r
+ ${If} $R0 == ""\r
+ System::Call "advapi32::GetUserNameA(t .R0, *i ${NSIS_MAX_STRLEN} R1) i.R2 ?e"\r
+ ${If} $R2 = 0\r
+ Pop $R2\r
+ DetailPrint "GetUserNameA failed - LastError = $R2"\r
+ StrCpy $R0 ""\r
+ ${Else}\r
+ Pop $R2\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ Pop $R2\r
+ Pop $R1\r
+ Exch $R0\r
+FunctionEnd\r
+\r
+Function ConfigEditAndCopy\r
+ Push $R1\r
+\r
+ ${If} ${FileExists} "$0\$1"\r
+ StrCpy $R1 ".new"\r
+ ${Else}\r
+ StrCpy $R1 ""\r
+ ${EndIf}\r
+\r
+ nsExec::ExecToLog '$PLUGINSDIR\sed.exe -f "$PLUGINSDIR\config.sed" -i.bak "$PLUGINSDIR\$1"'\r
+ CopyFiles "$PLUGINSDIR\$1" "$0\$1$R1"\r
+\r
+ Pop $R1\r
+FunctionEnd\r
+\r
+Function FindDatabaseApps\r
+ Push $R1\r
+\r
+ ReadRegStr $0 HKLM "Software\MySQL AB\MySQL Server 5.0" "Location"\r
+\r
+ ${If} $0 != ""\r
+ Call RemoveTrailingSlash\r
+ StrCpy $MySQLPath $0\r
+ ReadRegStr $0 HKLM "Software\MySQL AB\MySQL Server 5.0" "Version"\r
+ StrCpy $MySQLVersion $0\r
+ ${EndIf}\r
+\r
+ EnumRegKey $R1 HKLM "Software\PostgreSQL\Installations" 0\r
+ ${If} $R1 != ""\r
+ ReadRegStr $0 HKLM "Software\PostgreSQL\Installations\$R1" "Base Directory"\r
+ Call RemoveTrailingSlash\r
+ StrCpy $PostgreSQLPath $0\r
+ ReadRegStr $0 HKLM "Software\PostgreSQL\Installations\$R1" "Version"\r
+ StrCpy $PostgreSQLVersion $0\r
+ ${EndIf}\r
+\r
+ Pop $R1\r
+FunctionEnd\r
+\r
+Function RemoveTrailingSlash\r
+ Push $R1\r
+ StrCpy $R1 $0 "" -1\r
+ ${If} $R1 == "\"\r
+ StrCpy $0 $0 -1\r
+ ${EndIf}\r
+ Pop $R1\r
+FunctionEnd\r
+\r
+Function IsDirectorSelected\r
+ Push $R0\r
+ SectionGetFlags ${SecDirectorDaemon} $R0\r
+ IntOp $R0 $R0 & ${SF_SELECTED}\r
+ Exch $R0\r
+FunctionEnd\r
+\r
+Function GetSelectedComponents\r
+ Push $R0\r
+ StrCpy $R0 0\r
+ ${If} ${SectionIsSelected} ${SecFileDaemon}\r
+ IntOp $R0 $R0 | ${ComponentFile}\r
+ ${EndIf}\r
+ ${If} ${SectionIsSelected} ${SecStorageDaemon}\r
+ IntOp $R0 $R0 | ${ComponentStorage}\r
+ ${EndIf}\r
+ ${If} ${SectionIsSelected} ${SecDirectorDaemon}\r
+ IntOp $R0 $R0 | ${ComponentDirector}\r
+ ${EndIf}\r
+ ${If} ${SectionIsSelected} ${SecConsole}\r
+ IntOp $R0 $R0 | ${ComponentTextConsole}\r
+ ${EndIf}\r
+ ${If} ${SectionIsSelected} ${SecWxConsole}\r
+ IntOp $R0 $R0 | ${ComponentGUIConsole}\r
+ ${EndIf}\r
+ ${If} ${SectionIsSelected} ${SecDocPdf}\r
+ IntOp $R0 $R0 | ${ComponentPDFDocs}\r
+ ${EndIf}\r
+ ${If} ${SectionIsSelected} ${SecDocHtml}\r
+ IntOp $R0 $R0 | ${ComponentHTMLDocs}\r
+ ${EndIf}\r
+ Exch $R0\r
+FunctionEnd\r
+\r
+Function PageComponentsShow\r
+ ${If} $OsIsNT <> 1\r
+ Call DisableServerSections\r
+ ${EndIf}\r
+\r
+ Call SelectPreviousComponents\r
+ Call UpdateComponentUI\r
+FunctionEnd\r
+\r
+Function PageDirectoryPre\r
+ ${If} $AutomaticInstall = 1\r
+ ${OrIf} $InstallType = ${UpgradeInstall}\r
+ Abort\r
+ ${EndIf}\r
+FunctionEnd\r
+\r
+Function LeaveInstallPage\r
+ Push "$INSTDIR\install.log"\r
+ Call DumpLog\r
+FunctionEnd\r
+\r
+Function EnterWriteTemplates\r
+ Push $R0\r
+ Push $R1\r
+\r
+ Call GetSelectedComponents\r
+ Pop $R0\r
+\r
+ IntOp $R0 $R0 & ${ComponentDirector}\r
+ IntOp $R1 $NewComponents & ${ComponentsFileAndStorage}\r
+\r
+ ${If} $R0 <> 0\r
+ ${OrIf} $R1 = 0\r
+ Pop $R1\r
+ Pop $R0\r
+ Abort\r
+ ${EndIf}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentFile}\r
+ ${If} $R0 = 0\r
+ WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 2" State 0\r
+ WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 2" Flags DISABLED\r
+ DeleteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 3" State\r
+ WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 3" Flags REQ_SAVE|FILE_EXPLORER|WARN_IF_EXIST|DISABLED\r
+ ${Else}\r
+ WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 2" State 1\r
+ DeleteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 2" Flags\r
+ WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 3" State "C:\$ConfigClientName.conf"\r
+ WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 5" Flags REQ_SAVE|FILE_EXPLORER|WARN_IF_EXIST\r
+ ${EndIf}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentStorage}\r
+ ${If} $R0 = 0\r
+ WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 4" State 0\r
+ WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 4" Flags DISABLED\r
+ DeleteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 5" State\r
+ WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 5" Flags REQ_SAVE|FILE_EXPLORER|WARN_IF_EXIST|DISABLED\r
+ ${Else}\r
+ WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 4" State 1\r
+ DeleteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 4" Flags\r
+ WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 5" State "C:\$ConfigStorageName.conf"\r
+ WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 5" Flags REQ_SAVE|FILE_EXPLORER|WARN_IF_EXIST\r
+ ${EndIf}\r
+\r
+ !InsertMacro MUI_HEADER_TEXT "$(TITLE_WriteTemplates)" "$(SUBTITLE_WriteTemplates)"\r
+ !InsertMacro MUI_INSTALLOPTIONS_DISPLAY "WriteTemplates.ini"\r
+\r
+ !InsertMacro MUI_INSTALLOPTIONS_READ $R0 "WriteTemplates.ini" "Field 2" State\r
+ ${If} $R0 <> 0\r
+ File "/oname=$PLUGINSDIR\client.conf.in" "client.conf.in"\r
+\r
+ nsExec::ExecToLog '$PLUGINSDIR\sed.exe -f "$PLUGINSDIR\config.sed" -i.bak "$PLUGINSDIR\client.conf.in"'\r
+ !InsertMacro MUI_INSTALLOPTIONS_READ $R0 "WriteTemplates.ini" "Field 3" State\r
+ ${If} $R0 != ""\r
+ CopyFiles "$PLUGINSDIR\client.conf.in" "$R0"\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ !InsertMacro MUI_INSTALLOPTIONS_READ $R0 "WriteTemplates.ini" "Field 4" State\r
+ ${If} $R0 <> 0\r
+ File "/oname=$PLUGINSDIR\storage.conf.in" "storage.conf.in"\r
+\r
+ nsExec::ExecToLog '$PLUGINSDIR\sed.exe -f "$PLUGINSDIR\config.sed" -i.bak "$PLUGINSDIR\storage.conf.in"'\r
+ !InsertMacro MUI_INSTALLOPTIONS_READ $R0 "WriteTemplates.ini" "Field 5" State\r
+ ${If} $R0 != ""\r
+ CopyFiles "$PLUGINSDIR\storage.conf.in" "$R0"\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ Pop $R1\r
+ Pop $R0\r
+FunctionEnd\r
+\r
+Function SelectPreviousComponents\r
+ ${If} $InstallType <> ${NewInstall}\r
+ IntOp $R1 $PreviousComponents & ${ComponentFile}\r
+ ${If} $R1 <> 0\r
+ !InsertMacro SelectSection ${SecFileDaemon}\r
+ !InsertMacro SetSectionFlag ${SecFileDaemon} ${SF_RO}\r
+ ${Else}\r
+ !InsertMacro UnselectSection ${SecFileDaemon}\r
+ !InsertMacro ClearSectionFlag ${SecFileDaemon} ${SF_RO}\r
+ ${EndIf}\r
+ IntOp $R1 $PreviousComponents & ${ComponentStorage}\r
+ ${If} $R1 <> 0\r
+ !InsertMacro SelectSection ${SecStorageDaemon}\r
+ !InsertMacro SetSectionFlag ${SecStorageDaemon} ${SF_RO}\r
+ ${Else}\r
+ !InsertMacro UnselectSection ${SecStorageDaemon}\r
+ !InsertMacro ClearSectionFlag ${SecStorageDaemon} ${SF_RO}\r
+ ${EndIf}\r
+ IntOp $R1 $PreviousComponents & ${ComponentDirector}\r
+ ${If} $R1 <> 0\r
+ !InsertMacro SelectSection ${SecDirectorDaemon}\r
+ !InsertMacro SetSectionFlag ${SecDirectorDaemon} ${SF_RO}\r
+ ${Else}\r
+ !InsertMacro UnselectSection ${SecDirectorDaemon}\r
+ !InsertMacro ClearSectionFlag ${SecDirectorDaemon} ${SF_RO}\r
+ ${EndIf}\r
+ IntOp $R1 $PreviousComponents & ${ComponentTextConsole}\r
+ ${If} $R1 <> 0\r
+ !InsertMacro SelectSection ${SecConsole}\r
+ !InsertMacro SetSectionFlag ${SecConsole} ${SF_RO}\r
+ ${Else}\r
+ !InsertMacro UnselectSection ${SecConsole}\r
+ !InsertMacro ClearSectionFlag ${SecConsole} ${SF_RO}\r
+ ${EndIf}\r
+ IntOp $R1 $PreviousComponents & ${ComponentGUIConsole}\r
+ ${If} $R1 <> 0\r
+ !InsertMacro SelectSection ${SecWxConsole}\r
+ !InsertMacro SetSectionFlag ${SecWxConsole} ${SF_RO}\r
+ ${Else}\r
+ !InsertMacro UnselectSection ${SecWxConsole}\r
+ !InsertMacro ClearSectionFlag ${SecWxConsole} ${SF_RO}\r
+ ${EndIf}\r
+ IntOp $R1 $PreviousComponents & ${ComponentPDFDocs}\r
+ ${If} $R1 <> 0\r
+ !InsertMacro SelectSection ${SecDocPdf}\r
+ !InsertMacro SetSectionFlag ${SecDocPdf} ${SF_RO}\r
+ ${Else}\r
+ !InsertMacro UnselectSection ${SecDocPdf}\r
+ !InsertMacro ClearSectionFlag ${SecDocPdf} ${SF_RO}\r
+ ${EndIf}\r
+ IntOp $R1 $PreviousComponents & ${ComponentHTMLDocs}\r
+ ${If} $R1 <> 0\r
+ !InsertMacro SelectSection ${SecDocHtml}\r
+ !InsertMacro SetSectionFlag ${SecDocHtml} ${SF_RO}\r
+ ${Else}\r
+ !InsertMacro UnselectSection ${SecDocHtml}\r
+ !InsertMacro ClearSectionFlag ${SecDocHtml} ${SF_RO}\r
+ ${EndIf}\r
+ ${EndIf}\r
+FunctionEnd\r
+\r
+Function DisableServerSections\r
+ !InsertMacro UnselectSection ${SecGroupServer}\r
+ !InsertMacro SetSectionFlag ${SecGroupServer} ${SF_RO}\r
+ !InsertMacro UnselectSection ${SecStorageDaemon}\r
+ !InsertMacro SetSectionFlag ${SecStorageDaemon} ${SF_RO}\r
+ !InsertMacro UnselectSection ${SecDirectorDaemon}\r
+ !InsertMacro SetSectionFlag ${SecDirectorDaemon} ${SF_RO}\r
+FunctionEnd\r
+\r
+Function UpdateComponentUI\r
+ Push $R0\r
+ Push $R1\r
+\r
+ Call GetSelectedComponents\r
+ Pop $R0\r
+\r
+ IntOp $R1 $R0 ^ $PreviousComponents\r
+ IntOp $NewComponents $R0 & $R1\r
+\r
+ ${If} $InstallType <> ${NewInstall}\r
+ IntOp $R1 $NewComponents & ${ComponentFile}\r
+ ${If} $R1 <> 0\r
+ !InsertMacro SetSectionFlag ${SecFileDaemon} ${SF_BOLD}\r
+ ${Else}\r
+ !InsertMacro ClearSectionFlag ${SecFileDaemon} ${SF_BOLD}\r
+ ${EndIf}\r
+ IntOp $R1 $NewComponents & ${ComponentStorage}\r
+ ${If} $R1 <> 0\r
+ !InsertMacro SetSectionFlag ${SecStorageDaemon} ${SF_BOLD}\r
+ ${Else}\r
+ !InsertMacro ClearSectionFlag ${SecStorageDaemon} ${SF_BOLD}\r
+ ${EndIf}\r
+ IntOp $R1 $NewComponents & ${ComponentDirector}\r
+ ${If} $R1 <> 0\r
+ !InsertMacro SetSectionFlag ${SecDirectorDaemon} ${SF_BOLD}\r
+ ${Else}\r
+ !InsertMacro ClearSectionFlag ${SecDirectorDaemon} ${SF_BOLD}\r
+ ${EndIf}\r
+ IntOp $R1 $NewComponents & ${ComponentTextConsole}\r
+ ${If} $R1 <> 0\r
+ !InsertMacro SetSectionFlag ${SecConsole} ${SF_BOLD}\r
+ ${Else}\r
+ !InsertMacro ClearSectionFlag ${SecConsole} ${SF_BOLD}\r
+ ${EndIf}\r
+ IntOp $R1 $NewComponents & ${ComponentGUIConsole}\r
+ ${If} $R1 <> 0\r
+ !InsertMacro SetSectionFlag ${SecWxConsole} ${SF_BOLD}\r
+ ${Else}\r
+ !InsertMacro ClearSectionFlag ${SecWxConsole} ${SF_BOLD}\r
+ ${EndIf}\r
+ IntOp $R1 $NewComponents & ${ComponentPDFDocs}\r
+ ${If} $R1 <> 0\r
+ !InsertMacro SetSectionFlag ${SecDocPdf} ${SF_BOLD}\r
+ ${Else}\r
+ !InsertMacro ClearSectionFlag ${SecDocPdf} ${SF_BOLD}\r
+ ${EndIf}\r
+ IntOp $R1 $NewComponents & ${ComponentHTMLDocs}\r
+ ${If} $R1 <> 0\r
+ !InsertMacro SetSectionFlag ${SecDocHtml} ${SF_BOLD}\r
+ ${Else}\r
+ !InsertMacro ClearSectionFlag ${SecDocHtml} ${SF_BOLD}\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ GetDlgItem $R0 $HWNDPARENT 1\r
+\r
+ IntOp $R1 $NewComponents & ${ComponentsRequiringUserConfig}\r
+ ${If} $R1 = 0\r
+ SendMessage $R0 ${WM_SETTEXT} 0 "STR:Install"\r
+ ${Else}\r
+ SendMessage $R0 ${WM_SETTEXT} 0 "STR:&Next >"\r
+ ${EndIf}\r
+\r
+ Pop $R1\r
+ Pop $R0\r
+FunctionEnd\r
+\r
+!include "InstallType.nsh"\r
+!include "ConfigPage1.nsh"\r
+!include "ConfigPage2.nsh"\r
+!include "DumpLog.nsh"\r
--- /dev/null
+Function EnterConfigPage1\r
+ ${If} $AutomaticInstall = 1\r
+ Abort\r
+ ${EndIf}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentsFileAndStorage}\r
+\r
+ ${If} $R0 = 0\r
+ Abort\r
+ ${EndIf}\r
+\r
+ FileOpen $R5 "$PLUGINSDIR\ConfigPage1.ini" w\r
+\r
+ StrCpy $R6 1 ; Field Number\r
+ StrCpy $R7 0 ; Top\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentFile}\r
+ ${If} $R0 <> 0\r
+ IntOp $R8 $R7 + 52\r
+ 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'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 12\r
+\r
+ IntOp $R8 $R7 + 8\r
+ 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'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+\r
+ IntOp $R8 $R8 + 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigClientName$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=158$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 2\r
+\r
+ IntOp $R8 $R8 - 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Port"$\r$\nLeft=172$\r$\nTop=$R7$\r$\nRight=188$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+\r
+ IntOp $R8 $R8 + 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigClientPort$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=218$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 2\r
+\r
+ IntOp $R8 $R8 - 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Max Jobs"$\r$\nLeft=238$\r$\nTop=$R7$\r$\nRight=270$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+\r
+ IntOp $R8 $R8 + 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigClientMaxJobs$\r$\nLeft=274$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 16\r
+\r
+ IntOp $R8 $R7 + 8\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Password"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+\r
+ IntOp $R8 $R8 + 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigClientPassword$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 14\r
+\r
+ IntOp $R8 $R7 + 10\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigClientInstallService$\r$\nText="Install as service"$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=118$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigClientStartService$\r$\nText="Start after install"$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=260$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 16\r
+ ${Endif}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentStorage}\r
+ ${If} $R0 <> 0\r
+ IntOp $R8 $R7 + 52\r
+ 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'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 12\r
+ \r
+ IntOp $R8 $R7 + 8\r
+ 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'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+\r
+ IntOp $R8 $R8 + 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigStorageName$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=158$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 2\r
+\r
+ IntOp $R8 $R8 - 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Port"$\r$\nLeft=172$\r$\nTop=$R7$\r$\nRight=188$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+\r
+ IntOp $R8 $R8 + 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigStoragePort$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=218$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 2\r
+\r
+ IntOp $R8 $R8 - 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Max Jobs"$\r$\nLeft=238$\r$\nTop=$R7$\r$\nRight=270$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+\r
+ IntOp $R8 $R8 + 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigStorageMaxJobs$\r$\nLeft=274$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 16\r
+\r
+ IntOp $R8 $R7 + 8\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Password"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+\r
+ IntOp $R8 $R8 + 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigStoragePassword$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 14\r
+\r
+ IntOp $R8 $R7 + 10\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigStorageInstallService$\r$\nText="Install as service"$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=118$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigStorageStartService$\r$\nText="Start after install"$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=260$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 16\r
+ ${Endif}\r
+\r
+ IntOp $R6 $R6 - 1\r
+\r
+ FileWrite $R5 "[Settings]$\r$\nNumFields=$R6$\r$\n"\r
+\r
+ FileClose $R5\r
+\r
+ !insertmacro MUI_HEADER_TEXT "$(TITLE_ConfigPage1)" "$(SUBTITLE_ConfigPage1)"\r
+ !insertmacro MUI_INSTALLOPTIONS_INITDIALOG "ConfigPage1.ini"\r
+ Pop $HDLG ;HWND of dialog\r
+\r
+ ; Initialize Controls\r
+\r
+ StrCpy $R6 1 ; Field Number\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentFile}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 2\r
+\r
+ ; Client Name\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"\r
+ SendMessage $HCTL ${EM_LIMITTEXT} 30 0\r
+\r
+ IntOp $R6 $R6 + 2\r
+\r
+ ; Client Port Number\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"\r
+ SendMessage $HCTL ${EM_LIMITTEXT} 5 0\r
+\r
+ IntOp $R6 $R6 + 2\r
+\r
+ ; Max Jobs\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"\r
+ SendMessage $HCTL ${EM_LIMITTEXT} 3 0\r
+\r
+ IntOp $R6 $R6 + 5\r
+ ${Endif}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentStorage}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 2\r
+\r
+ ; Storage Name\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"\r
+ SendMessage $HCTL ${EM_LIMITTEXT} 30 0\r
+\r
+ IntOp $R6 $R6 + 2\r
+\r
+ ; Storage Port Number\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"\r
+ SendMessage $HCTL ${EM_LIMITTEXT} 5 0\r
+\r
+ IntOp $R6 $R6 + 2\r
+\r
+ ; Max Jobs\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"\r
+ SendMessage $HCTL ${EM_LIMITTEXT} 3 0\r
+\r
+ IntOp $R6 $R6 + 5\r
+ ${Endif}\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_SHOW\r
+\r
+ ; Process results\r
+\r
+ StrCpy $R6 3\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentFile}\r
+ ${If} $R0 <> 0\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientName "ConfigPage1.ini" "Field $R6" "State"\r
+\r
+ IntOp $R6 $R6 + 2\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientPort "ConfigPage1.ini" "Field $R6" "State"\r
+\r
+ IntOp $R6 $R6 + 2\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientMaxJobs "ConfigPage1.ini" "Field $R6" "State"\r
+\r
+ IntOp $R6 $R6 + 2\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientPassword "ConfigPage1.ini" "Field $R6" "State"\r
+\r
+ IntOp $R6 $R6 + 1\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientInstallService "ConfigPage1.ini" "Field $R6" "State"\r
+\r
+ IntOp $R6 $R6 + 1\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientStartService "ConfigPage1.ini" "Field $R6" "State"\r
+\r
+ IntOp $R6 $R6 + 3\r
+ ${Endif}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentStorage}\r
+ ${If} $R0 <> 0\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStorageName "ConfigPage1.ini" "Field $R6" "State"\r
+\r
+ IntOp $R6 $R6 + 2\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStoragePort "ConfigPage1.ini" "Field $R6" "State"\r
+\r
+ IntOp $R6 $R6 + 2\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStorageMaxJobs "ConfigPage1.ini" "Field $R6" "State"\r
+\r
+ IntOp $R6 $R6 + 2\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStoragePassword "ConfigPage1.ini" "Field $R6" "State"\r
+\r
+ IntOp $R6 $R6 + 1\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStorageInstallService "ConfigPage1.ini" "Field $R6" "State"\r
+\r
+ IntOp $R6 $R6 + 1\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStorageStartService "ConfigPage1.ini" "Field $R6" "State"\r
+\r
+ IntOp $R6 $R6 + 3\r
+ ${Endif}\r
+FunctionEnd\r
+\r
+Function LeaveConfigPage1\r
+ StrCpy $R6 5\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentFile}\r
+ ${If} $R0 <> 0\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage1.ini" "Field $R6" "State"\r
+ ${If} $R0 < 1024\r
+ ${OrIf} $R0 > 65535\r
+ MessageBox MB_OK "Port must be between 1024 and 65535 inclusive."\r
+ Abort\r
+ ${EndIf}\r
+\r
+ IntOp $R6 $R6 + 2\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage1.ini" "Field $R6" "State"\r
+ ${If} $R0 < 1\r
+ ${OrIf} $R0 > 99\r
+ MessageBox MB_OK "Max Jobs must be between 1 and 99 inclusive."\r
+ Abort\r
+ ${EndIf}\r
+\r
+ IntOp $R6 $R6 + 9\r
+ ${Endif}\r
+ \r
+ IntOp $R0 $NewComponents & ${ComponentStorage}\r
+ ${If} $R0 <> 0\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage1.ini" "Field $R6" "State"\r
+ ${If} $R0 < 1024\r
+ ${OrIf} $R0 > 65535\r
+ MessageBox MB_OK "Port must be between 1024 and 65535 inclusive."\r
+ Abort\r
+ ${EndIf}\r
+\r
+ IntOp $R6 $R6 + 2\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage1.ini" "Field $R6" "State"\r
+ ${If} $R0 < 1\r
+ ${OrIf} $R0 > 99\r
+ MessageBox MB_OK "Max Jobs must be between 1 and 99 inclusive."\r
+ Abort\r
+ ${EndIf}\r
+\r
+ IntOp $R6 $R6 + 9\r
+ ${Endif}\r
+FunctionEnd\r
--- /dev/null
+Function EnterConfigPage2\r
+ IntOp $R0 $NewComponents & ${ComponentsRequiringUserConfig}\r
+\r
+ ${If} $R0 = 0\r
+ Abort\r
+ ${EndIf}\r
+\r
+ FileOpen $R5 "$PLUGINSDIR\ConfigPage2.ini" w\r
+\r
+ StrCpy $R6 1 ; Field Number\r
+ StrCpy $R7 0 ; Top\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentDirector}\r
+ ${If} $R0 <> 0\r
+ ${If} $AutomaticInstall = 1\r
+ IntOp $R8 $R7 + 54\r
+ ${Else}\r
+ IntOp $R8 $R7 + 92\r
+ ${EndIf}\r
+ 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'\r
+ ${Else}\r
+ IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}\r
+ ${If} $R0 <> 0\r
+ IntOp $R8 $R7 + 54\r
+ ${Else}\r
+ IntOp $R8 $R7 + 26\r
+ ${EndIf}\r
+ 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'\r
+ ${EndIf}\r
+\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 12\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentDirector}\r
+ ${If} $R0 <> 0\r
+ ${If} "$ConfigDirectorName" == ""\r
+ StrCpy $ConfigDirectorName "$HostName-dir"\r
+ ${EndIf}\r
+ ${If} "$ConfigDirectorPassword" == ""\r
+ StrCpy $ConfigDirectorPassword "$LocalDirectorPassword"\r
+ ${EndIf}\r
+ ${Else}\r
+ ${If} "$ConfigDirectorName" == "$HostName-dir"\r
+ StrCpy $ConfigDirectorName ""\r
+ ${EndIf}\r
+ ${If} "$ConfigDirectorPassword" == "$LocalDirectorPassword"\r
+ StrCpy $ConfigDirectorPassword ""\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentDirector}\r
+ ${If} $R0 = 0\r
+ ${OrIf} $AutomaticInstall = 0\r
+ IntOp $R8 $R7 + 8\r
+ 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'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+\r
+ IntOp $R8 $R8 + 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorName$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=158$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+\r
+ ${If} $AutomaticInstall = 0\r
+ IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}\r
+ ${If} $R0 <> 0\r
+ IntOp $R7 $R7 + 2\r
+ IntOp $R8 $R8 - 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Port"$\r$\nLeft=172$\r$\nTop=$R7$\r$\nRight=188$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+\r
+ IntOp $R8 $R8 + 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigDirectorPort$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=218$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ ${EndIf}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentDirector}\r
+ ${If} $R0 <> 0\r
+ IntOp $R7 $R7 + 2\r
+ IntOp $R8 $R8 - 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Max Jobs"$\r$\nLeft=238$\r$\nTop=$R7$\r$\nRight=270$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+\r
+ IntOp $R8 $R8 + 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigDirectorMaxJobs$\r$\nLeft=274$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ IntOp $R7 $R7 + 14\r
+ ${EndIf}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}\r
+ ${If} $R0 <> 0\r
+ ${OrIf} $AutomaticInstall = 0\r
+ IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}\r
+ ${If} $R0 <> 0\r
+ IntOp $R7 $R7 + 2\r
+ IntOp $R8 $R7 + 8\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Password"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+ IntOp $R8 $R8 + 2\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorPassword$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 14\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentDirector}\r
+ ${If} $R0 <> 0\r
+ IntOp $R7 $R7 + 2\r
+ IntOp $R8 $R7 + 8\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Mail Server"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=48$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+ IntOp $R8 $R8 + 2\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorMailServer$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 16\r
+ IntOp $R8 $R7 + 8\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Mail Address"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=48$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+ IntOp $R8 $R8 + 2\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorMailAddress$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 16\r
+ IntOp $R8 $R7 + 8\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Database"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+ IntOp $R8 $R8 + 2\r
+\r
+ ${If} $ConfigDirectorDB = 0\r
+ ${If} $MySQLPath != ""\r
+ StrCpy $ConfigDirectorDB 1\r
+ ${ElseIf} $PostgreSQLPath != ""\r
+ StrCpy $ConfigDirectorDB 2\r
+ ${Else}\r
+ StrCpy $ConfigDirectorDB 3\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ ${If} $ConfigDirectorDB = 1\r
+ StrCpy $R9 1\r
+ ${Else}\r
+ StrCpy $R9 0\r
+ ${EndIf}\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="RadioButton"$\r$\nState=$R9$\r$\nText="MySQL"$\r$\nFlags="GROUP"$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=90$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+\r
+ IntOp $R6 $R6 + 1\r
+\r
+ ${If} $ConfigDirectorDB = 2\r
+ StrCpy $R9 1\r
+ ${Else}\r
+ StrCpy $R9 0\r
+ ${EndIf}\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="RadioButton"$\r$\nState=$R9$\r$\nText="PostgreSQL"$\r$\nFlags="NOTABSTOP"$\r$\nLeft=94$\r$\nTop=$R7$\r$\nRight=146$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+\r
+ IntOp $R6 $R6 + 1\r
+\r
+ ${If} $ConfigDirectorDB = 3\r
+ StrCpy $R9 1\r
+ ${Else}\r
+ StrCpy $R9 0\r
+ ${EndIf}\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="RadioButton"$\r$\nState=$R9$\r$\nText="Sqlite"$\r$\nFlags="NOTABSTOP"$\r$\nLeft=150$\r$\nTop=$R7$\r$\nRight=182$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 12\r
+\r
+ ${If} $AutomaticInstall = 0\r
+ IntOp $R8 $R7 + 10\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigDirectorInstallService$\r$\nText="Install as service"$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=118$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigDirectorStartService$\r$\nText="Start after install"$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=260$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 12\r
+ ${EndIf}\r
+ ${Else}\r
+ IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}\r
+ ${If} $R0 <> 0\r
+ IntOp $R7 $R7 + 2\r
+ IntOp $R8 $R7 + 8\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Address"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=48$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+ IntOp $R8 $R8 + 2\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorAddress$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 14\r
+ IntOp $R8 $R7 + 8\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ IntOp $R7 $R7 + 4\r
+\r
+ ${If} $AutomaticInstall = 0\r
+ IntOp $R0 $NewComponents & ${ComponentsFileAndStorageAndDirector}\r
+ ${If} $R0 <> 0\r
+ IntOp $R8 $R7 + 42\r
+\r
+ 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'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 12\r
+\r
+ IntOp $R8 $R7 + 8\r
+ 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'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+\r
+ IntOp $R8 $R8 + 2\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigMonitorName$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=150$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 16\r
+ IntOp $R8 $R7 + 8\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Password"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 - 2\r
+ IntOp $R8 $R8 + 2\r
+\r
+ FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigMonitorPassword$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'\r
+\r
+ IntOp $R6 $R6 + 1\r
+ IntOp $R7 $R7 + 20\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ IntOp $R6 $R6 - 1\r
+ FileWrite $R5 "[Settings]$\r$\nNumFields=$R6$\r$\n"\r
+\r
+ FileClose $R5\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentsFileAndStorage}\r
+ ${If} $R0 = 0\r
+ ${OrIf} $AutomaticInstall = 1\r
+ !insertmacro MUI_HEADER_TEXT "$(TITLE_ConfigPage1)" "$(SUBTITLE_ConfigPage1)"\r
+ ${Else}\r
+ !insertmacro MUI_HEADER_TEXT "$(TITLE_ConfigPage2)" "$(SUBTITLE_ConfigPage2)"\r
+ ${EndIf}\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_INITDIALOG "ConfigPage2.ini"\r
+ Pop $HDLG ;HWND of dialog\r
+\r
+ ; Initialize Controls\r
+ StrCpy $R6 2 ; Field Number\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentDirector}\r
+ ${If} $R0 = 0\r
+ ${OrIf} $AutomaticInstall = 0\r
+ ; Name\r
+ IntOp $R6 $R6 + 1\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND"\r
+ SendMessage $HCTL ${EM_LIMITTEXT} 30 0\r
+ IntOp $R6 $R6 + 1\r
+\r
+ ${If} $AutomaticInstall = 0\r
+ IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 1\r
+ ; Port Number\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND"\r
+ SendMessage $HCTL ${EM_LIMITTEXT} 5 0\r
+ IntOp $R6 $R6 + 1\r
+ ${EndIf}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentDirector}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 1\r
+ ; Max Jobs\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND"\r
+ SendMessage $HCTL ${EM_LIMITTEXT} 3 0\r
+\r
+ IntOp $R6 $R6 + 1\r
+ ${EndIf}\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}\r
+ ${If} $R0 <> 0\r
+ ${OrIf} $AutomaticInstall = 0\r
+ IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 2\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentDirector}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 9\r
+\r
+ ${If} $AutomaticInstall = 0\r
+ IntOp $R6 $R6 + 2\r
+ ${EndIf}\r
+ ${Else}\r
+ IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 2\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ ${If} $AutomaticInstall = 0\r
+ IntOp $R0 $NewComponents & ${ComponentsFileAndStorageAndDirector}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 2\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND"\r
+ SendMessage $HCTL ${EM_LIMITTEXT} 30 0\r
+ IntOp $R6 $R6 + 2\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_SHOW\r
+\r
+ ; Process results\r
+\r
+ StrCpy $R6 2\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentDirector}\r
+ ${If} $R0 = 0\r
+ ${OrIf} $AutomaticInstall = 0\r
+ IntOp $R6 $R6 + 1\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorName "ConfigPage2.ini" "Field $R6" "State"\r
+ IntOp $R6 $R6 + 1\r
+\r
+ ${If} $AutomaticInstall = 0\r
+ IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 1\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorPort "ConfigPage2.ini" "Field $R6" "State"\r
+ IntOp $R6 $R6 + 1\r
+ ${EndIf}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentDirector}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 1\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorMaxJobs "ConfigPage2.ini" "Field $R6" "State"\r
+ IntOp $R6 $R6 + 1\r
+ ${EndIf}\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}\r
+ ${If} $R0 <> 0\r
+ ${OrIf} $AutomaticInstall = 0\r
+ IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 1\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorPassword "ConfigPage2.ini" "Field $R6" "State"\r
+ IntOp $R6 $R6 + 1\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentDirector}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 1\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorMailServer "ConfigPage2.ini" "Field $R6" "State"\r
+ IntOp $R6 $R6 + 2\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorMailAddress "ConfigPage2.ini" "Field $R6" "State"\r
+ IntOp $R6 $R6 + 2\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $R5 "ConfigPage2.ini" "Field $R6" "State"\r
+ ${If} $R5 = 1\r
+ StrCpy $ConfigDirectorDB 1\r
+ ${Endif}\r
+ IntOp $R6 $R6 + 1\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $R5 "ConfigPage2.ini" "Field $R6" "State"\r
+ ${If} $R5 = 1\r
+ StrCpy $ConfigDirectorDB 2\r
+ ${Endif}\r
+ IntOp $R6 $R6 + 1\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $R5 "ConfigPage2.ini" "Field $R6" "State"\r
+ ${If} $R5 = 1\r
+ StrCpy $ConfigDirectorDB 3\r
+ ${Endif}\r
+ IntOp $R6 $R6 + 1\r
+\r
+ ${If} $AutomaticInstall = 0\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorInstallService "ConfigPage2.ini" "Field $R6" "State"\r
+ IntOp $R6 $R6 + 1\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorStartService "ConfigPage2.ini" "Field $R6" "State"\r
+ IntOp $R6 $R6 + 1\r
+ ${EndIf}\r
+ ${Else}\r
+ IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 1\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorAddress "ConfigPage2.ini" "Field $R6" "State"\r
+ IntOp $R6 $R6 + 1\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ ${If} $AutomaticInstall = 0\r
+ IntOp $R0 $NewComponents & ${ComponentsFileAndStorageAndDirector}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 2\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigMonitorName "ConfigPage2.ini" "Field $R6" "State"\r
+ IntOp $R6 $R6 + 2\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ConfigMonitorPassword "ConfigPage2.ini" "Field $R6" "State"\r
+ ${EndIf}\r
+ ${EndIf}\r
+FunctionEnd\r
+\r
+Function LeaveConfigPage2\r
+ ${If} $AutomaticInstall = 0\r
+ StrCpy $R6 4\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 1\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage2.ini" "Field $R6" "State"\r
+ ${If} $R0 < 1024\r
+ ${OrIf} $R0 > 65535\r
+ MessageBox MB_OK "Port must be between 1024 and 65535 inclusive."\r
+ Abort\r
+ ${EndIf}\r
+ IntOp $R6 $R6 + 1\r
+ ${EndIf}\r
+\r
+ IntOp $R0 $NewComponents & ${ComponentDirector}\r
+ ${If} $R0 <> 0\r
+ IntOp $R6 $R6 + 1\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage2.ini" "Field $R6" "State"\r
+ ${If} $R0 < 1\r
+ ${OrIf} $R0 > 99\r
+ MessageBox MB_OK "Max Jobs must be between 1 and 99 inclusive."\r
+ Abort\r
+ ${EndIf}\r
+ IntOp $R6 $R6 + 1\r
+ ${EndIf}\r
+ ${EndIf}\r
+FunctionEnd\r
--- /dev/null
+!define LVM_GETITEMCOUNT 0x1004\r
+!define LVM_GETITEMTEXT 0x102D\r
+\r
+Function DumpLog\r
+ Exch $5\r
+ Push $0\r
+ Push $1\r
+ Push $2\r
+ Push $3\r
+ Push $4\r
+ Push $6\r
+\r
+ FindWindow $0 "#32770" "" $HWNDPARENT\r
+ GetDlgItem $0 $0 1016\r
+ StrCmp $0 0 error\r
+ FileOpen $5 $5 "w"\r
+ StrCmp $5 0 error\r
+ SendMessage $0 ${LVM_GETITEMCOUNT} 0 0 $6\r
+ System::Alloc ${NSIS_MAX_STRLEN}\r
+ Pop $3\r
+ StrCpy $2 0\r
+ System::Call "*(i, i, i, i, i, i, i, i, i) i \\r
+ (0, 0, 0, 0, 0, r3, ${NSIS_MAX_STRLEN}) .r1"\r
+ loop: StrCmp $2 $6 done\r
+ System::Call "User32::SendMessageA(i, i, i, i) i \\r
+ ($0, ${LVM_GETITEMTEXT}, $2, r1)"\r
+ System::Call "*$3(&t${NSIS_MAX_STRLEN} .r4)"\r
+ FileWrite $5 "$4$\r$\n"\r
+ IntOp $2 $2 + 1\r
+ Goto loop\r
+ done:\r
+ FileClose $5\r
+ System::Free $1\r
+ System::Free $3\r
+ Goto exit\r
+ error:\r
+ MessageBox MB_OK error\r
+ exit:\r
+ Pop $6\r
+ Pop $4\r
+ Pop $3\r
+ Pop $2\r
+ Pop $1\r
+ Pop $0\r
+ Exch $5\r
+FunctionEnd\r
--- /dev/null
+[Settings]\r
+NumFields=6\r
+\r
+[Field 1]\r
+Type=Label\r
+Text=This is a new installation. Please choose the installation type.\r
+Left=0\r
+Right=300\r
+Top=0\r
+Bottom=28\r
+\r
+[Field 2]\r
+Type=GroupBox\r
+Text=Installation Type\r
+Left=0\r
+Right=300\r
+Top=32\r
+Bottom=136\r
+\r
+[Field 3]\r
+Type=RadioButton\r
+Text=Automatic\r
+State=1\r
+Left=6\r
+Right=52\r
+Top=44\r
+Bottom=54\r
+\r
+[Field 4]\r
+Type=RadioButton\r
+Text=Custom\r
+Left=6\r
+Right=44\r
+Top=90\r
+Bottom=100\r
+\r
+[Field 5]\r
+Type=Label\r
+Text=The software will be installed in the default directory "Program Files\\Bacula". The configuration files will be generated using defaults applicable to most installations.\r
+Left=17\r
+Right=295\r
+Top=58\r
+Bottom=86\r
+\r
+[Field 6]\r
+Type=Label\r
+Text=You may choose the installation directory. The configuration defaults will be displayed and you will be given the chance to make changes before the configuration files are written.\r
+Left=17\r
+Right=295\r
+Top=104\r
+Bottom=132\r
--- /dev/null
+Function EnterInstallType\r
+ Push $R0\r
+ Push $R1\r
+ Push $R2\r
+\r
+ ; Check if this is an upgrade by looking for an uninstaller configured \r
+ ; in the registry.\r
+ ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "UninstallString"\r
+\r
+ ${If} "$R0" != ""\r
+ ; Check registry for new installer\r
+ ReadRegStr $R1 HKLM "Software\Bacula" "InstallLocation"\r
+ ${If} "$R1" != ""\r
+ ; New Installer \r
+ StrCpy $OldInstallDir $R1\r
+ StrCpy $InstallType ${UpgradeInstall}\r
+\r
+ SetShellVarContext all\r
+\r
+ StrCpy $R1 "$APPDATA\Bacula"\r
+ StrCpy $R2 "$INSTDIR\Doc"\r
+\r
+ ReadRegDWORD $PreviousComponents HKLM "Software\Bacula" "Components"\r
+\r
+ WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 1" "Text" "A previous installation has been found in $OldInstallDir. Please choose the installation type for any additional components you select."\r
+ WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 5" "Text" "The configuration files for additional components will be generated using defaults applicable to most installations."\r
+ WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 6" "Text" "The configuration defaults for additional components will be displayed and you will be given the chance to make changes before the configuration files are written."\r
+\r
+ ReadRegDWORD $ConfigDirectorDB HKLM Software\Bacula Database\r
+\r
+ ${If} $ConfigDirectorDB = 0\r
+ IntOp $R0 $PreviousComponents & ${ComponentDirector}\r
+ ${If} $R0 <> 0\r
+ StrCpy $ConfigDirectorDB 1\r
+ ${EndIf}\r
+ ${EndIf}\r
+ ${Else}\r
+ ; Processing Upgrade - Get Install Directory\r
+ ${StrRep} $R0 $R0 '"' ''\r
+ ${GetParent} $R0 $OldInstallDir\r
+\r
+ ; Old Installer \r
+ StrCpy $InstallType ${MigrateInstall}\r
+ StrCpy $R1 "$OldInstallDir\bin"\r
+ StrCpy $R2 "$OldInstallDir\Doc"\r
+\r
+ WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 1" "Text" "An old installation has been found in $OldInstallDir. The Configuration will be migrated. Please choose the installation type for any additional components you select."\r
+ WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 5" "Text" "The software will be installed in the default directory $\"$PROGRAMFILES\Bacula$\". The configuration files for additional components will be generated using defaults applicable to most installations."\r
+ WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 6" "Text" "You may choose the installation directory. The configuration defaults will be displayed and you will be given the chance to make changes before the configuration files are written."\r
+ ${EndIf}\r
+ ${Else}\r
+ ; New Install\r
+ StrCpy $InstallType ${NewInstall}\r
+ WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 5" "Text" "The software will be installed in the default directory $\"$PROGRAMFILES\Bacula$\". The configuration files will be generated using defaults applicable to most installations."\r
+ ${EndIf}\r
+\r
+ ${If} $InstallType <> ${NewInstall}\r
+ ${AndIf} $PreviousComponents = 0\r
+ ${If} ${FileExists} "$R1\bacula-fd.conf"\r
+ IntOp $PreviousComponents $PreviousComponents | ${ComponentFile}\r
+ ${EndIf}\r
+ ${If} ${FileExists} "$R1\bconsole.conf"\r
+ IntOp $PreviousComponents $PreviousComponents | ${ComponentTextConsole}\r
+ ${EndIf}\r
+ ${If} ${FileExists} "$R1\wx-console.conf"\r
+ IntOp $PreviousComponents $PreviousComponents | ${ComponentGUIConsole}\r
+ ${EndIf}\r
+ ${If} ${FileExists} "$R2\bacula.pdf"\r
+ IntOp $PreviousComponents $PreviousComponents | ${ComponentPDFDocs}\r
+ ${EndIf}\r
+ ${If} ${FileExists} "$R2\bacula\bacula.html"\r
+ IntOp $PreviousComponents $PreviousComponents | ${ComponentHTMLDocs}\r
+ ${EndIf}\r
+ ${If} ${FileExists} "$R2\bacula.html"\r
+ IntOp $PreviousComponents $PreviousComponents | ${ComponentHTMLDocs}\r
+ ${EndIf}\r
+ ${EndIf}\r
+\r
+ !InsertMacro MUI_HEADER_TEXT "$(TITLE_InstallType)" "$(SUBTITLE_InstallType)"\r
+ !InsertMacro MUI_INSTALLOPTIONS_INITDIALOG "InstallType.ini"\r
+ Pop $HDLG ;HWND of dialog\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_SHOW\r
+\r
+ ; Process Results\r
+\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $R0 "InstallType.ini" "Field 3" "State"\r
+\r
+ ${If} $R0 = 1\r
+ StrCpy $AutomaticInstall 1\r
+ ${Else}\r
+ StrCpy $AutomaticInstall 0\r
+ ${EndIf}\r
+\r
+ Pop $R2\r
+ Pop $R1\r
+ Pop $R0\r
+FunctionEnd\r
--- /dev/null
+#
+# Makefile for win32 bacula executables
+# Using MinGW cross-compiler on GNU/Linux
+#
+# Written by Eric Bollengier, March 2009
+# based on work by Robert Nelson
+#
+
+include ../Makefile.inc
+
+VERSION := $(shell sed -ne 's/.*[ \t]VERSION[ \t][ \t]*"\(.*\)"/\1/p' < ../../version.h)
+
+DEFINES := \
+ -DVERSION=$(VERSION) \
+ -DOUT_DIR=..\\release \
+ -DSRC_DIR=release \
+ -DWINVER=64 \
+ -DBUILD_TOOLS=MinGW64 \
+
+INSTALL_EXE := $(BUILDDIR)/release/winbacula-$(VERSION).exe
+
+BACULA_BINARIES := \
+ bacula.dll \
+ exchange-fd.dll \
+ bsleep.exe \
+ bsmtp.exe \
+ bacula-fd.exe
+
+DEPKGS32_BINARIES := \
+ sed.exe \
+ expr64.exe \
+ snooze.exe
+
+DEPKGS_BINARIES := \
+ openssl.exe \
+ cryptoeay32-0.9.8.dll \
+ ssleay32-0.9.8.dll \
+ pthreadGCE.dll \
+ zlib1.dll
+
+NONGCC_BINARIES := \
+ libmysql.dll
+
+NONGCC_LIBRARIES := \
+ libpq.dll
+
+MINGW_BINARIES := \
+ mingwm10.dll
+
+SCRIPT_FILES := \
+ mtx-changer.cmd \
+ disk-changer.cmd \
+ dvd-handler.cmd
+
+CAT_FILES := \
+ create_mysql_database.cmd \
+ drop_mysql_database.cmd \
+ make_mysql_tables.cmd \
+ make_mysql_tables.sql \
+ drop_mysql_tables.cmd \
+ drop_mysql_tables.sql \
+ grant_mysql_privileges.cmd \
+ grant_mysql_privileges.sql \
+ make_mysql_catalog_backup.cmd \
+ create_postgresql_database.cmd \
+ create_postgresql_database.sql \
+ drop_postgresql_database.cmd \
+ make_postgresql_tables.cmd \
+ make_postgresql_tables.sql \
+ drop_postgresql_tables.cmd \
+ drop_postgresql_tables.sql \
+ grant_postgresql_privileges.cmd \
+ grant_postgresql_privileges.sql \
+ make_postgresql_catalog_backup.cmd \
+ create_sqlite3_database.cmd \
+ drop_sqlite3_database.cmd \
+ make_sqlite3_tables.cmd \
+ make_sqlite3_tables.sql \
+ drop_sqlite3_tables.cmd \
+ grant_sqlite3_privileges.cmd \
+ make_sqlite3_catalog_backup.cmd \
+ delete_catalog_backup.cmd
+
+DIRD_FILES := \
+ query.sql
+
+SSL_FILES := \
+ openssl.cnf
+
+DOC_FILES := \
+ manual/bacula.pdf \
+ manual/bacula/*.html \
+ manual/bacula/*.png \
+ manual/bacula/*.css
+
+##########################################################################
+
+# Targets
+
+.PHONY: all clean installer
+
+all: $(INSTALL_EXE)
+
+installer: $(INSTALL_EXE)
+
+clean:
+ @echo "Cleaning `pwd`"
+ $(CMD_ECHO)-rm -f $(INSTALL_EXE)
+ $(CMD_ECHO)-rm -rf release
+
+#
+# Rules
+#
+
+define Convert_Binary
+release/$$(notdir $(1)): $(1)
+ $$(call checkdir,$$@)
+ $(ECHO_CMD)cp -f $$^ $$@ ; \
+ $(STAB2CV) $$@
+endef
+
+define Copy_Binary
+release/$$(notdir $(1)): $(1)
+ $$(call checkdir,$$@)
+ $(ECHO_CMD)cp -f $$^ $$@
+endef
+
+define Copy_Docs
+release/$(1): $(DOCDIR)/$(1)
+ $$(call checkdir,$$@)
+ $(ECHO_CMD)cp -f $$^ $$(dir $$@)
+endef
+
+$(foreach file,$(addprefix $(DEPKGS32)/bin/, $(DEPKGS32_BINARIES)),$(eval $(call Convert_Binary,$(file))))
+
+$(foreach file,$(addprefix $(DEPKGS)/bin/, $(DEPKGS_BINARIES)),$(eval $(call Convert_Binary,$(file))))
+
+#$(foreach file,$(addprefix $(DEPKGS)/bin/, $(NONGCC_BINARIES)),$(eval $(call Copy_Binary,$(file))))
+
+#$(foreach file,$(addprefix $(DEPKGS)/lib/, $(NONGCC_LIBRARIES)),$(eval $(call Copy_Binary,$(file))))
+
+$(foreach file,$(addprefix $(BINDIR)/, $(BACULA_BINARIES)),$(eval $(call Convert_Binary,$(file))))
+
+#$(foreach file,$(addprefix $(MINGW_DLLDIR)/, $(MINGW_BINARIES)),$(eval $(call Copy_Binary,$(file))))
+
+$(foreach file,$(addprefix $(DEPKGS32)/ssl/, $(SSL_FILES)),$(eval $(call Copy_Binary,$(file))))
+
+#$(foreach file,$(addprefix ../scripts/, $(SCRIPT_FILES)),$(eval $(call Copy_Binary,$(file))))
+
+#$(foreach file,$(addprefix ../cats/, $(CAT_FILES)),$(eval $(call Copy_Binary,$(file))))
+
+#$(foreach file,$(addprefix ../../dird/, $(DIRD_FILES)),$(eval $(call Copy_Binary,$(file))))
+
+#$(foreach file,$(DOC_FILES),$(eval $(call Copy_Docs,$(file))))
+
+$(INSTALL_EXE): winbacula.nsi $(addprefix release/,$(BACULA_BINARIES) $(DEPKGS_BINARIES) $(DEPKGS32_BINARIES) $(SSL_FILES) )
+ NSISDIR=$(NSIS_DIR) \
+ $(NSIS_DIR)/makensis -V3 $(DEFINES) winbacula.nsi
+
+include $(BUILDDIR)/Makefile.rules
--- /dev/null
+Bacula - Windows Version Disclaimer
+===================================
+
+Please note, only the Win64 Client (File daemon) is supported, and
+contrary to the Win32 Client, the other components (Director, Storage daemon,
+their utilities) are not provided because they have not been ported.
+Note: the Win64 Client can only be installed on 64 bit Windows Operating
+systems.
+
+Bacula - Windows Version Notes
+==============================
+
+These notes highlight how the Windows version of Bacula differs from the
+other versions. It also provides any notes additional to the documentation.
+
+For detailed documentation on using, configuring and troubleshooting Bacula,
+please consult the installed documentation or the online documentation at
+http://www.bacula.org/?page=documentation.
+
+
+Start Menu Items
+----------------
+A number of menu items have been created in the Start menu under All Programs
+in the Bacula submenu. They may be selected to edit the configuration files,
+view the documentation or run one of the console or utility programs. The
+choices available will vary depending on the options you chose to install.
+
+
+File Locations
+--------------
+Everything is installed in the directory
+"C:\Program Files\Bacula" unless a different directory was selected during
+installation. Note: due to a bug in the NSIS installer we are using, on
+64 bit machines appears to install Bacula in "C:\Program Files (x86)\Bacula".
+
+Code Page Problems
+-------------------
+Please note that Bacula expects the contents of the configuration files to be
+written in UTF-8 format. Some translations of "Application Data" have accented
+characters, and apparently the installer writes this translated data in the
+standard Windows code page coding. This occurs for the Working Directory, and
+when it happens the daemon will not start since Bacula cannot find the directory.
+The workaround is to manually edit the appropriate conf file and ensure that it
+is written out in UTF-8 format.
+
+The conf files can be edited with any UTF-8 compatible editor, or on most
+modern Windows machines, you can edit them with notepad, then choose UTF-8
+output encoding before saving them.
--- /dev/null
+rem\r
+rem Bacula start file for Win95/98/Me\r
+rem\r
+cd c:\bacula\bin\r
+c:\bacula\bin\bacula-fd.exe /service -c c:\bacula\bin\bacula-fd.conf\r
--- /dev/null
+rem\r
+rem Bacula stop file for Win95/98/Me\r
+rem\r
+cd c:\bacula\bin\r
+c:\bacula\bin\bacula-fd.exe /kill\r
--- /dev/null
+[Settings]\r
+NumFields=5\r
+CancelEnabled=0\r
+BackEnabled=0\r
+\r
+[Field 1]\r
+Type="Label"\r
+Text="Templates of the Client and Storage resources can be generated that are customized with the information about this system. These templates can then be copied to the Director computer and included in the Director's configuration file."\r
+Left=7\r
+Right=293\r
+Top=6\r
+Bottom=32\r
+\r
+[Field 2]\r
+Type="CheckBox"\r
+Text="Client"\r
+Left=6\r
+Right=40\r
+Top=38\r
+Bottom=48\r
+\r
+[Field 3]\r
+Type="FileRequest"\r
+State="Client.conf"\r
+Flags=\r
+Filter=Configuration Files|*.conf|All Files|*.*\r
+Left=16\r
+Right=288\r
+Top=50\r
+Bottom=62\r
+\r
+[Field 4]\r
+Type="CheckBox"\r
+Text="Storage"\r
+Left=6\r
+Right=48\r
+Top=70\r
+Bottom=80\r
+\r
+[Field 5]\r
+Type="FileRequest"\r
+State="Storage.conf"\r
+Flags=REQ_SAVE|FILE_EXPLORER|WARN_IF_EXIST\r
+Filter=Configuration Files|*.conf|All Files|*.*\r
+Left=16\r
+Right=288\r
+Top=82\r
+Bottom=94\r
--- /dev/null
+#\r
+# Default Bacula Director Configuration file\r
+#\r
+# The only thing that MUST be changed is to add one or more\r
+# file or directory names in the Include directive of the\r
+# FileSet resource.\r
+#\r
+# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ @DISTVER@\r
+#\r
+# You might also want to change the default email address\r
+# from root to your address. See the "mail" and "operator"\r
+# directives in the Messages resource.\r
+#\r
+\r
+Director { # define myself\r
+ Name = @director_name@\r
+ DIRport = @director_port@ # where we listen for UA connections\r
+ QueryFile = "@bin_dir@\\query.sql"\r
+ WorkingDirectory = "@working_dir@"\r
+ PidDirectory = "@working_dir@"\r
+ Maximum Concurrent Jobs = @director_maxjobs@\r
+ Password = "@director_password@" # Console password\r
+ Messages = Daemon\r
+}\r
+\r
+JobDefs {\r
+ Name = "DefaultJob"\r
+ Type = Backup\r
+ Level = Incremental\r
+ Client = @client_name@\r
+ FileSet = "Test Set"\r
+ Schedule = "WeeklyCycle"\r
+ Storage = File\r
+ Messages = Standard\r
+ Pool = Default\r
+ Priority = 10\r
+}\r
+\r
+\r
+#\r
+# Define the main nightly save backup job\r
+# By default, this job will back up to disk in C:/tmp\r
+Job {\r
+ Name = "Client1"\r
+ JobDefs = "DefaultJob"\r
+ Write Bootstrap = "@working_dir@\\Client1.bsr"\r
+}\r
+\r
+#Job {\r
+# Name = "Client2"\r
+# Client = @client_name@2\r
+# JobDefs = "DefaultJob"\r
+# Write Bootstrap = "@working_dir@\\Client2.bsr"\r
+#}\r
+\r
+# Backup the catalog database (after the nightly save)\r
+Job {\r
+ Name = "BackupCatalog"\r
+ JobDefs = "DefaultJob"\r
+ Level = Full\r
+ FileSet="Catalog"\r
+ Schedule = "WeeklyCycleAfterBackup"\r
+ # This creates an ASCII copy of the catalog\r
+ RunBeforeJob = "\"@bin_dir@\\make_catalog_backup\" bacula bacula"\r
+ # This deletes the copy of the catalog\r
+ RunAfterJob = "\"@bin_dir@\\delete_catalog_backup\""\r
+ Write Bootstrap = "@working_dir@\\BackupCatalog.bsr"\r
+ Priority = 11 # run after main backup\r
+}\r
+\r
+#\r
+# Standard Restore template, to be changed by Console program\r
+# Only one such job is needed for all Jobs/Clients/Storage ...\r
+#\r
+Job {\r
+ Name = "RestoreFiles"\r
+ Type = Restore\r
+ Client=@client_name@\r
+ FileSet="Test Set"\r
+ Storage = File\r
+ Pool = Default\r
+ Messages = Standard\r
+ Where = "C:\\tmp\\bacula-restores"\r
+}\r
+\r
+#\r
+# Note: Windows path separators do NOT work correctly in FileSets.\r
+#\r
+# List of files to be backed up\r
+FileSet {\r
+ Name = "Test Set"\r
+ Include {\r
+ Options {\r
+ signature = MD5\r
+ ignore case = yes\r
+ }\r
+# \r
+# Put your list of files here, preceded by 'File =', one per line\r
+# or include an external list with:\r
+#\r
+# File = <file-name\r
+#\r
+# Note: C:/ backs up everything on drive C.\r
+# if you have other drives such as D:/\r
+# you will probably want to add them too.\r
+#\r
+# By default this is defined to point to the Bacula \r
+# directory to give a reasonable FileSet to backup to\r
+# disk storage during initial testing.\r
+#\r
+ File = "@BUILD_DIR@"\r
+ }\r
+\r
+#\r
+# If you backup the root directory, the following excluded\r
+# files can be useful\r
+#\r
+ Exclude {\r
+ Options {\r
+ signature = MD5\r
+ ignore case = yes\r
+ }\r
+ File = C:/Temp\r
+ File = C:/tmp\r
+ }\r
+}\r
+\r
+#\r
+# This is an example which will backup all the hard drives of a Windows System.\r
+#\r
+FileSet {\r
+ Name = "Windows Full Set"\r
+ Enable VSS = yes\r
+ Include {\r
+ Options {\r
+ Signature = MD5\r
+ Exclude = yes\r
+ IgnoreCase = yes\r
+ EnhancedWild = yes\r
+ DriveType = fixed\r
+\r
+ # Exclude directories full of lots and lots of useless little files\r
+ WildDir = "[A-Z]:/Documents and Settings/*/Cookies"\r
+ WildDir = "[A-Z]:/Documents and Settings/*/Recent"\r
+ WildDir = "[A-Z]:/Documents and Settings/*/{Local Settings,LOCALS~1}/History"\r
+ WildDir = "[A-Z]:/Documents and Settings/*/{Local Settings,LOCALS~1}/Temp"\r
+ WildDir = "[A-Z]:/Documents and Settings/*/{Local Settings,LOCALS~1}/Temporary Internet Files"\r
+\r
+ # Exclude directories full of lots and lots of useless little files\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/Cookies"\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/Recent"\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/{Local Settings,LOCALS~1}/History"\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/{Local Settings,LOCALS~1}/Temp"\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/{Local Settings,LOCALS~1}/Temporary Internet Files"\r
+\r
+ # Exclude directories full of lots and lots of useless little files\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/Cookies"\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/Recent"\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/{Local Settings,LOCALS~1}/History"\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/{Local Settings,LOCALS~1}/Temp"\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/{Local Settings,LOCALS~1}/Temporary Internet Files"\r
+\r
+ # Some random bits of Windows we want to ignore\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/Prefetch"\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/msdownld.tmp"\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/Internet Logs"\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/$Nt*Uninstall*"\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/Downloaded Installations"\r
+\r
+ # Temporary directories & files\r
+ WildDir = "[A-Z]:/{WINNT,Windows}/Temp"\r
+ WildDir = "[A-Z]:/Temp"\r
+ WildFile = "*.tmp"\r
+ WildDir = "[A-Z]:/tmp"\r
+\r
+ # Fast Find\r
+ WildFile = "[A-Z]:/ffastun*"\r
+\r
+ # System Restore\r
+ WildDir = "[A-Z]:/System Volume Information"\r
+\r
+ # Windows Update\r
+ WildDir = "[A-Z]:/WUTemp"\r
+\r
+ # Recycle bins\r
+ WildDir = "[A-Z]:/RECYCLE[DR]"\r
+\r
+ # Swap files\r
+ WildFile = "[A-Z]:/pagefile.sys"\r
+ WildFile = "[A-Z]:/hiberfil.sys"\r
+\r
+ # These are programs and are easier to reinstall than restore from\r
+ # backup\r
+ WildDir = "[A-Z]:/cygwin"\r
+ WildDir = "[A-Z]:/{Program Files,PROGRA~1}/Java"\r
+ WildDir = "[A-Z]:/{Program Files,PROGRA~1}/Java Web Start"\r
+ WildDir = "[A-Z]:/{Program Files,PROGRA~1}/JavaSoft"\r
+ WildDir = "[A-Z]:/{Program Files,PROGRA~1}/Microsoft Office"\r
+ }\r
+\r
+ File = "C:/"\r
+ File = "D:/"\r
+ File = "E:/"\r
+ File = "F:/"\r
+ File = "G:/"\r
+ File = "H:/"\r
+ File = "I:/"\r
+ File = "J:/"\r
+ File = "K:/"\r
+ File = "L:/"\r
+ File = "M:/"\r
+ File = "N:/"\r
+ File = "O:/"\r
+ File = "P:/"\r
+ File = "Q:/"\r
+ File = "R:/"\r
+ File = "S:/"\r
+ File = "T:/"\r
+ File = "U:/"\r
+ File = "V:/"\r
+ File = "W:/"\r
+ File = "X:/"\r
+ File = "Y:/"\r
+ File = "Z:/"\r
+ }\r
+}\r
+\r
+#\r
+# When to do the backups, full backup on first sunday of the month,\r
+# differential (i.e. incremental since full) every other sunday,\r
+# and incremental backups other days\r
+Schedule {\r
+ Name = "WeeklyCycle"\r
+ Run = Full 1st sun at 23:05\r
+ Run = Differential 2nd-5th sun at 23:05\r
+ Run = Incremental mon-sat at 23:05\r
+}\r
+\r
+# This schedule does the catalog. It starts after the WeeklyCycle\r
+Schedule {\r
+ Name = "WeeklyCycleAfterBackup"\r
+ Run = Full sun-sat at 23:10\r
+}\r
+\r
+# This is the backup of the catalog\r
+FileSet {\r
+ Name = "Catalog"\r
+ Include {\r
+ Options {\r
+ signature = MD5\r
+ }\r
+ File = "@working_dir@\\bacula.sql"\r
+ }\r
+}\r
+\r
+# Client (File Services) to backup\r
+Client {\r
+ Name = @client_name@\r
+ Address = @client_address@\r
+ FDPort = @client_port@\r
+ Catalog = MyCatalog\r
+ Password = "@client_password@" # password for FileDaemon\r
+ File Retention = 30 days # 30 days\r
+ Job Retention = 6 months # six months\r
+ AutoPrune = yes # Prune expired Jobs/Files\r
+}\r
+\r
+#\r
+# Second Client (File Services) to backup\r
+# You should change Name, Address, and Password before using\r
+#\r
+#Client {\r
+# Name = @client_name@2\r
+# Address = @client_address@2\r
+# FDPort = @client_port@\r
+# Catalog = MyCatalog\r
+# Password = "@client_password@2" # password for FileDaemon 2\r
+# File Retention = 30 days # 30 days\r
+# Job Retention = 6 months # six months\r
+# AutoPrune = yes # Prune expired Jobs/Files\r
+#}\r
+\r
+\r
+# Definition of file storage device\r
+Storage {\r
+ Name = File\r
+# Do not use "localhost" here\r
+ Address = @storage_address@ # N.B. Use a fully qualified name here\r
+ SDPort = @storage_port@\r
+ Password = "@storage_password@"\r
+ Device = FileStorage\r
+ Media Type = File\r
+}\r
+\r
+\r
+\r
+# Definition of DDS tape storage device\r
+#Storage {\r
+# Name = DDS-4 \r
+# Do not use "localhost" here\r
+# Address = @storage_address@ # N.B. Use a fully qualified name here\r
+# SDPort = @storage_port@\r
+# Password = "@storage_password@" # password for Storage daemon\r
+# Device = DDS-4 # must be same as Device in Storage daemon\r
+# Media Type = DDS-4 # must be same as MediaType in Storage daemon\r
+# Autochanger = yes # enable for autochanger device\r
+#}\r
+\r
+# Definition of 8mm tape storage device\r
+#Storage {\r
+# Name = "8mmDrive"\r
+# Do not use "localhost" here\r
+# Address = @storage_address@ # N.B. Use a fully qualified name here\r
+# SDPort = @storage_port@\r
+# Password = "@storage_password@"\r
+# Device = "Exabyte 8mm"\r
+# MediaType = "8mm"\r
+#}\r
+\r
+\r
+# Generic catalog service\r
+Catalog {\r
+ Name = MyCatalog\r
+ dbname = bacula; user = bacula; password = ""\r
+}\r
+\r
+# Reasonable message delivery -- send most everything to email address\r
+# and to the console\r
+Messages {\r
+ Name = Standard\r
+#\r
+# NOTE! If you send to two email or more email addresses, you will need\r
+# to replace the %r in the from field (-f part) with a single valid\r
+# email address in both the mailcommand and the operatorcommand.\r
+#\r
+ mailcommand = "\"@bin_dir@\\bsmtp\" -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula: %t %e of %c %l\" %r"\r
+ operatorcommand = "\"@bin_dir@\\bsmtp\" -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula: Intervention needed for %j\" %r"\r
+ mail = @job_email@ = all, !skipped \r
+ operator = @job_email@ = mount\r
+ console = all, !skipped, !saved\r
+#\r
+# WARNING! the following will create a file that you must cycle from\r
+# time to time as it will grow indefinitely. However, it will\r
+# also keep all your messages if they scroll off the console.\r
+#\r
+ append = "@working_dir@\\log" = all, !skipped\r
+}\r
+\r
+\r
+#\r
+# Message delivery for daemon messages (no job).\r
+Messages {\r
+ Name = Daemon\r
+ mailcommand = "\"@bin_dir@\\bsmtp\" -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula daemon message\" %r"\r
+ mail = @job_email@ = all, !skipped \r
+ console = all, !skipped, !saved\r
+ append = "@working_dir@\\log" = all, !skipped\r
+}\r
+\r
+\r
+\r
+# Default pool definition\r
+Pool {\r
+ Name = Default\r
+ Pool Type = Backup\r
+ Recycle = yes # Bacula can automatically recycle Volumes\r
+ AutoPrune = yes # Prune expired volumes\r
+ Volume Retention = 365 days # one year\r
+}\r
+\r
+# Scratch pool definition\r
+Pool {\r
+ Name = Scratch\r
+ Pool Type = Backup\r
+}\r
+\r
+#\r
+# Restricted console used by tray-monitor to get the status of the director\r
+#\r
+Console {\r
+ Name = @monitor_name@\r
+ Password = "@monitor_password@"\r
+ CommandACL = status, .status\r
+}\r
--- /dev/null
+#
+# Default Bacula File Daemon Configuration file
+#
+# For Bacula Systems release @VERSION@ (@DATE@) -- @DISTNAME@ @DISTVER@
+#
+# There is not much to change here except perhaps the
+# File daemon Name
+#
+
+#
+# "Global" File daemon configuration specifications
+#
+FileDaemon { # this is me
+ Name = @client_name@
+ FDport = @client_port@ # where we listen for the director
+ WorkingDirectory = "@working_dir@"
+ Pid Directory = "@working_dir@"
+# Plugin Directory = "@fdplugins_dir@"
+ Maximum Concurrent Jobs = @client_maxjobs@
+}
+
+#
+# List Directors who are permitted to contact this File daemon
+#
+Director {
+ Name = @director_name@
+ Password = "@client_password@"
+}
+
+#
+# Restricted Director, used by tray-monitor to get the
+# status of the file daemon
+#
+Director {
+ Name = @monitor_name@
+ Password = "@monitor_password@"
+ Monitor = yes
+}
+
+# Send all messages except skipped files back to Director
+Messages {
+ Name = Standard
+ director = @director_name@ = all, !skipped, !restored
+}
--- /dev/null
+#\r
+# Default Bacula Storage Daemon Configuration file\r
+#\r
+# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ @DISTVER@\r
+#\r
+# You may need to change the name of your tape drive\r
+# on the "Archive Device" directive in the Device\r
+# resource. If you change the Name and/or the \r
+# "Media Type" in the Device resource, please ensure\r
+# that bacula-dir.conf has corresponding changes.\r
+#\r
+\r
+Storage { # definition of myself\r
+ Name = @storage_name@\r
+ SDPort = @storage_port@ # Director's port \r
+ WorkingDirectory = "@working_dir@"\r
+ Pid Directory = "@working_dir@"\r
+ Maximum Concurrent Jobs = @storage_maxjobs@\r
+}\r
+\r
+#\r
+# List Directors who are permitted to contact Storage daemon\r
+#\r
+Director {\r
+ Name = @director_name@\r
+ Password = "@storage_password@"\r
+}\r
+\r
+#\r
+# Restricted Director, used by tray-monitor to get the\r
+# status of the storage daemon\r
+#\r
+Director {\r
+ Name = @monitor_name@\r
+ Password = "@monitor_password@"\r
+ Monitor = yes\r
+}\r
+\r
+#\r
+# Devices supported by this Storage daemon\r
+# To connect, the Director's bacula-dir.conf must have the\r
+# same Name and MediaType. \r
+#\r
+\r
+Device {\r
+ Name = FileStorage\r
+ Media Type = File\r
+ Archive Device = "C:\\Tmp"\r
+ LabelMedia = yes # lets Bacula label unlabeled media\r
+ Random Access = Yes\r
+ AutomaticMount = yes # when device opened, read it\r
+ RemovableMedia = no\r
+ AlwaysOpen = no\r
+}\r
+\r
+#\r
+# An autochanger device with two drives\r
+#\r
+#Autochanger {\r
+# Name = Autochanger\r
+# Device = Drive-1\r
+# Device = Drive-2\r
+# Changer Command = "mtx-changer %c %o %S %a %d"\r
+# Changer Device = Changer0\r
+#}\r
+\r
+#Device {\r
+# Name = Drive-1 #\r
+# Drive Index = 0\r
+# Media Type = DLT-8000\r
+# Device Type = Tape\r
+# Archive Device = Tape0\r
+# AutomaticMount = yes # when device opened, read it\r
+# AlwaysOpen = yes\r
+# RemovableMedia = yes\r
+# RandomAccess = no\r
+# AutoChanger = yes\r
+# Alert Command = "tapeinfo -f %c | findstr TapeAlert"\r
+#}\r
+\r
+#Device {\r
+# Name = Drive-2 #\r
+# Drive Index = 1\r
+# Media Type = DLT-8000\r
+# Device Type = Tape\r
+# Archive Device = Tape1\r
+# AutomaticMount = yes # when device opened, read it\r
+# AlwaysOpen = yes\r
+# RemovableMedia = yes\r
+# RandomAccess = no\r
+# AutoChanger = yes\r
+# Alert Command = "tapeinfo -f %c | findstr TapeAlert"\r
+#}\r
+\r
+#\r
+#Device {\r
+# Name = DDS-4 # \r
+# Media Type = DDS-4\r
+# Device Type = Tape\r
+# Archive Device = Tape0\r
+# AutomaticMount = yes # when device opened, read it\r
+# AlwaysOpen = yes\r
+# RemovableMedia = yes\r
+# RandomAccess = no\r
+# Alert Command = "tapeinfo -f %c | findstr TapeAlert"\r
+#}\r
+\r
+# \r
+# Send all messages to the Director, \r
+# mount messages also are sent to the email address\r
+#\r
+Messages {\r
+ Name = Standard\r
+ director = @director_name@ = all\r
+}\r
--- /dev/null
+#\r
+# Bacula User Agent (or Console) Configuration File\r
+#\r
+\r
+Director {\r
+ Name = @director_name@\r
+ DIRport = @director_port@\r
+ address = @director_address@\r
+ Password = "@director_password@"\r
+}\r
--- /dev/null
+#\r
+# Bacula User Agent (or Console) Configuration File\r
+#\r
+\r
+Director {\r
+ Name = @director_name@\r
+ DIRport = @director_port@\r
+ address = @director_address@\r
+ Password = "@director_password@"\r
+}\r
--- /dev/null
+# Client (File Services) to backup\r
+Client {\r
+ Name = @client_name@\r
+ Address = @client_address@\r
+ FDPort = @client_port@\r
+ Catalog = MyCatalog\r
+ Password = "@client_password@" # password for FileDaemon\r
+ File Retention = 30 days # 30 days\r
+ Job Retention = 6 months # six months\r
+ AutoPrune = yes # Prune expired Jobs/Files\r
+}\r
--- /dev/null
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+ ProjectType="Visual C++"\r
+ Version="8.00"\r
+ Name="installer"\r
+ ProjectGUID="{6D1B0964-FB32-4916-A61C-49D7F715EAD8}"\r
+ RootNamespace="installer"\r
+ >\r
+ <Platforms>\r
+ <Platform\r
+ Name="Win32"\r
+ />\r
+ </Platforms>\r
+ <ToolFiles>\r
+ </ToolFiles>\r
+ <Configurations>\r
+ <Configuration\r
+ Name="Debug|Win32"\r
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
+ IntermediateDirectory="$(ConfigurationName)"\r
+ ConfigurationType="0"\r
+ >\r
+ <Tool\r
+ Name="VCNMakeTool"\r
+ BuildCommandLine="build-installer $(SolutionDir) $(ConfigurationName) VC8_DEBUG "$(VCInstallDir)redist"
"\r
+ ReBuildCommandLine="del $(SolutionDir)$(ConfigurationName)\winbacula-*.exe
build-installer $(SolutionDir) $(ConfigurationName) VC8_DEBUG "$(VCInstallDir)redist"
"\r
+ CleanCommandLine="del $(SolutionDir)$(ConfigurationName)\winbacula-*.exe"\r
+ Output=""\r
+ PreprocessorDefinitions="VERSION=$(VERSION);DOC_DIR=..\..\..\..\docs;BUILD_TOOLS=VC8_DEBUG;VC_REDIST_DIR=$(VCInstallDir)redist\Debug_NonRedist\x86\Microsoft.VC80.DebugCRT;DEPKGS_BIN=..\..\..\..\depkgs-msvc\bin;BACULA_BIN=..\$(ConfigurationName);CATS_DIR=..\cats;SCRIPT_DIR=..\scripts"\r
+ IncludeSearchPath=""\r
+ ForcedIncludes=""\r
+ AssemblySearchPath=""\r
+ ForcedUsingAssemblies=""\r
+ CompileAsManaged=""\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Release|Win32"\r
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
+ IntermediateDirectory="$(ConfigurationName)"\r
+ ConfigurationType="0"\r
+ >\r
+ <Tool\r
+ Name="VCNMakeTool"\r
+ BuildCommandLine="build-installer $(SolutionDir) $(ConfigurationName) VC8 "$(VCInstallDir)redist"
"\r
+ ReBuildCommandLine="del $(SolutionDir)$(ConfigurationName)\winbacula-*.exe
build-installer $(SolutionDir) $(ConfigurationName) VC8 "$(VCInstallDir)redist"
"\r
+ CleanCommandLine="del $(SolutionDir)$(ConfigurationName)\winbacula-*.exe"\r
+ Output=""\r
+ PreprocessorDefinitions=""\r
+ IncludeSearchPath=""\r
+ ForcedIncludes=""\r
+ AssemblySearchPath=""\r
+ ForcedUsingAssemblies=""\r
+ CompileAsManaged=""\r
+ />\r
+ </Configuration>\r
+ </Configurations>\r
+ <References>\r
+ </References>\r
+ <Files>\r
+ <Filter\r
+ Name="Source Files"\r
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
+ >\r
+ </Filter>\r
+ <Filter\r
+ Name="Header Files"\r
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
+ >\r
+ <File\r
+ RelativePath=".\resource.h"\r
+ >\r
+ </File>\r
+ </Filter>\r
+ <Filter\r
+ Name="Resource Files"\r
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
+ >\r
+ <File\r
+ RelativePath=".\Dialogs.rc"\r
+ >\r
+ </File>\r
+ </Filter>\r
+ <File\r
+ RelativePath=".\bacula-dir.conf.in"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\bacula-fd.conf.in"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\bacula-sd.conf.in"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\bconsole.conf.in"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\build-installer.cmd"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\client.conf.in"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\ConfigPage1.nsh"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\ConfigPage2.nsh"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\DumpLog.nsh"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\InstallType.ini"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\InstallType.nsh"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\Readme.txt"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\storage.conf.in"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\winbacula.nsi"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\WriteTemplates.ini"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\wx-console.conf.in"\r
+ >\r
+ </File>\r
+ </Files>\r
+ <Globals>\r
+ </Globals>\r
+</VisualStudioProject>\r
--- /dev/null
+# Definition of file storage device\r
+Storage {\r
+ Name = File\r
+# Do not use "localhost" here \r
+ Address = @storage_address@ # N.B. Use a fully qualified name here\r
+ SDPort = @storage_port@\r
+ Password = "@storage_password@"\r
+ Device = FileStorage\r
+ Media Type = File\r
+}\r
--- /dev/null
+; winbsclient.nsi
+;
+; Began as a version written by Michel Meyers (michel@tcnnet.dyndns.org)
+;
+; Adapted by Kern Sibbald for native Win32 Bacula
+; added a number of elements from Christopher Hull's installer
+;
+; D. Scott Barninger Nov 13 2004
+; added configuration editing for bconsole.conf and bwx-console.conf
+; better explanation in dialog boxes for editing config files
+; added Start Menu items
+; fix uninstall of config files to do all not just bacula-fd.conf
+;
+; D. Scott Barninger Dec 05 2004
+; added specification of default permissions for bacula-fd.conf
+; - thanks to Jamie Ffolliott for pointing me at cacls
+; added removal of working-dir files if user selects to remove config
+; uninstall is now 100% clean
+;
+; D. Scott Barninger Apr 17 2005
+; 1.36.3 release docs update
+; add pdf manual and menu shortcut
+;
+; Robert Nelson May 15 2006
+; Added server installs and implemented Microsoft install locations
+; Use LogicLib.nsh
+; Added Bacula-SD and Bacula-DIR
+; Replaced ParameterGiven with standard GetOptions
+;
+; Kern Sibbald October 2008
+; Remove server installs
+; Install into single bacula directory
+; (i.e. undo a large part of what Robert Nelson did)
+;
+; Eric Bollengier March 2009
+; Updated to handle Win64 installation
+;
+; Version $Id: winbacula.nsi 7074 2008-05-31 18:43:21Z kerns $
+;
+; Command line options:
+;
+; /service -
+; /start
+;
+; netsh firewall add portopening protocol=tcp port=9102 name="Bacula-FD"
+
+
+!define PRODUCT "Bacula Systems"
+
+;
+; Include the Modern UI
+;
+
+!include "MUI.nsh"
+!include "LogicLib.nsh"
+!include "FileFunc.nsh"
+!include "Sections.nsh"
+!include "StrFunc.nsh"
+!include "WinMessages.nsh"
+;
+; Basics
+;
+Name "Bacula"
+OutFile "${OUT_DIR}\win${WINVER}baculasystems-${VERSION}.exe"
+SetCompressor lzma
+
+InstallDir "$PROGRAMFILES\bacula"
+InstallDirRegKey HKLM "Software\Bacula" "InstallLocation"
+
+InstType "Client"
+
+!insertmacro GetParent
+
+${StrCase}
+${StrRep}
+${StrTok}
+${StrTrimNewLines}
+
+;
+; Pull in pages
+;
+
+!define MUI_COMPONENTSPAGE_SMALLDESC
+
+!define MUI_HEADERIMAGE
+!define MUI_BGCOLOR 739AB9
+!define MUI_HEADERIMAGE_BITMAP "bacula-logo.bmp"
+
+!InsertMacro MUI_PAGE_WELCOME
+!InsertMacro MUI_PAGE_LICENSE "..\..\..\LICENSE"
+Page custom EnterInstallType
+!define MUI_PAGE_CUSTOMFUNCTION_SHOW PageComponentsShow
+!InsertMacro MUI_PAGE_COMPONENTS
+!define MUI_PAGE_CUSTOMFUNCTION_PRE PageDirectoryPre
+!InsertMacro MUI_PAGE_DIRECTORY
+Page custom EnterConfigPage1 LeaveConfigPage1
+Page custom EnterConfigPage2 LeaveConfigPage2
+!Define MUI_PAGE_CUSTOMFUNCTION_LEAVE LeaveInstallPage
+!InsertMacro MUI_PAGE_INSTFILES
+Page custom EnterWriteTemplates
+!Define MUI_FINISHPAGE_SHOWREADME $INSTDIR\Readme.txt
+!InsertMacro MUI_PAGE_FINISH
+
+!InsertMacro MUI_UNPAGE_WELCOME
+!InsertMacro MUI_UNPAGE_CONFIRM
+!InsertMacro MUI_UNPAGE_INSTFILES
+!InsertMacro MUI_UNPAGE_FINISH
+
+!define MUI_ABORTWARNING
+
+!InsertMacro MUI_LANGUAGE "English"
+
+!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."
+
+!InsertMacro MUI_RESERVEFILE_INSTALLOPTIONS
+;
+; Global Variables
+;
+Var OptService
+Var OptStart
+Var OptSilent
+
+Var CommonFilesDone
+
+Var OsIsNT
+
+Var HostName
+
+Var ConfigClientName
+Var ConfigClientPort
+Var ConfigClientMaxJobs
+Var ConfigClientPassword
+Var ConfigClientInstallService
+Var ConfigClientStartService
+
+Var ConfigStorageName
+Var ConfigStoragePort
+Var ConfigStorageMaxJobs
+Var ConfigStoragePassword
+Var ConfigStorageInstallService
+Var ConfigStorageStartService
+
+Var ConfigDirectorName
+Var ConfigDirectorPort
+Var ConfigDirectorMaxJobs
+Var ConfigDirectorPassword
+Var ConfigDirectorAddress
+Var ConfigDirectorMailServer
+Var ConfigDirectorMailAddress
+Var ConfigDirectorDB
+Var ConfigDirectorInstallService
+Var ConfigDirectorStartService
+
+Var ConfigMonitorName
+Var ConfigMonitorPassword
+
+Var LocalDirectorPassword
+Var LocalHostAddress
+
+Var MySQLPath
+Var MySQLVersion
+Var PostgreSQLPath
+Var PostgreSQLVersion
+
+Var AutomaticInstall
+Var InstallType
+
+!define NewInstall 0
+!define UpgradeInstall 1
+!define MigrateInstall 2
+
+Var OldInstallDir
+Var PreviousComponents
+Var NewComponents
+
+; Bit 0 = File Service
+; 1 = Storage Service
+; 2 = Director Service
+; 3 = Command Console
+; 4 = Graphical Console
+; 5 = Documentation (PDF)
+; 6 = Documentation (HTML)
+
+!define ComponentFile 1
+!define ComponentStorage 2
+!define ComponentDirector 4
+!define ComponentTextConsole 8
+!define ComponentGUIConsole 16
+!define ComponentPDFDocs 32
+!define ComponentHTMLDocs 64
+
+!define ComponentsRequiringUserConfig 31
+!define ComponentsFileAndStorage 3
+!define ComponentsFileAndStorageAndDirector 7
+!define ComponentsDirectorAndTextGuiConsoles 28
+!define ComponentsTextAndGuiConsoles 24
+
+Var HDLG
+Var HCTL
+
+Function .onInit
+ Push $R0
+ Push $R1
+
+ ; Process Command Line Options
+ StrCpy $OptService 1
+ StrCpy $OptStart 1
+ StrCpy $OptSilent 0
+ StrCpy $CommonFilesDone 0
+ StrCpy $OsIsNT 0
+ StrCpy $AutomaticInstall 0
+ StrCpy $InstallType ${NewInstall}
+ StrCpy $OldInstallDir ""
+ StrCpy $PreviousComponents 0
+ StrCpy $NewComponents 0
+ StrCpy $MySQLPath ""
+ StrCpy $MySQLVersion ""
+ StrCpy $PostgreSQLPath ""
+ StrCpy $PostgreSQLVersion ""
+ StrCpy $LocalDirectorPassword ""
+
+ ${GetParameters} $R0
+
+ ClearErrors
+ ${GetOptions} $R0 "/noservice" $R1
+ IfErrors +2
+ StrCpy $OptService 0
+
+ ClearErrors
+ ${GetOptions} $R0 "/nostart" $R1
+ IfErrors +2
+ StrCpy $OptStart 0
+
+ IfSilent 0 +2
+ StrCpy $OptSilent 1
+
+ ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
+ ${If} $R0 != ""
+ StrCpy $OsIsNT 1
+ ${EndIf}
+
+ Call GetComputerName
+ Pop $HostName
+
+ Call GetHostName
+ Pop $LocalHostAddress
+
+ Call GetUserName
+
+ ; Configuration Defaults
+
+ StrCpy $ConfigClientName "$HostName-fd"
+ StrCpy $ConfigClientPort 9102
+ StrCpy $ConfigClientMaxJobs 5
+ ;StrCpy $ConfigClientPassword
+ StrCpy $ConfigClientInstallService "$OptService"
+ StrCpy $ConfigClientStartService "$OptStart"
+
+
+ StrCpy $ConfigMonitorName "$HostName-mon"
+ ;StrCpy $ConfigMonitorPassword
+
+ InitPluginsDir
+ File "/oname=$PLUGINSDIR\openssl.exe" "${SRC_DIR}\openssl.exe"
+ File "/oname=$PLUGINSDIR\ssleay32-0.9.8.dll" "${SRC_DIR}\ssleay32-0.9.8.dll"
+ File "/oname=$PLUGINSDIR\cryptoeay32-0.9.8.dll" "${SRC_DIR}\cryptoeay32-0.9.8.dll"
+; File "/oname=$PLUGINSDIR\libeay32.dll" "${SRC_DIR}\libeay32.dll"
+; File "/oname=$PLUGINSDIR\ssleay32.dll" "${SRC_DIR}\ssleay32.dll"
+ File "/oname=$PLUGINSDIR\sed.exe" "${SRC_DIR}\sed.exe"
+
+ !InsertMacro MUI_INSTALLOPTIONS_EXTRACT "InstallType.ini"
+ !InsertMacro MUI_INSTALLOPTIONS_EXTRACT "WriteTemplates.ini"
+
+ SetPluginUnload alwaysoff
+
+ nsExec::Exec '"$PLUGINSDIR\openssl.exe" rand -base64 -out $PLUGINSDIR\pw.txt 33'
+ pop $R0
+ ${If} $R0 = 0
+ FileOpen $R1 "$PLUGINSDIR\pw.txt" r
+ IfErrors +4
+ FileRead $R1 $R0
+ ${StrTrimNewLines} $ConfigClientPassword $R0
+ FileClose $R1
+ ${EndIf}
+
+ SetPluginUnload manual
+
+ nsExec::Exec '"$PLUGINSDIR\openssl.exe" rand -base64 -out $PLUGINSDIR\pw.txt 33'
+ pop $R0
+ ${If} $R0 = 0
+ FileOpen $R1 "$PLUGINSDIR\pw.txt" r
+ IfErrors +4
+ FileRead $R1 $R0
+ ${StrTrimNewLines} $ConfigMonitorPassword $R0
+ FileClose $R1
+ ${EndIf}
+
+ Pop $R1
+ Pop $R0
+FunctionEnd
+
+Function .onSelChange
+ Call UpdateComponentUI
+FunctionEnd
+
+Function InstallCommonFiles
+ ${If} $CommonFilesDone = 0
+ SetOutPath "$INSTDIR"
+ File "Readme.txt"
+
+ SetOutPath "$INSTDIR"
+!if "${BUILD_TOOLS}" == "MinGW"
+ File "${SRC_DIR}\mingwm10.dll"
+ File "${SRC_DIR}\pthreadGCE.dll"
+ File "${SRC_DIR}\zlib1.dll"
+ File "${SRC_DIR}\ssleay32.dll"
+ File "${SRC_DIR}\libeay32.dll"
+!endif
+!if "${BUILD_TOOLS}" == "MinGW64"
+ File "${SRC_DIR}\pthreadGCE.dll"
+ File "${SRC_DIR}\cryptoeay32-0.9.8.dll"
+ File "${SRC_DIR}\ssleay32-0.9.8.dll"
+ File "${SRC_DIR}\zlib1.dll"
+!endif
+ File "${SRC_DIR}\bacula.dll"
+
+ File "/oname=$INSTDIR\openssl.cnf" "${SRC_DIR}\openssl.cnf"
+ File "${SRC_DIR}\openssl.exe"
+ File "${SRC_DIR}\bsleep.exe"
+ File "${SRC_DIR}\bsmtp.exe"
+ File "${SRC_DIR}\expr64.exe"
+ File "${SRC_DIR}\snooze.exe"
+
+ CreateShortCut "$SMPROGRAMS\Bacula\Documentation\View Readme.lnk" "write.exe" '"$INSTDIR\Readme.txt"'
+
+ StrCpy $CommonFilesDone 1
+ ${EndIf}
+FunctionEnd
+
+Section "-Initialize"
+
+ WriteRegStr HKLM Software\Bacula InstallLocation "$INSTDIR"
+
+ Call GetSelectedComponents
+ Pop $R2
+ WriteRegDWORD HKLM Software\Bacula Components $R2
+
+ ; remove start menu items
+ SetShellVarContext all
+
+ Delete /REBOOTOK "$SMPROGRAMS\Bacula\Configuration\*"
+ Delete /REBOOTOK "$SMPROGRAMS\Bacula\Documentation\*"
+ Delete /REBOOTOK "$SMPROGRAMS\Bacula\*"
+ RMDir "$SMPROGRAMS\Bacula\Configuration"
+ RMDir "$SMPROGRAMS\Bacula\Documentation"
+ RMDir "$SMPROGRAMS\Bacula"
+ CreateDirectory "$SMPROGRAMS\Bacula"
+ CreateDirectory "$SMPROGRAMS\Bacula\Configuration"
+ CreateDirectory "$SMPROGRAMS\Bacula\Documentation"
+
+ CreateDirectory "$INSTDIR"
+ CreateDirectory "$INSTDIR\working"
+
+ SetOutPath "$INSTDIR"
+ File "..\..\..\LICENSE"
+ Delete /REBOOTOK "$INSTDIR\License.txt"
+
+ FileOpen $R1 $PLUGINSDIR\config.sed w
+ FileWrite $R1 "s;@VERSION@;${VERSION};g$\r$\n"
+ FileWrite $R1 "s;@DATE@;${__DATE__};g$\r$\n"
+ FileWrite $R1 "s;@DISTNAME@;Windows;g$\r$\n"
+
+!If "$BUILD_TOOLS" == "MinGW"
+ StrCpy $R2 "MinGW32"
+!Else
+ StrCpy $R2 "MinGW64"
+!EndIf
+
+ Call GetHostName
+ Exch $R3
+ Pop $R3
+
+ FileWrite $R1 "s;@DISTVER@;$R2;g$\r$\n"
+
+ ${StrRep} $R2 "$INSTDIR\working" "\" "\\\\"
+ FileWrite $R1 's;@working_dir@;$R2;g$\r$\n'
+ ${StrRep} $R2 "$INSTDIR\working" "\" "\\"
+ FileWrite $R1 's;@working_dir_cmd@;$R2;g$\r$\n'
+
+ ${StrRep} $R2 "$INSTDIR" "\" "\\\\"
+ FileWrite $R1 's;@bin_dir@;$R2;g$\r$\n'
+ ${StrRep} $R2 "$INSTDIR" "\" "\\"
+ FileWrite $R1 's;@bin_dir_cmd@;$R2;g$\r$\n'
+
+ ${StrRep} $R2 "$INSTDIR\plugins" "\" "\\\\"
+ FileWrite $R1 's;@fdplugins_dir@;$R2;g$\r$\n'
+
+ ${StrRep} $R2 "$INSTDIR" "\" "/"
+ FileWrite $R1 "s;@BUILD_DIR@;$R2;g$\r$\n"
+
+ FileWrite $R1 "s;@client_address@;$LocalHostAddress;g$\r$\n"
+
+ ${If} "$ConfigClientName" != ""
+ FileWrite $R1 "s;@client_name@;$ConfigClientName;g$\r$\n"
+ ${EndIf}
+ ${If} "$ConfigClientPort" != ""
+ FileWrite $R1 "s;@client_port@;$ConfigClientPort;g$\r$\n"
+ ${EndIf}
+ ${If} "$ConfigClientMaxJobs" != ""
+ FileWrite $R1 "s;@client_maxjobs@;$ConfigClientMaxJobs;g$\r$\n"
+ ${EndIf}
+ ${If} "$ConfigClientPassword" != ""
+ FileWrite $R1 "s;@client_password@;$ConfigClientPassword;g$\r$\n"
+ ${EndIf}
+ ${If} "$ConfigDirectorName" != ""
+ FileWrite $R1 "s;@director_name@;$ConfigDirectorName;g$\r$\n"
+ ${EndIf}
+ ${If} "$ConfigMonitorName" != ""
+ FileWrite $R1 "s;@monitor_name@;$ConfigMonitorName;g$\r$\n"
+ ${EndIf}
+ ${If} "$ConfigMonitorPassword" != ""
+ FileWrite $R1 "s;@monitor_password@;$ConfigMonitorPassword;g$\r$\n"
+ ${EndIf}
+
+ FileClose $R1
+
+
+ ${If} ${FileExists} "$OldInstallDir\bin\bacula-fd.exe"
+ nsExec::ExecToLog '"$OldInstallDir\bin\bacula-fd.exe" /kill' ; Shutdown any bacula that could be running
+ Sleep 3000
+ nsExec::ExecToLog '"$OldInstallDir\bin\bacula-fd.exe" /remove' ; Remove existing service
+ ${EndIf}
+
+SectionEnd
+
+SectionGroup "Client" SecGroupClient
+
+Section "File Service" SecFileDaemon
+ SectionIn 1 2 3
+
+ SetOutPath "$INSTDIR\plugins"
+ File "${SRC_DIR}\exchange-fd.dll"
+
+ SetOutPath "$INSTDIR"
+
+ File "${SRC_DIR}\bacula-fd.exe"
+
+ File "/oname=$PLUGINSDIR\bacula-fd.conf" "bacula-fd.conf.in"
+
+ StrCpy $0 "$INSTDIR"
+ StrCpy $1 bacula-fd.conf
+ Call ConfigEditAndCopy
+
+ StrCpy $0 bacula-fd
+ StrCpy $1 "File Service"
+ StrCpy $2 $ConfigClientInstallService
+ StrCpy $3 $ConfigClientStartService
+
+ Call InstallDaemon
+
+ CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Client Configuration.lnk" "write.exe" '"$INSTDIR\bacula-fd.conf"'
+SectionEnd
+
+SectionGroupEnd
+
+Section "-Finish"
+ Push $R0
+
+ ${If} $OsIsNT = 1
+ nsExec::ExecToLog 'cmd.exe /C echo Y|cacls "$INSTDIR" /T /G SYSTEM:F Administrators:F'
+ nsExec::ExecToLog 'cmd.exe /C echo Y|cacls "$INSTDIR" /T /G SYSTEM:F Administrators:F'
+ ${EndIf}
+
+ ; Write the uninstall keys for Windows & create Start Menu entry
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "DisplayName" "Bacula"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "InstallLocation" "$INSTDIR"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "DisplayVersion" "${VERSION}"
+ ${StrTok} $R0 "${VERSION}" "." 0 0
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "VersionMajor" $R0
+ ${StrTok} $R0 "${VERSION}" "." 1 0
+ 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" "UninstallString" '"$INSTDIR\uninstall.exe"'
+ WriteUninstaller "$INSTDIR\Uninstall.exe"
+ CreateShortCut "$SMPROGRAMS\Bacula\Uninstall Bacula.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0
+ Pop $R0
+SectionEnd
+
+; Extra Page descriptions
+
+LangString DESC_SecFileDaemon ${LANG_ENGLISH} "Install Bacula Systems 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 TITLE_ConfigPage1 ${LANG_ENGLISH} "Configuration"
+LangString SUBTITLE_ConfigPage1 ${LANG_ENGLISH} "Set installation configuration."
+
+LangString TITLE_ConfigPage2 ${LANG_ENGLISH} "Configuration (continued)"
+LangString SUBTITLE_ConfigPage2 ${LANG_ENGLISH} "Set installation configuration."
+
+LangString TITLE_InstallType ${LANG_ENGLISH} "Installation Type"
+LangString SUBTITLE_InstallType ${LANG_ENGLISH} "Choose installation type."
+
+LangString TITLE_WriteTemplates ${LANG_ENGLISH} "Create Templates"
+LangString SUBTITLE_WriteTemplates ${LANG_ENGLISH} "Create resource templates for inclusion in the Director's configuration file."
+
+!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_FUNCTION_DESCRIPTION_END
+
+; Uninstall section
+
+UninstallText "This will uninstall Bacula. Hit next to continue."
+
+Section "Uninstall"
+ ; Shutdown any baculum that could be running
+ nsExec::ExecToLog '"$INSTDIR\bacula-fd.exe" /kill'
+ Sleep 3000
+
+ ReadRegDWORD $R0 HKLM "Software\Bacula" "Service_Bacula-fd"
+ ${If} $R0 = 1
+ ; Remove bacula service
+ nsExec::ExecToLog '"$INSTDIR\bacula-fd.exe" /remove'
+ nsExec::ExecToLog '"$INSTDIR\plugins\exchange-fd.dll" /remove'
+ ${EndIf}
+
+ ; remove registry keys
+ DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula"
+ DeleteRegKey HKLM "Software\Bacula"
+
+ ; remove start menu items
+ SetShellVarContext all
+ Delete /REBOOTOK "$SMPROGRAMS\Bacula\*"
+ RMDir "$SMPROGRAMS\Bacula"
+
+ ; remove files and uninstaller (preserving config for now)
+ Delete /REBOOTOK "$INSTDIR\doc\*"
+ Delete /REBOOTOK "$INSTDIR\*"
+
+ ; Check for existing installation
+ MessageBox MB_YESNO|MB_ICONQUESTION \
+ "Would you like to delete the current configuration files and the working state file?" IDNO NoDel
+ Delete /REBOOTOK "$INSTDIR\*"
+ Delete /REBOOTOK "$INSTDIR\working\*"
+ Delete /REBOOTOK "$INSTDIR\plugins\*"
+ Delete /REBOOTOK "$PLUGINSDIR\bacula-*.conf"
+ Delete /REBOOTOK "$PLUGINSDIR\*console.conf"
+ Delete /REBOOTOK "$PLUGINSDIR\*conf.in"
+ Delete /REBOOTOK "$PLUGINSDIR\openssl.exe"
+ Delete /REBOOTOK "$PLUGINSDIR\libeay32.dll"
+ Delete /REBOOTOK "$PLUGINSDIR\ssleay32.dll"
+ Delete /REBOOTOK "$PLUGINSDIR\sed.exe"
+ Delete /REBOOTOK "$PLUGINSDIR\pw.txt"
+ Delete /REBOOTOK "$PLUGINSDIR\*.sed"
+ Delete /REBOOTOK "$PLUGINSDIR\*.cmd"
+ Delete /REBOOTOK "$PLUGINSDIR\*.sql"
+ RMDir "$INSTDIR\plugins"
+ RMDir "$INSTDIR\working"
+ RMDir "$INSTDIR"
+NoDel:
+
+ ; remove directories used
+ RMDir "$INSTDIR\doc"
+ RMDir "$INSTDIR"
+SectionEnd
+
+;
+; $0 - Service Name (ie Bacula-FD)
+; $1 - Service Description (ie Bacula File Daemon)
+; $2 - Install as Service
+; $3 - Start Service now
+;
+Function InstallDaemon
+ Call InstallCommonFiles
+
+ WriteRegDWORD HKLM "Software\Bacula" "Service_$0" $2
+
+ ${If} $2 = 1
+ nsExec::ExecToLog '"$INSTDIR\$0.exe" /install -c "$INSTDIR\$0.conf"'
+
+ ${If} $OsIsNT <> 1
+ File "Start.bat"
+ File "Stop.bat"
+ ${EndIf}
+
+ ; Start the service?
+
+ ${If} $3 = 1
+ ${If} $OsIsNT = 1
+ nsExec::ExecToLog 'net start $0'
+ ${Else}
+ Exec '"$INSTDIR\$0.exe" -c "$INSTDIR\$0.conf"'
+ ${EndIf}
+ ${EndIf}
+ ${Else}
+ CreateShortCut "$SMPROGRAMS\Bacula\Start $1.lnk" "$INSTDIR\$0.exe" '-c "$INSTDIR\$0.conf"' "$INSTDIR\$0.exe" 0
+ ${EndIf}
+FunctionEnd
+
+Function GetComputerName
+ Push $R0
+ Push $R1
+ Push $R2
+
+ System::Call "kernel32::GetComputerNameA(t .R0, *i ${NSIS_MAX_STRLEN} R1) i.R2"
+
+ ${StrCase} $R0 $R0 "L"
+
+ Pop $R2
+ Pop $R1
+ Exch $R0
+FunctionEnd
+
+!define ComputerNameDnsFullyQualified 3
+
+Function GetHostName
+ Push $R0
+ Push $R1
+ Push $R2
+
+ ${If} $OsIsNT = 1
+ System::Call "kernel32::GetComputerNameExA(i ${ComputerNameDnsFullyQualified}, t .R0, *i ${NSIS_MAX_STRLEN} R1) i.R2 ?e"
+ ${If} $R2 = 0
+ Pop $R2
+ DetailPrint "GetComputerNameExA failed - LastError = $R2"
+ Call GetComputerName
+ Pop $R0
+ ${Else}
+ Pop $R2
+ ${EndIf}
+ ${Else}
+ Call GetComputerName
+ Pop $R0
+ ${EndIf}
+
+ Pop $R2
+ Pop $R1
+ Exch $R0
+FunctionEnd
+
+!define NameUserPrincipal 8
+
+Function GetUserName
+ Push $R0
+ Push $R1
+ Push $R2
+
+ ${If} $OsIsNT = 1
+ System::Call "secur32::GetUserNameExA(i ${NameUserPrincipal}, t .R0, *i ${NSIS_MAX_STRLEN} R1) i.R2 ?e"
+ ${If} $R2 = 0
+ Pop $R2
+ DetailPrint "GetUserNameExA failed - LastError = $R2"
+ Pop $R0
+ StrCpy $R0 ""
+ ${Else}
+ Pop $R2
+ ${EndIf}
+ ${Else}
+ StrCpy $R0 ""
+ ${EndIf}
+
+ ${If} $R0 == ""
+ System::Call "advapi32::GetUserNameA(t .R0, *i ${NSIS_MAX_STRLEN} R1) i.R2 ?e"
+ ${If} $R2 = 0
+ Pop $R2
+ DetailPrint "GetUserNameA failed - LastError = $R2"
+ StrCpy $R0 ""
+ ${Else}
+ Pop $R2
+ ${EndIf}
+ ${EndIf}
+
+ Pop $R2
+ Pop $R1
+ Exch $R0
+FunctionEnd
+
+Function ConfigEditAndCopy
+ Push $R1
+
+ ${If} ${FileExists} "$0\$1"
+ StrCpy $R1 ".new"
+ ${Else}
+ StrCpy $R1 ""
+ ${EndIf}
+
+ nsExec::ExecToLog '$PLUGINSDIR\sed.exe -f "$PLUGINSDIR\config.sed" -i.bak "$PLUGINSDIR\$1"'
+ CopyFiles "$PLUGINSDIR\$1" "$0\$1$R1"
+
+ Pop $R1
+FunctionEnd
+
+Function GetSelectedComponents
+ Push $R0
+ StrCpy $R0 0
+ ${If} ${SectionIsSelected} ${SecFileDaemon}
+ IntOp $R0 $R0 | ${ComponentFile}
+ ${EndIf}
+ ${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}
+ Exch $R0
+FunctionEnd
+
+Function PageComponentsShow
+
+ Call SelectPreviousComponents
+ Call UpdateComponentUI
+FunctionEnd
+
+Function PageDirectoryPre
+ ${If} $AutomaticInstall = 1
+ ${OrIf} $InstallType = ${UpgradeInstall}
+ Abort
+ ${EndIf}
+FunctionEnd
+
+Function LeaveInstallPage
+ Push "$INSTDIR\install.log"
+ Call DumpLog
+FunctionEnd
+
+Function EnterWriteTemplates
+ Push $R0
+ Push $R1
+
+ Call GetSelectedComponents
+ Pop $R0
+
+ IntOp $R0 $R0 & ${ComponentDirector}
+ IntOp $R1 $NewComponents & ${ComponentsFileAndStorage}
+
+ ${If} $R0 <> 0
+ ${OrIf} $R1 = 0
+ Pop $R1
+ Pop $R0
+ Abort
+ ${EndIf}
+
+ IntOp $R0 $NewComponents & ${ComponentFile}
+ ${If} $R0 = 0
+ WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 2" State 0
+ WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 2" Flags DISABLED
+ DeleteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 3" State
+ WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 3" Flags REQ_SAVE|FILE_EXPLORER|WARN_IF_EXIST|DISABLED
+ ${Else}
+ WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 2" State 1
+ DeleteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 2" Flags
+ WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 3" State "C:\$ConfigClientName.conf"
+ WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 5" Flags REQ_SAVE|FILE_EXPLORER|WARN_IF_EXIST
+ ${EndIf}
+
+
+ !InsertMacro MUI_HEADER_TEXT "$(TITLE_WriteTemplates)" "$(SUBTITLE_WriteTemplates)"
+ !InsertMacro MUI_INSTALLOPTIONS_DISPLAY "WriteTemplates.ini"
+
+ !InsertMacro MUI_INSTALLOPTIONS_READ $R0 "WriteTemplates.ini" "Field 2" State
+ ${If} $R0 <> 0
+ File "/oname=$PLUGINSDIR\client.conf.in" "client.conf.in"
+
+ nsExec::ExecToLog '$PLUGINSDIR\sed.exe -f "$PLUGINSDIR\config.sed" -i.bak "$PLUGINSDIR\client.conf.in"'
+ !InsertMacro MUI_INSTALLOPTIONS_READ $R0 "WriteTemplates.ini" "Field 3" State
+ ${If} $R0 != ""
+ CopyFiles "$PLUGINSDIR\client.conf.in" "$R0"
+ ${EndIf}
+ ${EndIf}
+
+
+ Pop $R1
+ Pop $R0
+FunctionEnd
+
+Function SelectPreviousComponents
+ ${If} $InstallType <> ${NewInstall}
+ IntOp $R1 $PreviousComponents & ${ComponentFile}
+ ${If} $R1 <> 0
+ !InsertMacro SelectSection ${SecFileDaemon}
+ !InsertMacro SetSectionFlag ${SecFileDaemon} ${SF_RO}
+ ${Else}
+ !InsertMacro UnselectSection ${SecFileDaemon}
+ !InsertMacro ClearSectionFlag ${SecFileDaemon} ${SF_RO}
+ ${EndIf}
+ IntOp $R1 $PreviousComponents & ${ComponentTextConsole}
+ ${If} $R1 <> 0
+ !InsertMacro SelectSection ${SecConsole}
+ !InsertMacro SetSectionFlag ${SecConsole} ${SF_RO}
+ ${Else}
+ !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}
+ ${EndIf}
+FunctionEnd
+
+Function UpdateComponentUI
+ Push $R0
+ Push $R1
+
+ Call GetSelectedComponents
+ Pop $R0
+
+ IntOp $R1 $R0 ^ $PreviousComponents
+ IntOp $NewComponents $R0 & $R1
+
+ ${If} $InstallType <> ${NewInstall}
+ IntOp $R1 $NewComponents & ${ComponentFile}
+ ${If} $R1 <> 0
+ !InsertMacro SetSectionFlag ${SecFileDaemon} ${SF_BOLD}
+ ${Else}
+ !InsertMacro ClearSectionFlag ${SecFileDaemon} ${SF_BOLD}
+ ${EndIf}
+ IntOp $R1 $NewComponents & ${ComponentTextConsole}
+ ${If} $R1 <> 0
+ !InsertMacro SetSectionFlag ${SecConsole} ${SF_BOLD}
+ ${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}
+ ${EndIf}
+
+ GetDlgItem $R0 $HWNDPARENT 1
+
+ IntOp $R1 $NewComponents & ${ComponentsRequiringUserConfig}
+ ${If} $R1 = 0
+ SendMessage $R0 ${WM_SETTEXT} 0 "STR:Install"
+ ${Else}
+ SendMessage $R0 ${WM_SETTEXT} 0 "STR:&Next >"
+ ${EndIf}
+
+ Pop $R1
+ Pop $R0
+FunctionEnd
+
+
+!include "InstallType.nsh"
+!include "ConfigPage1.nsh"
+!include "ConfigPage2.nsh"
+!include "DumpLog.nsh"
Technical notes for current SVN
General:
-04Apr09
+
+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.
+02Apr09
kes Enhance Job messages from SD when the FD->SD protocol is incorrect
and the SD hangs up. Previously this looked like a comm error.
-02Apr09
mvw Fixed problem in xattr and acl code trying to send empty acl or xattr
streams.
mvw Fix for bug #1261 where we send out a null stream when a file only an