Add a machine abstraction to LumaCore, with QEMU as its first backend: templates mirroring frida-core's test guests, a QMP client, and a display that maps QEMU's surface over D-Bus rather than copying frames. Leave readiness to the user: drive the guest, mark it ready, and come back to that snapshot later. Keep the machine in the project, so booting it again resumes where it was marked. Hand the stub to addBareboneDevice, so it joins the picker beside the other devices. Show the display while booting, and afterwards in a Machines panel, which the side panel now models as an enum to share its slot.
14 lines
589 B
Swift
14 lines
589 B
Swift
import Foundation
|
|
|
|
/// A unix socket's path is capped at 104 bytes, and a machine's storage
|
|
/// directory -- a UUID under Application Support -- leaves nowhere near enough
|
|
/// of that for a socket. Its sockets live somewhere short instead.
|
|
enum GuestSocketDirectory {
|
|
static func make() -> URL {
|
|
let directory = FileManager.default.temporaryDirectory
|
|
.appendingPathComponent("luma-\(UUID().uuidString.prefix(8))", isDirectory: true)
|
|
try? FileManager.default.createDirectory(at: directory, withIntermediateDirectories: true)
|
|
return directory
|
|
}
|
|
}
|