[gnome-photos/wip/inigomartinez/meson: 5/5] 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-photos/wip/inigomartinez/meson: 5/5] build: Rename the names of the icons' files
- Date: Tue, 12 Sep 2017 17:38:12 +0000 (UTC)
commit 89f776457c6e4ab7b8138b0b9d12a10420bff100
Author: Iñigo Martínez <inigomartinez gmail com>
Date: Tue Sep 5 11:25:08 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=787307
.../16x16/apps/org.gnome.Photos.png} | Bin 984 -> 984 bytes
.../22x22/apps/org.gnome.Photos.png} | Bin 1407 -> 1407 bytes
.../24x24/apps/org.gnome.Photos.png} | Bin 1433 -> 1433 bytes
.../256x256/apps/org.gnome.Photos.png} | Bin 60258 -> 60258 bytes
.../32x32/apps/org.gnome.Photos.png} | Bin 2086 -> 2086 bytes
.../48x48/apps/org.gnome.Photos.png} | Bin 3582 -> 3582 bytes
.../scalable/apps/org.gnome.Photos-symbolic.svg} | 0
data/icons/meson.build | 22 ++-----------------
meson_post_install.py | 8 -------
9 files changed, 3 insertions(+), 27 deletions(-)
---
diff --git a/data/icons/hicolor_apps_scalable_org.gnome.Photos-symbolic.svg
b/data/icons/hicolor/scalable/apps/org.gnome.Photos-symbolic.svg
similarity index 100%
rename from data/icons/hicolor_apps_scalable_org.gnome.Photos-symbolic.svg
rename to data/icons/hicolor/scalable/apps/org.gnome.Photos-symbolic.svg
diff --git a/data/icons/meson.build b/data/icons/meson.build
index 7de612e..08aab03 100644
--- a/data/icons/meson.build
+++ b/data/icons/meson.build
@@ -1,20 +1,4 @@
-icon_sizes = [
- '16x16',
- '22x22',
- '24x24',
- '32x32',
- '48x48',
- '256x256'
-]
-
-foreach icon_size: icon_sizes
- install_data(
- '_'.join(['hicolor', 'apps', icon_size, 'org.gnome.Photos.png']),
- install_dir: join_paths(photos_datadir, 'icons', 'hicolor', icon_size, 'apps')
- )
-endforeach
-
-install_data(
- '_'.join(['hicolor', 'apps', 'scalable', 'org.gnome.Photos-symbolic.svg']),
- install_dir: join_paths(photos_datadir, 'icons', 'hicolor', 'scalable', 'apps')
+install_subdir(
+ 'hicolor',
+ install_dir: join_paths(photos_datadir, 'icons')
)
diff --git a/meson_post_install.py b/meson_post_install.py
index 3841ac2..5515324 100644
--- a/meson_post_install.py
+++ b/meson_post_install.py
@@ -2,19 +2,11 @@
import glob
import os
-import re
import subprocess
import sys
if not os.environ.get('DESTDIR'):
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]