summaryrefslogtreecommitdiff
path: root/data
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
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')
-rw-r--r--data/meson.build75
-rw-r--r--data/org.gnome.Nautilus.appdata.xml.in.in (renamed from data/org.gnome.Nautilus.appdata.xml.in)2
-rw-r--r--data/org.gnome.Nautilus.desktop.in.in (renamed from data/org.gnome.Nautilus.desktop.in)2
-rw-r--r--data/org.gnome.Nautilus.search-provider.ini5
-rw-r--r--data/org.gnome.Nautilus.search-provider.ini.in5
-rw-r--r--data/org.gnome.Nautilus.service.in2
6 files changed, 72 insertions, 19 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(
diff --git a/data/org.gnome.Nautilus.appdata.xml.in b/data/org.gnome.Nautilus.appdata.xml.in.in
index 9ec61d52a..30648b3e6 100644
--- a/data/org.gnome.Nautilus.appdata.xml.in
+++ b/data/org.gnome.Nautilus.appdata.xml.in.in
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
- <id>org.gnome.Nautilus.desktop</id>
+ <id>@appid@.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0+</project_license>
<name>Nautilus</name>
diff --git a/data/org.gnome.Nautilus.desktop.in b/data/org.gnome.Nautilus.desktop.in.in
index b7be676f7..32bcab5c5 100644
--- a/data/org.gnome.Nautilus.desktop.in
+++ b/data/org.gnome.Nautilus.desktop.in.in
@@ -5,7 +5,7 @@ Comment=Access and organize files
Keywords=folder;manager;explore;disk;filesystem;
Exec=nautilus --new-window %U
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
-Icon=org.gnome.Nautilus
+Icon=@icon@
Terminal=false
Type=Application
DBusActivatable=true
diff --git a/data/org.gnome.Nautilus.search-provider.ini b/data/org.gnome.Nautilus.search-provider.ini
deleted file mode 100644
index 20b6d1240..000000000
--- a/data/org.gnome.Nautilus.search-provider.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[Shell Search Provider]
-DesktopId=org.gnome.Nautilus.desktop
-BusName=org.gnome.Nautilus
-ObjectPath=/org/gnome/Nautilus/SearchProvider
-Version=2
diff --git a/data/org.gnome.Nautilus.search-provider.ini.in b/data/org.gnome.Nautilus.search-provider.ini.in
new file mode 100644
index 000000000..0ef7f7910
--- /dev/null
+++ b/data/org.gnome.Nautilus.search-provider.ini.in
@@ -0,0 +1,5 @@
+[Shell Search Provider]
+DesktopId=@appid@.desktop
+BusName=@appid@
+ObjectPath=/org/gnome/Nautilus@profile@/SearchProvider
+Version=2
diff --git a/data/org.gnome.Nautilus.service.in b/data/org.gnome.Nautilus.service.in
index 48fe6fce2..55505ef73 100644
--- a/data/org.gnome.Nautilus.service.in
+++ b/data/org.gnome.Nautilus.service.in
@@ -1,3 +1,3 @@
[D-BUS Service]
-Name=org.gnome.Nautilus
+Name=@appid@
Exec=@bindir@/nautilus --gapplication-service