Add environment variable for library path

This commit is contained in:
retropikzel 2024-10-11 22:27:09 +03:00
parent 1201d1d73e
commit 90e81467b3
2 changed files with 12 additions and 2 deletions

View File

@ -16,8 +16,8 @@ and run it.
Add the installation path to your implementations load path: Add the installation path to your implementations load path:
%ProgramFiles%/snow %SNOW_LIBRARY_PATH%
For example with Gauche: For example with Gauche:
gosh.exe -r7 -A "%ProgramFiles%/snow" main.scm gosh.exe -r7 -A "%SNOW_LIBRARY_PATH%" main.scm

View File

@ -1,3 +1,5 @@
OutFile "setup_snow.exe" OutFile "setup_snow.exe"
InstallDir "$PROGRAMFILES64" InstallDir "$PROGRAMFILES64"
@ -6,5 +8,13 @@ Section
RMDir "$INSTDIR" RMDir "$INSTDIR"
File /r "snow" File /r "snow"
Push "$INSTDIR" 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 SectionEnd