summaryrefslogtreecommitdiff
path: root/misc/nsis
diff options
context:
space:
mode:
authorbitraid <bitraid@protonmail.ch>2018-11-06 12:22:52 +0200
committerbitraid <bitraid@protonmail.ch>2018-11-06 12:22:52 +0200
commit7452327850b7cf2cbfc5ee5e2f65eaa843d3dcf1 (patch)
treec296ec5d2983fe219599c3032fcfea9718fbf2b3 /misc/nsis
parent05bf18d4c8a2fc6be534a064cb022e01b9ac55f9 (diff)
downloadqutebrowser-7452327850b7cf2cbfc5ee5e2f65eaa843d3dcf1.tar.gz
qutebrowser-7452327850b7cf2cbfc5ee5e2f65eaa843d3dcf1.zip
NSIS: use DeleteRetryAbort for all files
Even if qutebrowser.exe is successfully deleted, other files might still be locked (QtWebEngineProcess.exe hang).
Diffstat (limited to 'misc/nsis')
-rwxr-xr-xmisc/nsis/mkunlist.cmd15
1 files changed, 10 insertions, 5 deletions
diff --git a/misc/nsis/mkunlist.cmd b/misc/nsis/mkunlist.cmd
index 6c681c3ed..864b208c9 100755
--- a/misc/nsis/mkunlist.cmd
+++ b/misc/nsis/mkunlist.cmd
@@ -23,14 +23,14 @@ if exist "%ULIST%" del "%ULIST%" || exit 3
if exist "%DLIST%" del "%DLIST%" || exit 3
rem Add release files deletion commands
-for /r "%DIST%" %%i in (*) do call:AddToNSH Delete "%%i" "%ULIST%"
+for /r "%DIST%" %%i in (*) do call:AddToNSH f "%%i" "%ULIST%"
rem '*' doesn't catch hidden files and there are a couple files starting with
rem a '.', which will appear as hidden if mapped from a linux file system.
-for /f "tokens=*" %%i in ('dir "%DIST%" /a:h-d /b /s') do call:AddToNSH Delete "%%i" "%ULIST%"
+for /f "tokens=*" %%i in ('dir "%DIST%" /a:h-d /b /s') do call:AddToNSH f "%%i" "%ULIST%"
rem Add to the temporary file the directories removal commands
-for /r "%DIST%" %%i in (.) do call:AddToNSH RMDir "%%i" "%DLIST%"
+for /r "%DIST%" %%i in (.) do call:AddToNSH d "%%i" "%DLIST%"
rem Reverse dir-list items (so each child will get deleted first)
rem and append them to the nsh.
@@ -38,7 +38,7 @@ sort /r "%DLIST%" >> "%ULIST%"
del "%DLIST%"
goto:eof
-rem AddToNSH <command> <item> <out_file>
+rem AddToNSH <f|d> <name> <out_file>
:AddToNSH
rem Strip quotes from file/dir name
set "FN=%~2"
@@ -46,4 +46,9 @@ rem Strip leading path
set "FN=!FN:%DIST%=!"
rem If the name contains a '$', escape it by adding another '$'
set "FN=!FN:$=$$!"
-(echo:%1 "$INSTDIR!FN!") >> %3
+rem Writing to out_file. EnableDelayedExpansion is weird with '!'
+if %1==f (
+ (echo:^^!insertmacro DeleteRetryAbort "$INSTDIR!FN!") >> %3
+) else (
+ (echo:RMDir "$INSTDIR!FN!") >> %3
+)