From bff6f4f894ad22e4c2e679ba9c52744dcdabc5a5 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Sun, 15 May 2022 14:54:29 -0300 Subject: [PATCH] Add Zenith self-extractor (PKLITE with license wrapper...) --- biostools/__main__.py | 1 + biostools/extractors.py | 18 ++++++++++++++---- vm/freedos.img | Bin 3145728 -> 3145728 bytes 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/biostools/__main__.py b/biostools/__main__.py index 4f23cc1..2054c92 100644 --- a/biostools/__main__.py +++ b/biostools/__main__.py @@ -127,6 +127,7 @@ def extract_process(queue, abort_flag, dir_number_path, next_dir_number_path, op if not options['debug']: dummy_func = lambda self, *args: None for extractor in file_extractors: + extractor.debug = False extractor.debug_print = dummy_func # Raise exceptions on no space if requested. diff --git a/biostools/extractors.py b/biostools/extractors.py index 51ac1a3..1952beb 100644 --- a/biostools/extractors.py +++ b/biostools/extractors.py @@ -24,6 +24,9 @@ except ImportError: from . import util class Extractor: + def __init__(self): + self.debug = True + def extract(self, file_path, file_header, dest_dir, dest_dir_0): """Extract the given file into one of the destination directories: dest_dir allows extracted files to be reprocessed in the next run, @@ -2375,7 +2378,8 @@ class VMExtractor(ArchiveExtractor): b''', Sydex, Inc\\. All Rights Reserved\\.|''' # IBM Sydex b'''Disk eXPress Self-Extracting Diskette Image|''' # HP DXP b'''(\\x00Diskette Image Decompression Utility\\.\\x00)|''' # NEC in-house - b'''(Copyright Daniel Valot |\\x00ARDI - \\x00)''' # IBM ARDI + b'''(Copyright Daniel Valot |\\x00ARDI - \\x00)|''' # IBM ARDI + b'''(Ready to build distribution image with the following attributes:)''' # Zenith in-house ) self._eti_pattern = re.compile(b'''[0-9\\.\\x00]{10}[0-9]{2}/[0-9]{2}/[0-9]{2}\\x00{2}[0-9]{2}:[0-9]{2}:[0-9]{2}\\x00{3}''') @@ -2438,7 +2442,9 @@ class VMExtractor(ArchiveExtractor): def _run_qemu(self, hdd=None, hdd_snapshot=True, floppy=None, floppy_snapshot=True, vvfat=None, boot='c'): # Build QEMU arguments. - args = [self._qemu_path, '-m', '32', '-display', 'none', '-vga', 'none', '-boot', boot] + args = [self._qemu_path, '-m', '32', '-boot', boot] + if not self.debug: + args += ['-display', 'none', '-vga', 'none'] for drive, drive_snapshot, drive_if in ((floppy, floppy_snapshot, 'floppy'), (hdd, hdd_snapshot, 'ide')): # Don't add this drive if an image was not specified. if not drive: @@ -2490,11 +2496,15 @@ class VMExtractor(ArchiveExtractor): f.write(b'move /y config.old config.sys\r\n') # just in case again (snapshot shouldn't persist changes) elif match.group(3): # ARDI f.write(b'echo.|') + elif match.group(4): # Zenith in-house + f.write(b'a:\r\n') f.write(b'd:' + exe_name.encode('cp437', 'ignore')) if match.group(1): # FastPacket f.write(b' /b a:\r\n') elif match.group(3): # ARDI f.write(b'\r\n') + elif match.group(4): # Zenith in-house + f.write(b' %*f=+I;m|VjJc_&fl=1cJ;>G7ML{7XB7{N0PNi&p2m=tP z0_idaj_HC9%&MCOnC$GD&a|CjY&*l$c80m_3`^S?*0wWj%g(Sn)N>3h7-;)}zK4Y1 W_P{$#>-m9U^`Ux{7@T2{Z2$nW#N(R) delta 472 zcmZo@IKbEd#2Yp?Y-VKgXPwlx5lnCDX<*#U%+z4lbf)bLW7`>~wlmCaXIR?Ku(q9H VTXu%sVY2|!hw4#caE5_`BLF4G%me@c