shithub: choc

Download patch

ref: 2aa16d0ff38c02c96272c9af050a4d7e1715c3fb
parent: f13ccd913eb63dc85eb475c9c370d8cfebea1bbe
author: Simon Howard <[email protected]>
date: Fri Dec 15 19:58:12 EST 2006

Add icon for setup tool.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 777

--- a/Makefile.am
+++ b/Makefile.am
@@ -18,16 +18,22 @@
         codeblocks/chocolate-doom-res.rc       \
         codeblocks/textscreen.cbp
 
+DATA_FILES=                             \
+        data/chocolate-doom.ico         \
+        data/chocolate-doom.png         \
+        data/chocolate-setup.ico        \
+        data/chocolate-setup.png        \
+        data/convert-icon
+
 EXTRA_DIST=                             \
         $(AUX_DIST_GEN)                 \
         $(MSVC_FILES)                   \
         $(CODEBLOCKS_FILES)             \
+        $(DATA_FILES)                   \
         config.h                        \
         HACKING                         \
         TODO                            \
-        BUGS                            \
-        data/chocolate-doom.png         \
-        data/chocolate-doom.ico
+        BUGS
 
 MAINTAINERCLEANFILES =  $(AUX_DIST_GEN)
 
binary files /dev/null b/data/chocolate-setup.ico differ
binary files /dev/null b/data/chocolate-setup.png differ
--- /dev/null
+++ b/data/convert-icon
@@ -1,0 +1,74 @@
+#!/usr/bin/python
+#
+# $Id: convert-icon 704 2006-10-18 00:51:11Z fraggle $
+#
+# Copyright(C) 2005 Simon Howard
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+# Converts images into C structures to be inserted in programs
+#
+
+import sys
+import os
+import re
+
+try:
+        import Image
+except ImportError:
+        print "WARNING: Could not update %s.  Please install the Python Image library." % sys.argv[2]
+        sys.exit(0)
+
+
+def convert_image(filename, output_filename):
+
+    im = Image.open(filename).convert("RGB")
+
+    outfile = open(output_filename, "w")
+
+    size = im.size
+
+    struct_name = os.path.basename(filename)
+    struct_name = re.sub(re.compile("\\..*$"), "", struct_name)
+    struct_name = re.sub(re.compile("\W"), "_", struct_name)
+
+    outfile.write("static int %s_w = %i;\n" % (struct_name, size[0]))
+    outfile.write("static int %s_h = %i;\n" % (struct_name, size[1]))
+
+    outfile.write("\n")
+    outfile.write("static unsigned char %s_data[] = {\n" % (struct_name))
+
+    elements_on_line = 0
+
+    outfile.write("    ")
+
+    for y in range(size[1]):
+        for x in range(size[0]):
+            val = im.getpixel((x, y))
+            outfile.write("0x%02x,0x%02x,0x%02x,  " % val)
+            elements_on_line += 1
+
+            if elements_on_line >= 4:
+                elements_on_line = 0
+                outfile.write("\n")
+                outfile.write("    ")
+
+    outfile.write("\n")
+    outfile.write("};\n")
+
+convert_image(sys.argv[1], sys.argv[2])
+
+
--- a/setup/Makefile.am
+++ b/setup/Makefile.am
@@ -6,7 +6,7 @@
 games_PROGRAMS = chocolate-setup
 
 chocolate_setup_LDADD = @LDFLAGS@ @SDL_LIBS@ ../textscreen/libtextscreen.a
-chocolate_setup_SOURCES =                       \
+SOURCE_FILES =                                  \
     compatibility.c   compatibility.h           \
     configfile.c      configfile.h              \
     display.c         display.h                 \
@@ -19,4 +19,21 @@
     execute.c         execute.h                 \
     txt_keyinput.c    txt_keyinput.h            \
     txt_mouseinput.c  txt_mouseinput.h
+
+EXTRA_DIST=                                     \
+    chocolate_setup_icon.c
+
+if HAVE_WINDRES
+chocolate_setup_SOURCES=$(SOURCE_FILES) chocolate-setup-res.rc
+else
+chocolate_setup_SOURCES=$(SOURCE_FILES)
+endif
+
+.rc.o:
+	$(WINDRES) $^ -o $@
+%.o : %.rc
+	$(WINDRES) $^ -o $@
+
+chocolate_setup_icon.c : ../data/chocolate-setup.png
+	../data/convert-icon $^ $@
 
--- /dev/null
+++ b/setup/chocolate-setup-res.rc.in
@@ -1,0 +1,22 @@
+1 ICON "..\\data\\chocolate-setup.ico"
+
+1 VERSIONINFO
+PRODUCTVERSION @WINDOWS_RC_VERSION@
+FILEVERSION @WINDOWS_RC_VERSION@
+FILETYPE 1
+{
+ BLOCK "StringFileInfo"
+ {
+  BLOCK "040904E4"
+  {
+   VALUE "FileVersion", "@PACKAGE_VERSION@"
+   VALUE "FileDescription", "@PACKAGE_STRING@ Setup"
+   VALUE "InternalName", "@PACKAGE_TARNAME@"
+   VALUE "CompanyName", "@PACKAGE_BUGREPORT@"
+   VALUE "LegalCopyright", "GNU General Public License"
+   VALUE "ProductName", "@PACKAGE_NAME@ Setup"
+   VALUE "ProductVersion", "@PACKAGE_VERSION@"
+  }
+ }
+}
+
--- /dev/null
+++ b/setup/chocolate_setup_icon.c
@@ -1,0 +1,262 @@
+static int chocolate_setup_w = 32;
+static int chocolate_setup_h = 32;
+
+static unsigned char chocolate_setup_data[] = {
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x52,0x29,0x00,  0x52,0x29,0x00,  0x52,0x29,0x00,  0x52,0x29,0x00,  
+    0x52,0x29,0x00,  0x52,0x29,0x00,  0x52,0x29,0x00,  0x52,0x29,0x00,  
+    0x52,0x29,0x00,  0x52,0x29,0x00,  0x52,0x29,0x00,  0x52,0x29,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x52,0x29,0x00,  
+    0x52,0x29,0x00,  0x6b,0x31,0x00,  0x6b,0x31,0x00,  0x6b,0x31,0x00,  
+    0x6b,0x31,0x00,  0x52,0x29,0x00,  0x52,0x29,0x00,  0x6b,0x31,0x00,  
+    0x6b,0x31,0x00,  0x6b,0x31,0x00,  0x6b,0x31,0x00,  0x52,0x29,0x00,  
+    0x52,0x29,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x52,0x29,0x00,  
+    0x52,0x29,0x00,  0x6b,0x31,0x00,  0x94,0x52,0x00,  0xad,0x5a,0x00,  
+    0x6b,0x31,0x00,  0x52,0x29,0x00,  0x52,0x29,0x00,  0x6b,0x31,0x00,  
+    0x94,0x52,0x00,  0xad,0x5a,0x00,  0x6b,0x31,0x00,  0x52,0x29,0x00,  
+    0x52,0x29,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x52,0x29,0x00,  
+    0x52,0x29,0x00,  0x6b,0x31,0x00,  0x6b,0x31,0x00,  0x6b,0x31,0x00,  
+    0x6b,0x31,0x00,  0x52,0x29,0x00,  0x52,0x29,0x00,  0x6b,0x31,0x00,  
+    0x6b,0x31,0x00,  0x6b,0x31,0x00,  0x6b,0x31,0x00,  0x52,0x29,0x00,  
+    0x52,0x29,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x52,0x29,0x00,  
+    0x52,0x29,0x00,  0x52,0x29,0x00,  0x52,0x29,0x00,  0x52,0x29,0x00,  
+    0x52,0x29,0x00,  0x52,0x29,0x00,  0x52,0x29,0x00,  0x52,0x29,0x00,  
+    0x52,0x29,0x00,  0x52,0x29,0x00,  0x52,0x29,0x00,  0x52,0x29,0x00,  
+    0x52,0x29,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x52,0x29,0x00,  
+    0x52,0x29,0x00,  0x6b,0x31,0x00,  0x6b,0x31,0x00,  0x6b,0x31,0x00,  
+    0x6b,0x31,0x00,  0x52,0x29,0x00,  0x52,0x29,0x00,  0x6b,0x31,0x00,  
+    0x6b,0x31,0x00,  0x6b,0x31,0x00,  0x6b,0x31,0x00,  0x52,0x29,0x00,  
+    0x52,0x29,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x52,0x29,0x00,  
+    0x52,0x29,0x00,  0x6b,0x31,0x00,  0x94,0x52,0x00,  0xad,0x5a,0x00,  
+    0x6b,0x31,0x00,  0x52,0x29,0x00,  0x52,0x29,0x00,  0x6b,0x31,0x00,  
+    0x94,0x52,0x00,  0xad,0x5a,0x00,  0x6b,0x31,0x00,  0x52,0x29,0x00,  
+    0x52,0x29,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0xc6,0xc6,0xc6,  
+    0xb5,0xb5,0xb5,  0xc6,0xc6,0xc6,  0x6b,0x31,0x00,  0xc6,0xc6,0xc6,  
+    0xb5,0xb5,0xb5,  0x52,0x29,0x00,  0xc6,0xc6,0xc6,  0xb5,0xb5,0xb5,  
+    0x6b,0x31,0x00,  0x6b,0x31,0x00,  0xc6,0xc6,0xc6,  0xc6,0xc6,0xc6,  
+    0xb5,0xb5,0xb5,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0xc6,0xc6,0xc6,  0xb5,0xb5,0xb5,  
+    0xb5,0xb5,0xb5,  0xc6,0xc6,0xc6,  0xb5,0xb5,0xb5,  0xc6,0xc6,0xc6,  
+    0xb5,0xb5,0xb5,  0xb5,0xb5,0xb5,  0xc6,0xc6,0xc6,  0xb5,0xb5,0xb5,  
+    0xc6,0xc6,0xc6,  0xc6,0xc6,0xc6,  0xb5,0xb5,0xb5,  0xb5,0xb5,0xb5,  
+    0xc6,0xc6,0xc6,  0xb5,0xb5,0xb5,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x84,0x00,0x00,  0x84,0x00,0x00,  
+    0xc6,0x00,0x00,  0xc6,0x00,0x00,  0x84,0x00,0x00,  0xc6,0x00,0x00,  
+    0x84,0x00,0x00,  0x84,0x00,0x00,  0xc6,0x00,0x00,  0xc6,0x00,0x00,  
+    0x84,0x00,0x00,  0x84,0x00,0x00,  0x84,0x00,0x00,  0x84,0x00,0x00,  
+    0x84,0x00,0x00,  0x84,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x84,0x00,0x00,  0x42,0x00,0x00,  
+    0x42,0x00,0x00,  0x84,0x00,0x00,  0x84,0x00,0x00,  0x42,0x00,0x00,  
+    0x84,0x00,0x00,  0x42,0x00,0x00,  0x84,0x00,0x00,  0x42,0x00,0x00,  
+    0x42,0x00,0x00,  0x84,0x00,0x00,  0x84,0x00,0x00,  0x42,0x00,0x00,  
+    0x42,0x00,0x00,  0x84,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x84,0x00,0x00,  0x42,0x00,0x00,  
+    0x84,0x00,0x00,  0x42,0x00,0x00,  0x84,0x00,0x00,  0x42,0x00,0x00,  
+    0x84,0x00,0x00,  0x42,0x00,0x00,  0x52,0x29,0x00,  0x42,0x00,0x00,  
+    0x6b,0x31,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x84,0x00,0x00,  0x42,0x00,0x00,  
+    0x84,0x00,0x00,  0x84,0x00,0x00,  0x84,0x00,0x00,  0x42,0x00,0x00,  
+    0x42,0x00,0x00,  0x42,0x00,0x00,  0x84,0x00,0x00,  0x42,0x00,0x00,  
+    0x84,0x00,0x00,  0x00,0x00,0x00,  0xb5,0xb5,0xb5,  0x42,0x42,0x42,  
+    0xc6,0xc6,0xc6,  0xff,0xff,0xff,  0xb5,0xb5,0xb5,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x84,0x00,0x00,  0x42,0x00,0x00,  
+    0x84,0x00,0x00,  0x42,0x00,0x00,  0x84,0x00,0x00,  0x42,0x00,0x00,  
+    0x84,0x00,0x00,  0x42,0x00,0x00,  0xc6,0x00,0x00,  0x42,0x00,0x00,  
+    0xc6,0x00,0x00,  0x42,0x00,0x00,  0x00,0x00,0x00,  0xc6,0xc6,0xc6,  
+    0x42,0x42,0x42,  0x42,0x42,0x42,  0xc6,0xc6,0xc6,  0xc6,0xc6,0xc6,  
+    0xb5,0xb5,0xb5,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x84,0x00,0x00,  0x42,0x00,0x00,  
+    0x42,0x00,0x00,  0x84,0x00,0x00,  0x84,0x00,0x00,  0x42,0x00,0x00,  
+    0x84,0x00,0x00,  0x42,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0xff,0xff,0xff,  0xff,0xff,0xff,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0xc6,0xc6,0xc6,  0x42,0x42,0x42,  0xff,0xff,0xff,  
+    0xb5,0xb5,0xb5,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x84,0x00,0x00,  0x84,0x00,0x00,  
+    0x84,0x00,0x00,  0x84,0x00,0x00,  0x84,0x00,0x00,  0x84,0x00,0x00,  
+    0x84,0x00,0x00,  0xff,0xff,0xff,  0x00,0x00,0x00,  0xff,0xff,0xff,  
+    0xb5,0xb5,0xb5,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x84,0x00,0x00,  
+    0x84,0x00,0x00,  0x00,0x00,0x00,  0x42,0x42,0x42,  0xc6,0xc6,0xc6,  
+    0xc6,0xc6,0xc6,  0xb5,0xb5,0xb5,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x84,0x00,0x00,  
+    0x84,0x00,0x00,  0x84,0x00,0x00,  0x84,0x00,0x00,  0x84,0x00,0x00,  
+    0x84,0x00,0x00,  0x84,0x00,0x00,  0x00,0x00,0x00,  0xff,0xff,0xff,  
+    0xc6,0xc6,0xc6,  0xc6,0xc6,0xc6,  0xff,0xff,0xff,  0x00,0x00,0x00,  
+    0x42,0x42,0x42,  0x42,0x42,0x42,  0xff,0xff,0xff,  0xff,0xff,0xff,  
+    0xc6,0xc6,0xc6,  0xb5,0xb5,0xb5,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x84,0x00,0x00,  0x84,0x00,0x00,  0x84,0x00,0x00,  0x84,0x00,0x00,  
+    0x84,0x00,0x00,  0x84,0x00,0x00,  0x00,0x00,0x00,  0x42,0x42,0x42,  
+    0xff,0xff,0xff,  0xff,0xff,0xff,  0xc6,0xc6,0xc6,  0xff,0xff,0xff,  
+    0xc6,0xc6,0xc6,  0xff,0xff,0xff,  0xc6,0xc6,0xc6,  0xc6,0xc6,0xc6,  
+    0xff,0xff,0xff,  0xc6,0xc6,0xc6,  0xb5,0xb5,0xb5,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x42,0x42,0x42,  0xff,0xff,0xff,  
+    0x42,0x42,0x42,  0x42,0x42,0x42,  0xff,0xff,0xff,  0xff,0xff,0xff,  
+    0xc6,0xc6,0xc6,  0xff,0xff,0xff,  0xc6,0xc6,0xc6,  0xff,0xff,0xff,  
+    0xc6,0xc6,0xc6,  0xc6,0xc6,0xc6,  0xc6,0xc6,0xc6,  0xb5,0xb5,0xb5,  
+    0xb5,0xb5,0xb5,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0xc6,0xc6,0xc6,  
+    0xff,0xff,0xff,  0xff,0xff,0xff,  0x42,0x42,0x42,  0x42,0x42,0x42,  
+    0x42,0x42,0x42,  0x42,0x42,0x42,  0xb5,0xb5,0xb5,  0xff,0xff,0xff,  
+    0xff,0xff,0xff,  0xff,0xff,0xff,  0xc6,0xc6,0xc6,  0xc6,0xc6,0xc6,  
+    0xc6,0xc6,0xc6,  0xb5,0xb5,0xb5,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0xc6,0xc6,0xc6,  0xff,0xff,0xff,  0xc6,0xc6,0xc6,  
+    0xc6,0xc6,0xc6,  0xb5,0xb5,0xb5,  0x42,0x42,0x42,  0x42,0x42,0x42,  
+    0x42,0x42,0x42,  0xff,0xff,0xff,  0xff,0xff,0xff,  0xff,0xff,0xff,  
+    0xc6,0xc6,0xc6,  0xff,0xff,0xff,  0xff,0xff,0xff,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0xb5,0xb5,0xb5,  0xc6,0xc6,0xc6,  0xc6,0xc6,0xc6,  0xc6,0xc6,0xc6,  
+    0xb5,0xb5,0xb5,  0x42,0x42,0x42,  0x42,0x42,0x42,  0xff,0xff,0xff,  
+    0xff,0xff,0xff,  0xc6,0xc6,0xc6,  0xff,0xff,0xff,  0xff,0xff,0xff,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0xff,0xff,0xff,  0xc6,0xc6,0xc6,  0xb5,0xb5,0xb5,  0x42,0x42,0x42,  
+    0x42,0x42,0x42,  0xff,0xff,0xff,  0xc6,0xc6,0xc6,  0xc6,0xc6,0xc6,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0xff,0xff,0xff,  0xc6,0xc6,0xc6,  
+    0xb5,0xb5,0xb5,  0x42,0x42,0x42,  0x42,0x42,0x42,  0xff,0xff,0xff,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0xff,0xff,0xff,  0xc6,0xc6,0xc6,  0x42,0x42,0x42,  0x42,0x42,0x42,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  0x00,0x00,0x00,  
+    
+};
--- a/setup/mainmenu.c
+++ b/setup/mainmenu.c
@@ -28,6 +28,8 @@
 #include "configfile.h"
 #include "m_argv.h"
 
+#include "chocolate_setup_icon.c"
+
 #include "compatibility.h"
 #include "display.h"
 #include "keyboard.h"
@@ -140,6 +142,28 @@
     M_LoadDefaults();
 }
 
+//
+// Application icon
+//
+
+static void SetIcon(void)
+{
+    SDL_Surface *surface;
+
+    surface = SDL_CreateRGBSurfaceFrom(chocolate_setup_data,
+                                       chocolate_setup_w,
+                                       chocolate_setup_h,
+                                       24,
+                                       chocolate_setup_w * 3,
+                                       0xff << 0,
+                                       0xff << 8,
+                                       0xff << 16,
+                                       0);
+
+    SDL_WM_SetIcon(surface, NULL);
+    SDL_FreeSurface(surface);
+}
+
 // 
 // Initialise and run the textscreen GUI.
 //
@@ -153,6 +177,7 @@
     }
 
     TXT_SetDesktopTitle(PACKAGE_NAME " Setup ver " PACKAGE_VERSION);
+    SetIcon();
     
     MainMenu();
 
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -140,7 +140,6 @@
 chocolate_doom_LDADD = ../textscreen/libtextscreen.a @LDFLAGS@ @SDL_LIBS@ @SDLMIXER_LIBS@ @SDLNET_LIBS@ 
 
 EXTRA_DIST =                               \
-        convert-icon                       \
         chocolate_doom_icon.c              \
         chocolate-doom-screensaver.desktop
 
@@ -150,5 +149,5 @@
 	$(WINDRES) $^ -o $@
 
 chocolate_doom_icon.c : ../data/chocolate-doom.png
-	./convert-icon $^ $@
+	../data/convert-icon $^ $@
 
--- a/src/convert-icon
+++ /dev/null
@@ -1,74 +1,0 @@
-#!/usr/bin/python
-#
-# $Id: convert-icon 704 2006-10-18 00:51:11Z fraggle $
-#
-# Copyright(C) 2005 Simon Howard
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-#
-# Converts images into C structures to be inserted in programs
-#
-
-import sys
-import os
-import re
-
-try:
-        import Image
-except ImportError:
-        print "WARNING: Could not update %s.  Please install the Python Image library." % sys.argv[2]
-        sys.exit(0)
-
-
-def convert_image(filename, output_filename):
-
-    im = Image.open(filename).convert("RGB")
-
-    outfile = open(output_filename, "w")
-
-    size = im.size
-
-    struct_name = os.path.basename(filename)
-    struct_name = re.sub(re.compile("\\..*$"), "", struct_name)
-    struct_name = re.sub(re.compile("\W"), "_", struct_name)
-
-    outfile.write("static int %s_w = %i;\n" % (struct_name, size[0]))
-    outfile.write("static int %s_h = %i;\n" % (struct_name, size[1]))
-
-    outfile.write("\n")
-    outfile.write("static unsigned char %s_data[] = {\n" % (struct_name))
-
-    elements_on_line = 0
-
-    outfile.write("    ")
-
-    for y in range(size[1]):
-        for x in range(size[0]):
-            val = im.getpixel((x, y))
-            outfile.write("0x%02x,0x%02x,0x%02x,  " % val)
-            elements_on_line += 1
-
-            if elements_on_line >= 4:
-                elements_on_line = 0
-                outfile.write("\n")
-                outfile.write("    ")
-
-    outfile.write("\n")
-    outfile.write("};\n")
-
-convert_image(sys.argv[1], sys.argv[2])
-
-