Commit c115f5bf authored by Felipe Borges's avatar Felipe Borges

build: Introduce the "profile" build option

This option allows us to build differently according to the given
profiles. The "development" profile should generate a BoxesDevel
variant (application id, dbus id, etc...) which can run alongside
an existent org.gnome.Boxes

This is necessary because application id, icon names, and DBus IDs
are expected to match.
parent 7ca688b8
icondir = join_paths(data_dir, 'icons')
foreach icon_size: ['16x16', '22x22', '24x24', '32x32', '48x48', '512x512']
icondir = join_paths('icons', 'hicolor', icon_size, 'apps')
install_data('icons/hicolor/16x16/apps/org.gnome.Boxes.png',
install_dir: icondir,
)
install_data('icons/hicolor/24x24/apps/org.gnome.Boxes.png',
install_dir: icondir,
)
install_data('icons/hicolor/symbolic/apps/org.gnome.Boxes-symbolic.svg',
install_dir: icondir,
)
install_data('icons/hicolor/32x32/apps/org.gnome.Boxes.png',
install_dir: icondir,
)
install_data(
join_paths(icondir, 'org.gnome.Boxes.png'),
install_dir: join_paths(datadir, icondir),
rename: '@0@.png'.format(application_id)
)
endforeach
install_data('icons/hicolor/48x48/apps/org.gnome.Boxes.png',
install_dir: icondir,
)
icondir = join_paths('icons', 'hicolor', 'symbolic', 'apps')
install_data('icons/hicolor/256x256/apps/org.gnome.Boxes.png',
install_dir: icondir,
install_data(
join_paths(icondir, 'org.gnome.Boxes-symbolic.svg'),
install_dir: join_paths(datadir, icondir),
rename: '@0@-symbolic.svg'.format(application_id)
)
resource_files = files ('gnome-boxes.gresource.xml')
resources = gnome.compile_resources ('org.gnome.Boxes',
resource_files,
......
......@@ -37,6 +37,30 @@ conf.set_quoted ('CACHEDIR', '/var/cache')
conf.set_quoted ('LOCALEDIR', locale_dir)
conf.set('PACKAGE_BUGREPORT', '"http://gitlab.gnome.org/gnome/gnome-boxes/issues"')
if get_option ('profile') == 'development'
profile = 'Devel'
name_suffix = ' (Development Snapshot)'
else
profile = ''
name_suffix = ''
endif
application_id = 'org.gnome.Boxes@0@'.format (profile)
conf.set_quoted ('PROFILE', profile)
config_h = declare_dependency (
sources: vcs_tag (
command: ['git', 'rev-parse', '--short', 'HEAD'],
fallback: get_option('profile') != 'default'? 'devel' : 'stable',
input: configure_file (
output: 'config.h.in',
configuration: conf
),
output: 'config.h'
)
)
configure_file (output: 'config.h', configuration: conf)
config_h_dir = include_directories ('.')
......
......@@ -25,3 +25,11 @@ option ('flatpak',
type: 'boolean',
value: false,
description: 'Whether Boxes is going to run in a Flatpak')
option ('profile',
type: 'combo', choices: [
'default',
'development'
],
value: 'default'
)
......@@ -118,6 +118,7 @@ vala_sources = [
]
dependencies = [
config_h,
config_dep,
libarchive_dep,
dependency ('gobject-2.0', version: '>= 2.44'),
......
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