From 90cd4ff40e647e4150638e69f80ac587ceff1631 Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 21 Dec 2018 11:42:03 +0800 Subject: =?UTF-8?q?*=E4=BF=AE=E6=94=B9=E7=9B=AE=E5=BD=95=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/font.png | Bin 0 -> 7626 bytes data/icon.ico | Bin 0 -> 4286 bytes data/icon.png | Bin 0 -> 7344 bytes data/icon2.ico | Bin 0 -> 4286 bytes data/icon2.png | Bin 0 -> 6622 bytes data/icon3.ico | Bin 0 -> 4286 bytes data/icon3.png | Bin 0 -> 5580 bytes res/font.png | Bin 7626 -> 0 bytes res/icon.ico | Bin 4286 -> 0 bytes res/icon.png | Bin 7344 -> 0 bytes res/icon2.ico | Bin 4286 -> 0 bytes res/icon2.png | Bin 6622 -> 0 bytes res/icon3.ico | Bin 4286 -> 0 bytes res/icon3.png | Bin 5580 -> 0 bytes src/libjin-lua/resources/embed.py | 56 -------------------------------------- 15 files changed, 56 deletions(-) create mode 100644 data/font.png create mode 100644 data/icon.ico create mode 100644 data/icon.png create mode 100644 data/icon2.ico create mode 100644 data/icon2.png create mode 100644 data/icon3.ico create mode 100644 data/icon3.png delete mode 100644 res/font.png delete mode 100644 res/icon.ico delete mode 100644 res/icon.png delete mode 100644 res/icon2.ico delete mode 100644 res/icon2.png delete mode 100644 res/icon3.ico delete mode 100644 res/icon3.png delete mode 100644 src/libjin-lua/resources/embed.py diff --git a/data/font.png b/data/font.png new file mode 100644 index 0000000..15c98a5 Binary files /dev/null and b/data/font.png differ diff --git a/data/icon.ico b/data/icon.ico new file mode 100644 index 0000000..2b3fe21 Binary files /dev/null and b/data/icon.ico differ diff --git a/data/icon.png b/data/icon.png new file mode 100644 index 0000000..01e1ca6 Binary files /dev/null and b/data/icon.png differ diff --git a/data/icon2.ico b/data/icon2.ico new file mode 100644 index 0000000..f4eb980 Binary files /dev/null and b/data/icon2.ico differ diff --git a/data/icon2.png b/data/icon2.png new file mode 100644 index 0000000..1f8e0e3 Binary files /dev/null and b/data/icon2.png differ diff --git a/data/icon3.ico b/data/icon3.ico new file mode 100644 index 0000000..8fa9d30 Binary files /dev/null and b/data/icon3.ico differ diff --git a/data/icon3.png b/data/icon3.png new file mode 100644 index 0000000..8c9a054 Binary files /dev/null and b/data/icon3.png differ diff --git a/res/font.png b/res/font.png deleted file mode 100644 index 15c98a5..0000000 Binary files a/res/font.png and /dev/null differ diff --git a/res/icon.ico b/res/icon.ico deleted file mode 100644 index 2b3fe21..0000000 Binary files a/res/icon.ico and /dev/null differ diff --git a/res/icon.png b/res/icon.png deleted file mode 100644 index 01e1ca6..0000000 Binary files a/res/icon.png and /dev/null differ diff --git a/res/icon2.ico b/res/icon2.ico deleted file mode 100644 index f4eb980..0000000 Binary files a/res/icon2.ico and /dev/null differ diff --git a/res/icon2.png b/res/icon2.png deleted file mode 100644 index 1f8e0e3..0000000 Binary files a/res/icon2.png and /dev/null differ diff --git a/res/icon3.ico b/res/icon3.ico deleted file mode 100644 index 8fa9d30..0000000 Binary files a/res/icon3.ico and /dev/null differ diff --git a/res/icon3.png b/res/icon3.png deleted file mode 100644 index 8c9a054..0000000 Binary files a/res/icon3.png and /dev/null differ diff --git a/src/libjin-lua/resources/embed.py b/src/libjin-lua/resources/embed.py deleted file mode 100644 index 7eb825d..0000000 --- a/src/libjin-lua/resources/embed.py +++ /dev/null @@ -1,56 +0,0 @@ -import os, sys, random, re - -def fmt(fmt, dic): - for k in dic: - fmt = fmt.replace("{%s}" % k, str(dic[k])) - return fmt - - -def makeArray(data): - i = [0] - def fn(x): - x = str(ord(x)) + "," - if i[0] + len(x) > 78: - i[0] = len(x) - x = '\n' + x - else: - i[0] += len(x) - return x - return '{' + "".join(map(fn, data)).rstrip(",") + '}' - - -def safename(filename): - return re.sub("[^a-z0-9]", "_", os.path.basename(filename).lower()) - - -def process(filenames): - if type(filenames) is str: - filenames = [filenames] - - strings = [] - - for filename in filenames: - data = open(filename, "rb").read() - strings.append( - fmt("/* {filename} */\n" +\ - "static const char {name}[] = \n{array};", - { - "filename" : os.path.basename(filename), - "name" : safename(filename), - "array" : makeArray(data), - })) - - return "/* Automatically generated; do not edit */\n\n" +\ - "\n\n".join(strings) - - -def main(): - if len(sys.argv) < 2: - print "usage: embed FILENAMES" - sys.exit(1) - - print process(sys.argv[1:]) - - -if __name__ == "__main__": - main() \ No newline at end of file -- cgit v1.1-26-g67d0