Skip to content

Create windows only run_isolated launcher for Windows tutorial recordings #3079

Description

@ReimarBauer

Add run_isolated launcher for Windows tutorial recordings

On Windows, the automated tutorials drive the real GUI with pyautogui and capture the screen with mss, which takes over the interactive desktop. We need a Windows-native equivalent of the Linux xvfb-run approach used in start_tutorial.sh — a launcher that runs the tutorial on a separate, isolated desktop so the user's normal desktop remains unaffected for the duration of the recording.

Proposed solution

Create tutorials/run_isolated.py (invokable as pixi run -e tutorials python -m tutorials.run_isolated tutorial_views 700) that:

  1. Opens the current input desktop as a restore point.
  2. Creates a new Win32 desktop (CreateDesktopW) and switches to it (SwitchDesktop).
  3. Spawns the tutorial module (python -m tutorials.) as a child process pinned to that desktop via STARTUPINFOW.lpDesktop.
  4. Uses a fresh, temporary MSUI_CONFIG_PATH for each run to guarantee a deterministic initial window layout and map section (mirrors start_tutorial.sh's mktemp pattern).
  5. Monitors MSS windows on the isolated desktop and gives the screen-recorder a grace period to finalise the .mp4 after all windows close.
  6. Forcibly terminates the child if a configurable timeout is exceeded.
  7. Always restores the original desktop in a finally block.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions