]> sigrok.org Git - libsigrokdecode.git/commitdiff
irmp: add 'Darwin' case for DLL filename lookup
authorGerhard Sittig <redacted>
Sat, 18 Jul 2020 13:46:00 +0000 (15:46 +0200)
committerGerhard Sittig <redacted>
Sat, 18 Jul 2020 13:48:50 +0000 (15:48 +0200)
Detect the MacOS platform by checking for 'Darwin' with the Python
platform(3) module, and use the 'lib<stem>.dylib' filename scheme.

decoders/ir_irmp/irmp_library.py

index 3bd9048e136ddc425125621cebbf6a5531a05fbb..22a74b0b3f398478e26cd855f073aabc8de00224 100644 (file)
@@ -49,7 +49,8 @@ class IrmpLibrary:
 
         if platform.uname()[0] == 'Linux':
             return 'libirmp.so'
-        # TODO Add support for more platforms.
+        if platform.uname()[0] == 'Darwin':
+            return 'libirmp.dylib'
         return 'irmp.dll'
 
     def __init__(self):