mirror of
https://github.com/danbulant/Cosmos
synced 2026-06-11 02:31:22 +00:00
Powershell script works now
This commit is contained in:
parent
c3d44fd40c
commit
5118e18dc8
1 changed files with 27 additions and 2 deletions
|
|
@ -31,8 +31,33 @@ cd ..\..\..\tools\qemu\
|
|||
$qemu = resolve-path qemu.exe
|
||||
$qemuparms = '-L . -cdrom ..\..\build\Cosmos\ISO\Cosmos.iso -boot d -hda ..\..\build\Cosmos\ISO\C-drive.img -serial "file:..\..\build\Cosmos\ISO\serial-debug.txt" -S -s'
|
||||
# Still failing - because its a command line exe? run under cmd.exe?
|
||||
[System.Diagnostics.Process]::Start($qemu, $qemuparms)
|
||||
$processInfo = new-object System.Diagnostics.ProcessStartInfo
|
||||
$processInfo.FileName = $qemu
|
||||
$processInfo.WorkingDirectory = [System.IO.Path]::GetDirectoryName($qemu);
|
||||
$processInfo.Arguments = $qemuparms;
|
||||
$processInfo.UseShellExecute = $False
|
||||
$processInfo.RedirectStandardOutput = $False
|
||||
$processInfo.RedirectStandardError = $False
|
||||
$process = [System.Diagnostics.Process]::Start($processInfo)
|
||||
#if(!($process.WaitForExit(60*1000) -and ($process.ExitCode -eq 0)))
|
||||
#{
|
||||
# Write-Host $process.StandardOutput.ReadToEnd()
|
||||
# Write-Host $process.StandardError.ReadToEnd()
|
||||
#}
|
||||
[System.Threading.Thread]::Sleep(1000)
|
||||
cd ..\gdb\bin\
|
||||
$gdb = resolve-path gdb.exe
|
||||
$gdbparms = '..\..\..\Build\Cosmos\ISO\output.obj --eval-command="target remote:1234"'
|
||||
$process2 = [System.Diagnostics.Process]::Start($gdb, $gdbparms);
|
||||
$process2.WaitForExit()
|
||||
|
||||
pause
|
||||
#http://www.vistax64.com/powershell/114718-how-can-i-execute-wmi-method-asynchronously.html
|
||||
#http://blogs.technet.com/industry_insiders/pages/executing-a-command-line-utility-from-powershell-and-waiting-for-it-to-finish.aspx
|
||||
#invoke-item
|
||||
#invoke-item
|
||||
if(!$process2.HasExited) {
|
||||
$process2.Kill()
|
||||
}
|
||||
if(!$process.HasExited) {
|
||||
$process.Kill()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue