fix(install): auto-install go on windows
This commit is contained in:
parent
d7ac5b95d5
commit
5fae261cbf
2
DONE.md
2
DONE.md
|
|
@ -22,6 +22,8 @@
|
|||
- Ensured pip is installed (Linux/Windows) and skipped Go/pip installs when already present.
|
||||
- ✅ **Windows installer parse fix**
|
||||
- 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
|
||||
|
||||
|
|
|
|||
2
TODO.md
2
TODO.md
|
|
@ -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.
|
||||
- [X] **Windows installer parse fix**
|
||||
- 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
|
||||
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
||||
- **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.
|
||||
- **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.
|
||||
|
|
|
|||
|
|
@ -107,66 +107,57 @@ echo ""
|
|||
echo -e "${CYAN}[1/2]${NC} Checking Go installation..."
|
||||
if ! command -v go &> /dev/null; then
|
||||
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..."
|
||||
install_go=false
|
||||
|
||||
# Detect OS and install Go
|
||||
if [ "$IS_WINDOWS" = true ]; then
|
||||
echo "Please download and install Go from https://go.dev/dl/ manually"
|
||||
echo "After installation, run this script again."
|
||||
echo "Installing Go..."
|
||||
install_go=false
|
||||
|
||||
if [ "$IS_WINDOWS" = true ]; then
|
||||
echo "Go will be installed by the Windows dependency installer."
|
||||
elif [ "$IS_DARWIN" = true ]; then
|
||||
if command -v brew &> /dev/null; then
|
||||
brew install go
|
||||
install_go=true
|
||||
else
|
||||
echo "Homebrew not found. Please install Go from https://go.dev/dl/"
|
||||
exit 1
|
||||
elif [ "$IS_DARWIN" = true ]; then
|
||||
if command -v brew &> /dev/null; then
|
||||
brew install go
|
||||
install_go=true
|
||||
else
|
||||
echo "Homebrew not found. Please install Go from https://go.dev/dl/"
|
||||
exit 1
|
||||
fi
|
||||
elif [ "$IS_LINUX" = true ]; then
|
||||
if command -v apt-get &> /dev/null; then
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y golang-go
|
||||
install_go=true
|
||||
elif command -v dnf &> /dev/null; then
|
||||
sudo dnf install -y golang
|
||||
install_go=true
|
||||
elif command -v pacman &> /dev/null; then
|
||||
sudo pacman -Sy --needed --noconfirm go
|
||||
install_go=true
|
||||
elif command -v zypper &> /dev/null; then
|
||||
sudo zypper install -y go
|
||||
install_go=true
|
||||
elif command -v brew &> /dev/null; then
|
||||
brew install go
|
||||
install_go=true
|
||||
else
|
||||
echo "No supported package manager found for Go installation."
|
||||
echo "Please install Go manually from https://go.dev/dl/"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$install_go" = true ]; then
|
||||
# Verify Go was installed successfully
|
||||
if command -v go &> /dev/null; then
|
||||
echo -e "${GREEN}[OK]${NC} Go installed successfully"
|
||||
else
|
||||
echo -e "${RED}[ERROR]${NC} Go installation failed. Please install manually from https://go.dev/dl/"
|
||||
exit 1
|
||||
fi
|
||||
elif [ "$IS_LINUX" = true ]; then
|
||||
if command -v apt-get &> /dev/null; then
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y golang-go
|
||||
install_go=true
|
||||
elif command -v dnf &> /dev/null; then
|
||||
sudo dnf install -y golang
|
||||
install_go=true
|
||||
elif command -v pacman &> /dev/null; then
|
||||
sudo pacman -Sy --needed --noconfirm go
|
||||
install_go=true
|
||||
elif command -v zypper &> /dev/null; then
|
||||
sudo zypper install -y go
|
||||
install_go=true
|
||||
elif command -v brew &> /dev/null; then
|
||||
brew install go
|
||||
install_go=true
|
||||
else
|
||||
echo "No supported package manager found for Go installation."
|
||||
echo "Please install Go manually from https://go.dev/dl/"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$install_go" = true ]; then
|
||||
if command -v go &> /dev/null; then
|
||||
echo -e "${GREEN}[OK]${NC} Go installed successfully"
|
||||
else
|
||||
echo -e "${RED}[ERROR]${NC} Go installation failed. Please install manually from https://go.dev/dl/"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo -e "${RED}[ERROR]${NC} Go is required. Please install Go 1.21+ from https://go.dev/dl/"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
GO_VERSION=$(go version | awk '{print $3}' | sed 's/go//')
|
||||
echo -e "${GREEN}[OK]${NC} Found Go version: $GO_VERSION"
|
||||
if command -v go &> /dev/null; then
|
||||
GO_VERSION=$(go version | awk '{print $3}' | sed 's/go//')
|
||||
echo -e "${GREEN}[OK]${NC} Found Go version: $GO_VERSION"
|
||||
fi
|
||||
|
||||
# Step 2: Check authoring dependencies
|
||||
echo ""
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user