This commit introduces a new, comprehensive installation guide for Windows users (INSTALL_WINDOWS.md) and refactors the main INSTALLATION.md into a platform-agnostic hub. This addresses the documentation gap for the Windows platform, providing clear and distinct instructions for all supported operating systems.
3.2 KiB
VideoTools Installation Guide for Linux, macOS, & WSL
This guide provides detailed instructions for installing VideoTools on Linux, macOS, and Windows Subsystem for Linux (WSL) using the automated script.
One-Command Installation
The recommended method for all Unix-like systems is the install.sh script.
bash scripts/install.sh
This single command automates the entire setup process.
What the Installer Does
- Go Verification: Checks if Go (version 1.21 or later) is installed and available in your
PATH. - Build from Source: Cleans any previous builds, downloads all necessary Go dependencies, and compiles the
VideoToolsbinary. - Path Selection: Prompts you to choose an installation location:
- System-wide:
/usr/local/bin(Requiressudoprivileges). Recommended for multi-user systems. - User-local:
~/.local/bin(Default). Recommended for most users as it does not requiresudo.
- System-wide:
- Install Binary: Copies the compiled binary to the selected location and makes it executable.
- Configure Shell: Detects your shell (
bashorzsh) and updates the corresponding resource file (~/.bashrcor~/.zshrc) to:- Add the installation directory to your
PATH. - Source the
alias.shscript for convenience commands.
- Add the installation directory to your
After Installation
You must reload your shell for the changes to take effect:
# For bash users:
source ~/.bashrc
# For zsh users:
source ~/.zshrc
You can now run the application from anywhere by simply typing VideoTools.
Convenience Commands
The installation script sets up a few helpful aliases:
VideoTools: Runs the main application.VideoToolsRebuild: Forces a full rebuild of the application from source.VideoToolsClean: Cleans all build artifacts and clears the Go cache for the project.
Manual Installation
If you prefer to perform the steps manually:
-
Build the Binary:
CGO_ENABLED=1 go build -o VideoTools . -
Install the Binary:
- User-local:
mkdir -p ~/.local/bin cp VideoTools ~/.local/bin/ - System-wide:
sudo cp VideoTools /usr/local/bin/
- User-local:
-
Update Shell Configuration: Add the following lines to your
~/.bashrcor~/.zshrcfile, replacing/path/to/VideoToolswith the actual absolute path to the project directory.# Add VideoTools to PATH export PATH="$HOME/.local/bin:$PATH" # Source VideoTools aliases source /path/to/VideoTools/scripts/alias.sh -
Reload Your Shell:
source ~/.bashrc # Or source ~/.zshrc
Uninstallation
-
Remove the Binary:
- If installed user-locally:
rm ~/.local/bin/VideoTools - If installed system-wide:
sudo rm /usr/local/bin/VideoTools
- If installed user-locally:
-
Remove Shell Configuration: Open your
~/.bashrcor~/.zshrcfile and remove the lines that were added forVideoTools.
Platform-Specific Notes
- macOS: You may need to install Xcode Command Line Tools first by running
xcode-select --install. - WSL: The Linux instructions work without modification inside a WSL environment.