瀏覽代碼

🩹 Fix CONFIGURATION_EMBEDDING

Followup to b7fd046d59
Scott Lahteine 2 年之前
父節點
當前提交
becef39c19
共有 1 個檔案被更改,包括 4 行新增4 行删除
  1. 4
    4
      buildroot/share/PlatformIO/scripts/signature.py

+ 4
- 4
buildroot/share/PlatformIO/scripts/signature.py 查看文件

39
 # Compress a JSON file into a zip file
39
 # Compress a JSON file into a zip file
40
 #
40
 #
41
 import zipfile
41
 import zipfile
42
-def compress_file(filepath, outputbase):
43
-	with zipfile.ZipFile(outputbase + '.zip', 'w', compression=zipfile.ZIP_BZIP2, compresslevel=9) as zipf:
42
+def compress_file(filepath, outpath):
43
+	with zipfile.ZipFile(outpath, 'w', compression=zipfile.ZIP_BZIP2, compresslevel=9) as zipf:
44
 		zipf.write(filepath, compress_type=zipfile.ZIP_BZIP2, compresslevel=9)
44
 		zipf.write(filepath, compress_type=zipfile.ZIP_BZIP2, compresslevel=9)
45
 
45
 
46
 #
46
 #
63
 		hashes += get_file_sha256sum(header)[0:10]
63
 		hashes += get_file_sha256sum(header)[0:10]
64
 
64
 
65
 	marlin_json = build_path / 'marlin_config.json'
65
 	marlin_json = build_path / 'marlin_config.json'
66
-	marlin_zip = build_path / 'mc'
66
+	marlin_zip = build_path / 'mc.zip'
67
 
67
 
68
 	# Read existing config file
68
 	# Read existing config file
69
 	try:
69
 	try:
260
 	# Generate a C source file for storing this array
260
 	# Generate a C source file for storing this array
261
 	with open('Marlin/src/mczip.h','wb') as result_file:
261
 	with open('Marlin/src/mczip.h','wb') as result_file:
262
 		result_file.write(
262
 		result_file.write(
263
-			  b'#ifndef NO_CONFIGURATION_EMBEDDING_WARNING\n'
263
+				b'#ifndef NO_CONFIGURATION_EMBEDDING_WARNING\n'
264
 			+ b'  #warning "Generated file \'mc.zip\' is embedded (Define NO_CONFIGURATION_EMBEDDING_WARNING to suppress this warning.)"\n'
264
 			+ b'  #warning "Generated file \'mc.zip\' is embedded (Define NO_CONFIGURATION_EMBEDDING_WARNING to suppress this warning.)"\n'
265
 			+ b'#endif\n'
265
 			+ b'#endif\n'
266
 			+ b'const unsigned char mc_zip[] PROGMEM = {\n '
266
 			+ b'const unsigned char mc_zip[] PROGMEM = {\n '

Loading…
取消
儲存