diff --git a/Dockerfile.jenkins b/Dockerfile.jenkins index 8499c3a..7291fd7 100644 --- a/Dockerfile.jenkins +++ b/Dockerfile.jenkins @@ -1,5 +1,6 @@ FROM schemers/gauche RUN echo "deb http://ftp.de.debian.org/debian bookworm main" > /etc/apt/sources.list -RUN apt update && apt install -y wine +RUN dpkg --add-architecture i386 +RUN apt update && apt install -y wine32 wine64 make wget COPY ./executables/nsis-3.10-setup.exe /setup.exe RUN wine setup.exe /S diff --git a/Jenkinsfile b/Jenkinsfile index 418a629..dd463a6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,7 +4,7 @@ pipeline { dockerfile { filename 'Dockerfile.jenkins' dir '.' - args '--privileged -v /var/run/docker.sock:/var/run/docker.sock' + args '-u root --privileged' } } @@ -15,6 +15,7 @@ pipeline { stages { stage("Build") { steps { + sh 'whoami' sh 'make' archiveArtifacts artifacts: 'setup_*.exe' } diff --git a/README.md b/README.md index e4ec726..5f17407 100644 --- a/README.md +++ b/README.md @@ -7,15 +7,17 @@ there might be more than one implementation. ## Installation -Download the latest setup executable from Jenkins and run it. +Download the latest setup executable from +[Jenkins](https://jenkins.scheme.org/job/rinne/job/snow-fort-windows-installer/job/main/) +and run it. ## Using the libraries 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