From aa326e69b18a4390ffbc97268eaec4793761f083 Mon Sep 17 00:00:00 2001 From: "1992414357@qq.com" <1992414357@qq.com> Date: Wed, 11 Jun 2025 18:32:48 +0800 Subject: . --- export/dev/LICENSE-THIRD-PARTY | 4 --- .../completeion/install_completion_powershell.ps1 | 39 +++++++++++++++++++++ export/dev/bin/padc.exe | Bin 15830528 -> 6470144 bytes 3 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 export/dev/bin/completeion/install_completion_powershell.ps1 (limited to 'export') diff --git a/export/dev/LICENSE-THIRD-PARTY b/export/dev/LICENSE-THIRD-PARTY index 939d850..47b501f 100644 --- a/export/dev/LICENSE-THIRD-PARTY +++ b/export/dev/LICENSE-THIRD-PARTY @@ -13,8 +13,6 @@ This project uses third-party components with the following licenses: * clap (original license: Apache-2.0 OR MIT) * clap_complete (original license: Apache-2.0 OR MIT) * clearscreen (original license: Apache-2.0 OR MIT) -* egui (original license: Apache-2.0 OR MIT) -* eframe (original license: Apache-2.0 OR MIT) * env_logger (original license: Apache-2.0 OR MIT) * hex (original license: Apache-2.0 OR MIT) * log (original license: Apache-2.0 OR MIT) @@ -36,8 +34,6 @@ Copyright (c) 2013-2014 The Rust Project Developers. * clap - Copyright (c) The clap Project Developer(s). * clap_complete - Copyright (c) 2015-2022 Kevin B. Knapp and Clap Contributors. * clearscreen - Copyright (c) The clearscreen Project Developer(s). -* egui - Copyright (c) The egui Project Developer(s). -* eframe - Copyright (c) The eframe Project Developer(s). * crossterm - Copyright (c) 2019 Timon. * env_logger - Copyright (c) The env_logger Project Developer(s). * hex - Copyright (c) 2015-2020 The rust-hex Developers. diff --git a/export/dev/bin/completeion/install_completion_powershell.ps1 b/export/dev/bin/completeion/install_completion_powershell.ps1 new file mode 100644 index 0000000..8707870 --- /dev/null +++ b/export/dev/bin/completeion/install_completion_powershell.ps1 @@ -0,0 +1,39 @@ +$ErrorActionPreference = "Stop" + +try { + # Check if padc.exe exists in the current directory + if (-not (Test-Path -Path ".\..\padc.exe" -PathType Leaf)) { + throw "Error: padc.exe program not found in the current directory" + } + + # Generate completion script + Write-Host "Generating padc.ps1 file..." + .\..\padc.exe generate-completion powershell | Out-File padc.ps1 -Encoding utf8 -Force + + # Get target profile file path + $targetProfile = $PROFILE.CurrentUserAllHosts + + # Ensure the profile directory exists + $profileDir = Split-Path $targetProfile -Parent + if (-not (Test-Path $profileDir)) { + New-Item -ItemType Directory -Path $profileDir -Force | Out-Null + } + + # Copy the generated script to the profile file + Write-Host "Installing to user profile file..." + Copy-Item padc.ps1 $targetProfile -Force + + # Clean up temporary files (optional) + # Remove-Item padc.ps1 -Force + + Write-Host "`nComplete! Auto-completion has been successfully installed to $targetProfile" -ForegroundColor Green + Write-Host "Effective in new terminal sessions (restart PowerShell to use)" +} +catch { + Write-Host "`nError: $_" -ForegroundColor Red + exit 1 +} + +# Pause the script +Write-Host "`nPress any key to continue..." +$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") \ No newline at end of file diff --git a/export/dev/bin/padc.exe b/export/dev/bin/padc.exe index 402df48..95b2043 100644 Binary files a/export/dev/bin/padc.exe and b/export/dev/bin/padc.exe differ -- cgit