Skip to content
This repository was archived by the owner on Aug 21, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/cadence.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,12 @@ def get_windows_information():

return (os, version)

def get_freebsd_information():
os = "FreeBSD"
version = getoutput("sysctl -n kern.osrelease")

return (os, version)

# ---------------------------------------------------------------------

def isAlsaAudioBridged():
Expand Down Expand Up @@ -779,6 +785,8 @@ def __init__(self, parent=None):
info = get_mac_information()
elif WINDOWS:
info = get_windows_information()
elif FREEBSD:
info = get_freebsd_information()
else:
info = ("Unknown", "Unknown")

Expand Down
11 changes: 11 additions & 0 deletions src/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,38 @@
LINUX = False
MACOS = True
WINDOWS = False
FREEBSD = False
elif "haiku" in sys.platform:
HAIKU = True
LINUX = False
MACOS = False
WINDOWS = False
FREEBSD = False
elif "linux" in sys.platform:
HAIKU = False
LINUX = True
MACOS = False
WINDOWS = False
FREEBSD = False
elif sys.platform in ("win32", "win64", "cygwin"):
WINDIR = os.getenv("WINDIR")
HAIKU = False
LINUX = False
MACOS = False
WINDOWS = True
FREEBSD = False
elif sys.platform.startswith('freebsd'):
HAIKU = False
LINUX = False
MACOS = False
WINDOWS = False
FREEBSD = True
else:
HAIKU = False
LINUX = False
MACOS = False
WINDOWS = False
FREEBSD = False

# ------------------------------------------------------------------------------------------------------------
# Try Import Signal
Expand Down