mirror of
https://github.com/reactos/ahk_tests.git
synced 2024-11-27 05:20:25 +00:00
85175a35eb
- Add PowerShell version of compile.sh svn path=/trunk/ahk_tests/; revision=1963
30 lines
619 B
PowerShell
30 lines
619 B
PowerShell
[CmdletBinding()]
|
|
Param(
|
|
[string]$Ahk2Exe = ".\Compiler\ahk2exe.exe",
|
|
[string]$OutDir = ".\AHK-Tests"
|
|
)
|
|
|
|
if (!(Test-Path $Ahk2Exe))
|
|
{
|
|
Write-Output "Please add AHK in the Compiler subdirectory or specify -Ahk2Exe option"
|
|
Exit
|
|
}
|
|
|
|
if (Test-Path $OutDir)
|
|
{
|
|
Remove-Item $OutDir\zz*_test.exe
|
|
}
|
|
else
|
|
{
|
|
$null = New-Item -Type Directory $OutDir
|
|
}
|
|
|
|
$Tests = Get-ChildItem -Recurse -Filter "zz*.ahk"
|
|
foreach ($Test in $Tests)
|
|
{
|
|
$In = $Test.FullName
|
|
$Out = "$OutDir\$($Test.BaseName).exe"
|
|
Write-Verbose "Compiling $In"
|
|
Start-Process $Ahk2Exe "/in ""$In"" /out ""$Out""" -Wait -NoNewWindow
|
|
}
|