Fix get_resource_path to work with python eggs, move appdata xml file to src so flatpak can see it, reduce python dependencies, and update release docs

This commit is contained in:
Micah Lee 2020-11-08 13:34:19 -08:00
parent 46a9434fbf
commit 06c4b6381b
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
7 changed files with 187 additions and 265 deletions

View file

@ -29,6 +29,7 @@ import tempfile
import threading
import time
import shutil
from pkg_resources import resource_filename
from .settings import Settings
@ -73,11 +74,7 @@ class Common:
"""
Returns the absolute path of a resource
"""
resources_path = os.path.join(
os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))),
"resources",
)
path = os.path.join(resources_path, filename)
path = resource_filename("onionshare_cli", os.path.join("resources", filename))
self.log("Common", "get_resource_path", path)
return path