Skip to content

Commit 067924f

Browse files
committed
fix: correct executable path in screenshot script and update build workflow
1 parent d944296 commit 067924f

3 files changed

Lines changed: 18 additions & 3 deletions

File tree

‎.github/scripts/screenshot.ps1‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
param(
2-
[string]$ExePath = "bin/Release/SciLors Mashed Trainer.exe",
2+
[string]$ExePath = "bin/Release/SciLorsMashedTrainer.exe",
33
[string]$OutputDir = "screenshots"
44
)
55

@@ -67,6 +67,20 @@ function Capture-Window([IntPtr]$hWnd, [string]$outFile) {
6767
Save-Bitmap $bmp $outFile
6868
}
6969

70+
if (-not (Test-Path $ExePath)) {
71+
Write-Host "Target '$ExePath' not found directly. Searching in bin/ ..."
72+
$found = Get-ChildItem -Path "bin" -Filter "*.exe" -Recurse -ErrorAction SilentlyContinue |
73+
Where-Object { $_.Name -notlike "*.vshost.exe" } |
74+
Select-Object -First 1
75+
if ($found) {
76+
$ExePath = $found.FullName
77+
Write-Host "Resolved executable to: $ExePath"
78+
} else {
79+
Write-Error "No executable found in bin/!"
80+
exit 1
81+
}
82+
}
83+
7084
Write-Host "Launching $ExePath..."
7185
$proc = Start-Process -FilePath $ExePath -PassThru
7286
Start-Sleep -Seconds 6

‎.github/workflows/build.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333

3434
- name: Launch App & Capture Screenshots
3535
shell: pwsh
36-
run: pwsh -File .github/scripts/screenshot.ps1 -ExePath "bin/Release/SciLors Mashed Trainer.exe" -OutputDir "screenshots"
36+
run: pwsh -File .github/scripts/screenshot.ps1 -ExePath "bin/Release/SciLorsMashedTrainer.exe" -OutputDir "screenshots"
3737

3838
- name: Upload screenshots artifact
3939
uses: actions/upload-artifact@v4

‎.gitignore‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
bin/**
22
obj/**
3-
Release/**
3+
Release/**
4+
tmp/**

0 commit comments

Comments
 (0)