From 369c68dfb742a877aa3bff8152e5de1dcc8b445d Mon Sep 17 00:00:00 2001 From: xianjimli Date: Wed, 20 Mar 2019 09:35:37 +0800 Subject: [PATCH] improve assets build script to support any file extensions in data folder. --- scripts/update_res_common.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/update_res_common.py b/scripts/update_res_common.py index d639c134f..70581fd3d 100755 --- a/scripts/update_res_common.py +++ b/scripts/update_res_common.py @@ -140,10 +140,11 @@ def gen_res_all_ui(): xml_to_ui_bin(raw, bin) def gen_res_all_data(): - for f in glob.glob(joinPath(INPUT_DIR, 'data/*.dat')): + for f in glob.glob(joinPath(INPUT_DIR, 'data/*.*')): inc=copy.copy(f); raw=copy.copy(f); - inc=inc.replace('.dat', '.data') + _, extname = os.path.splitext(inc) + inc=inc.replace(extname, '.data') inc=inc.replace(INPUT_DIR, OUTPUT_DIR) resgen(raw, inc)