From a85c6c16d92aa243848b0d7fa41d211189c77062 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 1 Nov 2023 15:09:28 +0100 Subject: [PATCH 1/3] Setup rpath for mod-app linux builds Signed-off-by: falkTX --- utils/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/Makefile b/utils/Makefile index 18409926..27c9ee9b 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -35,6 +35,9 @@ endif ifeq ($(MODAPP),1) CXXFLAGS += -DMODAPP +ifneq ($(MACOS)$(WINDOWS),true) +LDFLAGS += -Wl,-rpath,'$$ORIGIN/..' +endif else ifeq ($(shell pkg-config --exists alsa && echo true), true) CXXFLAGS += -DHAVE_ALSA ALSA_CFLAGS = $(shell pkg-config --cflags alsa) From 43e040c00dab765ded422df01e14c2e3862feca6 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 2 Nov 2023 08:38:19 +0100 Subject: [PATCH 2/3] Fix a typo Signed-off-by: falkTX --- modtools/pedalboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modtools/pedalboard.py b/modtools/pedalboard.py index 9be2f493..b8d9b7a9 100644 --- a/modtools/pedalboard.py +++ b/modtools/pedalboard.py @@ -559,7 +559,7 @@ def _take_screenshot(args): args = parser.parse_args() if hasattr(args, 'func'): args.func(args) - exit(0) + sys.exit(0) else: parser.print_usage() From 704ee89f03882faffb09933a4388c2e2dbb37e02 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 2 Nov 2023 09:28:19 +0100 Subject: [PATCH 3/3] Alternative approach to PB screenshots process check Signed-off-by: falkTX --- mod/screenshot.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mod/screenshot.py b/mod/screenshot.py index d8e177a2..a7e0a0d8 100644 --- a/mod/screenshot.py +++ b/mod/screenshot.py @@ -24,11 +24,10 @@ def generate_screenshot(bundle_path, callback): # running packaged through cxfreeze if os.path.isfile(sys.argv[0]): - # TODO this does not work yet - return - cmd = [os.path.join(cwd, 'mod-screenshot'), 'take_screenshot', bundle_path, HTML_DIR, CACHE_DIR] + cmd = [os.path.join(cwd, 'mod-pedalboard'), 'take_screenshot', bundle_path, HTML_DIR, CACHE_DIR] if sys.platform == 'win32': cmd[0] += ".exe" + print(' '.join(cmd)) # regular run else: @@ -36,20 +35,21 @@ def generate_screenshot(bundle_path, callback): if not DEV_ENVIRONMENT and DEVICE_KEY: # if using a real MOD, setup niceness cmd = ['/usr/bin/nice', '-n', '+34'] + cmd - proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, cwd=cwd) + proc = subprocess.Popen(cmd, cwd=cwd) loop = IOLoop.instance() - def proc_callback(fileno, _): + def proc_callback(): if proc.poll() is None: + loop.call_later(0.5, proc_callback) return - loop.remove_handler(fileno) if not os.path.exists(screenshot) or not os.path.exists(thumbnail): - return callback() + callback() + return callback(thumbnail) - loop.add_handler(proc.stdout.fileno(), proc_callback, 16) + loop.call_later(0.5, proc_callback) class ScreenshotGenerator(object):