Index: src/icon.cpp
===================================================================
--- src/icon.cpp (revision 813a0b5ad68d6d8d9fb3732ec44ef218bbb4a061)
+++ src/icon.cpp (revision 5e4f71dcc0a6c1d008fd8d95df86fbd05299e55b)
@@ -1,3 +1,3 @@
-/* GdkPixbuf RGBA C-Source image dump */
+/* IconZZzzzzzzzzz */
 
 #include <glib/gtypes.h>
@@ -6,4 +6,44 @@
 #include "icon.hpp"
 
+#ifdef _WIN32
+# include <windows.h>
+#endif
+
+namespace
+{
+	Glib::RefPtr<Gdk::Pixbuf> load_pixbuf(const char* dir, const char* file)
+	{
+		try
+		{
+			return Gdk::Pixbuf::create_from_file(
+				Glib::build_filename(dir, file)
+			);
+		}
+		catch(Glib::FileError& e)
+		{
+			/* Not installed */
+#ifdef _WIN32
+			TCHAR path[MAX_PATH];
+			if(!GetModuleFileName(NULL, path, MAX_PATH))
+				throw e;
+
+			return Gdk::Pixbuf::create_from_file(
+				Glib::build_filename(
+					Glib::build_filename(
+						Glib::path_get_dirname(path),
+						"pixmaps"
+					),
+					file
+				)
+			);
+#else
+			return Gdk::Pixbuf::create_from_file(
+				Glib::build_filename("pixmaps", file)
+			);
+#endif
+		}
+	}
+}
+
 Gtk::StockID Gobby::IconManager::STOCK_USERLIST("gobby-userlist");
 Gtk::StockID Gobby::IconManager::STOCK_DOCLIST("gobby-doclist");
@@ -11,8 +51,8 @@
 
 Gobby::IconManager::IconManager():
-	gobby(Gdk::Pixbuf::create_from_file(APPICON_DIR"/gobby.png") ),
-	userlist(Gdk::Pixbuf::create_from_file(PIXMAPS_DIR"/userlist.png") ),
-	doclist(Gdk::Pixbuf::create_from_file(PIXMAPS_DIR"/doclist.png") ),
-	chat(Gdk::Pixbuf::create_from_file(PIXMAPS_DIR"/chat.png") ),
+	gobby(load_pixbuf(APPICON_DIR, "gobby.png") ),
+	userlist(load_pixbuf(PIXMAPS_DIR, "userlist.png") ),
+	doclist(load_pixbuf(PIXMAPS_DIR, "doclist.png") ),
+	chat(load_pixbuf(PIXMAPS_DIR, "chat.png") ),
 	m_is_userlist(userlist),
 	m_is_doclist(doclist),
