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

Skip to content

Commit 21eb9d4

Browse files
committed
Some changes
1 parent 592fbb9 commit 21eb9d4

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

nsis/postgresql.nsi

+22-9
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,11 @@ SectionEnd
199199

200200
SectionGroup /e $(PostgreSQLString) serverGroup
201201

202+
Function writeUnIsn
203+
FunctionEnd
204+
205+
206+
202207
Section "Client components" secClient
203208

204209
/*${If} ${FileExists} "$INSTDIR\*.*"
@@ -207,10 +212,10 @@ Section "Client components" secClient
207212
Return
208213
${EndIf} */
209214

210-
MessageBox MB_OK|MB_ICONINFORMATION "pg_old_dir: $PG_OLD_DIR"
215+
;MessageBox MB_OK|MB_ICONINFORMATION "pg_old_dir: $PG_OLD_DIR"
211216
;Call ChecExistInstall ;get port number for psql
212217

213-
!include clientlist.nsi
218+
!include client_list.nsi
214219
;SetOutPath "$INSTDIR\bin"
215220
;File /r ${PG_INS_SOURCE_DIR}\*.*
216221
;File /r ${PG_INS_SOURCE_DIR}\bin\*.*
@@ -232,7 +237,6 @@ MessageBox MB_OK|MB_ICONINFORMATION "pg_old_dir: $PG_OLD_DIR"
232237
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" $INSTDIR
233238

234239

235-
236240
WriteUninstaller "$INSTDIR\Uninstall.exe"
237241
Call writeUnistallReg
238242
Call createRunPsql
@@ -298,7 +302,7 @@ Section $(PostgreSQLString) sec1
298302
${endif}
299303
${endif}
300304

301-
!include serverlist.nsi
305+
!include server_list.nsi
302306
;SetOutPath "$INSTDIR"
303307
;File /r ${PG_INS_SOURCE_DIR}\*.*
304308
;File /r ${PG_INS_SOURCE_DIR}\bin\*.*
@@ -328,6 +332,9 @@ Section $(PostgreSQLString) sec1
328332
; write uninstall strings
329333
FileWrite $LogFile "Write to register\r$\n"
330334

335+
Call writeUnistallReg
336+
337+
/*
331338
WriteRegExpandStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PG_DEF_BRANDING}" "InstallLocation" "$INSTDIR"
332339
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PG_DEF_BRANDING}" "DisplayName" "$StartMenuFolder"
333340
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PG_DEF_BRANDING}" "UninstallString" '"$INSTDIR\Uninstall.exe"'
@@ -340,7 +347,7 @@ Section $(PostgreSQLString) sec1
340347
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
341348
IntFmt $0 "0x%08X" $0
342349
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PG_DEF_BRANDING}" "EstimatedSize" "$0"
343-
350+
*/
344351
FileWrite $LogFile "Create BAT files$\r$\n"
345352
ClearErrors
346353
FileOpen $0 $INSTDIR\scripts\reload.bat w
@@ -353,7 +360,7 @@ Section $(PostgreSQLString) sec1
353360
;System::Call "kernel32::GetACP() i .r2"
354361
;StrCpy $Codepage_text $2
355362
;DetailPrint "Set codepage $Codepage_text"
356-
363+
/*
357364
${If} ${AtLeastWin2008}
358365
StrCpy $Chcp_text "chcp 65001"
359366
${Else}
@@ -379,6 +386,7 @@ Section $(PostgreSQLString) sec1
379386
FileClose $0
380387
381388
creatBatErr2:
389+
*/
382390
ClearErrors
383391
FileOpen $0 $INSTDIR\scripts\restart.bat w
384392
IfErrors creatBatErr3
@@ -416,14 +424,15 @@ Section $(PostgreSQLString) sec1
416424
;Create shortcuts
417425
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
418426
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
419-
427+
/*
420428
${if} ${FileExists} "$INSTDIR\scripts\runpgsql.bat"
421429
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\SQL Shell (psql).lnk" "$INSTDIR\scripts\runpgsql.bat" "" "$INSTDIR\scripts\pg-psql.ico" "0" "" "" "PostgreSQL command line utility"
422430
${else}
423431
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\SQL Shell (psql).lnk" "$INSTDIR\bin\psql.exe" "-h localhost -U $UserName_text -d postgres -p $TextPort_text" "" "" "" "" "PostgreSQL command line utility"
424432
${endif}
425433
426434
; set font Lucida Console for shortcut psql
435+
427436
FileWrite $LogFile "set font Lucida Console for shortcut psql$\r$\n"
428437
ReadRegStr $0 HKCU "Console\SQL Shell (psql)" "FaceName"
429438
${if} $0 == ""
@@ -432,7 +441,7 @@ Section $(PostgreSQLString) sec1
432441
WriteRegDWORD HKCU "Console\SQL Shell (psql)" "FontSize" "917504"
433442
WriteRegDWORD HKCU "Console\SQL Shell (psql)" "FontFamily" "54"
434443
${endif}
435-
444+
*/
436445
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Reload Configuration.lnk" "$INSTDIR\scripts\reload.bat" "" "" "" "" "" "Reload PostgreSQL configuration"
437446
;run as administrator
438447
push "$SMPROGRAMS\$StartMenuFolder\Reload Configuration.lnk"
@@ -454,6 +463,8 @@ Section $(PostgreSQLString) sec1
454463
push "$SMPROGRAMS\$StartMenuFolder\Start Server.lnk"
455464
call ShellLinkSetRunAs
456465
pop $0
466+
467+
/*
457468
CreateDirectory "$SMPROGRAMS\$StartMenuFolder\Documentation"
458469
459470
!insertmacro CreateInternetShortcut \
@@ -465,7 +476,7 @@ Section $(PostgreSQLString) sec1
465476
"$SMPROGRAMS\$StartMenuFolder\Documentation\${PRODUCT_NAME} documentation (RU)" \
466477
"$INSTDIR\doc\postgresql-ru.chm" \
467478
"$INSTDIR\doc\pg-help.ico" "0"
468-
479+
*/
469480
!insertmacro MUI_STARTMENU_WRITE_END
470481
; Create data dir begin
471482
FileWrite $LogFile "Create data dir begin$\r$\n"
@@ -889,6 +900,8 @@ Function createRunPsql
889900
FileWrite $0 '@echo off$\r$\n$Chcp_text$\r$\nPATH $INSTDIR\bin;%PATH%$\r$\nif not exist "%APPDATA%\postgresql" md "%APPDATA%\postgresql"$\r$\npsql.exe -h localhost -U "$UserName_text" -d postgres -p $TextPort_text $\r$\npause'
890901
FileClose $0
891902
FunctionEnd
903+
904+
892905
;check existing install
893906
;if exist then get install options to vars
894907
Function ChecExistInstall

0 commit comments

Comments
 (0)