Initial commit — Stage 0 project foundation

- Cargo workspace with engine, editor, tests crates
- oxide-editor binary stub (builds and runs cleanly)
- install.sh for Linux system installation
- README.md with logo, build and install instructions
- GPLv3 LICENSE
- .gitignore

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-02 23:50:44 +02:00
commit e69e5985a9
14 changed files with 1013 additions and 0 deletions

53
install.sh Executable file
View File

@@ -0,0 +1,53 @@
#!/usr/bin/env bash
# install.sh — Build Oxide Engine and install to the system.
#
# Installs:
# /usr/local/bin/oxide-editor — editor binary
# /usr/local/share/oxide/assets/ — shared assets (icons, shaders, etc.)
#
# Usage:
# ./install.sh # installs to /usr/local (may need sudo)
# PREFIX=/opt/oxide ./install.sh
set -euo pipefail
PREFIX="${PREFIX:-/usr/local}"
BIN_DIR="$PREFIX/bin"
SHARE_DIR="$PREFIX/share/oxide"
# ── Colour helpers ────────────────────────────────────────────────────────────
GREEN='\033[0;32m'
CYAN='\033[0;36m'
RED='\033[0;31m'
NC='\033[0m'
info() { echo -e "${CYAN}[oxide]${NC} $*"; }
ok() { echo -e "${GREEN}[oxide]${NC} $*"; }
err() { echo -e "${RED}[oxide] ERROR:${NC} $*" >&2; exit 1; }
# ── Pre-flight ────────────────────────────────────────────────────────────────
command -v cargo &>/dev/null || err "cargo not found — install Rust via https://rustup.rs"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"
# ── Build ─────────────────────────────────────────────────────────────────────
info "Building in release mode…"
cargo build --release --workspace
# ── Install binary ────────────────────────────────────────────────────────────
info "Installing oxide-editor → $BIN_DIR/oxide-editor"
install -Dm755 target/release/oxide-editor "$BIN_DIR/oxide-editor"
# ── Install assets ────────────────────────────────────────────────────────────
if [[ -d assets ]]; then
info "Installing assets → $SHARE_DIR/assets/"
install -d "$SHARE_DIR/assets"
cp -r assets/. "$SHARE_DIR/assets/"
fi
# ── Done ──────────────────────────────────────────────────────────────────────
ok "Installation complete."
echo
echo " Run the editor with: oxide-editor"
echo " Uninstall with: sudo rm $BIN_DIR/oxide-editor && sudo rm -rf $SHARE_DIR"