Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1b336b0

Browse files
committed
If initdb return error <> 1, show error message with: Is Microsoft Visual C++ Redistributable
installed?
1 parent 98aff3d commit 1b336b0

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

nsis/postgresql.nsi

+5-1
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,11 @@ Section $(componentServer) sec1
543543
FileWrite $LogFile "Output: $1 $\r$\n"
544544
FileClose $LogFile ;Closes the filled file
545545

546-
MessageBox MB_OK|MB_ICONINFORMATION $(MESS_ERROR_INITDB)
546+
${if} $0 != 1
547+
MessageBox MB_OK|MB_ICONINFORMATION $(MESS_ERROR_INITDB2)
548+
${else}
549+
MessageBox MB_OK|MB_ICONINFORMATION $(MESS_ERROR_INITDB)
550+
${endif}
547551

548552
Abort
549553
${else}

nsis/translates.nsi

+3
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ The parameters are written to the file $DATA_DIR\postgresql.conf"
117117
LangString MESS_ERROR_INITDB ${LANG_ENGLISH} "An error occurred while initializing the database!"
118118
LangString MESS_ERROR_INITDB ${LANG_RUSSIAN} "Ïðè èíèöèàëèçàöèè áàçû äàííûõ ïðîèçîøëà îøèáêà!"
119119

120+
LangString MESS_ERROR_INITDB2 ${LANG_ENGLISH} "An error occurred while initializing the database! Is Microsoft Visual C++ Redistributable installed?"
121+
LangString MESS_ERROR_INITDB2 ${LANG_RUSSIAN} "Ïðè èíèöèàëèçàöèè áàçû äàííûõ ïðîèçîøëà îøèáêà! Óñòàíîâëåí ëè ïàêåò Microsoft Visual C ++ Redistributable?"
122+
120123

121124
LangString componentServer ${LANG_ENGLISH} "Server components"
122125
LangString componentServer ${LANG_RUSSIAN} "Êîìïîíåíòû ñåðâåðà"

0 commit comments

Comments
 (0)