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

@ -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))

View file

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>org.onionshare.OnionShare</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0</project_license>
<name>OnionShare</name>
<summary>Securely and anonymously share files, host websites, and chat with friends</summary>
<description>
<p>
OnionShare is an open source tool that lets you securely and anonymously share files, host websites, and chat with friends using the Tor network.
</p>
</description>
<launchable type="desktop-id">org.onionshare.OnionShare.desktop</launchable>
<screenshots>
<screenshot type="default">
<image>https://raw.githubusercontent.com/micahflee/onionshare/master/docs/source/_static/screenshots/tabs.png</image>
<caption>Types of services that OnionShare supports</caption>
</screenshot>
</screenshots>
<url type="bugtracker">https://github.com/micahflee/onionshare/issues/</url>
<url type="help">https://onionshare.org/</url>
<url type="homepage">https://onionshare.org/</url>
<developer_name>Micah Lee</developer_name>
<update_contact>micah@micahflee.com</update_contact>
<content_rating type="oars-1.1" />
<releases>
<release type="development" date="2020-09-20" version="2.3.dev1" />
</releases>
</component>