+
+ string addIcons(GtkValaSettings cg)
+ {
+
+ var ret = "";
+ string[] sizes = { "16x16", "22x22","24x24","32x32", "48x48" } ;
+ foreach(var size in sizes) {
+ GLib.debug("looking for on : %s" , "pixmaps/" + size + "/apps/" + cg.name + ".png");
+ var img = this.project.getByRelPath( "pixmaps/" + size + "/apps/" + cg.name + ".png");
+ if (img == null) {
+ continue;
+ }
+ var path = img.relpath;
+ ret += @"
+install_data(
+ '$path',
+ install_dir: get_option('datadir') + '/icons/hicolor/$size/apps/'
+)
+";
+ }
+ if (ret == "") {
+ return "";
+ }
+ ret += "
+gnome = import('gnome')
+gnome.post_install(gtk_update_icon_cache : true)
+";
+ return ret;
+ }
+
+ string addDesktop(GtkValaSettings cg)
+ {
+ // we could actually generate this!?!
+ var d = this.project.getByRelPath( cg.name + ".desktop");
+ if (d == null) {
+ return "";
+ }
+ var path = d.relpath;
+ return @"
+install_data(
+ '$path',
+ install_dir : get_option('datadir') + '/applications/''
+)
+";
+
+}