@@ -15,7 +15,7 @@ ${IfNot} ${Silent}
1515 SetDetailsPrint both
1616 ; 7-Zip extraction does not stream filenames into the NSIS list (unlike File commands).
1717 ; Explicit DetailPrint lines are required for any visible log during install.
18- DetailPrint " Preparing ${PRODUCT_NAME} ${VERSION}..."
18+ DetailPrint " Step 1/10 — Preparing ${PRODUCT_NAME} ${VERSION}..."
1919${endif}
2020
2121; Installed layout: $INSTDIR\versions\<VERSION>\* and $INSTDIR\current → junction to that folder.
@@ -31,6 +31,10 @@ ${EndIf}
3131# must be called before uninstallOldVersion
3232!insertmacro setLinkVars
3333
34+ ${IfNot} ${Silent}
35+ DetailPrint " Step 2/10 — Checking that ${PRODUCT_NAME} is not running..."
36+ ${EndIf}
37+
3438!ifdef ONE_CLICK
3539 !ifdef HEADER_ICO
3640 File /oname= $PLUGINSDIR \installerHeaderico.ico " ${HEADER_ICO}"
@@ -70,7 +74,7 @@ ${if} $isTryToKeepShortcuts == "true"
7074${endif}
7175
7276${IfNot} ${Silent}
73- DetailPrint " Checking for a previous installation..."
77+ DetailPrint " Step 3/10 — Checking for a previous installation and uninstalling the old build if needed ..."
7478${EndIf}
7579!insertmacro uninstallOldVersion SHELL_CONTEXT
7680!insertmacro handleUninstallResult SHELL_CONTEXT
@@ -81,7 +85,7 @@ ${if} $installMode == "all"
8185${endIf}
8286
8387${IfNot} ${Silent}
84- DetailPrint " Creating versioned install folder..."
88+ DetailPrint " Step 4/10 — Creating versioned install folder versions\${VERSION} ..."
8589${EndIf}
8690CreateDirectory " $INSTDIR\versions"
8791SetOutPath " $INSTDIR\versions\${VERSION}"
@@ -91,21 +95,34 @@ SetOutPath "$INSTDIR\versions\${VERSION}"
9195!endif
9296
9397${IfNot} ${Silent}
94- DetailPrint " Extracting application package ( 7-Zip) - this step may take a while ..."
98+ DetailPrint " Step 5/10 — Extracting application package with 7-Zip (longest step; file names are not listed) ..."
9599${EndIf}
96100!insertmacro installApplicationFiles
97101${IfNot} ${Silent}
98- DetailPrint " Extraction finished."
99- DetailPrint " Pointing 'current' to this version and registering the app ..."
102+ DetailPrint " Step 6/10 — Extraction finished."
103+ DetailPrint " Step 7/10 — Pointing 'current' at versions\${VERSION} (directory junction) ..."
100104${EndIf}
101105; Directory junction so shortcuts and the updater always use …\current\<exe>
102- IfFileExists " $INSTDIR\current" 0 +2
103- ExecWait ' cmd.exe /c rmdir "$INSTDIR\current"'
104- ExecWait ' cmd.exe /c mklink /J "$INSTDIR\current" "$INSTDIR\versions\${VERSION}"'
106+ IfFileExists " $INSTDIR\current" hspRemoveOldCurrent hspMklinkCurrent
107+ hspRemoveOldCurrent:
108+ ${IfNot} ${Silent}
109+ DetailPrint " (removing existing junction or folder: $INSTDIR\current)"
110+ ${EndIf}
111+ nsExec::ExecToLog ' "$SYSDIR\cmd.exe" /c rmdir "$INSTDIR\current"'
112+ Pop $R9
113+ hspMklinkCurrent:
114+ ${IfNot} ${Silent}
115+ DetailPrint " (creating junction: current -> versions\${VERSION})"
116+ ${EndIf}
117+ nsExec::ExecToLog ' "$SYSDIR\cmd.exe" /c mklink /J "$INSTDIR\current" "$INSTDIR\versions\${VERSION}"'
118+ Pop $R9
105119StrCpy $appExe " $INSTDIR\current\${APP_EXECUTABLE_FILENAME}"
120+ ${IfNot} ${Silent}
121+ DetailPrint " Step 8/10 — Writing install location and Add/Remove Programs registry entries..."
122+ ${EndIf}
106123!insertmacro registryAddInstallInfo
107124${IfNot} ${Silent}
108- DetailPrint " Creating Start Menu and desktop shortcuts..."
125+ DetailPrint " Step 9/10 — Creating Start Menu and desktop shortcuts..."
109126${EndIf}
110127!insertmacro addStartMenuLink $keepShortcuts
111128!insertmacro addDesktopLink $keepShortcuts
@@ -117,10 +134,16 @@ ${else}
117134${endIf}
118135
119136!ifmacrodef registerFileAssociations
137+ ${IfNot} ${Silent}
138+ DetailPrint " Registering file associations..."
139+ ${EndIf}
120140 !insertmacro registerFileAssociations
121141!endif
122142
123143!ifmacrodef customInstall
144+ ${IfNot} ${Silent}
145+ DetailPrint " Step 10/10 — Running final install hooks..."
146+ ${EndIf}
124147 !insertmacro customInstall
125148!endif
126149
0 commit comments