Initial project scaffold for Dimma

This commit is contained in:
2026-06-10 20:53:30 +02:00
commit 64f55c81b0
17 changed files with 702 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
# Run script for Dimma (PowerShell)
# Usage: .\run.ps1 [platform] [arch]
# Platform can be: linux, windows, darwin
# Default: auto-detects current platform
$PROJECT_DIR = Resolve-Path (Split-Path $PSScriptRoot -Parent)
$BUILD_DIR = "$PROJECT_DIR\build"
$PLATFORM = if ($args.Count -gt 0) { $args[0] } else { $env:GOOS }
$ARCH = if ($args.Count -gt 1) { $args[1] } else { $env:GOARCH }
if ($PLATFORM -eq "") { $PLATFORM = $IsWindows -as [string] ? "windows" : ($IsLinux -as [string] ? "linux" : "darwin") }
if ($ARCH -eq "") { $ARCH = $env:PROCESSOR_ARCHITEW6432 -replace "AMD64", "amd64" -replace "ARM64", "arm64" }
$BINARY = "$BUILD_DIR\dimma-$PLATFORM-$ARCH"
if ($PLATFORM -eq "windows") { $BINARY = "$BINARY.exe" }
if (-not (Test-Path $BINARY)) {
Write-Host "Binary not found: $BINARY"
Write-Host "Available binaries in $BUILD_DIR:"
Get-ChildItem $BUILD_DIR
exit 1
}
Write-Host "Running: $BINARY"
& $BINARY