From a1deefe8c869a7944c0419091ec45620af9b515c Mon Sep 17 00:00:00 2001 From: "tschmelcher@chromium.org" Date: Mon, 12 Jul 2010 23:56:55 +0000 Subject: Parameterize the name of the "O3DExtras" directory with a GYP variable (to allow side-by-side installs of differently-branded builds that both include the extras directory). Also move the branding.gypi and version.gypi files from plugin/ to build/, which is a more sensible location. Also delete an extraneous definition of plugin_enable_fullscreen_msg from core.gyp (it's already in common.gypi). TEST=built on Windows, both with and without plugin_extras_directory specified BUG=none Review URL: http://codereview.chromium.org/2893011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52153 0039d316-1c4b-4281-b951-d872f2087c98 --- o3d/breakpad/breakpad.gyp | 2 +- o3d/build/branding.gypi | 23 +++++++++++++++++++++++ o3d/build/version.gypi | 9 +++++++++ o3d/core/core.gyp | 13 +++---------- o3d/core/win/d3d9/install_check.cc | 7 +++++-- o3d/installer/installer.gyp | 2 +- o3d/installer/linux/debian.in/debian.gyp | 2 +- o3d/installer/mac/installer.gyp | 2 +- o3d/installer/win/installer.gyp | 2 +- o3d/plugin/branding.gypi | 22 ---------------------- o3d/plugin/plugin.gyp | 4 ++-- o3d/plugin/version.gypi | 9 --------- 12 files changed, 47 insertions(+), 50 deletions(-) create mode 100644 o3d/build/branding.gypi create mode 100644 o3d/build/version.gypi delete mode 100644 o3d/plugin/branding.gypi delete mode 100644 o3d/plugin/version.gypi diff --git a/o3d/breakpad/breakpad.gyp b/o3d/breakpad/breakpad.gyp index 9623efd..7099432 100644 --- a/o3d/breakpad/breakpad.gyp +++ b/o3d/breakpad/breakpad.gyp @@ -7,8 +7,8 @@ 'chromium_code': 1, }, 'includes': [ + '../build/branding.gypi', '../build/common.gypi', - '../plugin/branding.gypi', ], 'target_defaults': { 'include_dirs': [ diff --git a/o3d/build/branding.gypi b/o3d/build/branding.gypi new file mode 100644 index 0000000..4102fb6 --- /dev/null +++ b/o3d/build/branding.gypi @@ -0,0 +1,23 @@ +# Copyright (c) 2010 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': { + # Default identity. Can be overridden to allow making custom + # plugins based on O3D, but they will not work with regular O3D apps. + 'plugin_name%': 'O3D Plugin', + 'plugin_npapi_filename%': 'npo3dautoplugin', + 'plugin_npapi_mimetype%': 'application/vnd.o3d.auto', + 'plugin_activex_hostcontrol_clsid%': '9666A772-407E-4F90-BC37-982E8160EB2D', + 'plugin_activex_typelib_clsid%': 'D4F6E31C-E952-48FE-9833-6AE308BD79C6', + 'plugin_activex_hostcontrol_name%': 'o3d_host', + 'plugin_activex_typelib_name%': 'npapi_host2', + 'plugin_installdir_csidl%': 'CSIDL_APPDATA', + 'plugin_vendor_directory%': 'Google', + 'plugin_product_directory%': 'O3D', + 'plugin_extras_directory%': 'O3DExtras', + # You must set this to 1 if changing any of the above. + 'plugin_rebranded%': '0', + } +} diff --git a/o3d/build/version.gypi b/o3d/build/version.gypi new file mode 100644 index 0000000..2c57d45 --- /dev/null +++ b/o3d/build/version.gypi @@ -0,0 +1,9 @@ +# Copyright (c) 2010 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': { + 'plugin_version': '0.1.43.3', + } +} diff --git a/o3d/core/core.gyp b/o3d/core/core.gyp index 9b4237c..f7df445 100644 --- a/o3d/core/core.gyp +++ b/o3d/core/core.gyp @@ -5,12 +5,11 @@ { 'variables': { 'chromium_code': 1, - # Whether to enable the English-only, Win/Mac-only fullscreen message. - 'plugin_enable_fullscreen_msg%': '1', }, 'includes': [ + '../build/branding.gypi', '../build/common.gypi', - '../plugin/version.gypi', + '../build/version.gypi', ], 'target_defaults': { 'include_dirs': [ @@ -24,15 +23,9 @@ ], 'defines': [ 'O3D_PLUGIN_VERSION="<(plugin_version)"', + 'O3D_PLUGIN_EXTRAS_DIRECTORY="<(plugin_extras_directory)"', ], 'conditions': [ - ['<(plugin_enable_fullscreen_msg) != 0', - { - 'defines': [ - 'O3D_PLUGIN_ENABLE_FULLSCREEN_MSG=1', - ], - }, - ], ['OS == "win"', { 'msvs_settings': { diff --git a/o3d/core/win/d3d9/install_check.cc b/o3d/core/win/d3d9/install_check.cc index 6dfd157..dce002e 100644 --- a/o3d/core/win/d3d9/install_check.cc +++ b/o3d/core/win/d3d9/install_check.cc @@ -105,7 +105,8 @@ bool D3DX9InstallCheck(std::string* error) { return false; } - if (!PathAppend(dll_path.get(), _T("O3DExtras\\d3dx9_36.dll"))) { + if (!PathAppend(dll_path.get(), + _T(O3D_PLUGIN_EXTRAS_DIRECTORY) _T("\\d3dx9_36.dll"))) { *error = "Failed to compute location of d3dx9_36.dll."; return false; } @@ -215,7 +216,9 @@ bool D3D9SoftwareInstallCheck(std::string* error) { return false; } - if (!PathAppend(dll_path.get(), _T("O3DExtras\\swiftshader_d3d9.dll"))) { + if (!PathAppend(dll_path.get(), + _T(O3D_PLUGIN_EXTRAS_DIRECTORY) + _T("\\swiftshader_d3d9.dll"))) { *error = "Failed to compute new software renderer location."; return false; } diff --git a/o3d/installer/installer.gyp b/o3d/installer/installer.gyp index 4361d65..dba0f4d 100644 --- a/o3d/installer/installer.gyp +++ b/o3d/installer/installer.gyp @@ -7,8 +7,8 @@ 'chromium_code': 1, }, 'includes': [ + '../build/branding.gypi', '../build/common.gypi', - '../plugin/branding.gypi', ], 'targets': [ { diff --git a/o3d/installer/linux/debian.in/debian.gyp b/o3d/installer/linux/debian.in/debian.gyp index 614e311..63846ac 100644 --- a/o3d/installer/linux/debian.in/debian.gyp +++ b/o3d/installer/linux/debian.in/debian.gyp @@ -5,7 +5,7 @@ { 'includes': [ '../../../build/common.gypi', - '../../../plugin/version.gypi', + '../../../build/version.gypi', ], 'variables': { 'INSTALLER_DIR': '<(PRODUCT_DIR)/installer', diff --git a/o3d/installer/mac/installer.gyp b/o3d/installer/mac/installer.gyp index 7e41527..7ff46bf 100644 --- a/o3d/installer/mac/installer.gyp +++ b/o3d/installer/mac/installer.gyp @@ -8,7 +8,7 @@ }, 'includes': [ '../../build/common.gypi', - '../../plugin/version.gypi', + '../../build/version.gypi', ], 'targets': [ { diff --git a/o3d/installer/win/installer.gyp b/o3d/installer/win/installer.gyp index 9246aa7..0f100d3 100644 --- a/o3d/installer/win/installer.gyp +++ b/o3d/installer/win/installer.gyp @@ -34,7 +34,7 @@ }, 'includes': [ '../../build/common.gypi', - '../../plugin/version.gypi', + '../../build/version.gypi', ], 'targets': [ { diff --git a/o3d/plugin/branding.gypi b/o3d/plugin/branding.gypi deleted file mode 100644 index 93335c8..0000000 --- a/o3d/plugin/branding.gypi +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2010 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': { - # Default identity. Can be overridden to allow making custom - # plugins based on O3D, but they will not work with regular O3D apps. - 'plugin_name%': 'O3D Plugin', - 'plugin_npapi_filename%': 'npo3dautoplugin', - 'plugin_npapi_mimetype%': 'application/vnd.o3d.auto', - 'plugin_activex_hostcontrol_clsid%': '9666A772-407E-4F90-BC37-982E8160EB2D', - 'plugin_activex_typelib_clsid%': 'D4F6E31C-E952-48FE-9833-6AE308BD79C6', - 'plugin_activex_hostcontrol_name%': 'o3d_host', - 'plugin_activex_typelib_name%': 'npapi_host2', - 'plugin_installdir_csidl%': 'CSIDL_APPDATA', - 'plugin_vendor_directory%': 'Google', - 'plugin_product_directory%': 'O3D', - # You must set this to 1 if changing any of the above. - 'plugin_rebranded%': '0', - } -} diff --git a/o3d/plugin/plugin.gyp b/o3d/plugin/plugin.gyp index f43511a..9914c10 100644 --- a/o3d/plugin/plugin.gyp +++ b/o3d/plugin/plugin.gyp @@ -60,9 +60,9 @@ 'plugin_domain_whitelist%': '', }, 'includes': [ + '../build/branding.gypi', '../build/common.gypi', - 'branding.gypi', - 'version.gypi', + '../build/version.gypi', ], 'target_defaults': { 'include_dirs': [ diff --git a/o3d/plugin/version.gypi b/o3d/plugin/version.gypi deleted file mode 100644 index 2c57d45..0000000 --- a/o3d/plugin/version.gypi +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2010 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': { - 'plugin_version': '0.1.43.3', - } -} -- cgit v1.1