| # a python script used to generate the "default-skin.h' header file |
| # from a given skin directory |
| # progname skin-directory-path > default-skin.h |
| import sys, os, string, re |
| /* automatically generated, do not touch */ |
| static const FileEntry _file_entries[] = |
| def process_files( basepath, files ): |
| fp = open(basepath + "/" + file, "rb") |
| data_name = "_data_" + string.replace(file,".","_") |
| entries.append( (file, data_name, len(data)) ) |
| print "static const unsigned char %s[%d] = {" % (data_name, data_len + data_add) |
| print "usage: progname skindirpath > default-skin.h" |
| process_files( skindir, os.listdir(skindir) ) |
| print " { \"%s\", %s, %d }," % (e[0], e[1], e[2]) |