+; 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 5\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