Make current code installable, adjust where needed
This commit is contained in:
parent
76cfa35919
commit
2ba3067398
104
Makefile
104
Makefile
|
@ -4,6 +4,11 @@
|
|||
# Created by falkTX
|
||||
#
|
||||
|
||||
PREFIX = /usr/local
|
||||
DESTDIR =
|
||||
|
||||
SED_PREFIX = $(shell echo $(PREFIX) | sed "s/\//\\\\\\\\\//g")
|
||||
|
||||
PYUIC = pyuic4 --pyqt3-wrapper
|
||||
PYRCC = pyrcc4 -py3
|
||||
|
||||
|
@ -162,22 +167,23 @@ install:
|
|||
install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
|
||||
install -d $(DESTDIR)$(PREFIX)/share/cadence/
|
||||
install -d $(DESTDIR)$(PREFIX)/share/cadence/src/
|
||||
install -d $(DESTDIR)$(PREFIX)/share/cadence/pulse2jack/
|
||||
|
||||
# # Install script files and binaries
|
||||
# install -m 755 \
|
||||
# data/catarina \
|
||||
# data/catia \
|
||||
# data/claudia \
|
||||
# data/carla \
|
||||
# data/cadence_* \
|
||||
# data/pulse2jack \
|
||||
# src/carla-bridges/carla-bridge-lv2-gtk2 \
|
||||
# src/carla-bridges/carla-bridge-lv2-qt4 \
|
||||
# src/carla-bridges/carla-bridge-lv2-x11 \
|
||||
# $(DESTDIR)$(PREFIX)/bin/
|
||||
#
|
||||
# # Install desktop files
|
||||
# install -m 644 data/desktop/*.desktop $(DESTDIR)$(PREFIX)/share/applications/
|
||||
# Install script files and binaries
|
||||
install -m 755 \
|
||||
data/catarina \
|
||||
data/catia \
|
||||
data/claudia \
|
||||
data/carla \
|
||||
data/cadence_* \
|
||||
data/pulse2jack \
|
||||
src/carla-bridge-ui/carla-bridge-lv2-gtk2 \
|
||||
src/carla-bridge-ui/carla-bridge-lv2-qt4 \
|
||||
src/carla-bridge-ui/carla-bridge-lv2-x11 \
|
||||
$(DESTDIR)$(PREFIX)/bin/
|
||||
|
||||
# Install desktop files
|
||||
install -m 644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications/
|
||||
|
||||
# Install icons, 16x16
|
||||
install -m 644 src/icons/16x16/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
|
||||
|
@ -204,58 +210,40 @@ install:
|
|||
install -m 644 src/icons/256x256/claudia.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
|
||||
|
||||
# Install icons, scalable
|
||||
install -m 644 src/icons/svg/carla.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
|
||||
install -m 644 src/icons/svg/catarina.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
|
||||
install -m 644 src/icons/svg/catia.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
|
||||
install -m 644 src/icons/svg/claudia.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
|
||||
install -m 644 src/icons/scalable/carla.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
|
||||
install -m 644 src/icons/scalable/catarina.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
|
||||
install -m 644 src/icons/scalable/catia.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
|
||||
install -m 644 src/icons/scalable/claudia.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
|
||||
|
||||
# # Install main code
|
||||
# install -m 755 src/*.py $(DESTDIR)$(PREFIX)/share/cadence/src/
|
||||
# install -m 755 src/carla/*.so $(DESTDIR)$(PREFIX)/share/cadence/src/carla/
|
||||
#
|
||||
# # Install addtional stuff for Cadence
|
||||
# install -m 644 pulse2jack/* $(DESTDIR)$(PREFIX)/share/cadence/pulse2jack/
|
||||
# install -m 644 data/99cadence-session-start $(X11_RC_DIR)
|
||||
#
|
||||
# # Install additional stuff for Claudia
|
||||
# cp -r icons/* $(DESTDIR)$(PREFIX)/share/cadence/icons/
|
||||
# cp -r templates/* $(DESTDIR)$(PREFIX)/share/cadence/templates/
|
||||
#
|
||||
# # Install addtional stuff for Carla
|
||||
# install -m 644 data/carla.lv2/* $(DESTDIR)$(PREFIX)/lib/lv2/carla.lv2/
|
||||
#
|
||||
# # Adjust PREFIX value in script files
|
||||
# sed -i "s/X-PREFIX-X/$(SED_PREFIX)/" \
|
||||
# $(DESTDIR)$(PREFIX)/bin/cadence \
|
||||
# $(DESTDIR)$(PREFIX)/bin/catarina \
|
||||
# $(DESTDIR)$(PREFIX)/bin/catia \
|
||||
# $(DESTDIR)$(PREFIX)/bin/claudia \
|
||||
# $(DESTDIR)$(PREFIX)/bin/carla \
|
||||
# $(DESTDIR)$(PREFIX)/bin/carla-control \
|
||||
# $(DESTDIR)$(PREFIX)/bin/jack_logs \
|
||||
# $(DESTDIR)$(PREFIX)/bin/jack_meter2 \
|
||||
# $(DESTDIR)$(PREFIX)/bin/jack_render \
|
||||
# $(DESTDIR)$(PREFIX)/bin/jack_settings \
|
||||
# $(DESTDIR)$(PREFIX)/bin/jack_xycontroller \
|
||||
# $(DESTDIR)$(PREFIX)/bin/pulse2jack \
|
||||
# $(X11_RC_DIR)/99cadence-session-start
|
||||
#
|
||||
# # For Ubuntu there are PPAs
|
||||
# rm -f $(DESTDIR)$(PREFIX)/share/applications/cadence-unity-support.desktop
|
||||
# Install main code
|
||||
install -m 755 src/*.py $(DESTDIR)$(PREFIX)/share/cadence/src/
|
||||
install -m 755 src/carla/*.so $(DESTDIR)$(PREFIX)/lib/carla/
|
||||
|
||||
# Install addtional stuff for Cadence
|
||||
install -m 644 data/pulse2jack-data/* $(DESTDIR)$(PREFIX)/share/cadence/pulse2jack/
|
||||
|
||||
# Adjust PREFIX value in script files
|
||||
sed -i "s/X-PREFIX-X/$(SED_PREFIX)/" \
|
||||
$(DESTDIR)$(PREFIX)/bin/catarina \
|
||||
$(DESTDIR)$(PREFIX)/bin/catia \
|
||||
$(DESTDIR)$(PREFIX)/bin/claudia \
|
||||
$(DESTDIR)$(PREFIX)/bin/carla \
|
||||
$(DESTDIR)$(PREFIX)/bin/cadence_jackmeter \
|
||||
$(DESTDIR)$(PREFIX)/bin/cadence_jacksettings \
|
||||
$(DESTDIR)$(PREFIX)/bin/cadence_logs \
|
||||
$(DESTDIR)$(PREFIX)/bin/cadence_render \
|
||||
$(DESTDIR)$(PREFIX)/bin/cadence_xycontroller \
|
||||
$(DESTDIR)$(PREFIX)/bin/pulse2jack
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/cadence_*
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/catarina
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/catia
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/claudia
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/carla
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/carla-bridge-*
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/carla-discovery-*
|
||||
# rm -f $(DESTDIR)$(PREFIX)/bin/jack_logs
|
||||
# rm -f $(DESTDIR)$(PREFIX)/bin/jack_meter2
|
||||
# rm -f $(DESTDIR)$(PREFIX)/bin/jack_render
|
||||
# rm -f $(DESTDIR)$(PREFIX)/bin/jack_settings
|
||||
# rm -f $(DESTDIR)$(PREFIX)/bin/jack_xycontroller
|
||||
# rm -f $(DESTDIR)$(PREFIX)/bin/pulse2jack
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/pulse2jack
|
||||
rm -f $(DESTDIR)$(PREFIX)/share/applications/catarina.desktop
|
||||
rm -f $(DESTDIR)$(PREFIX)/share/applications/catia.desktop
|
||||
rm -f $(DESTDIR)$(PREFIX)/share/applications/claudia.desktop
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -f /usr/bin/python3 ]; then
|
||||
PYTHON=/usr/bin/python3
|
||||
else
|
||||
PYTHON=python
|
||||
fi
|
||||
|
||||
INSTALL_PREFIX="X-PREFIX-X"
|
||||
exec $PYTHON $INSTALL_PREFIX/share/cadence/src/jackmeter.py "$@"
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -f /usr/bin/python3 ]; then
|
||||
PYTHON=/usr/bin/python3
|
||||
else
|
||||
PYTHON=python
|
||||
fi
|
||||
|
||||
INSTALL_PREFIX="X-PREFIX-X"
|
||||
exec $PYTHON $INSTALL_PREFIX/share/cadence/src/jacksettings.py "$@"
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -f /usr/bin/python3 ]; then
|
||||
PYTHON=/usr/bin/python3
|
||||
else
|
||||
PYTHON=python
|
||||
fi
|
||||
|
||||
INSTALL_PREFIX="X-PREFIX-X"
|
||||
exec $PYTHON $INSTALL_PREFIX/share/cadence/src/logs.py "$@"
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -f /usr/bin/python3 ]; then
|
||||
PYTHON=/usr/bin/python3
|
||||
else
|
||||
PYTHON=python
|
||||
fi
|
||||
|
||||
INSTALL_PREFIX="X-PREFIX-X"
|
||||
exec $PYTHON $INSTALL_PREFIX/share/cadence/src/render.py "$@"
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -f /usr/bin/python3 ]; then
|
||||
PYTHON=/usr/bin/python3
|
||||
else
|
||||
PYTHON=python
|
||||
fi
|
||||
|
||||
INSTALL_PREFIX="X-PREFIX-X"
|
||||
exec $PYTHON $INSTALL_PREFIX/share/cadence/src/xycontroller.py "$@"
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -f /usr/bin/python3 ]; then
|
||||
PYTHON=/usr/bin/python3
|
||||
else
|
||||
PYTHON=python
|
||||
fi
|
||||
|
||||
INSTALL_PREFIX="X-PREFIX-X"
|
||||
exec $PYTHON $INSTALL_PREFIX/share/cadence/src/carla.py --with-libprefix="$INSTALL_PREFIX" "$@"
|
|
@ -0,0 +1,9 @@
|
|||
[Desktop Entry]
|
||||
Name=Carla
|
||||
GenericName=Carla
|
||||
Comment=Multi-Plugin Audio Host
|
||||
Exec=carla
|
||||
Icon=carla
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=AudioVideo;AudioEditing;Qt;
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -f /usr/bin/python3 ]; then
|
||||
PYTHON=/usr/bin/python3
|
||||
else
|
||||
PYTHON=python
|
||||
fi
|
||||
|
||||
INSTALL_PREFIX="X-PREFIX-X"
|
||||
exec $PYTHON $INSTALL_PREFIX/share/cadence/src/catarina.py "$@"
|
|
@ -0,0 +1,9 @@
|
|||
[Desktop Entry]
|
||||
Name=Catarina
|
||||
GenericName=Catarina
|
||||
Comment=PatchCanvas Test Application
|
||||
Exec=catarina
|
||||
Icon=catarina
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Utility;Qt;
|
|
@ -0,0 +1,40 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Check if already running
|
||||
|
||||
PROCS=`ps -ea -f | grep /share/cadence/src/catia.py | grep python3`
|
||||
|
||||
if [ x"$PROCS" != x"" ]; then
|
||||
|
||||
# One instance only
|
||||
PROC=`echo "$PROCS" | head -n 1`
|
||||
|
||||
# Get PID
|
||||
PID=`echo "$PROC" | awk '{printf$2}'`
|
||||
|
||||
# Last check, just to make sure
|
||||
if [ x"$PID" != x"" ]; then
|
||||
|
||||
# Tell user about this
|
||||
echo "Cadence already started, showing GUI now..."
|
||||
|
||||
# Send SIGUSR2, shows the GUI
|
||||
kill -USR2 "$PID"
|
||||
|
||||
# Quit now
|
||||
exit
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
if [ -f /usr/bin/python3 ]; then
|
||||
PYTHON=/usr/bin/python3
|
||||
else
|
||||
PYTHON=python
|
||||
fi
|
||||
|
||||
# We only got here if not running yet
|
||||
INSTALL_PREFIX="X-PREFIX-X"
|
||||
exec $PYTHON $INSTALL_PREFIX/share/cadence/src/catia.py "$@"
|
|
@ -0,0 +1,9 @@
|
|||
[Desktop Entry]
|
||||
Name=Catia
|
||||
GenericName=Catia
|
||||
Comment=JACK Patchbay
|
||||
Exec=catia
|
||||
Icon=catia
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=AudioVideo;AudioEditing;Qt;
|
|
@ -0,0 +1,40 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Check if already running
|
||||
|
||||
PROCS=`ps -ea -f | grep /share/cadence/src/claudia.py | grep python3`
|
||||
|
||||
if [ x"$PROCS" != x"" ]; then
|
||||
|
||||
# One instance only
|
||||
PROC=`echo "$PROCS" | head -n 1`
|
||||
|
||||
# Get PID
|
||||
PID=`echo "$PROC" | awk '{printf$2}'`
|
||||
|
||||
# Last check, just to make sure
|
||||
if [ x"$PID" != x"" ]; then
|
||||
|
||||
# Tell user about this
|
||||
echo "Cadence already started, showing GUI now..."
|
||||
|
||||
# Send SIGUSR2, shows the GUI
|
||||
kill -USR2 "$PID"
|
||||
|
||||
# Quit now
|
||||
exit
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
if [ -f /usr/bin/python3 ]; then
|
||||
PYTHON=/usr/bin/python3
|
||||
else
|
||||
PYTHON=python
|
||||
fi
|
||||
|
||||
# We only got here if not running yet
|
||||
INSTALL_PREFIX="X-PREFIX-X"
|
||||
exec $PYTHON $INSTALL_PREFIX/share/cadence/src/claudia.py "$@"
|
|
@ -0,0 +1,9 @@
|
|||
[Desktop Entry]
|
||||
Name=Claudia
|
||||
GenericName=Claudia
|
||||
Comment=LADISH Frontend
|
||||
Exec=claudia
|
||||
Icon=claudia
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=AudioVideo;AudioEditing;Qt;
|
|
@ -0,0 +1,85 @@
|
|||
#!/bin/bash
|
||||
# Script to stop current pulseaudio and restart it in JACK mode
|
||||
|
||||
INSTALL_PREFIX="X-PREFIX-X"
|
||||
|
||||
IsPulseAudioRunning()
|
||||
{
|
||||
PROCESS=`ps -e | grep pulseaudio`
|
||||
if [ "$PROCESS" == "" ]; then
|
||||
false
|
||||
else
|
||||
true
|
||||
fi
|
||||
}
|
||||
|
||||
if [ ! -d ~/.pulse ]; then
|
||||
mkdir -p ~/.pulse
|
||||
fi
|
||||
|
||||
if [ ! -f ~/.pulse/client.conf ]; then
|
||||
echo "autospawn = no" > ~/.pulse/client.conf
|
||||
else
|
||||
if (! cat ~/.pulse/client.conf | grep "autospawn = no" > /dev/null); then
|
||||
sed -i '/autospawn =/d' ~/.pulse/client.conf
|
||||
echo "autospawn = no" >> ~/.pulse/client.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -f ~/.pulse/daemon.conf ]; then
|
||||
echo "rlimit-rttime = -1" > ~/.pulse/daemon.conf
|
||||
else
|
||||
if (! cat ~/.pulse/daemon.conf | grep "rlimit-rttime = -1" > /dev/null); then
|
||||
sed -i '/rlimit-rttime =/d' ~/.pulse/daemon.conf
|
||||
echo "rlimit-rttime = -1" >> ~/.pulse/daemon.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
-h|--h|--help)
|
||||
echo "usage: $0 [command]
|
||||
|
||||
-p, --play Playback mode only
|
||||
|
||||
-h, --help Show this help menu
|
||||
|
||||
|
||||
NOTE:
|
||||
When runned with no arguments, pulse2jack will
|
||||
activate PulseAudio with both playback and record modes.
|
||||
"
|
||||
exit
|
||||
;;
|
||||
|
||||
-p|--p|--play)
|
||||
FILE=$INSTALL_PREFIX/share/cadence/pulse2jack/play.pa
|
||||
;;
|
||||
|
||||
*)
|
||||
FILE=$INSTALL_PREFIX/share/cadence/pulse2jack/play+rec.pa
|
||||
;;
|
||||
esac
|
||||
|
||||
if (IsPulseAudioRunning); then
|
||||
{
|
||||
echo "PulseAudio is running, stopping it..."
|
||||
killall pulseaudio
|
||||
env sleep 0.2
|
||||
|
||||
if (IsPulseAudioRunning); then
|
||||
{
|
||||
echo "Failed, force kill..."
|
||||
pkill -KILL pulseaudio
|
||||
env sleep 0.2
|
||||
}
|
||||
else
|
||||
echo "Success!"
|
||||
fi
|
||||
}
|
||||
fi
|
||||
|
||||
if (`pulseaudio --daemonize --high-priority --realtime --disallow-module-loading --exit-idle-time=-1 --file=$FILE -n`); then
|
||||
echo "Initiated PulseAudio successfully!"
|
||||
else
|
||||
echo "Failed to initialize PulseAudio!"
|
||||
fi
|
|
@ -0,0 +1,47 @@
|
|||
#!/usr/bin/pulseaudio -nF
|
||||
#
|
||||
# This file is part of PulseAudio, tuned to work for JACK input/output
|
||||
#
|
||||
# PulseAudio is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# PulseAudio is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with PulseAudio; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
# This startup script is used only if PulseAudio is started per-user
|
||||
# (i.e. not in system mode)
|
||||
|
||||
|
||||
.fail
|
||||
|
||||
### Automatically restore the volume of streams and devices
|
||||
load-module module-device-restore
|
||||
load-module module-stream-restore
|
||||
load-module module-card-restore
|
||||
|
||||
### Load Jack modules
|
||||
load-module module-jack-sink
|
||||
load-module module-jack-source
|
||||
|
||||
### Load unix protocol
|
||||
load-module module-native-protocol-unix
|
||||
|
||||
### Automatically move streams to the default sink if the sink they are
|
||||
### connected to dies, similar for sources
|
||||
load-module module-rescue-streams
|
||||
|
||||
### Make sure we always have a sink around, even if it is a null sink.
|
||||
load-module module-always-sink
|
||||
|
||||
### Make Jack default
|
||||
set-default-sink jack_out
|
||||
set-default-source jack_in
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
#!/usr/bin/pulseaudio -nF
|
||||
#
|
||||
# This file is part of PulseAudio, tuned to work for JACK input/output
|
||||
#
|
||||
# PulseAudio is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# PulseAudio is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with PulseAudio; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
# This startup script is used only if PulseAudio is started per-user
|
||||
# (i.e. not in system mode)
|
||||
|
||||
|
||||
.fail
|
||||
|
||||
### Automatically restore the volume of streams and devices
|
||||
load-module module-device-restore
|
||||
load-module module-stream-restore
|
||||
load-module module-card-restore
|
||||
|
||||
### Load Jack modules
|
||||
load-module module-jack-sink
|
||||
#load-module module-jack-source
|
||||
|
||||
### Load unix protocol
|
||||
load-module module-native-protocol-unix
|
||||
|
||||
### Automatically move streams to the default sink if the sink they are
|
||||
### connected to dies, similar for sources
|
||||
load-module module-rescue-streams
|
||||
|
||||
### Make sure we always have a sink around, even if it is a null sink.
|
||||
load-module module-always-sink
|
||||
|
||||
### Make Jack default
|
||||
set-default-sink jack_out
|
||||
#set-default-source jack_in
|
||||
|
31
src/carla.py
31
src/carla.py
|
@ -797,6 +797,7 @@ class PluginDatabaseW(QDialog, ui_carla_database.Ui_PluginDatabaseW):
|
|||
QDialog.__init__(self, parent)
|
||||
self.setupUi(self)
|
||||
|
||||
self.warning_old_shown = False
|
||||
self.b_add.setEnabled(False)
|
||||
|
||||
if (BINARY_NATIVE in (BINARY_UNIX32, BINARY_WIN32)):
|
||||
|
@ -916,6 +917,12 @@ class PluginDatabaseW(QDialog, ui_carla_database.Ui_PluginDatabaseW):
|
|||
def addPluginToTable(self, plugin, ptype):
|
||||
index = self.last_table_index
|
||||
|
||||
if ("build" not in plugin.keys()):
|
||||
if (self.warning_old_shown == False):
|
||||
QMessageBox.warning(self, self.tr("Warning"), self.tr("You're using a Carla-Database from an old version of Carla, please update the plugins"))
|
||||
self.warning_old_shown = True
|
||||
return
|
||||
|
||||
if (plugin['build'] == BINARY_NATIVE):
|
||||
bridge_text = self.tr("No")
|
||||
else:
|
||||
|
@ -3346,10 +3353,22 @@ if __name__ == '__main__':
|
|||
app.setOrganizationName("falkTX")
|
||||
app.setWindowIcon(QIcon(":/scalable/carla.svg"))
|
||||
|
||||
lib_prefix = None
|
||||
|
||||
for i in range(len(app.arguments())):
|
||||
if (i == 0): continue
|
||||
argument = app.arguments()[i]
|
||||
|
||||
if argument.startswith("--with-libprefix="):
|
||||
lib_prefix = argument.replace("--with-libprefix=","")
|
||||
|
||||
elif (os.path.exists(argument)):
|
||||
gui.m_project_filename = argument
|
||||
|
||||
#style = app.style().metaObject().className()
|
||||
#force_parameters_style = (style in ("Bespin::Style",))
|
||||
|
||||
CarlaHost = Host()
|
||||
CarlaHost = Host(lib_prefix)
|
||||
|
||||
# Create GUI and read settings
|
||||
gui = CarlaMainW()
|
||||
|
@ -3391,13 +3410,9 @@ if __name__ == '__main__':
|
|||
# Show GUI
|
||||
gui.show()
|
||||
|
||||
for i in range(len(app.arguments())):
|
||||
if (i == 0): continue
|
||||
try_path = app.arguments()[i]
|
||||
if (os.path.exists(try_path)):
|
||||
gui.m_project_filename = try_path
|
||||
gui.load_project()
|
||||
gui.setWindowTitle("Carla - %s" % (getShortFileName(try_path)))
|
||||
if (gui.m_project_filename):
|
||||
gui.load_project()
|
||||
gui.setWindowTitle("Carla - %s" % (getShortFileName(try_path)))
|
||||
|
||||
# App-Loop
|
||||
ret = app.exec_()
|
||||
|
|
|
@ -186,6 +186,7 @@ else:
|
|||
# ------------------------------------------------------------------------------------------------
|
||||
# Search for Carla library and tools
|
||||
|
||||
global carla_library_path
|
||||
carla_library_path = ""
|
||||
|
||||
carla_discovery_unix32 = ""
|
||||
|
@ -816,9 +817,14 @@ global Callback
|
|||
Callback = None
|
||||
|
||||
class Host(object):
|
||||
def __init__(self):
|
||||
def __init__(self, lib_prefix_arg):
|
||||
object.__init__(self)
|
||||
|
||||
global carla_library_path
|
||||
|
||||
if (lib_prefix_arg):
|
||||
carla_library_path = os.path.join(lib_prefix_arg, "lib", "carla", carla_libname)
|
||||
|
||||
self.lib = cdll.LoadLibrary(carla_library_path)
|
||||
|
||||
self.lib.carla_init.argtypes = [c_char_p]
|
||||
|
|
Loading…
Reference in New Issue