Merge remote-tracking branch 'upstream/dev' into dev

This commit is contained in:
2Shirt 2023-06-24 20:36:00 -07:00
commit 939ea79a15
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
5 changed files with 19 additions and 12 deletions

View file

@ -242,7 +242,7 @@ if defined L_NCMD (
rem use Powershell's window instead of %CON%
echo UAC.ShellExecute "%POWERSHELL%", "%ps_args% -File "%script%"", "", "runas", 3 >> "%bin%\tmp\Elevate.vbs"
) else (
echo UAC.ShellExecute "%CON%", "-run %POWERSHELL% %ps_args% -File "%script%" -new_console:n", "", "runas", 1 >> "%bin%\tmp\Elevate.vbs"
echo UAC.ShellExecute "%CON%", "-run %POWERSHELL% %ps_args% -File "^"%script%^"" -new_console:n", "", "runas", 1 >> "%bin%\tmp\Elevate.vbs"
)
rem Run

View file

@ -15,11 +15,12 @@ LAUNCHERS = {
'L_ITEM': 'auto_repairs.py',
'L_ELEV': 'True',
},
'2) Windows Updates': {
'2) Store & Windows Updates': {
'L_TYPE': 'Executable',
'L_PATH': r'%SystemRoot%\System32',
'L_ITEM': 'control.exe',
'L_ARGS': 'update',
'Extra Code': ['explorer ms-windows-store:updates'],
},
'3) Snappy Driver Installer Origin': {
'L_TYPE': 'PyScript',

View file

@ -665,8 +665,7 @@ class State():
# Select source
self.source = select_disk_obj('source', disk_menu, docopt_args['<source>'])
if self.source.trim:
cli.print_error('Source device supports TRIM')
cli.print_warning('Continuing recovery is STRONGLY DISADVISED!')
cli.print_warning('Source device supports TRIM')
if not cli.ask(' Proceed with recovery?'):
cli.abort()
self.ui.set_title('Source', self.source.name)
@ -865,7 +864,7 @@ class State():
build_sfdisk_partition_line(
table_type='GPT',
dev_path=f'{dest_prefix}{part_num}',
size='384MiB',
size='260MiB',
details={'parttype': esp_type, 'partlabel': 'EFI System'},
),
)
@ -994,8 +993,8 @@ class State():
# Source: https://en.wikipedia.org/wiki/GUID_Partition_Table
required_size += (1 + 33 + 33) * self.destination.phy_sec
if settings['Create Boot Partition']:
# 384MiB EFI System Partition and a 16MiB MS Reserved partition
required_size += (384 + 16) * 1024**2
# 260MiB EFI System Partition and a 16MiB MS Reserved partition
required_size += (260 + 16) * 1024**2
else:
# MBR only requires one LBA but adding a full 4096 bytes anyway
required_size += 4096

View file

@ -196,10 +196,13 @@ def select_disk_parts(prompt_msg, disk) -> list[Disk]:
# Add parts
whole_disk_str = f'{str(disk.path):<14} (Whole device)'
for part in disk.children:
fstype = part.get('fstype', '')
fstype = str(fstype) if fstype else ''
size = part["size"]
name = (
f'{str(part["path"]):<14} '
f'({bytes_to_string(size, decimals=1, use_binary=False):>6})'
f'{fstype.upper():<5} '
f'({bytes_to_string(size, decimals=1, use_binary=True):>6})'
)
menu.add_option(name, details={'Selected': True, 'pathlib.Path': part['path']})

View file

@ -109,10 +109,10 @@ if ($MyInvocation.InvocationName -ne ".") {
# Python: psutil
$DownloadPage = "https://pypi.org/project/psutil/"
$RegEx = "href=.*-cp310-cp310-win32.whl"
$RegEx = "href=.*-cp36-abi3-win32.whl"
$Url = FindDynamicUrl $DownloadPage $RegEx
DownloadFile -Path $Temp -Name "psutil32.whl" -Url $Url
$RegEx = "href=.*-cp310-cp310-win_amd64.whl"
$RegEx = "href=.*-cp36-abi3-win_amd64.whl"
$Url = FindDynamicUrl $DownloadPage $RegEx
DownloadFile -Path $Temp -Name "psutil64.whl" -Url $Url
@ -165,16 +165,20 @@ if ($MyInvocation.InvocationName -ne ".") {
foreach ($Arch in @("32", "64")) {
Write-Host "Extracting: Python (x$Arch)"
$Files = @(
"python$Arch.zip",
"Pygments",
"certifi.whl",
"chardet.whl",
"docopt.whl",
"idna.whl",
"mariadb$Arch.whl",
"pytz.whl",
"prompt_toolkit",
"psutil$Arch.whl",
"python$Arch.zip",
"pytz.whl",
"requests.whl",
"urllib3.whl"
"urllib3.whl",
"wcwidth"
)
try {
foreach ($File in $Files) {