Import Amiga applications and desktop tools
This commit is contained in:
commit
1c144c9a3c
347 files changed
+423483
No files matched your search
@@ -0,0 +1,25 @@
|
||||
param([string]$Toolchain = $env:AMIGA_TOOLCHAIN)
|
||||
$ErrorActionPreference = 'Stop'
|
||||
if (!$Toolchain) { throw 'Specificare -Toolchain con la cartella che contiene bin e targets/m68k-amigaos.' }
|
||||
$Toolchain = (Resolve-Path -LiteralPath $Toolchain).Path
|
||||
$targetPath = Join-Path $Toolchain 'targets/m68k-amigaos'
|
||||
$buildPath = Join-Path $PSScriptRoot 'build'
|
||||
$configPath = Join-Path $buildPath 'vbcc'
|
||||
New-Item -ItemType Directory -Path (Join-Path $configPath 'config') -Force | Out-Null
|
||||
$config = [IO.File]::ReadAllText((Join-Path $PSScriptRoot 'vbcc-config.in')).Replace('@TARGET@', $targetPath.Replace('\','/'))
|
||||
[IO.File]::WriteAllText((Join-Path $configPath 'config/boing'), $config)
|
||||
$previousVBCC = $env:VBCC
|
||||
$previousPath = $env:PATH
|
||||
try {
|
||||
$env:VBCC = $configPath
|
||||
$env:PATH = (Join-Path $Toolchain 'bin') + ';' + $env:PATH
|
||||
Push-Location -LiteralPath $PSScriptRoot
|
||||
try {
|
||||
& (Join-Path $Toolchain 'bin/vc.exe') +boing -O2 -c99 -o build/RestoreMouse restoremouse.c
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Compilazione fallita.' }
|
||||
} finally { Pop-Location }
|
||||
} finally {
|
||||
$env:VBCC = $previousVBCC
|
||||
$env:PATH = $previousPath
|
||||
}
|
||||
Write-Output ('Pronto per Amiga: ' + $buildPath)
|
||||
Reference in new issue
Block a user