summaryrefslogtreecommitdiff
path: root/data/meson.build
diff options
context:
space:
mode:
authorErnestas Kulik <ernestask@gnome.org>2018-03-16 17:24:11 +0200
committerErnestas Kulik <ernestask@gnome.org>2018-03-18 22:28:08 +0200
commitdf583c2e4aded65da329a9e14279be40d9c397f2 (patch)
tree224287e6f8378eca5b97814a3019f4696d0c7d48 /data/meson.build
parent30a76b3033af7d937380c3c77a2665bf979e4bc9 (diff)
downloadnautilus-df583c2e4aded65da329a9e14279be40d9c397f2.tar.gz
general: Allow running in separate instance
When hacking on Nautilus, it is very inconvenient to have to close any running instance before running the built version. This commit enables running three different instances by changing the application ID. Beside the default “profile” is one crafted for stable flatpak releases and one for development. The stable flatpak profile adds an identifying mark to the about dialog to aid collecting information in bug reports. The development profile is that plus additional styling to help visually identify the development instance. It also will be used when generating Flatpak bundles with the help of CI. Generally, the implementation is slightly hacky to allow all the different workflows, spanning from regular installations to GNOME Builder flatpak builds, as each comes with its own quirks.
Diffstat (limited to 'data/meson.build')
-rw-r--r--data/meson.build75
1 files changed, 64 insertions, 11 deletions
diff --git a/data/meson.build b/data/meson.build
index 11192d5f7..ab9b853a9 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -1,7 +1,36 @@
-install_subdir(
- join_paths('icons', 'hicolor'),
- install_dir: join_paths(datadir, 'icons')
+########## EVIL EVIL EVIL
+# See https://github.com/mesonbuild/meson/issues/1487
+# and https://github.com/mesonbuild/meson/pull/3223
+#
+# This is primarily for the “build profiles” feature,
+# to be able to have icons even if we change the application ID.
+#
+# https://gitlab.gnome.org/GNOME/nautilus/merge_requests/144
+##########
+foreach icon_size: ['16x16', '22x22', '24x24', '32x32', '48x48', '512x512']
+ configure_file(
+ command: [
+ 'cp', '@INPUT@', '@OUTPUT@'
+ ],
+ input: files(
+ join_paths('icons', 'hicolor', icon_size, 'apps', 'org.gnome.Nautilus.png')
+ ),
+ install_dir: join_paths(datadir, 'icons', 'hicolor', icon_size, 'apps'),
+ output: '@0@.png'.format(application_id)
+ )
+endforeach
+
+configure_file(
+ command: [
+ 'cp', '@INPUT@', '@OUTPUT@'
+ ],
+ input: files(
+ join_paths('icons', 'hicolor', 'symbolic', 'apps', 'org.gnome.Nautilus-symbolic.svg')
+ ),
+ install_dir: join_paths(datadir, 'icons', 'hicolor', 'symbolic', 'apps'),
+ output: '@0@-symbolic.svg'.format(application_id)
)
+##########
po_dir = join_paths(meson.source_root(), 'po')
@@ -14,10 +43,18 @@ line_up_parameters = executable(
]
)
+desktop_conf = configuration_data()
+
+desktop_conf.set('icon', application_id)
+
desktop = i18n.merge_file(
'desktop',
- input: 'org.gnome.Nautilus.desktop.in',
- output: 'org.gnome.Nautilus.desktop',
+ input: configure_file(
+ input: files('org.gnome.Nautilus.desktop.in.in'),
+ output: 'org.gnome.Nautilus.desktop.in',
+ configuration: desktop_conf
+ ),
+ output: '@0@.desktop'.format(application_id),
install: true,
install_dir: desktopdir,
po_dir: po_dir,
@@ -34,21 +71,30 @@ desktop_autorun_software = i18n.merge_file(
type: 'desktop'
)
+appdata_conf = configuration_data()
+
+appdata_conf.set('appid', application_id)
+
appdata = i18n.merge_file(
'appdata',
- input: 'org.gnome.Nautilus.appdata.xml.in',
- output: 'org.gnome.Nautilus.appdata.xml',
+ input: configure_file(
+ input: files('org.gnome.Nautilus.appdata.xml.in.in'),
+ output: 'org.gnome.Nautilus.appdata.xml.in',
+ configuration: appdata_conf
+ ),
+ output: '@0@.appdata.xml'.format(application_id),
install: true,
install_dir: join_paths(datadir, 'metainfo'),
po_dir: po_dir
)
service_conf = configuration_data()
+service_conf.set('appid', application_id)
service_conf.set('bindir', join_paths(prefix, bindir))
configure_file(
input: 'org.gnome.Nautilus.service.in',
- output: 'org.gnome.Nautilus.service',
+ output: '@0@.service'.format(application_id),
configuration: service_conf,
install_dir: servicedir
)
@@ -60,9 +106,16 @@ configure_file(
install_dir: servicedir
)
-install_data(
- 'org.gnome.Nautilus.search-provider.ini',
- install_dir: join_paths(datadir, 'gnome-shell', 'search-providers')
+search_provider_conf = configuration_data()
+
+search_provider_conf.set('appid', application_id)
+search_provider_conf.set('profile', profile)
+
+configure_file(
+ configuration: search_provider_conf,
+ input: files('org.gnome.Nautilus.search-provider.ini.in'),
+ install_dir: join_paths(datadir, 'gnome-shell', 'search-providers'),
+ output: '@0@.search-provider.ini'.format(application_id)
)
install_data(