From d483651abd78140f4aa2a394e064d0561d94e361 Mon Sep 17 00:00:00 2001 From: Konrad Beckmann Date: Fri, 15 Oct 2021 00:00:18 +0200 Subject: [PATCH] Make it possible to build with COMPRESS=0 --- Makefile.common | 4 +++- parse_roms.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile.common b/Makefile.common index 5b4e6d65..bc90ac62 100644 --- a/Makefile.common +++ b/Makefile.common @@ -44,7 +44,9 @@ endif # Compress supported ROMs by default. Set to 0 to disable. COMPRESS ?= lzma -ifdef COMPRESS +ifeq ($(COMPRESS),0) + COMPRESS_PARAM := +else COMPRESS_PARAM := --compress=$(COMPRESS) endif diff --git a/parse_roms.py b/parse_roms.py index 1baf54ed..0c174bf4 100644 --- a/parse_roms.py +++ b/parse_roms.py @@ -529,7 +529,7 @@ def contains_rom_by_name(rom, roms): roms_compressed = find_compressed_roms() roms_raw = [r for r in roms_raw if not contains_rom_by_name(r, roms_compressed)] - if roms_raw: + if roms_raw and compress != None: pbar = tqdm(roms_raw) if tqdm else roms_raw for r in pbar: if tqdm: @@ -744,7 +744,7 @@ def parse(self, args): "--compress", choices=compression_choices, type=str, - default="", + default=None, help="Compression method. Defaults to no compression.", ) parser.add_argument(