From bd78a5c60ea6dc963f5f7cc68531aaeb9dccc21a Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Sat, 24 Jan 2009 15:58:38 +0000 Subject: [PATCH] Instead of generating wxicon_xpm.xpm from icon.ico (which is very low-res) supply a 48x48 xpm to be included as the application icon. There's probably a better way to do this, like figuring out what the typical application icon size is and supplying different sizes. Originally committed to SVN as r2702. --- aegisub/libresrc/Makefile.am | 4 +- aegisub/libresrc/wxicon_xpm.xpm | 299 ++++++++++++++++++++++++++++++++ autogen.sh | 2 +- scripts/unix-gen-res.awk | 4 +- scripts/unix-gen-xpm.awk | 4 +- 5 files changed, 307 insertions(+), 6 deletions(-) create mode 100644 aegisub/libresrc/wxicon_xpm.xpm diff --git a/aegisub/libresrc/Makefile.am b/aegisub/libresrc/Makefile.am index 5c3fe498e..91412a643 100644 --- a/aegisub/libresrc/Makefile.am +++ b/aegisub/libresrc/Makefile.am @@ -2,4 +2,6 @@ noinst_LIBRARIES = libresrc.a nodist_libresrc_a_SOURCES = resrc.cpp noinst_HEADERS = libresrc.h -EXTRA_DIST = resrc.cpp +EXTRA_DIST = \ + resrc.cpp \ + wxicon_xpm.xpm diff --git a/aegisub/libresrc/wxicon_xpm.xpm b/aegisub/libresrc/wxicon_xpm.xpm new file mode 100644 index 000000000..b8f22d8b2 --- /dev/null +++ b/aegisub/libresrc/wxicon_xpm.xpm @@ -0,0 +1,299 @@ +/* XPM */ +static char *wxicon_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 245 2", +" c #020101", +". c #090202", +"X c #03050B", +"o c #0B090B", +"O c #140303", +"+ c #1A0404", +"@ c #110C0C", +"# c #180909", +"$ c #000512", +"% c #070910", +"& c #0C0E14", +"* c #060B1B", +"= c #080C1A", +"- c #160B17", +"; c gray7", +": c #1A1616", +"> c #1C1B1B", +", c #240101", +"< c #2C0202", +"1 c #240B0B", +"2 c #2D0C0C", +"3 c #330202", +"4 c #3B0303", +"5 c #340808", +"6 c #240F11", +"7 c #2C1111", +"8 c #231D1D", +"9 c #361313", +"0 c #3E1515", +"q c #3B1B1B", +"w c #010924", +"e c #080E21", +"r c #0C1329", +"t c #050F30", +"y c #020F3B", +"u c #071031", +"i c #07143D", +"p c #381521", +"a c #242323", +"s c #282727", +"d c #2B2B2B", +"f c #353434", +"g c #393434", +"h c #3C3C3C", +"j c #420101", +"k c #4D0202", +"l c #440D0D", +"z c #4A0B0B", +"x c #530101", +"c c #580000", +"v c #550C0C", +"b c #401010", +"n c #4C1616", +"m c #401B1B", +"M c #4B1C1C", +"N c #541515", +"B c #5A1616", +"V c #5A1B1B", +"C c #670606", +"Z c #6C0000", +"A c #650D0D", +"S c #6F0C0C", +"D c #740000", +"F c #7B0000", +"G c #710E0E", +"H c #7A0C0C", +"J c #651111", +"K c #611C1C", +"L c #6A1B1B", +"P c #701616", +"I c #7C1111", +"U c #731C1C", +"Y c #7D1E1E", +"T c #492626", +"R c #542121", +"E c #5E2323", +"W c #582C2C", +"Q c #4B3E3E", +"! c #5B3C3C", +"~ c #6C2323", +"^ c #652828", +"/ c #6C2D2D", +"( c #742424", +") c #7F2727", +"_ c #7B2328", +"` c #702A2A", +"' c #7D2F2F", +"] c #673434", +"[ c #6D3636", +"{ c #683A3A", +"} c #703A3A", +"| c #783939", +" . c #091642", +".. c #021656", +"X. c #03175A", +"o. c #051A5E", +"O. c #091D5E", +"+. c #142046", +"@. c #3B3F49", +"#. c #031C6B", +"$. c #031E75", +"%. c #0D2262", +"&. c #03207C", +"*. c #0C2679", +"=. c #403F40", +"-. c #314177", +";. c #3A4A7F", +":. c #434343", +">. c #484646", +",. c #4C4B4B", +"<. c #514F4F", +"1. c #5B4F4F", +"2. c #525252", +"3. c gray35", +"4. c #4A5065", +"5. c #5C5F69", +"6. c #636363", +"7. c #6B6B6B", +"8. c #717171", +"9. c #7A7A7A", +"0. c #830404", +"q. c #8C0202", +"w. c #810A0A", +"e. c #890909", +"r. c #930101", +"t. c #9F0000", +"y. c #910D0D", +"u. c #891010", +"i. c #841A1A", +"p. c #8C1D1D", +"a. c #961313", +"s. c #931B1B", +"d. c #A20404", +"f. c #A60909", +"g. c #AA0D0D", +"h. c #A61111", +"j. c #AD1212", +"k. c #A41B1B", +"l. c #AD1B1B", +"z. c #B11616", +"x. c #B61B1B", +"c. c #B91E1E", +"v. c #872222", +"b. c #8D2525", +"n. c #962323", +"m. c #992626", +"M. c #942C2C", +"N. c #9B2B2B", +"B. c #8D3535", +"V. c #953434", +"C. c #9C3636", +"Z. c #973939", +"A. c #A22424", +"S. c #A22B2B", +"D. c #AE2C2C", +"F. c #B42424", +"G. c #BD2323", +"H. c #B42929", +"J. c #BB2C2C", +"K. c #A63636", +"L. c #AD3434", +"P. c #A73C3C", +"I. c #B33131", +"U. c #BC3232", +"Y. c #B53D3D", +"T. c #BB3C3C", +"R. c #C02727", +"E. c #C42B2B", +"W. c #C82F2F", +"Q. c #C43434", +"!. c #CB3333", +"~. c #C63B3B", +"^. c #CE3939", +"/. c #D33D3D", +"(. c #BB4646", +"). c #C24444", +"_. c #CB4242", +"`. c #D64141", +"'. c #DA4545", +"]. c #D44E4E", +"[. c #DE4949", +"{. c #D45151", +"}. c #D95050", +"|. c #E14D4D", +" X c #E55252", +".X c #E95656", +"XX c #EC5959", +"oX c #032283", +"OX c #082584", +"+X c #0B2C93", +"@X c #04299D", +"#X c #1D3A95", +"$X c #11329B", +"%X c #283E84", +"&X c #223B8F", +"*X c #052AA3", +"=X c #082DA5", +"-X c #052BAA", +";X c #0D32A9", +":X c #1437A9", +">X c #052EB3", +",X c #052FB8", +" @.%.*.+Xu . O.*.%.+.=.> : q Y F.G.c.c.x.x.x.z.G AXAXAX", +"AXAX. 0 |.[.[.'.T.M ; a 7.zX0X=XtX&. X -X*XOXhXjX7.f > 8 K k.x.x.z.z.z.j., AXAX", +"AXAX ).[.[._.^ : a 7.bXNXZX:X1XyXw #.>X@XeXBXMXbXsX2.s a R s.z.z.j.j.y. AXAX", +"AX. ( _._.' 8 > 6.bXNXBXCXVX-X1XuXX ..,X*XqXBXNXMXmXbXjX6.f d T i.j.g.g.k . AX", +"AX . > > ,.lXnXmXMXNXBXBX-X1XiX$ X.,X*XwXNXMXmXnXbXxXzXjX7.h d d ; AX", +"AXAXAXAXa a 6.zXbXnXmXMXMXNX5X1XuXy oX,X@XpXmXmXnXbXxXzXlXjXjXdX8.f f f AXAXAX", +"AXAXAXAXAXs d h sXbXbXnXmXmXrX,XyX-X w tX>X@XvXnXbXxXxXzXlXjXfXsX7.,.h h h AXAXAX", +"AX . . . . @ s f 3.jXbXbXnXcX>XtXiX$. $ >X1X-X3XbXxXxXzXlXjXfX9.3.:.:.f > . AX", +"AX n N.N.N.N.M./ g h 8.lXxXxX9X,XyXiX@Xy $ X.1XtX>X@XgXzXlXlXjXaX6.,.>.Q ^ I 0.0.0.0.j AX", +"AXAX. Q./.^.^.^.!.U.[ h >.8.fXkX4X,XtXuXiXiXyXiXyXtX>X*X7XjXjXaX7.<.,.,.] p.f.f.d.d.d.d.r.. AXAX", +"AXAX. N ^.^.!.!.!.!.W.L.{ :.>.7.aX6X;X ${srcdir}/aegisub/bitmaps/Makefile.am diff --git a/scripts/unix-gen-res.awk b/scripts/unix-gen-res.awk index ac1653d01..13af2dc0b 100644 --- a/scripts/unix-gen-res.awk +++ b/scripts/unix-gen-res.awk @@ -1,17 +1,19 @@ # $Id$ -! /CURSOR|^#|^$|^\// { +! /CURSOR|ICON|^#|^$|^\// { image[$1] = $1 } END { print("#define static") > RESRC_CPP + printf("#include \"wxicon_xpm.xpm\"\n") >> RESRC_CPP for (v in image) { printf("#include \"../bitmaps/%s_xpm.xpm\"\n", image[v]) >> RESRC_CPP } print("#ifndef _RES_H") > RESRC_H print("#define _RES_H") >> RESRC_H + printf("extern char *wxicon_xpm[];\n") >> RESRC_H for (v in image) { printf("extern char *%s_xpm[];\n", image[v]) >> RESRC_H } diff --git a/scripts/unix-gen-xpm.awk b/scripts/unix-gen-xpm.awk index 21356235d..6cb6ad865 100644 --- a/scripts/unix-gen-xpm.awk +++ b/scripts/unix-gen-xpm.awk @@ -6,13 +6,11 @@ END { printf(" \ -all: bmp2xpm wxicon_xpm.xpm \n \ +all: bmp2xpm \n \ .PHONY: all bmp2xpm \n \ CONVERT ?= %s \n \ ", BIN_CONVERT) - printf("wxicon_xpm.xpm: icon.ico\n $(CONVERT) 'icon.ico[2]' wxicon_xpm.xpm\n"); - for (v in image) { printf("%s_xpm.xpm: %s\n", v, image[v]) printf(" $(CONVERT) -transparent \"#c0c0c0\" %s %s_xpm.xpm\n\n", image[v], v)