From fac23b7b383e53d48754a374fb3f2dd8417a5f0f Mon Sep 17 00:00:00 2001 From: retropikzel Date: Sat, 12 Oct 2024 00:42:33 -0400 Subject: [PATCH 1/6] Make the build work in Jenkins (#1) Reviewed-on: https://gitea.scheme.org/rinne/snow-fort-windows-installer/pulls/1 Co-authored-by: retropikzel Co-committed-by: retropikzel --- Dockerfile.jenkins | 3 ++- Jenkinsfile | 3 ++- README.md | 8 +++++--- install.nsi | 10 ++++++++++ 4 files changed, 19 insertions(+), 5 deletions(-) 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 From adbfdf23db70d326102f55838ff26ecdbf441489 Mon Sep 17 00:00:00 2001 From: retropikzel Date: Sat, 12 Oct 2024 07:47:14 +0300 Subject: [PATCH 2/6] Fixing the build --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 418a629..4227528 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' } } From b30d83188c8fd57c037339f3570f89d418547493 Mon Sep 17 00:00:00 2001 From: retropikzel Date: Sat, 12 Oct 2024 07:47:48 +0300 Subject: [PATCH 3/6] Fixing the build --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index dd463a6..3ea5f26 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,6 +16,7 @@ pipeline { stage("Build") { steps { sh 'whoami' + sh 'make snow' sh 'make' archiveArtifacts artifacts: 'setup_*.exe' } From ba6b4a8aca4145a75095e4ae2ecc55d7b7a12da9 Mon Sep 17 00:00:00 2001 From: retropikzel Date: Sat, 12 Oct 2024 07:49:31 +0300 Subject: [PATCH 4/6] Fixing the build --- Jenkinsfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3ea5f26..493fd6e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -15,12 +15,15 @@ pipeline { stages { stage("Build") { steps { - sh 'whoami' - sh 'make snow' + sh 'make clean' sh 'make' archiveArtifacts artifacts: 'setup_*.exe' } } } + post { + always { + deleteDir() + } } From cc520faa470c85c621e86d2f62d4564e90b6ae87 Mon Sep 17 00:00:00 2001 From: retropikzel Date: Sat, 12 Oct 2024 07:49:49 +0300 Subject: [PATCH 5/6] Fixing the build --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 493fd6e..65781f0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,5 +25,6 @@ pipeline { always { deleteDir() } + } } From 30dc66af7bc43f0cddd615cc0026e0fdf19479a7 Mon Sep 17 00:00:00 2001 From: retropikzel Date: Sat, 12 Oct 2024 07:51:01 +0300 Subject: [PATCH 6/6] Fixing the build --- Jenkinsfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 65781f0..5349eb2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,6 +8,10 @@ pipeline { } } + triggers { + cron("59 23 * * 1") // Build every monday + } + options { buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10')) }