Bundlebuilder: Use installed icon path in .desktop file

Previously, the bundle builder referenced the icon path in the
source directory - which was obviously not installed in the package.
This commit is contained in:
Sam Parkinson 2016-07-14 16:20:22 +10:00
parent c288d54ab8
commit 7779c74f44
No known key found for this signature in database
GPG Key ID: 34E268B2FA2F8B13
2 changed files with 6 additions and 1 deletions

View File

@ -333,7 +333,8 @@ class Installer(Packager):
cp.set(section, 'Terminal', 'false') cp.set(section, 'Terminal', 'false')
cp.set(section, 'Type', 'Application') cp.set(section, 'Type', 'Application')
cp.set(section, 'Categories', 'Education;') cp.set(section, 'Categories', 'Education;')
cp.set(section, 'Icon', self.config.bundle.get_icon()) cp.set(section, 'Icon', os.path.join(
activity_path, 'activity', self.config.bundle.get_icon_filename()))
cp.set(section, 'Exec', self.config.bundle.get_command()) cp.set(section, 'Exec', self.config.bundle.get_command())
cp.set(section, 'Path', activity_path) # Path == CWD for running cp.set(section, 'Path', activity_path) # Path == CWD for running

View File

@ -286,6 +286,10 @@ class ActivityBundle(Bundle):
os.close(temp_file) os.close(temp_file)
return temp_file_path return temp_file_path
def get_icon_filename(self):
'''Get the icon file name'''
return self._icon + '.svg'
def get_activity_version(self): def get_activity_version(self):
"""Get the activity version""" """Get the activity version"""
return self._activity_version return self._activity_version