From 7540ef6af980aec4ca9e6c4bcabd0ebaed0a438d Mon Sep 17 00:00:00 2001 From: Ilya Zhuravlev Date: Sat, 9 Jan 2021 14:55:31 -0500 Subject: [PATCH] macro_recorder_linux: support appimages --- src/main/python/macro_recorder_linux.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/python/macro_recorder_linux.py b/src/main/python/macro_recorder_linux.py index 75f0982..d4e7526 100644 --- a/src/main/python/macro_recorder_linux.py +++ b/src/main/python/macro_recorder_linux.py @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-or-later import sys +import os from PyQt5 import QtCore from PyQt5.QtCore import pyqtSignal, QProcess @@ -38,7 +39,9 @@ class LinuxRecorder(QWidget): self.move(center.x() - self.width() * 0.5, 0) args = [sys.executable] - if is_frozen(): + if os.getenv("APPIMAGE"): + args = [os.getenv("APPIMAGE")] + elif is_frozen(): args += sys.argv[1:] else: args += sys.argv