Skip to content

Commit d856cb3

Browse files
committed
Handle SVG files
1 parent 455e26e commit d856cb3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/extra_script.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def data_to_header(env, target, source):
5555
for source_file in source:
5656
#print("Reading {}".format(source_file))
5757
file = source_file.get_abspath()
58-
if file.endswith(".css") or file.endswith(".js") or file.endswith(".htm") or file.endswith(".html"):
58+
if file.endswith(".css") or file.endswith(".js") or file.endswith(".htm") or file.endswith(".html") or file.endswith(".svg"):
5959
output += text_to_header(file)
6060
else:
6161
output += binary_to_header(file)
@@ -94,6 +94,8 @@ def make_static(env, target, source):
9494
filetype = "JPEG"
9595
elif out_file.endswith(".png"):
9696
filetype = "PNG"
97+
elif out_file.endswith(".svg"):
98+
filetype = "SVG"
9799

98100
c_name = get_c_name(out_file)
99101
output += " { \"/"+out_file+"\", CONTENT_"+c_name+", sizeof(CONTENT_"+c_name+") - 1, _CONTENT_TYPE_"+filetype+" },\n"

0 commit comments

Comments
 (0)