Skip to content

Commit

Permalink
w5
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoernrennfanz committed Jul 2, 2024
1 parent ee74d41 commit fd7a77a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,14 @@ def __init__(self):
# Fallback, try to locate pylon installation via registry key
import winreg
try:
try:
current_version = winreg.OpenKeyEx(winreg.HKEY_LOCAL_MACHINE, r'SOFTWARE\Microsoft\Windows\CurrentVersion')
program_files_dir = winreg.QueryValueEx(current_version, "ProgramFilesDir")[0]
print(program_files_dir)
print(os.path.exists(os.path.join(program_files_dir, "Basler", "pylon 7", "Development")))
except OSError as error:
print("ProgramFiles OSError:", error)

try:
# First try the 64-bit node
print("1")
Expand All @@ -548,7 +556,7 @@ def __init__(self):
if os.path.exists(basler_pylon_install_dev_dir):
self.PylonDevDir = basler_pylon_install_dev_dir
except OSError as error:
print("OSError:", error)
print("Basler Installdir OSError:", error)

# Throw exception if registry fallback failed.
if not self.PylonDevDir:
Expand Down

0 comments on commit fd7a77a

Please sign in to comment.