Skip to content

Commit 0c61e04

Browse files
committed
Launch packaged SBCL through ASCII Windows paths
1 parent ac2524e commit 0c61e04

2 files changed

Lines changed: 15 additions & 10 deletions

File tree

.github/workflows/windows-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
shell: pwsh
7474
run: |
7575
$archive = (Get-ChildItem dist\*.zip).FullName
76-
$stage = Join-Path $env:RUNNER_TEMP 'release-smoke'
76+
$stage = Join-Path $env:RUNNER_TEMP 'release-smoke-Lukáš-žluťoučký'
7777
Expand-Archive -LiteralPath $archive -DestinationPath $stage
7878
$release = Join-Path $stage ([IO.Path]::GetFileNameWithoutExtension($archive))
7979
$env:LOCALAPPDATA = Join-Path $env:RUNNER_TEMP 'release-smoke-Lukáš-žluťoučký-home'

bin/autolith-release.ps1

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,23 @@ public static class AutolithWindowsPath
3333
}
3434
'@
3535

36-
function ConvertTo-AutolithSbclCorePath {
36+
function ConvertTo-AutolithSbclPath {
3737
param([Parameter(Mandatory = $true)][string]$Path)
38-
$parent = Split-Path -Parent $Path
39-
$leaf = Split-Path -Leaf $Path
40-
$shortParent = [AutolithWindowsPath]::GetShortPath($parent)
41-
$runtimePath = Join-Path $shortParent $leaf
38+
$runtimePath = [AutolithWindowsPath]::GetShortPath($Path)
4239
if ($runtimePath -match '[^\x00-\x7F]') {
43-
throw "Autolith cannot obtain an ASCII Windows path for SBCL core images below $parent."
40+
throw "Autolith cannot obtain an ASCII Windows path for SBCL from $Path."
4441
}
4542
return $runtimePath
4643
}
47-
$releaseRoot = Split-Path -Parent $PSScriptRoot
44+
45+
function ConvertTo-AutolithSbclCorePath {
46+
param([Parameter(Mandatory = $true)][string]$Path)
47+
$parent = Split-Path -Parent $Path
48+
$leaf = Split-Path -Leaf $Path
49+
$shortParent = ConvertTo-AutolithSbclPath $parent
50+
return Join-Path $shortParent $leaf
51+
}
52+
$releaseRoot = ConvertTo-AutolithSbclPath (Split-Path -Parent $PSScriptRoot)
4853
$sourceRoot = Join-Path $releaseRoot 'libexec\autolith'
4954
$runtime = Join-Path $releaseRoot 'runtime\sbcl.exe'
5055
$runtimeSource = Join-Path $releaseRoot 'libexec\sbcl-source'
@@ -59,8 +64,8 @@ $native = Join-Path $releaseRoot 'native'
5964
$fff = Get-ChildItem -LiteralPath $native -Filter '*fff*.dll' -File | Select-Object -First 1
6065
$color = Get-ChildItem -LiteralPath $native -Filter '*colorlisp*.dll' -File | Select-Object -First 1
6166
if (-not $fff -or -not $color) { throw 'Autolith release failed: bundled native libraries are missing.' }
62-
$env:AUTOLITH_FFF_LIBRARY = $fff.FullName
63-
$env:COLORLISP_NATIVE_LIBRARY = $color.FullName
67+
$env:AUTOLITH_FFF_LIBRARY = ConvertTo-AutolithSbclPath $fff.FullName
68+
$env:COLORLISP_NATIVE_LIBRARY = ConvertTo-AutolithSbclPath $color.FullName
6469
$env:PATH = "$native;$env:PATH"
6570
$env:GIT_OPTIONAL_LOCKS = '0'
6671
if ($args.Count -gt 0 -and $args[0] -eq '--autolith-release-probe') {

0 commit comments

Comments
 (0)