This adds in the GYP files needed for our GYP build,
and modifies the DEPS file extensively to match. Review URL: http://codereview.chromium.org/131116 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19091 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
o3d
135
o3d/DEPS_gyp
Normal file
135
o3d/DEPS_gyp
Normal file
@ -0,0 +1,135 @@
|
||||
vars = {
|
||||
"chromium_trunk":
|
||||
"http://src.chromium.org/svn/trunk",
|
||||
"nixysa_rev": "22",
|
||||
"chromium_rev": "19057",
|
||||
"o3d_code_rev": "77",
|
||||
}
|
||||
|
||||
deps = {
|
||||
"o3d/o3d_assets":
|
||||
"http://o3d.googlecode.com/svn/trunk/googleclient/o3d_assets@" + Var("o3d_code_rev"),
|
||||
|
||||
"third_party/antlr3":
|
||||
"http://o3d.googlecode.com/svn/trunk/googleclient/third_party/antlr3@" + Var("o3d_code_rev"),
|
||||
|
||||
"third_party/cg":
|
||||
"http://o3d.googlecode.com/svn/trunk/googleclient/third_party/cg@" + Var("o3d_code_rev"),
|
||||
|
||||
"third_party/doxygen":
|
||||
"http://o3d.googlecode.com/svn/trunk/googleclient/third_party/doxygen@" + Var("o3d_code_rev"),
|
||||
|
||||
"third_party/fcollada":
|
||||
"http://o3d.googlecode.com/svn/trunk/googleclient/third_party/fcollada@" + Var("o3d_code_rev"),
|
||||
|
||||
"third_party/glew":
|
||||
"http://o3d.googlecode.com/svn/trunk/googleclient/third_party/glew@" + Var("o3d_code_rev"),
|
||||
|
||||
"third_party/java":
|
||||
"http://o3d.googlecode.com/svn/trunk/googleclient/third_party/java@" + Var("o3d_code_rev"),
|
||||
|
||||
"third_party/pdiff":
|
||||
"http://o3d.googlecode.com/svn/trunk/googleclient/third_party/pdiff@" + Var("o3d_code_rev"),
|
||||
|
||||
"third_party/py":
|
||||
"http://o3d.googlecode.com/svn/trunk/googleclient/third_party/py@" + Var("o3d_code_rev"),
|
||||
|
||||
"third_party/scons":
|
||||
"http://o3d.googlecode.com/svn/trunk/googleclient/third_party/scons@" + Var("o3d_code_rev"),
|
||||
|
||||
"third_party/vectormath":
|
||||
"http://o3d.googlecode.com/svn/trunk/googleclient/third_party/vectormath@" + Var("o3d_code_rev"),
|
||||
|
||||
"third_party/wix_2_0_4221":
|
||||
"http://o3d.googlecode.com/svn/trunk/googleclient/third_party/wix_2_0_4221@" + Var("o3d_code_rev"),
|
||||
|
||||
"third_party/zip_utils":
|
||||
"http://o3d.googlecode.com/svn/trunk/googleclient/third_party/zip_utils@" + Var("o3d_code_rev"),
|
||||
|
||||
# Stuff from the Chromium tree.
|
||||
|
||||
"third_party/skia":
|
||||
"http://skia.googlecode.com/svn/trunk@233",
|
||||
|
||||
"third_party/boost":
|
||||
Var("chromium_trunk") + "/src/third_party/boost@" + Var("chromium_rev"),
|
||||
|
||||
"third_party/icu38":
|
||||
Var("chromium_trunk") + "/deps/third_party/icu38@16445",
|
||||
|
||||
"third_party/libjpeg":
|
||||
Var("chromium_trunk") + "/src/third_party/libjpeg@" + Var("chromium_rev"),
|
||||
|
||||
"third_party/libpng":
|
||||
Var("chromium_trunk") + "/src/third_party/libpng@" + Var("chromium_rev"),
|
||||
|
||||
"third_party/zlib":
|
||||
Var("chromium_trunk") + "/src/third_party/zlib@" + Var("chromium_rev"),
|
||||
|
||||
"v8":
|
||||
"http://v8.googlecode.com/svn/trunk@2249",
|
||||
|
||||
"testing":
|
||||
Var("chromium_trunk") + "/src/testing@" + Var("chromium_rev"),
|
||||
|
||||
"skia":
|
||||
Var("chromium_trunk") + "/src/skia@" + Var("chromium_rev"),
|
||||
|
||||
"base":
|
||||
Var("chromium_trunk") + "/src/base@" + Var("chromium_rev"),
|
||||
|
||||
# NACL has to be in this weird directory because it looks for
|
||||
# googleclient two levels above it.
|
||||
"third_party/native_client/googleclient/native_client":
|
||||
"http://nativeclient.googlecode.com/svn/trunk/nacl/googleclient/native_client@188",
|
||||
|
||||
"third_party/breakpad/files":
|
||||
"http://google-breakpad.googlecode.com/svn/trunk@346",
|
||||
|
||||
"third_party/nixysa/files":
|
||||
"http://nixysa.googlecode.com/svn/trunk/nixysa@" + Var("nixysa_rev"),
|
||||
|
||||
"third_party/npapi/files":
|
||||
"http://nixysa.googlecode.com/svn/trunk/third_party/npapi@" + Var("nixysa_rev"),
|
||||
|
||||
"third_party/ply/files":
|
||||
"http://nixysa.googlecode.com/svn/trunk/third_party/ply-3.1@" + Var("nixysa_rev"),
|
||||
|
||||
"third_party/gflags/":
|
||||
"http://google-gflags.googlecode.com/svn/trunk@30",
|
||||
|
||||
"testing/gtest":
|
||||
"http://googletest.googlecode.com/svn/trunk@267",
|
||||
|
||||
"testing/gmock":
|
||||
Var("chromium_trunk") + "/src/testing/gmock@" + Var("chromium_rev"),
|
||||
# "http://googlemock.googlecode.com/svn/tags/release-1.0.0",
|
||||
|
||||
"third_party/jsdoctoolkit/files":
|
||||
"http://jsdoc-toolkit.googlecode.com/svn/tags/jsdoc_toolkit-2.1.0/jsdoc-toolkit",
|
||||
|
||||
# Stuff needed for GYP to run
|
||||
"build":
|
||||
Var("chromium_trunk") + "/src/build@" + Var("chromium_rev"),
|
||||
|
||||
"tools/gyp":
|
||||
"http://gyp.googlecode.com/svn/trunk@525",
|
||||
}
|
||||
|
||||
deps_os = {
|
||||
"win": {
|
||||
"third_party/cygwin":
|
||||
"/trunk/deps/third_party/cygwin@11984",
|
||||
|
||||
"third_party/python_24":
|
||||
Var("chromium_trunk") + "/deps/third_party/python_24@7444",
|
||||
},
|
||||
}
|
||||
|
||||
hooks = [
|
||||
{
|
||||
# A change to a .gyp, .gypi, or to GYP itself shound run the generator.
|
||||
"pattern": "\\.gypi?$|[/\\\\]src[/\\\\]tools[/\\\\]gyp[/\\\\]",
|
||||
"action": ["python", "tools/gyp/gyp_dogfood", "o3d/build/all.gyp", "--depth", ".."],
|
||||
},
|
||||
]
|
56
o3d/breakpad/breakpad.gyp
Normal file
56
o3d/breakpad/breakpad.gyp
Normal file
@ -0,0 +1,56 @@
|
||||
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
{
|
||||
'variables': {
|
||||
'chromium_code': 1,
|
||||
},
|
||||
'includes': [
|
||||
'../build/common.gypi',
|
||||
],
|
||||
'target_defaults': {
|
||||
'include_dirs': [
|
||||
'..',
|
||||
'../..',
|
||||
'../../breakpad/src',
|
||||
],
|
||||
},
|
||||
'conditions': [
|
||||
['OS=="win"',
|
||||
{
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'o3dBreakpad',
|
||||
'type': 'static_library',
|
||||
'dependencies': [
|
||||
'../../breakpad/breakpad.gyp:breakpad_sender',
|
||||
'../../breakpad/breakpad.gyp:breakpad_handler',
|
||||
],
|
||||
'sources': [
|
||||
'win/exception_handler_win32.cc',
|
||||
'win/breakpad_config.cc',
|
||||
'win/bluescreen_detector.cc',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
||||
'../../breakpad/src',
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
'target_name': 'reporter',
|
||||
'type': 'executable',
|
||||
'dependencies': [
|
||||
'o3dBreakpad',
|
||||
],
|
||||
'sources': [
|
||||
'win/crash_sender_win32.cc',
|
||||
'../../<(breakpaddir)/client/windows/sender/crash_report_sender.cc',
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
],
|
||||
}
|
33
o3d/build/all.gyp
Normal file
33
o3d/build/all.gyp
Normal file
@ -0,0 +1,33 @@
|
||||
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
{
|
||||
'includes': [
|
||||
'../../build/common.gypi',
|
||||
'common.gypi',
|
||||
],
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'All',
|
||||
'type': 'none',
|
||||
'dependencies': [
|
||||
'../../<(antlrdir)/antlr.gyp:*',
|
||||
'../../<(fcolladadir)/fcollada.gyp:*',
|
||||
'../../<(jpegdir)/libjpeg.gyp:*',
|
||||
'../../<(pngdir)/libpng.gyp:*',
|
||||
'../../<(zlibdir)/zlib.gyp:*',
|
||||
'../../base/base.gyp:base',
|
||||
'../../breakpad/breakpad.gyp:*',
|
||||
'../compiler/technique/technique.gyp:*',
|
||||
'../converter/converter.gyp:*',
|
||||
'../core/core.gyp:*',
|
||||
'../import/import.gyp:*',
|
||||
'../plugin/idl/idl.gyp:*',
|
||||
'../plugin/plugin.gyp:*',
|
||||
'../serializer/serializer.gyp:*',
|
||||
'../utils/utils.gyp:*',
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
169
o3d/build/build_nacl.py
Normal file
169
o3d/build/build_nacl.py
Normal file
@ -0,0 +1,169 @@
|
||||
#!/usr/bin/python2.4
|
||||
# Copyright 2009 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# This file is just here so that we can modify the python path before
|
||||
# invoking nixysa.
|
||||
|
||||
import os
|
||||
import os.path
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
third_party = os.path.join('..', '..', 'third_party')
|
||||
gflags_dir = os.path.join(third_party, 'gflags', 'python')
|
||||
sys.path.append(gflags_dir)
|
||||
|
||||
import gflags
|
||||
|
||||
FLAGS = gflags.FLAGS
|
||||
gflags.DEFINE_string('configuration', 'Debug',
|
||||
'Specify which configuration to build.')
|
||||
|
||||
gflags.DEFINE_string('platform', 'win',
|
||||
'Specify which platform to build.')
|
||||
|
||||
gflags.DEFINE_boolean('debug', False,
|
||||
'Whether or not to turn on debug output '
|
||||
'when running scons.')
|
||||
|
||||
gflags.DEFINE_string('output', '.', 'Sets the output directory.')
|
||||
|
||||
|
||||
def CopyIfNewer(inputs, output_dir):
|
||||
'''Copy the inputs to the output directory, but only if the files are
|
||||
newer than the destination files.'''
|
||||
for input in inputs:
|
||||
output = os.path.join(output_dir, os.path.basename(input))
|
||||
if os.path.exists(input):
|
||||
if (not os.path.exists(output) or
|
||||
os.path.getmtime(input) > os.path.getmtime(output)):
|
||||
try:
|
||||
print 'Copying from %s to %s' % (input, output)
|
||||
shutil.copy2(input, output)
|
||||
except:
|
||||
return False
|
||||
else:
|
||||
print '%s is up to date.' % output
|
||||
return True
|
||||
|
||||
def PrependToPath(path, item):
|
||||
'''Prepend an item to an environment variable path.'''
|
||||
orig_path = os.environ.get(path)
|
||||
if orig_path:
|
||||
new_path = os.pathsep.join([item, orig_path])
|
||||
else:
|
||||
new_path = item
|
||||
|
||||
os.environ[path] = new_path
|
||||
|
||||
def AppendToPath(path, item):
|
||||
'''Append an item to an environment variable path.'''
|
||||
orig_path = os.environ.get(path)
|
||||
if orig_path:
|
||||
new_path = os.pathsep.join([orig_path, item])
|
||||
else:
|
||||
new_path = item
|
||||
|
||||
os.environ[path] = new_path
|
||||
|
||||
def FindPlatformSDK():
|
||||
'''On Windows, find the installed location of the Platform SDK.'''
|
||||
import _winreg
|
||||
try:
|
||||
winsdk_key = _winreg.OpenKey(
|
||||
_winreg.HKEY_LOCAL_MACHINE,
|
||||
'SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v6.1\\WinSDKBuild')
|
||||
except WindowsError:
|
||||
try:
|
||||
winsdk_key = _winreg.OpenKey(
|
||||
_winreg.HKEY_LOCAL_MACHINE,
|
||||
'SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v6.0A\\WinSDKBuild')
|
||||
except WindowsError:
|
||||
print 'The Windows SDK version 6.0 or later needs to be installed'
|
||||
sys.exit(1)
|
||||
try:
|
||||
winsdk_dir, value_type = _winreg.QueryValueEx(winsdk_key,
|
||||
'InstallationFolder')
|
||||
except WindowsError:
|
||||
print 'The Windows SDK version 6.0 or later needs to be installed'
|
||||
sys.exit(1)
|
||||
_winreg.CloseKey(winsdk_key)
|
||||
|
||||
# Strip off trailing slashes
|
||||
winsdk_dir = winsdk_dir.rstrip('\\/')
|
||||
AppendToPath('PATH', os.path.join(winsdk_dir, 'Bin'))
|
||||
AppendToPath('INCLUDE', os.path.join(winsdk_dir, 'Include'))
|
||||
AppendToPath('LIB', os.path.join(winsdk_dir, 'Lib'))
|
||||
|
||||
def main(args):
|
||||
extra_args = FLAGS(args)
|
||||
# strip off argv[0]
|
||||
extra_args = extra_args[1:]
|
||||
|
||||
pythonpath = os.path.join(third_party, 'scons', 'scons-local')
|
||||
PrependToPath('PYTHONPATH', pythonpath)
|
||||
|
||||
binutils_path = os.path.join(third_party, 'gnu_binutils', 'files')
|
||||
AppendToPath('PATH', binutils_path)
|
||||
|
||||
config = 'opt'
|
||||
if FLAGS.configuration == 'Debug':
|
||||
config = 'dbg'
|
||||
elif FLAGS.configuration == 'Release':
|
||||
config = 'opt'
|
||||
|
||||
mode = '%s-%s' % (config, FLAGS.platform)
|
||||
|
||||
native_client_dir = os.path.join(third_party, 'native_client',
|
||||
'googleclient', 'native_client')
|
||||
|
||||
args = [
|
||||
'MODE=%s' % mode,
|
||||
'naclsdk_validate=0',
|
||||
'sdl=none',
|
||||
'--verbose',
|
||||
'--file=SConstruct',
|
||||
'-C',
|
||||
native_client_dir,
|
||||
]
|
||||
scons = os.path.join(third_party, 'scons', 'scons.py')
|
||||
args = [sys.executable, scons] + args + extra_args
|
||||
|
||||
# Add the platform SDK to INCLUDE and LIB
|
||||
if FLAGS.platform == 'win':
|
||||
FindPlatformSDK()
|
||||
|
||||
print 'Executing %s' % ' '.join(args)
|
||||
status = subprocess.call(args)
|
||||
|
||||
# Calculate what the output files should be.
|
||||
outputs = []
|
||||
for arg in extra_args:
|
||||
file_path = os.path.join(native_client_dir,
|
||||
'scons-out', mode, 'lib', arg)
|
||||
if FLAGS.platform == 'win':
|
||||
file_path = file_path + '.lib'
|
||||
else:
|
||||
file_path = file_path + '.a'
|
||||
outputs.append(file_path)
|
||||
|
||||
if status == 0 and not CopyIfNewer(outputs, FLAGS.output):
|
||||
sys.exit(-1)
|
||||
else:
|
||||
sys.exit(status)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(sys.argv)
|
80
o3d/build/common.gypi
Normal file
80
o3d/build/common.gypi
Normal file
@ -0,0 +1,80 @@
|
||||
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
{
|
||||
'includes': [
|
||||
'../../build/common.gypi',
|
||||
],
|
||||
'variables': {
|
||||
'antlrdir': 'third_party/antlr3',
|
||||
'breakpaddir': 'breakpad/src',
|
||||
'fcolladadir': 'third_party/fcollada/files',
|
||||
'gtestdir': 'testing/gtest/include',
|
||||
'jpegdir': 'third_party/libjpeg',
|
||||
'nacldir': 'third_party/native_client/googleclient',
|
||||
'nixysadir': 'third_party/nixysa/files',
|
||||
'npapidir': 'third_party/npapi/files',
|
||||
'pngdir': 'third_party/libpng',
|
||||
'skiadir': 'third_party/skia/include',
|
||||
'zlibdir': 'third_party/zlib',
|
||||
},
|
||||
'conditions' : [
|
||||
['OS == "win"',
|
||||
{
|
||||
'variables': {
|
||||
'renderer': 'd3d9',
|
||||
'cgdir': 'third_party/cg/files/win',
|
||||
'LIBRARY_SUFFIX': '.lib',
|
||||
'CONFIGURATION': '$(ConfigurationName)',
|
||||
},
|
||||
'target_defaults': {
|
||||
'defines': [
|
||||
'_CRT_SECURE_NO_WARNINGS',
|
||||
'RENDERER_D3D9',
|
||||
'OS_WIN',
|
||||
'NACL_WINDOWS',
|
||||
],
|
||||
'msvs_disabled_warnings': [4355],
|
||||
'msvs_settings': {
|
||||
'VCCLCompilerTool': {
|
||||
'AdditionalOptions': '/MP',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
['OS == "mac"',
|
||||
{
|
||||
'variables': {
|
||||
'renderer': 'gl',
|
||||
'cgdir': 'third_party/cg/files/mac',
|
||||
'LIBRARY_SUFFIX': '.a',
|
||||
'CONFIGURATION': '$(CONFIGURATION)',
|
||||
},
|
||||
'target_defaults': {
|
||||
'defines': [
|
||||
'RENDERER_GL',
|
||||
'OS_MACOSX',
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
['OS == "linux"',
|
||||
{
|
||||
'variables': {
|
||||
'renderer': 'gl',
|
||||
'cgdir': 'third_party/cg/files/linux',
|
||||
'LIBRARY_SUFFIX': '.a',
|
||||
'CONFIGURATION': '$(CONFIGURATION)',
|
||||
},
|
||||
'target_defaults': {
|
||||
'defines': [
|
||||
'RENDERER_GL',
|
||||
'OS_LINUX',
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
}
|
57
o3d/build/nacl.gyp
Normal file
57
o3d/build/nacl.gyp
Normal file
@ -0,0 +1,57 @@
|
||||
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
{
|
||||
'variables': {
|
||||
'chromium_code': 1,
|
||||
'nacl_scons_dir': '../../third_party/native_client/googleclient/native_client/scons-out',
|
||||
},
|
||||
'includes': [
|
||||
'common.gypi',
|
||||
],
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'build_nacl',
|
||||
'type': 'none',
|
||||
'variables': {
|
||||
'nacl_libs': [
|
||||
'google_nacl_imc',
|
||||
'google_nacl_imc_c',
|
||||
],
|
||||
'nacl_lib_dir': '<(nacl_scons_dir)/<(CONFIGURATION)-<(OS)/lib',
|
||||
'nacl_output_dir': '<(SHARED_INTERMEDIATE_DIR)/nacl_libs',
|
||||
},
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'build_nacl',
|
||||
'inputs' : [
|
||||
'build_nacl.py',
|
||||
],
|
||||
'outputs': [
|
||||
'<(nacl_output_dir)/google_nacl_imc<(LIBRARY_SUFFIX)',
|
||||
'<(nacl_output_dir)/google_nacl_imc_c<(LIBRARY_SUFFIX)',
|
||||
'dummy_file_that_never_gets_built_so_scons_always_runs',
|
||||
],
|
||||
'action': [
|
||||
'python',
|
||||
'<@(_inputs)',
|
||||
'--output="<(nacl_output_dir)"',
|
||||
'--configuration="<(CONFIGURATION)"',
|
||||
'--platform=<(OS)',
|
||||
'<@(nacl_libs)',
|
||||
],
|
||||
},
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
||||
'<(nacldir)',
|
||||
],
|
||||
'libraries': [
|
||||
'-l<(nacl_output_dir)/google_nacl_imc<(LIBRARY_SUFFIX)',
|
||||
'-l<(nacl_output_dir)/google_nacl_imc_c<(LIBRARY_SUFFIX)',
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
84
o3d/compiler/technique/technique.gyp
Normal file
84
o3d/compiler/technique/technique.gyp
Normal file
@ -0,0 +1,84 @@
|
||||
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
{
|
||||
'variables': {
|
||||
'chromium_code': 0,
|
||||
'technique_out_dir': '<(SHARED_INTERMEDIATE_DIR)/technique',
|
||||
},
|
||||
'includes': [
|
||||
'../../build/common.gypi',
|
||||
],
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'parser_generator',
|
||||
'type': 'none',
|
||||
'rules': [
|
||||
{
|
||||
'rule_name': 'technique_parser',
|
||||
'extension': 'g3pl',
|
||||
'inputs' : [
|
||||
'../../../<(antlrdir)/lib/antlr-3.1.1.jar',
|
||||
],
|
||||
'outputs': [
|
||||
'<(technique_out_dir)/<(RULE_INPUT_ROOT)Lexer.c',
|
||||
'<(technique_out_dir)/<(RULE_INPUT_ROOT)Lexer.h',
|
||||
'<(technique_out_dir)/<(RULE_INPUT_ROOT)Parser.c',
|
||||
'<(technique_out_dir)/<(RULE_INPUT_ROOT)Parser.h',
|
||||
],
|
||||
'action': [
|
||||
'java',
|
||||
'-cp', '../../../<(antlrdir)/lib/antlr-3.1.1.jar',
|
||||
'org.antlr.Tool',
|
||||
'<(RULE_INPUT_PATH)',
|
||||
'-fo', '<(technique_out_dir)',
|
||||
],
|
||||
},
|
||||
],
|
||||
'sources': [
|
||||
'Technique.g3pl',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
||||
'<(technique_out_dir)',
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
'target_name': 'technique',
|
||||
'type': 'static_library',
|
||||
'dependencies': [
|
||||
'parser_generator',
|
||||
'../../../<(antlrdir)/antlr.gyp:antlr3c',
|
||||
'../../../base/base.gyp:base',
|
||||
'../../core/core.gyp:o3dCore',
|
||||
],
|
||||
'include_dirs': [
|
||||
'<(technique_out_dir)',
|
||||
],
|
||||
'sources': [
|
||||
'<(technique_out_dir)/TechniqueLexer.c',
|
||||
'<(technique_out_dir)/TechniqueLexer.h',
|
||||
'<(technique_out_dir)/TechniqueParser.c',
|
||||
'<(technique_out_dir)/TechniqueParser.h',
|
||||
'technique_error.cc',
|
||||
'technique_error.h',
|
||||
'technique_parser.cc',
|
||||
'technique_parser.h',
|
||||
'technique_structures.cc',
|
||||
'technique_structures.h',
|
||||
],
|
||||
'msvs_settings': {
|
||||
'VCCLCompilerTool': {
|
||||
'CompileAs': '2',
|
||||
},
|
||||
},
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
||||
'<(technique_out_dir)',
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
90
o3d/converter/converter.gyp
Normal file
90
o3d/converter/converter.gyp
Normal file
@ -0,0 +1,90 @@
|
||||
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
{
|
||||
'variables': {
|
||||
'chromium_code': 1,
|
||||
},
|
||||
'includes': [
|
||||
'../build/common.gypi',
|
||||
],
|
||||
'target_defaults': {
|
||||
'include_dirs': [
|
||||
'..',
|
||||
'../..',
|
||||
'../../<(gtestdir)',
|
||||
],
|
||||
},
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'o3dConverter',
|
||||
'type': 'executable',
|
||||
'dependencies': [
|
||||
'../../<(antlrdir)/antlr.gyp:antlr3c',
|
||||
'../../<(fcolladadir)/fcollada.gyp:fcollada',
|
||||
'../../<(jpegdir)/libjpeg.gyp:libjpeg',
|
||||
'../../<(pngdir)/libpng.gyp:libpng',
|
||||
'../../<(zlibdir)/zlib.gyp:zlib',
|
||||
'../../base/base.gyp:base',
|
||||
'../../skia/skia.gyp:skia',
|
||||
'../compiler/technique/technique.gyp:technique',
|
||||
'../core/core.gyp:o3dCore',
|
||||
'../core/core.gyp:o3dCorePlatform',
|
||||
'../import/import.gyp:o3dArchive',
|
||||
'../import/import.gyp:o3dImport',
|
||||
'../serializer/serializer.gyp:o3dSerializer',
|
||||
'../utils/utils.gyp:o3dUtils',
|
||||
],
|
||||
'sources': [
|
||||
'cross/buffer_stub.cc',
|
||||
'cross/buffer_stub.h',
|
||||
'cross/converter.cc',
|
||||
'cross/converter.h',
|
||||
'cross/converter_main.cc',
|
||||
'cross/draw_element_stub.h',
|
||||
'cross/effect_stub.h',
|
||||
'cross/param_cache_stub.h',
|
||||
'cross/primitive_stub.h',
|
||||
'cross/render_surface_stub.h',
|
||||
'cross/renderer_stub.cc',
|
||||
'cross/renderer_stub.h',
|
||||
'cross/sampler_stub.h',
|
||||
'cross/stream_bank_stub.h',
|
||||
'cross/texture_stub.cc',
|
||||
'cross/texture_stub.h',
|
||||
],
|
||||
'conditions' : [
|
||||
['OS == "mac"',
|
||||
{
|
||||
'sources': [
|
||||
'mac/converter_main.mm',
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
['OS == "win"',
|
||||
{
|
||||
'msvs_settings': {
|
||||
'VCLinkerTool': {
|
||||
'AdditionalDependencies': [
|
||||
'rpcrt4.lib',
|
||||
'"$(DXSDK_DIR)/Lib/x86/d3dx9.lib"',
|
||||
'../../<(cgdir)/lib/cg.lib',
|
||||
'../../<(cgdir)/lib/cgGL.lib',
|
||||
],
|
||||
# Set /SUBSYSTEM:CONSOLE for converter.exe, since
|
||||
# it is a console app.
|
||||
'SubSystem': '1',
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
399
o3d/core/core.gyp
Normal file
399
o3d/core/core.gyp
Normal file
@ -0,0 +1,399 @@
|
||||
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
{
|
||||
'variables': {
|
||||
'chromium_code': 1,
|
||||
},
|
||||
'target_defaults': {
|
||||
'include_dirs': [
|
||||
'..',
|
||||
'../..',
|
||||
'../../<(gtestdir)',
|
||||
'../../<(nacldir)',
|
||||
],
|
||||
'conditions': [
|
||||
['renderer == "d3d9" and OS == "win"',
|
||||
{
|
||||
'include_dirs': [
|
||||
'$(DXSDK_DIR)/Include',
|
||||
],
|
||||
}
|
||||
],
|
||||
],
|
||||
},
|
||||
'includes': [
|
||||
'../build/common.gypi',
|
||||
],
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'o3dCore',
|
||||
'type': 'static_library',
|
||||
'dependencies': [
|
||||
'../../<(jpegdir)/libjpeg.gyp:libjpeg',
|
||||
'../../<(pngdir)/libpng.gyp:libpng',
|
||||
'../../<(zlibdir)/zlib.gyp:zlib',
|
||||
'../../skia/skia.gyp:skia',
|
||||
],
|
||||
'sources': [
|
||||
'cross/bitmap.cc',
|
||||
'cross/bitmap.h',
|
||||
'cross/bitmap_dds.cc',
|
||||
'cross/bitmap_jpg.cc',
|
||||
'cross/bitmap_png.cc',
|
||||
'cross/bitmap_tga.cc',
|
||||
'cross/bounding_box.cc',
|
||||
'cross/bounding_box.h',
|
||||
'cross/buffer.cc',
|
||||
'cross/buffer.h',
|
||||
'cross/callback.h',
|
||||
'cross/canvas.cc',
|
||||
'cross/canvas.h',
|
||||
'cross/canvas_paint.cc',
|
||||
'cross/canvas_paint.h',
|
||||
'cross/canvas_shader.cc',
|
||||
'cross/canvas_shader.h',
|
||||
'cross/canvas_utils.h',
|
||||
'cross/class_manager.cc',
|
||||
'cross/class_manager.h',
|
||||
'cross/clear_buffer.cc',
|
||||
'cross/clear_buffer.h',
|
||||
'cross/client.cc',
|
||||
'cross/client.h',
|
||||
'cross/core_metrics.cc',
|
||||
'cross/core_metrics.h',
|
||||
'cross/counter.cc',
|
||||
'cross/counter.h',
|
||||
'cross/counter_manager.cc',
|
||||
'cross/counter_manager.h',
|
||||
'cross/cursor.h',
|
||||
'cross/curve.cc',
|
||||
'cross/curve.h',
|
||||
'cross/ddsurfacedesc.h',
|
||||
'cross/display_mode.h',
|
||||
'cross/display_window.h',
|
||||
'cross/draw_context.cc',
|
||||
'cross/draw_context.h',
|
||||
'cross/draw_element.cc',
|
||||
'cross/draw_element.h',
|
||||
'cross/draw_list.cc',
|
||||
'cross/draw_list.h',
|
||||
'cross/draw_list_manager.cc',
|
||||
'cross/draw_list_manager.h',
|
||||
'cross/draw_pass.cc',
|
||||
'cross/draw_pass.h',
|
||||
'cross/effect.cc',
|
||||
'cross/effect.h',
|
||||
'cross/element.cc',
|
||||
'cross/element.h',
|
||||
'cross/error.h',
|
||||
'cross/error_status.cc',
|
||||
'cross/error_status.h',
|
||||
'cross/error_stream_manager.cc',
|
||||
'cross/error_stream_manager.h',
|
||||
'cross/evaluation_counter.cc',
|
||||
'cross/evaluation_counter.h',
|
||||
'cross/event.cc',
|
||||
'cross/event.h',
|
||||
'cross/event_callback.h',
|
||||
'cross/event_manager.cc',
|
||||
'cross/event_manager.h',
|
||||
'cross/fake_vertex_source.cc',
|
||||
'cross/fake_vertex_source.h',
|
||||
'cross/features.cc',
|
||||
'cross/features.h',
|
||||
'cross/field.cc',
|
||||
'cross/field.h',
|
||||
'cross/file_request.cc',
|
||||
'cross/file_request.h',
|
||||
'cross/float_n.h',
|
||||
'cross/function.cc',
|
||||
'cross/function.h',
|
||||
'cross/iclass_manager.cc',
|
||||
'cross/iclass_manager.h',
|
||||
'cross/id_manager.cc',
|
||||
'cross/id_manager.h',
|
||||
'cross/ierror_status.cc',
|
||||
'cross/ierror_status.h',
|
||||
'cross/install_check.h',
|
||||
'cross/lost_resource_callback.h',
|
||||
'cross/material.cc',
|
||||
'cross/material.h',
|
||||
'cross/math_types.h',
|
||||
'cross/math_utilities.cc',
|
||||
'cross/math_utilities.h',
|
||||
'cross/matrix4_axis_rotation.cc',
|
||||
'cross/matrix4_axis_rotation.h',
|
||||
'cross/matrix4_composition.cc',
|
||||
'cross/matrix4_composition.h',
|
||||
'cross/matrix4_scale.cc',
|
||||
'cross/matrix4_scale.h',
|
||||
'cross/matrix4_translation.cc',
|
||||
'cross/matrix4_translation.h',
|
||||
'cross/message_queue.cc',
|
||||
'cross/message_queue.h',
|
||||
'cross/named_object.cc',
|
||||
'cross/named_object.h',
|
||||
'cross/object_base.cc',
|
||||
'cross/object_base.h',
|
||||
'cross/object_manager.cc',
|
||||
'cross/object_manager.h',
|
||||
'cross/pack.cc',
|
||||
'cross/pack.h',
|
||||
'cross/param.cc',
|
||||
'cross/param.h',
|
||||
'cross/param_array.cc',
|
||||
'cross/param_array.h',
|
||||
'cross/param_cache.cc',
|
||||
'cross/param_cache.h',
|
||||
'cross/param_object.cc',
|
||||
'cross/param_object.h',
|
||||
'cross/param_operation.cc',
|
||||
'cross/param_operation.h',
|
||||
'cross/performance_timer.h',
|
||||
'cross/precompile.cc',
|
||||
'cross/precompile.h',
|
||||
'cross/primitive.cc',
|
||||
'cross/primitive.h',
|
||||
'cross/profiler.cc',
|
||||
'cross/profiler.h',
|
||||
'cross/ray_intersection_info.cc',
|
||||
'cross/ray_intersection_info.h',
|
||||
'cross/render_context.cc',
|
||||
'cross/render_context.h',
|
||||
'cross/render_event.h',
|
||||
'cross/render_node.cc',
|
||||
'cross/render_node.h',
|
||||
'cross/render_surface.cc',
|
||||
'cross/render_surface.h',
|
||||
'cross/render_surface_set.cc',
|
||||
'cross/render_surface_set.h',
|
||||
'cross/renderer.cc',
|
||||
'cross/renderer.h',
|
||||
'cross/renderer_platform.h',
|
||||
'cross/sampler.cc',
|
||||
'cross/sampler.h',
|
||||
'cross/semantic_manager.cc',
|
||||
'cross/semantic_manager.h',
|
||||
'cross/service_dependency.h',
|
||||
'cross/service_implementation.h',
|
||||
'cross/service_interface_traits.h',
|
||||
'cross/service_locator.cc',
|
||||
'cross/service_locator.h',
|
||||
'cross/shape.cc',
|
||||
'cross/shape.h',
|
||||
'cross/skin.cc',
|
||||
'cross/skin.h',
|
||||
'cross/smart_ptr.h',
|
||||
'cross/standard_param.cc',
|
||||
'cross/standard_param.h',
|
||||
'cross/state.cc',
|
||||
'cross/state.h',
|
||||
'cross/state_set.cc',
|
||||
'cross/state_set.h',
|
||||
'cross/stream.cc',
|
||||
'cross/stream.h',
|
||||
'cross/stream_bank.cc',
|
||||
'cross/stream_bank.h',
|
||||
'cross/texture.cc',
|
||||
'cross/texture.h',
|
||||
'cross/texture_base.cc',
|
||||
'cross/texture_base.h',
|
||||
'cross/tick_event.h',
|
||||
'cross/timer.cc',
|
||||
'cross/timer.h',
|
||||
'cross/timingtable.h',
|
||||
'cross/transform.cc',
|
||||
'cross/transform.h',
|
||||
'cross/transformation_context.cc',
|
||||
'cross/transformation_context.h',
|
||||
'cross/tree_traversal.cc',
|
||||
'cross/tree_traversal.h',
|
||||
'cross/types.h',
|
||||
'cross/vector_map.h',
|
||||
'cross/vertex_source.cc',
|
||||
'cross/vertex_source.h',
|
||||
'cross/viewport.cc',
|
||||
'cross/viewport.h',
|
||||
'cross/visitor_base.h',
|
||||
'cross/weak_ptr.h',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
||||
'..',
|
||||
'cross',
|
||||
],
|
||||
},
|
||||
'conditions': [
|
||||
['OS == "win"',
|
||||
{
|
||||
'sources': [
|
||||
'win/display_window_win.h',
|
||||
'win/performance_timer.cc',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
||||
'win',
|
||||
],
|
||||
},
|
||||
}
|
||||
],
|
||||
['OS == "linux"',
|
||||
{
|
||||
'sources': [
|
||||
'linux/display_window_linux.h',
|
||||
'linux/performance_timer.cc',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
||||
'linux',
|
||||
],
|
||||
},
|
||||
}
|
||||
],
|
||||
['OS == "mac"',
|
||||
{
|
||||
'sources': [
|
||||
'mac/display_window_mac.h',
|
||||
'mac/performance_timer.cc',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
||||
'mac',
|
||||
],
|
||||
},
|
||||
}
|
||||
],
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'o3dCoreTest',
|
||||
'type': 'static_library',
|
||||
'dependencies': [
|
||||
],
|
||||
'sources': [
|
||||
'cross/bitmap_test.cc',
|
||||
'cross/bounding_box_test.cc',
|
||||
'cross/buffer_test.cc',
|
||||
'cross/class_manager_test.cc',
|
||||
'cross/client_test.cc',
|
||||
'cross/counter_test.cc',
|
||||
'cross/curve_test.cc',
|
||||
'cross/draw_element_test.cc',
|
||||
'cross/draw_list_test.cc',
|
||||
'cross/draw_pass_test.cc',
|
||||
'cross/effect_test.cc',
|
||||
'cross/element_test.cc',
|
||||
'cross/features_test.cc',
|
||||
'cross/field_test.cc',
|
||||
'cross/float_n_test.cc',
|
||||
'cross/function_test.cc',
|
||||
'cross/material_test.cc',
|
||||
'cross/math_utilities_test.cc',
|
||||
'cross/matrix4_axis_rotation_test.cc',
|
||||
'cross/matrix4_composition_test.cc',
|
||||
'cross/matrix4_scale_test.cc',
|
||||
'cross/matrix4_translation_test.cc',
|
||||
# TODO(gspencer): fix this test so it can be re-enabled.
|
||||
# 'cross/message_queue_test.cc',
|
||||
'cross/object_base_test.cc',
|
||||
'cross/pack_test.cc',
|
||||
'cross/param_array_test.cc',
|
||||
'cross/param_object_test.cc',
|
||||
'cross/param_operation_test.cc',
|
||||
'cross/param_test.cc',
|
||||
'cross/performance_timer_test.cc',
|
||||
'cross/primitive_test.cc',
|
||||
'cross/ray_intersection_info_test.cc',
|
||||
'cross/render_node_test.cc',
|
||||
'cross/renderer_test.cc',
|
||||
'cross/service_locator_test.cc',
|
||||
'cross/shape_test.cc',
|
||||
'cross/skin_test.cc',
|
||||
'cross/smart_ptr_test.cc',
|
||||
'cross/state_set_test.cc',
|
||||
'cross/state_test.cc',
|
||||
'cross/stream_bank_test.cc',
|
||||
'cross/stream_test.cc',
|
||||
'cross/transform_test.cc',
|
||||
'cross/tree_traversal_test.cc',
|
||||
'cross/vector_map_test.cc',
|
||||
'cross/vertex_source_test.cc',
|
||||
'cross/visitor_base_test.cc',
|
||||
'cross/weak_ptr_test.cc',
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'o3dCorePlatform',
|
||||
'type': 'static_library',
|
||||
'dependencies': [
|
||||
'../../skia/skia.gyp:skia',
|
||||
],
|
||||
'sources': [
|
||||
],
|
||||
'conditions': [
|
||||
['renderer == "gl"',
|
||||
{
|
||||
'sources': [
|
||||
'cross/gl/buffer_gl.cc',
|
||||
'cross/gl/buffer_gl.h',
|
||||
'cross/gl/draw_element_gl.cc',
|
||||
'cross/gl/draw_element_gl.h',
|
||||
'cross/gl/effect_gl.cc',
|
||||
'cross/gl/effect_gl.h',
|
||||
'cross/gl/install_check.cc',
|
||||
'cross/gl/param_cache_gl.cc',
|
||||
'cross/gl/param_cache_gl.h',
|
||||
'cross/gl/primitive_gl.cc',
|
||||
'cross/gl/primitive_gl.h',
|
||||
'cross/gl/render_surface_gl.cc',
|
||||
'cross/gl/render_surface_gl.h',
|
||||
'cross/gl/renderer_gl.cc',
|
||||
'cross/gl/renderer_gl.h',
|
||||
'cross/gl/sampler_gl.cc',
|
||||
'cross/gl/sampler_gl.h',
|
||||
'cross/gl/stream_bank_gl.cc',
|
||||
'cross/gl/stream_bank_gl.h',
|
||||
'cross/gl/texture_gl.cc',
|
||||
'cross/gl/texture_gl.h',
|
||||
'cross/gl/utils_gl-inl.h',
|
||||
'cross/gl/utils_gl.cc',
|
||||
'cross/gl/utils_gl.h',
|
||||
],
|
||||
}
|
||||
],
|
||||
['renderer == "d3d9" and OS == "win"',
|
||||
{
|
||||
'sources': [
|
||||
'win/d3d9/buffer_d3d9.cc',
|
||||
'win/d3d9/buffer_d3d9.h',
|
||||
'win/d3d9/d3d_entry_points.h',
|
||||
'win/d3d9/draw_element_d3d9.cc',
|
||||
'win/d3d9/draw_element_d3d9.h',
|
||||
'win/d3d9/effect_d3d9.cc',
|
||||
'win/d3d9/effect_d3d9.h',
|
||||
'win/d3d9/install_check.cc',
|
||||
'win/d3d9/param_cache_d3d9.cc',
|
||||
'win/d3d9/param_cache_d3d9.h',
|
||||
'win/d3d9/primitive_d3d9.cc',
|
||||
'win/d3d9/primitive_d3d9.h',
|
||||
'win/d3d9/render_surface_d3d9.cc',
|
||||
'win/d3d9/render_surface_d3d9.h',
|
||||
'win/d3d9/renderer_d3d9.cc',
|
||||
'win/d3d9/renderer_d3d9.h',
|
||||
'win/d3d9/sampler_d3d9.cc',
|
||||
'win/d3d9/sampler_d3d9.h',
|
||||
'win/d3d9/stream_bank_d3d9.cc',
|
||||
'win/d3d9/stream_bank_d3d9.h',
|
||||
'win/d3d9/texture_d3d9.cc',
|
||||
'win/d3d9/texture_d3d9.h',
|
||||
'win/d3d9/utils_d3d9.cc',
|
||||
'win/d3d9/utils_d3d9.h',
|
||||
],
|
||||
}
|
||||
],
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
130
o3d/import/import.gyp
Normal file
130
o3d/import/import.gyp
Normal file
@ -0,0 +1,130 @@
|
||||
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
{
|
||||
'variables': {
|
||||
'chromium_code': 1,
|
||||
},
|
||||
'includes': [
|
||||
'../build/common.gypi',
|
||||
],
|
||||
'target_defaults': {
|
||||
'include_dirs': [
|
||||
'..',
|
||||
'../..',
|
||||
'../../<(cgdir)/include',
|
||||
'../../<(gtestdir)',
|
||||
],
|
||||
},
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'o3dImport',
|
||||
'type': 'static_library',
|
||||
'dependencies': [
|
||||
'../../<(antlrdir)/antlr.gyp:antlr3c',
|
||||
'../../<(fcolladadir)/fcollada.gyp:fcollada',
|
||||
'../../<(jpegdir)/libjpeg.gyp:libjpeg',
|
||||
'../../<(pngdir)/libpng.gyp:libpng',
|
||||
'../../<(zlibdir)/zlib.gyp:zlib',
|
||||
'../compiler/technique/technique.gyp:technique',
|
||||
],
|
||||
'sources': [
|
||||
'cross/collada_conditioner.cc',
|
||||
'cross/collada_conditioner.h',
|
||||
'cross/collada.cc',
|
||||
'cross/collada.h',
|
||||
'cross/collada_zip_archive.cc',
|
||||
'cross/collada_zip_archive.h',
|
||||
'cross/file_output_stream_processor.cc',
|
||||
'cross/file_output_stream_processor.h',
|
||||
'cross/gz_compressor.cc',
|
||||
'cross/gz_compressor.h',
|
||||
'cross/precompile.h',
|
||||
'cross/tar_generator.cc',
|
||||
'cross/tar_generator.h',
|
||||
'cross/tar_processor.h',
|
||||
'cross/targz_generator.cc',
|
||||
'cross/targz_generator.h',
|
||||
'cross/targz_processor.h',
|
||||
'cross/zip_archive.cc',
|
||||
'cross/zip_archive.h',
|
||||
],
|
||||
'conditions' : [
|
||||
['renderer == "d3d9" and OS == "win"',
|
||||
{
|
||||
'include_dirs': [
|
||||
'$(DXSDK_DIR)/Include',
|
||||
],
|
||||
}
|
||||
],
|
||||
['OS == "win"',
|
||||
{
|
||||
'sources': [
|
||||
'win/collada_conditioner_win.cc',
|
||||
],
|
||||
},
|
||||
],
|
||||
['OS == "mac"',
|
||||
{
|
||||
'sources': [
|
||||
'mac/collada_conditioner_mac.mm',
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
['OS == "linux"',
|
||||
{
|
||||
'sources': [
|
||||
'linux/collada_conditioner_linux.cc',
|
||||
],
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'o3dArchive',
|
||||
'type': 'static_library',
|
||||
'dependencies': [
|
||||
'../../<(antlrdir)/antlr.gyp:antlr3c',
|
||||
'../../<(fcolladadir)/fcollada.gyp:fcollada',
|
||||
'../../<(jpegdir)/libjpeg.gyp:libjpeg',
|
||||
'../../<(pngdir)/libpng.gyp:libpng',
|
||||
'../../<(zlibdir)/zlib.gyp:zlib',
|
||||
],
|
||||
'sources': [
|
||||
'cross/archive_processor.cc',
|
||||
'cross/archive_processor.h',
|
||||
'cross/archive_request.cc',
|
||||
'cross/archive_request.h',
|
||||
'cross/gz_decompressor.cc',
|
||||
'cross/gz_decompressor.h',
|
||||
'cross/iarchive_generator.h',
|
||||
'cross/memory_buffer.h',
|
||||
'cross/memory_stream.cc',
|
||||
'cross/memory_stream.h',
|
||||
'cross/raw_data.cc',
|
||||
'cross/raw_data.h',
|
||||
'cross/tar_generator.h',
|
||||
'cross/tar_processor.cc',
|
||||
'cross/tar_processor.h',
|
||||
'cross/targz_generator.h',
|
||||
'cross/targz_processor.cc',
|
||||
'cross/targz_processor.h',
|
||||
],
|
||||
'conditions' : [
|
||||
['renderer == "d3d9" and OS == "win"',
|
||||
{
|
||||
'include_dirs': [
|
||||
'$(DXSDK_DIR)/Include',
|
||||
],
|
||||
}
|
||||
],
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
@ -77,7 +77,7 @@ base_env = Environment(
|
||||
COVERAGE_TARGETS = ['unit_tests', 'system_tests'],
|
||||
MSVS_USE_MFC_DIRS=1,
|
||||
)
|
||||
# @@REWRITE(insert python-copyright)
|
||||
|
||||
base_env.ApplySConscript(['svn_paths.scons'])
|
||||
|
||||
base_env.Append(
|
||||
|
36
o3d/plugin/idl/codegen.py
Normal file
36
o3d/plugin/idl/codegen.py
Normal file
@ -0,0 +1,36 @@
|
||||
#!/usr/bin/python2.4
|
||||
# Copyright 2009 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# This file is just here so that we can modify the python path before
|
||||
# invoking nixysa.
|
||||
|
||||
import subprocess
|
||||
import sys
|
||||
import os
|
||||
import os.path
|
||||
|
||||
third_party = os.path.join('..', '..', '..', 'third_party')
|
||||
pythonpath = os.pathsep.join([os.path.join(third_party, 'gflags', 'python'),
|
||||
os.path.join(third_party, 'ply', 'files')])
|
||||
|
||||
orig_pythonpath = os.environ.get('PYTHONPATH')
|
||||
if orig_pythonpath:
|
||||
pythonpath = os.pathsep.join([pythonpath, orig_pythonpath])
|
||||
|
||||
os.environ['PYTHONPATH'] = pythonpath
|
||||
|
||||
nixysa = os.path.join(third_party, 'nixysa', 'files', 'codegen.py')
|
||||
status = subprocess.call([sys.executable, nixysa] + sys.argv[1:])
|
||||
sys.exit(status)
|
284
o3d/plugin/idl/idl.gyp
Normal file
284
o3d/plugin/idl/idl.gyp
Normal file
@ -0,0 +1,284 @@
|
||||
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
{
|
||||
'includes': [
|
||||
'../../build/common.gypi',
|
||||
],
|
||||
'variables': {
|
||||
'chromium_code': 1,
|
||||
'idl_out_dir': '<(SHARED_INTERMEDIATE_DIR)/idl_glue',
|
||||
},
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'idl_generator',
|
||||
'type': 'none',
|
||||
'variables': {
|
||||
'idl_files' : [
|
||||
# NOTE: Sadly, if you add/remove/rename an IDL file in this
|
||||
# list, you must also update the list of outputs below.
|
||||
'archive_request.idl',
|
||||
'bounding_box.idl',
|
||||
'buffer.idl',
|
||||
'canvas.idl',
|
||||
'canvas_paint.idl',
|
||||
'canvas_shader.idl',
|
||||
'clear_buffer.idl',
|
||||
'client.idl',
|
||||
'counter.idl',
|
||||
'cursor.idl',
|
||||
'curve.idl',
|
||||
'display_mode.idl',
|
||||
'draw_context.idl',
|
||||
'draw_element.idl',
|
||||
'draw_list.idl',
|
||||
'draw_pass.idl',
|
||||
'effect.idl',
|
||||
'element.idl',
|
||||
'event.idl',
|
||||
'field.idl',
|
||||
'file_request.idl',
|
||||
'function.idl',
|
||||
'material.idl',
|
||||
'matrix4_axis_rotation.idl',
|
||||
'matrix4_composition.idl',
|
||||
'matrix4_scale.idl',
|
||||
'matrix4_translation.idl',
|
||||
'named.idl',
|
||||
'pack.idl',
|
||||
'param.idl',
|
||||
'param_array.idl',
|
||||
'param_object.idl',
|
||||
'param_operation.idl',
|
||||
'plugin.idl',
|
||||
'primitive.idl',
|
||||
'raw_data.idl',
|
||||
'ray_intersection_info.idl',
|
||||
'render_event.idl',
|
||||
'render_node.idl',
|
||||
'render_surface.idl',
|
||||
'render_surface_set.idl',
|
||||
'sampler.idl',
|
||||
'shape.idl',
|
||||
'skin.idl',
|
||||
'standard_param.idl',
|
||||
'state.idl',
|
||||
'state_set.idl',
|
||||
'stream.idl',
|
||||
'stream_bank.idl',
|
||||
'texture.idl',
|
||||
'tick_event.idl',
|
||||
'transform.idl',
|
||||
'tree_traversal.idl',
|
||||
'types.idl',
|
||||
'vector.idl',
|
||||
'vertex_source.idl',
|
||||
'viewport.idl',
|
||||
],
|
||||
},
|
||||
'rules': [
|
||||
{
|
||||
'rule_name': 'generate_idl',
|
||||
'extension': 'idl',
|
||||
'process_outputs_as_sources': 1,
|
||||
'inputs': [
|
||||
'../../../<(nixysadir)/codegen.py',
|
||||
'codegen.py',
|
||||
],
|
||||
'outputs': [
|
||||
'<(idl_out_dir)/<(RULE_INPUT_ROOT)_glue.cc',
|
||||
'<(idl_out_dir)/<(RULE_INPUT_ROOT)_glue.h',
|
||||
'<(idl_out_dir)/globals_glue.cc',
|
||||
'<(idl_out_dir)/globals_glue.h',
|
||||
'<(idl_out_dir)/hash',
|
||||
'<(idl_out_dir)/parsetab.py',
|
||||
'<(idl_out_dir)/parsetab.pyc',
|
||||
],
|
||||
'action': [
|
||||
'python',
|
||||
'codegen.py',
|
||||
'--binding-module=o3d:../../plugin/o3d_binding.py',
|
||||
'--generate=npapi',
|
||||
'--output-dir=<(idl_out_dir)',
|
||||
'<@(idl_files)',
|
||||
],
|
||||
'message': 'Generating IDL glue for <(RULE_INPUT_PATH)',
|
||||
},
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
||||
'<(idl_out_dir)',
|
||||
],
|
||||
},
|
||||
'sources': [
|
||||
'<@(idl_files)',
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'o3dPluginIdl',
|
||||
'type': 'static_library',
|
||||
'variables': {
|
||||
'static_glue_dir': '../../../<(nixysadir)/static_glue/npapi',
|
||||
},
|
||||
'include_dirs': [
|
||||
'../..',
|
||||
'../../..',
|
||||
'../../../<(npapidir)/include',
|
||||
'../../plugin/cross',
|
||||
'<(static_glue_dir)',
|
||||
],
|
||||
'dependencies': [
|
||||
'../../../<(zlibdir)/zlib.gyp:zlib',
|
||||
'../../../base/base.gyp:base',
|
||||
'../../../skia/skia.gyp:skia',
|
||||
'idl_generator',
|
||||
],
|
||||
'sources': [
|
||||
'../cross/archive_request_static_glue.cc',
|
||||
'../cross/archive_request_static_glue.h',
|
||||
'../cross/o3d_glue.cc',
|
||||
'../cross/o3d_glue.h',
|
||||
'<(static_glue_dir)/common.cc',
|
||||
'<(static_glue_dir)/npn_api.cc',
|
||||
'<(static_glue_dir)/static_object.cc',
|
||||
'<(idl_out_dir)/globals_glue.cc',
|
||||
'<(idl_out_dir)/globals_glue.h',
|
||||
|
||||
# Sadly, the files below here are just an expansion of the
|
||||
# list of IDL files in 'idl_files', above, so if you change on
|
||||
# above, you also need to change this list.
|
||||
'<(idl_out_dir)/archive_request_glue.cc',
|
||||
'<(idl_out_dir)/archive_request_glue.h',
|
||||
'<(idl_out_dir)/bounding_box_glue.cc',
|
||||
'<(idl_out_dir)/bounding_box_glue.h',
|
||||
'<(idl_out_dir)/buffer_glue.cc',
|
||||
'<(idl_out_dir)/buffer_glue.h',
|
||||
'<(idl_out_dir)/canvas_glue.cc',
|
||||
'<(idl_out_dir)/canvas_glue.h',
|
||||
'<(idl_out_dir)/canvas_paint_glue.cc',
|
||||
'<(idl_out_dir)/canvas_paint_glue.h',
|
||||
'<(idl_out_dir)/canvas_shader_glue.cc',
|
||||
'<(idl_out_dir)/canvas_shader_glue.h',
|
||||
'<(idl_out_dir)/clear_buffer_glue.cc',
|
||||
'<(idl_out_dir)/clear_buffer_glue.h',
|
||||
'<(idl_out_dir)/client_glue.cc',
|
||||
'<(idl_out_dir)/client_glue.h',
|
||||
'<(idl_out_dir)/counter_glue.cc',
|
||||
'<(idl_out_dir)/counter_glue.h',
|
||||
'<(idl_out_dir)/cursor_glue.cc',
|
||||
'<(idl_out_dir)/cursor_glue.h',
|
||||
'<(idl_out_dir)/curve_glue.cc',
|
||||
'<(idl_out_dir)/curve_glue.h',
|
||||
'<(idl_out_dir)/display_mode_glue.cc',
|
||||
'<(idl_out_dir)/display_mode_glue.h',
|
||||
'<(idl_out_dir)/draw_context_glue.cc',
|
||||
'<(idl_out_dir)/draw_context_glue.h',
|
||||
'<(idl_out_dir)/draw_element_glue.cc',
|
||||
'<(idl_out_dir)/draw_element_glue.h',
|
||||
'<(idl_out_dir)/draw_list_glue.cc',
|
||||
'<(idl_out_dir)/draw_list_glue.h',
|
||||
'<(idl_out_dir)/draw_pass_glue.cc',
|
||||
'<(idl_out_dir)/draw_pass_glue.h',
|
||||
'<(idl_out_dir)/effect_glue.cc',
|
||||
'<(idl_out_dir)/effect_glue.h',
|
||||
'<(idl_out_dir)/element_glue.cc',
|
||||
'<(idl_out_dir)/element_glue.h',
|
||||
'<(idl_out_dir)/event_glue.cc',
|
||||
'<(idl_out_dir)/event_glue.h',
|
||||
'<(idl_out_dir)/field_glue.cc',
|
||||
'<(idl_out_dir)/field_glue.h',
|
||||
'<(idl_out_dir)/file_request_glue.cc',
|
||||
'<(idl_out_dir)/file_request_glue.h',
|
||||
'<(idl_out_dir)/function_glue.cc',
|
||||
'<(idl_out_dir)/function_glue.h',
|
||||
'<(idl_out_dir)/material_glue.cc',
|
||||
'<(idl_out_dir)/material_glue.h',
|
||||
'<(idl_out_dir)/matrix4_axis_rotation_glue.cc',
|
||||
'<(idl_out_dir)/matrix4_axis_rotation_glue.h',
|
||||
'<(idl_out_dir)/matrix4_composition_glue.cc',
|
||||
'<(idl_out_dir)/matrix4_composition_glue.h',
|
||||
'<(idl_out_dir)/matrix4_scale_glue.cc',
|
||||
'<(idl_out_dir)/matrix4_scale_glue.h',
|
||||
'<(idl_out_dir)/matrix4_translation_glue.cc',
|
||||
'<(idl_out_dir)/matrix4_translation_glue.h',
|
||||
'<(idl_out_dir)/named_glue.cc',
|
||||
'<(idl_out_dir)/named_glue.h',
|
||||
'<(idl_out_dir)/pack_glue.cc',
|
||||
'<(idl_out_dir)/pack_glue.h',
|
||||
'<(idl_out_dir)/param_array_glue.cc',
|
||||
'<(idl_out_dir)/param_array_glue.h',
|
||||
'<(idl_out_dir)/param_glue.cc',
|
||||
'<(idl_out_dir)/param_glue.h',
|
||||
'<(idl_out_dir)/param_object_glue.cc',
|
||||
'<(idl_out_dir)/param_object_glue.h',
|
||||
'<(idl_out_dir)/param_operation_glue.cc',
|
||||
'<(idl_out_dir)/param_operation_glue.h',
|
||||
'<(idl_out_dir)/plugin_glue.cc',
|
||||
'<(idl_out_dir)/plugin_glue.h',
|
||||
'<(idl_out_dir)/primitive_glue.cc',
|
||||
'<(idl_out_dir)/primitive_glue.h',
|
||||
'<(idl_out_dir)/raw_data_glue.cc',
|
||||
'<(idl_out_dir)/raw_data_glue.h',
|
||||
'<(idl_out_dir)/ray_intersection_info_glue.cc',
|
||||
'<(idl_out_dir)/ray_intersection_info_glue.h',
|
||||
'<(idl_out_dir)/render_event_glue.cc',
|
||||
'<(idl_out_dir)/render_event_glue.h',
|
||||
'<(idl_out_dir)/render_node_glue.cc',
|
||||
'<(idl_out_dir)/render_node_glue.h',
|
||||
'<(idl_out_dir)/render_surface_glue.cc',
|
||||
'<(idl_out_dir)/render_surface_glue.h',
|
||||
'<(idl_out_dir)/render_surface_set_glue.cc',
|
||||
'<(idl_out_dir)/render_surface_set_glue.h',
|
||||
'<(idl_out_dir)/sampler_glue.cc',
|
||||
'<(idl_out_dir)/sampler_glue.h',
|
||||
'<(idl_out_dir)/shape_glue.cc',
|
||||
'<(idl_out_dir)/shape_glue.h',
|
||||
'<(idl_out_dir)/skin_glue.cc',
|
||||
'<(idl_out_dir)/skin_glue.h',
|
||||
'<(idl_out_dir)/standard_param_glue.cc',
|
||||
'<(idl_out_dir)/standard_param_glue.h',
|
||||
'<(idl_out_dir)/state_glue.cc',
|
||||
'<(idl_out_dir)/state_glue.h',
|
||||
'<(idl_out_dir)/state_set_glue.cc',
|
||||
'<(idl_out_dir)/state_set_glue.h',
|
||||
'<(idl_out_dir)/stream_bank_glue.cc',
|
||||
'<(idl_out_dir)/stream_bank_glue.h',
|
||||
'<(idl_out_dir)/stream_glue.cc',
|
||||
'<(idl_out_dir)/stream_glue.h',
|
||||
'<(idl_out_dir)/texture_glue.cc',
|
||||
'<(idl_out_dir)/texture_glue.h',
|
||||
'<(idl_out_dir)/tick_event_glue.cc',
|
||||
'<(idl_out_dir)/tick_event_glue.h',
|
||||
'<(idl_out_dir)/transform_glue.cc',
|
||||
'<(idl_out_dir)/transform_glue.h',
|
||||
'<(idl_out_dir)/tree_traversal_glue.cc',
|
||||
'<(idl_out_dir)/tree_traversal_glue.h',
|
||||
'<(idl_out_dir)/types_glue.cc',
|
||||
'<(idl_out_dir)/types_glue.h',
|
||||
'<(idl_out_dir)/vector_glue.cc',
|
||||
'<(idl_out_dir)/vector_glue.h',
|
||||
'<(idl_out_dir)/vertex_source_glue.cc',
|
||||
'<(idl_out_dir)/vertex_source_glue.h',
|
||||
'<(idl_out_dir)/viewport_glue.cc',
|
||||
'<(idl_out_dir)/viewport_glue.h',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
||||
'../../../<(npapidir)/include',
|
||||
'<(idl_out_dir)',
|
||||
'<(static_glue_dir)',
|
||||
],
|
||||
},
|
||||
'conditions': [
|
||||
['OS=="win"',
|
||||
{
|
||||
'defines': [
|
||||
'OS_WINDOWS',
|
||||
],
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
200
o3d/plugin/plugin.gyp
Normal file
200
o3d/plugin/plugin.gyp
Normal file
@ -0,0 +1,200 @@
|
||||
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
{
|
||||
'variables': {
|
||||
'chromium_code': 1,
|
||||
},
|
||||
'includes': [
|
||||
'../build/common.gypi',
|
||||
],
|
||||
'target_defaults': {
|
||||
'include_dirs': [
|
||||
'..',
|
||||
'../..',
|
||||
'../../<(gtestdir)',
|
||||
],
|
||||
'defines': [
|
||||
'O3D_PLUGIN_NAME="<!(python version_info.py --name)"',
|
||||
'O3D_PLUGIN_DESCRIPTION="<!(python version_info.py --description)"',
|
||||
'O3D_PLUGIN_MIME_TYPE="<!(python version_info.py --mimetype)"',
|
||||
],
|
||||
},
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'npo3dautoplugin',
|
||||
'type': 'shared_library',
|
||||
'dependencies': [
|
||||
'../../<(antlrdir)/antlr.gyp:antlr3c',
|
||||
'../../<(jpegdir)/libjpeg.gyp:libjpeg',
|
||||
'../../<(pngdir)/libpng.gyp:libpng',
|
||||
'../../<(zlibdir)/zlib.gyp:zlib',
|
||||
'../../base/base.gyp:base',
|
||||
'../../skia/skia.gyp:skia',
|
||||
'../../v8/tools/gyp/v8.gyp:v8',
|
||||
'../compiler/technique/technique.gyp:technique',
|
||||
'../core/core.gyp:o3dCore',
|
||||
'../core/core.gyp:o3dCorePlatform',
|
||||
'../import/import.gyp:o3dArchive',
|
||||
'../import/import.gyp:o3dImport',
|
||||
'../serializer/serializer.gyp:o3dSerializer',
|
||||
'../utils/utils.gyp:o3dUtils',
|
||||
'../build/nacl.gyp:build_nacl',
|
||||
'idl/idl.gyp:o3dPluginIdl',
|
||||
],
|
||||
'sources': [
|
||||
'cross/async_loading.cc',
|
||||
'cross/async_loading.h',
|
||||
'cross/blacklist.cc',
|
||||
'cross/config.h',
|
||||
'cross/config_common.cc',
|
||||
'cross/download_stream.h',
|
||||
'cross/main.cc',
|
||||
'cross/main.h',
|
||||
'cross/marshaling_utils.h',
|
||||
'cross/np_v8_bridge.cc',
|
||||
'cross/np_v8_bridge.h',
|
||||
'cross/out_of_memory.cc',
|
||||
'cross/out_of_memory.h',
|
||||
'cross/plugin_logging.h',
|
||||
'cross/plugin_main.h',
|
||||
'cross/stream_manager.cc',
|
||||
'cross/stream_manager.h',
|
||||
],
|
||||
'conditions' : [
|
||||
['OS != "linux"',
|
||||
{
|
||||
'dependencies': [
|
||||
'../statsreport/statsreport.gyp:o3dStatsReport',
|
||||
'add_version',
|
||||
'o3dPluginLogging',
|
||||
],
|
||||
},
|
||||
],
|
||||
['OS == "mac"',
|
||||
{
|
||||
'sources': [
|
||||
'mac/config_mac.mm',
|
||||
'mac/main_mac.mm',
|
||||
'mac/o3d_plugin.r',
|
||||
'mac/plugin_logging-mac.mm',
|
||||
'mac/plugin_mac.h',
|
||||
'mac/plugin_mac.mm',
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
['OS == "win"',
|
||||
{
|
||||
'dependencies': [
|
||||
'../breakpad/breakpad.gyp:o3dBreakpad',
|
||||
],
|
||||
'sources': [
|
||||
'win/config.cc',
|
||||
'win/logger_main.cc',
|
||||
'win/main_win.cc',
|
||||
'win/o3dPlugin.def',
|
||||
'win/o3dPlugin.rc',
|
||||
'win/plugin_logging-win32.cc',
|
||||
'win/resource.h',
|
||||
'win/update_lock.cc',
|
||||
'win/update_lock.h',
|
||||
],
|
||||
'msvs_settings': {
|
||||
'VCLinkerTool': {
|
||||
'AdditionalDependencies': [
|
||||
'"$(DXSDK_DIR)/Lib/x86/DxErr9.lib"',
|
||||
'"$(DXSDK_DIR)/Lib/x86/d3dx9.lib"',
|
||||
'../../<(cgdir)/lib/cg.lib',
|
||||
'../../<(cgdir)/lib/cgGL.lib',
|
||||
'd3d9.lib',
|
||||
'rpcrt4.lib',
|
||||
],
|
||||
# Set /SUBSYSTEM:CONSOLE for converter.exe, since
|
||||
# it is a console app.
|
||||
'SubSystem': '1',
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
],
|
||||
'conditions': [
|
||||
['OS != "linux"',
|
||||
{
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'o3dPluginLogging',
|
||||
'type': 'static_library',
|
||||
'conditions': [
|
||||
['OS=="win"',
|
||||
{
|
||||
'sources': [
|
||||
'win/plugin_metrics-win32.cc',
|
||||
'win/plugin_logging-win32.cc',
|
||||
],
|
||||
},
|
||||
],
|
||||
['OS=="mac"',
|
||||
{
|
||||
'sources': [
|
||||
'mac/plugin_metrics-mac.cc',
|
||||
'mac/plugin_logging-mac.mm',
|
||||
],
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'add_version',
|
||||
'type': 'none',
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'add_version',
|
||||
'inputs': [
|
||||
'version_info.py',
|
||||
],
|
||||
'conditions': [
|
||||
['OS=="win"',
|
||||
{
|
||||
'inputs': [
|
||||
'win/o3dPlugin.rc_template',
|
||||
],
|
||||
'outputs': [
|
||||
'win/o3dPlugin.rc'
|
||||
],
|
||||
'action': ['python',
|
||||
'version_info.py',
|
||||
'win/o3dPlugin.rc_template',
|
||||
'win/o3dPlugin.rc'],
|
||||
},
|
||||
],
|
||||
['OS=="mac"',
|
||||
{
|
||||
'inputs': [
|
||||
'mac/processed/Info.plist',
|
||||
],
|
||||
'outputs': [
|
||||
'mac/Info.plist',
|
||||
],
|
||||
'action': ['python',
|
||||
'version_info.py',
|
||||
'mac/processed/Info.plist',
|
||||
'mac/Info.plist'],
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
],
|
||||
}
|
130
o3d/plugin/version_info.py
Normal file
130
o3d/plugin/version_info.py
Normal file
@ -0,0 +1,130 @@
|
||||
#!/usr/bin/python2.4
|
||||
# Copyright 2009 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# This script does substitution on a list of files for
|
||||
# version-specific information relating to the plugin.
|
||||
|
||||
import os.path
|
||||
import re
|
||||
import sys
|
||||
|
||||
gflags_dir = os.path.join('..', '..', 'third_party', 'gflags', 'python')
|
||||
sys.path.append(gflags_dir)
|
||||
|
||||
import gflags
|
||||
|
||||
FLAGS = gflags.FLAGS
|
||||
gflags.DEFINE_boolean('kill_switch', False,
|
||||
'Generate version numbers for kill switch binary.')
|
||||
|
||||
gflags.DEFINE_boolean('name', False,
|
||||
'Print out the plugin name and exit.')
|
||||
|
||||
gflags.DEFINE_boolean('description', False,
|
||||
'Print out the plugin description and exit.')
|
||||
|
||||
gflags.DEFINE_boolean('mimetype', False,
|
||||
'Print out the plugin mime type and exit.')
|
||||
|
||||
gflags.DEFINE_boolean('version', False,
|
||||
'Print out the plugin version and exit.')
|
||||
|
||||
|
||||
def GetDotVersion(version):
|
||||
return '%d.%d.%d.%d' % version
|
||||
|
||||
def GetCommaVersion(version):
|
||||
return '%d,%d,%d,%d' % version
|
||||
|
||||
def DoReplace(in_filename, out_filename, replacements):
|
||||
'''Replace the version number in the given filename with the replacements.'''
|
||||
if not os.path.exists(in_filename):
|
||||
raise Exception(r'''Input template file %s doesn't exist.''' % file)
|
||||
input_file = open(in_filename, 'r')
|
||||
input = input_file.read()
|
||||
input_file.close()
|
||||
for (source, target) in replacements:
|
||||
input = re.sub(source, target, input)
|
||||
|
||||
output_file = open(out_filename, 'wb')
|
||||
output_file.write(input)
|
||||
output_file.close()
|
||||
|
||||
def main(argv):
|
||||
try:
|
||||
files = FLAGS(argv) # Parse flags
|
||||
except gflags.FlagsError, e:
|
||||
print '%s.\nUsage: %s [<options>] [<input_file> <output_file>]\n%s' % \
|
||||
(e, sys.argv[0], FLAGS)
|
||||
sys.exit(1)
|
||||
|
||||
# Strip off argv[0]
|
||||
files = files[1:]
|
||||
|
||||
# Get version string from o3d_version.py
|
||||
o3d_version_vars = {}
|
||||
if FLAGS.kill_switch:
|
||||
execfile('../installer/win/o3d_kill_version.py', o3d_version_vars)
|
||||
else:
|
||||
execfile('../installer/win/o3d_version.py', o3d_version_vars)
|
||||
|
||||
plugin_version = o3d_version_vars['plugin_version']
|
||||
sdk_version = o3d_version_vars['sdk_version']
|
||||
|
||||
# This name is used by Javascript to find the plugin therefore it must
|
||||
# not change. If you change this you must change the name in
|
||||
# samples/o3djs/util.js but be aware, changing the name
|
||||
# will break all apps that use o3d on the web.
|
||||
O3D_PLUGIN_NAME = 'O3D Plugin'
|
||||
O3D_PLUGIN_VERSION = GetDotVersion(plugin_version)
|
||||
O3D_PLUGIN_VERSION_COMMAS = GetCommaVersion(plugin_version)
|
||||
O3D_SDK_VERSION = GetDotVersion(sdk_version)
|
||||
O3D_SDK_VERSION_COMMAS = GetCommaVersion(sdk_version)
|
||||
O3D_PLUGIN_DESCRIPTION = '%s version:%s' % (O3D_PLUGIN_NAME,
|
||||
O3D_PLUGIN_VERSION)
|
||||
O3D_PLUGIN_MIME_TYPE = 'application/vnd.o3d.auto'
|
||||
|
||||
if FLAGS.name:
|
||||
print '%s' % O3D_PLUGIN_NAME
|
||||
sys.exit(0)
|
||||
|
||||
if FLAGS.description:
|
||||
print '%s' % O3D_PLUGIN_DESCRIPTION
|
||||
sys.exit(0)
|
||||
|
||||
if FLAGS.mimetype:
|
||||
print '%s' % O3D_PLUGIN_MIME_TYPE
|
||||
sys.exit(0)
|
||||
|
||||
if FLAGS.version:
|
||||
print '%s' % O3D_PLUGIN_VERSION
|
||||
sys.exit(0)
|
||||
|
||||
plugin_replace_strings = [
|
||||
('@@@PluginName@@@', O3D_PLUGIN_NAME),
|
||||
('@@@ProductVersionCommas@@@', O3D_PLUGIN_VERSION_COMMAS),
|
||||
('@@@ProductVersion@@@', O3D_PLUGIN_VERSION),
|
||||
('@@@PluginDescription@@@', O3D_PLUGIN_DESCRIPTION),
|
||||
('@@@PluginMimeType@@@', O3D_PLUGIN_MIME_TYPE),
|
||||
]
|
||||
|
||||
if len(files) == 2:
|
||||
DoReplace(files[0], files[1], plugin_replace_strings)
|
||||
elif len(files) > 0:
|
||||
raise Exception(r'You must supply and input and output filename for '
|
||||
r'replacement.')
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(sys.argv)
|
39
o3d/serializer/serializer.gyp
Normal file
39
o3d/serializer/serializer.gyp
Normal file
@ -0,0 +1,39 @@
|
||||
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
{
|
||||
'variables': {
|
||||
'chromium_code': 1,
|
||||
},
|
||||
'includes': [
|
||||
'../build/common.gypi',
|
||||
],
|
||||
'target_defaults': {
|
||||
'include_dirs': [
|
||||
'..',
|
||||
'../..',
|
||||
'../../<(gtestdir)',
|
||||
],
|
||||
},
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'o3dSerializer',
|
||||
'type': 'static_library',
|
||||
'sources': [
|
||||
'cross/serializer.cc',
|
||||
'cross/serializer.h',
|
||||
'cross/serializer_binary.cc',
|
||||
'cross/serializer_binary.h',
|
||||
'cross/version.h',
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'o3dSerializerTest',
|
||||
'type': 'static_library',
|
||||
'sources': [
|
||||
'cross/serializer_test.cc',
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
119
o3d/statsreport/statsreport.gyp
Normal file
119
o3d/statsreport/statsreport.gyp
Normal file
@ -0,0 +1,119 @@
|
||||
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
{
|
||||
'variables': {
|
||||
'chromium_code': 1,
|
||||
},
|
||||
'includes': [
|
||||
'../build/common.gypi',
|
||||
],
|
||||
'target_defaults': {
|
||||
'include_dirs': [
|
||||
'..',
|
||||
'../..',
|
||||
'../../<(gtestdir)',
|
||||
],
|
||||
},
|
||||
'targets': [],
|
||||
'conditions': [
|
||||
['OS!="linux"',
|
||||
{
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'o3dStatsReport',
|
||||
'type': 'static_library',
|
||||
'sources': [
|
||||
'aggregator-mac.h',
|
||||
'aggregator-mac.mm',
|
||||
'aggregator-win32.cc',
|
||||
'aggregator-win32.h',
|
||||
'aggregator.cc',
|
||||
'aggregator.h',
|
||||
'common/const_product.h',
|
||||
'common/highres_timer-linux.cc',
|
||||
'common/highres_timer-linux.h',
|
||||
'common/highres_timer-mac.cc',
|
||||
'common/highres_timer-mac.h',
|
||||
'common/highres_timer-win32.cc',
|
||||
'common/highres_timer-win32.h',
|
||||
'common/highres_timer.h',
|
||||
'const-mac.h',
|
||||
'const-mac.mm',
|
||||
'const-win32.cc',
|
||||
'const-win32.h',
|
||||
'const_server.h',
|
||||
'formatter.cc',
|
||||
'formatter.h',
|
||||
'lock.h',
|
||||
'metrics.cc',
|
||||
'metrics.h',
|
||||
'persistent_iterator-win32.cc',
|
||||
'persistent_iterator-win32.h',
|
||||
'uploader-mac.mm',
|
||||
'uploader-win32.cc',
|
||||
'uploader.h',
|
||||
'uploader_aggregation-mac.mm',
|
||||
'uploader_aggregation-win32.cc',
|
||||
'util-win32.h',
|
||||
],
|
||||
'conditions': [
|
||||
['OS != "win"',
|
||||
{
|
||||
'sources/': [
|
||||
['exclude', '(-win32)\.(cc|h)$'],
|
||||
],
|
||||
},
|
||||
],
|
||||
['OS != "linux"',
|
||||
{
|
||||
'sources/': [
|
||||
['exclude', '(-linux)\.(cc|h)$'],
|
||||
],
|
||||
},
|
||||
],
|
||||
['OS != "mac"',
|
||||
{
|
||||
'sources/': [
|
||||
['exclude', '(-mac)\.(cc|mm|h)$'],
|
||||
],
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'o3dStatsReportTest',
|
||||
'type': 'static_library',
|
||||
'sources': [
|
||||
'aggregator-win32_unittest.cc',
|
||||
'aggregator-win32_unittest.h',
|
||||
'aggregator_unittest.cc',
|
||||
'aggregator_unittest.h',
|
||||
'common/highres_timer_unittest.cc',
|
||||
'formatter_unittest.cc',
|
||||
'metrics_unittest.cc',
|
||||
'persistent_iterator-win32_unittest.cc',
|
||||
],
|
||||
'conditions': [
|
||||
['OS != "win"',
|
||||
{
|
||||
'sources/': [
|
||||
['exclude', '(-win32)_unittest\.(cc|h)$'],
|
||||
],
|
||||
},
|
||||
],
|
||||
['OS != "mac"',
|
||||
{
|
||||
'sources/': [
|
||||
['exclude', '(-mac)_unittest\.(cc|mm|h)$'],
|
||||
],
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
],
|
||||
}
|
58
o3d/utils/utils.gyp
Normal file
58
o3d/utils/utils.gyp
Normal file
@ -0,0 +1,58 @@
|
||||
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
{
|
||||
'variables': {
|
||||
'chromium_code': 1,
|
||||
},
|
||||
'includes': [
|
||||
'../build/common.gypi',
|
||||
],
|
||||
'target_defaults': {
|
||||
'include_dirs': [
|
||||
'..',
|
||||
'../..',
|
||||
'../../<(gtestdir)',
|
||||
],
|
||||
},
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'o3dUtils',
|
||||
'type': 'static_library',
|
||||
'sources': [
|
||||
"cross/file_path_utils.cc",
|
||||
"cross/file_path_utils.h",
|
||||
"cross/file_text_reader.cc",
|
||||
"cross/file_text_reader.h",
|
||||
"cross/file_text_writer.cc",
|
||||
"cross/file_text_writer.h",
|
||||
"cross/json_writer.cc",
|
||||
"cross/json_writer.h",
|
||||
"cross/string_reader.cc",
|
||||
"cross/string_reader.h",
|
||||
"cross/string_writer.cc",
|
||||
"cross/string_writer.h",
|
||||
"cross/structured_writer.h",
|
||||
"cross/temporary_file.cc",
|
||||
"cross/temporary_file.h",
|
||||
"cross/text_reader.cc",
|
||||
"cross/text_reader.h",
|
||||
"cross/text_writer.cc",
|
||||
"cross/text_writer.h",
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'o3dUtilsTest',
|
||||
'type': 'static_library',
|
||||
'sources': [
|
||||
"cross/file_path_utils_test.cc",
|
||||
"cross/file_text_reader_test.cc",
|
||||
"cross/json_writer_test.cc",
|
||||
"cross/string_reader_test.cc",
|
||||
"cross/string_writer_test.cc",
|
||||
"cross/temporary_file_test.cc",
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
Reference in New Issue
Block a user