diff options
author | Brad Davis <[email protected]> | 2013-10-13 20:28:58 -0700 |
---|---|---|
committer | Brad Davis <[email protected]> | 2013-10-13 20:28:58 -0700 |
commit | 672cdd0ef5455cd62a0d7f7eb6b9889f3ea35f21 (patch) | |
tree | f3454dc864242744aef1ea5474b5011556d0f388 /LibOVR/Projects/Linux | |
parent | 1408ed7b208c7a1cff1a2448fc890e9b8bd6dc4e (diff) |
Updating to cmake, glew, xrandr
Diffstat (limited to 'LibOVR/Projects/Linux')
-rw-r--r-- | LibOVR/Projects/Linux/90-oculus.rules | 2 | ||||
-rwxr-xr-x | LibOVR/Projects/Linux/ConfigurePermissionsAndPackages.sh | 55 | ||||
-rw-r--r-- | LibOVR/Projects/Linux/Makefile | 85 |
3 files changed, 57 insertions, 85 deletions
diff --git a/LibOVR/Projects/Linux/90-oculus.rules b/LibOVR/Projects/Linux/90-oculus.rules new file mode 100644 index 0000000..56bccdb --- /dev/null +++ b/LibOVR/Projects/Linux/90-oculus.rules @@ -0,0 +1,2 @@ +# Oculus HID Sensor naming and permissioning +KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2833", MODE="0666" diff --git a/LibOVR/Projects/Linux/ConfigurePermissionsAndPackages.sh b/LibOVR/Projects/Linux/ConfigurePermissionsAndPackages.sh new file mode 100755 index 0000000..23456c3 --- /dev/null +++ b/LibOVR/Projects/Linux/ConfigurePermissionsAndPackages.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +############################################################################# +# +# Filename : ConfigurePermissionsAndPackages.sh +# Content : Linux file for installing prerequisite libraries and the +# permissions file for the USB HID device +# Created : 2013 +# Authors : Simon Hallam and Brant Lewis +# Copyright : Copyright 2013 OculusVR, Inc. All Rights Reserved +# Instruction : Ensure that the install.sh has execute permissions. +# Navigate to a command shell, enter: +# +# sudo ./install.sh +# +# Enter the administrator password for access. +# +# Notes : UBUNTU 13 USERS +# --------------- +# The OculusConfigUtil does not currently support Ubuntu 13 +# out of the box. If you see an error similar to this upon +# launching OculusConfigUtil: +# +# "error while loading shared libraries: libudev.so.0" +# +# Then please try the following solution, until we officially +# support Ubuntu 13: +# +# cd /lib/x86_64-linux-gnu/ +# sudo ln -sf libudev.so.1 libudev.so.0 +# +############################################################################# + +if [ "$(id -u)" != "0" ]; then + echo "This script must be run as root" 1>&2 + exit 1 +fi + +echo "Installing OculusVR Rift udev rules file..." +DIR=$(dirname "$0") +cp "$DIR"/90-oculus.rules /lib/udev/rules.d +echo "Installing tinyxml2..." +apt-get install libtinyxml2-dev +echo "Installing libudev..." +apt-get install libudev-dev +echo "Installing libxext..." +apt-get install libxext-dev +echo "Installing mesa-common..." +apt-get install mesa-common-dev +echo "Installing freeglut3..." +apt-get install freeglut3-dev +echo "Installing Xrandr..." +apt-get install libxrandr-dev +echo "Installation complete" + diff --git a/LibOVR/Projects/Linux/Makefile b/LibOVR/Projects/Linux/Makefile deleted file mode 100644 index 008a158..0000000 --- a/LibOVR/Projects/Linux/Makefile +++ /dev/null @@ -1,85 +0,0 @@ -############################################################################# -# -# Filename : Makefile -# Content : Makefile for building linux version of: libovr -# Created : 2013 -# Authors : Simon Hallam and Peter Giokaris -# Copyright : Copyright 2013 OculusVR, Inc. All Rights Reserved -# Instruction : The g++ compiler and stdndard lib packages need to be -# installed on the system. Navigate in a shell to the -# directory where this Makefile is located and enter: -# -# make builds the release version for the -# current architechture -# make clean delete intermediate release object files -# and the library file -# make DEBUG=1 builds the debug version for the current -# architechture -# make clean DEBUG=1 deletes intermediate debug object files -# and the library file -# -# Output : Relative to the directory this Makefile lives in, libraries -# are built at the following locations depending upon the -# architechture of the system you are running: -# -# ./Lib/Linux/Debug/i386/libovr.a -# ./Lib/Linux/Debug/x86_64/libovr.a -# ./Lib/Linux/Release/i386/libovr.a -# ./Lib/Linux/Release/x86_64/libovr.a -# -############################################################################# - -##### Build flags - -DEBUG = 0 -OVR_ROOT = ../../.. - -include $(OVR_ROOT)/LibOVR/Projects/Linux/Makefile.common - -LINK = $(LINK_ARCHIVE) -INCPATH = $(LIBOVRINCPATH) -SRCPATH = $(LIBOVRPATH)/Src -OBJPATH = $(LIBOVRPATH)/Obj/Linux/$(CUSTOM_PATH) -TARGETPATH = $(LIBOVRPATH)/Lib/Linux/$(CUSTOM_PATH) - -CXXBUILD = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $(OBJPATH)/ - -####### Files - -TARGET = $(TARGETPATH)/libovr.a - -# Filter out Windows and OSX files -CPP_SRCS = $(filter-out \ - $(SRCPATH)/OVR_Win32%.cpp \ - ${SRCPATH}/OVR_OSX%.cpp \ - ${SRCPATH}/OVR_Posix%.cpp \ - ${SRCPATH}/Kernel/OVR_ThreadsWinAPI.cpp \ - , $(shell find ${SRCPATH} -name *.cpp)) \ - - -OBJECTS = $(patsubst ${SRCPATH}/%.cpp, ${OBJPATH}/%.o, ${CPP_SRCS}) $(OBJPATH)/tinyxml2.o - -DIRS = $(subst /,/,$(sort $(dir $(OBJECTS)))) $(TARGETPATH) - -####### Rules - -all: $(TARGET) - -$(TARGET): $(TARGET_PATH) $(OBJECTS) $(LIBOVRTARGET_PATH) - $(MD) -p $(DIRS) - $(LINK) $(TARGET) $(OBJECTS) - -$(OBJPATH): - $(MD) -p $(DIRS) - -$(OBJPATH)/%.o: $(SRCPATH)/%.cpp - $(MD) -p $(DIRS) - $(CXXBUILD) -o "$@" "$<" - -$(OBJPATH)/tinyxml2.o: $(3RDPARTYPATH)/TinyXml/tinyxml2.cpp - $(CXXBUILD) -o "$@" "$<" - -clean: - -$(DELETEFILE) $(OBJECTS) - -$(DELETEFILE) $(TARGET) - |