├── README.md ├── libfunctionality.rb ├── osvr-core.rb ├── osvr-tracker-viewer.rb └── steamvr-osvr.rb /README.md: -------------------------------------------------------------------------------- 1 | # homebrew-osvr 2 | This is a HEAD-only tap for [OSVR](http://www.osvr.org) (Open Source Virtual Reality). It is very much in development, and breakage should be expected! 3 | 4 | To install, simply run: 5 | ``` 6 | brew tap OSVR/osvr 7 | 8 | brew install osvr-core --HEAD 9 | ``` 10 | 11 | To install the SteamVR-OSVR plugin, run: 12 | ``` 13 | brew install steamvr-osvr --HEAD 14 | ``` 15 | Be sure to follow the post-install instructions so that SteamVR can find the plugin. 16 | 17 | In order for these packages to work with games such as Team Fortress 2, SteamVR-OSVR, OSVR-Core, and the dependencies need to be build as universal binaries (which can be done with the --universal flag for Homebrew). Unfortunately, due to a [bug in CMake](https://cmake.org/Bug/view.php?id=15835) this will currently fail. 18 | -------------------------------------------------------------------------------- /libfunctionality.rb: -------------------------------------------------------------------------------- 1 | class Libfunctionality < Formula 2 | desc "Minimal library for dynamically-loaded or statically-linked functionality modules." 3 | homepage "https://github.com/OSVR/libfunctionality" 4 | head "https://github.com/OSVR/libfunctionality.git" 5 | 6 | depends_on "cmake" => :build 7 | 8 | option :universal 9 | 10 | def install 11 | args = std_cmake_args 12 | if build.universal? 13 | ENV.universal_binary 14 | args << "-DCMAKE_OSX_ARCHITECTURES=#{Hardware::CPU.universal_archs.as_cmake_arch_flags}" 15 | end 16 | 17 | mkdir "build" do 18 | system "cmake", "..", *args 19 | system "make", "install" 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /osvr-core.rb: -------------------------------------------------------------------------------- 1 | class OsvrCore < Formula 2 | desc "OSVR Core Libraries" 3 | homepage "http://www.osvr.org" 4 | head "https://github.com/OSVR/OSVR-Core.git" 5 | 6 | depends_on "cmake" => :build 7 | depends_on "opencv" 8 | depends_on "libfunctionality" 9 | depends_on "boost" 10 | depends_on "jsoncpp" 11 | depends_on "python@2" => :build 12 | depends_on "libusb" 13 | 14 | option :universal 15 | 16 | def install 17 | args = std_cmake_args 18 | if build.universal? 19 | ENV.universal_binary 20 | args << "-DCMAKE_OSX_ARCHITECTURES=#{Hardware::CPU.universal_archs.as_cmake_arch_flags}" 21 | end 22 | 23 | mkdir "build" do 24 | system "cmake", "..", *args 25 | system "make", "install" 26 | end 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /osvr-tracker-viewer.rb: -------------------------------------------------------------------------------- 1 | class OsvrTrackerViewer < Formula 2 | homepage "https://github.com/OSVR/OSVR-Tracker-Viewer" 3 | head "https://github.com/OSVR/OSVR-Tracker-Viewer.git" 4 | 5 | depends_on "cmake" => :build 6 | depends_on "osvr-core" 7 | depends_on "open-scene-graph" 8 | 9 | def install 10 | mkdir "build" do 11 | system "cmake", "..", *std_cmake_args 12 | system "make", "install" 13 | end 14 | end 15 | 16 | end 17 | -------------------------------------------------------------------------------- /steamvr-osvr.rb: -------------------------------------------------------------------------------- 1 | class SteamvrOsvr < Formula 2 | desc "SteamVR-OSVR" 3 | homepage "https://github.com/OSVR/SteamVR-OSVR" 4 | head "https://github.com/OSVR/SteamVR-OSVR.git" 5 | 6 | depends_on "osvr-core" 7 | 8 | depends_on "cmake" => :build 9 | 10 | option :universal 11 | 12 | def install 13 | args = std_cmake_args 14 | if build.universal? 15 | ENV.universal_binary 16 | args << "-DCMAKE_OSX_ARCHITECTURES=#{Hardware::CPU.universal_archs.as_cmake_arch_flags}" 17 | end 18 | mkdir "build" do 19 | system "cmake", "..", *args 20 | system "make", "install" 21 | end 22 | end 23 | 24 | def caveats 25 | if self.installed? && File.exist?("#{opt_prefix}/lib/openvr/osvr/bin/osx32/driver_osvr.dylib") 26 | return <<-EOS.undent 27 | driver_osvr.dylib was installed to: 28 | #{opt_prefix}/lib/openvr/osvr/bin/osx32/driver_osvr.dylib 29 | 30 | You will want to symlink this driver to the SteamVR drivers location: 31 | mkdir -p "$HOME/Library/Application Support/Steam/steamapps/common/SteamVR/drivers/osvr/bin/osx32" 32 | ln -s "#{opt_prefix}/lib/openvr/osvr/bin/osx32/driver_osvr.dylib" "$HOME/Library/Application Support/Steam/SteamApps/common/SteamVR/drivers/osvr/bin/osx32" 33 | You may additionally want to modify steamvr.vrsettings to force-enable the osvr driver. 34 | EOS 35 | end 36 | nil 37 | end 38 | end 39 | --------------------------------------------------------------------------------