Commit 92d5ebba authored by Falk Alexander Seidl's avatar Falk Alexander Seidl

Split appdata and desktop file for devel profile

parent e01a97a2
Pipeline #33363 failed with stage
in 7 minutes and 46 seconds
......@@ -14,7 +14,7 @@
<property name="authors">@CONTRIBUTORS@</property>
<property name="translator_credits" translatable="yes" comments="Add your name to the translator credits list">translator-credits</property>
<property name="artists">Tobias Bernard</property>
<property name="logo_icon_name">org.gnome.PasswordSafe</property>
<property name="logo_icon_name">@APPID@</property>
<property name="license_type">gpl-3-0</property>
<child>
<placeholder/>
......@@ -48,3 +48,4 @@
</child>
</object>
</interface>
......@@ -22,10 +22,20 @@ install_data(
install_dir: 'share/glib-2.0/schemas'
)
# Merging the translations with the desktop file
i18n.merge_file(
output: project_id + '.desktop',
input: project_id + '.desktop.in',
desktop_conf = configuration_data()
application_id = 'org.gnome.PasswordSafe'
if get_option('profile') == 'development'
application_id = 'org.gnome.PasswordSafeDevel'
endif
desktop_conf.set('ICON', application_id)
desktop = i18n.merge_file(
'desktop',
input: configure_file(
input: files('org.gnome.PasswordSafe.desktop.in.in'),
output: 'org.gnome.PasswordSafe.desktop.in',
configuration: desktop_conf
),
output: '@0@.desktop'.format(application_id),
po_dir: join_paths(meson.source_root(), 'po'),
type: 'desktop',
install: true,
......@@ -38,17 +48,27 @@ if desktop_file_validate.found()
test (
'Validate desktop file',
desktop_file_validate,
args: join_paths(meson.current_build_dir (), project_id + '.desktop')
args: join_paths(meson.current_build_dir (), application_id + '.desktop')
)
endif
appdata = i18n.merge_file(
'appdata',
input: 'org.gnome.PasswordSafe.appdata.xml.in',
output: application_id + '.appdata.xml',
install: true,
install_dir: join_paths(join_paths('share'), 'metainfo'),
po_dir: join_paths(meson.source_root(), 'po')
)
# Validating the appdata file
appstreamcli = find_program('appstream-util', required: false)
if appstreamcli.found()
test (
'Validate appdata file',
appstreamcli,
args: ['validate-relax', join_paths(meson.current_build_dir (), project_id + '.appdata.xml')]
args: ['validate-relax', join_paths(meson.current_build_dir (), application_id + '.appdata.xml')]
)
endif
......
......@@ -2,7 +2,7 @@
Name=Password Safe
Comment=A password manager for GNOME
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=org.gnome.PasswordSafe
Icon=@ICON@
Exec=gnome-passwordsafe %U
Terminal=false
Type=Application
......
......@@ -9,6 +9,7 @@
"nightly"
],
"desktop-file-name-prefix": "(Development) ",
"app-id": "org.gnome.PasswordSafeDevel",
"command" : "gnome-passwordsafe",
"finish-args" : [
"--share=ipc",
......@@ -57,4 +58,4 @@
"env" : {
}
}
}
}
\ No newline at end of file
......@@ -58,13 +58,19 @@ conf.set('PYTHON_EXEC_DIR', join_paths(get_option('prefix'), python.sysconfig_pa
conf.set('PYTHON', python_bin.path())
conf.set('libexecdir', LIBEXEC_DIR)
if get_option('profile') == 'development'
conf.set('VERSION', run_command(['git', 'describe', '--long', '--tags']).stdout())
conf.set('VERSION', ''.join([run_command(['git', 'describe', '--long', '--tags']).stdout(), get_option('profile')]))
else
conf.set('VERSION', meson.project_version())
endif
conf.set('CONTRIBUTORS', contributors)
conf.set_quoted('PROFILE', profile)
application_id = 'org.gnome.PasswordSafe'
if get_option('profile') == 'development'
application_id = 'org.gnome.PasswordSafeDevel'
endif
conf.set('APPID', application_id)
subdir('data')
subdir('po')
......
......@@ -39,13 +39,13 @@ if __name__ == "__main__":
resource = Gio.resource_load(os.path.join(pkgdatadir, 'passwordsafe.gresource'))
Gio.Resource._register(resource)
app = Application()
if @PROFILE@ == 'Devel':
Application.development_mode = True
Application.application_id = 'org.gnome.PasswordSafeDevel'
else:
Application.development_mode = False
app = Application()
exit_status = app.run(sys.argv)
sys.exit(exit_status)
......@@ -35,14 +35,12 @@ class Application(Gtk.Application):
self.connect("open", self.file_open_handler)
self.assemble_application_menu()
print(self.development_mode)
print(self.application_id)
def do_activate(self):
if not self.window:
self.window = MainWindow(
application=self, title="Password Safe",
icon_name="org.gnome.PasswordSafe")
icon_name=self.application_id)
self.window.application = self
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment