Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions bucket/boinc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -17,11 +16,25 @@
},
"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",
"$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 | Where-Object LastWriteTime -ge $since | 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": [
Expand Down