Skip to content
This repository was archived by the owner on Feb 3, 2022. It is now read-only.

Commit def8a6a

Browse files
committed
Update a reg entry for WinGHCi
* hptool/os-extras/win/templates/Nsisfile.nsi.mu * winGHCi adds some reg entries when it is run, and one "WorkdingDir", it reads but never updates if it already exists, causing winGHCi associated with any newer HP installs to use an old value. So, create and remove this particular entry when we do the install.
1 parent bb63ba0 commit def8a6a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

hptool/os-extras/win/templates/Nsisfile.nsi.mu

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,8 @@ Section "Store GHC's location in registry" SecGHCLoc
289289
WriteRegStr HKCU "Software\Haskell\GHC\ghc-${GHC_VERSION}" "InstallDir" "$INSTDIR"
290290
WriteRegStr HKCU "Software\Haskell\GHC" "InstallDir" "$INSTDIR"
291291

292+
WriteRegStr HKCU "Software\Haskell\WinGHCi 1.0.6" "WorkingDir" "$INSTDIR\winghci"
293+
292294
SectionEnd
293295

294296
Section "Create uninstaller" SecAddRem
@@ -397,6 +399,8 @@ Section "Uninstall"
397399
398400
DeleteRegKey HKCU "Software\Haskell\GHC\ghc-${GHC_VERSION}"
399401
DeleteRegKey HKCU "Software\Haskell\GHC"
402+
; remove WorkingDir but keep any user customizations for winGHCi
403+
DeleteRegValue HKCU "Software\Haskell\WinGHCi 1.0.6" "WorkingDir"
400404
DeleteRegKey HKLM "${PRODUCT_DIR_REG_KEY}"
401405
DeleteRegKey /IfEmpty HKCU Software\Haskell
402406
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\HaskellPlatform-${PLATFORM_VERSION}"

0 commit comments

Comments
 (0)