Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

Fedora support #244

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
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
2 changes: 2 additions & 0 deletions src/claudia_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

list_DAW = [
# Package AppName Type Binary Icon Template? Level (L, D, L, V, VST-Mode, T, M, MIDI-Mode) (doc-file, website)
[ "ardour5", "Ardour 5", "DAW", "ardour5", "ardour", TEMPLATE_NO, LEVEL_JS, (1, 0, 1, 1, "Native", 1, 1, "JACK"), ("", "http://www.ardour.org/") ],

[ "ardour4", "Ardour 4", "DAW", "ardour4", "ardour", TEMPLATE_NO, LEVEL_JS, (1, 0, 1, 1, "Native", 1, 1, "JACK"), ("", "http://www.ardour.org/") ],

[ "ariamaestosa", "Aria Maestosa", "MIDI Sequencer", "Aria", "aria", TEMPLATE_NO, LEVEL_0, (0, 0, 0, 0, "", 0, 1, "ALSA | JACK"), ("", "http://ariamaestosa.sf.net/") ],
Expand Down
19 changes: 14 additions & 5 deletions src/claudia_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
# Imports (Global)

from random import randint
import os

if True:
from PyQt5.QtCore import pyqtSlot, Qt, QTimer, QSettings
Expand Down Expand Up @@ -119,7 +120,7 @@ def __init__(self, parent):
self._parent = None
self._settings = None
self.m_ladish_only = False

self.lib_path = LIB_PATH
self.listDAW.setColumnWidth(0, 22)
self.listDAW.setColumnWidth(1, 225)
self.listDAW.setColumnWidth(2, 150)
Expand Down Expand Up @@ -703,6 +704,11 @@ def refreshAll(self):
if installed == "install":
pkglist.append(package.strip())

elif os.path.exists("/bin/rpm"):
pkg_out = getoutput("env LANG=C /bin/rpm -qa --qf \"%{NAME}\n\" 2>/dev/null").split("\n")
for package in pkg_out:
pkglist.append(package)

if not "bristol" in pkglist:
self.tabWidget.setTabEnabled(iTabBristol, False)

Expand Down Expand Up @@ -823,11 +829,14 @@ def refreshAll(self):

last_pos += 1

if haveCarla and os.path.exists("/usr/lib/carla/libcarla_utils.so"):
utils = CarlaUtils("/usr/lib/carla/libcarla_utils.so")
if haveCarla and os.path.exists("/usr/{}/carla/libcarla_utils.so".format(self.lib_path)):
utils = CarlaUtils("/usr/{}/carla/libcarla_utils.so".format(self.lib_path))
last_pos = 0
lv2path = os.getenv("LV2_PATH", "~/.lv2:/usr/lib/lv2:/usr/local/lib/lv2")
for i in range(utils.get_cached_plugin_count(PLUGIN_LV2, lv2path)):
for i in range(utils.get_cached_plugin_count(PLUGIN_LV2,
os.getenv("LV2_PATH",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

previous code had the default value stored in a variable.
if you do that, you should no longer need to split the string into multiple lines

"~/.lv2:"\
"/usr/{lib_path}/lv2:"\
"/usr/local/{lib_path}/lv2".format(lib_path=self.lib_path)))):
plugin = utils.get_cached_plugin_info(PLUGIN_LV2, i)

if (plugin["hints"] & PLUGIN_HAS_CUSTOM_UI) == 0:
Expand Down
7 changes: 7 additions & 0 deletions src/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,13 @@ def sys_excepthook(typ, value, tback):
else:
PATH = PATH.split(os.pathsep)

# ------------------------------------------------------------------------------------------------------------
# Set PATH

LIB_PATH = "lib"
if os.path.isdir("/usr/lib64"):
LIB_PATH = "lib64"

# ------------------------------------------------------------------------------------------------------------
# Remove/convert non-ascii chars from a string

Expand Down
21 changes: 13 additions & 8 deletions src/shared_cadence.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
# Imports (Global)

from time import sleep
import os

if True:
from PyQt5.QtCore import QProcess, QSettings
Expand All @@ -33,29 +34,33 @@

# ------------------------------------------------------------------------------------------------------------
# Default Plugin PATHs
if os.path.isdir("/usr/lib64"):
LIB_PATH = "lib64"
else:
LIB_PATH = "lib"

DEFAULT_LADSPA_PATH = [
os.path.join(HOME, ".ladspa"),
os.path.join("/", "usr", "lib", "ladspa"),
os.path.join("/", "usr", "local", "lib", "ladspa")
os.path.join("/", "usr", LIB_PATH, "ladspa"),
os.path.join("/", "usr", "local", LIB_PATH, "ladspa")
]

DEFAULT_DSSI_PATH = [
os.path.join(HOME, ".dssi"),
os.path.join("/", "usr", "lib", "dssi"),
os.path.join("/", "usr", "local", "lib", "dssi")
os.path.join("/", "usr", LIB_PATH, "dssi"),
os.path.join("/", "usr", "local", LIB_PATH, "dssi")
]

DEFAULT_LV2_PATH = [
os.path.join(HOME, ".lv2"),
os.path.join("/", "usr", "lib", "lv2"),
os.path.join("/", "usr", "local", "lib", "lv2")
os.path.join("/", "usr", LIB_PATH, "lv2"),
os.path.join("/", "usr", "local", LIB_PATH, "lv2")
]

DEFAULT_VST_PATH = [
os.path.join(HOME, ".vst"),
os.path.join("/", "usr", "lib", "vst"),
os.path.join("/", "usr", "local", "lib", "vst")
os.path.join("/", "usr", LIB_PATH, "vst"),
os.path.join("/", "usr", "local", LIB_PATH, "vst")
]

# ------------------------------------------------------------------------------------------------------------
Expand Down