Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set STACK_ROOT to C:\sr by default #1

Merged
merged 2 commits into from
Aug 24, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ main = writeFile "stack-install.nsi" $ nsis $ do
[ Description "Add installation directory to user %PATH% to allow running Stack in the console."
] $ do
setEnvVarPrepend HKCU "PATH" "$INSTDIR"

section "Set %STACK_ROOT% to recommended default"
[ Description "Set %STACK_ROOT% to C:\\sr to workaround issues with long paths."
] $ do
setEnvVar HKCU "STACK_ROOT" "C:\\sr"

-- Uninstallation sections. (Any section prepended with "un." is an
-- uninstallation option.)
Expand All @@ -59,6 +64,11 @@ main = writeFile "stack-install.nsi" $ nsis $ do
] $ do
setEnvVarRemove HKCU "PATH" "$INSTDIR"

section "un.Set %STACK_ROOT% to recommended default"
[ Description "Remove setting of %STACK_ROOT% to C:\\sr."
] $ do
deleteEnvVar HKCU "STACK_ROOT"

section "un.Compilers installed by stack"
[ Unselected
, Description "Remove %LOCALAPPDATA%/Programs/stack, which contains compilers that have been installed by Stack."
Expand Down