Browse Source

Merge branch freebsd-patch into LADI/Cadence

https://github.com/falkTX/Cadence/pull/359
pull/362/head
Nedko Arnaudov 5 months ago
parent
commit
3983697138
2 changed files with 19 additions and 0 deletions
  1. +8
    -0
      src/cadence.py
  2. +11
    -0
      src/shared.py

+ 8
- 0
src/cadence.py View File

@@ -329,6 +329,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():
@@ -782,6 +788,8 @@ class CadenceMainW(QMainWindow, ui_cadence.Ui_CadenceMainW):
info = get_mac_information()
elif WINDOWS:
info = get_windows_information()
elif FREEBSD:
info = get_freebsd_information()
else:
info = ("Unknown", "Unknown")



+ 11
- 0
src/shared.py View File

@@ -43,27 +43,38 @@ if sys.platform == "darwin":
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


Loading…
Cancel
Save