diff options
author | sergeyu <sergeyu@chromium.org> | 2015-02-05 13:00:27 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-05 21:01:26 +0000 |
commit | a0f666219c0a8e03e2fd4909cb5fab8859a49462 (patch) | |
tree | 8b490b27238fa35ba638adb0a149320e1520d3d5 /remoting | |
parent | 566c432e789653356da210e066b1f0ed62f1aa3d (diff) | |
download | chromium_src-a0f666219c0a8e03e2fd4909cb5fab8859a49462.zip chromium_src-a0f666219c0a8e03e2fd4909cb5fab8859a49462.tar.gz chromium_src-a0f666219c0a8e03e2fd4909cb5fab8859a49462.tar.bz2 |
Copy debug PNaCl plugin in Dev builds of the chromoting webapp.
With this change the Debug version of the PNaCl plugin will be copied to
the webapp directory allowing to debug PNaCl plugin (using nacl-gdb).
Also updated build-webapp.py to process all *.jinja2 input files as jinja2
templates.
This patch was previously reverted because of a problem that should be
fixed now by https://codereview.chromium.org/872673006/ .
BUG=451643
Review URL: https://codereview.chromium.org/872633006
Cr-Commit-Position: refs/heads/master@{#314873}
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/remoting_client.gypi | 11 | ||||
-rwxr-xr-x | remoting/webapp/build-webapp.py | 29 | ||||
-rw-r--r-- | remoting/webapp/crd/remoting_client_pnacl.nmf.jinja2 (renamed from remoting/webapp/crd/remoting_client_pnacl.nmf) | 6 |
3 files changed, 26 insertions, 20 deletions
diff --git a/remoting/remoting_client.gypi b/remoting/remoting_client.gypi index cf54377..e8f3efb 100644 --- a/remoting/remoting_client.gypi +++ b/remoting/remoting_client.gypi @@ -159,13 +159,22 @@ 'zip_path': '<(PRODUCT_DIR)/remoting-webapp.v2_pnacl.zip', 'webapp_type': 'v2_pnacl', 'extra_files': [ - 'webapp/crd/remoting_client_pnacl.nmf', + 'webapp/crd/remoting_client_pnacl.nmf.jinja2', '<(PRODUCT_DIR)/remoting_client_plugin_newlib.pexe', ], }, 'dependencies': [ 'remoting_nacl.gyp:remoting_client_plugin_nacl', ], + 'conditions': [ + ['buildtype == "Dev"', { + 'variables': { + 'extra_files': [ + '<(PRODUCT_DIR)/remoting_client_plugin_newlib.pexe.debug', + ], + }, + }], + ], 'includes': [ 'remoting_webapp.gypi', ], }, # end of target 'remoting_webapp_v2_pnacl' ], diff --git a/remoting/webapp/build-webapp.py b/remoting/webapp/build-webapp.py index 9868b6c..a891af5 100755 --- a/remoting/webapp/build-webapp.py +++ b/remoting/webapp/build-webapp.py @@ -118,29 +118,20 @@ def buildWebApp(buildtype, version, destination, zip_path, if buildtype != 'Official' and buildtype != 'Release' and buildtype != 'Dev': raise Exception('Unknown buildtype: ' + buildtype) - # Use symlinks on linux and mac for faster compile/edit cycle. - # - # On Windows Vista platform.system() can return 'Microsoft' with some - # versions of Python, see http://bugs.python.org/issue1082 - # should_symlink = platform.system() not in ['Windows', 'Microsoft'] - # - # TODO(ajwong): Pending decision on http://crbug.com/27185 we may not be - # able to load symlinked resources. - should_symlink = False + jinja_context = { + 'webapp_type': webapp_type, + 'buildtype': buildtype, + } # Copy all the files. for current_file in files: destination_file = os.path.join(destination, os.path.basename(current_file)) - destination_dir = os.path.dirname(destination_file) - if not os.path.exists(destination_dir): - os.makedirs(destination_dir, 0775) - - if should_symlink: - # TODO(ajwong): Detect if we're vista or higher. Then use win32file - # to create a symlink in that case. - targetname = os.path.relpath(os.path.realpath(current_file), - os.path.realpath(destination_file)) - os.symlink(targetname, destination_file) + + # Process *.jinja2 files as jinja2 templates + if current_file.endswith(".jinja2"): + destination_file = destination_file[:-len(".jinja2")] + processJinjaTemplate(current_file, jinja_paths, + destination_file, jinja_context) else: shutil.copy2(current_file, destination_file) diff --git a/remoting/webapp/crd/remoting_client_pnacl.nmf b/remoting/webapp/crd/remoting_client_pnacl.nmf.jinja2 index 8181c0a..ef5ae50 100644 --- a/remoting/webapp/crd/remoting_client_pnacl.nmf +++ b/remoting/webapp/crd/remoting_client_pnacl.nmf.jinja2 @@ -5,6 +5,12 @@ "url": "remoting_client_plugin_newlib.pexe", "optlevel": 2 } +{% if buildtype == 'Dev' %} + , "pnacl-debug": { + "url": "remoting_client_plugin_newlib.pexe.debug", + "optlevel": 0 + } +{% endif %} } } } |