mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-11-23 20:12:09 +03:00
#267 fix windows installer emptying user Path variable
This commit is contained in:
parent
98632ed4c3
commit
215b0f4855
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
@ -113,9 +113,10 @@ jobs:
|
||||
Get-ChildItem .\*win64.zip
|
||||
cd ..\..
|
||||
# create installer
|
||||
(Get-Command choco).Path
|
||||
choco install --confirm --no-progress nsis
|
||||
refreshenv
|
||||
refreshenv
|
||||
Get-Command Expand-Archive
|
||||
Expand-Archive -Path '.\ci\windows\EnVar_plugin.zip' -DestinationPath 'C:\Program Files (x86)\NSIS' -Verbose
|
||||
cd .\target\win-package
|
||||
makensis.exe /NOCD /V4 ..\..\ci\windows\hurl.nsi
|
||||
- name: Archive production artifacts
|
||||
|
BIN
ci/windows/EnVar_plugin.zip
Normal file
BIN
ci/windows/EnVar_plugin.zip
Normal file
Binary file not shown.
@ -52,8 +52,13 @@ SectionGroup "executables"
|
||||
SetOutPath $INSTDIR
|
||||
File "hurl.exe"
|
||||
; Write installation path
|
||||
ReadRegStr $0 HKCU "Environment" "Path"
|
||||
WriteRegStr HKCU "Environment" "path" "$0;$INSTDIR"
|
||||
EnVar::SetHKCU
|
||||
EnVar::Check "NULL" "NULL"
|
||||
EnVar::DeleteValue "Path" ";$INSTDIR"
|
||||
EnVar::DeleteValue "Path" "$INSTDIR;"
|
||||
EnVar::AddValue "Path" ";$INSTDIR"
|
||||
; ReadRegStr $0 HKCU "Environment" "Path"
|
||||
; WriteRegStr HKCU "Environment" "path" "$0;$INSTDIR"
|
||||
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
|
||||
; Write the uninstall
|
||||
WriteUninstaller "$INSTDIR\uninstall.exe"
|
||||
@ -122,4 +127,4 @@ Section "Uninstall"
|
||||
Delete $INSTDIR\*
|
||||
; Remove directories
|
||||
RMDir "$INSTDIR"
|
||||
SectionEnd
|
||||
SectionEnd
|
Loading…
Reference in New Issue
Block a user