Add bounded aircraft control and verify current packaged runtime closure
This commit is contained in:
@@ -345,9 +345,11 @@ def validate_paths(root, steam, compat, profile):
|
||||
refuse(f'Unexpected profile symlink: {path}')
|
||||
|
||||
|
||||
def command_for(root, steam, compat, profile, project, packed=None):
|
||||
def command_for(root, steam, compat, profile, project, packed=None, capture_prison_view=False):
|
||||
if project not in {'core', 'chat', CONTROL}:
|
||||
refuse('Unsupported ordinary game project/control')
|
||||
if capture_prison_view and (project == CONTROL or packed is not None):
|
||||
refuse('Prison view capture requires loose successor source with its opt-in observer')
|
||||
command = ['gamescope', '--backend', 'headless', '-W', '1280', '-H', '720',
|
||||
'-w', '1280', '-h', '720', '-r', '30', '--',
|
||||
str(steam/'steamapps/common/Proton - Experimental/proton'), 'run',
|
||||
@@ -364,6 +366,8 @@ def command_for(root, steam, compat, profile, project, packed=None):
|
||||
command += ['-profile', 'Z:'+str(profile)]
|
||||
if project != CONTROL:
|
||||
command += ['-errOrdinaryScenario', project, '-noSplash']
|
||||
if capture_prison_view:
|
||||
command += ['-errOrdinaryScreenshot', '1']
|
||||
return command + ['-noBackend', '-noSound', '-noThrow', '-disableCrashReporter', '-logconsole']
|
||||
|
||||
|
||||
@@ -492,6 +496,8 @@ class StartupMonitor:
|
||||
|
||||
def run(a):
|
||||
packed = packed_request(a)
|
||||
if getattr(a, 'capture_prison_view', False) and (a.project == CONTROL or packed is not None):
|
||||
refuse('Prison view capture requires loose successor source with its opt-in observer')
|
||||
steam, compat = a.steam.resolve(), a.compat.resolve()
|
||||
profile = packed['session']/'profile' if packed else a.profile.resolve()
|
||||
if not 60 <= a.timeout <= 1800 or not 5 <= a.settle <= 120:
|
||||
@@ -517,7 +523,7 @@ def run(a):
|
||||
|
||||
|
||||
def run_locked(a, steam, compat, profile, packed=None):
|
||||
command = command_for(ROOT, steam, compat, profile, a.project, packed)
|
||||
command = command_for(ROOT, steam, compat, profile, a.project, packed, getattr(a, 'capture_prison_view', False))
|
||||
separator = command.index("--")
|
||||
proton, executable = Path(command[separator+1]), Path(command[separator+3])
|
||||
if not proton.is_file() or not executable.is_file():
|
||||
@@ -680,6 +686,7 @@ def main():
|
||||
packed_options.add_argument('--packed-addons', type=Path, help='Unqualified complete core/ai/intel/map/chat packed directories; requires --project chat')
|
||||
parser.add_argument('--packed-session', type=Path, help='New /tmp/erri-packed-core-<name> or erri-packed-chat-<name> session; owns a fresh input copy and profile')
|
||||
parser.add_argument('--inspect-processes', action='store_true', help='Read-only process preflight report; never launch, lock, write a profile or configure audio')
|
||||
parser.add_argument('--capture-prison-view', action='store_true', help='Opt-in single genuine local prison screenshot; loose successor source only, no camera or input changes')
|
||||
parser.add_argument('--timeout', type=int, default=180)
|
||||
parser.add_argument('--settle', type=int, default=15)
|
||||
parser.add_argument('--failure-grace', type=int, default=0, help='Keep a failed run alive for diagnostic logs only, at most 0..30 seconds within the original timeout')
|
||||
|
||||
Reference in New Issue
Block a user