Skip to content

armgit / Piik

Public Imported from GitHub
0

Free, open-source screen sharing for private live streams with friends. Watch together in a browser or self-host Piik. 免费开源的私密屏幕共享,支持游戏直播、一起看电影与自部署。

796 B
Raw Blame
#!/bin/sh
set -eu

if [ "$#" -ne 1 ]; then
  echo "usage: build.sh <output-directory>" >&2
  exit 2
fi

output=$1
architecture=$(uname -m)
case "$architecture" in
  arm64|x86_64) ;;
  *) echo "unsupported macOS capture architecture: $architecture" >&2; exit 2 ;;
esac
mkdir -p "$output"
xcrun swiftc \
  -O \
  -parse-as-library \
  -swift-version 5 \
  -target "$architecture-apple-macos13.0" \
  -framework AVFoundation \
  -framework AppKit \
  -framework AudioToolbox \
  -framework CoreAudio \
  -framework CoreMedia \
  -framework CoreImage \
  -framework CoreVideo \
  -framework ScreenCaptureKit \
  -framework VideoToolbox \
  -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __info_plist -Xlinker "$(dirname "$0")/Info.plist" \
  "$(dirname "$0")/main.swift" \
  -o "$output/piik-capture"