diff --git a/Makefile b/Makefile index 5c8c69e1..2e2fc125 100644 --- a/Makefile +++ b/Makefile @@ -63,6 +63,7 @@ AUDIO_API ?= SDL2 # Controller backends (can have multiple, space separated): SDL2 CONTROLLER_API ?= SDL2 +LEGACY_RES ?= 0 BASEDIR ?= res # Automatic settings for PC port(s) @@ -690,7 +691,7 @@ $(BASEPACK_LST): $(EXE) # prepares the resource ZIP with base data $(BASEPACK_PATH): $(BASEPACK_LST) - @$(PYTHON) $(TOOLS_DIR)/mkzip.py $(BASEPACK_LST) $(BASEPACK_PATH) + @$(PYTHON) $(TOOLS_DIR)/mkzip.py $(BASEPACK_LST) $(BASEPACK_PATH) $(LEGACY_RES) clean: $(RM) -r $(BUILD_DIR_BASE) diff --git a/tools/mkzip.py b/tools/mkzip.py index 3c1e54c5..7359bc8e 100644 --- a/tools/mkzip.py +++ b/tools/mkzip.py @@ -37,22 +37,9 @@ with open(sys.argv[1], 'r') as f: else: print("Skipping: " + path + " - MD5: "+md5(fname)) else: - regenZip = False - zipPath = os.path.join(sys.argv[2],"legacy.zip") + zipPath = os.path.join(sys.argv[2], "awesome-legacy.zip") print("Using Legacy System") - if os.path.exists(zipPath): - with zipfile.ZipFile(zipPath, 'w', allowZip64=False) as zipf: - for(zinfo) in zipf.infolist(): - with zipf.open(zinfo) as tmp: - print("Pre Loaded: "+md5(tmp.read())) - if md5(fname) != md5(tmp.read()): - print("Found a change on the zip, regenerating") - regenZip = True - break - else: - regenZip = True - if regenZip: - with zipfile.ZipFile(zipPath, 'w', allowZip64=False) as zipf: - for (fname, aname) in lst: - zipf.write(fname, arcname=aname) - print("Copying: " + aname) \ No newline at end of file + with zipfile.ZipFile(zipPath, 'w', allowZip64=False) as zipf: + for (fname, aname) in lst: + zipf.write(fname, arcname=aname) + print("Legacy - Copying: " + aname) \ No newline at end of file