@@ -184,6 +184,71 @@ 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 -Filter "pylon*" -ErrorAction SilentlyContinue | Sort-Object Name -Descending
202
+ if ($pylonDirs.Count -gt 0) {
203
+ $pylonDirName = $pylonDirs[0].Name
204
+ $candidateDir = Join-Path $basePath $pylonDirName "Development"
205
+ Write-Host "Found pylon candidate at: $candidateDir (from directory: $pylonDirName)"
206
+
207
+ # Verify this is a valid pylon SDK installation
208
+ if (Test-Path "$candidateDir\include\pylon\PylonIncludes.h") {
209
+ $pylonDir = $candidateDir
210
+ Write-Host "Valid pylon SDK found at: $pylonDir"
211
+ break
212
+ } else {
213
+ Write-Host "Invalid pylon SDK structure at: $candidateDir"
214
+ # Let's also check what's actually in the directory for debugging
215
+ if (Test-Path $candidateDir) {
216
+ Write-Host "Directory exists but missing PylonIncludes.h. Contents:"
217
+ Get-ChildItem -Path $candidateDir -ErrorAction SilentlyContinue | ForEach-Object { Write-Host " - $($_.Name)" }
218
+ } else {
219
+ Write-Host "Directory does not exist: $candidateDir"
220
+ }
221
+ }
222
+ }
223
+ }
224
+ }
225
+
226
+ if ($pylonDir) {
227
+ # Set environment variable for current session
228
+ $env:PYLON_DEV_DIR = $pylonDir
229
+
230
+ # Set environment variable for subsequent steps
231
+ echo "PYLON_DEV_DIR=$pylonDir" >> $env:GITHUB_ENV
232
+
233
+ Write-Host "PYLON_DEV_DIR set to: $pylonDir"
234
+
235
+ # Show some additional info about the installation
236
+ $pylonVersion = Split-Path (Split-Path $pylonDir -Parent) -Leaf
237
+ Write-Host "Pylon version directory: $pylonVersion"
238
+ } else {
239
+ Write-Host "Error: No valid pylon installation found in any of the checked locations:"
240
+ foreach ($path in $possiblePaths) {
241
+ Write-Host " - $path"
242
+ if (Test-Path $path) {
243
+ Write-Host " Exists, contains:"
244
+ Get-ChildItem -Path $path -Directory -ErrorAction SilentlyContinue | ForEach-Object { Write-Host " - $($_.Name)" }
245
+ } else {
246
+ Write-Host " Does not exist"
247
+ }
248
+ }
249
+ exit 1
250
+ }
251
+
187
252
- name : Build wheels
188
253
uses : pypa/cibuildwheel@v2.21.3
189
254
0 commit comments