diff --git a/aegisub/autogen.sh b/aegisub/autogen.sh index d38f0eb01..fba91be7f 100755 --- a/aegisub/autogen.sh +++ b/aegisub/autogen.sh @@ -182,25 +182,6 @@ else DIE=1 fi - -if test -z "$BIN_CONVERT"; then - BIN_CONVERT=`which convert` -fi - -$ECHO_N "checking for ImageMagick 'convert' utility ... " -if test -x "$BIN_CONVERT" && $BIN_CONVERT --version |grep -c ImageMagick > /dev/null; then - echo $BIN_CONVERT -else - echo "not found" - echo - echo " You must have 'convert' installed from the" - echo " ImageMagick project. Please set BIN_CONVERT or" - echo " Add 'convert' to your PATH" - echo - DIE=1 -fi - - if test -z "$BIN_AWK"; then BIN_AWK=`which awk` fi @@ -279,24 +260,6 @@ if test -z "$ACLOCAL_FLAGS"; then fi fi - - -echo "--- Converting BMP resource files -> XPM ---" -# BMP -> XPM via src/res.rc -cat ${srcdir}/src/res.rc | ${BIN_AWK} -f ${srcdir}/scripts/unix-gen-xpm.awk BIN_CONVERT="$BIN_CONVERT" > ${srcdir}/src/bitmaps/Makefile.bitmaps -cd ${srcdir}/src/bitmaps -make -f Makefile.bitmaps -cd ${srcdir} - -$BIN_AWK '/BITMAP/ { image[count] = $1; ++count} END { printf("EXTRA_DIST="); for (v in image) printf(" \\\n %s_xpm.xpm", image[v])}' \ - ${srcdir}/src/res.rc \ - > ${srcdir}/src/bitmaps/Makefile.am - -echo "--- Generating libresrc/resrc.cpp, libresrc/libresrc.h from res.rc ---" -$BIN_AWK -f scripts/unix-gen-res.awk ${srcdir}/src/res.rc \ - RESRC_CPP="${srcdir}/src/libresrc/resrc.cpp" \ - RESRC_H="${srcdir}/src/libresrc/libresrc.h" - rm -rf autom4te.cache echo "--- $ACLOCAL ---" diff --git a/aegisub/scripts/unix-gen-res.awk b/aegisub/scripts/unix-gen-res.awk deleted file mode 100644 index 13af2dc0b..000000000 --- a/aegisub/scripts/unix-gen-res.awk +++ /dev/null @@ -1,22 +0,0 @@ -# $Id$ - -! /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 - } - print("#endif /* _RES_H */") >> RESRC_H - -} diff --git a/aegisub/scripts/unix-gen-xpm.awk b/aegisub/scripts/unix-gen-xpm.awk deleted file mode 100644 index 88f67e801..000000000 --- a/aegisub/scripts/unix-gen-xpm.awk +++ /dev/null @@ -1,24 +0,0 @@ -/BITMAP/ { - gsub(/\"bitmaps\//, "", $3) - gsub(/\"/, "", $3) - image[$1] = $3 -} - -END { - printf(" \ -all: bmp2xpm \n \ -.PHONY: all bmp2xpm \n \ -CONVERT ?= %s \n \ -", BIN_CONVERT) - -# Yes, the 'sed' hack is annoying, if anyone wants to know why it's nessicary -# I direct them to coders/xpm.c:734 in ImageMagick 6.5.1 - for (v in image) { - printf("%s_xpm.xpm: %s\n", v, image[v]) - printf(" $(CONVERT) -transparent \"#c0c0c0\" %s xpm:- | sed \"2 s/^static char \\*xpm__\\[\\] =/const char \\*"v"_xpm\\[\\] =/\" > %s_xpm.xpm\n\n", image[v], v) - } - - printf("bmp2xpm:") - for (v in image) - printf(" %s_xpm.xpm", v) -} diff --git a/aegisub/src/bitmaps/Makefile.am b/aegisub/src/bitmaps/Makefile.am new file mode 100644 index 000000000..5ec331fa6 --- /dev/null +++ b/aegisub/src/bitmaps/Makefile.am @@ -0,0 +1,2 @@ +EXTRA_DIST= \ + *.xpm