proxy-audio-device: install audio driver

Fixes https://github.com/briankendall/proxy-audio-device/issues/13

This change does a few things to fix the installation of
proxy-audio-device, based on the README for installation:

https://github.com/briankendall/proxy-audio-device#manual-installation

- Install the audio driver to `/Libary/Audio/Plug-Ins/HAL`
- Kickstart `coreaudiod` on install and uninstall for the device to be
  available
- zap saved application state for the settings app
This commit is contained in:
Ian Chamberlain
2023-12-16 13:31:47 -05:00
parent 1db0a91794
commit 1bfafeae41
+28 -1
View File
@@ -8,6 +8,33 @@ cask "proxy-audio-device" do
homepage "https://github.com/briankendall/proxy-audio-device"
app "Proxy Audio Device Settings.app"
artifact "ProxyAudioDevice.driver", target: "/Library/Audio/Plug-Ins/HAL/ProxyAudioDevice.driver"
# No zap stanza required
postflight do
set_ownership "/Library/Audio/Plug-Ins/HAL/ProxyAudioDevice.driver",
user: "root",
group: "wheel"
system_command "/bin/launchctl",
args: [
"kickstart",
"-k",
"system/com.apple.audio.coreaudiod",
],
sudo: true,
must_succeed: true
end
uninstall_postflight do
system_command "/bin/launchctl",
args: [
"kickstart",
"-k",
"system/com.apple.audio.coreaudiod",
],
sudo: true,
must_succeed: true
end
zap trash: "~/Library/Saved Application State/net.briankendall.Proxy-Audio-Device-Settings.savedState"
end