Browse Source

post_install: Check for gtk-update-icon-cache-3.0

merge-requests/24/head
Jan-Michael Brummer 1 year ago
parent
commit
cd13fffee9
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      post_install.py

+ 5
- 1
post_install.py View File

@@ -2,6 +2,7 @@

import os
import subprocess
import shutil

prefix = os.environ.get('MESON_INSTALL_PREFIX', '/usr')
datadir = os.path.join(prefix, 'share')
@@ -10,9 +11,12 @@ datadir = os.path.join(prefix, 'share')
if 'DESTDIR' not in os.environ:
print('Updating icon cache...')
icon_cache_dir = os.path.join(datadir, 'icons', 'hicolor')
gtk_update_icon_cache = shutil.which('gtk-update-icon-cache')
if not gtk_update_icon_cache:
gtk_update_icon_cache = shutil.which('gtk-update-icon-cache-3.0')
if not os.path.exists(icon_cache_dir):
os.makedirs(icon_cache_dir)
subprocess.call(['gtk-update-icon-cache', '-qtf', icon_cache_dir])
subprocess.call([gtk_update_icon_cache, '-qtf', icon_cache_dir])

print('Updating desktop database...')
desktop_database_dir = os.path.join(datadir, 'applications')

Loading…
Cancel
Save