diff --git a/install.ps1 b/install.ps1 new file mode 100644 index 0000000..0c73817 --- /dev/null +++ b/install.ps1 @@ -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." diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..19dd4a7 --- /dev/null +++ b/install.sh @@ -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."