diff options
-rw-r--r-- | o3d/plugin/mac/Info.plist | 4 | ||||
-rw-r--r-- | o3d/plugin/plugin.gyp | 52 | ||||
-rw-r--r-- | o3d/plugin/version_info.py | 5 |
3 files changed, 43 insertions, 18 deletions
diff --git a/o3d/plugin/mac/Info.plist b/o3d/plugin/mac/Info.plist index 9040d17..857c3c5 100644 --- a/o3d/plugin/mac/Info.plist +++ b/o3d/plugin/mac/Info.plist @@ -40,7 +40,6 @@ <string>@@@PluginName@@@</string> <key>O3DForceSoftwareRenderer</key> <false/> - <key>BreakpadInspectorLocation</key> <string>/Library/Internet Plug-Ins/@@@PluginNpapiFilename@@@.plugin/Contents/Resources/crash_inspector</string> <key>BreakpadReporterExeLocation</key> @@ -58,7 +57,6 @@ <key>BreakpadReportInterval</key> <string>3600</string> <key>BreakpadURL</key> - <string>https://clients2.google.com/cr/report</string> - + <string>@@@PluginBreakpadURL@@@</string> </dict> </plist> diff --git a/o3d/plugin/plugin.gyp b/o3d/plugin/plugin.gyp index ba35b5f..68eecdd 100644 --- a/o3d/plugin/plugin.gyp +++ b/o3d/plugin/plugin.gyp @@ -624,28 +624,50 @@ 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/plugin/Info.plist', ], + 'variables': { + # Ridiculously, it is impossible to define a GYP + # variable whose value depends on the choice of build + # configuration, so to get this to be the staging URL + # when building Debug we define it as a shell fragment + # that uses command substitution to evaluate to + # different things based on the Xcode "CONFIGURATION" + # environment variable. We further have to use `` + # instead of $() because GYP/Xcode mangles $(). + 'o3d_plugin_breakpad_url': + '`if [ "$CONFIGURATION" = Debug ]; then ' + 'echo https://clients2.google.com/cr/staging_report; ' + 'else ' + 'echo https://clients2.google.com/cr/report; ' + 'fi`' + }, 'conditions': [ ['"<(plugin_npapi_filename)" == "npo3dautoplugin"', { # The unbranded Mac plugin's name is a special case. - 'action': ['python', - 'version_info.py', - '--set_name=<(plugin_name)', - '--set_version=<(plugin_version)', - '--set_npapi_filename=O3D', - '--set_npapi_mimetype=<(plugin_npapi_mimetype)', - 'mac/Info.plist', - '<(SHARED_INTERMEDIATE_DIR)/plugin/Info.plist', + 'action': ['sh', + '-c', + 'python ' + 'version_info.py ' + '--set_name="<(plugin_name)" ' + '--set_version="<(plugin_version)" ' + '--set_npapi_filename="O3D" ' + '--set_npapi_mimetype="<(plugin_npapi_mimetype)" ' + '--set_o3d_plugin_breakpad_url="<(o3d_plugin_breakpad_url)" ' + '"mac/Info.plist" ' + '"<(SHARED_INTERMEDIATE_DIR)/plugin/Info.plist"', ], }, { - 'action': ['python', - 'version_info.py', - '--set_name=<(plugin_name)', - '--set_version=<(plugin_version)', - '--set_npapi_filename=<(plugin_npapi_filename)', - '--set_npapi_mimetype=<(plugin_npapi_mimetype)', - 'mac/Info.plist', + 'action': ['sh', + '-c', + 'python ' + 'version_info.py ' + '--set_name=<(plugin_name) ' + '--set_version=<(plugin_version) ' + '--set_npapi_filename=<(plugin_npapi_filename) ' + '--set_npapi_mimetype=<(plugin_npapi_mimetype) ' + '--set_o3d_plugin_breakpad_url=<(o3d_plugin_breakpad_url) ' + 'mac/Info.plist ' '<(SHARED_INTERMEDIATE_DIR)/plugin/Info.plist', ], }, diff --git a/o3d/plugin/version_info.py b/o3d/plugin/version_info.py index 58c8229..0777e03 100644 --- a/o3d/plugin/version_info.py +++ b/o3d/plugin/version_info.py @@ -58,6 +58,9 @@ gflags.DEFINE_string('set_activex_hostcontrol_name', '', gflags.DEFINE_string('set_activex_typelib_name', '', 'Sets the ActiveX TypeLib\'s name to use.') +gflags.DEFINE_string('set_o3d_plugin_breakpad_url', '', + 'Sets the o3d Crash Dump Upload URL to use.') + def DoReplace(in_filename, out_filename, replacements): '''Replace the version placeholders in the given filename with the replacements.''' @@ -99,6 +102,7 @@ def main(argv): O3D_PLUGIN_ACTIVEX_TYPELIB_CLSID = FLAGS.set_activex_typelib_clsid O3D_PLUGIN_ACTIVEX_HOSTCONTROL_NAME = FLAGS.set_activex_hostcontrol_name O3D_PLUGIN_ACTIVEX_TYPELIB_NAME = FLAGS.set_activex_typelib_name + O3D_PLUGIN_BREAKPAD_URL = FLAGS.set_o3d_plugin_breakpad_url if FLAGS.description: print '%s' % O3D_PLUGIN_DESCRIPTION @@ -121,6 +125,7 @@ def main(argv): ('@@@PluginActiveXHostControlName@@@', O3D_PLUGIN_ACTIVEX_HOSTCONTROL_NAME), ('@@@PluginActiveXTypeLibName@@@', O3D_PLUGIN_ACTIVEX_TYPELIB_NAME), + ('@@@PluginBreakpadURL@@@', O3D_PLUGIN_BREAKPAD_URL), ] if len(files) == 2: |