Momentan sieht daher das Powershell-Skript für den Buildschritt wie folgt aus:
Code: Alles auswählen
$au3path=Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\WOW6432Node\AutoIt v3\AutoIt" -Name InstallDir
Start-Process -FilePath "$au3path\AutoIt3_x64.exe" -ArgumentList "`"$pwd\AutoIt3Wrapper.au3`" /autoit3dir `"$au3path`" /in project.au3 /out project.exe" -NoNewWindow -PassThru -RedirectStandardError compiler_err.log -RedirectStandardOutput compiler_out.log -Wait
Get-Content compiler_out.log
Get-Content compiler_err.log
Code: Alles auswählen
$isnpath=Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{7AAAE763-9EE4-448D-994F-94B52EEAA180}_is1" -Name "InstallLocation"
$proc=Start-Process -FilePath "$isnpath\Autoit_Studio.exe" -PassThru -Verbose
Start-Sleep -Seconds 30
& "$isnpath\Data\ISN_cmd.exe" "/isn_open_project project.isn" /isn_compile_project /isn_close_project /isn_shutdown
Stop-Process -Id $proc.Id -Force -Verbose
Der Fehler
Code: Alles auswählen
Aut2exe.exe ended with errors because the target exe wasn't created, abandon build.
Zur Behebung gibt es 3 Möglichkeiten:
- Immer 64-Bit Anwendungen nutzen, siehe oben die AutoIt3Wrapper.au3 mit der AutoIt3_x64.exe aufrufen, wenn ich das 32-Bit AutoIt Studio habe, funktioniert das nicht
- Immer 32-Bit Anwendungen nutzen, laut "ISN AutoIt Studio\Data\AutoIt3Wrapper\AutoIt3Wrapper.au3" Zeile 743ff müsste die $AUT2EXE_PGM durch einen Eintrag in der AutoIt3Wrapper.ini unter [AutoIt] aut2exe=... mit der 32-Bit Version überschrieben werden.
- Die Umgebungsvariable %LOCALAPPDATA% temporär im Skript in einen Pfad ändern, der nicht von der Redirection betroffen ist