Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions install.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# windows gives me the trauma of my life.

Write-Host "=== Setting up OGL-Renders (Windows) ===" -ForegroundColor Cyan

$vcpkgPath = Join-Path $PSScriptRoot "vcpkg"
if (!(Test-Path $vcpkgPath)) {
Write-Host "Cloning vcpkg..."
git clone https://github.com/microsoft/vcpkg.git $vcpkgPath
Set-Location $vcpkgPath
.\bootstrap-vcpkg.bat
} else {
Write-Host "vcpkg already exists. Updating..."
Set-Location $vcpkgPath
git pull
}

Write-Host "Installing OpenGL dependencies with vcpkg..."
.\vcpkg.exe install glew glfw3 glm --triplet x64-windows

Set-Location $PSScriptRoot
Write-Host "Running build..."
bash build.sh

Write-Host "Setup complete! You can now run your executable from the build directory."
20 changes: 20 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -e

echo "=== Setting up OGL-Renders (Linux/macOS) ==="

if ! command -v cmake &> /dev/null; then
echo "Installing CMake..."
sudo apt-get update
sudo apt-get install -y cmake
fi

echo "Installing OpenGL dependencies..."
sudo apt-get install -y g++ gcc libglfw3-dev libglew-dev libglm-dev \
libx11-dev libxi-dev libxxf86vm-dev libxrandr-dev libxinerama-dev libxcursor-dev

echo "=== Building Project ==="
chmod +x build.sh
./build.sh

echo "Setup complete! You can now run your program from the build directory."