-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathsteamvr-osvr.rb
38 lines (32 loc) · 1.23 KB
/
steamvr-osvr.rb
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
class SteamvrOsvr < Formula
desc "SteamVR-OSVR"
homepage "https://github.com/OSVR/SteamVR-OSVR"
head "https://github.com/OSVR/SteamVR-OSVR.git"
depends_on "osvr-core"
depends_on "cmake" => :build
option :universal
def install
args = std_cmake_args
if build.universal?
ENV.universal_binary
args << "-DCMAKE_OSX_ARCHITECTURES=#{Hardware::CPU.universal_archs.as_cmake_arch_flags}"
end
mkdir "build" do
system "cmake", "..", *args
system "make", "install"
end
end
def caveats
if self.installed? && File.exist?("#{opt_prefix}/lib/openvr/osvr/bin/osx32/driver_osvr.dylib")
return <<-EOS.undent
driver_osvr.dylib was installed to:
#{opt_prefix}/lib/openvr/osvr/bin/osx32/driver_osvr.dylib
You will want to symlink this driver to the SteamVR drivers location:
mkdir -p "$HOME/Library/Application Support/Steam/steamapps/common/SteamVR/drivers/osvr/bin/osx32"
ln -s "#{opt_prefix}/lib/openvr/osvr/bin/osx32/driver_osvr.dylib" "$HOME/Library/Application Support/Steam/SteamApps/common/SteamVR/drivers/osvr/bin/osx32"
You may additionally want to modify steamvr.vrsettings to force-enable the osvr driver.
EOS
end
nil
end
end