This commit is contained in:
Valéry Febvre 2022-08-16 10:57:10 +02:00
parent c9b872d71f
commit 1d64745c4a
4 changed files with 7 additions and 4 deletions

View File

@ -425,7 +425,7 @@ class ApplicationWindow(Adw.ApplicationWindow):
window.set_developers(CREDITS['developers'])
window.set_translator_credits('\n'.join(CREDITS['translators']))
debug_info = DebugInfo(self.application.version)
debug_info = DebugInfo(self.application)
window.set_debug_info_filename('Komikku-debug-info.txt')
window.set_debug_info(debug_info.generate())

View File

@ -19,8 +19,9 @@ from komikku.models.database import VERSION as DB_VERSION
class DebugInfo:
def __init__(self, version):
self.version = version
def __init__(self, app):
self.version = app.version
self.profile = app.profile
def get_flatpak_info(self):
path = os.path.join(GLib.get_user_runtime_dir(), 'flatpak-info')
@ -81,6 +82,7 @@ class DebugInfo:
def generate(self):
info = 'Komikku:\n'
info += f'- Version: {self.version}\n'
info += f'- Profile: {self.profile}\n'
info += f'- DB version: {DB_VERSION}\n'
info += '\n'

View File

@ -27,7 +27,7 @@ else
endif
prefix = get_option('prefix') # should be /usr
profile = get_option('profile') # should be default or development
profile = get_option('profile') # should be default, development or beta
bindir = get_option('bindir') # should be /bin
datadir = get_option('datadir') # should be /usr/share
pkgdatadir = join_paths(prefix, datadir, meson.project_name())

View File

@ -2,6 +2,7 @@ option(
'profile',
type: 'combo',
choices: [
'beta',
'default',
'development'
],