[gnome-documents/wip/inigomartinez/meson: 3/6] build: Rename the names of the icons' files
- From: Iñigo Martínez <inigomartinez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents/wip/inigomartinez/meson: 3/6] build: Rename the names of the icons' files
- Date: Fri, 17 Nov 2017 16:45:38 +0000 (UTC)
commit 29ee46ddc01b019303b78c2952309ebe7c1cd689
Author: Iñigo Martínez <inigomartinez gmail com>
Date: Thu Sep 14 17:45:42 2017 +0200
build: Rename the names of the icons' files
The names of icons' files, besides containing the final names, they
also contained the path in which they were going to be installed.
This implies that they have to be renamed on the installation
process.
This patch creates the proper directory tree needed on the
installation process and renames all files' names to their final
names.
https://bugzilla.gnome.org/show_bug.cgi?id=787013
.../16x16/apps/org.gnome.Books.png} | Bin 820 -> 820 bytes
.../16x16/apps/org.gnome.Documents.png} | Bin 1024 -> 1024 bytes
.../22x22/apps/org.gnome.Books.png} | Bin 1024 -> 1024 bytes
.../22x22/apps/org.gnome.Documents.png} | Bin 1524 -> 1524 bytes
.../24x24/apps/org.gnome.Books.png} | Bin 1034 -> 1034 bytes
.../24x24/apps/org.gnome.Documents.png} | Bin 1565 -> 1565 bytes
.../256x256/apps/org.gnome.Books.png} | Bin 57584 -> 57584 bytes
.../256x256/apps/org.gnome.Documents.png} | Bin 40339 -> 40339 bytes
.../32x32/apps/org.gnome.Books.png} | Bin 2160 -> 2160 bytes
.../32x32/apps/org.gnome.Documents.png} | Bin 2479 -> 2479 bytes
.../48x48/apps/org.gnome.Books.png} | Bin 4054 -> 4054 bytes
.../48x48/apps/org.gnome.Documents.png} | Bin 3985 -> 3985 bytes
.../512x512/apps/org.gnome.Books.png} | Bin 204806 -> 204806 bytes
.../512x512/apps/org.gnome.Documents.png} | Bin 103128 -> 103128 bytes
.../scalable/apps/org.gnome.Books-symbolic.svg} | 0
.../apps/org.gnome.Documents-symbolic.svg} | 0
data/icons/meson.build | 34 ++-----------------
meson.build | 1 -
meson_post_install.py | 7 ----
19 files changed, 4 insertions(+), 38 deletions(-)
---
diff --git a/data/icons/hicolor_apps_scalable_org.gnome.Books-symbolic.svg
b/data/icons/hicolor/scalable/apps/org.gnome.Books-symbolic.svg
similarity index 100%
rename from data/icons/hicolor_apps_scalable_org.gnome.Books-symbolic.svg
rename to data/icons/hicolor/scalable/apps/org.gnome.Books-symbolic.svg
diff --git a/data/icons/hicolor_apps_scalable_org.gnome.Documents-symbolic.svg
b/data/icons/hicolor/scalable/apps/org.gnome.Documents-symbolic.svg
similarity index 100%
rename from data/icons/hicolor_apps_scalable_org.gnome.Documents-symbolic.svg
rename to data/icons/hicolor/scalable/apps/org.gnome.Documents-symbolic.svg
diff --git a/data/icons/meson.build b/data/icons/meson.build
index be0003f..c5c35fc 100644
--- a/data/icons/meson.build
+++ b/data/icons/meson.build
@@ -1,30 +1,4 @@
-names = [
- 'org.gnome.Books',
- 'org.gnome.Documents'
-]
-
-icon_sizes = [
- '16x16',
- '22x22',
- '24x24',
- '32x32',
- '48x48',
- '256x256',
- '512x512'
-]
-
-foreach icon_size: icon_sizes
- foreach name: names
- install_data(
- '_'.join(['hicolor', 'apps', icon_size, name + '.png']),
- install_dir: join_paths(documents_icondir, 'hicolor', icon_size, 'apps')
- )
- endforeach
-endforeach
-
-foreach name: names
- install_data(
- '_'.join(['hicolor', 'apps', 'scalable', name + '-symbolic.svg']),
- install_dir: join_paths(documents_icondir, 'hicolor', 'scalable', 'apps')
- )
-endforeach
+install_subdir(
+ 'hicolor',
+ install_dir: join_paths(documents_datadir, 'icons')
+)
diff --git a/meson.build b/meson.build
index 0a06947..7ce8968 100644
--- a/meson.build
+++ b/meson.build
@@ -24,7 +24,6 @@ documents_pkgdatadir = join_paths(documents_datadir, meson.project_name())
documents_pkglibdir = join_paths(documents_libdir, meson.project_name())
documents_desktopdir = join_paths(documents_datadir, 'applications')
-documents_icondir = join_paths(documents_datadir, 'icons')
documents_schemadir = join_paths(documents_datadir, 'glib-2.0', 'schemas')
documents_debug = get_option('buildtype').contains('debug')
diff --git a/meson_post_install.py b/meson_post_install.py
index f2f787e..2767a94 100644
--- a/meson_post_install.py
+++ b/meson_post_install.py
@@ -24,13 +24,6 @@ if not os.environ.get('DESTDIR'):
subprocess.call(['ln', '-s', '-f', src, dest])
icondir = os.path.join(sys.argv[1], 'icons', 'hicolor')
-
- name_pattern = re.compile('hicolor_(?:apps)_(?:\d+x\d+|scalable)_(.*)')
- search_pattern = '/**/hicolor_*'
-
- [os.rename(file, os.path.join(os.path.dirname(file), name_pattern.search(file).group(1)))
- for file in glob.glob(icondir + search_pattern, recursive=True)]
-
print('Update icon cache...')
subprocess.call(['gtk-update-icon-cache', '-f', '-t', icondir])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]