mirror of
https://github.com/DrBeef/QuakeQuest.git
synced 2024-12-22 18:41:32 +00:00
30 lines
848 B
Python
30 lines
848 B
Python
|
#!/usr/bin/python
|
||
|
|
||
|
# This first bit of code is common bootstrapping code
|
||
|
# to determine the SDK root, and to set up the import
|
||
|
# path for additional python code.
|
||
|
|
||
|
#begin bootstrap
|
||
|
import os
|
||
|
import sys
|
||
|
|
||
|
def init():
|
||
|
root = os.path.realpath( os.path.dirname(os.path.realpath(__file__) ) )
|
||
|
os.chdir(root) # make sure we are always executing from the project directory
|
||
|
while( os.path.isdir( os.path.join(root, 'bin/scripts/build') ) == False ):
|
||
|
root = os.path.realpath( os.path.join(root, '..') )
|
||
|
if( len(root) <= 5 ): # Should catch both Posix and Windows root directories (e.g. '/' and 'C:\')
|
||
|
print('Unable to find SDK root. Exiting.')
|
||
|
sys.exit(1)
|
||
|
root = os.path.abspath(root)
|
||
|
os.environ['OCULUS_SDK_PATH'] = root
|
||
|
sys.path.append( root + "/bin/scripts/build" )
|
||
|
|
||
|
init()
|
||
|
import ovrbuild
|
||
|
ovrbuild.init()
|
||
|
#end bootstrap
|
||
|
|
||
|
|
||
|
ovrbuild.build()
|