Skip to content

Commit c8679be

Browse files
committed
bump windows installer to 2.2.0
1 parent aa16536 commit c8679be

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

packaging/win/mamonsu.def.nsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
!define NAME Mamonsu
2-
!define VERSION 2.0.4
2+
!define VERSION 2.2.0
33
!define MAMONSU_REG_PATH "Software\PostgresPro\Mamonsu"
44
!define MAMONSU_REG_UNINSTALLER_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall"
55
!define EDB_REG "SOFTWARE\Postgresql"

packaging/win/mamonsu.nsi

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ SpaceTexts none
9090
; Finish page
9191
!define MUI_FINISHPAGE_NOAUTOCLOSE
9292
!define MUI_FINISHPAGE_SHOWREADME_TEXT "show config"
93-
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\agent.conf"
93+
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\mamonsu.conf"
9494
!insertmacro MUI_PAGE_FINISH
9595

9696
;Uninstall
@@ -122,12 +122,13 @@ Section "${NAME} ${VERSION}" SectionMamonsu
122122
SetOutPath "$INSTDIR"
123123
File "..\..\dist\service_win32.exe"
124124
File "..\..\dist\mamonsu.exe"
125+
File "..\..\packaging\conf\template_win32.xml"
125126
CreateDirectory "$log_dir"
126127
WriteUninstaller "$INSTDIR\Uninstall.exe"
127128

128129
;create user
129130
Call CreateUser
130-
;create agent.conf
131+
;create mamonsu.conf
131132
Call CreateConfig
132133
;create service
133134
Call CreateService
@@ -467,21 +468,21 @@ Function CreateConfig
467468
${if} $action == 'downgrade'
468469
${OrIf} $action == 'upgrade'
469470

470-
${if} ${FileExists} "$ext_inst_dir\agent.conf"
471-
${ConfigRead} "$ext_inst_dir\agent.conf" "file =" $0 ; put log_file_name in $0
471+
${if} ${FileExists} "$ext_inst_dir\mamonsu.conf"
472+
${ConfigRead} "$ext_inst_dir\mamonsu.conf" "file =" $0 ; put log_file_name in $0
472473
DetailPrint "Copying config file to new install directory ..."
473-
CopyFiles "$ext_inst_dir\agent.conf" "$INSTDIR"
474-
${ConfigWrite} "$INSTDIR\agent.conf" "file = " "$log_dir\${LOG_FILE}" $0
474+
CopyFiles "$ext_inst_dir\mamonsu.conf" "$INSTDIR"
475+
${ConfigWrite} "$INSTDIR\mamonsu.conf" "file = " "$log_dir\${LOG_FILE}" $0
475476
StrCpy $5 "exist"
476477
Goto recreate_config
477478
${else} ;do not exist
478479
Goto recreate_config
479480
${endif}
480481

481482
${elseif} $action == 'reinstall'
482-
${if} ${FileExists} "$ext_inst_dir\agent.conf"
483+
${if} ${FileExists} "$ext_inst_dir\mamonsu.conf"
483484
#if user decided to choose different log directory while reinstalling
484-
${ConfigWrite} "$ext_inst_dir\agent.conf" "file = " "$log_dir\${LOG_FILE}" $0
485+
${ConfigWrite} "$ext_inst_dir\mamonsu.conf" "file = " "$log_dir\${LOG_FILE}" $0
485486
Goto cancel
486487
${else}
487488
Goto recreate_config
@@ -510,7 +511,7 @@ Function CreateConfig
510511
[postgres]$\r$\nuser = $pg_user$\r$\ndatabase = $pg_db$\r$\npassword = $2$\r$\nhost = $pg_host$\r$\nport = $pg_port$\r$\n$\r$\n\
511512
[log]$\r$\nfile = $log_dir\${LOG_FILE}$\r$\nlevel = INFO$\r$\n'
512513
FileClose $0
513-
Rename $1 "$INSTDIR\agent.conf"
514+
Rename $1 "$INSTDIR\mamonsu.conf"
514515
${endif}
515516

516517
AccessControl::DisableFileInheritance "$INSTDIR"
@@ -537,8 +538,8 @@ Function CreateConfig
537538
AccessControl::SetFileOwner "$INSTDIR\service_win32.exe" "${USER}"
538539
AccessControl::GrantOnFile "$INSTDIR\service_win32.exe" "(S-1-3-0)" "FullAccess"
539540

540-
AccessControl::SetFileOwner "$INSTDIR\agent.conf" "${USER}"
541-
AccessControl::GrantOnFile "$INSTDIR\agent.conf" "(S-1-3-0)" "FullAccess"
541+
AccessControl::SetFileOwner "$INSTDIR\mamonsu.conf" "${USER}"
542+
AccessControl::GrantOnFile "$INSTDIR\mamonsu.conf" "(S-1-3-0)" "FullAccess"
542543
cancel:
543544
FunctionEnd
544545

@@ -659,8 +660,8 @@ Function DeleteDirectory
659660
${if} $action == 'downgrade'
660661
${orif} $action == 'upgrade'
661662
DetailPrint "Deleting old install directory ..."
662-
Delete "$ext_inst_dir\agent.conf"
663-
Delete "$ext_inst_dir\agent.exe"
663+
Delete "$ext_inst_dir\mamonsu.conf"
664+
Delete "$ext_inst_dir\mamonsu.exe"
664665
Delete "$ext_inst_dir\service_win32.exe"
665666
Delete "$ext_inst_dir\Uninstall.exe"
666667
compare_log_dirs:
@@ -732,8 +733,8 @@ Function un.DeleteReg
732733
FunctionEnd
733734

734735
Function un.DeleteDirectory
735-
Delete "$INSTDIR\agent.conf"
736-
Delete "$INSTDIR\agent.exe"
736+
Delete "$INSTDIR\mamonsu.conf"
737+
Delete "$INSTDIR\mamonsu.exe"
737738
Delete "$INSTDIR\service_win32.exe"
738739
Delete "$INSTDIR\Uninstall.exe"
739740
Delete "$ext_log_dir\${LOG_FILE}"

0 commit comments

Comments
 (0)