File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -14,3 +14,6 @@ run_target('build', command: 'build-cli.sh')
1414subdir (' data' )
1515subdir (' src' )
1616subdir (' fonts/lora' )
17+
18+ meson .add_install_script(' meson/post_install.py' )
19+
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3
2+
3+ import os
4+ import subprocess
5+
6+ prefix = os .environ .get ('MESON_INSTALL_PREFIX' , '/usr/local' )
7+ datadir = os .path .join (prefix , 'share' )
8+
9+ # Packaging tools define DESTDIR and this isn't needed for them
10+ if 'DESTDIR' not in os .environ :
11+ print ('Updating icon cache...' )
12+ icon_cache_dir = os .path .join (datadir , 'icons' , 'hicolor' )
13+ if not os .path .exists (icon_cache_dir ):
14+ os .makedirs (icon_cache_dir )
15+ subprocess .call (['gtk-update-icon-cache' , '-qtf' , icon_cache_dir ])
16+
17+ print ('Updating desktop database...' )
18+ desktop_database_dir = os .path .join (datadir , 'applications' )
19+ if not os .path .exists (desktop_database_dir ):
20+ os .makedirs (desktop_database_dir )
21+ subprocess .call (['update-desktop-database' , '-q' , desktop_database_dir ])
22+
You can’t perform that action at this time.
0 commit comments