-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.ps1
More file actions
executable file
·69 lines (59 loc) · 2.33 KB
/
Copy pathbuild.ps1
File metadata and controls
executable file
·69 lines (59 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# build.ps1 - Build script for Windows
Write-Host "Edit Sharp Build Script" -ForegroundColor Cyan
Write-Host "=======================" -ForegroundColor Cyan
Write-Host ""
# Build Trimmed AOT version
Write-Host "Building Trimmed AOT Edition..." -ForegroundColor Yellow
dotnet publish edit-sharp/edit-sharp.csproj `
--configuration Release-Trimmed `
--runtime win-x64 `
--self-contained true `
--output ./build/trimmed-aot-win-x64 `
/p:PublishSingleFile=true `
/p:PublishReadyToRun=true `
/p:IncludeNativeLibrariesForSelfExtract=true `
/p:IncludeAllContentForSelfExtract=true
if ($LASTEXITCODE -eq 0) {
Write-Host "✅ Trimmed AOT build complete: ./build/trimmed-aot-win-x64/" -ForegroundColor Green
} else {
Write-Host "❌ Trimmed AOT build failed" -ForegroundColor Red
exit 1
}
Write-Host ""
# Build Full version
Write-Host "Building Full Edition..." -ForegroundColor Yellow
dotnet publish edit-sharp/edit-sharp.csproj `
--configuration Release-Full `
--runtime win-x64 `
--self-contained true `
--output ./build/full-win-x64 `
/p:PublishSingleFile=true `
/p:PublishReadyToRun=true `
/p:IncludeNativeLibrariesForSelfExtract=true `
/p:IncludeAllContentForSelfExtract=true
if ($LASTEXITCODE -eq 0) {
Write-Host "✅ Full build complete: ./build/full-win-x64/" -ForegroundColor Green
} else {
Write-Host "❌ Full build failed" -ForegroundColor Red
exit 1
}
Write-Host ""
Write-Host "Build Summary" -ForegroundColor Cyan
Write-Host "=============" -ForegroundColor Cyan
Write-Host "Trimmed AOT: ./build/trimmed-aot-win-x64/edit-sharp.exe"
Write-Host "Full: ./build/full-win-x64/edit-sharp.exe"
Write-Host ""
# Show file sizes
Write-Host "File Sizes:" -ForegroundColor Cyan
if (Test-Path "./build/trimmed-aot-win-x64/edit-sharp.exe") {
$trimmedSize = (Get-Item "./build/trimmed-aot-win-x64/edit-sharp.exe").Length / 1MB
Write-Host " Trimmed AOT: $([math]::Round($trimmedSize, 2)) MB"
}
if (Test-Path "./build/full-win-x64/edit-sharp.exe") {
$fullSize = (Get-Item "./build/full-win-x64/edit-sharp.exe").Length / 1MB
Write-Host " Full: $([math]::Round($fullSize, 2)) MB"
}
Write-Host ""
Write-Host "To run:" -ForegroundColor Cyan
Write-Host " Trimmed: ./build/trimmed-aot-win-x64/edit-sharp.exe"
Write-Host " Full: ./build/full-win-x64/edit-sharp.exe"