From 228a5f640e0bd007654b7d909e8d6d893b747e3e Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 24 Jun 2023 18:56:03 -0700 Subject: [PATCH 1/6] Adjust TRIM warning message --- scripts/wk/clone/ddrescue.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/wk/clone/ddrescue.py b/scripts/wk/clone/ddrescue.py index 7e34d3d6..3d16f597 100644 --- a/scripts/wk/clone/ddrescue.py +++ b/scripts/wk/clone/ddrescue.py @@ -646,8 +646,7 @@ class State(): # Select source self.source = select_disk_obj('source', disk_menu, docopt_args['']) 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) From d94e9097b7abfe0db46bd356a0a0d6233bd6038b Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 24 Jun 2023 18:56:31 -0700 Subject: [PATCH 2/6] Reduce ESP size to 260MiB --- scripts/wk/clone/ddrescue.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/wk/clone/ddrescue.py b/scripts/wk/clone/ddrescue.py index 3d16f597..22596e5e 100644 --- a/scripts/wk/clone/ddrescue.py +++ b/scripts/wk/clone/ddrescue.py @@ -801,7 +801,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'}, ), ) @@ -930,8 +930,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 From 21cbe5d4453eacf1b1ec81e2e35a194230086378 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 24 Jun 2023 18:58:06 -0700 Subject: [PATCH 3/6] Show filesystem type in select_disk_parts() --- scripts/wk/clone/menus.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/wk/clone/menus.py b/scripts/wk/clone/menus.py index 7d13a429..e25f9bbd 100644 --- a/scripts/wk/clone/menus.py +++ b/scripts/wk/clone/menus.py @@ -194,10 +194,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']}) From dfcc717048487ea7520e04bf4e0f2ee719e85c0b Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 24 Jun 2023 19:35:12 -0700 Subject: [PATCH 4/6] Open both Microsoft Store and Windows updates Addresses issue #216 --- scripts/wk/cfg/launchers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/wk/cfg/launchers.py b/scripts/wk/cfg/launchers.py index da31d3e2..d1cfd1d8 100644 --- a/scripts/wk/cfg/launchers.py +++ b/scripts/wk/cfg/launchers.py @@ -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', From d34df7ae072ec5e9e1490d0950ee054b4d5e97d5 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 24 Jun 2023 19:44:20 -0700 Subject: [PATCH 5/6] Add/Update Python dependencies for build_windows --- setup/windows/build.ps1 | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/setup/windows/build.ps1 b/setup/windows/build.ps1 index a7278265..6922ea1f 100644 --- a/setup/windows/build.ps1 +++ b/setup/windows/build.ps1 @@ -100,10 +100,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 @@ -156,15 +156,18 @@ 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", - "pytz.whl", + "prompt_toolkit", "psutil$Arch.whl", + "python$Arch.zip", + "pytz.whl", "requests.whl", - "urllib3.whl" + "urllib3.whl", + "wcwidth" ) try { foreach ($File in $Files) { From 662f8c12547732154355d469b99d489fd8473d8d Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 24 Jun 2023 20:32:55 -0700 Subject: [PATCH 6/6] Fix bug when running a PowerShell script elevated --- scripts/Launch.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Launch.cmd b/scripts/Launch.cmd index 526ae4b3..c887f665 100644 --- a/scripts/Launch.cmd +++ b/scripts/Launch.cmd @@ -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