TermRemoteCtl/.codex/environments/environment.toml

36 lines
1.2 KiB
TOML

# THIS IS AUTOGENERATED. DO NOT EDIT MANUALLY
version = 1
name = "TermRemoteCtl"
[setup]
script = ""
[[actions]]
name = "运行"
icon = "run"
command = '''
chcp 65001
[Console]::InputEncoding = [System.Text.UTF8Encoding]::new($false)
[Console]::OutputEncoding = [System.Text.UTF8Encoding]::new($false)
$OutputEncoding = [System.Text.UTF8Encoding]::new($false)
$env:PYTHONUTF8='1'
$env:PYTHONIOENCODING='utf-8'
Set-Location 'D:\App\Flutter\TermRemoteCtl\apps\mobile_app'
C:\tools\flutter\bin\flutter.bat build apk --debug
'''
[[actions]]
name = "后端启动"
icon = "tool"
command = '''
Get-Process dotnet -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue
$proj='D:\App\Flutter\TermRemoteCtl\apps\windows_agent\src\TermRemoteCtl.Agent\TermRemoteCtl.Agent.csproj'
$work='D:\App\Flutter\TermRemoteCtl\work'
New-Item -ItemType Directory -Force $work | Out-Null
$stdout=Join-Path $work 'windows_agent.stdout.log'
$stderr=Join-Path $work 'windows_agent.stderr.log'
$proc=Start-Process dotnet -ArgumentList @('run','--project',$proj) -WorkingDirectory 'D:\App\Flutter\TermRemoteCtl' -RedirectStandardOutput $stdout -RedirectStandardError $stderr -PassThru
Start-Sleep -Seconds 6
Invoke-WebRequest -UseBasicParsing 'http://127.0.0.1:5067/health'
'''