Browse files

Don't install themes index on non-Windows

On non-Windows, the icons are installed on the system's icon directory,
so installing our index.theme might override the system's one.  Since
it's highly unlikely the theme index is missing on non-Windows, just
don't install it.
  • Loading branch information...
1 parent b80c8cd commit 320f10c85b8381dc5e8dc1daec2fbceb050a9a83 @b4n b4n committed Jan 15, 2013
Showing with 17 additions and 6 deletions.
  1. +4 −1 icons/Makefile.am
  2. +3 −1 icons/tango/Makefile.am
  3. +10 −4 wscript
View
5 icons/Makefile.am
@@ -1,8 +1,11 @@
SUBDIRS = 16x16 24x24 32x32 48x48 scalable tango
+# only install index.theme on Windows
+if MINGW
iconsdir = $(datadir)/icons/hicolor
-
dist_icons_DATA = index.theme
+endif
+
dist_noinst_DATA = geany.ico
gtk_update_icon_cache = gtk-update-icon-cache -f -t
View
4 icons/tango/Makefile.am
@@ -1,5 +1,7 @@
SUBDIRS = 16x16 24x24 32x32 48x48 scalable
+# only install index.theme on Windows
+if MINGW
iconsdir = $(datadir)/icons/Tango
-
dist_icons_DATA = index.theme
+endif
View
14 wscript
@@ -135,7 +135,6 @@ geany_sources = set([
'src/ui_utils.c', 'src/utils.c'])
geany_icons = {
- 'hicolor': ['index.theme'],
'hicolor/16x16/apps': ['16x16/classviewer-class.png',
'16x16/classviewer-macro.png',
'16x16/classviewer-member.png',
@@ -162,13 +161,16 @@ geany_icons = {
'hicolor/scalable/actions': ['scalable/geany-build.svg',
'scalable/geany-close-all.svg',
'scalable/geany-save-all.svg'],
- 'Tango': ['tango/index.theme'],
'Tango/16x16/actions': ['tango/16x16/geany-save-all.png'],
'Tango/24x24/actions': ['tango/24x24/geany-save-all.png'],
'Tango/32x32/actions': ['tango/32x32/geany-save-all.png'],
'Tango/48x48/actions': ['tango/48x48/geany-save-all.png'],
'Tango/scalable/actions': ['tango/scalable/geany-save-all.svg']
}
+geany_icons_indexes = {
+ 'hicolor': ['index.theme'],
+ 'Tango': ['tango/index.theme']
+}
def configure(conf):
@@ -531,9 +533,13 @@ def build(bld):
template_dest = '${DATADIR}/%s/templates' % data_dir
bld.install_files(template_dest, start_dir.ant_glob('**/*'), cwd=start_dir, relative_trick=True)
# Icons
- for dest in geany_icons:
+ for dest, srcs in geany_icons.items():
dest_dir = os.path.join('${PREFIX}/share/icons' if is_win32 else '${DATADIR}/icons', dest)
- bld.install_files(dest_dir, geany_icons[dest], cwd=bld.path.find_dir('icons'))
+ bld.install_files(dest_dir, srcs, cwd=bld.path.find_dir('icons'))
+ # install theme indexes on Windows
+ if is_win32:
+ for dest, srcs in geany_icons_indexes.items():
+ bld.install_files(os.path.join('${PREFIX}/share/icons', dest), srcs, cwd=bld.path.find_dir('icons'))
def distclean(ctx):

0 comments on commit 320f10c

Please sign in to comment.