Browse Source

Fix carla-plugin-patchbay detection under windows

tags/v1.9.11
falkTX 6 years ago
parent
commit
1df3888c51
3 changed files with 16 additions and 8 deletions
  1. +1
    -0
      data/windows/build-win.sh
  2. +5
    -0
      data/windows/pack-win.sh
  3. +10
    -8
      source/native-plugins/resources/carla-plugin

+ 1
- 0
data/windows/build-win.sh View File

@@ -66,6 +66,7 @@ if [ x"${ARCH}" != x"32" ]; then
fi

export WINEARCH=win${ARCH}
export WINEDEBUG=-all
export WINEPREFIX=~/.winepy3_x${ARCH}
export PYTHON_EXE="wine C:\\\\Python34\\\\python.exe"



+ 5
- 0
data/windows/pack-win.sh View File

@@ -59,6 +59,7 @@ if [ x"${ARCH}" != x"32" ]; then
fi

export WINEARCH=win${ARCH}
export WINEDEBUG=-all
export WINEPREFIX=~/.winepy3_x${ARCH}
export PYTHON_EXE="wine C:\\\\Python34\\\\python.exe"

@@ -115,6 +116,10 @@ cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Widgets.dll Carl
cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5OpenGL.dll Carla/resources/
cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Svg.dll Carla/resources/

if [ x"${CARLA_DEV}" != x"" ]; then
exit 0
fi

# Build unzipfx
make -C unzipfx-carla -f Makefile.win32 clean
make -C unzipfx-carla -f Makefile.win32 ${MAKE_ARGS}


+ 10
- 8
source/native-plugins/resources/carla-plugin View File

@@ -83,9 +83,9 @@ class PluginHost(CarlaHostQtPlugin):
# Main Window

class CarlaMiniW(ExternalUI, HostWindow):
def __init__(self, host, parent=None):
def __init__(self, host, isPatchbay, parent=None):
ExternalUI.__init__(self)
HostWindow.__init__(self, host, sys.argv[0].lower().endswith("/carla-plugin-patchbay"), parent)
HostWindow.__init__(self, host, isPatchbay, parent)
self.host = host

if False:
@@ -485,8 +485,8 @@ else:
# Embed plugin UI

class CarlaEmbedW(QEmbedWidget):
def __init__(self, host, winId):
QEmbedWidget.__init__(self, winId)
def __init__(self, host, winId, isPatchbay):
QEmbedWidget.__init__(self, winId, isPatchbay)

self.host = host
self.fWinId = winId
@@ -498,7 +498,7 @@ class CarlaEmbedW(QEmbedWidget):
self.fLayout.setSpacing(0)
self.fWidget.setLayout(self.fLayout)

self.gui = CarlaMiniW(host, self.fWidget)
self.gui = CarlaMiniW(host, isPatchbay, self.fWidget)
self.gui.hide()

self.gui.ui.act_file_quit.setEnabled(False)
@@ -610,8 +610,10 @@ if __name__ == '__main__':
# -------------------------------------------------------------
# Init host backend

isPatchbay = sys.argv[0].rsplit(os.path.sep)[-1].lower().replace(".exe","") == "carla-plugin-patchbay"

host = initHost("Carla-Plugin", None, False, True, True, PluginHost)
host.processMode = ENGINE_PROCESS_MODE_PATCHBAY if sys.argv[0].lower().endswith("/carla-plugin-patchbay") else ENGINE_PROCESS_MODE_CONTINUOUS_RACK
host.processMode = ENGINE_PROCESS_MODE_PATCHBAY if isPatchbay else ENGINE_PROCESS_MODE_CONTINUOUS_RACK
host.processModeForced = True
host.nextProcessMode = host.processMode
loadHostSettings(host)
@@ -627,9 +629,9 @@ if __name__ == '__main__':
gCarla.utils.setenv("CARLA_PLUGIN_EMBED_WINID", "0")

if LINUX and winId != 0:
gui = CarlaEmbedW(host, winId)
gui = CarlaEmbedW(host, winId, isPatchbay)
else:
gui = CarlaMiniW(host)
gui = CarlaMiniW(host, isPatchbay)

# -------------------------------------------------------------
# App-Loop


Loading…
Cancel
Save