updates
This commit is contained in:
+283
-181
@@ -1,217 +1,319 @@
|
|||||||
import AppKit
|
import AppKit
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
|
private enum OrionStyle {
|
||||||
|
static let panel = Color(red: 0.105, green: 0.14, blue: 0.20)
|
||||||
|
static let card = Color(red: 0.15, green: 0.19, blue: 0.25)
|
||||||
|
static let blue = Color(red: 0.08, green: 0.39, blue: 0.91)
|
||||||
|
static let green = Color(red: 0.05, green: 0.88, blue: 0.49)
|
||||||
|
static let red = Color(red: 0.91, green: 0.19, blue: 0.23)
|
||||||
|
static let muted = Color(red: 0.62, green: 0.73, blue: 0.86)
|
||||||
|
}
|
||||||
|
|
||||||
struct OrionMenuView: View {
|
struct OrionMenuView: View {
|
||||||
@EnvironmentObject private var vm: OrionVMController
|
@EnvironmentObject private var vm: OrionVMController
|
||||||
@Environment(\.openSettings) private var openSettings
|
@Environment(\.openSettings) private var openSettings
|
||||||
@State private var expanded: Set<String> = []
|
@State private var showRunning = true
|
||||||
@State private var expandedServers: Set<UUID> = []
|
@State private var showAll = true
|
||||||
|
@State private var showIntegrated = true
|
||||||
|
@State private var pendingRemoval: ServerDefinition?
|
||||||
|
@State private var pendingForceStop: ParallelsVM?
|
||||||
|
|
||||||
private var groups: [String] {
|
private var running: [ParallelsVM] {
|
||||||
let order = ["Windows", "Ubuntu", "Debian", "Fedora", "CentOS", "Alpine", "Oracle Linux", "Rocky Linux", "AlmaLinux", "Arch Linux", "Gentoo", "FreeBSD", "Other"]
|
vm.discoveredVMs.filter { $0.status.lowercased() == "running" }
|
||||||
return order.filter { os in vm.discoveredVMs.contains { $0.operatingSystem == os } }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack(spacing: 0) {
|
VStack(spacing: 0) {
|
||||||
HStack {
|
header
|
||||||
Label("OrionToolbar", systemImage: "server.rack").font(.headline)
|
Divider().overlay(.white.opacity(0.10))
|
||||||
Spacer()
|
|
||||||
if vm.discovering { ProgressView().controlSize(.small) }
|
|
||||||
Button { Task { await vm.discoverVMs() } } label: { Image(systemName: "arrow.clockwise") }
|
|
||||||
.buttonStyle(.borderless).help("Refresh virtual machines")
|
|
||||||
}.padding(14)
|
|
||||||
Divider()
|
|
||||||
ScrollView {
|
ScrollView {
|
||||||
VStack(alignment: .leading, spacing: 10) {
|
VStack(alignment: .leading, spacing: 15) {
|
||||||
runningSection
|
section(icon: "play.fill", title: "Running Virtual Machines", count: "\(running.count) running", accent: OrionStyle.green, expanded: $showRunning) {
|
||||||
Divider()
|
if running.isEmpty {
|
||||||
Text("PARALLELS VIRTUAL MACHINES").font(.caption.bold()).foregroundStyle(.secondary)
|
emptyState("No running virtual machines", icon: "moon.zzz")
|
||||||
if vm.discoveredVMs.isEmpty {
|
} else {
|
||||||
Text(vm.discovering ? "Discovering virtual machines…" : "No VMs found. Use Refresh to try again.")
|
ForEach(running) { machine in
|
||||||
.foregroundStyle(.secondary).padding(.vertical, 18)
|
runningRow(machine)
|
||||||
}
|
|
||||||
ForEach(groups, id: \.self) { os in
|
|
||||||
VStack(alignment: .leading, spacing: 4) {
|
|
||||||
Button {
|
|
||||||
if !expanded.insert(os).inserted { expanded.remove(os) }
|
|
||||||
} label: {
|
|
||||||
HStack {
|
|
||||||
Image(systemName: expanded.contains(os) ? "chevron.down" : "chevron.right")
|
|
||||||
.frame(width: 14)
|
|
||||||
Text(os).fontWeight(.semibold)
|
|
||||||
Spacer()
|
|
||||||
Text("\(vm.discoveredVMs.filter { $0.operatingSystem == os }.count)")
|
|
||||||
.foregroundStyle(.secondary)
|
|
||||||
}.contentShape(Rectangle()).padding(.vertical, 5)
|
|
||||||
}.buttonStyle(.plain)
|
|
||||||
if expanded.contains(os) {
|
|
||||||
ForEach(vm.discoveredVMs.filter { $0.operatingSystem == os }) { machine in
|
|
||||||
vmRow(machine)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if !vm.discoveredVMs.isEmpty {
|
section(icon: "desktopcomputer", title: "All Virtual Machines", count: "\(vm.discoveredVMs.count) VMs", accent: .cyan, expanded: $showAll) {
|
||||||
HStack {
|
if vm.discoveredVMs.isEmpty {
|
||||||
Button("Select All") { vm.selectAllVMs() }
|
emptyState(vm.discovering ? "Discovering Parallels VMs…" : "No virtual machines found", icon: "desktopcomputer.trianglebadge.exclamationmark")
|
||||||
Button("Clear") { vm.clearVMSelection() }
|
} else {
|
||||||
Spacer()
|
ForEach(vm.discoveredVMs) { machine in
|
||||||
Button("Integrate Selected") { vm.integrateSelectedVMs() }
|
machineRow(machine)
|
||||||
.disabled(vm.selectedVMIDs.isEmpty)
|
}
|
||||||
}.font(.caption)
|
}
|
||||||
|
}
|
||||||
|
section(icon: "server.rack", title: "Integrated Servers", count: "\(vm.servers.count) servers", accent: OrionStyle.blue, expanded: $showIntegrated) {
|
||||||
|
if vm.servers.isEmpty {
|
||||||
|
emptyState("No integrations. Add a VM using + above.", icon: "plus.circle")
|
||||||
|
} else {
|
||||||
|
ForEach(vm.servers) { server in
|
||||||
|
integratedRow(server)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Divider()
|
|
||||||
Text("INTEGRATED SERVERS").font(.caption.bold()).foregroundStyle(.secondary)
|
|
||||||
ForEach(vm.servers) { server in serverRow(server) }
|
|
||||||
}.padding(14)
|
|
||||||
}.frame(height: 490)
|
|
||||||
Divider()
|
|
||||||
HStack {
|
|
||||||
Button("Parallels") { vm.openParallels() }
|
|
||||||
Spacer()
|
|
||||||
Button("Settings…") {
|
|
||||||
openSettings()
|
|
||||||
NSApplication.shared.activate(ignoringOtherApps: true)
|
|
||||||
}
|
}
|
||||||
Button("Quit") { NSApplication.shared.terminate(nil) }
|
.padding(14)
|
||||||
}.padding(14)
|
}
|
||||||
|
.frame(height: 570)
|
||||||
|
Divider().overlay(.white.opacity(0.10))
|
||||||
|
footer
|
||||||
}
|
}
|
||||||
.frame(width: 460)
|
.frame(width: 790)
|
||||||
.task { await vm.discoverVMs() }
|
.background(
|
||||||
.alert("OrionToolbar", isPresented: Binding(
|
LinearGradient(colors: [Color(red: 0.10, green: 0.15, blue: 0.23), Color(red: 0.075, green: 0.09, blue: 0.13)], startPoint: .topTrailing, endPoint: .bottomLeading)
|
||||||
get: { vm.lastError != nil },
|
)
|
||||||
set: { if !$0 { vm.lastError = nil } }
|
.preferredColorScheme(.dark)
|
||||||
)) { Button("OK") { vm.lastError = nil } }
|
.task { await vm.discoverVMs(); await vm.refreshAll() }
|
||||||
message: { Text(vm.lastError ?? "") }
|
.alert("OrionToolbar", isPresented: Binding(get: { vm.lastError != nil }, set: { if !$0 { vm.lastError = nil } })) {
|
||||||
|
Button("OK") { vm.lastError = nil }
|
||||||
|
} message: { Text(vm.lastError ?? "") }
|
||||||
|
.confirmationDialog("Remove server integration?", isPresented: Binding(get: { pendingRemoval != nil }, set: { if !$0 { pendingRemoval = nil } }), titleVisibility: .visible) {
|
||||||
|
Button("Remove Integration", role: .destructive) {
|
||||||
|
if let server = pendingRemoval { vm.removeDefinition(server) }
|
||||||
|
pendingRemoval = nil
|
||||||
|
}
|
||||||
|
Button("Cancel", role: .cancel) { pendingRemoval = nil }
|
||||||
|
} message: {
|
||||||
|
Text("The Parallels virtual machine will not be deleted.")
|
||||||
|
}
|
||||||
|
.confirmationDialog("Force stop virtual machine?", isPresented: Binding(get: { pendingForceStop != nil }, set: { if !$0 { pendingForceStop = nil } }), titleVisibility: .visible) {
|
||||||
|
Button("Force Stop", role: .destructive) {
|
||||||
|
if let machine = pendingForceStop { vm.operate(machine, action: "force-stop") }
|
||||||
|
pendingForceStop = nil
|
||||||
|
}
|
||||||
|
Button("Cancel", role: .cancel) { pendingForceStop = nil }
|
||||||
|
} message: { Text("Force Stop immediately powers off the VM and can cause data loss.") }
|
||||||
}
|
}
|
||||||
|
|
||||||
private var runningSection: some View {
|
private var header: some View {
|
||||||
VStack(alignment: .leading, spacing: 8) {
|
HStack(spacing: 12) {
|
||||||
HStack {
|
Image(systemName: "server.rack")
|
||||||
Label("RUNNING VIRTUAL MACHINES", systemImage: "play.circle.fill")
|
.font(.system(size: 22, weight: .bold))
|
||||||
.font(.caption.bold())
|
.foregroundStyle(.cyan)
|
||||||
Spacer()
|
.frame(width: 37, height: 37)
|
||||||
Text("\(vm.runningVMs.count) running")
|
.background(OrionStyle.blue.opacity(0.24), in: RoundedRectangle(cornerRadius: 10))
|
||||||
.font(.caption)
|
Text("OrionToolbar").font(.system(size: 21, weight: .bold))
|
||||||
.foregroundStyle(.secondary)
|
Circle().fill(vm.discoveredVMs.isEmpty ? Color.orange : OrionStyle.green).frame(width: 8, height: 8)
|
||||||
}
|
Text(vm.discoveredVMs.isEmpty ? "Waiting for Parallels" : "Parallels Connected")
|
||||||
if vm.runningVMs.isEmpty {
|
.foregroundStyle(OrionStyle.muted).font(.subheadline)
|
||||||
Text("No running VMs detected")
|
Spacer()
|
||||||
.font(.caption)
|
if vm.discovering { ProgressView().controlSize(.small) }
|
||||||
.foregroundStyle(.secondary)
|
Button { Task { await vm.discoverVMs(); await vm.refreshAll() } } label: {
|
||||||
.padding(.vertical, 8)
|
Image(systemName: "arrow.clockwise").font(.system(size: 16, weight: .semibold))
|
||||||
}
|
}.buttonStyle(OrionActionStyle(tint: OrionStyle.card)).help("Refresh virtual machines")
|
||||||
ForEach(vm.runningVMs) { machine in
|
Button { showSettings() } label: {
|
||||||
VStack(alignment: .leading, spacing: 6) {
|
Image(systemName: "gearshape.fill").font(.system(size: 16))
|
||||||
HStack {
|
}.buttonStyle(OrionActionStyle(tint: OrionStyle.card)).help("Settings")
|
||||||
vmIcon(machine)
|
}.padding(.horizontal, 17).padding(.vertical, 13)
|
||||||
VStack(alignment: .leading, spacing: 2) {
|
|
||||||
Text(machine.name).fontWeight(.medium)
|
|
||||||
Text("Running").font(.caption).foregroundStyle(.green)
|
|
||||||
}
|
|
||||||
Spacer()
|
|
||||||
if vm.busyVMIDs.contains(machine.id) {
|
|
||||||
ProgressView().controlSize(.small)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
HStack {
|
|
||||||
Button("Stop") { vm.operate(machine, action: "stop") }
|
|
||||||
Button("Restart") { vm.operate(machine, action: "restart") }
|
|
||||||
Button("Force Stop", role: .destructive) {
|
|
||||||
vm.operate(machine, action: "force-stop")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.controlSize(.small)
|
|
||||||
.disabled(vm.busyVMIDs.contains(machine.id))
|
|
||||||
}
|
|
||||||
.padding(9)
|
|
||||||
.background(.quaternary.opacity(0.3), in: RoundedRectangle(cornerRadius: 8))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private func vmRow(_ machine: ParallelsVM) -> some View {
|
private func section<Content: View>(icon: String, title: String, count: String, accent: Color, expanded: Binding<Bool>, @ViewBuilder content: () -> Content) -> some View {
|
||||||
HStack(spacing: 9) {
|
VStack(spacing: 4) {
|
||||||
Toggle("", isOn: Binding(
|
Button { expanded.wrappedValue.toggle() } label: {
|
||||||
get: { vm.selectedVMIDs.contains(machine.id) },
|
HStack(spacing: 10) {
|
||||||
set: { selected in
|
Image(systemName: icon).font(.system(size: 17, weight: .bold))
|
||||||
if selected { vm.selectedVMIDs.insert(machine.id) }
|
.foregroundStyle(accent).frame(width: 27)
|
||||||
else { vm.selectedVMIDs.remove(machine.id) }
|
Text(title).font(.system(size: 16, weight: .semibold))
|
||||||
|
Spacer()
|
||||||
|
Text(count).font(.caption.weight(.medium))
|
||||||
|
.foregroundStyle(accent)
|
||||||
|
.padding(.horizontal, 10).padding(.vertical, 5)
|
||||||
|
.background(accent.opacity(0.13), in: RoundedRectangle(cornerRadius: 8))
|
||||||
|
Image(systemName: expanded.wrappedValue ? "chevron.up" : "chevron.down")
|
||||||
|
.font(.caption.weight(.bold)).foregroundStyle(OrionStyle.muted)
|
||||||
}
|
}
|
||||||
)).labelsHidden().toggleStyle(.checkbox)
|
.contentShape(Rectangle())
|
||||||
vmIcon(machine)
|
.padding(.horizontal, 11).padding(.vertical, 10)
|
||||||
VStack(alignment: .leading, spacing: 2) {
|
}.buttonStyle(.plain)
|
||||||
Text(machine.name).lineLimit(1)
|
if expanded.wrappedValue {
|
||||||
Text(machine.status.capitalized).font(.caption)
|
VStack(spacing: 3) { content() }
|
||||||
.foregroundStyle(machine.status == "running" ? Color.green : Color.secondary)
|
.padding(.horizontal, 5).padding(.bottom, 7)
|
||||||
}
|
}
|
||||||
Spacer(minLength: 4)
|
}
|
||||||
if vm.busyVMIDs.contains(machine.id) { ProgressView().controlSize(.small) }
|
.background(OrionStyle.panel.opacity(0.92), in: RoundedRectangle(cornerRadius: 16))
|
||||||
else if machine.status == "stopped" {
|
.overlay(RoundedRectangle(cornerRadius: 16).strokeBorder(.white.opacity(0.09)))
|
||||||
Button("Start") { vm.operate(machine, action: "start") }
|
}
|
||||||
} else if machine.status == "running" {
|
|
||||||
Button("Stop") { vm.operate(machine, action: "stop") }
|
private func emptyState(_ title: String, icon: String) -> some View {
|
||||||
} else if machine.status == "suspended" {
|
Label(title, systemImage: icon)
|
||||||
Button("Resume") { vm.operate(machine, action: "resume") }
|
.font(.subheadline).foregroundStyle(OrionStyle.muted)
|
||||||
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
.padding(15)
|
||||||
|
}
|
||||||
|
|
||||||
|
private func icon(_ machine: ParallelsVM) -> some View {
|
||||||
|
Group {
|
||||||
|
if let image = vm.icon(for: machine) {
|
||||||
|
Image(nsImage: image).resizable().scaledToFit()
|
||||||
} else {
|
} else {
|
||||||
Button("Start") { vm.operate(machine, action: "start") }
|
Image(systemName: machine.operatingSystem == "Windows" ? "desktopcomputer" : "server.rack")
|
||||||
.help("Try starting VM (Parallels reports: \(machine.status))")
|
.font(.system(size: 21, weight: .medium))
|
||||||
|
.foregroundStyle(.white)
|
||||||
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
|
.background(osColor(machine.operatingSystem), in: Circle())
|
||||||
|
}
|
||||||
|
}.frame(width: 36, height: 36)
|
||||||
|
}
|
||||||
|
|
||||||
|
private func osColor(_ os: String) -> Color {
|
||||||
|
switch os {
|
||||||
|
case "Ubuntu": return .orange
|
||||||
|
case "Debian": return .pink
|
||||||
|
case "Fedora": return .blue
|
||||||
|
case "CentOS": return .purple
|
||||||
|
case "Alpine": return .teal
|
||||||
|
case "Windows": return .cyan
|
||||||
|
default: return OrionStyle.blue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private func state(_ status: String) -> some View {
|
||||||
|
let s = status.lowercased()
|
||||||
|
let color: Color = s == "running" ? OrionStyle.green : (s == "stopped" ? OrionStyle.muted : .orange)
|
||||||
|
return HStack(spacing: 6) {
|
||||||
|
Circle().fill(color).frame(width: 8, height: 8)
|
||||||
|
Text(status.capitalized).font(.system(size: 12, weight: .medium))
|
||||||
|
.foregroundStyle(color)
|
||||||
|
}.frame(width: 103, alignment: .leading)
|
||||||
|
}
|
||||||
|
|
||||||
|
private func integrated(_ machine: ParallelsVM) -> ServerDefinition? {
|
||||||
|
vm.servers.first { $0.vmUUID == machine.id || $0.vmName == machine.name }
|
||||||
|
}
|
||||||
|
|
||||||
|
private func runningRow(_ machine: ParallelsVM) -> some View {
|
||||||
|
HStack(spacing: 10) {
|
||||||
|
icon(machine)
|
||||||
|
Text(machine.name).font(.system(size: 12, weight: .semibold)).lineLimit(1).frame(width: 150, alignment: .leading)
|
||||||
|
state(machine.status)
|
||||||
|
Text(machine.ipAddress.isEmpty ? "—" : machine.ipAddress)
|
||||||
|
.font(.system(size: 11, design: .monospaced))
|
||||||
|
.foregroundStyle(OrionStyle.muted).lineLimit(1).frame(width: 100, alignment: .leading)
|
||||||
|
Spacer(minLength: 0)
|
||||||
|
if let server = integrated(machine) {
|
||||||
|
action("SSH", "terminal", tint: OrionStyle.blue) { vm.openSSH(server) }
|
||||||
|
.disabled(server.host.isEmpty || server.sshUser.isEmpty)
|
||||||
|
action("Mailpit", "globe", tint: OrionStyle.blue) { vm.openMailpit(server) }
|
||||||
|
.disabled(server.host.isEmpty || server.mailpitPort == nil)
|
||||||
|
}
|
||||||
|
action("Restart", "arrow.clockwise", tint: OrionStyle.card) { vm.operate(machine, action: "restart") }
|
||||||
|
action("Stop", "stop.fill", tint: OrionStyle.red) { vm.operate(machine, action: "stop") }
|
||||||
|
Menu {
|
||||||
|
Button("Force Stop", role: .destructive) { pendingForceStop = machine }
|
||||||
|
} label: {
|
||||||
|
Image(systemName: "ellipsis").frame(width: 16)
|
||||||
|
}.menuStyle(.borderlessButton).frame(width: 22)
|
||||||
|
.help("More VM actions")
|
||||||
|
}
|
||||||
|
.disabled(vm.busyVMIDs.contains(machine.id))
|
||||||
|
.padding(.horizontal, 10).padding(.vertical, 7)
|
||||||
|
.background(OrionStyle.card.opacity(0.75), in: RoundedRectangle(cornerRadius: 10))
|
||||||
|
}
|
||||||
|
|
||||||
|
private func machineRow(_ machine: ParallelsVM) -> some View {
|
||||||
|
HStack(spacing: 10) {
|
||||||
|
icon(machine)
|
||||||
|
Text(machine.name).font(.system(size: 12, weight: .semibold)).lineLimit(1).frame(width: 180, alignment: .leading)
|
||||||
|
state(machine.status)
|
||||||
|
Text(machine.ipAddress.isEmpty ? "—" : machine.ipAddress)
|
||||||
|
.font(.system(size: 11, design: .monospaced))
|
||||||
|
.foregroundStyle(OrionStyle.muted).lineLimit(1)
|
||||||
|
Spacer(minLength: 2)
|
||||||
|
if vm.busyVMIDs.contains(machine.id) { ProgressView().controlSize(.small) }
|
||||||
|
else if machine.status.lowercased() == "running" {
|
||||||
|
action("Stop", "stop.fill", tint: OrionStyle.red) { vm.operate(machine, action: "stop") }
|
||||||
|
} else if ["suspended", "paused"].contains(machine.status.lowercased()) {
|
||||||
|
action("Resume", "play.fill", tint: OrionStyle.blue) { vm.operate(machine, action: "resume") }
|
||||||
|
} else {
|
||||||
|
action("Start", "play.fill", tint: OrionStyle.blue) { vm.operate(machine, action: "start") }
|
||||||
}
|
}
|
||||||
if vm.isIntegrated(machine) {
|
if vm.isIntegrated(machine) {
|
||||||
Image(systemName: "checkmark.circle.fill").foregroundStyle(.green).help("Integrated")
|
Image(systemName: "checkmark.circle.fill").foregroundStyle(OrionStyle.green)
|
||||||
|
.frame(width: 28).help("Integrated")
|
||||||
} else {
|
} else {
|
||||||
Button { vm.integrate(machine) } label: { Image(systemName: "plus.circle") }
|
Button { vm.integrate(machine) } label: {
|
||||||
.help("Integrate VM")
|
Image(systemName: "plus.circle").font(.system(size: 20))
|
||||||
|
}.buttonStyle(.plain).foregroundStyle(OrionStyle.muted)
|
||||||
|
.frame(width: 28).help("Integrate VM")
|
||||||
}
|
}
|
||||||
}.padding(.leading, 20).padding(.vertical, 4)
|
Menu {
|
||||||
|
Button("Open in Parallels") { vm.openParallels() }
|
||||||
|
if machine.status.lowercased() == "running" {
|
||||||
|
Button("Restart") { vm.operate(machine, action: "restart") }
|
||||||
|
Button("Force Stop", role: .destructive) { pendingForceStop = machine }
|
||||||
|
}
|
||||||
|
} label: { Image(systemName: "chevron.right").foregroundStyle(OrionStyle.muted) }
|
||||||
|
.menuStyle(.borderlessButton).frame(width: 22)
|
||||||
|
}
|
||||||
|
.padding(.horizontal, 10).padding(.vertical, 7)
|
||||||
|
.background(OrionStyle.card.opacity(0.75), in: RoundedRectangle(cornerRadius: 10))
|
||||||
}
|
}
|
||||||
|
|
||||||
private func vmIcon(_ machine: ParallelsVM) -> some View {
|
private func integratedRow(_ server: ServerDefinition) -> some View {
|
||||||
Group {
|
let machine = vm.discoveredVMs.first { $0.id == server.vmUUID || $0.name == server.vmName }
|
||||||
if let icon = vm.icon(for: machine) {
|
let status = machine?.status ?? "unavailable"
|
||||||
Image(nsImage: icon).resizable().scaledToFit()
|
return HStack(spacing: 10) {
|
||||||
} else {
|
if let machine { icon(machine) }
|
||||||
Image(systemName: machine.symbol).resizable().scaledToFit().padding(4)
|
else { Image(systemName: "server.rack").frame(width: 36, height: 36).foregroundStyle(.cyan) }
|
||||||
|
Text(server.name).font(.system(size: 12, weight: .semibold)).lineLimit(1).frame(width: 125, alignment: .leading)
|
||||||
|
state(status)
|
||||||
|
Text(server.host.isEmpty ? "—" : server.host)
|
||||||
|
.font(.system(size: 11, design: .monospaced)).foregroundStyle(OrionStyle.muted)
|
||||||
|
.lineLimit(1).frame(width: 98, alignment: .leading)
|
||||||
|
Spacer(minLength: 0)
|
||||||
|
if let machine {
|
||||||
|
if status.lowercased() == "running" {
|
||||||
|
action("Stop", "stop.fill", tint: OrionStyle.red) { vm.operate(machine, action: "stop") }
|
||||||
|
} else {
|
||||||
|
action("Start", "play.fill", tint: OrionStyle.blue) { vm.operate(machine, action: "start") }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}.frame(width: 30, height: 30)
|
action("SSH", "terminal", tint: OrionStyle.card) { vm.openSSH(server) }
|
||||||
|
.disabled(status.lowercased() != "running" || server.host.isEmpty || server.sshUser.isEmpty)
|
||||||
|
action("Mailpit", "globe", tint: OrionStyle.card) { vm.openMailpit(server) }
|
||||||
|
.disabled(status.lowercased() != "running" || server.host.isEmpty || server.mailpitPort == nil)
|
||||||
|
action("Remove", "trash", tint: OrionStyle.card) { pendingRemoval = server }
|
||||||
|
}
|
||||||
|
.padding(.horizontal, 10).padding(.vertical, 7)
|
||||||
|
.background(OrionStyle.card.opacity(0.75), in: RoundedRectangle(cornerRadius: 10))
|
||||||
}
|
}
|
||||||
|
|
||||||
private func serverRow(_ server: ServerDefinition) -> some View {
|
private func action(_ title: String, _ symbol: String, tint: Color, perform: @escaping () -> Void) -> some View {
|
||||||
let status = vm.status(for: server)
|
Button(action: perform) {
|
||||||
return VStack(alignment: .leading, spacing: 6) {
|
Label(title, systemImage: symbol)
|
||||||
Button {
|
.font(.system(size: 11, weight: .semibold))
|
||||||
if !expandedServers.insert(server.id).inserted { expandedServers.remove(server.id) }
|
.lineLimit(1)
|
||||||
} label: {
|
.frame(minWidth: 56)
|
||||||
HStack {
|
}.buttonStyle(OrionActionStyle(tint: tint))
|
||||||
Image(systemName: expandedServers.contains(server.id) ? "chevron.down" : "chevron.right")
|
}
|
||||||
if let icon = vm.icon(for: server) {
|
|
||||||
Image(nsImage: icon).resizable().scaledToFit().frame(width: 25, height: 25)
|
private var footer: some View {
|
||||||
} else { Image(systemName: "server.rack") }
|
HStack {
|
||||||
Text(server.name)
|
action("Open Parallels", "macwindow", tint: OrionStyle.card) { vm.openParallels() }
|
||||||
Spacer()
|
Spacer()
|
||||||
Text(status.title).foregroundStyle(.secondary)
|
action("Settings…", "gearshape", tint: OrionStyle.card) { showSettings() }
|
||||||
}.contentShape(Rectangle())
|
action("Quit", "power", tint: OrionStyle.card) { NSApplication.shared.terminate(nil) }
|
||||||
}.buttonStyle(.plain)
|
}.padding(.horizontal, 17).padding(.vertical, 12)
|
||||||
if expandedServers.contains(server.id) {
|
}
|
||||||
HStack {
|
|
||||||
if status == .stopped {
|
private func showSettings() {
|
||||||
Button("Start") { vm.start(server) }
|
openSettings()
|
||||||
} else if status == .running {
|
NSApplication.shared.activate(ignoringOtherApps: true)
|
||||||
Button("Stop") { vm.stop(server) }
|
}
|
||||||
Button("Restart") { vm.restart(server) }
|
}
|
||||||
}
|
|
||||||
Button("SSH") { vm.openSSH(server) }
|
private struct OrionActionStyle: ButtonStyle {
|
||||||
.disabled(status != .running || server.host.isEmpty || server.sshUser.isEmpty)
|
let tint: Color
|
||||||
Button("Mailpit") { vm.openMailpit(server) }
|
func makeBody(configuration: Configuration) -> some View {
|
||||||
.disabled(status != .running || server.host.isEmpty || server.mailpitPort == nil)
|
configuration.label
|
||||||
Button("Remove", role: .destructive) {
|
.foregroundStyle(.white)
|
||||||
expandedServers.remove(server.id)
|
.padding(.horizontal, 10).padding(.vertical, 8)
|
||||||
vm.removeDefinition(server)
|
.background(tint.opacity(configuration.isPressed ? 0.65 : 1), in: RoundedRectangle(cornerRadius: 8))
|
||||||
}
|
.opacity(configuration.isPressed ? 0.8 : 1)
|
||||||
.help("Remove integration only; the VM is not deleted")
|
|
||||||
}.padding(.leading, 30)
|
|
||||||
}
|
|
||||||
}.padding(.vertical, 4)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,217 @@
|
|||||||
|
import AppKit
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct OrionMenuView: View {
|
||||||
|
@EnvironmentObject private var vm: OrionVMController
|
||||||
|
@Environment(\.openSettings) private var openSettings
|
||||||
|
@State private var expanded: Set<String> = []
|
||||||
|
@State private var expandedServers: Set<UUID> = []
|
||||||
|
|
||||||
|
private var groups: [String] {
|
||||||
|
let order = ["Windows", "Ubuntu", "Debian", "Fedora", "CentOS", "Alpine", "Oracle Linux", "Rocky Linux", "AlmaLinux", "Arch Linux", "Gentoo", "FreeBSD", "Other"]
|
||||||
|
return order.filter { os in vm.discoveredVMs.contains { $0.operatingSystem == os } }
|
||||||
|
}
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
VStack(spacing: 0) {
|
||||||
|
HStack {
|
||||||
|
Label("OrionToolbar", systemImage: "server.rack").font(.headline)
|
||||||
|
Spacer()
|
||||||
|
if vm.discovering { ProgressView().controlSize(.small) }
|
||||||
|
Button { Task { await vm.discoverVMs() } } label: { Image(systemName: "arrow.clockwise") }
|
||||||
|
.buttonStyle(.borderless).help("Refresh virtual machines")
|
||||||
|
}.padding(14)
|
||||||
|
Divider()
|
||||||
|
ScrollView {
|
||||||
|
VStack(alignment: .leading, spacing: 10) {
|
||||||
|
runningSection
|
||||||
|
Divider()
|
||||||
|
Text("PARALLELS VIRTUAL MACHINES").font(.caption.bold()).foregroundStyle(.secondary)
|
||||||
|
if vm.discoveredVMs.isEmpty {
|
||||||
|
Text(vm.discovering ? "Discovering virtual machines…" : "No VMs found. Use Refresh to try again.")
|
||||||
|
.foregroundStyle(.secondary).padding(.vertical, 18)
|
||||||
|
}
|
||||||
|
ForEach(groups, id: \.self) { os in
|
||||||
|
VStack(alignment: .leading, spacing: 4) {
|
||||||
|
Button {
|
||||||
|
if !expanded.insert(os).inserted { expanded.remove(os) }
|
||||||
|
} label: {
|
||||||
|
HStack {
|
||||||
|
Image(systemName: expanded.contains(os) ? "chevron.down" : "chevron.right")
|
||||||
|
.frame(width: 14)
|
||||||
|
Text(os).fontWeight(.semibold)
|
||||||
|
Spacer()
|
||||||
|
Text("\(vm.discoveredVMs.filter { $0.operatingSystem == os }.count)")
|
||||||
|
.foregroundStyle(.secondary)
|
||||||
|
}.contentShape(Rectangle()).padding(.vertical, 5)
|
||||||
|
}.buttonStyle(.plain)
|
||||||
|
if expanded.contains(os) {
|
||||||
|
ForEach(vm.discoveredVMs.filter { $0.operatingSystem == os }) { machine in
|
||||||
|
vmRow(machine)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if !vm.discoveredVMs.isEmpty {
|
||||||
|
HStack {
|
||||||
|
Button("Select All") { vm.selectAllVMs() }
|
||||||
|
Button("Clear") { vm.clearVMSelection() }
|
||||||
|
Spacer()
|
||||||
|
Button("Integrate Selected") { vm.integrateSelectedVMs() }
|
||||||
|
.disabled(vm.selectedVMIDs.isEmpty)
|
||||||
|
}.font(.caption)
|
||||||
|
}
|
||||||
|
Divider()
|
||||||
|
Text("INTEGRATED SERVERS").font(.caption.bold()).foregroundStyle(.secondary)
|
||||||
|
ForEach(vm.servers) { server in serverRow(server) }
|
||||||
|
}.padding(14)
|
||||||
|
}.frame(height: 490)
|
||||||
|
Divider()
|
||||||
|
HStack {
|
||||||
|
Button("Parallels") { vm.openParallels() }
|
||||||
|
Spacer()
|
||||||
|
Button("Settings…") {
|
||||||
|
openSettings()
|
||||||
|
NSApplication.shared.activate(ignoringOtherApps: true)
|
||||||
|
}
|
||||||
|
Button("Quit") { NSApplication.shared.terminate(nil) }
|
||||||
|
}.padding(14)
|
||||||
|
}
|
||||||
|
.frame(width: 460)
|
||||||
|
.task { await vm.discoverVMs() }
|
||||||
|
.alert("OrionToolbar", isPresented: Binding(
|
||||||
|
get: { vm.lastError != nil },
|
||||||
|
set: { if !$0 { vm.lastError = nil } }
|
||||||
|
)) { Button("OK") { vm.lastError = nil } }
|
||||||
|
message: { Text(vm.lastError ?? "") }
|
||||||
|
}
|
||||||
|
|
||||||
|
private var runningSection: some View {
|
||||||
|
VStack(alignment: .leading, spacing: 8) {
|
||||||
|
HStack {
|
||||||
|
Label("RUNNING VIRTUAL MACHINES", systemImage: "play.circle.fill")
|
||||||
|
.font(.caption.bold())
|
||||||
|
Spacer()
|
||||||
|
Text("\(vm.runningVMs.count) running")
|
||||||
|
.font(.caption)
|
||||||
|
.foregroundStyle(.secondary)
|
||||||
|
}
|
||||||
|
if vm.runningVMs.isEmpty {
|
||||||
|
Text("No running VMs detected")
|
||||||
|
.font(.caption)
|
||||||
|
.foregroundStyle(.secondary)
|
||||||
|
.padding(.vertical, 8)
|
||||||
|
}
|
||||||
|
ForEach(vm.runningVMs) { machine in
|
||||||
|
VStack(alignment: .leading, spacing: 6) {
|
||||||
|
HStack {
|
||||||
|
vmIcon(machine)
|
||||||
|
VStack(alignment: .leading, spacing: 2) {
|
||||||
|
Text(machine.name).fontWeight(.medium)
|
||||||
|
Text("Running").font(.caption).foregroundStyle(.green)
|
||||||
|
}
|
||||||
|
Spacer()
|
||||||
|
if vm.busyVMIDs.contains(machine.id) {
|
||||||
|
ProgressView().controlSize(.small)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
HStack {
|
||||||
|
Button("Stop") { vm.operate(machine, action: "stop") }
|
||||||
|
Button("Restart") { vm.operate(machine, action: "restart") }
|
||||||
|
Button("Force Stop", role: .destructive) {
|
||||||
|
vm.operate(machine, action: "force-stop")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.controlSize(.small)
|
||||||
|
.disabled(vm.busyVMIDs.contains(machine.id))
|
||||||
|
}
|
||||||
|
.padding(9)
|
||||||
|
.background(.quaternary.opacity(0.3), in: RoundedRectangle(cornerRadius: 8))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private func vmRow(_ machine: ParallelsVM) -> some View {
|
||||||
|
HStack(spacing: 9) {
|
||||||
|
Toggle("", isOn: Binding(
|
||||||
|
get: { vm.selectedVMIDs.contains(machine.id) },
|
||||||
|
set: { selected in
|
||||||
|
if selected { vm.selectedVMIDs.insert(machine.id) }
|
||||||
|
else { vm.selectedVMIDs.remove(machine.id) }
|
||||||
|
}
|
||||||
|
)).labelsHidden().toggleStyle(.checkbox)
|
||||||
|
vmIcon(machine)
|
||||||
|
VStack(alignment: .leading, spacing: 2) {
|
||||||
|
Text(machine.name).lineLimit(1)
|
||||||
|
Text(machine.status.capitalized).font(.caption)
|
||||||
|
.foregroundStyle(machine.status == "running" ? Color.green : Color.secondary)
|
||||||
|
}
|
||||||
|
Spacer(minLength: 4)
|
||||||
|
if vm.busyVMIDs.contains(machine.id) { ProgressView().controlSize(.small) }
|
||||||
|
else if machine.status == "stopped" {
|
||||||
|
Button("Start") { vm.operate(machine, action: "start") }
|
||||||
|
} else if machine.status == "running" {
|
||||||
|
Button("Stop") { vm.operate(machine, action: "stop") }
|
||||||
|
} else if machine.status == "suspended" {
|
||||||
|
Button("Resume") { vm.operate(machine, action: "resume") }
|
||||||
|
} else {
|
||||||
|
Button("Start") { vm.operate(machine, action: "start") }
|
||||||
|
.help("Try starting VM (Parallels reports: \(machine.status))")
|
||||||
|
}
|
||||||
|
if vm.isIntegrated(machine) {
|
||||||
|
Image(systemName: "checkmark.circle.fill").foregroundStyle(.green).help("Integrated")
|
||||||
|
} else {
|
||||||
|
Button { vm.integrate(machine) } label: { Image(systemName: "plus.circle") }
|
||||||
|
.help("Integrate VM")
|
||||||
|
}
|
||||||
|
}.padding(.leading, 20).padding(.vertical, 4)
|
||||||
|
}
|
||||||
|
|
||||||
|
private func vmIcon(_ machine: ParallelsVM) -> some View {
|
||||||
|
Group {
|
||||||
|
if let icon = vm.icon(for: machine) {
|
||||||
|
Image(nsImage: icon).resizable().scaledToFit()
|
||||||
|
} else {
|
||||||
|
Image(systemName: machine.symbol).resizable().scaledToFit().padding(4)
|
||||||
|
}
|
||||||
|
}.frame(width: 30, height: 30)
|
||||||
|
}
|
||||||
|
|
||||||
|
private func serverRow(_ server: ServerDefinition) -> some View {
|
||||||
|
let status = vm.status(for: server)
|
||||||
|
return VStack(alignment: .leading, spacing: 6) {
|
||||||
|
Button {
|
||||||
|
if !expandedServers.insert(server.id).inserted { expandedServers.remove(server.id) }
|
||||||
|
} label: {
|
||||||
|
HStack {
|
||||||
|
Image(systemName: expandedServers.contains(server.id) ? "chevron.down" : "chevron.right")
|
||||||
|
if let icon = vm.icon(for: server) {
|
||||||
|
Image(nsImage: icon).resizable().scaledToFit().frame(width: 25, height: 25)
|
||||||
|
} else { Image(systemName: "server.rack") }
|
||||||
|
Text(server.name)
|
||||||
|
Spacer()
|
||||||
|
Text(status.title).foregroundStyle(.secondary)
|
||||||
|
}.contentShape(Rectangle())
|
||||||
|
}.buttonStyle(.plain)
|
||||||
|
if expandedServers.contains(server.id) {
|
||||||
|
HStack {
|
||||||
|
if status == .stopped {
|
||||||
|
Button("Start") { vm.start(server) }
|
||||||
|
} else if status == .running {
|
||||||
|
Button("Stop") { vm.stop(server) }
|
||||||
|
Button("Restart") { vm.restart(server) }
|
||||||
|
}
|
||||||
|
Button("SSH") { vm.openSSH(server) }
|
||||||
|
.disabled(status != .running || server.host.isEmpty || server.sshUser.isEmpty)
|
||||||
|
Button("Mailpit") { vm.openMailpit(server) }
|
||||||
|
.disabled(status != .running || server.host.isEmpty || server.mailpitPort == nil)
|
||||||
|
Button("Remove", role: .destructive) {
|
||||||
|
expandedServers.remove(server.id)
|
||||||
|
vm.removeDefinition(server)
|
||||||
|
}
|
||||||
|
.help("Remove integration only; the VM is not deleted")
|
||||||
|
}.padding(.leading, 30)
|
||||||
|
}
|
||||||
|
}.padding(.vertical, 4)
|
||||||
|
}
|
||||||
|
}
|
||||||
+32
-3
@@ -18,7 +18,36 @@ EXE=$(/usr/libexec/PlistBuddy -c 'Print :CFBundleExecutable' "$APP/Contents/Info
|
|||||||
[[ -x "$APP/Contents/MacOS/$EXE" ]] || { echo 'Application executable missing' >&2; exit 1; }
|
[[ -x "$APP/Contents/MacOS/$EXE" ]] || { echo 'Application executable missing' >&2; exit 1; }
|
||||||
echo "Build complete: $APP"
|
echo "Build complete: $APP"
|
||||||
echo "Log: $LOG"
|
echo "Log: $LOG"
|
||||||
if [[ "${1:-}" == '--launch' ]]; then
|
|
||||||
pkill -x "$APP_NAME" 2>/dev/null || true
|
if [[ "${1:-}" == "--launch" ]]; then
|
||||||
open "$APP"
|
echo
|
||||||
|
echo "=== LAUNCHING ORIONTOOLBAR ==="
|
||||||
|
|
||||||
|
pkill -x "$APP_NAME" 2>/dev/null || true
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
APP_EXEC="$APP/Contents/MacOS/$EXE"
|
||||||
|
|
||||||
|
if [[ ! -x "$APP_EXEC" ]]; then
|
||||||
|
echo "ERROR: Application executable missing: $APP_EXEC"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Application: $APP"
|
||||||
|
echo "Executable: $APP_EXEC"
|
||||||
|
|
||||||
|
# Launch the exact built application as a separate macOS process.
|
||||||
|
/usr/bin/open -n "$APP" --args
|
||||||
|
|
||||||
|
sleep 3
|
||||||
|
|
||||||
|
if /usr/bin/pgrep -x "$APP_NAME" >/dev/null; then
|
||||||
|
echo "SUCCESS: OrionToolbar is running."
|
||||||
|
/usr/bin/pgrep -fl "$APP_NAME"
|
||||||
|
else
|
||||||
|
echo "ERROR: OrionToolbar did not remain running."
|
||||||
|
echo "Try launching the executable directly:"
|
||||||
|
echo "$APP_EXEC"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Executable
+24
@@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/zsh
|
||||||
|
set -euo pipefail
|
||||||
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||||
|
cd "$ROOT"
|
||||||
|
APP_NAME=OrionToolbar
|
||||||
|
DERIVED="$ROOT/.build"
|
||||||
|
CONFIGURATION="${CONFIGURATION:-Debug}"
|
||||||
|
[[ "$CONFIGURATION" == Debug || "$CONFIGURATION" == Release ]] || { echo 'CONFIGURATION must be Debug or Release' >&2; exit 2; }
|
||||||
|
mkdir -p "$ROOT/.build/build-logs"
|
||||||
|
LOG="$ROOT/build-logs/build-${CONFIGURATION}-$(date +%Y%m%d-%H%M%S).log"
|
||||||
|
echo "Building $APP_NAME ($CONFIGURATION)"
|
||||||
|
set -o pipefail
|
||||||
|
xcodebuild -project "$ROOT/OrionToolbar.xcodeproj" -scheme "$APP_NAME" -configuration "$CONFIGURATION" -derivedDataPath "$DERIVED" CODE_SIGNING_ALLOWED=NO build 2>&1 | tee "$LOG"
|
||||||
|
APP="$DERIVED/Build/Products/$CONFIGURATION/$APP_NAME.app"
|
||||||
|
[[ -d "$APP" ]] || { echo "Missing application: $APP" >&2; exit 1; }
|
||||||
|
plutil -lint "$APP/Contents/Info.plist"
|
||||||
|
EXE=$(/usr/libexec/PlistBuddy -c 'Print :CFBundleExecutable' "$APP/Contents/Info.plist")
|
||||||
|
[[ -x "$APP/Contents/MacOS/$EXE" ]] || { echo 'Application executable missing' >&2; exit 1; }
|
||||||
|
echo "Build complete: $APP"
|
||||||
|
echo "Log: $LOG"
|
||||||
|
if [[ "${1:-}" == '--launch' ]]; then
|
||||||
|
pkill -x "$APP_NAME" 2>/dev/null || true
|
||||||
|
open "$APP"
|
||||||
|
fi
|
||||||
Executable
+48
@@ -0,0 +1,48 @@
|
|||||||
|
#!/bin/zsh
|
||||||
|
set -euo pipefail
|
||||||
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||||
|
cd "$ROOT"
|
||||||
|
APP_NAME=OrionToolbar
|
||||||
|
DERIVED="$ROOT/.build"
|
||||||
|
CONFIGURATION="${CONFIGURATION:-Debug}"
|
||||||
|
[[ "$CONFIGURATION" == Debug || "$CONFIGURATION" == Release ]] || { echo 'CONFIGURATION must be Debug or Release' >&2; exit 2; }
|
||||||
|
mkdir -p "$ROOT/.build/build-logs"
|
||||||
|
LOG="$ROOT/build-logs/build-${CONFIGURATION}-$(date +%Y%m%d-%H%M%S).log"
|
||||||
|
echo "Building $APP_NAME ($CONFIGURATION)"
|
||||||
|
set -o pipefail
|
||||||
|
xcodebuild -project "$ROOT/OrionToolbar.xcodeproj" -scheme "$APP_NAME" -configuration "$CONFIGURATION" -derivedDataPath "$DERIVED" CODE_SIGNING_ALLOWED=NO build 2>&1 | tee "$LOG"
|
||||||
|
APP="$DERIVED/Build/Products/$CONFIGURATION/$APP_NAME.app"
|
||||||
|
[[ -d "$APP" ]] || { echo "Missing application: $APP" >&2; exit 1; }
|
||||||
|
plutil -lint "$APP/Contents/Info.plist"
|
||||||
|
EXE=$(/usr/libexec/PlistBuddy -c 'Print :CFBundleExecutable' "$APP/Contents/Info.plist")
|
||||||
|
[[ -x "$APP/Contents/MacOS/$EXE" ]] || { echo 'Application executable missing' >&2; exit 1; }
|
||||||
|
echo "Build complete: $APP"
|
||||||
|
echo "Log: $LOG"
|
||||||
|
if [[ "${1:-}" == '--launch' ]]; then
|
||||||
|
echo "Launching $APP_NAME..."
|
||||||
|
|
||||||
|
# Stop any previously running instance.
|
||||||
|
pkill -x "$APP_NAME" 2>/dev/null || true
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
# Launch the executable from this exact build.
|
||||||
|
EXECUTABLE="$APP/Contents/MacOS/$EXE"
|
||||||
|
|
||||||
|
[[ -x "$EXECUTABLE" ]] || {
|
||||||
|
echo "ERROR: Executable not found: $EXECUTABLE" >&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
"$EXECUTABLE" > "$ROOT/build-logs/launch.log" 2>&1 &
|
||||||
|
APP_PID=$!
|
||||||
|
|
||||||
|
sleep 2
|
||||||
|
|
||||||
|
if ! kill -0 "$APP_PID" 2>/dev/null; then
|
||||||
|
echo "ERROR: Application exited immediately." >&2
|
||||||
|
cat "$ROOT/build-logs/launch.log"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Launched $APP_NAME (PID $APP_PID)"
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user