mirror of https://github.com/sm64pc/sm64pc.git
Removed base.zip to use only the res folder
This commit is contained in:
parent
de25dfc233
commit
78d5c1b7b6
3
Makefile
3
Makefile
|
@ -68,7 +68,6 @@ CONTROLLER_API ?= SDL2
|
||||||
# Misc settings for EXTERNAL_DATA
|
# Misc settings for EXTERNAL_DATA
|
||||||
|
|
||||||
BASEDIR ?= res
|
BASEDIR ?= res
|
||||||
BASEPACK ?= base.zip
|
|
||||||
|
|
||||||
# Automatic settings for PC port(s)
|
# Automatic settings for PC port(s)
|
||||||
|
|
||||||
|
@ -671,7 +670,7 @@ endif
|
||||||
|
|
||||||
ifeq ($(EXTERNAL_DATA),1)
|
ifeq ($(EXTERNAL_DATA),1)
|
||||||
|
|
||||||
BASEPACK_PATH := $(BUILD_DIR)/$(BASEDIR)/$(BASEPACK)
|
BASEPACK_PATH := $(BUILD_DIR)/$(BASEDIR)/
|
||||||
BASEPACK_LST := $(BUILD_DIR)/basepack.lst
|
BASEPACK_LST := $(BUILD_DIR)/basepack.lst
|
||||||
|
|
||||||
# depend on resources as well
|
# depend on resources as well
|
||||||
|
|
|
@ -2,10 +2,12 @@
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
import os.path
|
||||||
import zipfile
|
import zipfile
|
||||||
|
from shutil import copyfile
|
||||||
|
|
||||||
if len(sys.argv) < 3:
|
if len(sys.argv) < 3:
|
||||||
print('usage: mkzip <lstfile> <zipfile>')
|
print('usage: mkzip <lstfile> <dstpath>')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
lst = []
|
lst = []
|
||||||
|
@ -17,6 +19,11 @@ with open(sys.argv[1], 'r') as f:
|
||||||
tok = line.split()
|
tok = line.split()
|
||||||
lst.append((tok[0], tok[1]))
|
lst.append((tok[0], tok[1]))
|
||||||
|
|
||||||
with zipfile.ZipFile(sys.argv[2], 'w', allowZip64=False) as zipf:
|
|
||||||
for (fname, aname) in lst:
|
for (fname, aname) in lst:
|
||||||
zipf.write(fname, arcname=aname)
|
path = os.path.join(sys.argv[2], aname)
|
||||||
|
if not os.path.exists(path):
|
||||||
|
os.makedirs(os.path.dirname(path), exist_ok=True)
|
||||||
|
copyfile(fname, path)
|
||||||
|
print("Copying: " + path)
|
||||||
|
else:
|
||||||
|
print("Skipping: " + path)
|
||||||
|
|
Loading…
Reference in New Issue