Changeset 28292 in vbox for trunk/src/VBox
- Timestamp:
- Apr 14, 2010 10:54:32 AM (15 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/common/vboxapisetup.py
r20389 r28292 17 17 from distutils.core import setup 18 18 19 def patchWith(file,install ):19 def patchWith(file,install,sdk): 20 20 newFile=file+".new" 21 install=install.replace("\\", "\\\\") 22 try: 21 install=install.replace("\\", "\\\\") 22 try: 23 23 os.remove(newFile) 24 24 except: … … 28 28 for line in oldF: 29 29 line=line.replace("%VBOX_INSTALL_PATH%",install) 30 line=line.replace("%VBOX_SDK_PATH%",sdk) 30 31 newF.write(line) 31 32 newF.close() 32 33 oldF.close() 33 try: 34 try: 34 35 os.remove(file) 35 36 except: … … 46 47 # Should we use VBox version for binding module versioning? 47 48 vboxVersion = "1.0" 48 #raise Exception("No VBOX_VERSION defined, exiting") 49 patchWith(os.path.join(os.path.dirname(sys.argv[0]), 'vboxapi', '__init__.py'), vboxDest) 49 import platform 50 if platform.system() == 'Darwin': 51 vboxSdkDest = os.path.join(vboxDest, "..", "..", "..", "sdk") 52 else: 53 vboxSdkDest = os.path.join(vboxDest, "sdk") 54 patchWith(os.path.join(os.path.dirname(sys.argv[0]), 'vboxapi', '__init__.py'), vboxDest, vboxSdkDest) 50 55 setup(name='vboxapi', 51 56 version=vboxVersion, 52 57 description='Python interface to VirtualBox', 53 author=' Sun Microsystems',58 author='Oracle Corp.', 54 59 author_email='[email protected]', 55 60 url='http://www.virtualbox.org', -
trunk/src/VBox/Main/glue/vboxapi.py
r23552 r28292 17 17 import traceback 18 18 19 # To set Python bitness on OSX use 'export VERSIONER_PYTHON_PREFER_32_BIT=yes' 20 19 21 VboxBinDir = os.environ.get("VBOX_PROGRAM_PATH", None) 20 22 VboxSdkDir = os.environ.get("VBOX_SDK_PATH", None) … … 25 27 26 28 if VboxSdkDir is None: 27 VboxSdkDir = os.path.join(VboxBinDir,"sdk") 29 # Will be set by the installer 30 VboxSdkDir = "%VBOX_SDK_PATH%" 28 31 29 32 os.environ["VBOX_PROGRAM_PATH"] = VboxBinDir
Note:
See TracChangeset
for help on using the changeset viewer.