mirror of
https://github.com/OpenCut-app/OpenCut.git
synced 2026-07-13 21:52:53 +02:00
feat: init desktop app
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Installs the Rust toolchain via rustup.
|
||||
# Run this before any platform-specific setup script.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
CARGO_BIN="$HOME/.cargo/bin/rustup"
|
||||
|
||||
if command -v rustup &> /dev/null || [ -f "$CARGO_BIN" ]; then
|
||||
echo "rustup already installed"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Installing rustup..."
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
echo "Rust installed. Reload your shell: source \"\$HOME/.cargo/env\""
|
||||
@@ -0,0 +1,23 @@
|
||||
# Installs the Rust toolchain via rustup.
|
||||
# Run this before any platform-specific setup script.
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
if (Get-Command cargo -ErrorAction SilentlyContinue) {
|
||||
Write-Output "rustup already installed: $(rustup --version)"
|
||||
exit 0
|
||||
}
|
||||
|
||||
$cargoHome = if ($env:CARGO_HOME) { $env:CARGO_HOME } else { "$env:USERPROFILE\.cargo" }
|
||||
$rustupExe = "$cargoHome\bin\rustup.exe"
|
||||
|
||||
if (-not (Test-Path $rustupExe)) {
|
||||
Write-Output "Installing rustup..."
|
||||
$installer = "$env:TEMP\rustup-init.exe"
|
||||
Invoke-WebRequest -Uri "https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe" -OutFile $installer
|
||||
& $installer -y --default-toolchain stable
|
||||
Remove-Item -Force $installer
|
||||
}
|
||||
|
||||
$env:PATH = "$cargoHome\bin;$env:PATH"
|
||||
Write-Output "Rust installed: $(& rustc --version)"
|
||||
Reference in New Issue
Block a user