Skip to content

Commit

Permalink
Add compile script
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobjmarks committed Jun 28, 2023
1 parent 512d825 commit 8000db0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.exe
22 changes: 22 additions & 0 deletions compile.ps1
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit 8000db0

Please sign in to comment.