diff --git a/Main.hs b/Main.hs index 41da22b..ae2a8c5 100644 --- a/Main.hs +++ b/Main.hs @@ -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.) @@ -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."