Commit a1725058 authored by Bilal Elmoussaoui's avatar Bilal Elmoussaoui Committed by Bilal Elmoussaoui

Dual installation: add a devel profile

parent a0f3b7b2
Pipeline #126260 passed with stages
in 2 minutes and 12 seconds
......@@ -5,12 +5,11 @@ variables:
GIT_SUBMODULE_STRATEGY: normal
flatpak:
image: 'registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master'
variables:
MANIFEST_PATH: "org.gnome.design.IconPreview.json"
FLATPAK_MODULE: "icon-preview"
RUNTIME_REPO: "https://sdk.gnome.org/gnome-nightly.flatpakrepo"
APP_ID: "org.gnome.design.IconPreview"
RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo"
APP_ID: "org.gnome.design.IconPreview.Devel"
extends: .flatpak
review:
......
desktop_conf = configuration_data()
desktop_conf.set('icon', application_id)
desktop_file = i18n.merge_file(
input: 'org.gnome.design.IconPreview.desktop.in',
output: '@BASENAME@',
input: configure_file(
input: 'org.gnome.design.IconPreview.desktop.in.in',
output: '@BASENAME@',
configuration: desktop_conf
),
output: '@0@.desktop'.format(application_id),
type: 'desktop',
po_dir: '../po',
install: true,
......@@ -14,9 +20,15 @@ if desktop_utils.found()
)
endif
appdata_conf = configuration_data()
appdata_conf.set('app-id', application_id)
appdata_file = i18n.merge_file(
input: 'org.gnome.design.IconPreview.appdata.xml.in',
output: '@BASENAME@',
input: configure_file(
input: 'org.gnome.design.IconPreview.metainfo.xml.in.in',
output: '@BASENAME@',
configuration: appdata_conf
),
output: '@0@.metainfo.xml'.format(application_id),
po_dir: '../po',
install: true,
install_dir: join_paths(get_option('datadir'), 'metainfo'),
......@@ -28,14 +40,19 @@ if appstream_util.found()
test('Validate appstream file', appstream_util, args: validate_args)
endif
service_conf = configuration_data()
service_conf.set('app-id', application_id)
service_conf.set('bindir', bindir)
configure_file(input: 'org.gnome.design.IconPreview.service.in',
output: '@BASENAME@',
configuration: conf,
output: '@0@.service'.format(application_id),
configuration: service_conf,
install_dir: join_paths([datadir,'dbus-1/services']))
install_data('org.gnome.design.IconPreview.svg',
rename: '@0@.svg'.format(application_id),
install_dir: join_paths([datadir,'icons/hicolor/scalable/apps']))
install_data('org.gnome.design.IconPreview-symbolic.svg',
rename: '@0@-symbolic.svg'.format(application_id),
install_dir: join_paths([datadir,'icons/hicolor/symbolic/apps']))
......@@ -3,7 +3,7 @@ Name=Icon Preview
Comment=Preview icons
Exec=gnome-icon-preview %f
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=org.gnome.design.IconPreview
Icon=@icon@
Terminal=false
Type=Application
StartupNotify=true
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2018 Zander Brown -->
<component type="desktop-application">
<id>org.gnome.design.IconPreview</id>
<id>@app-id@</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0</project_license>
<project_group>GNOME</project_group>
......@@ -42,7 +42,7 @@
<provides>
<id>org.gnome.IconPreview</id>
</provides>
<launchable type="desktop-id">org.gnome.design.IconPreview.desktop</launchable>
<launchable type="desktop-id">@app-id@.desktop</launchable>
<url type="homepage">https://gitlab.gnome.org/World/design/icon-preview</url>
<url type="bugtracker">https://gitlab.gnome.org/World/design/icon-preview/issues</url>
<update_contact>zbrown@gnome.org</update_contact>
......
[D-BUS Service]
Name=org.gnome.design.IconPreview
Exec=@BINDIR@/gnome-icon-preview --gapplication-service
Name=@app-id@
Exec=@bindir@/gnome-icon-preview --gapplication-service
......@@ -2,19 +2,27 @@ project('gnome-icon-preview', 'vala', 'c', version: '0.9.4')
i18n = import('i18n')
datadir = join_paths([ get_option('prefix'), get_option('datadir') ])
bindir = join_paths([ get_option('prefix'), 'bin' ])
datadir = join_paths(get_option('prefix'), get_option('datadir'))
bindir = join_paths(get_option('prefix'), get_option('bindir'))
localedir = join_paths(get_option('prefix'), get_option('localedir'))
if get_option('profile') == 'development'
profile = 'Devel'
else
profile = ''
endif
application_id = 'org.gnome.design.IconPreview@0@'.format('.' + profile)
conf = configuration_data()
conf.set_quoted('G_LOG_DOMAIN', 'org.gnome.design.IconPreview')
conf.set_quoted('G_LOG_DOMAIN', application_id)
conf.set_quoted('PACKAGE_VERSION', meson.project_version())
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
conf.set_quoted('LOCALE_DIR', localedir)
conf.set('BINDIR', bindir)
conf.set_quoted('APP_ID', application_id)
conf.set_quoted('PROFILE', profile)
add_global_arguments('-DGETTEXT_PACKAGE="@0@"'.format (meson.project_name()), language: 'c')
add_global_arguments('-DG_LOG_DOMAIN="@0@"'.format ('org.gnome.design.IconPreview'), language: 'c')
add_global_arguments('-DG_LOG_DOMAIN="@0@"'.format (application_id), language: 'c')
add_global_arguments('-DHANDY_USE_UNSTABLE_API', language: 'c')
subdir('data')
......
option (
'profile',
type: 'combo',
choices: [
'default',
'development'
],
value: 'default',
description: 'The build profile for Icon Preview. One of "default" or "development".'
)
{
"app-id" : "org.gnome.design.IconPreview",
"app-id" : "org.gnome.design.IconPreview.Devel",
"runtime" : "org.gnome.Platform",
"runtime-version" : "master",
"sdk" : "org.gnome.Sdk",
......@@ -51,6 +51,9 @@
{
"name" : "icon-preview",
"buildsystem" : "meson",
"config-opts": [
"-Dprofile=development"
],
"sources" : [
{
"type" : "git",
......
data/org.gnome.design.IconPreview.appdata.xml.in
data/org.gnome.design.IconPreview.desktop.in
data/org.gnome.design.IconPreview.metainfo.xml.in.in
data/org.gnome.design.IconPreview.desktop.in.in
src/common.vala
src/exporter/exporter.ui
src/help-overlay.ui
......
const string G_LOG_DOMAIN = @G_LOG_DOMAIN@;
const string PACKAGE_VERSION = @PACKAGE_VERSION@;
const string GETTEXT_PACKAGE = @GETTEXT_PACKAGE@;
const string LOCALE_DIR = @LOCALE_DIR@;
\ No newline at end of file
const string APP_ID = @APP_ID@;
const string PROFILE = @PROFILE@;
const string LOCALE_DIR = @LOCALE_DIR@;
......@@ -44,7 +44,7 @@ namespace IconPreview {
// Bind the actions
add_action_entries(entries, this);
application_id = "org.gnome.design.IconPreview";
application_id = APP_ID;
flags = HANDLES_OPEN | HANDLES_COMMAND_LINE;
add_main_option ("palette", 'p', IN_MAIN, NONE, _("no longer supported"), null);
......@@ -69,6 +69,7 @@ namespace IconPreview {
}
public override void startup () {
set_resource_base_path("/org/gnome/design/IconPreview");
base.startup();
var styles = new CssProvider();
......@@ -108,7 +109,7 @@ namespace IconPreview {
}
public int main (string[] args) {
Gtk.Window.set_default_icon_name("org.gnome.design.IconPreview");
Gtk.Window.set_default_icon_name(APP_ID);
Intl.setlocale (LocaleCategory.ALL, "");
Intl.bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR);
......
......@@ -231,6 +231,9 @@
<property name="position">2</property>
</packing>
</child>
<style>
<class name="titlebar" />
</style>
</object>
</child>
</template>
......
......@@ -110,6 +110,9 @@ namespace IconPreview {
public Window (Application app) {
Object(app: app);
if (PROFILE == "Devel") {
get_style_context().add_class("devel");
}
}
construct {
......
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