Skip to content

Commit 75f3170

Browse files
committed
Merge branch 'Elewyth-feature/add-windows-registry-displayversion'
2 parents a52afb5 + 0e2362c commit 75f3170

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Behavior changes:
1919
Other enhancements:
2020

2121
* Bump to `hpack-0.35.0`.
22+
* On Windows, the installer now sets `DisplayVersion` in the registry, enabling
23+
tools like `winget` to properly read the version number.
2224

2325
Bug fixes:
2426

etc/scripts/build-stack-installer.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import Development.NSIS.Plugins.EnvVarUpdate
1616

1717
main :: IO ()
1818
main = do
19-
[srcPath, execPath, nsiPath] <- getArgs
19+
[srcPath, execPath, nsiPath, stackVersionStr] <- getArgs
2020

2121
writeFile (fromString nsiPath) $ nsis $ do
2222
_ <- constantStr "Name" "Haskell Stack"
@@ -43,6 +43,7 @@ main = do
4343

4444
-- Write the uninstall keys for Windows
4545
writeRegStr HKCU "Software/Microsoft/Windows/CurrentVersion/Uninstall/$Name" "DisplayName" "$Name"
46+
writeRegStr HKCU "Software/Microsoft/Windows/CurrentVersion/Uninstall/$Name" "DisplayVersion" (str stackVersionStr)
4647
writeRegStr HKCU "Software/Microsoft/Windows/CurrentVersion/Uninstall/$Name" "UninstallString" "\"$INSTDIR/uninstall-stack.exe\""
4748
writeRegDWORD HKCU "Software/Microsoft/Windows/CurrentVersion/Uninstall/$Name" "NoModify" 1
4849
writeRegDWORD HKCU "Software/Microsoft/Windows/CurrentVersion/Uninstall/$Name" "NoRepair" 1

etc/scripts/release.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ rules global@Global{..} args = do
259259
[ binaryExeFileName
260260
, binaryInstallerFileName
261261
, out
262+
, stackVersionStr global
262263
] :: Action ()
263264

264265
releaseBinDir </> binaryName </> stackExeFileName %> \out -> do

0 commit comments

Comments
 (0)