diff --git a/Sources/tart/Commands/Run.swift b/Sources/tart/Commands/Run.swift index 390aa3f..50e1686 100644 --- a/Sources/tart/Commands/Run.swift +++ b/Sources/tart/Commands/Run.swift @@ -312,8 +312,11 @@ struct Run: AsyncParsableCommand { let useVNCWithoutGraphics = (vnc || vncExperimental) && !graphics if noGraphics || useVNCWithoutGraphics { - // enter the main even loop and just wait for the VM to exit - NSApplication.shared.run() + // enter the main even loop, without bringing up any UI, + // and just wait for the VM to exit. + let nsApp = NSApplication.shared + nsApp.setActivationPolicy(.prohibited) + nsApp.run() } else { runUI(suspendable, captureSystemKeys) } diff --git a/scripts/run-signed.sh b/scripts/run-signed.sh index 4144623..23afeeb 100755 --- a/scripts/run-signed.sh +++ b/scripts/run-signed.sh @@ -8,4 +8,8 @@ set -e swift build --product tart codesign --sign - --entitlements Resources/tart-dev.entitlements --force .build/debug/tart -.build/debug/tart "$@" +mkdir -p .build/tart.app/Contents/MacOS +cp -c .build/debug/tart .build/tart.app/Contents/MacOS/tart +cp -c Resources/embedded.provisionprofile .build/tart.app/Contents/embedded.provisionprofile + +.build/tart.app/Contents/MacOS/tart "$@"