mirror of
https://github.com/utmapp/UTM.git
synced 2026-10-12 02:24:01 +00:00
SwiftTerm 2 no longer exposes the underlying Terminal from TerminalView, so move the terminal views to the copied view APIs: terminalDimensions, resize(cols:rows:), setCursorStyle, softReset and resetToInitialState. The view's resize also soft resets the terminal now, so only call it when the saved size differs, otherwise every resume would reset the guest's modes. Track SwiftTerm from the osy/SwiftTerm fork's fix/visionos-build branch for now: upstream main reads UIWindow.screen, which does not exist on visionOS, and the fork reads the display scale from the trait collection instead so the visionOS build works again. SwiftTerm now ships a build tool plugin, which needs two changes to build_utm.sh for CI. Xcode refuses to run a package plugin the machine has not trusted, so pass -skipPackagePluginValidation. And -sdk also applies to host tools, so the plugin's generator was built for the target platform instead of the Mac and the build could not find it; pick the platform with a generic destination and the architectures with ARCHS instead. Also match the SDK name macosx when picking the default macOS scheme. Take advantage of what the update brings: - Render with Metal on macOS and iOS, falling back to Core Graphics if the GPU pipeline cannot be created. visionOS stays on Core Graphics because SwiftTerm's Metal path draws at the wrong scale there. - Release the renderer with updateUiClosed() when the terminal window closes or the iOS view is dismantled, as SwiftTerm now requires. - Feed guest output straight from the serial port thread; feed() is thread-safe now, so the hop to the main queue is no longer needed. - Add the standard Edit > Find menu on macOS, which the terminal's new find bar is driven from. - Open only http(s) links from the terminal. SwiftTerm now also turns host file paths printed by the guest into links, and its default handler on macOS opens any URL or existing host path, so clicking one could launch a host app. On iOS, let the bell use SwiftTerm's default haptic instead of an empty override. Assisted-by: Claude:claude-opus-5 Assisted-by: Claude:claude-opus-5-5