-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.ps1
More file actions
32 lines (26 loc) · 812 Bytes
/
build.ps1
File metadata and controls
32 lines (26 loc) · 812 Bytes
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
$ErrorActionPreference = "Stop"
$outputDir = Join-Path $PSScriptRoot "build"
$outputExe = Join-Path $outputDir "mini_taskbar.exe"
$compiler = "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe"
$manifest = Join-Path $PSScriptRoot "app.manifest"
if (-not (Test-Path -LiteralPath $compiler)) {
throw "csc.exe not found: $compiler"
}
New-Item -ItemType Directory -Force -Path $outputDir | Out-Null
& $compiler `
/nologo `
/target:winexe `
/platform:x64 `
/optimize+ `
/reference:Accessibility.dll `
/win32manifest:$manifest `
/out:$outputExe `
(Join-Path $PSScriptRoot "src\Program.cs")
if ($LASTEXITCODE -ne 0) {
throw "MiniTaskbar build failed."
}
$item = Get-Item -LiteralPath $outputExe
[pscustomobject]@{
Path = $item.FullName
Bytes = $item.Length
}