Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
939ea79a15
5 changed files with 19 additions and 12 deletions
|
|
@ -242,7 +242,7 @@ if defined L_NCMD (
|
||||||
rem use Powershell's window instead of %CON%
|
rem use Powershell's window instead of %CON%
|
||||||
echo UAC.ShellExecute "%POWERSHELL%", "%ps_args% -File "%script%"", "", "runas", 3 >> "%bin%\tmp\Elevate.vbs"
|
echo UAC.ShellExecute "%POWERSHELL%", "%ps_args% -File "%script%"", "", "runas", 3 >> "%bin%\tmp\Elevate.vbs"
|
||||||
) else (
|
) 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
|
rem Run
|
||||||
|
|
|
||||||
|
|
@ -15,11 +15,12 @@ LAUNCHERS = {
|
||||||
'L_ITEM': 'auto_repairs.py',
|
'L_ITEM': 'auto_repairs.py',
|
||||||
'L_ELEV': 'True',
|
'L_ELEV': 'True',
|
||||||
},
|
},
|
||||||
'2) Windows Updates': {
|
'2) Store & Windows Updates': {
|
||||||
'L_TYPE': 'Executable',
|
'L_TYPE': 'Executable',
|
||||||
'L_PATH': r'%SystemRoot%\System32',
|
'L_PATH': r'%SystemRoot%\System32',
|
||||||
'L_ITEM': 'control.exe',
|
'L_ITEM': 'control.exe',
|
||||||
'L_ARGS': 'update',
|
'L_ARGS': 'update',
|
||||||
|
'Extra Code': ['explorer ms-windows-store:updates'],
|
||||||
},
|
},
|
||||||
'3) Snappy Driver Installer Origin': {
|
'3) Snappy Driver Installer Origin': {
|
||||||
'L_TYPE': 'PyScript',
|
'L_TYPE': 'PyScript',
|
||||||
|
|
|
||||||
|
|
@ -665,8 +665,7 @@ class State():
|
||||||
# Select source
|
# Select source
|
||||||
self.source = select_disk_obj('source', disk_menu, docopt_args['<source>'])
|
self.source = select_disk_obj('source', disk_menu, docopt_args['<source>'])
|
||||||
if self.source.trim:
|
if self.source.trim:
|
||||||
cli.print_error('Source device supports TRIM')
|
cli.print_warning('Source device supports TRIM')
|
||||||
cli.print_warning('Continuing recovery is STRONGLY DISADVISED!')
|
|
||||||
if not cli.ask(' Proceed with recovery?'):
|
if not cli.ask(' Proceed with recovery?'):
|
||||||
cli.abort()
|
cli.abort()
|
||||||
self.ui.set_title('Source', self.source.name)
|
self.ui.set_title('Source', self.source.name)
|
||||||
|
|
@ -865,7 +864,7 @@ class State():
|
||||||
build_sfdisk_partition_line(
|
build_sfdisk_partition_line(
|
||||||
table_type='GPT',
|
table_type='GPT',
|
||||||
dev_path=f'{dest_prefix}{part_num}',
|
dev_path=f'{dest_prefix}{part_num}',
|
||||||
size='384MiB',
|
size='260MiB',
|
||||||
details={'parttype': esp_type, 'partlabel': 'EFI System'},
|
details={'parttype': esp_type, 'partlabel': 'EFI System'},
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
@ -994,8 +993,8 @@ class State():
|
||||||
# Source: https://en.wikipedia.org/wiki/GUID_Partition_Table
|
# Source: https://en.wikipedia.org/wiki/GUID_Partition_Table
|
||||||
required_size += (1 + 33 + 33) * self.destination.phy_sec
|
required_size += (1 + 33 + 33) * self.destination.phy_sec
|
||||||
if settings['Create Boot Partition']:
|
if settings['Create Boot Partition']:
|
||||||
# 384MiB EFI System Partition and a 16MiB MS Reserved partition
|
# 260MiB EFI System Partition and a 16MiB MS Reserved partition
|
||||||
required_size += (384 + 16) * 1024**2
|
required_size += (260 + 16) * 1024**2
|
||||||
else:
|
else:
|
||||||
# MBR only requires one LBA but adding a full 4096 bytes anyway
|
# MBR only requires one LBA but adding a full 4096 bytes anyway
|
||||||
required_size += 4096
|
required_size += 4096
|
||||||
|
|
|
||||||
|
|
@ -196,10 +196,13 @@ def select_disk_parts(prompt_msg, disk) -> list[Disk]:
|
||||||
# Add parts
|
# Add parts
|
||||||
whole_disk_str = f'{str(disk.path):<14} (Whole device)'
|
whole_disk_str = f'{str(disk.path):<14} (Whole device)'
|
||||||
for part in disk.children:
|
for part in disk.children:
|
||||||
|
fstype = part.get('fstype', '')
|
||||||
|
fstype = str(fstype) if fstype else ''
|
||||||
size = part["size"]
|
size = part["size"]
|
||||||
name = (
|
name = (
|
||||||
f'{str(part["path"]):<14} '
|
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']})
|
menu.add_option(name, details={'Selected': True, 'pathlib.Path': part['path']})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -109,10 +109,10 @@ if ($MyInvocation.InvocationName -ne ".") {
|
||||||
|
|
||||||
# Python: psutil
|
# Python: psutil
|
||||||
$DownloadPage = "https://pypi.org/project/psutil/"
|
$DownloadPage = "https://pypi.org/project/psutil/"
|
||||||
$RegEx = "href=.*-cp310-cp310-win32.whl"
|
$RegEx = "href=.*-cp36-abi3-win32.whl"
|
||||||
$Url = FindDynamicUrl $DownloadPage $RegEx
|
$Url = FindDynamicUrl $DownloadPage $RegEx
|
||||||
DownloadFile -Path $Temp -Name "psutil32.whl" -Url $Url
|
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
|
$Url = FindDynamicUrl $DownloadPage $RegEx
|
||||||
DownloadFile -Path $Temp -Name "psutil64.whl" -Url $Url
|
DownloadFile -Path $Temp -Name "psutil64.whl" -Url $Url
|
||||||
|
|
||||||
|
|
@ -165,16 +165,20 @@ if ($MyInvocation.InvocationName -ne ".") {
|
||||||
foreach ($Arch in @("32", "64")) {
|
foreach ($Arch in @("32", "64")) {
|
||||||
Write-Host "Extracting: Python (x$Arch)"
|
Write-Host "Extracting: Python (x$Arch)"
|
||||||
$Files = @(
|
$Files = @(
|
||||||
"python$Arch.zip",
|
"Pygments",
|
||||||
"certifi.whl",
|
"certifi.whl",
|
||||||
"chardet.whl",
|
"chardet.whl",
|
||||||
"docopt.whl",
|
"docopt.whl",
|
||||||
"idna.whl",
|
"idna.whl",
|
||||||
"mariadb$Arch.whl",
|
"mariadb$Arch.whl",
|
||||||
"pytz.whl",
|
"pytz.whl",
|
||||||
|
"prompt_toolkit",
|
||||||
"psutil$Arch.whl",
|
"psutil$Arch.whl",
|
||||||
|
"python$Arch.zip",
|
||||||
|
"pytz.whl",
|
||||||
"requests.whl",
|
"requests.whl",
|
||||||
"urllib3.whl"
|
"urllib3.whl",
|
||||||
|
"wcwidth"
|
||||||
)
|
)
|
||||||
try {
|
try {
|
||||||
foreach ($File in $Files) {
|
foreach ($File in $Files) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue