about summary refs log tree commit diff
path: root/pkgs/tools/misc/sonota/set_resource_path.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/misc/sonota/set_resource_path.patch')
-rw-r--r--pkgs/tools/misc/sonota/set_resource_path.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/pkgs/tools/misc/sonota/set_resource_path.patch b/pkgs/tools/misc/sonota/set_resource_path.patch
new file mode 100644
index 000000000000..f9a802657762
--- /dev/null
+++ b/pkgs/tools/misc/sonota/set_resource_path.patch
@@ -0,0 +1,20 @@
+diff --git a/sonota.py b/sonota.py
+index f67128b..9f2752e 100644
+--- a/sonota.py
++++ b/sonota.py
+@@ -475,14 +475,7 @@ def promptforval(msg):
+             return val
+
+ def resource_path(relative_path):
+-    """ Get absolute path to resource, works for dev and for PyInstaller """
+-    try:
+-        # PyInstaller creates a temp folder and stores path in _MEIPASS
+-        base_path = sys._MEIPASS
+-    except Exception:
+-        base_path = os.path.dirname(sys.argv[0])
+-
+-    return os.path.join(base_path, relative_path)
++    return os.path.join("@out@/share/sonota", relative_path)
+
+ def checkargs():
+     # Make sure all of the binary files that are needed are there