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 19b73ae571
commit 0c23c7e5d6
7 changed files with 187 additions and 265 deletions

View file

@ -14,19 +14,9 @@ icon = "src/onionshare/resources/onionshare"
sources = ['src/onionshare']
requires = [
"./onionshare_cli-2.3.dev1-py3-none-any.whl",
"Click",
"eventlet",
"Flask",
"Flask-HTTPAuth",
"flask-socketio",
"psutil",
"pycryptodome",
"PySocks",
"pyside2==5.15.1",
"qrcode",
"requests",
"stem",
"urllib3",
"qrcode"
]
[tool.briefcase.app.onionshare.macOS]

View file

@ -21,6 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import os
import inspect
import shutil
from pkg_resources import resource_filename
from . import strings
from onionshare_cli.onion import Onion
@ -367,8 +368,4 @@ class GuiCommon:
"""
Returns the absolute path of a resource
"""
resources_path = os.path.join(
os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))),
"resources",
)
return os.path.join(resources_path, filename)
return resource_filename("onionshare", os.path.join("resources", filename))