Skip to content

Refactor Install-WindowsTerminalIntegration.ps1 script#2

Open
SleepTheGod wants to merge 1 commit into
TheStingR:mainfrom
SleepTheGod:patch-1
Open

Refactor Install-WindowsTerminalIntegration.ps1 script#2
SleepTheGod wants to merge 1 commit into
TheStingR:mainfrom
SleepTheGod:patch-1

Conversation

@SleepTheGod

Copy link
Copy Markdown

Updated the Windows Terminal integration script for TechSquad MCP Ghidra5, including enhanced logging, profile configuration, and installation checks.

  1. Replaced the old ASCII banner

The original banner was a small "🖥️ TechSquad MCP Ghidra5" placeholder.

Replaced it with your full /$$$$$$$/… ASCII banner, preserving formatting and coloring it Magenta.

Ensured it prints at the very start of the script.

  1. Expanded and modernized logging functions

Original functions: Write-Info, Write-Success, Write-Warning, Write-Error.

Updated with consistent emoji indicators (ℹ️, ✅, ⚠️, ❌) and explicit color codes.

All output throughout the script now uses these functions for uniform logging.

  1. Added PowerShell 7 integration

Added detection and optional installation of PowerShell 7 if -InstallPowerShell7 is specified.

Created separate Windows Terminal profile for PowerShell 7 with cloned settings of the main profile.

Added verification of PowerShell 7 availability in final summary.

  1. Added Cascadia Code font installation

Optional installation if -InstallFonts is specified.

Checks if fonts are already installed to avoid redundant installs unless -Force.

Downloads zip, extracts, and installs .ttf files using Shell COM object.

Added logging for download, extraction, and installation.

  1. Windows Terminal profile configuration

Added full TechSquad MCP Ghidra5 profile:

All properties: font, size, color scheme, acrylic, opacity, background image, tab color, cursor shape/color, padding, antialiasing, bell style.

Added logic to remove old TechSquad profiles before adding new ones.

Added default profile selection if -SetAsDefault is specified.

  1. Color scheme update

Defined a new "TechSquad Dark" scheme with full 16-color palette and foreground/background/cursor colors.

Removed any previous conflicting schemes before adding.

  1. PowerShell profile enhancements

Auto-imports the TechSquad MCP module.

Custom prompt showing MCP status (🟢 or 🔴).

Tab completion for mcp-* commands.

Aliases for ghidra, analyze, status.

Welcome message with ASCII/emoji header on first launch.

Ensured idempotence: replaces existing TechSquad sections instead of duplicating.

  1. Desktop shortcut creation

Added creation of desktop shortcut pointing to Windows Terminal with the new profile.

Custom icon and description included.

Handles exceptions gracefully.

  1. Installation verification

Checks:

Windows Terminal settings exist

Profiles configured

PowerShell 7 presence

Cascadia Code fonts installed

Prints a final summary with ✅ / ❌ indicators for all components.

  1. Misc enhancements

Improved error handling with try/catch around all major operations.

Ensured all file paths, directories, and COM objects are handled safely.

Added Quick Commands and Next Steps section in console output for user guidance.

Added HistorySize, snapOnInput, closeOnExit, and other terminal optimizations.

Updated the Windows Terminal integration script for TechSquad MCP Ghidra5, including enhanced logging, profile configuration, and installation checks.


1. Replaced the old ASCII banner

The original banner was a small "🖥️ TechSquad MCP Ghidra5" placeholder.

Replaced it with your full /$$$$$$$/… ASCII banner, preserving formatting and coloring it Magenta.

Ensured it prints at the very start of the script.

2. Expanded and modernized logging functions

Original functions: Write-Info, Write-Success, Write-Warning, Write-Error.

Updated with consistent emoji indicators (ℹ️, ✅, ⚠️, ❌) and explicit color codes.

All output throughout the script now uses these functions for uniform logging.

3. Added PowerShell 7 integration

Added detection and optional installation of PowerShell 7 if -InstallPowerShell7 is specified.

Created separate Windows Terminal profile for PowerShell 7 with cloned settings of the main profile.

Added verification of PowerShell 7 availability in final summary.

4. Added Cascadia Code font installation

Optional installation if -InstallFonts is specified.

Checks if fonts are already installed to avoid redundant installs unless -Force.

Downloads zip, extracts, and installs .ttf files using Shell COM object.

Added logging for download, extraction, and installation.

5. Windows Terminal profile configuration

Added full TechSquad MCP Ghidra5 profile:

All properties: font, size, color scheme, acrylic, opacity, background image, tab color, cursor shape/color, padding, antialiasing, bell style.

Added logic to remove old TechSquad profiles before adding new ones.

Added default profile selection if -SetAsDefault is specified.

6. Color scheme update

Defined a new "TechSquad Dark" scheme with full 16-color palette and foreground/background/cursor colors.

Removed any previous conflicting schemes before adding.

7. PowerShell profile enhancements

Auto-imports the TechSquad MCP module.

Custom prompt showing MCP status (🟢 or 🔴).

Tab completion for mcp-* commands.

Aliases for ghidra, analyze, status.

Welcome message with ASCII/emoji header on first launch.

Ensured idempotence: replaces existing TechSquad sections instead of duplicating.

8. Desktop shortcut creation

Added creation of desktop shortcut pointing to Windows Terminal with the new profile.

Custom icon and description included.

Handles exceptions gracefully.

9. Installation verification

Checks:

Windows Terminal settings exist

Profiles configured

PowerShell 7 presence

Cascadia Code fonts installed

Prints a final summary with ✅ / ❌ indicators for all components.

10. Misc enhancements

Improved error handling with try/catch around all major operations.

Ensured all file paths, directories, and COM objects are handled safely.

Added Quick Commands and Next Steps section in console output for user guidance.

Added HistorySize, snapOnInput, closeOnExit, and other terminal optimizations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant