mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-12-03 06:48:52 -06:00
refactor: one writer for the instructions note
This commit is contained in:
1 parent
dfc1860d0d
commit
e51dc14d7b
4 files changed
+15
-22
No files matched your search
@@ -28,6 +28,7 @@ from packs.archive import (
|
||||
add_pack_member,
|
||||
add_zip_to_pack,
|
||||
extract_zip_to_archive,
|
||||
instructions_note,
|
||||
same_bytes,
|
||||
write_generated_member,
|
||||
writing_pack,
|
||||
@@ -612,18 +613,11 @@ class _PlatformPackBuild:
|
||||
base_dest = self.plan.base_dest
|
||||
self.placed.take(full_dest)
|
||||
self.file_status.setdefault(full_dest, "ok")
|
||||
instructions = file_entry.get(
|
||||
"instructions", "Please provide this file manually."
|
||||
)
|
||||
instr_name = f"INSTRUCTIONS_{file_entry['name']}.txt"
|
||||
instr_name, text = instructions_note(file_entry)
|
||||
instr_path = (
|
||||
f"{base_dest}/{instr_name}" if base_dest else instr_name
|
||||
)
|
||||
write_generated_member(
|
||||
self.zf,
|
||||
self._flat(instr_path),
|
||||
f"File needed: {file_entry['name']}\n\n{instructions}\n",
|
||||
)
|
||||
write_generated_member(self.zf, self._flat(instr_path), text)
|
||||
self.total_files += 1
|
||||
|
||||
def _pack_external(self, file_entry: dict, full_dest: str) -> None:
|
||||
|
||||
Reference in new issue
Block a user