@@ -184,6 +184,63 @@ jobs:
184
184
$process = Start-Process Basler-pylon.exe -Wait -ArgumentList '/quiet /install=GigE_Runtime;USB_Runtime;Camera_Link_Runtime;GenTL_Consumer_Support;CamEmu_Support;SDKs;DataProcessing_SDK;DataProcessing_vTools;DataProcessing_AI' -PassThru
185
185
Write-Host "Process finished with return code:" $process.ExitCode
186
186
187
+ - name : Set PYLON_DEV_DIR environment variable
188
+ run : |
189
+ # Find the pylon installation directory - check multiple possible locations
190
+ $possiblePaths = @(
191
+ "C:\Program Files\Basler",
192
+ "D:\Program Files\Basler",
193
+ "C:\Program Files (x86)\Basler",
194
+ "D:\Program Files (x86)\Basler"
195
+ )
196
+
197
+ $pylonDir = $null
198
+ foreach ($basePath in $possiblePaths) {
199
+ if (Test-Path $basePath) {
200
+ Write-Host "Checking for pylon in: $basePath"
201
+ $pylonDirs = Get-ChildItem -Path $basePath -Directory -Name "pylon*" -ErrorAction SilentlyContinue | Sort-Object -Descending
202
+ if ($pylonDirs.Count -gt 0) {
203
+ $candidateDir = Join-Path $basePath $pylonDirs[0] "Development"
204
+ Write-Host "Found pylon candidate at: $candidateDir"
205
+
206
+ # Verify this is a valid pylon SDK installation
207
+ if (Test-Path "$candidateDir\include\pylon\PylonIncludes.h") {
208
+ $pylonDir = $candidateDir
209
+ Write-Host "Valid pylon SDK found at: $pylonDir"
210
+ break
211
+ } else {
212
+ Write-Host "Invalid pylon SDK structure at: $candidateDir"
213
+ }
214
+ }
215
+ }
216
+ }
217
+
218
+ if ($pylonDir) {
219
+ # Set environment variable for current session
220
+ $env:PYLON_DEV_DIR = $pylonDir
221
+
222
+ # Set environment variable for subsequent steps
223
+ echo "PYLON_DEV_DIR=$pylonDir" >> $env:GITHUB_ENV
224
+
225
+ Write-Host "PYLON_DEV_DIR set to: $pylonDir"
226
+
227
+ # Show some additional info about the installation
228
+ $pylonVersion = Split-Path (Split-Path $pylonDir -Parent) -Leaf
229
+ Write-Host "Pylon version directory: $pylonVersion"
230
+ } else {
231
+ Write-Host "Error: No valid pylon installation found in any of the checked locations:"
232
+ foreach ($path in $possiblePaths) {
233
+ Write-Host " - $path"
234
+ if (Test-Path $path) {
235
+ Write-Host " Exists, contains:"
236
+ Get-ChildItem -Path $path -Directory -ErrorAction SilentlyContinue | ForEach-Object { Write-Host " - $($_.Name)" }
237
+ } else {
238
+ Write-Host " Does not exist"
239
+ }
240
+ }
241
+ exit 1
242
+ }
243
+
187
244
- name : Build wheels
188
245
uses : pypa/cibuildwheel@v2.21.3
189
246
0 commit comments