38 lines
767 B
Odin
38 lines
767 B
Odin
// Odin build script for Dimma
|
|
// Usage: odin build build.odin
|
|
|
|
package build
|
|
|
|
import "core:os"
|
|
import "core:fmt"
|
|
|
|
const (
|
|
OUTPUT_DIR = "../build/"
|
|
APP_NAME = "dimma"
|
|
)
|
|
|
|
main :: proc() {
|
|
// Determine OS and architecture
|
|
os_name := os.GetEnv("ODIN_OS")
|
|
if os_name == "" {
|
|
os_name = os.Environ()[0] // Fallback
|
|
}
|
|
|
|
arch := os.GetEnv("ODIN_ARCH")
|
|
if arch == "" {
|
|
arch = "amd64" // Default
|
|
}
|
|
|
|
output_path := OUTPUT_DIR + APP_NAME + "-" + os_name + "-" + arch
|
|
|
|
// Create build directory
|
|
os.MkdirAll(OUTPUT_DIR, 0755)
|
|
|
|
fmt.printf("Building Dimma for %s/%s...\n", os_name, arch)
|
|
fmt.printf("Output: %s\n", output_path)
|
|
|
|
// Build command would be:
|
|
// odin build main.odin -out:%s -build-mode:exe -target:.)...
|
|
// with appropriate raylib/raygui paths
|
|
}
|