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.
|
- 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
|
||||||
|
|
||||||
|
|
|
||||||
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.
|
- 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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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.
|
||||||
|
|
|
||||||
|
|
@ -107,66 +107,57 @@ 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 ""
|
echo "Installing Go..."
|
||||||
read -p "Install Go (required dependency)? [y/N]: " go_choice
|
install_go=false
|
||||||
if [[ "$go_choice" =~ ^[Yy]$ ]]; then
|
|
||||||
echo "Installing Go..."
|
if [ "$IS_WINDOWS" = true ]; then
|
||||||
install_go=false
|
echo "Go will be installed by the Windows dependency installer."
|
||||||
|
elif [ "$IS_DARWIN" = true ]; then
|
||||||
# Detect OS and install Go
|
if command -v brew &> /dev/null; then
|
||||||
if [ "$IS_WINDOWS" = true ]; then
|
brew install go
|
||||||
echo "Please download and install Go from https://go.dev/dl/ manually"
|
install_go=true
|
||||||
echo "After installation, run this script again."
|
else
|
||||||
|
echo "Homebrew not found. Please install Go from https://go.dev/dl/"
|
||||||
exit 1
|
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
|
fi
|
||||||
|
elif [ "$IS_LINUX" = true ]; then
|
||||||
if [ "$install_go" = true ]; then
|
if command -v apt-get &> /dev/null; then
|
||||||
# Verify Go was installed successfully
|
sudo apt-get update
|
||||||
if command -v go &> /dev/null; then
|
sudo apt-get install -y golang-go
|
||||||
echo -e "${GREEN}[OK]${NC} Go installed successfully"
|
install_go=true
|
||||||
else
|
elif command -v dnf &> /dev/null; then
|
||||||
echo -e "${RED}[ERROR]${NC} Go installation failed. Please install manually from https://go.dev/dl/"
|
sudo dnf install -y golang
|
||||||
exit 1
|
install_go=true
|
||||||
fi
|
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
|
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
|
fi
|
||||||
|
|
||||||
GO_VERSION=$(go version | awk '{print $3}' | sed 's/go//')
|
if command -v go &> /dev/null; then
|
||||||
echo -e "${GREEN}[OK]${NC} Found Go version: $GO_VERSION"
|
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
|
# Step 2: Check authoring dependencies
|
||||||
echo ""
|
echo ""
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user