KAZIK/tools/build_graphics.ps1

13 lines
704 B
PowerShell

param([string]$MasmRoot = 'F:\MASM32\masm32')
$ErrorActionPreference = 'Stop'
$root = Split-Path $PSScriptRoot -Parent
Push-Location $root
try {
& "$MasmRoot\bin\ml.exe" /c /coff /Cp /nologo /I. /Fobuild\graphics\poker.obj poker.asm
if ($LASTEXITCODE -ne 0) { throw 'MASM assembly failed' }
& "$MasmRoot\bin\link.exe" /nologo /SUBSYSTEM:WINDOWS /RELEASE /VERSION:5.0 "/LIBPATH:$MasmRoot\lib" /OUT:build\graphics\poker.exe build\graphics\poker.obj build\casino_icon.res kernel32.lib winmm.lib user32.lib ws2_32.lib gdi32.lib
if ($LASTEXITCODE -ne 0) { throw 'Link failed' }
Write-Output 'Built build\graphics\poker.exe. Publish only after verification.'
} finally {
Pop-Location
}