diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..adb36c8 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.exe \ No newline at end of file diff --git a/compile.ps1 b/compile.ps1 new file mode 100644 index 0000000..0a8599b --- /dev/null +++ b/compile.ps1 @@ -0,0 +1,22 @@ +$ErrorActionPreference = "Stop" + +Push-Location (Split-Path $MyInvocation.MyCommand.Path) + +try { + $AhkPath = (Get-ItemProperty "HKLM:/SOFTWARE/AutoHotkey" -ErrorAction Ignore)."InstallDir" + if (-not $AhkPath) { + Write-Error "It looks like AutoHotKey isn't installed. Please see https://www.autohotkey.com/" + } + + $Ahk2Exe = Join-Path $AhkPath "Compiler/Ahk2Exe.exe" + $Base = Join-Path $AhkPath "Compiler/Unicode 32-bit.bin" + + & $Ahk2Exe /in terminal.ahk /base $Base | Out-Host + if ($LASTEXITCODE -ne 0) { return } + + & $Ahk2Exe /in terminal-preview.ahk /base $Base | Out-Host + if ($LASTEXITCODE -ne 0) { return } +} +finally { + Pop-Location +}