improve assets build script to support any file extensions in data folder.

This commit is contained in:
xianjimli 2019-03-20 09:35:37 +08:00
parent 9cf5ec3592
commit 369c68dfb7

View File

@ -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)