forked from Wouter1/EMU-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kextInstall
executable file
·46 lines (36 loc) · 1.32 KB
/
kextInstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/tcsh
#
# install script for EMU Audio kernel extension
# the EMUUSBAudio.kext file should be in same dir as this script.
# W.Pasman 8oct2014
# we also run kextutil to write all symbols to ~/symbols, for panic debugging .
#
echo "Installing EMU driver"
set pathname=`dirname "$0"`
cd "$pathname"
echo "plz to turn off your EMU USB device for loading of kext, you have 3 seconds to do so"
sleep 3
sudo kextunload /System/Library/Extensions/EMUUSBAudio.kext
echo "deleting old kext"
sudo rm -r /System/Library/Extensions/EMUUSBAudio.kext
echo "installing new kernel extension"
sudo cp -r EMUUSBAudio.kext /System/Library/Extensions
echo "deleting old midi plugin"
sudo rm -rf /Library/Audio/MIDI\ Drivers/EMUMIDIDriver.plugin
echo "installing new midi plugin"
sudo mkdir -p /Library/Audio/MIDI\ Drivers/
sudo cp -R EMUMIDIDriver\ orig.plugin /Library/Audio/MIDI\ Drivers/EMUMIDIDriver.plugin
echo "doing permissions stuff"
cd /Library/Audio/MIDI\ Drivers/
sudo chgrp -R wheel EMUMIDIDriver.plugin
cd /System/Library/Extensions
sudo chgrp -R wheel EMUUSBAudio.kext
echo "loading new kext"
sudo kextload -v EMUUSBAudio.kext
# enable following for debugging.
# kextutil -s ~/symbols/ -A EMUUSBAudio.kext/
echo "so long"
# manual start:
# chmod -R 755 EMUUSBAudio.kext/
# sudo chgrp -R wheel EMUUSBAudio.kext
#sudo kextload -v EMUUSBAudio.kext/