fix(install): auto-install go on windows

This commit is contained in:
VideoTools CI 2026-01-23 05:43:11 -05:00
parent d7ac5b95d5
commit 5fae261cbf
4 changed files with 50 additions and 55 deletions

View File

@ -22,6 +22,8 @@
- Ensured pip is installed (Linux/Windows) and skipped Go/pip installs when already present. - Ensured pip is installed (Linux/Windows) and skipped Go/pip installs when already present.
- ✅ **Windows installer parse fix** - ✅ **Windows installer parse fix**
- Normalized PowerShell here-strings to prevent parse errors during installation. - Normalized PowerShell here-strings to prevent parse errors during installation.
- ✅ **Go auto-install on Windows**
- Removed the Go prompt in `install.sh`; missing Go is now installed automatically.
## Version 0.1.0-dev25 (2026-01-22) - Settings Preferences Expansion ## Version 0.1.0-dev25 (2026-01-22) - Settings Preferences Expansion

View File

@ -8,6 +8,8 @@ This file tracks upcoming features, improvements, and known issues.
- Ensure pip is installed on Linux/Windows and skip Go/pip when already present. - Ensure pip is installed on Linux/Windows and skip Go/pip when already present.
- [X] **Windows installer parse fix** - [X] **Windows installer parse fix**
- Normalize PowerShell here-strings to prevent parser errors. - Normalize PowerShell here-strings to prevent parser errors.
- [X] **Go auto-install in install.sh**
- Skip prompting for Go and install automatically when missing.
## Documentation: Fix Structural Errors ## Documentation: Fix Structural Errors

View File

@ -24,7 +24,7 @@ For Linux (Ubuntu, Fedora, Arch, etc.), macOS, and Windows Subsystem for Linux (
Before you begin, ensure your system meets these basic requirements: Before you begin, ensure your system meets these basic requirements:
- **Go:** Version 1.21 or later is required to build the application. - **Go:** Version 1.21 or later is required to build the application; the installer will auto-install it when missing.
- **FFmpeg:** Required for all video and audio processing. Our platform-specific guides cover how to install this. - **FFmpeg:** Required for all video and audio processing. Our platform-specific guides cover how to install this.
- **Python + pip:** Required for AI tooling and optional modules; the installers will set this up automatically where possible. - **Python + pip:** Required for AI tooling and optional modules; the installers will set this up automatically where possible.
- **Disk Space:** At least 2 GB of free disk space for the application and its dependencies. - **Disk Space:** At least 2 GB of free disk space for the application and its dependencies.

View File

@ -107,17 +107,11 @@ echo ""
echo -e "${CYAN}[1/2]${NC} Checking Go installation..." echo -e "${CYAN}[1/2]${NC} Checking Go installation..."
if ! command -v go &> /dev/null; then if ! command -v go &> /dev/null; then
echo -e "${YELLOW}WARNING:${NC} Go is not installed or not in PATH" echo -e "${YELLOW}WARNING:${NC} Go is not installed or not in PATH"
echo ""
read -p "Install Go (required dependency)? [y/N]: " go_choice
if [[ "$go_choice" =~ ^[Yy]$ ]]; then
echo "Installing Go..." echo "Installing Go..."
install_go=false install_go=false
# Detect OS and install Go
if [ "$IS_WINDOWS" = true ]; then if [ "$IS_WINDOWS" = true ]; then
echo "Please download and install Go from https://go.dev/dl/ manually" echo "Go will be installed by the Windows dependency installer."
echo "After installation, run this script again."
exit 1
elif [ "$IS_DARWIN" = true ]; then elif [ "$IS_DARWIN" = true ]; then
if command -v brew &> /dev/null; then if command -v brew &> /dev/null; then
brew install go brew install go
@ -151,7 +145,6 @@ if ! command -v go &> /dev/null; then
fi fi
if [ "$install_go" = true ]; then if [ "$install_go" = true ]; then
# Verify Go was installed successfully
if command -v go &> /dev/null; then if command -v go &> /dev/null; then
echo -e "${GREEN}[OK]${NC} Go installed successfully" echo -e "${GREEN}[OK]${NC} Go installed successfully"
else else
@ -159,14 +152,12 @@ if ! command -v go &> /dev/null; then
exit 1 exit 1
fi fi
fi fi
else
echo -e "${RED}[ERROR]${NC} Go is required. Please install Go 1.21+ from https://go.dev/dl/"
exit 1
fi
fi fi
if command -v go &> /dev/null; then
GO_VERSION=$(go version | awk '{print $3}' | sed 's/go//') GO_VERSION=$(go version | awk '{print $3}' | sed 's/go//')
echo -e "${GREEN}[OK]${NC} Found Go version: $GO_VERSION" echo -e "${GREEN}[OK]${NC} Found Go version: $GO_VERSION"
fi
# Step 2: Check authoring dependencies # Step 2: Check authoring dependencies
echo "" echo ""