diff --git a/README.md b/README.md index 9d21e92..7a95ecb 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,8 @@ and run it. Add the installation path to your implementations load path: - %ProgramFiles%/snow + %SNOW_LIBRARY_PATH% For example with Gauche: - gosh.exe -r7 -A "%ProgramFiles%/snow" main.scm + gosh.exe -r7 -A "%SNOW_LIBRARY_PATH%" main.scm diff --git a/install.nsi b/install.nsi index bba4f43..07de8a1 100644 --- a/install.nsi +++ b/install.nsi @@ -1,3 +1,5 @@ + + OutFile "setup_snow.exe" InstallDir "$PROGRAMFILES64" @@ -6,5 +8,13 @@ Section RMDir "$INSTDIR" File /r "snow" Push "$INSTDIR" + + !include "winmessages.nsh" + !define env_hklm 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"' + !define env_hkcu 'HKCU "Environment"' + + WriteRegExpandStr ${env_hklm} SNOW_LIBRARY_PATH "$PROGRAMFILES64/snow" + WriteRegExpandStr ${env_hkcu} SNOW_LIBRARY_PATH "$PROGRAMFILES64/snow" + SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 SectionEnd