mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
46 lines
1.7 KiB
PowerShell
46 lines
1.7 KiB
PowerShell
# Export Script for Cirno No Reason
|
|
# Exports game builds for Windows and Linux platforms
|
|
# Import the module
|
|
$modulePath = Join-Path $PSScriptRoot "CirnoBuild.psm1"
|
|
Import-Module $modulePath -Force
|
|
# Configuration
|
|
$godotPath = $env:GODOT
|
|
$buildDir = ".\build"
|
|
$platforms = Get-PlatformConfigurations
|
|
# Validate prerequisites
|
|
$prereqResult = Test-Prerequisites -GodotPath $godotPath -SkipButler
|
|
if (-not $prereqResult.Valid) {
|
|
exit 1
|
|
}
|
|
# Use resolved path if available
|
|
if ($prereqResult.ResolvedGodotPath) {
|
|
$godotPath = $prereqResult.ResolvedGodotPath
|
|
}
|
|
Write-Host "Using Godot at: $godotPath" -ForegroundColor Green
|
|
Write-Host ""
|
|
# Step 1: Clear the build directory
|
|
Write-Host "Clearing build directory..."
|
|
Initialize-BuildDirectories -PlatformsToBuild @("win", "linux") -BuildDir $buildDir
|
|
# Step 2: Get version data from GitVersion
|
|
$versionInfo = Get-VersionInfo
|
|
# Step 3: Update export_presets.cfg
|
|
Update-ExportConfig -VersionInfo $versionInfo
|
|
# Step 4: Export builds
|
|
$results = @{}
|
|
foreach ($platformKey in $platforms.Keys) {
|
|
Write-Host ""
|
|
$results[$platformKey] = Export-GodotPlatform -Platform $platformKey `
|
|
-GodotPath $godotPath `
|
|
-BuildDir $buildDir `
|
|
-VersionInfo $versionInfo
|
|
}
|
|
Write-Host ""
|
|
Write-Host "=====================================" -ForegroundColor Cyan
|
|
Write-Host " Export Summary" -ForegroundColor Cyan
|
|
Write-Host "=====================================" -ForegroundColor Cyan
|
|
foreach ($platformKey in $results.Keys) {
|
|
$status = if ($results[$platformKey]) { "SUCCESS" } else { "FAILED" }
|
|
$color = if ($results[$platformKey]) { "Green" } else { "Red" }
|
|
Write-Host " $platformKey : $status" -ForegroundColor $color
|
|
}
|
|
Write-Host ""
|