| OLD | NEW |
| (Empty) |
| 1 # Copyright 2009, Google Inc. | |
| 2 # All rights reserved. | |
| 3 # | |
| 4 # Redistribution and use in source and binary forms, with or without | |
| 5 # modification, are permitted provided that the following conditions are | |
| 6 # met: | |
| 7 # | |
| 8 # * Redistributions of source code must retain the above copyright | |
| 9 # notice, this list of conditions and the following disclaimer. | |
| 10 # * Redistributions in binary form must reproduce the above | |
| 11 # copyright notice, this list of conditions and the following disclaimer | |
| 12 # in the documentation and/or other materials provided with the | |
| 13 # distribution. | |
| 14 # * Neither the name of Google Inc. nor the names of its | |
| 15 # contributors may be used to endorse or promote products derived from | |
| 16 # this software without specific prior written permission. | |
| 17 # | |
| 18 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
| 19 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 20 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
| 21 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
| 22 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
| 23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
| 24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
| 25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
| 26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
| 27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
| 28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 29 | |
| 30 | |
| 31 import os | |
| 32 import sys | |
| 33 | |
| 34 Import('env') | |
| 35 env.Replace( | |
| 36 GOOGLECLIENT = '$SCONSTRUCT_DIR', | |
| 37 THIRD_PARTY = '$GOOGLECLIENT/third_party', | |
| 38 | |
| 39 # A whole bunch of third-party and internal dependencies | |
| 40 ANTLRLIBC_DIR = '$THIRD_PARTY/antlr3/runtime/C', | |
| 41 ANTLR_DIR = '$THIRD_PARTY/antlr3/lib', | |
| 42 BREAKPAD_DIR = '$THIRD_PARTY/breakpad', | |
| 43 CG_BASE_DIR = '$THIRD_PARTY/cg/files', | |
| 44 # TODO: pull from Chrome's SVN with gclient ? | |
| 45 CHROME_SRC_DIR = '$THIRD_PARTY/chrome/files', | |
| 46 COLLADA_DIR = '$THIRD_PARTY/fcollada/files', | |
| 47 DOXYGEN_DIR = '$THIRD_PARTY/doxygen', | |
| 48 GFLAGS_DIR = '$THIRD_PARTY/gflags', | |
| 49 GLEW_DIR = '$THIRD_PARTY/glew/files', | |
| 50 GMOCK_DIR = '$THIRD_PARTY/gmock/files', | |
| 51 GTEST_DIR = '$THIRD_PARTY/gtest/files', | |
| 52 # TODO: pull from Chrome's SVN with gclient ? | |
| 53 ICU38_DIR = '$THIRD_PARTY/icu38/files', | |
| 54 INTERNAL_DIR = '$SCONSTRUCT_DIR/../o3d-internal', | |
| 55 JPEG_DIR = '$THIRD_PARTY/jpeg/src', | |
| 56 JSDOCTOOLKIT_DIR = '$THIRD_PARTY/jsdoctoolkit/files', | |
| 57 MAC_BREAKPAD_PREBUILT_DIR = '$INTERNAL_DIR/GoogleBreakpad', | |
| 58 LIBEVENT_DIR = '$THIRD_PARTY/libevent', | |
| 59 # To run selenium tests you will need a tgz'ed copy of firefox. | |
| 60 # Specify the path to it below. | |
| 61 # See tests/build.scons | |
| 62 MAC_HERMETIC_FIREFOX_DIR = ( | |
| 63 '$INTERNAL_DIR/third_party/firefox'), | |
| 64 # If we have directx redistributables present, | |
| 65 # then build o3dextras. | |
| 66 DIRECTX_REDIST_DIR=( | |
| 67 '$INTERNAL_DIR/third_party/dx_nov_2007_redist'), | |
| 68 # NACL has to be in this weird directory because it looks for | |
| 69 # googleclient two levels above it. | |
| 70 NACL_DIR = '$THIRD_PARTY/native_client/googleclient/native_client', | |
| 71 NIXYSA_DIR = '$THIRD_PARTY/nixysa', | |
| 72 NPAPI_DIR = '$THIRD_PARTY/npapi', | |
| 73 PDIFF_DIR = '$THIRD_PARTY/pdiff/files', | |
| 74 PLY_DIR = '$THIRD_PARTY/ply', | |
| 75 PNG_DIR = '$THIRD_PARTY/png/src', | |
| 76 SCONS_DIR = '$THIRD_PARTY/scons', | |
| 77 SELENIUM_JAVA_DIR = '$THIRD_PARTY/selenium_rc/files/selenium-server', | |
| 78 SELENIUM_PYTHON_DIR = ( | |
| 79 '$THIRD_PARTY/selenium_rc/files/selenium-python-client-driver'), | |
| 80 # TODO: pull from SVN with gclient ? | |
| 81 SKIA_DIR = '$THIRD_PARTY/skia', | |
| 82 SWIFTSHADER_DIR = '$INTERNAL_DIR/third_party/swiftshader/files', | |
| 83 # TODO: pull from SVN with gclient ? | |
| 84 V8_SRC_DIR = '$THIRD_PARTY/v8', | |
| 85 WIX_DIR = '$THIRD_PARTY/wix_2_0_4221/files', | |
| 86 ZIP_UTILS_DIR = '$THIRD_PARTY/zip_utils/files', | |
| 87 ZLIB_DIR = '$THIRD_PARTY/zlib/files', | |
| 88 # Big stuff that we don't want to be part of the chrome tree. | |
| 89 SAMPLE_ASSETS = '$GOOGLECLIENT/o3d_assets/samples', | |
| 90 TEST_REFERENCE_IMAGES = '$GOOGLECLIENT/o3d_assets/tests/screenshots', | |
| 91 ) | |
| 92 if env.Bit('host_windows'): | |
| 93 import _winreg | |
| 94 try: | |
| 95 dxsdk_dir = os.environ['DXSDK_DIR'] | |
| 96 except KeyError: | |
| 97 print 'The DirectX SDK needs to be installed, and the DXSDK_DIR environment' | |
| 98 print 'variable must point to the installation directory.' | |
| 99 sys.exit(1) | |
| 100 try: | |
| 101 winsdk_key = _winreg.OpenKey( | |
| 102 _winreg.HKEY_LOCAL_MACHINE, | |
| 103 'SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v6.0\\WinSDKBuild') | |
| 104 except WindowsError: | |
| 105 try: | |
| 106 winsdk_key = _winreg.OpenKey( | |
| 107 _winreg.HKEY_LOCAL_MACHINE, | |
| 108 'SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v6.0A\\VistaClientHeade
rsLibs') | |
| 109 except WindowsError: | |
| 110 try: | |
| 111 winsdk_key = _winreg.OpenKey( | |
| 112 _winreg.HKEY_LOCAL_MACHINE, | |
| 113 'SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v6.1\\WinSDKBuild') | |
| 114 except WindowsError: | |
| 115 print 'The Windows SDK version 6.0 or later needs to be installed' | |
| 116 sys.exit(1) | |
| 117 try: | |
| 118 winsdk_dir, value_type = _winreg.QueryValueEx(winsdk_key, | |
| 119 'InstallationFolder') | |
| 120 except WindowsError: | |
| 121 print 'The Windows SDK version 6.0 or later needs to be installed' | |
| 122 sys.exit(1) | |
| 123 _winreg.CloseKey(winsdk_key) | |
| 124 # Strip off trailing slashes | |
| 125 winsdk_dir = winsdk_dir.rstrip('\\/') | |
| 126 dxsdk_dir = dxsdk_dir.rstrip('\\/') | |
| 127 env.Replace(JAVA_EXE = '%SystemRoot%\\system32\\java.exe', | |
| 128 PLATFORM_SDK_VISTA_6_0_DIR = winsdk_dir, | |
| 129 DIRECTX9_18_944_0_PARTIAL_DIR = dxsdk_dir, | |
| 130 DOXYGEN = '$DOXYGEN_DIR/win/doxygen.exe') | |
| 131 try: | |
| 132 env['ENV']['PATH'] = "%s%s%s" % (env['ENV']['PATH'], os.pathsep, | |
| 133 os.path.join(winsdk_dir, 'Bin')) | |
| 134 except KeyError: | |
| 135 env['ENV']['PATH'] = os.path.join(winsdk_dir, 'Bin') | |
| 136 else: | |
| 137 env.Replace(JAVA_EXE = 'java') | |
| 138 if env.Bit('host_linux'): | |
| 139 env.Replace(DOXYGEN = '$DOXYGEN_DIR/linux/doxygen') | |
| 140 else: | |
| 141 env.Replace(DOXYGEN = '$DOXYGEN_DIR/osx/doxygen') | |
| OLD | NEW |