121 lines
3.7 KiB
Python
121 lines
3.7 KiB
Python
"""WizardKit: Config - UFD"""
|
|
# vim: sts=2 sw=2 ts=2
|
|
|
|
from collections import OrderedDict
|
|
|
|
from wk.cfg.main import KIT_NAME_FULL
|
|
|
|
|
|
# General
|
|
SOURCES = OrderedDict({
|
|
'Linux': {'Arg': '--linux', 'Type': 'ISO'},
|
|
'Linux (Minimal)': {'Arg': '--linux-minimal', 'Type': 'ISO'},
|
|
'WinPE': {'Arg': '--winpe', 'Type': 'ISO'},
|
|
'ESET SysRescue': {'Arg': '--eset', 'Type': 'IMG'},
|
|
'HDClone': {'Arg': '--hdclone', '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',
|
|
'/kernel.map': 'UFD-HDCLONE',
|
|
'/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': (
|
|
('/', '/'),
|
|
),
|
|
'HDClone': (
|
|
('/bootenv', '/'),
|
|
('/kernel.map', '/'),
|
|
('/EFI/boot/', '/EFI/HDClone/'),
|
|
('/hdclone.iso', '/sources/'),
|
|
),
|
|
'Linux': (
|
|
('/arch', '/'),
|
|
('/EFI/boot', '/EFI/'),
|
|
('/syslinux', '/'),
|
|
),
|
|
'Linux (Minimal)': (
|
|
('/arch/boot/x86_64/initramfs-linux.img', '/arch_minimal/'),
|
|
('/arch/boot/x86_64/vmlinuz-linux', '/arch_minimal/'),
|
|
('/arch/pkglist.x86_64.txt', '/arch_minimal/'),
|
|
('/arch/x86_64', '/arch_minimal/'),
|
|
),
|
|
'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_HIDDEN = (
|
|
# ESET
|
|
'casper',
|
|
# HDClone
|
|
'bootenv',
|
|
'kernel.map',
|
|
# Linux (all versions)
|
|
'arch',
|
|
'arch_minimal',
|
|
'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.")
|