summaryrefslogtreecommitdiffstats
path: root/o3d
diff options
context:
space:
mode:
authorgspencer@google.com <gspencer@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-06 22:17:39 +0000
committergspencer@google.com <gspencer@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-06 22:17:39 +0000
commit6a60ae4c2967bae910cbd1a1ff5a53c5f7d78a19 (patch)
treeac02524310011c60f7d4f5255f1df5b592b4ca5c /o3d
parent05c453db1e7a357eb2cc1b6ac67ff32a5256bb19 (diff)
downloadchromium_src-6a60ae4c2967bae910cbd1a1ff5a53c5f7d78a19.zip
chromium_src-6a60ae4c2967bae910cbd1a1ff5a53c5f7d78a19.tar.gz
chromium_src-6a60ae4c2967bae910cbd1a1ff5a53c5f7d78a19.tar.bz2
This completes the building of o3d.msi from the GYP build.
Review URL: http://codereview.chromium.org/164044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22680 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rw-r--r--o3d/DEPS_gyp12
-rw-r--r--o3d/build/all.gyp1
-rw-r--r--o3d/build/common.gypi2
-rw-r--r--o3d/core/cross/bitmap.cc4
-rw-r--r--o3d/core/cross/image_utils.cc5
-rw-r--r--o3d/google_update/google_update.gyp26
-rw-r--r--o3d/installer/installer.gyp42
-rw-r--r--o3d/installer/win/build.scons35
-rw-r--r--o3d/installer/win/custom_actions.cc1
-rw-r--r--o3d/installer/win/installer.gyp302
-rw-r--r--o3d/installer/win/o3d.wxs (renamed from o3d/installer/win/o3d_plugin.wxs)2
-rw-r--r--o3d/installer/win/o3dextras.wxs (renamed from o3d/installer/win/o3d_extras.wxs)0
-rw-r--r--o3d/plugin/idl/codegen.py4
-rw-r--r--o3d/plugin/plugin.gyp4
-rw-r--r--o3d/plugin/version_info.py17
15 files changed, 422 insertions, 35 deletions
diff --git a/o3d/DEPS_gyp b/o3d/DEPS_gyp
index a68b921..950f915 100644
--- a/o3d/DEPS_gyp
+++ b/o3d/DEPS_gyp
@@ -1,10 +1,10 @@
vars = {
"chromium_trunk": "http://src.chromium.org/svn/trunk",
"nixysa_rev": "29",
- "chromium_rev": "21287",
- "o3d_code_rev": "109",
+ "chromium_rev": "22547",
+ "o3d_code_rev": "113",
"skia_rev": "279",
- "gyp_rev": "563",
+ "gyp_rev": "579",
"gtest_rev": "267",
"gflags_rev": "30",
"breakpad_rev": "346",
@@ -43,9 +43,6 @@ deps = {
"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"),
@@ -127,6 +124,9 @@ deps = {
deps_os = {
"win": {
+ "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/cygwin":
"/trunk/deps/third_party/cygwin@11984",
diff --git a/o3d/build/all.gyp b/o3d/build/all.gyp
index 775dc0b..2148a6d 100644
--- a/o3d/build/all.gyp
+++ b/o3d/build/all.gyp
@@ -24,6 +24,7 @@
'../documentation/documentation.gyp:*',
'../import/archive.gyp:o3dArchive',
'../import/import.gyp:o3dImport',
+ '../installer/installer.gyp:installer',
'../plugin/idl/idl.gyp:o3dPluginIdl',
'../plugin/plugin.gyp:add_version',
'../plugin/plugin.gyp:npo3dautoplugin',
diff --git a/o3d/build/common.gypi b/o3d/build/common.gypi
index c386319..108ccd86 100644
--- a/o3d/build/common.gypi
+++ b/o3d/build/common.gypi
@@ -32,6 +32,7 @@
'variables': {
'renderer': 'd3d9',
'cgdir': 'third_party/cg/files/win',
+ 'swiftshaderdir': 'o3d-internal/third_party/swiftshader/files',
'LIBRARY_SUFFIX': '.lib',
'CONFIGURATION': '$(ConfigurationName)',
},
@@ -43,6 +44,7 @@
'UNICODE',
'NACL_WINDOWS',
],
+ # Disable warning: "'this' : used in base member initialization list."
'msvs_disabled_warnings': [4355],
'msvs_settings': {
'VCCLCompilerTool': {
diff --git a/o3d/core/cross/bitmap.cc b/o3d/core/cross/bitmap.cc
index e44f5d9..8069451 100644
--- a/o3d/core/cross/bitmap.cc
+++ b/o3d/core/cross/bitmap.cc
@@ -403,11 +403,11 @@ void Bitmap::DrawImage(const Bitmap& src_img,
void Bitmap::GenerateMips(int source_level, int num_levels) {
- if (source_level >= num_mipmaps() || source_level < 0) {
+ if (source_level >= static_cast<int>(num_mipmaps()) || source_level < 0) {
O3D_ERROR(service_locator()) << "source level out of range.";
return;
}
- if (source_level + num_levels >= num_mipmaps() || num_levels < 0) {
+ if (source_level + num_levels >= static_cast<int>(num_mipmaps()) || num_levels < 0) {
O3D_ERROR(service_locator()) << "num levels out of range.";
return;
}
diff --git a/o3d/core/cross/image_utils.cc b/o3d/core/cross/image_utils.cc
index a9d4112..6d990b8 100644
--- a/o3d/core/cross/image_utils.cc
+++ b/o3d/core/cross/image_utils.cc
@@ -418,8 +418,8 @@ void FilterTexel(unsigned int x,
DCHECK_LE(dst_height, src_height);
DCHECK_LE(x, dst_width);
DCHECK_LE(y, dst_height);
- DCHECK_LE(src_width, src_pitch);
- DCHECK_LE(dst_width, dst_pitch);
+ DCHECK_LE(static_cast<int>(src_width), src_pitch);
+ DCHECK_LE(static_cast<int>(dst_width), dst_pitch);
src_pitch /= components;
dst_pitch /= components;
@@ -625,6 +625,7 @@ bool GenerateMipmap(unsigned int src_width,
}
}
}
+ return true;
}
ImageFileType GetFileTypeFromFilename(const char *filename) {
diff --git a/o3d/google_update/google_update.gyp b/o3d/google_update/google_update.gyp
new file mode 100644
index 0000000..8c013db
--- /dev/null
+++ b/o3d/google_update/google_update.gyp
@@ -0,0 +1,26 @@
+# 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',
+ ],
+ 'targets': [
+ {
+ 'target_name': 'getextras',
+ 'type': 'executable',
+ 'include_dirs': [
+ '..',
+ '<(INTERMEDIATE_DIR)',
+ ],
+ 'sources': [
+ 'google_update_idl.idl',
+ 'performondemand.cc',
+ ],
+ },
+ ],
+}
diff --git a/o3d/installer/installer.gyp b/o3d/installer/installer.gyp
new file mode 100644
index 0000000..426d153
--- /dev/null
+++ b/o3d/installer/installer.gyp
@@ -0,0 +1,42 @@
+# 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',
+ ],
+ 'targets': [
+ {
+ 'target_name': 'installer',
+ 'type': 'none',
+ 'conditions': [
+ ['OS=="win"',
+ {
+ 'dependencies': [
+ 'win/installer.gyp:installer',
+ 'win/installer.gyp:extras_installer',
+ ],
+ },
+ ],
+ ['OS=="mac"',
+ {
+ 'dependencies': [
+ 'mac/installer.gyp:installer',
+ ],
+ },
+ ],
+ ['OS=="unix"',
+ {
+ 'dependencies': [
+ 'linux/installer.gyp:installer',
+ ],
+ },
+ ],
+ ],
+ },
+ ],
+}
diff --git a/o3d/installer/win/build.scons b/o3d/installer/win/build.scons
index 29f72a8..8f05cc8 100644
--- a/o3d/installer/win/build.scons
+++ b/o3d/installer/win/build.scons
@@ -165,6 +165,7 @@ docs_path = env.File('$SCONSTRUCT_DIR/installer/win/docs.url')
rep_path = env.File('$ARTIFACTS_DIR/reporter.exe')
dbl_path = env.File('$SCONSTRUCT_DIR/installer/win/driver_blacklist.txt')
get_extras_path = env.File('$ARTIFACTS_DIR/getextras.exe')
+custom_actions_path = env.File('$ARTIFACTS_DIR/cactions.dll')
# Tell wix to include the software renderer IFF it's there.
software_renderer_path = \
@@ -176,32 +177,33 @@ cactions_dll_path = env.File('$ARTIFACTS_DIR/cactions.dll')
# Pass flags to the wix compiler.
env.Append(WIXCANDLEFLAGS = [
- '-dNppProductGuid=' + o3d_npp_product_guid,
- '-dNppVersion=' + dotnppversion,
+ '-dCustomActionsPath=' + custom_actions_path,
+ '-dD3DXGuid=' + d3dx_guid,
+ '-dDBLGuid=' + o3d_driver_blacklist_guid,
+ '-dDBLPath=' + dbl_path.abspath,
'-dDeprecatedUpgradeCode=' + bad_old_o3d_upgrade_code,
- '-dNppUpgradeCode=' + o3d_npp_upgrade_code,
- '-dNppPackageGuid=' + o3d_npp_package_guid,
- '-dNppComponentGuid=' + o3d_npp_component_guid,
- '-dSoftwareRendererGuid=' + o3d_software_renderer_guid,
- '-dSoftwareRendererPath=' + software_renderer_path,
- '-dIncludeSoftwareRenderer=%s' % include_software_renderer,
- '-dNPPluginPath=' + npplugin_path.abspath,
+ '-dGetExtrasGuid=' + o3d_get_extras_guid,
+ '-dGetExtrasPath=' + get_extras_path.abspath,
'-dIEPluginPath=' + ieplugin_path.abspath,
'-dIepComponentGuid=' + o3d_iep_component_guid,
- '-dD3DXGuid=' + d3dx_guid,
+ '-dIncludeSoftwareRenderer=%s' % include_software_renderer,
+ '-dNPPluginPath=' + npplugin_path.abspath,
+ '-dNppComponentGuid=' + o3d_npp_component_guid,
'-dNppGoogleUpdateRegGuid=' + o3d_npp_google_update_reg_component_guid,
'-dNppGoogleUpdateRegKey=' + o3d_npp_reg_key,
'-dNppGoogleUpdateStateRegKey=' + o3d_npp_state_reg_key,
+ '-dNppPackageGuid=' + o3d_npp_package_guid,
+ '-dNppProductGuid=' + o3d_npp_product_guid,
+ '-dNppUpgradeCode=' + o3d_npp_upgrade_code,
+ '-dNppVersion=' + dotnppversion,
'-dRepGuid=' + o3d_reporter_guid,
- '-dDBLGuid=' + o3d_driver_blacklist_guid,
'-dRepPath=' + rep_path.abspath,
- '-dDBLPath=' + dbl_path.abspath,
- '-dGetExtrasGuid=' + o3d_get_extras_guid,
- '-dGetExtrasPath=' + get_extras_path.abspath,
+ '-dSoftwareRendererGuid=' + o3d_software_renderer_guid,
+ '-dSoftwareRendererPath=' + software_renderer_path,
])
# Build installer
-installer_msi = env.WiX('o3d.msi', ['o3d_plugin.wxs'])
+installer_msi = env.WiX('o3d.msi', ['o3d.wxs'])
# Make sure that the plugin dll has been built before building the installer.
# Make sure that the custom action dll has been built before building the
@@ -238,8 +240,7 @@ if os.path.exists(dx_redist_path.abspath):
])
# Build the installer
- extras_msi = env.WiX('o3dextras.msi', ['o3d_extras.wxs'])
+ extras_msi = env.WiX('o3dextras.msi', ['o3dextras.wxs'])
# copy to artifacts
env.Replicate('$ARTIFACTS_DIR', extras_msi)
-
diff --git a/o3d/installer/win/custom_actions.cc b/o3d/installer/win/custom_actions.cc
index 658d5b7..0f57d95 100644
--- a/o3d/installer/win/custom_actions.cc
+++ b/o3d/installer/win/custom_actions.cc
@@ -247,6 +247,7 @@ HRESULT SetCustomUpdateError(MSIHANDLE installer_handle,
return hr;
}
}
+ return S_OK;
}
// Check whether DirectX version 9.0c or higher is installed and
diff --git a/o3d/installer/win/installer.gyp b/o3d/installer/win/installer.gyp
new file mode 100644
index 0000000..9ea9145
--- /dev/null
+++ b/o3d/installer/win/installer.gyp
@@ -0,0 +1,302 @@
+# 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,
+ 'wixdir': 'third_party\\wix_2_0_4221\\files',
+ 'dx_redist_path': '../../../o3d-internal/third_party/dx_nov_2007_redist',
+ 'dx_redist_exists': '<!(python ../../build/file_exists.py ../../../o3d-internal/third_party/dx_nov_2007_redist/d3dx9_36.dll)',
+ 'guidgen': '..\\..\\nbguidgen\\win\\nbguidgen.exe',
+ 'nppversion': '<!(python ../../plugin/version_info.py --commaversion)',
+ 'dotnppversion': '<!(python ../../plugin/version_info.py --version)',
+
+ # Unique guid for o3d namespace
+ 'o3d_namespace_guid': 'B445DBAE-F5F9-435A-9A9B-088261CDF00A',
+
+ # Changing the following values would break upgrade paths, so we hard-code the
+ # values instead of generating them.
+ 'bad_old_o3d_upgrade_code': 'dc819ed6-4155-3cff-b580-45626aed5848',
+ 'o3d_extras_google_update_guid': '{34B2805D-C72C-4f81-AED5-5A22D1E092F1}',
+ 'o3d_extras_upgrade_code': 'c271f2f0-c7ad-3bc9-8216-211436aa2244',
+ 'o3d_npp_google_update_guid': '{70308795-045C-42da-8F4E-D452381A7459}',
+ 'o3d_npp_upgrade_code': '0f098121-2876-3c23-bd4c-501220ecbb42',
+
+ # We don't actually want the extras version to update by itself;
+ # it should change only when we actually add something to the
+ # installer or change the d3dx9 version. This version is
+ # therefore independent of the o3d plugin and sdk versions.
+ 'extrasversion': '0,1,1,0',
+ 'dotextrasversion': '0.1.1.0',
+
+ # Registry paths for Google Update
+ 'google_update_reg_path': 'Software\\Google\\Update\\Clients\\',
+ 'google_update_state_reg_path': 'Software\\Google\\Update\\ClientState\\',
+ },
+ 'includes': [
+ '../../build/common.gypi',
+ ],
+ 'targets': [
+ {
+ 'target_name': 'cactions',
+ 'type': 'shared_library',
+ 'sources': [
+ 'custom_actions.cc',
+ ],
+ 'include_dirs': [
+ '$(DXSDK_DIR)/Include',
+ '../..',
+ '../../..',
+ '<(INTERMEDIATE_DIR)',
+ ],
+ 'defines': [
+ 'NOMINMAX',
+ 'WIN32',
+ 'WIN32_LEAN_AND_MEAN',
+ '_ATL_SECURE_NO_WARNINGS',
+ '_CRT_SECURE_NO_DEPRECATE',
+ '_UNICODE', # turn on unicode
+ '_WIN32_WINNT=0x0600',
+ '_WINDOWS',
+ ],
+ 'libraries': [
+ '-ladvapi32.lib',
+ '"$(DXSDK_DIR)/Lib/x86/dxguid.lib"',
+ '-lmsi.lib',
+ '-lole32.lib',
+ '-loleaut32.lib',
+ '-lshell32.lib',
+ '-lshlwapi.lib',
+ '-luser32.lib',
+ ],
+ # Disable the #pragma deprecated warning because
+ # ATL seems to use deprecated CRT libs.
+ 'msvs_disabled_warnings': [4995],
+ 'msvs_configuration_attributes': {
+ 'UseOfATL': '1', # 1 = static link to ATL, 2 = dynamic link
+ },
+ 'copies': [
+ {
+ 'destination': '<(PRODUCT_DIR)',
+ 'files': [
+ 'cactions.dll',
+ ],
+ },
+ ],
+ },
+ {
+ 'target_name': 'installer',
+ 'type': 'none',
+ 'variables': {
+ 'candle_exe': '../../../<(wixdir)/candle.exe',
+ 'light_exe': '../../../<(wixdir)/light.exe',
+ 'custom_actions_path': '<(PRODUCT_DIR)/cactions.dll',
+ 'd3dx_guid': '<!(<(guidgen) <(o3d_namespace_guid) d3dx-<(nppversion))',
+ 'dbl_path': '../../installer/win/driver_blacklist.txt',
+ 'dx_redist_guid': '<!(<(guidgen) <(o3d_namespace_guid) '
+ 'dx_redist-<(nppversion))',
+ 'get_extras_path': '<(PRODUCT_DIR)/getextras.exe',
+ 'ieplugin_path': '<(PRODUCT_DIR)/o3d_host.dll',
+ 'include_software_renderer':
+ '<!(python ../../build/file_exists.py '
+ '../../../<(swiftshaderdir)/swiftshader_d3d9.dll)',
+ 'npplugin_path': '<(PRODUCT_DIR)/npo3dautoplugin.dll',
+ 'o3d_driver_blacklist_guid': '<!(<(guidgen) <(o3d_namespace_guid) '
+ 'o3d_driver_blacklist-<(nppversion))',
+ 'o3d_get_extras_guid':
+ '<!(<(guidgen) <(o3d_namespace_guid) extras_installer-)',
+ 'o3d_iep_component_guid': '<!(<(guidgen) <(o3d_namespace_guid) '
+ 'o3d_ieplugin_component-<(nppversion))',
+ 'o3d_npp_component_guid': '<!(<(guidgen) <(o3d_namespace_guid) '
+ 'o3d_npplugin_component-<(nppversion))',
+ 'o3d_npp_google_update_reg_component_guid':
+ '<!(<(guidgen) <(o3d_namespace_guid) '
+ 'o3d_user_google_update_reg_component-<(nppversion))',
+ 'o3d_npp_package_guid': '<!(<(guidgen) <(o3d_namespace_guid) o3d_package-<(nppversion))',
+ 'o3d_npp_product_guid': '<!(<(guidgen) <(o3d_namespace_guid) o3d_product-<(nppversion))',
+ 'o3d_npp_reg_key':
+ '<(google_update_reg_path)<(o3d_npp_google_update_guid)',
+ 'o3d_npp_state_reg_key':
+ '<(google_update_state_reg_path)<(o3d_npp_google_update_guid)',
+ 'o3d_reporter_guid':
+ '<!(<(guidgen) <(o3d_namespace_guid) o3d_reporter-<(nppversion))',
+ 'o3d_software_renderer_guid': '<!(<(guidgen) <(o3d_namespace_guid) '
+ 'o3d_software_renderer-<(nppversion))',
+ 'rep_path': '<(PRODUCT_DIR)/reporter.exe',
+ 'software_renderer_path':
+ '../../../<(swiftshaderdir)/swiftshader_d3d9.dll',
+ },
+ 'dependencies': [
+ '../../converter/converter.gyp:o3dConverter',
+ '../../breakpad/breakpad.gyp:reporter',
+ '../../google_update/google_update.gyp:getextras',
+ '../../documentation/documentation.gyp:*',
+ '../../plugin/plugin.gyp:npo3dautoplugin',
+ '../../plugin/plugin.gyp:o3d_host',
+ '../../samples/samples.gyp:samples',
+ 'cactions',
+ ],
+ 'rules': [
+ {
+ 'rule_name': 'candle',
+ 'extension': 'wxs',
+ 'process_outputs_as_sources': 1,
+ 'inputs': [
+ '<(candle_exe)',
+ '../../installer/win/docs.url',
+ '<(PRODUCT_DIR)/cactions.dll',
+ '<(PRODUCT_DIR)/cg.dll',
+ '<(PRODUCT_DIR)/cgGL.dll',
+ '<(PRODUCT_DIR)/cgc.exe',
+ '<(PRODUCT_DIR)/o3dConditioner.exe',
+ '<(dbl_path)',
+ '<(get_extras_path)',
+ '<(ieplugin_path)',
+ '<(npplugin_path)',
+ '<(rep_path)',
+ ],
+ 'outputs': [
+ '<(RULE_INPUT_ROOT).wixobj',
+ ],
+ 'action': [
+ '<(candle_exe)',
+ '-nologo',
+ '-dCustomActionsPath=<(custom_actions_path)',
+ '-dD3DXGuid=<(d3dx_guid)',
+ '-dDBLGuid=<(o3d_driver_blacklist_guid)',
+ '-dDBLPath=<(dbl_path)',
+ '-dDeprecatedUpgradeCode=<(bad_old_o3d_upgrade_code)',
+ '-dGetExtrasGuid=<(o3d_get_extras_guid)',
+ '-dGetExtrasPath=<(get_extras_path)',
+ '-dIEPluginPath=<(ieplugin_path)',
+ '-dIepComponentGuid=<(o3d_iep_component_guid)',
+ '-dIncludeSoftwareRenderer=include_software_renderer',
+ '-dNPPluginPath=<(npplugin_path)',
+ '-dNppComponentGuid=<(o3d_npp_component_guid)',
+ '-dNppGoogleUpdateRegGuid=<(o3d_npp_google_update_reg_component_guid)',
+ '-dNppGoogleUpdateRegKey=<(o3d_npp_reg_key)',
+ '-dNppGoogleUpdateStateRegKey=<(o3d_npp_state_reg_key)',
+ '-dNppPackageGuid=<(o3d_npp_package_guid)',
+ '-dNppProductGuid=<(o3d_npp_product_guid)',
+ '-dNppUpgradeCode=<(o3d_npp_upgrade_code)',
+ '-dNppVersion=<(dotnppversion)',
+ '-dRepGuid=<(o3d_reporter_guid)',
+ '-dRepPath=<(rep_path)',
+ '-dSoftwareRendererGuid=<(o3d_software_renderer_guid)',
+ '-dSoftwareRendererPath=<(software_renderer_path)',
+ '-o',
+ '<(RULE_INPUT_ROOT).wixobj',
+ '<(RULE_INPUT_PATH)',
+ ],
+ 'message': 'Generating installer from <(RULE_INPUT_PATH)',
+ },
+ {
+ 'rule_name': 'light',
+ 'extension': 'wixobj',
+ 'process_outputs_as_sources': 1,
+ 'inputs': [
+ '<(light_exe)',
+ ],
+ 'outputs': [
+ '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).msi',
+ ],
+ 'action': [
+ '<(light_exe)',
+ '-nologo',
+ '-out',
+ '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).msi',
+ '<(RULE_INPUT_PATH)',
+ ],
+ 'message': 'Linking installer from <(RULE_INPUT_PATH)',
+ },
+ ],
+ 'sources': [
+ 'o3d.wxs',
+ ],
+ },
+ ],
+ 'conditions': [
+ ['"<(dx_redist_exists)" == "True"',
+ {
+ 'targets': [
+ {
+ 'target_name': 'extras_installer',
+ 'type': 'none',
+ 'variables': {
+ 'candle_exe': '../../../<(wixdir)/candle.exe',
+ 'light_exe': '../../../<(wixdir)/light.exe',
+ 'o3d_extras_d3dx_component_guid': '<!(<(guidgen) <(o3d_namespace_guid) '
+ 'o3d_extras_d3dx_component-<(nppversion))',
+ 'o3d_extras_package_guid': '<!(<(guidgen) <(o3d_namespace_guid) '
+ 'o3d_extras_package-<(extrasversion))',
+ 'o3d_extras_product_guid': '<!(<(guidgen) <(o3d_namespace_guid) '
+ 'o3d_extras_product-<(extrasversion))',
+ 'o3d_extras_reg_key':
+ '<(google_update_reg_path)<(o3d_extras_google_update_guid)',
+ },
+ 'rules': [
+ {
+ 'rule_name': 'candle',
+ 'extension': 'wxs',
+ 'process_outputs_as_sources': 1,
+ 'inputs': [
+ '<(candle_exe)',
+ ],
+ 'outputs': [
+ '<(RULE_INPUT_ROOT).wixobj',
+ ],
+ 'action': [
+ '<(candle_exe)',
+ '-nologo',
+ '-dDxRedistPath=<(dx_redist_path)',
+ '-dExtrasD3DXComponentGuid=<(o3d_extras_d3dx_component_guid)',
+ '-dExtrasGoogleUpdateRegGuid=<(o3d_extras_google_update_guid)',
+ '-dExtrasGoogleUpdateRegKey=<(o3d_extras_reg_key)',
+ '-dExtrasPackageGuid=<(o3d_extras_package_guid)',
+ '-dExtrasProductGuid=<(o3d_extras_product_guid)',
+ '-dExtrasUpgradeCode=<(o3d_extras_upgrade_code)',
+ '-dExtrasVersion=<(dotextrasversion)',
+ '-o',
+ '<(RULE_INPUT_ROOT).wixobj',
+ '<(RULE_INPUT_PATH)',
+ ],
+ 'message': 'Generating extras installer from <(RULE_INPUT_PATH)',
+ },
+ {
+ 'rule_name': 'light',
+ 'extension': 'wixobj',
+ 'process_outputs_as_sources': 1,
+ 'inputs': [
+ '<(light_exe)',
+ ],
+ 'outputs': [
+ '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).msi',
+ ],
+ 'action': [
+ '<(light_exe)',
+ '-nologo',
+ '-out',
+ '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).msi',
+ '<(RULE_INPUT_PATH)',
+ ],
+ 'message': 'Linking extras installer from <(RULE_INPUT_PATH)',
+ },
+ ],
+ 'sources': [
+ 'o3dextras.wxs',
+ ],
+ },
+ ],
+ },
+ {
+ 'targets': [
+ {
+ 'target_name': 'extras_installer',
+ 'type': 'none',
+ },
+ ],
+ },
+ ],
+ ],
+}
diff --git a/o3d/installer/win/o3d_plugin.wxs b/o3d/installer/win/o3d.wxs
index 5d3f114..534c639 100644
--- a/o3d/installer/win/o3d_plugin.wxs
+++ b/o3d/installer/win/o3d.wxs
@@ -309,7 +309,7 @@ Wix script for building o3d installer.
<Binary
Id='CustomActions'
- SourceFile='cactions.dll' />
+ SourceFile='$(var.CustomActionsPath)' />
<!-- Custom action for telling Google Update to install d3dx if necessary. -->
<CustomAction
diff --git a/o3d/installer/win/o3d_extras.wxs b/o3d/installer/win/o3dextras.wxs
index 9568236..9568236 100644
--- a/o3d/installer/win/o3d_extras.wxs
+++ b/o3d/installer/win/o3dextras.wxs
diff --git a/o3d/plugin/idl/codegen.py b/o3d/plugin/idl/codegen.py
index 329c797..22cbec2 100644
--- a/o3d/plugin/idl/codegen.py
+++ b/o3d/plugin/idl/codegen.py
@@ -21,7 +21,9 @@ import sys
import os
import os.path
-third_party = os.path.join('..', '..', '..', 'third_party')
+script_dir = os.path.join(os.path.dirname(sys.argv[0]))
+third_party = os.path.normpath(
+ os.path.join(script_dir, '..', '..', '..', 'third_party'))
pythonpath = os.pathsep.join([os.path.join(third_party, 'gflags', 'python'),
os.path.join(third_party, 'ply')])
diff --git a/o3d/plugin/plugin.gyp b/o3d/plugin/plugin.gyp
index 28a61fc..abf00b8 100644
--- a/o3d/plugin/plugin.gyp
+++ b/o3d/plugin/plugin.gyp
@@ -120,8 +120,8 @@
{
'link_settings': {
'libraries': [
- '-l"$(DXSDK_DIR)/Lib/x86/DxErr9.lib"',
- '-l"$(DXSDK_DIR)/Lib/x86/d3dx9.lib"',
+ '"$(DXSDK_DIR)/Lib/x86/DxErr9.lib"',
+ '"$(DXSDK_DIR)/Lib/x86/d3dx9.lib"',
'-ld3d9.lib',
],
},
diff --git a/o3d/plugin/version_info.py b/o3d/plugin/version_info.py
index cebfa57..5424cf4 100644
--- a/o3d/plugin/version_info.py
+++ b/o3d/plugin/version_info.py
@@ -20,9 +20,9 @@ import os.path
import re
import sys
+script_dir = os.path.join(os.path.dirname(sys.argv[0]))
gflags_dir = os.path.normpath(
- os.path.join(os.path.dirname(sys.argv[0]),
- '..', '..', 'third_party', 'gflags', 'python'))
+ os.path.join(script_dir, '..', '..', 'third_party', 'gflags', 'python'))
sys.path.append(gflags_dir)
import gflags
@@ -43,6 +43,9 @@ gflags.DEFINE_boolean('mimetype', False,
gflags.DEFINE_boolean('version', False,
'Print out the plugin version and exit.')
+gflags.DEFINE_boolean('commaversion', False,
+ 'Print out the plugin version with commas and exit.')
+
def GetDotVersion(version):
return '%d.%d.%d.%d' % version
@@ -77,9 +80,11 @@ def main(argv):
# Get version string from o3d_version.py
o3d_version_vars = {}
if FLAGS.kill_switch:
- execfile('../installer/win/o3d_kill_version.py', o3d_version_vars)
+ execfile(os.path.join(script_dir, '..', 'installer', 'win',
+ 'o3d_kill_version.py'), o3d_version_vars)
else:
- execfile('../installer/win/o3d_version.py', o3d_version_vars)
+ execfile(os.path.join(script_dir, '..', 'installer', 'win',
+ 'o3d_version.py'), o3d_version_vars)
plugin_version = o3d_version_vars['plugin_version']
sdk_version = o3d_version_vars['sdk_version']
@@ -113,6 +118,10 @@ def main(argv):
print '%s' % O3D_PLUGIN_VERSION
sys.exit(0)
+ if FLAGS.commaversion:
+ print '%s' % O3D_PLUGIN_VERSION_COMMAS
+ sys.exit(0)
+
plugin_replace_strings = [
('@@@PluginName@@@', O3D_PLUGIN_NAME),
('@@@ProductVersionCommas@@@', O3D_PLUGIN_VERSION_COMMAS),