-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.ps1
More file actions
28 lines (25 loc) · 746 Bytes
/
build.ps1
File metadata and controls
28 lines (25 loc) · 746 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
# Simple PowerShell build script for SysMonitor
Write-Host "Building SysMonitor..." -ForegroundColor Cyan
$sources = @(
"src/main.cpp"
"src/monitor/SystemMonitor.cpp"
"src/monitor/ProcessInfo.cpp"
"src/visualizer/Visualizer.cpp"
"src/optimizer/Optimizer.cpp"
"src/utils/Config.cpp"
"src/utils/Logger.cpp"
"src/platform/WindowsPlatform.cpp"
)
# Build
& g++ -std=c++11 -O3 `
-Iinclude -Isrc `
$sources `
-lpsapi -lpdh `
-Wl,--subsystem,console `
-o sysmonitor.exe 2>&1
if ($LASTEXITCODE -eq 0) {
Write-Host "`n? BUILD SUCCESSFUL!" -ForegroundColor Green
Write-Host "Run: .\sysmonitor.exe start" -ForegroundColor Yellow
} else {
Write-Host "`n? Build failed" -ForegroundColor Red
}