Skip to content

Commit

Permalink
Adopt AppStream
Browse files Browse the repository at this point in the history
  • Loading branch information
overflw committed Apr 28, 2021
1 parent 07fe24a commit 83b82d4
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Name=Tribler
GenericName=P2P /Bittorrent/Youtube client
Exec=tribler %U
Icon=tribler
Icon=org.tribler.Tribler
Terminal=false
Type=Application
Categories=Application;Network;P2P
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>org.tribler.Tribler</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>LGPL-3.0-only</project_license>
<name>Tribler</name>
<developer_name>The Tribler Community</developer_name>
<url type="homepage">https://tribler.org/</url>
<url type="bugtracker">https://github.com/Tribler/tribler/issues</url>
<url type="help">https://github.com/Tribler/tribler/wiki</url>
<summary>Towards making Bittorrent anonymous and impossible to shut down.</summary>
<description>
<p>We use our own dedicated Tor-like network for anonymous torrent downloading.</p>
<p>We are trying to make privacy, strong cryptography and authentication the Internet norm.</p>
</description>
<screenshots>
<screenshot type="default">
<image>https://www.tribler.org/img/image0.png</image>
<caption>Screenshot of the Tribler UI</caption>
</screenshot>
<screenshot>
<image>https://www.tribler.org/img/image3.png</image>
<caption>Screenshot of the Tribler UI</caption>
</screenshot>
<screenshot>
<image>https://www.tribler.org/img/image1.png</image>
<caption>Screenshot of the Tribler UI</caption>
</screenshot>
<screenshot>
<image>https://www.tribler.org/img/image4.png</image>
<caption>Screenshot of the Tribler UI</caption>
</screenshot>
<screenshot>
<image>https://www.tribler.org/img/image9.png</image>
<caption>Screenshot of the Tribler UI</caption>
</screenshot>
<screenshot>
<image>https://www.tribler.org/img/image10.png</image>
<caption>Screenshot of the Tribler UI</caption>
</screenshot>
</screenshots>
<launchable type="desktop-id">org.tribler.Tribler.desktop</launchable>
<content_rating type="oars-1.1">
<content_attribute id="social-info">mild</content_attribute>
</content_rating>
<releases>
</releases>
</component>
18 changes: 17 additions & 1 deletion build/update_version_from_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,24 @@ def run_command(cmd):
with open('.TriblerVersion', 'w') as f:
f.write(version_id)

if sys.platform == 'linux2':
if sys.platform == 'linux2' or sys.platform == 'linux':
run_command('dch -v {} New upstream release.'.format(version_id).split())
logger.info('Writing AppStream version info.')
import time
import xml.etree.ElementTree as xml
import defusedxml.ElementTree as defxml

releaseDate = time.strftime("%Y-%m-%d", time.localtime())
attrib = {'version': f'{version_id}', 'date':f'{releaseDate}'}

tree = defxml.parse(path.join('build', 'debian', 'tribler', 'usr', 'share', 'metainfo',
'org.tribler.Tribler.metainfo.xml'))
xmlRoot = tree.getroot()
releases = xmlRoot.find('releases')
release = xml.SubElement(releases, 'release', attrib)
tree.write(path.join('build', 'debian', 'tribler', 'usr', 'share', 'metainfo',
'org.tribler.Tribler.metainfo.xml'))

elif sys.platform == 'win32':
logger.info('Replacing NSI string.')
with open(path.join('build', 'win', 'resources', 'tribler.nsi'), 'r+') as f:
Expand Down
4 changes: 3 additions & 1 deletion src/tribler-gui/tribler_gui/core_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from tribler_gui.utilities import connect, format_size, get_base_path

START_FAKE_API = False
SKIP_VERSION_CLEANUP = os.environ.get("SKIP_VERSION_CLEANUP", "FALSE").lower() == "true"


class CoreManager(QObject):
Expand Down Expand Up @@ -112,7 +113,8 @@ def on_request_error(_):

def should_cleanup_old_versions(self) -> List[TriblerVersion]:
# Skip old version check popup when running fake core, eg. during GUI tests
if START_FAKE_API:
# or during deployment tests since it blocks the tests with a popup dialog
if START_FAKE_API or SKIP_VERSION_CLEANUP:
return []

if self.version_history.last_run_version == self.version_history.code_version:
Expand Down

0 comments on commit 83b82d4

Please sign in to comment.