Skip to content

fix: solve the bug of (un)installation scripts and Linux build target#2

Merged
KercyDing merged 3 commits intomainfrom
kercy/scripts-debug
Nov 15, 2025
Merged

fix: solve the bug of (un)installation scripts and Linux build target#2
KercyDing merged 3 commits intomainfrom
kercy/scripts-debug

Conversation

@KercyDing
Copy link
Owner

Description

This PR fixes critical bugs in installation/uninstallation scripts and improves the Linux build compatibility by switching to musl for static linking.

Changes

Installation Scripts

  • Auto-configure shell integration: Installation scripts now automatically write initialization code to shell config files without prompting users
  • Fix shell detection logic: Improved regex to distinguish actual initialization code from comments
  • PowerShell execution policy check: Added upfront check with helpful error messages for restricted execution policies
  • Consistent profile handling: All scripts now use $PROFILE.CurrentUserAllHosts (profile.ps1) to support all PowerShell hosts (Console, VSCode, etc.)

Uninstallation Scripts

  • Support multiple installation methods: Detect and remove binaries from cargo, install script, and manual installations
  • Simplified cleanup: Remove unnecessary prompts and backups for profile modifications
  • Fixed deletion logic: Use line-by-line filtering instead of complex regex to ensure reliable removal

Build System

  • Linux musl target: Changed from x86_64-unknown-linux-gnu to x86_64-unknown-linux-musl for static linking
  • Broad compatibility: Generated binaries now work across all Linux distributions without GLIBC version conflicts

Project Organization

  • Moved scripts: Relocated all install/uninstall scripts to scripts/ directory
  • Updated documentation: Corrected all script paths in README and INTRO

Documentation

  • Clearer installation instructions: Updated README with platform-specific steps including PATH configuration
  • Manual installation guide: Added complete manual setup instructions with shell integration

Checklist

  • I have performed a self-review of my own code.
  • I have added tests that prove my feature works or my fix is effective.
  • I have updated the documentation accordingly.
  • All new and existing tests passed.

Add automated installation scripts for all platforms:
- install.sh for Linux and macOS
- install.ps1 for Windows PowerShell

Update README with detailed installation instructions including:
- Quick install method using curl/Invoke-RestMethod
- Manual installation steps for each platform
- Shell integration initialization commands
Change the Linux build target from x86_64-unknown-linux-gnu to
x86_64-unknown-linux-musl to produce statically linked binaries.
Add musl-tools installation step to support the musl compilation.

This improves binary portability across different Linux distributions.
@KercyDing KercyDing merged commit 162fabb into main Nov 15, 2025
5 checks passed
@KercyDing KercyDing deleted the kercy/scripts-debug branch November 17, 2025 01:11
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