WizardKit/scripts/wk/cfg/ufd.py

117 lines
3.4 KiB
Python

"""WizardKit: Config - UFD"""
# vim: sts=2 sw=2 ts=2
from wk.cfg.main import KIT_NAME_FULL
# General
SOURCES = {
'Linux': {'Arg': '--linux', 'Type': 'ISO'},
'WinPE': {'Arg': '--winpe', 'Type': 'ISO'},
'ESET SysRescue': {'Arg': '--eset', 'Type': 'IMG'},
'Main Kit': {'Arg': '--main-kit', 'Type': 'KIT'},
'Extra Dir': {'Arg': '--extra-dir', 'Type': 'DIR'},
}
# Definitions: Boot entries
BOOT_ENTRIES = {
# Path to check: Comment to remove
'/arch_minimal': 'UFD-MINIMAL',
'/casper': 'UFD-ESET',
'/sources/boot.wim': 'UFD-WINPE',
}
BOOT_FILES = {
# Directory: extension
'/syslinux': 'cfg',
'/boot/grub': 'cfg',
'/EFI/boot': 'conf',
}
IMAGE_BOOT_ENTRIES = {
'El Capitan': 'UFD-MACOS-10.11',
'High Sierra': 'UFD-MACOS-10.13',
'Catalina': 'UFD-MACOS-10.15',
'3S132': 'UFD-ASD-3S132',
'3S138': 'UFD-ASD-3S138',
'3S140': 'UFD-ASD-3S140',
'3S142A': 'UFD-ASD-3S142A',
'3S144': 'UFD-ASD-3S144',
'3S145A': 'UFD-ASD-3S145A',
'3S146': 'UFD-ASD-3S146',
'3S147': 'UFD-ASD-3S147',
'3S148': 'UFD-ASD-3S148',
'3S150': 'UFD-ASD-3S150',
'3S155': 'UFD-ASD-3S155',
'3S156': 'UFD-ASD-3S156',
'3S162': 'UFD-ASD-3S162',
}
# Definitions: Sources and Destinations
## NOTES: Paths are relative to the root of the ISO/UFD
## Sources use rsync's trailing slash syntax
ITEMS = {
'ESET SysRescue': (
('/boot/grub/', '/boot/grub/'),
('/casper/', '/casper/'),
('/EFI/boot/', '/EFI/ESET/'),
),
'Extra Dir': (
('/', '/'),
),
'Linux': (
('/arch', '/'),
),
'Main Kit': (
('/', f'/{KIT_NAME_FULL}/'),
),
'WinPE': (
('/BOOTMGR', '/'),
('/bootmgr.efi', '/'),
('/boot/', '/boot/'),
('/efi/boot/', '/EFI/Microsoft/'),
('/efi/microsoft/', '/EFI/Microsoft/'),
('/boot/bcd', '/sources/'),
('/boot/boot.sdi', '/sources/'),
('/BOOTMGR', '/sources/'),
('/sources/boot.wim', '/sources/'),
),
}
ITEMS_FROM_LIVE = {
'WizardKit UFD base': (
('/usr/share/WizardKit/', '/'),
),
'rEFInd': (
('/usr/share/refind/drivers_x64/', '/EFI/Boot/drivers_x64/'),
('/usr/share/refind/icons/', '/EFI/Boot/icons/'),
('/usr/share/refind/refind_x64.efi', '/EFI/Boot/'),
),
'Syslinux': (
('/usr/lib/syslinux/bios/', '/syslinux/'),
),
'Memtest86': (
('/usr/share/memtest86-efi/', '/EFI/Memtest86/'),
),
'Wimboot': (
('/usr/share/wimboot/', '/syslinux/'),
),
}
ITEMS_HIDDEN = (
# ESET
'casper',
# Linux (all versions)
'arch',
'EFI',
'syslinux',
# Main Kit
f'{KIT_NAME_FULL}/.bin',
f'{KIT_NAME_FULL}/.cbin',
# WinPE
'boot',
'BOOTMGR',
'bootmgr.efi',
'images',
'sources',
)
if __name__ == '__main__':
print("This file is not meant to be called directly.")