openvibers/source.openvibe.games Commits
Fix Windows SDK bootstrap download path
Changes
@@@ -60,7 +60,7 @@ jobs:Get-ChildItem -Force | Select-Object Mode,Length,Name | Tee-Object -FilePath artifacts/windows-build-debug/repo-root-before-build.txtif (Test-Path engine) { Get-ChildItem -Force engine | Select-Object Mode,Length,Name | Tee-Object -FilePath artifacts/windows-build-debug/engine-before-build.txt } else { Write-Host "[miss] engine directory" }-- - name: Bootstrap Source SDK 2013 MP++ - name: Bootstrap Source SDK 2013run: |$ErrorActionPreference = 'Stop'powershell -NoProfile -ExecutionPolicy Bypass -File tools/bootstrap-source-sdk-2013-windows.ps1 *>&1 | Tee-Object -FilePath artifacts/windows-build-debug/bootstrap-source-sdk-2013.log@@@ -1,10 +1,24 @@# Windows Source SDK bootstrap--The GitHub Actions Windows runner does not have Alex's local `engine/source-sdk-2013` checkout. The workflow bootstraps it by cloning ValveSoftware/source-sdk-2013.++The Windows GitHub Actions runner is fresh and does not have Alex's local `engine/source-sdk-2013` checkout.--Important detail: the Source SDK 2013 multiplayer code is normally on the `mp` branch, not necessarily in a `mp/` directory on the default branch. The bootstrap script now supports both layouts:++The workflow bootstraps Valve's public Source SDK 2013 repository into:--- `source-sdk-2013` checked out directly on the `mp` branch, with `src/...` at repo root--- older/mirrored layout with `mp/src/...`++```text++engine/source-sdk-2013++```--The workflow should not upload or install stock/stale DLLs. A DLL artifact is considered useful only when `client.dll` contains OpenVibe command strings such as `ov_join`, `ov_menu`, or `OpenVibe`.++The expected SDK layout is:++++```text++engine/source-sdk-2013/src/game/client/hl2mp++engine/source-sdk-2013/src/game/server/hl2mp++```++++The bootstrap intentionally downloads the default/master zip first:++++```text++https://codeload.github.com/ValveSoftware/source-sdk-2013/zip/refs/heads/master++```++++This avoids brittle branch assumptions and avoids GitHub Actions `git` auth/header issues. A git clone fallback is still present for debugging.@@@ -5,94 +5,106 @@ $Sdk = if ($env:OPENVIBE_SDK) { $env:OPENVIBE_SDK } else { Join-Path $Root 'engi$Src = Join-Path $Sdk 'src'$Deps = Join-Path $Root '_deps'$LogDir = Join-Path $Root 'artifacts/windows-build-debug'--New-Item -ItemType Directory -Force -Path $LogDir | Out-Null++New-Item -ItemType Directory -Force -Path $Deps, $LogDir | Out-Nullfunction Say($m) { Write-Host "[openvibe-sdk-bootstrap] $m" }--function Has-HL2MP($base) {-- return ((Test-Path (Join-Path $base 'src/game/client/hl2mp')) -and (Test-Path (Join-Path $base 'src/game/server/hl2mp')))++function Dump-Dir($path, $outName) {++ try {++ if (Test-Path $path) {++ Get-ChildItem -Force $path | Select-Object Mode,Length,Name | Format-Table -AutoSize | Out-File (Join-Path $LogDir $outName)++ } else {++ "[missing] $path" | Out-File (Join-Path $LogDir $outName)++ }++ } catch {++ "dump failed: $($_.Exception.Message)" | Out-File (Join-Path $LogDir $outName)++ }}--function Run-Git($args, $logName) {-- $log = Join-Path $LogDir $logName-- Say "git $args"-- & git @args 2>&1 | Tee-Object -FilePath $log-- if ($LASTEXITCODE -ne 0) { throw "git $args failed with exit code $LASTEXITCODE. See $log" }++function Assert-UsableSdk($prefix) {++ if ((Test-Path (Join-Path $Src 'game/client/hl2mp')) -and (Test-Path (Join-Path $Src 'game/server/hl2mp'))) {++ Say "$prefix SDK tree looks usable"++ return $true++ }++ return $false++}++function Copy-SdkRoot($sourceRoot) {++ Say "copying SDK root $sourceRoot -> $Sdk"++ if (Test-Path $Sdk) { Remove-Item -Recurse -Force $Sdk }++ New-Item -ItemType Directory -Force -Path $Sdk | Out-Null++ Copy-Item -Path (Join-Path $sourceRoot '*') -Destination $Sdk -Recurse -Force++ Dump-Dir $Sdk 'sdk-root-after-copy.txt'++ if (!(Assert-UsableSdk 'copied')) {++ throw "Copied SDK is missing expected HL2MP folders under $Src"++ }}Say "root=$Root"Say "sdk=$Sdk"--Say "logdir=$LogDir"++Say "deps=$Deps"--if (Has-HL2MP $Sdk) {-- Say "existing SDK tree already contains HL2MP client/server"-- exit 0--}++if (Assert-UsableSdk 'existing') { exit 0 }--New-Item -ItemType Directory -Force -Path $Deps | Out-Null++# ValveSoftware/source-sdk-2013 currently uses the default/master layout with src/ at the repository root.++# Do not assume an mp branch or mp/src folder. Downloading the zip avoids git/extraheader/auth weirdness on Actions runners.++$zip = Join-Path $Deps 'source-sdk-2013-master.zip'++$extractParent = Join-Path $Deps 'source-sdk-2013-zip'++$zipRoot = Join-Path $extractParent 'source-sdk-2013-master'++$zipUrl = 'https://codeload.github.com/ValveSoftware/source-sdk-2013/zip/refs/heads/master'--# Valve's source-sdk-2013 repository is normally organized by branches: mp and sp.--# Some forks/mirrors use root folders like mp/src. Support both layouts.--$RepoUrl = if ($env:OPENVIBE_SOURCE_SDK_REPO) { $env:OPENVIBE_SOURCE_SDK_REPO } else { 'https://github.com/ValveSoftware/source-sdk-2013.git' }--$ValveRepo = Join-Path $Deps 'source-sdk-2013-mp'----if (Test-Path $ValveRepo) { Remove-Item -Recurse -Force $ValveRepo }----$cloned = $false++$zipOk = $falsetry {-- Say "cloning Valve Source SDK 2013 branch mp"-- Run-Git @('clone','--depth','1','--branch','mp',$RepoUrl,$ValveRepo) 'bootstrap-git-clone-mp.log'-- $cloned = $true--} catch {-- Say "mp branch clone failed: $($_.Exception.Message)"-- if (Test-Path $ValveRepo) { Remove-Item -Recurse -Force $ValveRepo }-- Say "falling back to default branch clone"-- Run-Git @('clone','--depth','1',$RepoUrl,$ValveRepo) 'bootstrap-git-clone-default.log'-- $cloned = $true--}----if (-not $cloned) { throw "could not clone Source SDK repo" }++ Say "downloading Valve SDK master zip from $zipUrl"++ if (Test-Path $zip) { Remove-Item -Force $zip }++ if (Test-Path $extractParent) { Remove-Item -Recurse -Force $extractParent }++ New-Item -ItemType Directory -Force -Path $extractParent | Out-Null++++ if (Get-Command curl.exe -ErrorAction SilentlyContinue) {++ & curl.exe -L --retry 4 --retry-delay 3 --connect-timeout 30 -o $zip $zipUrl 2>&1 | Tee-Object -FilePath (Join-Path $LogDir 'bootstrap-curl-master-zip.log')++ if ($LASTEXITCODE -ne 0) { throw "curl.exe failed with exit code $LASTEXITCODE" }++ } else {++ Invoke-WebRequest -Uri $zipUrl -OutFile $zip -UseBasicParsing 2>&1 | Tee-Object -FilePath (Join-Path $LogDir 'bootstrap-iwr-master-zip.log')++ }--"=== Valve repo root ===" | Out-File (Join-Path $LogDir 'valve-repo-root.txt')--Get-ChildItem -Force $ValveRepo | Select-Object Mode,Length,Name | Format-Table -AutoSize | Out-File (Join-Path $LogDir 'valve-repo-root.txt') -Append--"=== candidate src folders ===" | Out-File (Join-Path $LogDir 'valve-candidate-src.txt')--Get-ChildItem -Path $ValveRepo -Recurse -Directory -Filter src -ErrorAction SilentlyContinue |-- Select-Object FullName | Format-List | Out-File (Join-Path $LogDir 'valve-candidate-src.txt') -Append++ $zipInfo = Get-Item $zip++ Say "zip bytes=$($zipInfo.Length)"++ if ($zipInfo.Length -lt 1000000) { throw "downloaded zip is suspiciously small" }--$candidates = @(-- $ValveRepo,-- (Join-Path $ValveRepo 'mp'),-- (Join-Path $ValveRepo 'srcsdk/mp'),-- (Join-Path $ValveRepo 'source-sdk-2013/mp')--)++ Expand-Archive -Path $zip -DestinationPath $extractParent -Force++ Dump-Dir $extractParent 'zip-extract-parent.txt'++ Dump-Dir $zipRoot 'zip-root.txt'--$SourceRoot = $null--foreach ($candidate in $candidates) {-- if (Has-HL2MP $candidate) {-- $SourceRoot = $candidate-- break++ if (Test-Path (Join-Path $zipRoot 'src/game/client/hl2mp')) {++ Copy-SdkRoot $zipRoot++ $zipOk = $true++ } else {++ throw "zip did not contain expected src/game/client/hl2mp at $zipRoot"}++} catch {++ Say "zip bootstrap failed: $($_.Exception.Message)"++ $_ | Out-String | Out-File (Join-Path $LogDir 'bootstrap-zip-exception.txt')}--if (-not $SourceRoot) {-- $matches = Get-ChildItem -Path $ValveRepo -Recurse -Directory -Filter hl2mp -ErrorAction SilentlyContinue |-- Where-Object { $_.FullName -match '[\\/]src[\\/]game[\\/](client|server)[\\/]hl2mp$' }-- $matches | Select-Object FullName | Format-List | Out-File (Join-Path $LogDir 'hl2mp-folder-search.txt')-- throw "Could not find Source SDK 2013 MP HL2MP layout after clone. Check valve-repo-root.txt, valve-candidate-src.txt, and hl2mp-folder-search.txt."--}----Say "source root=$SourceRoot"--Say "copying Source SDK MP layout into $Sdk"--if (Test-Path $Sdk) { Remove-Item -Recurse -Force $Sdk }--New-Item -ItemType Directory -Force -Path $Sdk | Out-Null--Copy-Item -Path (Join-Path $SourceRoot '*') -Destination $Sdk -Recurse -Force++if ($zipOk) { Say 'SDK bootstrapped successfully from zip'; exit 0 }--if (!(Has-HL2MP $Sdk)) {-- Get-ChildItem -Force $Sdk | Select-Object Mode,Length,Name | Format-Table -AutoSize | Out-File (Join-Path $LogDir 'sdk-root-after-copy.txt')-- throw "Bootstrapped SDK is missing expected HL2MP folders after copy"++# Last-resort git fallback. Clear possible GitHub Actions extraheaders and force public HTTPS.++$gitRepo = Join-Path $Deps 'source-sdk-2013-git'++try {++ Say "trying git clone fallback"++ git config --global --unset-all http.https://github.com/.extraheader 2>$null++ git config --global --unset-all http.https://github.com/ValveSoftware/source-sdk-2013.extraheader 2>$null++ if (Test-Path $gitRepo) { Remove-Item -Recurse -Force $gitRepo }++ & git -c http.https://github.com/.extraheader= clone --depth 1 --single-branch https://github.com/ValveSoftware/source-sdk-2013.git $gitRepo 2>&1 | Tee-Object -FilePath (Join-Path $LogDir 'bootstrap-git-clone-master.log')++ if ($LASTEXITCODE -ne 0) { throw "git clone failed with exit code $LASTEXITCODE" }++ Dump-Dir $gitRepo 'git-root.txt'++ if (Test-Path (Join-Path $gitRepo 'src/game/client/hl2mp')) {++ Copy-SdkRoot $gitRepo++ Say 'SDK bootstrapped successfully from git'++ exit 0++ }++ throw "git clone did not contain src/game/client/hl2mp"++} catch {++ Say "git bootstrap failed: $($_.Exception.Message)"++ $_ | Out-String | Out-File (Join-Path $LogDir 'bootstrap-git-exception.txt')}--"=== SDK root after copy ===" | Out-File (Join-Path $LogDir 'sdk-root-after-copy.txt')--Get-ChildItem -Force $Sdk | Select-Object Mode,Length,Name | Format-Table -AutoSize | Out-File (Join-Path $LogDir 'sdk-root-after-copy.txt') -Append--"=== SDK src root after copy ===" | Out-File (Join-Path $LogDir 'sdk-src-root-after-copy.txt')--Get-ChildItem -Force (Join-Path $Sdk 'src') | Select-Object Mode,Length,Name | Format-Table -AutoSize | Out-File (Join-Path $LogDir 'sdk-src-root-after-copy.txt') -Append----Say "SDK bootstrapped successfully"++Dump-Dir $Deps 'deps-after-bootstrap-failure.txt'++throw "Could not bootstrap ValveSoftware/source-sdk-2013. Check openvibe-windows-build-debug artifact, especially bootstrap-curl-master-zip.log, bootstrap-zip-exception.txt, and bootstrap-git-clone-master.log."@@@ -52,3 +52,6 @@ elseecho "[openvibe] no DLL artifact available yet" >&2exit 3fi++++++# Extra bootstrap tails for current Windows workflow debugging.
@@ -60,7 +60,7 @@ jobs:
@@ -60,7 +60,7 @@ jobs:
Get-ChildItem -Force | Select-Object Mode,Length,Name | Tee-Object -FilePath artifacts/windows-build-debug/repo-root-before-build.txt
Get-ChildItem -Force | Select-Object Mode,Length,Name | Tee-Object -FilePath artifacts/windows-build-debug/repo-root-before-build.txt
if (Test-Path engine) { Get-ChildItem -Force engine | Select-Object Mode,Length,Name | Tee-Object -FilePath artifacts/windows-build-debug/engine-before-build.txt } else { Write-Host "[miss] engine directory" }
if (Test-Path engine) { Get-ChildItem -Force engine | Select-Object Mode,Length,Name | Tee-Object -FilePath artifacts/windows-build-debug/engine-before-build.txt } else { Write-Host "[miss] engine directory" }
- - name: Bootstrap Source SDK 2013 MP
+ - name: Bootstrap Source SDK 2013
run: |
run: |
$ErrorActionPreference = 'Stop'
$ErrorActionPreference = 'Stop'
powershell -NoProfile -ExecutionPolicy Bypass -File tools/bootstrap-source-sdk-2013-windows.ps1 *>&1 | Tee-Object -FilePath artifacts/windows-build-debug/bootstrap-source-sdk-2013.log
powershell -NoProfile -ExecutionPolicy Bypass -File tools/bootstrap-source-sdk-2013-windows.ps1 *>&1 | Tee-Object -FilePath artifacts/windows-build-debug/bootstrap-source-sdk-2013.log
@@ -1,10 +1,24 @@
@@ -1,10 +1,24 @@
# Windows Source SDK bootstrap
# Windows Source SDK bootstrap
-The GitHub Actions Windows runner does not have Alex's local `engine/source-sdk-2013` checkout. The workflow bootstraps it by cloning ValveSoftware/source-sdk-2013.
+The Windows GitHub Actions runner is fresh and does not have Alex's local `engine/source-sdk-2013` checkout.
-Important detail: the Source SDK 2013 multiplayer code is normally on the `mp` branch, not necessarily in a `mp/` directory on the default branch. The bootstrap script now supports both layouts:
+The workflow bootstraps Valve's public Source SDK 2013 repository into:
-- `source-sdk-2013` checked out directly on the `mp` branch, with `src/...` at repo root
-- older/mirrored layout with `mp/src/...`
+```text
+engine/source-sdk-2013
+```
-The workflow should not upload or install stock/stale DLLs. A DLL artifact is considered useful only when `client.dll` contains OpenVibe command strings such as `ov_join`, `ov_menu`, or `OpenVibe`.
+The expected SDK layout is:
+
+```text
+engine/source-sdk-2013/src/game/client/hl2mp
+engine/source-sdk-2013/src/game/server/hl2mp
+```
+
+The bootstrap intentionally downloads the default/master zip first:
+
+```text
+https://codeload.github.com/ValveSoftware/source-sdk-2013/zip/refs/heads/master
+```
+
+This avoids brittle branch assumptions and avoids GitHub Actions `git` auth/header issues. A git clone fallback is still present for debugging.
@@ -5,94 +5,106 @@ $Sdk = if ($env:OPENVIBE_SDK) { $env:OPENVIBE_SDK } else { Join-Path $Root 'engi
@@ -5,94 +5,106 @@ $Sdk = if ($env:OPENVIBE_SDK) { $env:OPENVIBE_SDK } else { Join-Path $Root 'engi
$Src = Join-Path $Sdk 'src'
$Src = Join-Path $Sdk 'src'
$Deps = Join-Path $Root '_deps'
$Deps = Join-Path $Root '_deps'
$LogDir = Join-Path $Root 'artifacts/windows-build-debug'
$LogDir = Join-Path $Root 'artifacts/windows-build-debug'
-New-Item -ItemType Directory -Force -Path $LogDir | Out-Null
+New-Item -ItemType Directory -Force -Path $Deps, $LogDir | Out-Null
function Say($m) { Write-Host "[openvibe-sdk-bootstrap] $m" }
function Say($m) { Write-Host "[openvibe-sdk-bootstrap] $m" }
-function Has-HL2MP($base) {
- return ((Test-Path (Join-Path $base 'src/game/client/hl2mp')) -and (Test-Path (Join-Path $base 'src/game/server/hl2mp')))
+function Dump-Dir($path, $outName) {
+ try {
+ if (Test-Path $path) {
+ Get-ChildItem -Force $path | Select-Object Mode,Length,Name | Format-Table -AutoSize | Out-File (Join-Path $LogDir $outName)
+ } else {
+ "[missing] $path" | Out-File (Join-Path $LogDir $outName)
+ }
+ } catch {
+ "dump failed: $($_.Exception.Message)" | Out-File (Join-Path $LogDir $outName)
+ }
}
}
-function Run-Git($args, $logName) {
- $log = Join-Path $LogDir $logName
- Say "git $args"
- & git @args 2>&1 | Tee-Object -FilePath $log
- if ($LASTEXITCODE -ne 0) { throw "git $args failed with exit code $LASTEXITCODE. See $log" }
+function Assert-UsableSdk($prefix) {
+ if ((Test-Path (Join-Path $Src 'game/client/hl2mp')) -and (Test-Path (Join-Path $Src 'game/server/hl2mp'))) {
+ Say "$prefix SDK tree looks usable"
+ return $true
+ }
+ return $false
+}
+function Copy-SdkRoot($sourceRoot) {
+ Say "copying SDK root $sourceRoot -> $Sdk"
+ if (Test-Path $Sdk) { Remove-Item -Recurse -Force $Sdk }
+ New-Item -ItemType Directory -Force -Path $Sdk | Out-Null
+ Copy-Item -Path (Join-Path $sourceRoot '*') -Destination $Sdk -Recurse -Force
+ Dump-Dir $Sdk 'sdk-root-after-copy.txt'
+ if (!(Assert-UsableSdk 'copied')) {
+ throw "Copied SDK is missing expected HL2MP folders under $Src"
+ }
}
}
Say "root=$Root"
Say "root=$Root"
Say "sdk=$Sdk"
Say "sdk=$Sdk"
-Say "logdir=$LogDir"
+Say "deps=$Deps"
-if (Has-HL2MP $Sdk) {
- Say "existing SDK tree already contains HL2MP client/server"
- exit 0
-}
+if (Assert-UsableSdk 'existing') { exit 0 }
-New-Item -ItemType Directory -Force -Path $Deps | Out-Null
+# ValveSoftware/source-sdk-2013 currently uses the default/master layout with src/ at the repository root.
+# Do not assume an mp branch or mp/src folder. Downloading the zip avoids git/extraheader/auth weirdness on Actions runners.
+$zip = Join-Path $Deps 'source-sdk-2013-master.zip'
+$extractParent = Join-Path $Deps 'source-sdk-2013-zip'
+$zipRoot = Join-Path $extractParent 'source-sdk-2013-master'
+$zipUrl = 'https://codeload.github.com/ValveSoftware/source-sdk-2013/zip/refs/heads/master'
-# Valve's source-sdk-2013 repository is normally organized by branches: mp and sp.
-# Some forks/mirrors use root folders like mp/src. Support both layouts.
-$RepoUrl = if ($env:OPENVIBE_SOURCE_SDK_REPO) { $env:OPENVIBE_SOURCE_SDK_REPO } else { 'https://github.com/ValveSoftware/source-sdk-2013.git' }
-$ValveRepo = Join-Path $Deps 'source-sdk-2013-mp'
-
-if (Test-Path $ValveRepo) { Remove-Item -Recurse -Force $ValveRepo }
-
-$cloned = $false
+$zipOk = $false
try {
try {
- Say "cloning Valve Source SDK 2013 branch mp"
- Run-Git @('clone','--depth','1','--branch','mp',$RepoUrl,$ValveRepo) 'bootstrap-git-clone-mp.log'
- $cloned = $true
-} catch {
- Say "mp branch clone failed: $($_.Exception.Message)"
- if (Test-Path $ValveRepo) { Remove-Item -Recurse -Force $ValveRepo }
- Say "falling back to default branch clone"
- Run-Git @('clone','--depth','1',$RepoUrl,$ValveRepo) 'bootstrap-git-clone-default.log'
- $cloned = $true
-}
-
-if (-not $cloned) { throw "could not clone Source SDK repo" }
+ Say "downloading Valve SDK master zip from $zipUrl"
+ if (Test-Path $zip) { Remove-Item -Force $zip }
+ if (Test-Path $extractParent) { Remove-Item -Recurse -Force $extractParent }
+ New-Item -ItemType Directory -Force -Path $extractParent | Out-Null
+
+ if (Get-Command curl.exe -ErrorAction SilentlyContinue) {
+ & curl.exe -L --retry 4 --retry-delay 3 --connect-timeout 30 -o $zip $zipUrl 2>&1 | Tee-Object -FilePath (Join-Path $LogDir 'bootstrap-curl-master-zip.log')
+ if ($LASTEXITCODE -ne 0) { throw "curl.exe failed with exit code $LASTEXITCODE" }
+ } else {
+ Invoke-WebRequest -Uri $zipUrl -OutFile $zip -UseBasicParsing 2>&1 | Tee-Object -FilePath (Join-Path $LogDir 'bootstrap-iwr-master-zip.log')
+ }
-"=== Valve repo root ===" | Out-File (Join-Path $LogDir 'valve-repo-root.txt')
-Get-ChildItem -Force $ValveRepo | Select-Object Mode,Length,Name | Format-Table -AutoSize | Out-File (Join-Path $LogDir 'valve-repo-root.txt') -Append
-"=== candidate src folders ===" | Out-File (Join-Path $LogDir 'valve-candidate-src.txt')
-Get-ChildItem -Path $ValveRepo -Recurse -Directory -Filter src -ErrorAction SilentlyContinue |
- Select-Object FullName | Format-List | Out-File (Join-Path $LogDir 'valve-candidate-src.txt') -Append
+ $zipInfo = Get-Item $zip
+ Say "zip bytes=$($zipInfo.Length)"
+ if ($zipInfo.Length -lt 1000000) { throw "downloaded zip is suspiciously small" }
-$candidates = @(
- $ValveRepo,
- (Join-Path $ValveRepo 'mp'),
- (Join-Path $ValveRepo 'srcsdk/mp'),
- (Join-Path $ValveRepo 'source-sdk-2013/mp')
-)
+ Expand-Archive -Path $zip -DestinationPath $extractParent -Force
+ Dump-Dir $extractParent 'zip-extract-parent.txt'
+ Dump-Dir $zipRoot 'zip-root.txt'
-$SourceRoot = $null
-foreach ($candidate in $candidates) {
- if (Has-HL2MP $candidate) {
- $SourceRoot = $candidate
- break
+ if (Test-Path (Join-Path $zipRoot 'src/game/client/hl2mp')) {
+ Copy-SdkRoot $zipRoot
+ $zipOk = $true
+ } else {
+ throw "zip did not contain expected src/game/client/hl2mp at $zipRoot"
}
}
+} catch {
+ Say "zip bootstrap failed: $($_.Exception.Message)"
+ $_ | Out-String | Out-File (Join-Path $LogDir 'bootstrap-zip-exception.txt')
}
}
-if (-not $SourceRoot) {
- $matches = Get-ChildItem -Path $ValveRepo -Recurse -Directory -Filter hl2mp -ErrorAction SilentlyContinue |
- Where-Object { $_.FullName -match '[\\/]src[\\/]game[\\/](client|server)[\\/]hl2mp$' }
- $matches | Select-Object FullName | Format-List | Out-File (Join-Path $LogDir 'hl2mp-folder-search.txt')
- throw "Could not find Source SDK 2013 MP HL2MP layout after clone. Check valve-repo-root.txt, valve-candidate-src.txt, and hl2mp-folder-search.txt."
-}
-
-Say "source root=$SourceRoot"
-Say "copying Source SDK MP layout into $Sdk"
-if (Test-Path $Sdk) { Remove-Item -Recurse -Force $Sdk }
-New-Item -ItemType Directory -Force -Path $Sdk | Out-Null
-Copy-Item -Path (Join-Path $SourceRoot '*') -Destination $Sdk -Recurse -Force
+if ($zipOk) { Say 'SDK bootstrapped successfully from zip'; exit 0 }
-if (!(Has-HL2MP $Sdk)) {
- Get-ChildItem -Force $Sdk | Select-Object Mode,Length,Name | Format-Table -AutoSize | Out-File (Join-Path $LogDir 'sdk-root-after-copy.txt')
- throw "Bootstrapped SDK is missing expected HL2MP folders after copy"
+# Last-resort git fallback. Clear possible GitHub Actions extraheaders and force public HTTPS.
+$gitRepo = Join-Path $Deps 'source-sdk-2013-git'
+try {
+ Say "trying git clone fallback"
+ git config --global --unset-all http.https://github.com/.extraheader 2>$null
+ git config --global --unset-all http.https://github.com/ValveSoftware/source-sdk-2013.extraheader 2>$null
+ if (Test-Path $gitRepo) { Remove-Item -Recurse -Force $gitRepo }
+ & git -c http.https://github.com/.extraheader= clone --depth 1 --single-branch https://github.com/ValveSoftware/source-sdk-2013.git $gitRepo 2>&1 | Tee-Object -FilePath (Join-Path $LogDir 'bootstrap-git-clone-master.log')
+ if ($LASTEXITCODE -ne 0) { throw "git clone failed with exit code $LASTEXITCODE" }
+ Dump-Dir $gitRepo 'git-root.txt'
+ if (Test-Path (Join-Path $gitRepo 'src/game/client/hl2mp')) {
+ Copy-SdkRoot $gitRepo
+ Say 'SDK bootstrapped successfully from git'
+ exit 0
+ }
+ throw "git clone did not contain src/game/client/hl2mp"
+} catch {
+ Say "git bootstrap failed: $($_.Exception.Message)"
+ $_ | Out-String | Out-File (Join-Path $LogDir 'bootstrap-git-exception.txt')
}
}
-"=== SDK root after copy ===" | Out-File (Join-Path $LogDir 'sdk-root-after-copy.txt')
-Get-ChildItem -Force $Sdk | Select-Object Mode,Length,Name | Format-Table -AutoSize | Out-File (Join-Path $LogDir 'sdk-root-after-copy.txt') -Append
-"=== SDK src root after copy ===" | Out-File (Join-Path $LogDir 'sdk-src-root-after-copy.txt')
-Get-ChildItem -Force (Join-Path $Sdk 'src') | Select-Object Mode,Length,Name | Format-Table -AutoSize | Out-File (Join-Path $LogDir 'sdk-src-root-after-copy.txt') -Append
-
-Say "SDK bootstrapped successfully"
+Dump-Dir $Deps 'deps-after-bootstrap-failure.txt'
+throw "Could not bootstrap ValveSoftware/source-sdk-2013. Check openvibe-windows-build-debug artifact, especially bootstrap-curl-master-zip.log, bootstrap-zip-exception.txt, and bootstrap-git-clone-master.log."
@@ -52,3 +52,6 @@ else
@@ -52,3 +52,6 @@ else
echo "[openvibe] no DLL artifact available yet" >&2
echo "[openvibe] no DLL artifact available yet" >&2
exit 3
exit 3
fi
fi
+
+
+# Extra bootstrap tails for current Windows workflow debugging.