Skip to content

Commit

Permalink
🩹 Fix CONFIGURATION_EMBEDDING
Browse files Browse the repository at this point in the history
Followup to b7fd046
  • Loading branch information
thinkyhead committed Aug 6, 2022
1 parent 24a7ed4 commit becef39
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions buildroot/share/PlatformIO/scripts/signature.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def get_file_sha256sum(filepath):
# Compress a JSON file into a zip file
#
import zipfile
def compress_file(filepath, outputbase):
with zipfile.ZipFile(outputbase + '.zip', 'w', compression=zipfile.ZIP_BZIP2, compresslevel=9) as zipf:
def compress_file(filepath, outpath):
with zipfile.ZipFile(outpath, 'w', compression=zipfile.ZIP_BZIP2, compresslevel=9) as zipf:
zipf.write(filepath, compress_type=zipfile.ZIP_BZIP2, compresslevel=9)

#
Expand All @@ -63,7 +63,7 @@ def compute_build_signature(env):
hashes += get_file_sha256sum(header)[0:10]

marlin_json = build_path / 'marlin_config.json'
marlin_zip = build_path / 'mc'
marlin_zip = build_path / 'mc.zip'

# Read existing config file
try:
Expand Down Expand Up @@ -260,7 +260,7 @@ def tryint(key):
# Generate a C source file for storing this array
with open('Marlin/src/mczip.h','wb') as result_file:
result_file.write(
b'#ifndef NO_CONFIGURATION_EMBEDDING_WARNING\n'
b'#ifndef NO_CONFIGURATION_EMBEDDING_WARNING\n'
+ b' #warning "Generated file \'mc.zip\' is embedded (Define NO_CONFIGURATION_EMBEDDING_WARNING to suppress this warning.)"\n'
+ b'#endif\n'
+ b'const unsigned char mc_zip[] PROGMEM = {\n '
Expand Down

0 comments on commit becef39

Please sign in to comment.