From ca5d905c57f806544f38619ffa0da7e2d656f733 Mon Sep 17 00:00:00 2001 From: Arjan van der Kruijt Date: Fri, 29 May 2026 11:55:35 +0200 Subject: [PATCH 1/4] Fix installer script for BOINC --- bucket/boinc.json | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/bucket/boinc.json b/bucket/boinc.json index db6a589a1cb559..f860a16de2a652 100644 --- a/bucket/boinc.json +++ b/bucket/boinc.json @@ -3,7 +3,6 @@ "description": "Volunteer scientific or grid computing client", "homepage": "https://boinc.berkeley.edu/", "license": "LGPL-3.0-or-later", - "depends": "isx", "notes": [ "Set DATADIR and INSTALLDIR in:", "Computer\\HKEY_LOCAL_MACHINE\\SOFTWARE\\Space Sciences Laboratory, U.C. Berkeley\\BOINC Setup" @@ -17,11 +16,20 @@ }, "installer": { "script": [ - "Invoke-ExternalCommand ((Get-Command 'isx' -CommandType Application).Source) -ArgumentList \"$dir\\$fname\" -LogPath \"$dir\\isx.log\" | Out-Null", - "$folder = Get-ChildItem \"$dir\" -Directory | Select-Object -First 1 -ExpandProperty FullName", + "Start-Process \"$dir\\$fname\" -ArgumentList '/a'", + "Start-Sleep -Seconds 5", + "$msi = Get-ChildItem 'C:\\Windows\\Downloaded Installations\\BOINC' -Recurse -Filter 'BOINC.msi' | Sort-Object LastWriteTime -Descending | Select-Object -First 1", "$extract = if ($architecture -eq '64bit') { 'Program Files 64' } else { 'program files' }", - "Expand-MsiArchive \"$folder\\BOINC.msi\" \"$dir\" -ExtractDir \"$extract\\BOINC\" -Removal", - "Remove-Item $folder -Force -Recurse" + "if ($msi)", + "{", + " Write-Host \"MSI located, unpacking... This may take a moment.\"", + " Expand-MsiArchive $msi.FullName \"$dir\" -ExtractDir \"$extract\\BOINC\" -Removal", + "}", + "else", + "{", + " Write-Host \"MSI not found, installation may have failed.\" -ForegroundColor Red", + " exit 1", + "}" ] }, "post_install": [ From 9a82b96105e038c97aeac9b27c077533b1ba2c87 Mon Sep 17 00:00:00 2001 From: Arjan van der Kruijt Date: Fri, 29 May 2026 12:37:39 +0200 Subject: [PATCH 2/4] Process feedback CodeRabbit: more resiliant extraction code --- bucket/boinc.json | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bucket/boinc.json b/bucket/boinc.json index f860a16de2a652..7f9f8fe1616d53 100644 --- a/bucket/boinc.json +++ b/bucket/boinc.json @@ -16,9 +16,13 @@ }, "installer": { "script": [ - "Start-Process \"$dir\\$fname\" -ArgumentList '/a'", - "Start-Sleep -Seconds 5", - "$msi = Get-ChildItem 'C:\\Windows\\Downloaded Installations\\BOINC' -Recurse -Filter 'BOINC.msi' | Sort-Object LastWriteTime -Descending | Select-Object -First 1", + "Start-Process \"$dir\\$fname\" -ArgumentList '/extract'", + "$msiDir = \"$env:windir\\Downloaded Installations\\BOINC\"", + "$msi = $null; $deadline = (Get-Date).AddSeconds(60)", + "while (-not $msi -and (Get-Date) -lt $deadline) {", + " Start-Sleep -Seconds 2", + " $msi = Get-ChildItem $msiDir -Recurse -Filter 'BOINC.msi' -ErrorAction SilentlyContinue | Sort-Object LastWriteTime -Descending | Select-Object -First 1", + "}", "$extract = if ($architecture -eq '64bit') { 'Program Files 64' } else { 'program files' }", "if ($msi)", "{", From 3ceb8aa45706abce02d4fa8c3328319da85644fe Mon Sep 17 00:00:00 2001 From: Arjan van der Kruijt Date: Fri, 29 May 2026 12:57:33 +0200 Subject: [PATCH 3/4] Lint fix by formatjson.ps1 --- bucket/boinc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bucket/boinc.json b/bucket/boinc.json index 7f9f8fe1616d53..1124b11c7e1c73 100644 --- a/bucket/boinc.json +++ b/bucket/boinc.json @@ -32,7 +32,7 @@ "else", "{", " Write-Host \"MSI not found, installation may have failed.\" -ForegroundColor Red", - " exit 1", + " exit 1", "}" ] }, From c0fc220bf4f46508cbafdb9314dc10ead4332eb4 Mon Sep 17 00:00:00 2001 From: Arjan van der Kruijt Date: Fri, 29 May 2026 12:59:57 +0200 Subject: [PATCH 4/4] Process feedback CodeRabbit: Only use new msi file --- bucket/boinc.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bucket/boinc.json b/bucket/boinc.json index 1124b11c7e1c73..a5d8af5228546c 100644 --- a/bucket/boinc.json +++ b/bucket/boinc.json @@ -16,12 +16,13 @@ }, "installer": { "script": [ - "Start-Process \"$dir\\$fname\" -ArgumentList '/extract'", "$msiDir = \"$env:windir\\Downloaded Installations\\BOINC\"", + "$since = Get-Date", + "Start-Process \"$dir\\$fname\" -ArgumentList '/extract'", "$msi = $null; $deadline = (Get-Date).AddSeconds(60)", "while (-not $msi -and (Get-Date) -lt $deadline) {", " Start-Sleep -Seconds 2", - " $msi = Get-ChildItem $msiDir -Recurse -Filter 'BOINC.msi' -ErrorAction SilentlyContinue | Sort-Object LastWriteTime -Descending | Select-Object -First 1", + " $msi = Get-ChildItem $msiDir -Recurse -Filter 'BOINC.msi' -ErrorAction SilentlyContinue | Where-Object LastWriteTime -ge $since | Sort-Object LastWriteTime -Descending | Select-Object -First 1", "}", "$extract = if ($architecture -eq '64bit') { 'Program Files 64' } else { 'program files' }", "if ($msi)",