Compare commits

...
Author SHA1 Message Date
osy b0b83b7f07 darwin: reopen the port when the VM is restored
Virtualization.framework does not restore the open state of the spice
port when it resumes a saved VM. The host then drops whatever the guest
writes to the port and never completes the write, which wedges the port
until the guest reboots: clipboard sharing stops working in both
directions and restarting the agents does not help.

The virtual RTC sends a message as soon as the VM is restored, so watch
for it and reopen the port before anything is written. Reopening tells
the host that the port is open again. Waiting for the clock change that
follows is too late: timed only steps the clock after an NTP round trip.

Resolves utmapp/UTM#7717

Assisted-by: Claude:claude-opus-5-5
2026-10-14 09:39:24 -07:00
osy 03ff810185 github: force universal archive build
xcodebuild does not read build settings from the shell environment, so
the ARCHS variable used to build GLib and gettext for both
architectures never reached the archive step. On the arm64 macos-15
runner this silently produced an arm64-only xcarchive/pkg instead of a
universal x86_64+arm64 binary.

Pass ARCHS and ONLY_ACTIVE_ARCH explicitly to xcodebuild archive so the
override takes effect regardless of the runner's host architecture.

Resolves #5

Assisted-by: Claude:claude-sonnet-5
2026-09-21 20:37:04 -05:00
osy 948db07d95 github: build on macos-15 runner
Newer Xcode versions only support deploying to macOS 12.0 and newer,
which breaks the project's 10.13 deployment target. Pin the runner to
macos-15, which defaults to Xcode 16.

Assisted-by: Claude:claude-opus-5
2026-09-21 19:37:41 -05:00
osy 7a9d859399 github: build GLib from source for arm64 and x86_64
Homebrew no longer supports x86_64, so installing it under Rosetta fails
in CI and the universal build has no x86_64 GLib to link against.

Build GLib and gettext (for libintl) from pinned upstream releases for
both architectures instead, based on Homebrew's glib formula. The
libraries target macOS 10.13 (11.0 on arm64) to match the project, and
availability errors are enabled to catch any use of newer APIs.

The Xcode project now takes the GLib locations from the
GLIB_ARM64_PREFIX and GLIB_X86_64_PREFIX build settings, which default
to the Homebrew paths so local builds are unchanged. The inputs of the
lipo phase are declared so they can be read with script sandboxing.

Assisted-by: Claude:claude-opus-5
2026-09-21 19:26:34 -05:00
osy 07005a1b0e Merge pull request #4 from pointum/fix-package-quarantine
Clear package quarantine
2026-09-21 17:51:12 -05:00
Maxim Ananov 37a74cf356 darwin: clear package quarantine 2026-08-16 16:13:19 -07:00
osy 15e4c3b63f data: update macOS package script to remove xattributes 2024-12-10 13:36:29 -08:00
osy 5ccfc993f4 readme: add notes for macOS 2024-11-18 01:59:26 -08:00
osy 9070c8ba4d darwin: add script to create installer 2024-11-18 01:48:31 -08:00
osy e4d0eea961 vdagentd: automatically switch session when security is disabled 2024-11-18 01:37:06 -08:00
osy c729770965 darwin: fix launch scripts 2024-11-17 22:34:41 -08:00
osy 38460ed519 darwin: fix build on Xcode 15.4 2024-11-17 20:05:32 -08:00
osy 684267abcb github: add CI 2024-11-17 20:05:32 -08:00
osy b788a2456c darwin: static link GLib, add LaunchDaemon 2024-11-17 13:41:51 -08:00
osy ee9ac60ad6 darwin: automatically download spice headers 2024-11-17 01:39:18 -08:00
osy 47e2539467 vdagent: support macOS NSPasteboard 2024-11-17 01:18:51 -08:00
osy 712c9ed7a6 vdagent: create new macOS agent 2024-11-16 17:45:12 -08:00
osy a395da3eeb vdagentd: add Xcode project for macOS build 2024-11-16 17:41:46 -08:00
Daniel Kahn Gillmor 553cb85f10 systemd services: add Documentation key (point to manpage) 2024-07-12 07:00:28 +00:00
Daniel Kahn Gillmor a3c361d829 Fix minor spelling errors.
This change was performed with:

```
codespell --ignore-words-list 'requestor' -w
```

("requestor" is part of the X11 API, and if we allow codespell to rewrite it it would fail to build)
2024-07-07 12:57:53 -04:00
Fabian Vogt aa08162f03 Switch to spice-vdagent.service by default
Add an [Install] section to the user unit and tell systemd to ignore the
.desktop file explicitly.

Also add missing ordering dependencies. Without this, the service fails if
it is started before e.g. $DISPLAY is set.
2023-02-09 10:22:01 +01:00
Victor Toso bcbbea34d9 vdagent: Remove watch event on vdagent_display_destroy()
To avoid main loop calling it when GIOChannel for x11 was already
destroyed.

Related: https://bugzilla.redhat.com/show_bug.cgi?id=2145004
Signed-off-by: Victor Toso <[email protected]>
2023-01-13 15:33:38 +01:00
Abderrahim Kitouni ed08813fcd Makefile.am: don't create /var/run/spice-vdagentd
/var/run is generally a symlink to /run, which is a tmpfs.
2022-09-28 07:38:52 +02:00
Victor Toso a9bb1752ce Release 0.22.1
Signed-off-by: Victor Toso <[email protected]>
2022-02-14 11:27:07 +01:00
Frediano Ziglio 0717474fec Do not process X11 events in vdagent_x11_create
Processing events requires some more initialisation between
VDAgentDisplay and vdagent_x11.
Postpone that after initialisation.
This fix a crash on Fedora 36, see
https://bugzilla.redhat.com/show_bug.cgi?id=2042877.

Signed-off-by: Frediano Ziglio <[email protected]>
2022-02-14 09:35:55 +00:00
28 changed files with 2406 additions and 23 deletions

No files matched your search

+144
View File
@@ -0,0 +1,144 @@
name: Build
on:
push:
pull_request:
jobs:
build-macos:
name: Build macOS
runs-on: macos-15
env:
GLIB_VERSION: "2.90.0"
GLIB_SHA256: 17d15cac2af80a33271127408e0abc2748eb297c595c2a26409e81e14e7d1b8f
GETTEXT_VERSION: "1.0"
GETTEXT_SHA256: 71132a3fb71e68245b8f2ac4e9e97137d3e5c02f415636eb508ae607bc01add7
# must be <= the project's deployment target
MACOSX_DEPLOYMENT_TARGET: "10.13"
ARCHS: arm64 x86_64
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install build tools
run: |
brew install meson ninja pkgconf
echo "GLIB_PREFIX=$RUNNER_TEMP/glib" >> "$GITHUB_ENV"
- name: Cache GLib
id: cache
uses: actions/cache@v4
with:
path: ${{ runner.temp }}/glib
key: glib-${{ env.GLIB_VERSION }}-gettext-${{ env.GETTEXT_VERSION }}-${{ hashFiles('.github/workflows/build.yaml') }}
- name: Build gettext
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ${{ runner.temp }}
run: |
curl -fsSLO "https://ftp.gnu.org/gnu/gettext/gettext-$GETTEXT_VERSION.tar.xz"
echo "$GETTEXT_SHA256 gettext-$GETTEXT_VERSION.tar.xz" | shasum -a 256 -c -
for arch in $ARCHS; do
rm -rf "gettext-$GETTEXT_VERSION"
tar xf "gettext-$GETTEXT_VERSION.tar.xz"
pushd "gettext-$GETTEXT_VERSION/gettext-runtime"
./configure --host="${arch/arm64/aarch64}-apple-darwin" \
--prefix="$GLIB_PREFIX/$arch" \
--enable-static \
--disable-shared \
--with-included-gettext \
--disable-java \
--disable-csharp \
--disable-libasprintf \
--without-libintl-prefix \
--without-libiconv-prefix \
CC="clang -arch $arch"
make -C intl -j"$(sysctl -n hw.ncpu)"
make -C intl install
popd
done
- name: Build GLib
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ${{ runner.temp }}
run: |
curl -fsSLO "https://download.gnome.org/sources/glib/${GLIB_VERSION%.*}/glib-$GLIB_VERSION.tar.xz"
echo "$GLIB_SHA256 glib-$GLIB_VERSION.tar.xz" | shasum -a 256 -c -
tar xf "glib-$GLIB_VERSION.tar.xz"
# girepository is unused and requires macOS 10.15
sed -i '' "/^subdir('girepository')$/d" "glib-$GLIB_VERSION/meson.build"
sdk="$(xcrun --sdk macosx --show-sdk-path)"
for arch in $ARCHS; do
prefix="$GLIB_PREFIX/$arch"
mkdir -p "$prefix/lib/pkgconfig"
cat > "$prefix/lib/pkgconfig/libffi.pc" <<EOF
Name: libffi
Description: Library supporting Foreign Function Interfaces
Version: 3.4
Cflags: -I$sdk/usr/include/ffi
Libs: -lffi
EOF
# don't depend on Rosetta
[ "$arch" = "$(uname -m)" ] && needs_exe_wrapper=false || needs_exe_wrapper=true
cat > "cross-$arch.ini" <<EOF
[binaries]
c = ['clang', '-arch', '$arch']
cpp = ['clang++', '-arch', '$arch']
objc = ['clang', '-arch', '$arch']
ar = 'ar'
strip = 'strip'
pkg-config = 'pkg-config'
[built-in options]
c_args = ['-I$prefix/include', '-Werror=unguarded-availability-new']
cpp_args = ['-I$prefix/include']
objc_args = ['-I$prefix/include', '-Werror=unguarded-availability-new']
c_link_args = ['-L$prefix/lib']
cpp_link_args = ['-L$prefix/lib']
objc_link_args = ['-L$prefix/lib']
[properties]
needs_exe_wrapper = $needs_exe_wrapper
pkg_config_libdir = ['$prefix/lib/pkgconfig']
# macOS 27+, meson's check ignores availability
has_function_pipe2 = false
[host_machine]
system = 'darwin'
subsystem = 'macos'
kernel = 'xnu'
cpu_family = '${arch/arm64/aarch64}'
cpu = '${arch/arm64/aarch64}'
endian = 'little'
EOF
# SDK has no pcre2 headers; other fallbacks would silently stub out deps (e.g. libintl)
meson setup "build-$arch" "glib-$GLIB_VERSION" \
--cross-file "cross-$arch.ini" \
--prefix="$prefix" \
--buildtype=release \
--default-library=static \
--wrap-mode=nofallback \
--force-fallback-for=libpcre2-8 \
-Dbsymbolic_functions=false \
-Ddtrace=disabled \
-Dintrospection=disabled \
-Dnls=disabled \
-Dman-pages=disabled \
-Ddocumentation=false \
-Dtests=false
meson compile -C "build-$arch"
meson install -C "build-$arch"
done
- name: Build
run: |
xcodebuild archive -scheme vd_agent -archivePath vd_agent.xcarchive \
ARCHS="$ARCHS" ONLY_ACTIVE_ARCH=NO \
GLIB_ARM64_PREFIX="$GLIB_PREFIX/arm64" \
GLIB_X86_64_PREFIX="$GLIB_PREFIX/x86_64"
- name: Archive
run: tar -acf vd_agent.xcarchive.tgz vd_agent.xcarchive
- name: Upload
uses: actions/upload-artifact@v4
with:
name: vd_agent-macOS
path: vd_agent.xcarchive.tgz
+11 -7
View File
@@ -1,7 +1,11 @@
Gitlab markdown format support linking to Issues (#) and Merge requests (!) and more, see bellow:
Gitlab markdown format support linking to Issues (#) and Merge requests (!) and more, see below:
https://gitlab.freedesktop.org/spice/linux/vd_agent/-/blob/master/CHANGELOG.md
News in spice-vdagent 0.22.1
===========================
* !42 - Fix crash on startup of session agent
News in spice-vdagent 0.22.0
===========================
* !40 - Handle side mouse buttons
@@ -89,7 +93,7 @@ News in spice-vdagent 0.17.0
* Set exit code to 1 instead of 0 when virtio device cannot be opened
* Fix double-free on uinput->screen_info (rhbz#1262635)
* Code improvement over unix domain client server support (udcs)
* Fix build compatiblity with different libsystemd versions (fdo#94209)
* Fix build compatibility with different libsystemd versions (fdo#94209)
News in spice-vdagent 0.16.0
============================
@@ -113,7 +117,7 @@ News in spice-vdagent 0.15.0
News in spice-vdagent 0.14.0
============================
* More multi-monitor and arbritary resolution support bugfixes
* More multi-monitor and arbitrary resolution support bugfixes
* Add support for file transfers from client to guest
* Add support for setups with multiple Screens (multiple qxl devices each
mapped to their own screen), limitations:
@@ -127,16 +131,16 @@ News in spice-vdagent 0.14.0
News in spice-vdagent 0.12.1
============================
* Various bugfixes for multi-monitor and arbritary resolution support
* Various bugfixes for multi-monitor and arbitrary resolution support
* Requires libXrandr >= 1.3, Note 0.12.0 also required this, but did not
check for it. For older distributions use 0.10.1
News in spice-vdagent 0.12.0
============================
* Full multi-monitor and arbritary resolution support, this requires a new
* Full multi-monitor and arbitrary resolution support, this requires a new
enough xorg-x11-drv-qxl driver, as well as a new enough host
* systemd service support, using systemd hardware acivation
* systemd service support, using systemd hardware activation
* Use syslog for logging, rather then logging to private log files
News in spice-vdagent 0.10.1
@@ -161,7 +165,7 @@ News in spice-vdagent 0.8.1
* In daemon mode the session vdagent now retries connecting to the system
vdagentd every second, once a connection is made a version check is done,
if the version differs (which only happens on an upgrade from one version
to the next) the sesion vdagent re-execs itself (Marc-André Lureau)
to the next) the session vdagent re-execs itself (Marc-André Lureau)
News in spice-vdagent 0.8.0
===========================
-3
View File
@@ -153,9 +153,6 @@ gdmautostart_DATA = $(top_srcdir)/data/spice-vdagent.desktop
gdmautostart2dir = $(datadir)/gdm/autostart/LoginWindow
gdmautostart2_DATA = $(top_srcdir)/data/spice-vdagent.desktop
install-data-local:
$(mkdir_p) $(DESTDIR)$(localstatedir)/run/spice-vdagentd
if INIT_SCRIPT_RED_HAT
initdir = $(sysconfdir)/rc.d/init.d
init_SCRIPTS = $(top_srcdir)/data/spice-vdagentd
+50 -3
View File
@@ -1,5 +1,7 @@
Spice agent for Linux
=====================
Spice agent for Linux and macOS
===============================
### Linux
The spice agent for Linux consists of 2 parts, a daemon spice-vdagentd and
a per X-session process spice-vdagent. The daemon gets started in Spice guests
@@ -27,7 +29,16 @@ Features:
* Limited support for setups with multiple Screens (multiple qxl devices each
mapped to their own screen)
## Install
### macOS
Similar to Linux, the SPICE agent has a LaunchDaemon spice-vdagentd which
handles communication with the console port and a LaunchAgent spice-vdagent
that runs for each logged in user. Note that there is no protection against
one logged in user from snooping another user's clipboard when this is running.
The macOS agent currently only supports clipboard features.
## Install (Linux)
From inside your virtual machine (e.g., GNOME Boxes), use your guest system’s
package manager to install.
@@ -38,6 +49,37 @@ For example, if you’re running a Debian/Ubuntu derivative in a VM, use:
sudo apt install spice-vdagent
```
## Build (macOS)
Currently, you can only build on Apple Silicon Macs with Homebrew installed in
both native and Rosetta. This is because we require GLib installed in both
architectures at the default location.
>>>
$ /opt/homebrew/bin/brew install glib # arm64
$ /usr/local/bin/brew install glib # x86_64
>>>
Alternatively, GLib can be built from source for each architecture (see
`.github/workflows/build.yaml`) and the install prefixes passed to Xcode
with `GLIB_ARM64_PREFIX=... GLIB_X86_64_PREFIX=...`.
Then, you can build the project with Xcode or `xcodebuild`
>>>
$ xcodebuild archive -scheme vd_agent -archivePath vd_agent.xcarchive
>>>
Afterwards, you can sign the output and create an installer package with a paid
Apple Developer certificate (Developer ID Application and Developer ID
Installer are both needed).
>>>
$ ./package_macos.sh vd_agent.xcarchive spice-vdagent-x.yy.pkg
>>>
You may then wish to notarize it before distributing.
## How it works
All vdagent communications on the guest side run over a single pipe which
@@ -53,6 +95,11 @@ Under Linux this virtio serial port has the following name:
/dev/virtio-ports/com.redhat.spice.0
>>>
Under macOS this virtio serial port has the following name:
>>>
/dev/tty.com.redhat.spice.0
>>>
To enable the virtio serial port you need to pass the following params on
the qemu cmdline:
+4 -1
View File
@@ -1,5 +1,5 @@
AC_PREREQ(2.59)
AC_INIT([spice-vdagent], [0.22.0])
AC_INIT([spice-vdagent], [0.22.1])
AC_CONFIG_SRCDIR([configure.ac])
AM_CONFIG_HEADER([src/config.h])
@@ -192,6 +192,9 @@ if test -z "$ac_test_CFLAGS"; then
done
fi
# Always enabled for autoconf targets
AC_DEFINE([WITH_SESSION_SECURITY], [1], [If undefined and there is no session info, only one session agent is allowed] )
AC_ARG_ENABLE([pie],
AS_HELP_STRING([--enable-pie=@<:@auto/yes/no@:>@],
[Enable position-independent-executable support (for spice-vdagentd)@<:@default=auto@:>@]),
+22
View File
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<dict>
<key>Crashed</key>
<false/>
</dict>
<key>Label</key>
<string>com.redhat.spice.vdagent</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/spice-vdagent</string>
<string>-x</string>
<string>-S</string>
<string>/var/run/spice-vdagent-sock</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
+28
View File
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<dict>
<key>Crashed</key>
<false/>
</dict>
<key>Label</key>
<string>com.redhat.spice.vdagentd</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/spice-vdagentd</string>
<string>-x</string>
<string>-s</string>
<string>/dev/tty.com.redhat.spice.0</string>
<string>-S</string>
<string>/var/run/spice-vdagent-sock</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StandardErrorPath</key>
<string>/var/log/spice-vdagentd.stderr.log</string>
<key>StandardOutPath</key>
<string>/var/log/spice-vdagentd.stdout.log</string>
</dict>
</plist>
+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh
set -e
GUI_USER=$(stat -f%Su /dev/console)
GUI_UID=$(id -u $GUI_USER)
/bin/launchctl load /Library/LaunchDaemons/com.redhat.spice.vdagentd.plist
if [ "$GUI_USER" != "root" ]; then
/bin/launchctl asuser $GUI_UID /bin/launchctl load /Library/LaunchAgents/com.redhat.spice.vdagent.plist
fi
+1
View File
@@ -7,3 +7,4 @@ Type=Application
Categories=
X-GNOME-Autostart-Phase=WindowManager
NoDisplay=true
X-systemd-skip=true
+6
View File
@@ -1,5 +1,11 @@
[Unit]
Description=Spice guest session agent
Documentation=man:spice-vdagent(1)
# Make sure the display is reachable
After=graphical-session.target
[Service]
ExecStart=/usr/bin/spice-vdagent -x
[Install]
WantedBy=graphical-session.target
+1
View File
@@ -1,5 +1,6 @@
[Unit]
Description=Agent daemon for Spice guests
Documentation=man:spice-vdagentd(1)
After=dbus.target
Requires=spice-vdagentd.socket
+49
View File
@@ -0,0 +1,49 @@
#!/bin/sh
set -e
VERSION="0.22.1"
INPUT_ARCHIVE="$1"
OUTPUT_PKG="$2"
TMP_ROOT="/tmp/package.$$"
TMP_COMPONENT="/tmp/Vdagent.pkg"
command -v realpath >/dev/null 2>&1 || realpath() {
[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
}
BASEDIR="$(dirname "$(realpath $0)")"
cp -a "$INPUT_ARCHIVE/Products" "$TMP_ROOT"
xattr -cr "$TMP_ROOT"
codesign --sign "Developer ID Application" \
--force \
--identifier com.redhat.spice.vdagentd \
--preserve-metadata=entitlements,requirements,flags,runtime \
--timestamp \
"$TMP_ROOT/usr/local/bin/spice-vdagentd"
codesign --sign "Developer ID Application" \
--force \
--identifier com.redhat.spice.vdagent \
--preserve-metadata=entitlements,requirements,flags,runtime \
--timestamp \
"$TMP_ROOT/usr/local/bin/spice-vdagent"
pkgbuild --root "$TMP_ROOT" \
--identifier com.redhat.spice.vdagent \
--version "$VERSION" \
--install-location / \
--scripts "$BASEDIR/data/install_scripts" \
"$TMP_COMPONENT"
productbuild --package "$TMP_COMPONENT" \
--identifier com.redhat.spice.vdagent \
--version "$VERSION" \
--sign "Developer ID Installer" \
"$OUTPUT_PKG"
rm "$TMP_COMPONENT"
rm -r "$TMP_ROOT"
+320
View File
@@ -0,0 +1,320 @@
/*
* Copyright (C) 2024 osy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import AppKit
import ArgumentParser
import ObjectiveC
let DEFAULT_VDAGENTD_SOCKET = "/run/spice-vdagentd/spice-vdagent-sock"
typealias VdagentConnection = OpaquePointer
@main
struct Vdagent: ParsableCommand {
static var configuration = CommandConfiguration(
commandName: "spice-vdagent")
@Flag(name: .shortAndLong, help: "Enable debug")
var debug = false
@Option(name: [.customLong("vdagentd-socket"), .customShort("S")], help: ArgumentHelp("Set spice-vdagentd socket", valueName: "path"))
var socketPath = DEFAULT_VDAGENTD_SOCKET
@Flag(name: [.customLong("foreground"), .customShort("x")], help: "Do not daemonize the agent")
var foreground = false
func startVdagent() throws {
let cb = vdagent_cb_t(clipboard_request: host_clipboard_request,
clipboard_grab: host_clipboard_grab,
clipboard_data: host_clipboard_data,
clipboard_release: host_clipboard_release,
client_disconnected: host_client_disconnected,
agent_connected: host_agent_connected,
agent_disconnected: host_agent_disconnected)
let host = VdagentHost()
if debug {
vdagent_set_debug(1)
}
if !foreground {
throw VdagentError.unimplementedDaemon
}
let ctx = Unmanaged.passRetained(host)
defer {
ctx.release()
}
withUnsafePointer(to: cb) { cb in
_ = vdagent_start(socketPath, cb, ctx.toOpaque())
}
}
func run() {
let vdagentQueue = DispatchQueue(label: "SPICE vdagent main loop", qos: .userInteractive)
vdagentQueue.async {
do {
try self.startVdagent()
Self.exit()
} catch {
Self.exit(withError: error)
}
}
RunLoop.current.run()
}
}
private class VdagentHost: NSObject {
typealias Item = (lock: DispatchSemaphore, item: NSPasteboardItem)
private var lastItem: Item?
private var lastUpdateCount: Int = -1
private var updateTimer: Timer?
private var lastAgent: VdagentConnection? {
willSet {
if let agent = lastAgent {
vdagent_unref(agent)
}
}
}
func clipboardRequest(_ agent: VdagentConnection, sel: vdagent_clipboard_select_t, type: vdagent_clipboard_type_t) throws {
let pasteboard = try pasteboard(for: sel)
let pasteboardType = try pasteboardType(for: type)
guard let data = pasteboard.data(forType: pasteboardType) else {
throw VdagentError.dataNotAvailable
}
try data.withUnsafeBytes<Void> { buffer in
vdagent_clipboard_data(agent, sel, type, buffer.baseAddress, UInt32(data.count))
}
}
func clipboardGrab(_ agent: VdagentConnection, sel: vdagent_clipboard_select_t, types: [vdagent_clipboard_type_t]) throws {
let pasteboard = try pasteboard(for: sel)
let pasteboardTypes = types.compactMap { try? pasteboardType(for: $0) }
let item = NSPasteboardItem()
item.setDataProvider(self, forTypes: pasteboardTypes)
item.connectionAgent = agent
lastUpdateCount = pasteboard.changeCount + 1
pasteboard.prepareForNewContents(with: .currentHostOnly)
pasteboard.writeObjects([item])
}
func clipboardData(_ agent: VdagentConnection, sel: vdagent_clipboard_select_t, type: vdagent_clipboard_type_t, data: Data) throws {
let pasteboard = try pasteboard(for: sel)
let pasteboardType = try pasteboardType(for: type)
let success: Bool
if let (lock, item) = lastItem {
lastItem = nil
if item.types.contains(pasteboardType) {
success = item.setData(data, forType: pasteboardType)
} else {
success = false
}
lock.signal()
} else {
// unsolicited clipboard data
lastUpdateCount = pasteboard.changeCount + 1
success = pasteboard.setData(data, forType: pasteboardType)
}
if !success {
throw VdagentError.failedToWritePasteboard
}
}
func clipboardRelease(_ agent: VdagentConnection, sel: vdagent_clipboard_select_t) throws {
}
func guestUpdate(_ agent: VdagentConnection) {
let pasteboard = NSPasteboard.general
let newCount = pasteboard.changeCount
if newCount != lastUpdateCount, let pasteboardTypes = pasteboard.types {
lastUpdateCount = newCount
let types = pasteboardTypes.compactMap { clipboardType(for: $0) }
if !types.isEmpty {
vdagent_clipboard_grab(agent, VDAgentClipboardSelectClipboard, types, Int32(types.count))
}
}
}
func clientDisconnected(_ agent: VdagentConnection) {
}
func agentConnected(_ agent: VdagentConnection) {
let agent = vdagent_ref(agent)!
// need to synchronize with RunLoop
RunLoop.main.perform {
self.lastAgent = agent
let timer = Timer.scheduledTimer(withTimeInterval: 0.5, repeats: true) { [weak self] _ in
self?.guestUpdate(agent)
}
self.updateTimer = timer
RunLoop.main.add(timer, forMode: .default)
}
}
func agentDisconnected(_ agent: VdagentConnection) {
updateTimer?.invalidate()
// need to synchronize with RunLoop
RunLoop.main.perform {
self.updateTimer = nil
self.lastAgent = nil
}
}
}
private extension VdagentHost {
private func pasteboard(for sel: vdagent_clipboard_select_t) throws -> NSPasteboard {
switch sel {
case VDAgentClipboardSelectClipboard: return .general
default: throw VdagentError.unsupportedClipboardSelection(sel)
}
}
private func pasteboardType(for type: vdagent_clipboard_type_t) throws -> NSPasteboard.PasteboardType {
switch type {
case VDAgentClipboardTypeImageTIFF: return .tiff
case VDAgentClipboardTypeImagePNG: return .png
case VDAgentClipboardTypeUTF8Text: return .string
default: throw VdagentError.unsupportedDataType(type)
}
}
private func clipboardType(for type: NSPasteboard.PasteboardType) -> vdagent_clipboard_type_t? {
switch type {
case .tiff: return VDAgentClipboardTypeImageTIFF
case .png: return VDAgentClipboardTypeImagePNG
case .string: return VDAgentClipboardTypeUTF8Text
default: return nil
}
}
}
extension VdagentHost: NSPasteboardItemDataProvider {
func pasteboard(_ pasteboard: NSPasteboard?, item: NSPasteboardItem, provideDataForType type: NSPasteboard.PasteboardType) {
guard let type = clipboardType(for: type) else {
print("Error: unsupported pasteboard type \(type)")
return
}
lastItem = (DispatchSemaphore(value: 0), item)
vdagent_clipboard_request(item.connectionAgent, VDAgentClipboardSelectClipboard, type)
guard lastItem!.lock.wait(timeout: .now() + .seconds(5)) == .success else {
lastItem = nil
print("Error: timed out waiting for clipboard data")
return
}
}
}
private enum VdagentError: Error {
case unimplementedDaemon
case unsupportedClipboardSelection(vdagent_clipboard_select_t)
case unsupportedDataType(vdagent_clipboard_type_t)
case dataNotAvailable
case failedToWritePasteboard
}
extension VdagentError: LocalizedError {
var errorDescription: String? {
switch self {
case .unimplementedDaemon:
return "Daemon mode is not implemented, please run with '-x'."
case .unsupportedClipboardSelection(let sel):
return "Unsupported clipboard selection: \(sel)"
case .unsupportedDataType(let type):
return "Unsupported clipboard data type: \(type)"
case .dataNotAvailable:
return "Data not available"
case .failedToWritePasteboard:
return "Failed to write to pasteboard"
}
}
}
private var AssociatedAgentConnection: UInt8 = 0
extension NSPasteboardItem {
var connectionAgent: VdagentConnection? {
get {
return objc_getAssociatedObject(self, &AssociatedAgentConnection) as? VdagentConnection
}
set {
objc_setAssociatedObject(self, &AssociatedAgentConnection, newValue,
objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC)
}
}
}
private func withError(_ callback: () throws -> Void) -> Bool {
do {
try callback()
return true
} catch {
print("Error: \(error.localizedDescription)")
return false
}
}
private func host_clipboard_request(_ agent: VdagentConnection!, ctx: UnsafeMutableRawPointer!, sel: vdagent_clipboard_select_t, type: vdagent_clipboard_type_t) -> Bool {
withError {
let host = Unmanaged<VdagentHost>.fromOpaque(ctx).takeUnretainedValue()
try host.clipboardRequest(agent, sel: sel, type: type)
}
}
private func host_clipboard_grab(_ agent: VdagentConnection!, ctx: UnsafeMutableRawPointer!, sel: vdagent_clipboard_select_t, types: UnsafePointer<vdagent_clipboard_type_t>?, n_types: UInt32) -> Bool {
withError {
let host = Unmanaged<VdagentHost>.fromOpaque(ctx).takeUnretainedValue()
let _types = Array(UnsafeBufferPointer(start: types!, count: Int(n_types)))
try host.clipboardGrab(agent, sel: sel, types: _types)
}
}
private func host_clipboard_data(_ agent: VdagentConnection!, ctx: UnsafeMutableRawPointer!, sel: vdagent_clipboard_select_t, type: vdagent_clipboard_type_t, data: UnsafePointer<UInt8>?, size: UInt32) -> Bool {
withError {
let host = Unmanaged<VdagentHost>.fromOpaque(ctx).takeUnretainedValue()
let _data: Data
if let data = data {
_data = Data(bytes: data, count: Int(size))
} else {
_data = Data()
}
try host.clipboardData(agent, sel: sel, type: type, data: _data)
}
}
private func host_clipboard_release(_ agent: VdagentConnection!, ctx: UnsafeMutableRawPointer!, sel: vdagent_clipboard_select_t) -> Bool {
withError {
let host = Unmanaged<VdagentHost>.fromOpaque(ctx).takeUnretainedValue()
try host.clipboardRelease(agent, sel: sel)
}
}
private func host_client_disconnected(_ agent: VdagentConnection!, ctx: UnsafeMutableRawPointer!) {
let host = Unmanaged<VdagentHost>.fromOpaque(ctx).takeUnretainedValue()
host.clientDisconnected(agent)
}
private func host_agent_connected(_ agent: VdagentConnection!, ctx: UnsafeMutableRawPointer!) {
let host = Unmanaged<VdagentHost>.fromOpaque(ctx).takeUnretainedValue()
host.agentConnected(agent)
}
private func host_agent_disconnected(_ agent: VdagentConnection!, ctx: UnsafeMutableRawPointer!) {
let host = Unmanaged<VdagentHost>.fromOpaque(ctx).takeUnretainedValue()
host.agentDisconnected(agent)
}
+103
View File
@@ -0,0 +1,103 @@
/* src/config.h.in. Generated from configure.ac by autoheader. */
/* If defined, vdagentd will be compiled with ConsoleKit support */
#undef HAVE_CONSOLE_KIT
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* If defined, vdagentd will be compiled with libsystemd-login support */
#undef HAVE_LIBSYSTEMD_LOGIN
/* If defined, vdagentd will be compiled with pciaccess support */
#undef HAVE_PCIACCESS
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdio.h> header file. */
#define HAVE_STDIO_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Name of package */
#define PACKAGE "spice-vdagent"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME "spice-vdagent"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "spice-vdagent 0.22.1"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "spice-vdagent"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "0.22.1"
/* Define to 1 if all of the C89 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#define STDC_HEADERS 1
/* If defined, use GTK for clipboard features */
#undef USE_GTK_FOR_CLIPBOARD
/* If defined, use GTK for monitor resolution instead of XRandr */
#undef USE_GTK_FOR_MONITORS
/* Version number of package */
#define VERSION "0.22.1"
/* If defined, load GTK+ libraries */
#undef WITH_GTK
/* If undefined and there is no session info, only one session agent is
allowed */
#undef WITH_SESSION_SECURITY
/* If defined, vdagentd will use a static uinput device */
#undef WITH_STATIC_UINPUT
/* If defined, vdagentd will support socket activation with systemd */
#undef WITH_SYSTEMD_SOCKET_ACTIVATION
/* Number of bits in a file offset, on hosts where this is settable. */
#define _FILE_OFFSET_BITS 64
/* Enable GNU extensions */
#define _GNU_SOURCE 1
/* Define to 1 on platforms where this makes off_t a 64-bit type. */
#define _LARGE_FILES 1
/* Number of bits in time_t, on hosts where this is settable. */
#define _TIME_BITS 64
/* Define to 1 on platforms where this makes time_t a 64-bit type. */
#undef __MINGW_USE_VC2005_COMPAT
/* GLib2 < 2.68 compatibility */
#undef g_memdup2
+477
View File
@@ -0,0 +1,477 @@
/*
* Copyright (C) 2024 osy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <stdio.h>
#include <syslog.h>
#include <sys/socket.h>
#include <glib-unix.h>
#include <spice/vd_agent.h>
#include "udscs.h"
#include "vdagentd-proto.h"
#include "vdagent.h"
#define MAX_RETRY_CONNECT_SYSTEM_AGENT 60
G_BEGIN_DECLS
#define VDAGENT_TYPE_VDAGENT (vdagent_get_type())
G_DECLARE_FINAL_TYPE(VDAgent, vdagent, VDAGENT, VDAGENT, GObject)
struct _VDAgent {
GObject parent_instance;
UdscsConnection *conn;
gint udscs_num_retry;
const vdagent_cb_t *cb;
void *ctx;
GMainLoop *loop;
};
G_END_DECLS
G_DEFINE_TYPE(VDAgent, vdagent, G_TYPE_OBJECT)
static int quit = 0;
static int parent_socket = -1;
static int version_mismatch = 0;
/* Command line options */
static gboolean debug = FALSE;
static gchar *vdagentd_socket = NULL;
static void vdagent_quit_loop(VDAgent *agent)
{
if (agent->cb && agent->cb->agent_disconnected) {
agent->cb->agent_disconnected(agent, agent->ctx);
}
if (agent->loop) {
g_main_loop_quit(agent->loop);
}
}
static gboolean vdagent_signal_handler(gpointer user_data)
{
VDAgent *agent = user_data;
quit = TRUE;
vdagent_quit_loop(agent);
return G_SOURCE_REMOVE;
}
static void vdagent_dispose(GObject *object)
{
VDAgent *agent = VDAGENT_VDAGENT(object);
g_clear_pointer(&agent->conn, vdagent_connection_destroy);
while (g_source_remove_by_user_data(agent))
continue;
g_clear_pointer(&agent->loop, g_main_loop_unref);
G_OBJECT_CLASS(vdagent_parent_class)->dispose(object);
}
static void vdagent_class_init(VDAgentClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS(klass);
object_class->dispose = vdagent_dispose;
}
static void vdagent_init(VDAgent *self)
{
self->loop = g_main_loop_new(NULL, FALSE);
}
static VDAgent *vdagent_new(const vdagent_cb_t *cb, void *ctx)
{
VDAgent *agent = g_object_new(VDAGENT_TYPE_VDAGENT, NULL);
agent->cb = cb;
agent->ctx = ctx;
g_unix_signal_add(SIGINT, vdagent_signal_handler, agent);
g_unix_signal_add(SIGHUP, vdagent_signal_handler, agent);
g_unix_signal_add(SIGTERM, vdagent_signal_handler, agent);
return agent;
}
void vdagent_set_debug(int debugOption)
{
debug = debugOption;
}
static guint32 convert_clipboard_type_to_raw(vdagent_clipboard_type_t type)
{
switch (type) {
case VDAgentClipboardTypeUTF8Text: return VD_AGENT_CLIPBOARD_UTF8_TEXT;
case VDAgentClipboardTypeImagePNG: return VD_AGENT_CLIPBOARD_IMAGE_PNG;
case VDAgentClipboardTypeImageBMP: return VD_AGENT_CLIPBOARD_IMAGE_BMP;
case VDAgentClipboardTypeImageTIFF: return VD_AGENT_CLIPBOARD_IMAGE_TIFF;
case VDAgentClipboardTypeImageJPG: return VD_AGENT_CLIPBOARD_IMAGE_JPG;
case VDAgentClipboardTypeNone:
default: return VD_AGENT_CLIPBOARD_NONE;
}
}
static vdagent_clipboard_type_t convert_raw_to_clipboard_type(guint32 type)
{
switch (type) {
case VD_AGENT_CLIPBOARD_UTF8_TEXT: return VDAgentClipboardTypeUTF8Text;
case VD_AGENT_CLIPBOARD_IMAGE_PNG: return VDAgentClipboardTypeImagePNG;
case VD_AGENT_CLIPBOARD_IMAGE_BMP: return VDAgentClipboardTypeImageBMP;
case VD_AGENT_CLIPBOARD_IMAGE_TIFF: return VDAgentClipboardTypeImageTIFF;
case VD_AGENT_CLIPBOARD_IMAGE_JPG: return VDAgentClipboardTypeImageJPG;
case VD_AGENT_CLIPBOARD_NONE:
default: return VDAgentClipboardTypeNone;
}
}
static guint32 convert_clipboard_select_to_raw(vdagent_clipboard_select_t sel)
{
switch (sel) {
case VDAgentClipboardSelectPrimary: return VD_AGENT_CLIPBOARD_SELECTION_PRIMARY;
case VDAgentClipboardSelectSecondary: return VD_AGENT_CLIPBOARD_SELECTION_SECONDARY;
case VDAgentClipboardSelectClipboard:
default: return VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD;
}
}
static vdagent_clipboard_select_t convert_raw_to_clipboard_select(guint32 sel)
{
switch (sel) {
case VD_AGENT_CLIPBOARD_SELECTION_PRIMARY: return VDAgentClipboardSelectPrimary;
case VD_AGENT_CLIPBOARD_SELECTION_SECONDARY: return VDAgentClipboardSelectSecondary;
case VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD:
default: return VDAgentClipboardSelectClipboard;
}
}
static void daemon_clipboard_request(VDAgent *agent,
guint sel_id, guint type)
{
if (agent->cb && agent->cb->clipboard_request) {
if (!agent->cb->clipboard_request(agent, agent->ctx,
convert_raw_to_clipboard_select(sel_id),
convert_raw_to_clipboard_type(type))) {
udscs_write(agent->conn, VDAGENTD_CLIPBOARD_DATA, sel_id,
VD_AGENT_CLIPBOARD_NONE, NULL, 0);
}
} else {
syslog(LOG_WARNING, "%s: no callback installed", __func__);
}
}
static void daemon_clipboard_grab(VDAgent *agent,
guint sel_id, guint32 *types, guint n_types)
{
if (agent->cb && agent->cb->clipboard_grab) {
vdagent_clipboard_type_t *_types = calloc(n_types, sizeof(*_types));
if (_types) {
for (int i = 0; i < n_types; i++) {
_types[i] = convert_raw_to_clipboard_type(types[i]);
}
agent->cb->clipboard_grab(agent, agent->ctx,
convert_raw_to_clipboard_select(sel_id),
_types, n_types);
free(_types);
}
} else {
syslog(LOG_WARNING, "%s: no callback installed", __func__);
}
}
static void daemon_clipboard_data(VDAgent *agent,
guint sel_id, guint32 type,
guchar *data, guint size)
{
if (agent->cb && agent->cb->clipboard_data) {
agent->cb->clipboard_data(agent, agent->ctx,
convert_raw_to_clipboard_select(sel_id),
convert_raw_to_clipboard_type(type),
data, size);
} else {
syslog(LOG_WARNING, "%s: no callback installed", __func__);
}
}
static void daemon_clipboard_release(VDAgent *agent, guint sel_id)
{
if (agent->cb && agent->cb->clipboard_release) {
agent->cb->clipboard_release(agent, agent->ctx,
convert_raw_to_clipboard_select(sel_id));
} else {
syslog(LOG_WARNING, "%s: no callback installed", __func__);
}
}
static void daemon_read_complete(UdscsConnection *conn,
struct udscs_message_header *header, uint8_t *data)
{
VDAgent *agent = g_object_get_data(G_OBJECT(conn), "agent");
switch (header->type) {
case VDAGENTD_CLIPBOARD_REQUEST:
daemon_clipboard_request(agent, header->arg1, header->arg2);
break;
case VDAGENTD_CLIPBOARD_GRAB:
daemon_clipboard_grab(agent, header->arg1, (guint32 *)data, header->size / sizeof(guint32));
break;
case VDAGENTD_CLIPBOARD_DATA:
daemon_clipboard_data(agent, header->arg1, header->arg2, data, header->size);
break;
case VDAGENTD_CLIPBOARD_RELEASE:
daemon_clipboard_release(agent, header->arg1);
break;
case VDAGENTD_VERSION:
if (strcmp((char *)data, VERSION) != 0) {
syslog(LOG_INFO, "vdagentd version mismatch: got %s expected %s",
data, VERSION);
vdagent_quit_loop(agent);
version_mismatch = 1;
}
break;
case VDAGENTD_CLIENT_DISCONNECTED:
if (agent->cb && agent->cb->client_disconnected) {
agent->cb->client_disconnected(agent, agent->ctx);
}
break;
default:
syslog(LOG_ERR, "Unknown message from vdagentd type: %d, ignoring",
header->type);
}
}
static void daemon_error_cb(VDAgentConnection *conn, GError *err)
{
VDAgent *agent = g_object_get_data(G_OBJECT(conn), "agent");
if (err) {
syslog(LOG_ERR, "%s", err->message);
g_error_free(err);
}
g_clear_pointer(&conn, vdagent_connection_destroy);
vdagent_quit_loop(agent);
}
static gboolean vdagent_init_async_cb(gpointer user_data)
{
VDAgent *agent = user_data;
GError *err = NULL;
agent->conn = udscs_connect(vdagentd_socket,
daemon_read_complete,
daemon_error_cb,
debug,
&err);
if (agent->conn == NULL) {
if (agent->udscs_num_retry == MAX_RETRY_CONNECT_SYSTEM_AGENT) {
syslog(LOG_WARNING,
"Failed to connect to spice-vdagentd at %s (tried %d times)",
vdagentd_socket, agent->udscs_num_retry);
g_error_free(err);
goto err_init;
}
if (agent->udscs_num_retry == 0) {
/* Log only when it fails and at the end */
syslog(LOG_DEBUG,
"Failed to connect with spice-vdagentd due '%s'. Trying again in 1s",
err->message);
}
g_error_free(err);
agent->udscs_num_retry++;
g_timeout_add_seconds(1, vdagent_init_async_cb, agent);
return G_SOURCE_REMOVE;
}
if (agent->udscs_num_retry != 0) {
syslog(LOG_DEBUG,
"Connected with spice-vdagentd after %d attempts",
agent->udscs_num_retry);
}
agent->udscs_num_retry = 0;
g_object_set_data(G_OBJECT(agent->conn), "agent", agent);
if (agent->cb && agent->cb->agent_connected) {
agent->cb->agent_connected(agent, agent->ctx);
}
return G_SOURCE_REMOVE;
err_init:
vdagent_quit_loop(agent);
quit = TRUE;
return G_SOURCE_REMOVE;
}
int vdagent_start(const char *socketPath, const vdagent_cb_t *cb, void *ctx)
{
VDAgent *agent;
if (socketPath == NULL)
vdagentd_socket = g_strdup(VDAGENTD_SOCKET);
else
vdagentd_socket = g_strdup(socketPath);
openlog("spice-vdagent", LOG_PID | LOG_PERROR, LOG_USER);
syslog(LOG_INFO, "vdagent started");
reconnect:
if (version_mismatch) {
syslog(LOG_INFO, "Version mismatch, restarting");
sleep(1);
}
agent = vdagent_new(cb, ctx);
g_timeout_add(0, vdagent_init_async_cb, agent);
g_main_loop_run(agent->loop);
g_clear_object(&agent);
/* allow the VDAgentConnection to finalize properly */
g_main_context_iteration(NULL, FALSE);
if (!quit)
goto reconnect;
g_free(vdagentd_socket);
return 0;
}
VDAgent *vdagent_ref(VDAgent *agent)
{
return VDAGENT_VDAGENT(g_object_ref(agent));
}
void vdagent_unref(VDAgent *agent)
{
g_object_unref(agent);
}
typedef struct {
UdscsConnection *conn;
struct udscs_message_header hdr;
const uint8_t *data;
GMutex mutex;
GCond cond;
gboolean is_done;
} vdagent_write_params_t;
static gboolean _vdagent_write_cb(gpointer user_data)
{
vdagent_write_params_t *params = (vdagent_write_params_t *)user_data;
udscs_write(params->conn,
params->hdr.type,
params->hdr.arg1,
params->hdr.arg2,
params->data,
params->hdr.size);
g_mutex_lock(&params->mutex);
params->is_done = TRUE;
g_cond_signal(&params->cond);
g_mutex_unlock(&params->mutex);
return G_SOURCE_REMOVE;
}
// write can happen from any thread so we need to synchronize it with the main context
static void vdagent_write(VDAgent *agent, uint32_t type, uint32_t arg1,
uint32_t arg2, const uint8_t *data, uint32_t size)
{
vdagent_write_params_t params = {
.conn = agent->conn,
.hdr.type = type,
.hdr.arg1 = arg1,
.hdr.arg2 = arg2,
.hdr.size = size,
.data = data,
};
// if we have the main context
if (g_main_context_acquire(NULL)) {
// we can call udscs_write directly
udscs_write(agent->conn, type,
arg1, arg2, data, size);
g_main_context_release(NULL);
} else {
// we have to synchronize with main context
g_mutex_init(&params.mutex);
g_cond_init(&params.cond);
g_mutex_lock(&params.mutex);
g_main_context_invoke(NULL, _vdagent_write_cb, &params);
while (!params.is_done) {
g_cond_wait(&params.cond, &params.mutex);
}
g_mutex_unlock(&params.mutex);
}
}
void vdagent_clipboard_request(VDAgent *agent, vdagent_clipboard_select_t sel, vdagent_clipboard_type_t type)
{
vdagent_write(agent,
VDAGENTD_CLIPBOARD_REQUEST,
convert_clipboard_select_to_raw(sel),
convert_clipboard_type_to_raw(type),
NULL, 0);
}
void vdagent_clipboard_grab(VDAgent *agent, vdagent_clipboard_select_t sel,
const vdagent_clipboard_type_t *types, int n_types)
{
guint32 *_types = calloc(n_types, sizeof(*_types));
if (!_types) {
syslog(LOG_ERR, "out of memory");
return;
}
for (int i = 0; i < n_types; i++) {
_types[i] = convert_clipboard_type_to_raw(types[i]);
}
vdagent_write(agent,
VDAGENTD_CLIPBOARD_GRAB,
convert_clipboard_select_to_raw(sel),
0,
(uint8_t *)_types, n_types * sizeof(guint32));
free(_types);
}
void vdagent_clipboard_data(VDAgent *agent, vdagent_clipboard_select_t sel,
vdagent_clipboard_type_t type, const unsigned char *data, unsigned int size)
{
vdagent_write(agent,
VDAGENTD_CLIPBOARD_DATA,
convert_clipboard_select_to_raw(sel),
convert_clipboard_type_to_raw(type),
data, size);
}
void vdagent_clipboard_release(VDAgent *agent, vdagent_clipboard_select_t sel)
{
vdagent_write(agent,
VDAGENTD_CLIPBOARD_RELEASE,
convert_clipboard_select_to_raw(sel),
0,
NULL, 0);
}
+73
View File
@@ -0,0 +1,73 @@
/*
* Copyright (C) 2024 osy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef vddagent_h
#define vddagent_h
#include <stdbool.h>
typedef struct _VDAgent VDAgent;
typedef enum {
VDAgentClipboardTypeNone,
VDAgentClipboardTypeUTF8Text,
VDAgentClipboardTypeImagePNG,
VDAgentClipboardTypeImageBMP,
VDAgentClipboardTypeImageTIFF,
VDAgentClipboardTypeImageJPG,
} vdagent_clipboard_type_t;
typedef enum {
VDAgentClipboardSelectClipboard,
VDAgentClipboardSelectPrimary,
VDAgentClipboardSelectSecondary,
} vdagent_clipboard_select_t;
typedef bool (*vdagent_clipboard_request_cb)(VDAgent *agent, void *ctx, vdagent_clipboard_select_t sel, vdagent_clipboard_type_t type);
typedef bool (*vdagent_clipboard_grab_cb)(VDAgent *agent, void *ctx, vdagent_clipboard_select_t sel,
const vdagent_clipboard_type_t *types, unsigned int n_types);
typedef bool (*vdagent_clipboard_data_cb)(VDAgent *agent, void *ctx, vdagent_clipboard_select_t sel,
vdagent_clipboard_type_t type, const unsigned char *data, unsigned int size);
typedef bool (*vdagent_clipboard_release_cb)(VDAgent *agent, void *ctx, vdagent_clipboard_select_t sel);
typedef void (*vdagent_client_disconnected_cb)(VDAgent *agent, void *ctx);
typedef void (*vdagent_agent_connected_cb)(VDAgent *agent, void *ctx);
typedef void (*vdagent_agent_disconnected_cb)(VDAgent *agent, void *ctx);
typedef struct {
vdagent_clipboard_request_cb clipboard_request;
vdagent_clipboard_grab_cb clipboard_grab;
vdagent_clipboard_data_cb clipboard_data;
vdagent_clipboard_release_cb clipboard_release;
vdagent_client_disconnected_cb client_disconnected;
vdagent_agent_connected_cb agent_connected;
vdagent_agent_disconnected_cb agent_disconnected;
} vdagent_cb_t;
void vdagent_set_debug(int debugOption);
int vdagent_start(const char *socketPath, const vdagent_cb_t *cb, void *ctx);
VDAgent *vdagent_ref(VDAgent *agent);
void vdagent_unref(VDAgent *agent);
void vdagent_clipboard_request(VDAgent *agent, vdagent_clipboard_select_t sel, vdagent_clipboard_type_t type);
void vdagent_clipboard_grab(VDAgent *agent, vdagent_clipboard_select_t sel,
const vdagent_clipboard_type_t *types, int n_types);
void vdagent_clipboard_data(VDAgent *agent, vdagent_clipboard_select_t sel,
vdagent_clipboard_type_t type, const unsigned char *data, unsigned int size);
void vdagent_clipboard_release(VDAgent *agent, vdagent_clipboard_select_t sel);
#endif /* vddagent_h */
+1 -1
View File
@@ -28,7 +28,7 @@ G_BEGIN_DECLS
#define VDAGENT_TYPE_CONNECTION vdagent_connection_get_type()
G_DECLARE_DERIVABLE_TYPE(VDAgentConnection, vdagent_connection, VDAGENT, CONNECTION, GObject)
/* Sublasses of VDAgentConnection must implement
/* Subclasses of VDAgentConnection must implement
* handle_header and handle_message. */
struct _VDAgentConnectionClass {
GObjectClass parent_class;
+1 -1
View File
@@ -281,7 +281,7 @@ static void clipboard_contents_received_cb(GtkClipboard *clipboard,
gtk_selection_data_get_data(sel_data),
gtk_selection_data_get_length(sel_data));
} else {
syslog(LOG_WARNING, "%s: sel_id=%u: expected type %u, recieved %u, "
syslog(LOG_WARNING, "%s: sel_id=%u: expected type %u, received %u, "
"skipping", __func__, sel_id, target, type);
udscs_write(c->conn, VDAGENTD_CLIPBOARD_DATA, sel_id,
VD_AGENT_CLIPBOARD_NONE, NULL, 0);
+1 -1
View File
@@ -332,7 +332,7 @@ static char* find_device_at_pci_address(PciAddress *pci_addr, int *vendor_id, in
g_return_val_if_fail(device_id != NULL, NULL);
g_return_val_if_fail(vendor_id != NULL, NULL);
// Look for a device that matches the PCI address parsed above. Loop
// through the list of cards reported by the DRM subsytem
// through the list of cards reported by the DRM subsystem
for (int i = 0; i < 10; ++i) {
char dev_path[64];
struct stat buf;
+4 -2
View File
@@ -60,6 +60,7 @@ struct VDAgentDisplay {
UdscsConnection *vdagentd;
int debug;
GIOChannel *x11_channel;
guint io_watch_source_id;
VDAgentMutterDBus *mutter;
};
@@ -296,7 +297,8 @@ VDAgentDisplay* vdagent_display_create(UdscsConnection *vdagentd, int debug, int
return NULL;
}
g_io_add_watch(display->x11_channel, G_IO_IN, x11_io_channel_cb, display);
display->io_watch_source_id =
g_io_add_watch(display->x11_channel, G_IO_IN, x11_io_channel_cb, display);
/* Since we are started at the same time as the wm,
@@ -323,7 +325,7 @@ void vdagent_display_destroy(VDAgentDisplay *display, int vdagentd_disconnected)
return;
}
g_source_remove(display->io_watch_source_id);
g_clear_pointer(&display->x11_channel, g_io_channel_unref);
vdagent_x11_destroy(display->x11, vdagentd_disconnected);
+1 -1
View File
@@ -57,7 +57,7 @@ struct VDAgentMutterDBus {
*
* Returns:
* An initialise VDAgentMutterDBus structure if successful.
* NULL if an error occured.
* NULL if an error occurred.
*/
VDAgentMutterDBus *vdagent_mutter_create(GHashTable *connector_mapping)
{
-3
View File
@@ -302,9 +302,6 @@ struct vdagent_x11 *vdagent_x11_create(UdscsConnection *vdagentd,
x11->height[i] = attrib.height;
}
/* Flush output buffers and consume any pending events */
vdagent_x11_do_read(x11);
return x11;
}
+105
View File
@@ -33,6 +33,10 @@
#include <sys/stat.h>
#include <spice/vd_agent.h>
#include <glib-unix.h>
#ifdef __APPLE__
#include <dispatch/dispatch.h>
#include <IOKit/IOKitLib.h>
#endif
#ifdef WITH_SYSTEMD_SOCKET_ACTIVATION
#include <systemd/sd-daemon.h>
@@ -94,6 +98,8 @@ static uint32_t clipboard_serial[256];
static GMainLoop *loop;
static void update_active_session_connection(UdscsConnection *new_conn);
static void agent_data_destroy(struct agent_data *agent_data)
{
g_free(agent_data->session);
@@ -146,8 +152,10 @@ static void send_capabilities(VirtioPort *vport,
size = sizeof(*caps) + VD_AGENT_CAPS_BYTES;
caps = g_malloc0(size);
caps->request = request;
#ifndef __APPLE__
VD_AGENT_SET_CAPABILITY(caps->caps, VD_AGENT_CAP_MOUSE_STATE);
VD_AGENT_SET_CAPABILITY(caps->caps, VD_AGENT_CAP_MONITORS_CONFIG);
#endif
VD_AGENT_SET_CAPABILITY(caps->caps, VD_AGENT_CAP_REPLY);
VD_AGENT_SET_CAPABILITY(caps->caps, VD_AGENT_CAP_CLIPBOARD_BY_DEMAND);
VD_AGENT_SET_CAPABILITY(caps->caps, VD_AGENT_CAP_CLIPBOARD_SELECTION);
@@ -176,6 +184,7 @@ static void do_client_disconnect(void)
}
}
#ifndef __APPLE__
void do_client_mouse(struct vdagentd_uinput **uinputp, VDAgentMouseState *mouse)
{
vdagentd_uinput_do_mouse(uinputp, mouse);
@@ -229,6 +238,7 @@ static void do_client_monitors(VirtioPort *vport, int port_nr,
vdagent_virtio_port_write(vport, port_nr, VD_AGENT_REPLY, 0,
(uint8_t *)&reply, sizeof(reply));
}
#endif
static void do_client_volume_sync(VirtioPort *vport, int port_nr,
VDAgentMessage *message_header,
@@ -608,6 +618,7 @@ static void virtio_port_read_complete(
return;
switch (message_header->type) {
#ifndef __APPLE__
case VD_AGENT_MOUSE_STATE:
virtio_msg_uint32_from_le(data, message_header->size, 0);
do_client_mouse(&uinput, (VDAgentMouseState *)data);
@@ -617,6 +628,7 @@ static void virtio_port_read_complete(
do_client_monitors(vport, port_nr, message_header,
(VDAgentMonitorsConfig *)data);
break;
#endif
case VD_AGENT_ANNOUNCE_CAPABILITIES:
virtio_msg_uint32_from_le(data, message_header->size, 0);
do_client_capabilities(vport, message_header,
@@ -741,10 +753,14 @@ static void do_agent_clipboard(UdscsConnection *conn,
/* Check that this agent is from the currently active session */
if (conn != active_session_conn) {
#ifdef WITH_SESSION_SECURITY
if (debug)
syslog(LOG_DEBUG, "%p clipboard req from agent which is not in "
"the active session?", conn);
goto error;
#else
update_active_session_connection(conn);
#endif
}
if (!virtio_port) {
@@ -820,6 +836,7 @@ static void check_xorg_resolution(void)
if (active_session_conn)
agent_data = g_object_get_data(G_OBJECT(active_session_conn), "agent_data");
#ifndef __APPLE__
if (agent_data && agent_data->screen_info) {
if (!uinput)
uinput = vdagentd_uinput_create(uinput_device,
@@ -840,6 +857,9 @@ static void check_xorg_resolution(void)
vdagentd_quit(1);
return;
}
#else
if (agent_data) {
#endif
if (!virtio_port) {
syslog(LOG_INFO, "opening vdagent virtio channel");
@@ -855,7 +875,9 @@ static void check_xorg_resolution(void)
}
} else {
#ifndef WITH_STATIC_UINPUT
#ifndef __APPLE__
vdagentd_uinput_destroy(&uinput);
#endif
#endif
if (virtio_port) {
if (only_once) {
@@ -870,6 +892,63 @@ static void check_xorg_resolution(void)
}
}
#ifdef __APPLE__
static gboolean reopen_virtio_port(gpointer user_data)
{
check_xorg_resolution();
return G_SOURCE_REMOVE;
}
static gboolean restart_virtio_port(gpointer user_data)
{
if (virtio_port) {
syslog(LOG_INFO, "VM restored, reopening vdagent virtio channel");
g_clear_pointer(&virtio_port, vdagent_connection_destroy);
do_client_disconnect();
/* the old port's cancelled read must release its file descriptor first */
g_idle_add(reopen_virtio_port, NULL);
}
return G_SOURCE_REMOVE;
}
/* Virtualization.framework forgets that the port is open when it restores a
saved VM, then drops whatever the guest writes to it and never completes
the write, which leaves the port unusable until the guest reboots. The
virtual RTC sends a message as soon as the VM is restored, so reopen the
port then, before anything is written, to tell the host it is open again. */
static void rtc_interest_cb(void *refcon, io_service_t service,
natural_t message_type, void *message_argument)
{
g_idle_add(restart_virtio_port, NULL);
}
static IONotificationPortRef watch_vm_restore(io_object_t *notification)
{
io_service_t rtc;
IONotificationPortRef port;
kern_return_t kr;
rtc = IOServiceGetMatchingService(MACH_PORT_NULL,
IOServiceMatching("AppleVirtualPlatformRTC"));
if (!rtc) {
/* not running in Virtualization.framework */
return NULL;
}
port = IONotificationPortCreate(MACH_PORT_NULL);
IONotificationPortSetDispatchQueue(port,
dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0));
kr = IOServiceAddInterestNotification(port, rtc, kIOGeneralInterest,
rtc_interest_cb, NULL, notification);
IOObjectRelease(rtc);
if (kr != KERN_SUCCESS) {
syslog(LOG_WARNING, "could not watch for VM restore: 0x%x", kr);
IONotificationPortDestroy(port);
return NULL;
}
return port;
}
#endif
static int connection_matches_active_session(UdscsConnection *conn,
void *priv)
{
@@ -909,17 +988,21 @@ static void update_active_session_connection(UdscsConnection *new_conn)
connection_matches_active_session,
(void*)&new_conn);
} else {
#ifdef WITH_SESSION_SECURITY
if (new_conn)
session_count++;
else
session_count--;
#endif
}
#ifdef WITH_SESSION_SECURITY
if (new_conn && session_count != 1) {
syslog(LOG_ERR, "multiple agents in one session, "
"disabling agent to avoid potential information leak");
new_conn = NULL;
}
#endif
if (new_conn == active_session_conn)
return;
@@ -1065,6 +1148,7 @@ static void agent_disconnect(VDAgentConnection *conn, GError *err)
update_active_session_connection(NULL);
}
#ifndef __APPLE__
static void do_agent_xorg_resolution(UdscsConnection *conn,
struct udscs_message_header *header,
guint8 *data)
@@ -1097,6 +1181,7 @@ static void do_agent_xorg_resolution(UdscsConnection *conn,
check_xorg_resolution();
}
#endif
static void do_agent_file_xfer_status(UdscsConnection *conn,
struct udscs_message_header *header,
@@ -1138,9 +1223,11 @@ static void agent_read_complete(UdscsConnection *conn,
struct udscs_message_header *header, uint8_t *data)
{
switch (header->type) {
#ifndef __APPLE__
case VDAGENTD_GUEST_XORG_RESOLUTION:
do_agent_xorg_resolution(conn, header, data);
break;
#endif
case VDAGENTD_CLIPBOARD_GRAB:
case VDAGENTD_CLIPBOARD_REQUEST:
case VDAGENTD_CLIPBOARD_DATA:
@@ -1267,6 +1354,10 @@ int main(int argc, char *argv[])
gboolean own_socket = TRUE;
GIOChannel *si_io_channel = NULL;
guint si_watch_id = 0;
#ifdef __APPLE__
IONotificationPortRef restore_notify_port;
io_object_t restore_notification;
#endif
context = g_option_context_new(NULL);
g_option_context_add_main_entries(context, cmd_entries, NULL);
@@ -1346,21 +1437,35 @@ int main(int argc, char *argv[])
si_watch_id = g_io_add_watch(si_io_channel, G_IO_IN, si_io_channel_cb, NULL);
g_io_channel_unref(si_io_channel);
} else {
#ifdef WITH_SESSION_SECURITY
syslog(LOG_WARNING, "no session info, max 1 session agent allowed");
#endif
}
active_xfers = g_hash_table_new(g_direct_hash, g_direct_equal);
#ifdef __APPLE__
restore_notify_port = watch_vm_restore(&restore_notification);
#endif
udscs_server_start(server);
loop = g_main_loop_new(NULL, FALSE);
g_main_loop_run(loop);
release_clipboards();
#ifndef __APPLE__
vdagentd_uinput_destroy(&uinput);
#endif
if (si_watch_id > 0) {
g_source_remove(si_watch_id);
}
#ifdef __APPLE__
if (restore_notify_port) {
IOObjectRelease(restore_notification);
IONotificationPortDestroy(restore_notify_port);
}
#endif
g_clear_pointer(&session_info, session_info_destroy);
g_clear_pointer(&server, udscs_destroy_server);
if (virtio_port) {
+779
View File
@@ -0,0 +1,779 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 55;
objects = {
/* Begin PBXAggregateTarget section */
CE03A11A2CEA8429006884EE /* vd_agent */ = {
isa = PBXAggregateTarget;
buildConfigurationList = CE03A11B2CEA8429006884EE /* Build configuration list for PBXAggregateTarget "vd_agent" */;
buildPhases = (
);
dependencies = (
CE03A11F2CEA8442006884EE /* PBXTargetDependency */,
CE03A1212CEA8442006884EE /* PBXTargetDependency */,
);
name = vd_agent;
packageProductDependencies = (
);
productName = vd_agent;
};
/* End PBXAggregateTarget section */
/* Begin PBXBuildFile section */
CE03A0BC2CE9012D006884EE /* udscs.c in Sources */ = {isa = PBXBuildFile; fileRef = CE03A0B62CE900A0006884EE /* udscs.c */; };
CE03A0BD2CE9012D006884EE /* vdagent-connection.c in Sources */ = {isa = PBXBuildFile; fileRef = CE03A0B82CE900A0006884EE /* vdagent-connection.c */; };
CE03A0C02CE9039B006884EE /* dummy-session-info.c in Sources */ = {isa = PBXBuildFile; fileRef = CE03A0A92CE900A0006884EE /* dummy-session-info.c */; };
CE03A0C22CE90428006884EE /* virtio-port.c in Sources */ = {isa = PBXBuildFile; fileRef = CE03A0B02CE900A0006884EE /* virtio-port.c */; };
CE03A0C32CE90428006884EE /* vdagentd.c in Sources */ = {isa = PBXBuildFile; fileRef = CE03A0AE2CE900A0006884EE /* vdagentd.c */; };
CE03A0C82CE904D3006884EE /* libgio-2.0.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CE03A0C52CE904C4006884EE /* libgio-2.0.a */; };
CE03A0C92CE904D4006884EE /* libglib-2.0.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CE03A0C62CE904C4006884EE /* libglib-2.0.a */; };
CE03A0CC2CE90506006884EE /* libgobject-2.0.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CE03A0CB2CE904EA006884EE /* libgobject-2.0.a */; };
CE03A0E72CE90CFC006884EE /* Vdagent.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE03A0E62CE90CFC006884EE /* Vdagent.swift */; };
CE03A0E82CE90CFC006884EE /* vdagent.c in Sources */ = {isa = PBXBuildFile; fileRef = CE03A0E52CE90CFC006884EE /* vdagent.c */; };
CE03A0EA2CE90D38006884EE /* udscs.c in Sources */ = {isa = PBXBuildFile; fileRef = CE03A0B62CE900A0006884EE /* udscs.c */; };
CE03A0ED2CE90D55006884EE /* ArgumentParser in Frameworks */ = {isa = PBXBuildFile; productRef = CE03A0EC2CE90D55006884EE /* ArgumentParser */; };
CE03A0EE2CE97927006884EE /* vdagent-connection.c in Sources */ = {isa = PBXBuildFile; fileRef = CE03A0B82CE900A0006884EE /* vdagent-connection.c */; };
CE03A0EF2CE97931006884EE /* libgio-2.0.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CE03A0C52CE904C4006884EE /* libgio-2.0.a */; };
CE03A0F02CE97933006884EE /* libglib-2.0.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CE03A0C62CE904C4006884EE /* libglib-2.0.a */; };
CE03A0F12CE97936006884EE /* libgobject-2.0.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CE03A0CB2CE904EA006884EE /* libgobject-2.0.a */; };
CE03A1172CEA83AF006884EE /* com.redhat.spice.vdagentd.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = CE03A10D2CEA838C006884EE /* com.redhat.spice.vdagentd.plist */; };
CE03A1192CEA83C6006884EE /* com.redhat.spice.vdagent.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = CE03A10C2CEA838C006884EE /* com.redhat.spice.vdagent.plist */; };
CE03A1262CEA8EF1006884EE /* libiconv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = CE03A1232CEA8EF1006884EE /* libiconv.tbd */; };
CE03A1272CEA8EF1006884EE /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = CE03A1242CEA8EF1006884EE /* libz.tbd */; };
CE03A1282CEA8EF1006884EE /* libpcre2-8.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = CE03A1252CEA8EF1006884EE /* libpcre2-8.tbd */; };
CE03A12A2CEA8F18006884EE /* libffi.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = CE03A1292CEA8F18006884EE /* libffi.tbd */; };
CE03A12C2CEA8F6A006884EE /* libgmodule-2.0.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CE03A12B2CEA8F60006884EE /* libgmodule-2.0.a */; };
CE03A12E2CEA8F75006884EE /* libintl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CE03A12D2CEA8F75006884EE /* libintl.a */; };
CE03A1302CEA8FBA006884EE /* libresolv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = CE03A12F2CEA8FBA006884EE /* libresolv.tbd */; };
CE03A1322CEA8FCE006884EE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE03A1312CEA8FCE006884EE /* Foundation.framework */; };
CE03A1342CEA8FE4006884EE /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE03A1332CEA8FE4006884EE /* AppKit.framework */; };
CE77170B2EC0000000A1B2C3 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE77170A2EC0000000A1B2C3 /* IOKit.framework */; };
CE54BD8E2CEA90F200FE3930 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE03A1332CEA8FE4006884EE /* AppKit.framework */; };
CE54BD8F2CEA90F400FE3930 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE03A1312CEA8FCE006884EE /* Foundation.framework */; };
CE54BD902CEA90F600FE3930 /* libgmodule-2.0.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CE03A12B2CEA8F60006884EE /* libgmodule-2.0.a */; };
CE54BD912CEA90FD00FE3930 /* libintl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CE03A12D2CEA8F75006884EE /* libintl.a */; };
CE54BD922CEA910000FE3930 /* libresolv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = CE03A12F2CEA8FBA006884EE /* libresolv.tbd */; };
CE54BD932CEA910200FE3930 /* libffi.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = CE03A1292CEA8F18006884EE /* libffi.tbd */; };
CE54BD942CEA910600FE3930 /* libiconv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = CE03A1232CEA8EF1006884EE /* libiconv.tbd */; };
CE54BD952CEA910700FE3930 /* libpcre2-8.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = CE03A1252CEA8EF1006884EE /* libpcre2-8.tbd */; };
CE54BD962CEA910E00FE3930 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = CE03A1242CEA8EF1006884EE /* libz.tbd */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
CE03A0F22CE9ED98006884EE /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = CE03A0822CE90065006884EE /* Project object */;
proxyType = 1;
remoteGlobalIDString = CE03A0892CE90065006884EE;
remoteInfo = "spice-vdagentd";
};
CE03A11E2CEA8442006884EE /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = CE03A0822CE90065006884EE /* Project object */;
proxyType = 1;
remoteGlobalIDString = CE03A0DC2CE90CE8006884EE;
remoteInfo = "spice-vdagent";
};
CE03A1202CEA8442006884EE /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = CE03A0822CE90065006884EE /* Project object */;
proxyType = 1;
remoteGlobalIDString = CE03A0892CE90065006884EE;
remoteInfo = "spice-vdagentd";
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
CE03A0882CE90065006884EE /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = /Library/LaunchDaemons;
dstSubfolderSpec = 0;
files = (
CE03A1172CEA83AF006884EE /* com.redhat.spice.vdagentd.plist in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 1;
};
CE03A1182CEA83C0006884EE /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 8;
dstPath = /Library/LaunchAgents;
dstSubfolderSpec = 0;
files = (
CE03A1192CEA83C6006884EE /* com.redhat.spice.vdagent.plist in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 1;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
CE03A08A2CE90065006884EE /* spice-vdagentd */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "spice-vdagentd"; sourceTree = BUILT_PRODUCTS_DIR; };
CE03A0A92CE900A0006884EE /* dummy-session-info.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "dummy-session-info.c"; sourceTree = "<group>"; };
CE03A0AA2CE900A0006884EE /* session-info.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "session-info.h"; sourceTree = "<group>"; };
CE03A0AE2CE900A0006884EE /* vdagentd.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = vdagentd.c; sourceTree = "<group>"; };
CE03A0AF2CE900A0006884EE /* virtio-port.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "virtio-port.h"; sourceTree = "<group>"; };
CE03A0B02CE900A0006884EE /* virtio-port.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "virtio-port.c"; sourceTree = "<group>"; };
CE03A0B42CE900A0006884EE /* config.h.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = config.h.in; sourceTree = "<group>"; };
CE03A0B52CE900A0006884EE /* udscs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = udscs.h; sourceTree = "<group>"; };
CE03A0B62CE900A0006884EE /* udscs.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = udscs.c; sourceTree = "<group>"; };
CE03A0B72CE900A0006884EE /* vdagent-connection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "vdagent-connection.h"; sourceTree = "<group>"; };
CE03A0B82CE900A0006884EE /* vdagent-connection.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "vdagent-connection.c"; sourceTree = "<group>"; };
CE03A0B92CE900A0006884EE /* vdagentd-proto.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "vdagentd-proto.h"; sourceTree = "<group>"; };
CE03A0BA2CE900A0006884EE /* vdagentd-proto-strings.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "vdagentd-proto-strings.h"; sourceTree = "<group>"; };
CE03A0BE2CE9036C006884EE /* config.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
CE03A0C52CE904C4006884EE /* libgio-2.0.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libgio-2.0.a"; path = "$(DERIVED_FILE_DIR)/lib/libgio-2.0.a"; sourceTree = "<absolute>"; };
CE03A0C62CE904C4006884EE /* libglib-2.0.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libglib-2.0.a"; path = "$(DERIVED_FILE_DIR)/lib/libglib-2.0.a"; sourceTree = "<absolute>"; };
CE03A0CB2CE904EA006884EE /* libgobject-2.0.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libgobject-2.0.a"; path = "$(DERIVED_FILE_DIR)/lib/libgobject-2.0.a"; sourceTree = "<absolute>"; };
CE03A0DD2CE90CE8006884EE /* spice-vdagent */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "spice-vdagent"; sourceTree = BUILT_PRODUCTS_DIR; };
CE03A0E42CE90CFC006884EE /* vdagent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = vdagent.h; sourceTree = "<group>"; };
CE03A0E52CE90CFC006884EE /* vdagent.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = vdagent.c; sourceTree = "<group>"; };
CE03A0E62CE90CFC006884EE /* Vdagent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Vdagent.swift; sourceTree = "<group>"; };
CE03A10C2CEA838C006884EE /* com.redhat.spice.vdagent.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = com.redhat.spice.vdagent.plist; sourceTree = "<group>"; };
CE03A10D2CEA838C006884EE /* com.redhat.spice.vdagentd.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = com.redhat.spice.vdagentd.plist; sourceTree = "<group>"; };
CE03A1232CEA8EF1006884EE /* libiconv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libiconv.tbd; path = usr/lib/libiconv.tbd; sourceTree = SDKROOT; };
CE03A1242CEA8EF1006884EE /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
CE03A1252CEA8EF1006884EE /* libpcre2-8.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libpcre2-8.tbd"; path = "usr/lib/libpcre2-8.tbd"; sourceTree = SDKROOT; };
CE03A1292CEA8F18006884EE /* libffi.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libffi.tbd; path = usr/lib/libffi.tbd; sourceTree = SDKROOT; };
CE03A12B2CEA8F60006884EE /* libgmodule-2.0.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libgmodule-2.0.a"; path = "$(DERIVED_FILE_DIR)/lib/libgmodule-2.0.a"; sourceTree = "<group>"; };
CE03A12D2CEA8F75006884EE /* libintl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libintl.a; path = "$(DERIVED_FILE_DIR)/lib/libintl.a"; sourceTree = "<group>"; };
CE03A12F2CEA8FBA006884EE /* libresolv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libresolv.tbd; path = usr/lib/libresolv.tbd; sourceTree = SDKROOT; };
CE03A1312CEA8FCE006884EE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
CE03A1332CEA8FE4006884EE /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
CE77170A2EC0000000A1B2C3 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
CE03A0872CE90065006884EE /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
CE03A1342CEA8FE4006884EE /* AppKit.framework in Frameworks */,
CE03A1322CEA8FCE006884EE /* Foundation.framework in Frameworks */,
CE77170B2EC0000000A1B2C3 /* IOKit.framework in Frameworks */,
CE03A1302CEA8FBA006884EE /* libresolv.tbd in Frameworks */,
CE03A12E2CEA8F75006884EE /* libintl.a in Frameworks */,
CE03A12A2CEA8F18006884EE /* libffi.tbd in Frameworks */,
CE03A1262CEA8EF1006884EE /* libiconv.tbd in Frameworks */,
CE03A1272CEA8EF1006884EE /* libz.tbd in Frameworks */,
CE03A1282CEA8EF1006884EE /* libpcre2-8.tbd in Frameworks */,
CE03A0C82CE904D3006884EE /* libgio-2.0.a in Frameworks */,
CE03A0C92CE904D4006884EE /* libglib-2.0.a in Frameworks */,
CE03A0CC2CE90506006884EE /* libgobject-2.0.a in Frameworks */,
CE03A12C2CEA8F6A006884EE /* libgmodule-2.0.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
CE03A0DA2CE90CE8006884EE /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
CE03A0ED2CE90D55006884EE /* ArgumentParser in Frameworks */,
CE54BD8E2CEA90F200FE3930 /* AppKit.framework in Frameworks */,
CE54BD8F2CEA90F400FE3930 /* Foundation.framework in Frameworks */,
CE54BD912CEA90FD00FE3930 /* libintl.a in Frameworks */,
CE54BD922CEA910000FE3930 /* libresolv.tbd in Frameworks */,
CE54BD932CEA910200FE3930 /* libffi.tbd in Frameworks */,
CE54BD942CEA910600FE3930 /* libiconv.tbd in Frameworks */,
CE54BD952CEA910700FE3930 /* libpcre2-8.tbd in Frameworks */,
CE54BD962CEA910E00FE3930 /* libz.tbd in Frameworks */,
CE03A0EF2CE97931006884EE /* libgio-2.0.a in Frameworks */,
CE03A0F02CE97933006884EE /* libglib-2.0.a in Frameworks */,
CE54BD902CEA90F600FE3930 /* libgmodule-2.0.a in Frameworks */,
CE03A0F12CE97936006884EE /* libgobject-2.0.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
CE03A0812CE90065006884EE = {
isa = PBXGroup;
children = (
CE03A1162CEA838C006884EE /* data */,
CE03A0BB2CE900A0006884EE /* src */,
CE03A0C42CE904C4006884EE /* Frameworks */,
CE03A08B2CE90065006884EE /* Products */,
);
sourceTree = "<group>";
};
CE03A08B2CE90065006884EE /* Products */ = {
isa = PBXGroup;
children = (
CE03A08A2CE90065006884EE /* spice-vdagentd */,
CE03A0DD2CE90CE8006884EE /* spice-vdagent */,
);
name = Products;
sourceTree = "<group>";
};
CE03A0B32CE900A0006884EE /* vdagentd */ = {
isa = PBXGroup;
children = (
CE03A0A92CE900A0006884EE /* dummy-session-info.c */,
CE03A0AA2CE900A0006884EE /* session-info.h */,
CE03A0AE2CE900A0006884EE /* vdagentd.c */,
CE03A0AF2CE900A0006884EE /* virtio-port.h */,
CE03A0B02CE900A0006884EE /* virtio-port.c */,
);
path = vdagentd;
sourceTree = "<group>";
};
CE03A0BB2CE900A0006884EE /* src */ = {
isa = PBXGroup;
children = (
CE03A0BF2CE9036C006884EE /* darwin */,
CE03A0B32CE900A0006884EE /* vdagentd */,
CE03A0B42CE900A0006884EE /* config.h.in */,
CE03A0B52CE900A0006884EE /* udscs.h */,
CE03A0B62CE900A0006884EE /* udscs.c */,
CE03A0B72CE900A0006884EE /* vdagent-connection.h */,
CE03A0B82CE900A0006884EE /* vdagent-connection.c */,
CE03A0B92CE900A0006884EE /* vdagentd-proto.h */,
CE03A0BA2CE900A0006884EE /* vdagentd-proto-strings.h */,
);
path = src;
sourceTree = "<group>";
};
CE03A0BF2CE9036C006884EE /* darwin */ = {
isa = PBXGroup;
children = (
CE03A0E42CE90CFC006884EE /* vdagent.h */,
CE03A0E52CE90CFC006884EE /* vdagent.c */,
CE03A0E62CE90CFC006884EE /* Vdagent.swift */,
CE03A0C12CE903F0006884EE /* include */,
);
path = darwin;
sourceTree = "<group>";
};
CE03A0C12CE903F0006884EE /* include */ = {
isa = PBXGroup;
children = (
CE03A0BE2CE9036C006884EE /* config.h */,
);
path = include;
sourceTree = "<group>";
};
CE03A0C42CE904C4006884EE /* Frameworks */ = {
isa = PBXGroup;
children = (
CE03A1332CEA8FE4006884EE /* AppKit.framework */,
CE03A1312CEA8FCE006884EE /* Foundation.framework */,
CE77170A2EC0000000A1B2C3 /* IOKit.framework */,
CE03A12B2CEA8F60006884EE /* libgmodule-2.0.a */,
CE03A12D2CEA8F75006884EE /* libintl.a */,
CE03A12F2CEA8FBA006884EE /* libresolv.tbd */,
CE03A1292CEA8F18006884EE /* libffi.tbd */,
CE03A1232CEA8EF1006884EE /* libiconv.tbd */,
CE03A1252CEA8EF1006884EE /* libpcre2-8.tbd */,
CE03A1242CEA8EF1006884EE /* libz.tbd */,
CE03A0C52CE904C4006884EE /* libgio-2.0.a */,
CE03A0C62CE904C4006884EE /* libglib-2.0.a */,
CE03A0CB2CE904EA006884EE /* libgobject-2.0.a */,
);
name = Frameworks;
sourceTree = "<group>";
};
CE03A1162CEA838C006884EE /* data */ = {
isa = PBXGroup;
children = (
CE03A10C2CEA838C006884EE /* com.redhat.spice.vdagent.plist */,
CE03A10D2CEA838C006884EE /* com.redhat.spice.vdagentd.plist */,
);
path = data;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
CE03A0892CE90065006884EE /* spice-vdagentd */ = {
isa = PBXNativeTarget;
buildConfigurationList = CE03A0912CE90065006884EE /* Build configuration list for PBXNativeTarget "spice-vdagentd" */;
buildPhases = (
CE03A0F42CE9EDB0006884EE /* Fetch SPICE headers */,
CE03A1222CEA86DC006884EE /* Build universal GLib */,
CE03A0862CE90065006884EE /* Sources */,
CE03A0872CE90065006884EE /* Frameworks */,
CE03A0882CE90065006884EE /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = "spice-vdagentd";
packageProductDependencies = (
);
productName = vd_agent;
productReference = CE03A08A2CE90065006884EE /* spice-vdagentd */;
productType = "com.apple.product-type.tool";
};
CE03A0DC2CE90CE8006884EE /* spice-vdagent */ = {
isa = PBXNativeTarget;
buildConfigurationList = CE03A0E12CE90CE8006884EE /* Build configuration list for PBXNativeTarget "spice-vdagent" */;
buildPhases = (
CE54BD972CEA914E00FE3930 /* Build universal GLib */,
CE03A0D92CE90CE8006884EE /* Sources */,
CE03A0DA2CE90CE8006884EE /* Frameworks */,
CE03A1182CEA83C0006884EE /* CopyFiles */,
);
buildRules = (
);
dependencies = (
CE03A0F32CE9ED98006884EE /* PBXTargetDependency */,
);
name = "spice-vdagent";
packageProductDependencies = (
CE03A0EC2CE90D55006884EE /* ArgumentParser */,
);
productName = "spice-vdagent";
productReference = CE03A0DD2CE90CE8006884EE /* spice-vdagent */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
CE03A0822CE90065006884EE /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1600;
LastUpgradeCheck = 1600;
TargetAttributes = {
CE03A0892CE90065006884EE = {
CreatedOnToolsVersion = 16.0;
};
CE03A0DC2CE90CE8006884EE = {
CreatedOnToolsVersion = 16.0;
LastSwiftMigration = 1600;
};
CE03A11A2CEA8429006884EE = {
CreatedOnToolsVersion = 16.0;
};
};
};
buildConfigurationList = CE03A0852CE90065006884EE /* Build configuration list for PBXProject "vd_agent" */;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = CE03A0812CE90065006884EE;
minimizedProjectReferenceProxies = 1;
packageReferences = (
CE03A0EB2CE90D55006884EE /* XCRemoteSwiftPackageReference "swift-argument-parser" */,
);
preferredProjectObjectVersion = 77;
productRefGroup = CE03A08B2CE90065006884EE /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
CE03A11A2CEA8429006884EE /* vd_agent */,
CE03A0892CE90065006884EE /* spice-vdagentd */,
CE03A0DC2CE90CE8006884EE /* spice-vdagent */,
);
};
/* End PBXProject section */
/* Begin PBXShellScriptBuildPhase section */
CE03A0F42CE9EDB0006884EE /* Fetch SPICE headers */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Fetch SPICE headers";
outputFileListPaths = (
);
outputPaths = (
"$(PROJECT_DIR)/src/darwin/include/spice",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "set -e\nif [ ! -d \"$SCRIPT_OUTPUT_FILE_0\" ]; then\n URL=\"https://www.spice-space.org/download/releases/spice-protocol-0.14.4.tar.xz\"\n FILE=\"$(basename $URL)\"\n NAME=\"${FILE%.tar.*}\"\n cd /tmp\n curl -L -O \"$URL\"\n tar -xf \"$FILE\"\n mv \"$NAME/spice\" \"$SCRIPT_OUTPUT_FILE_0\"\n rm -rf \"$DIR\" \"$FILE\"\nfi\n";
showEnvVarsInLog = 0;
};
CE03A1222CEA86DC006884EE /* Build universal GLib */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"$(GLIB_X86_64_PREFIX)/lib/libgio-2.0.a",
"$(GLIB_X86_64_PREFIX)/lib/libglib-2.0.a",
"$(GLIB_X86_64_PREFIX)/lib/libgobject-2.0.a",
"$(GLIB_X86_64_PREFIX)/lib/libgmodule-2.0.a",
"$(GLIB_X86_64_PREFIX)/lib/libintl.a",
"$(GLIB_ARM64_PREFIX)/lib/libgio-2.0.a",
"$(GLIB_ARM64_PREFIX)/lib/libglib-2.0.a",
"$(GLIB_ARM64_PREFIX)/lib/libgobject-2.0.a",
"$(GLIB_ARM64_PREFIX)/lib/libgmodule-2.0.a",
"$(GLIB_ARM64_PREFIX)/lib/libintl.a",
);
name = "Build universal GLib";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/lib/libgio-2.0.a",
"$(DERIVED_FILE_DIR)/lib/libglib-2.0.a",
"$(DERIVED_FILE_DIR)/lib/libgobject-2.0.a",
"$(DERIVED_FILE_DIR)/lib/libgmodule-2.0.a",
"$(DERIVED_FILE_DIR)/lib/libintl.a",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "set -e\n\nfor ((i=0; i<$SCRIPT_OUTPUT_FILE_COUNT; i++)); do\n output_var=\"SCRIPT_OUTPUT_FILE_$i\"\n output_path=\"${!output_var}\"\n output_dir=\"$(dirname \"$output_path\")\"\n name=\"$(basename \"$output_path\")\"\n intel_input=\"$GLIB_X86_64_PREFIX/lib/$name\"\n arm64_input=\"$GLIB_ARM64_PREFIX/lib/$name\"\n tmp_output=\"/tmp/$name.$$\"\n \n echo \"Creating $output_path\"\n lipo -output \"$tmp_output\" -create \"$intel_input\" \"$arm64_input\"\n if [ ! -d \"$output_dir\" ]; then\n mkdir -p \"$output_dir\"\n fi\n mv \"$tmp_output\" \"$output_path\"\ndone\n";
showEnvVarsInLog = 0;
};
CE54BD972CEA914E00FE3930 /* Build universal GLib */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"$(GLIB_X86_64_PREFIX)/lib/libgio-2.0.a",
"$(GLIB_X86_64_PREFIX)/lib/libglib-2.0.a",
"$(GLIB_X86_64_PREFIX)/lib/libgobject-2.0.a",
"$(GLIB_X86_64_PREFIX)/lib/libgmodule-2.0.a",
"$(GLIB_X86_64_PREFIX)/lib/libintl.a",
"$(GLIB_ARM64_PREFIX)/lib/libgio-2.0.a",
"$(GLIB_ARM64_PREFIX)/lib/libglib-2.0.a",
"$(GLIB_ARM64_PREFIX)/lib/libgobject-2.0.a",
"$(GLIB_ARM64_PREFIX)/lib/libgmodule-2.0.a",
"$(GLIB_ARM64_PREFIX)/lib/libintl.a",
);
name = "Build universal GLib";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/lib/libgio-2.0.a",
"$(DERIVED_FILE_DIR)/lib/libglib-2.0.a",
"$(DERIVED_FILE_DIR)/lib/libgobject-2.0.a",
"$(DERIVED_FILE_DIR)/lib/libgmodule-2.0.a",
"$(DERIVED_FILE_DIR)/lib/libintl.a",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "set -e\n\nfor ((i=0; i<$SCRIPT_OUTPUT_FILE_COUNT; i++)); do\n output_var=\"SCRIPT_OUTPUT_FILE_$i\"\n output_path=\"${!output_var}\"\n output_dir=\"$(dirname \"$output_path\")\"\n name=\"$(basename \"$output_path\")\"\n intel_input=\"$GLIB_X86_64_PREFIX/lib/$name\"\n arm64_input=\"$GLIB_ARM64_PREFIX/lib/$name\"\n tmp_output=\"/tmp/$name.$$\"\n \n echo \"Creating $output_path\"\n lipo -output \"$tmp_output\" -create \"$intel_input\" \"$arm64_input\"\n if [ ! -d \"$output_dir\" ]; then\n mkdir -p \"$output_dir\"\n fi\n mv \"$tmp_output\" \"$output_path\"\ndone\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
CE03A0862CE90065006884EE /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
CE03A0BC2CE9012D006884EE /* udscs.c in Sources */,
CE03A0C22CE90428006884EE /* virtio-port.c in Sources */,
CE03A0C32CE90428006884EE /* vdagentd.c in Sources */,
CE03A0BD2CE9012D006884EE /* vdagent-connection.c in Sources */,
CE03A0C02CE9039B006884EE /* dummy-session-info.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
CE03A0D92CE90CE8006884EE /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
CE03A0EA2CE90D38006884EE /* udscs.c in Sources */,
CE03A0E72CE90CFC006884EE /* Vdagent.swift in Sources */,
CE03A0E82CE90CFC006884EE /* vdagent.c in Sources */,
CE03A0EE2CE97927006884EE /* vdagent-connection.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
CE03A0F32CE9ED98006884EE /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = CE03A0892CE90065006884EE /* spice-vdagentd */;
targetProxy = CE03A0F22CE9ED98006884EE /* PBXContainerItemProxy */;
};
CE03A11F2CEA8442006884EE /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = CE03A0DC2CE90CE8006884EE /* spice-vdagent */;
targetProxy = CE03A11E2CEA8442006884EE /* PBXContainerItemProxy */;
};
CE03A1212CEA8442006884EE /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = CE03A0892CE90065006884EE /* spice-vdagentd */;
targetProxy = CE03A1202CEA8442006884EE /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
CE03A08F2CE90065006884EE /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu17;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
GLIB_ARM64_PREFIX = /opt/homebrew;
GLIB_X86_64_PREFIX = /usr/local;
HEADER_SEARCH_PATHS = (
"$(PROJECT_DIR)/src/darwin/include",
"$(GLIB_ARM64_PREFIX)/include/glib-2.0",
"$(GLIB_ARM64_PREFIX)/include/gio-unix-2.0",
"$(GLIB_ARM64_PREFIX)/lib/glib-2.0/include",
);
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(DERIVED_FILE_DIR)/lib",
);
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MACOSX_DEPLOYMENT_TARGET = 10.13;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
name = Debug;
};
CE03A0902CE90065006884EE /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu17;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
GLIB_ARM64_PREFIX = /opt/homebrew;
GLIB_X86_64_PREFIX = /usr/local;
HEADER_SEARCH_PATHS = (
"$(PROJECT_DIR)/src/darwin/include",
"$(GLIB_ARM64_PREFIX)/include/glib-2.0",
"$(GLIB_ARM64_PREFIX)/include/gio-unix-2.0",
"$(GLIB_ARM64_PREFIX)/lib/glib-2.0/include",
);
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(DERIVED_FILE_DIR)/lib",
);
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MACOSX_DEPLOYMENT_TARGET = 10.13;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
};
name = Release;
};
CE03A0922CE90065006884EE /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
CE03A0932CE90065006884EE /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
CE03A0E22CE90CE8006884EE /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/$(DERIVED_FILE_DIR)/lib",
);
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
SWIFT_OBJC_BRIDGING_HEADER = src/darwin/vdagent.h;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
CE03A0E32CE90CE8006884EE /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/$(DERIVED_FILE_DIR)/lib",
);
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OBJC_BRIDGING_HEADER = src/darwin/vdagent.h;
SWIFT_VERSION = 5.0;
};
name = Release;
};
CE03A11C2CEA8429006884EE /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
CE03A11D2CEA8429006884EE /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
CE03A0852CE90065006884EE /* Build configuration list for PBXProject "vd_agent" */ = {
isa = XCConfigurationList;
buildConfigurations = (
CE03A08F2CE90065006884EE /* Debug */,
CE03A0902CE90065006884EE /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
CE03A0912CE90065006884EE /* Build configuration list for PBXNativeTarget "spice-vdagentd" */ = {
isa = XCConfigurationList;
buildConfigurations = (
CE03A0922CE90065006884EE /* Debug */,
CE03A0932CE90065006884EE /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
CE03A0E12CE90CE8006884EE /* Build configuration list for PBXNativeTarget "spice-vdagent" */ = {
isa = XCConfigurationList;
buildConfigurations = (
CE03A0E22CE90CE8006884EE /* Debug */,
CE03A0E32CE90CE8006884EE /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
CE03A11B2CEA8429006884EE /* Build configuration list for PBXAggregateTarget "vd_agent" */ = {
isa = XCConfigurationList;
buildConfigurations = (
CE03A11C2CEA8429006884EE /* Debug */,
CE03A11D2CEA8429006884EE /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
/* Begin XCRemoteSwiftPackageReference section */
CE03A0EB2CE90D55006884EE /* XCRemoteSwiftPackageReference "swift-argument-parser" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/apple/swift-argument-parser.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 1.5.0;
};
};
/* End XCRemoteSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
CE03A0EC2CE90D55006884EE /* ArgumentParser */ = {
isa = XCSwiftPackageProductDependency;
package = CE03A0EB2CE90D55006884EE /* XCRemoteSwiftPackageReference "swift-argument-parser" */;
productName = ArgumentParser;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = CE03A0822CE90065006884EE /* Project object */;
}
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>
@@ -0,0 +1,15 @@
{
"originHash" : "59ba1edda695b389d6c9ac1809891cd779e4024f505b0ce1a9d5202b6762e38a",
"pins" : [
{
"identity" : "swift-argument-parser",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-argument-parser.git",
"state" : {
"revision" : "41982a3656a71c768319979febd796c6fd111d5c",
"version" : "1.5.0"
}
}
],
"version" : 3
}
@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1600"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CE03A0DC2CE90CE8006884EE"
BuildableName = "spice-vdagent"
BlueprintName = "spice-vdagent"
ReferencedContainer = "container:vd_agent.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
viewDebuggingEnabled = "No">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CE03A0DC2CE90CE8006884EE"
BuildableName = "spice-vdagent"
BlueprintName = "spice-vdagent"
ReferencedContainer = "container:vd_agent.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<CommandLineArguments>
<CommandLineArgument
argument = "-d"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "-x"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "-S /var/run/spice-vdagent-sock"
isEnabled = "YES">
</CommandLineArgument>
</CommandLineArguments>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CE03A0DC2CE90CE8006884EE"
BuildableName = "spice-vdagent"
BlueprintName = "spice-vdagent"
ReferencedContainer = "container:vd_agent.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1600"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CE03A0892CE90065006884EE"
BuildableName = "spice-vdagentd"
BlueprintName = "spice-vdagentd"
ReferencedContainer = "container:vd_agent.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
debugAsWhichUser = "root"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
viewDebuggingEnabled = "No">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CE03A0892CE90065006884EE"
BuildableName = "spice-vdagentd"
BlueprintName = "spice-vdagentd"
ReferencedContainer = "container:vd_agent.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<CommandLineArguments>
<CommandLineArgument
argument = "-d"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "-s /dev/tty.com.redhat.spice.0"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "-S /var/run/spice-vdagent-sock"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "-x"
isEnabled = "YES">
</CommandLineArgument>
</CommandLineArguments>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CE03A0892CE90065006884EE"
BuildableName = "spice-vdagentd"
BlueprintName = "spice-vdagentd"
ReferencedContainer = "container:vd_agent.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>