Commit a0f66621 authored by sergeyu's avatar sergeyu Committed by Commit bot

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}
parent 566c432e
...@@ -159,13 +159,22 @@ ...@@ -159,13 +159,22 @@
'zip_path': '<(PRODUCT_DIR)/remoting-webapp.v2_pnacl.zip', 'zip_path': '<(PRODUCT_DIR)/remoting-webapp.v2_pnacl.zip',
'webapp_type': 'v2_pnacl', 'webapp_type': 'v2_pnacl',
'extra_files': [ 'extra_files': [
'webapp/crd/remoting_client_pnacl.nmf', 'webapp/crd/remoting_client_pnacl.nmf.jinja2',
'<(PRODUCT_DIR)/remoting_client_plugin_newlib.pexe', '<(PRODUCT_DIR)/remoting_client_plugin_newlib.pexe',
], ],
}, },
'dependencies': [ 'dependencies': [
'remoting_nacl.gyp:remoting_client_plugin_nacl', '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', ], 'includes': [ 'remoting_webapp.gypi', ],
}, # end of target 'remoting_webapp_v2_pnacl' }, # end of target 'remoting_webapp_v2_pnacl'
], ],
......
...@@ -118,29 +118,20 @@ def buildWebApp(buildtype, version, destination, zip_path, ...@@ -118,29 +118,20 @@ def buildWebApp(buildtype, version, destination, zip_path,
if buildtype != 'Official' and buildtype != 'Release' and buildtype != 'Dev': if buildtype != 'Official' and buildtype != 'Release' and buildtype != 'Dev':
raise Exception('Unknown buildtype: ' + buildtype) raise Exception('Unknown buildtype: ' + buildtype)
# Use symlinks on linux and mac for faster compile/edit cycle. jinja_context = {
# 'webapp_type': webapp_type,
# On Windows Vista platform.system() can return 'Microsoft' with some 'buildtype': buildtype,
# 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
# Copy all the files. # Copy all the files.
for current_file in files: for current_file in files:
destination_file = os.path.join(destination, os.path.basename(current_file)) 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): # Process *.jinja2 files as jinja2 templates
os.makedirs(destination_dir, 0775) if current_file.endswith(".jinja2"):
destination_file = destination_file[:-len(".jinja2")]
if should_symlink: processJinjaTemplate(current_file, jinja_paths,
# TODO(ajwong): Detect if we're vista or higher. Then use win32file destination_file, jinja_context)
# 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)
else: else:
shutil.copy2(current_file, destination_file) shutil.copy2(current_file, destination_file)
......
...@@ -5,6 +5,12 @@ ...@@ -5,6 +5,12 @@
"url": "remoting_client_plugin_newlib.pexe", "url": "remoting_client_plugin_newlib.pexe",
"optlevel": 2 "optlevel": 2
} }
{% if buildtype == 'Dev' %}
, "pnacl-debug": {
"url": "remoting_client_plugin_newlib.pexe.debug",
"optlevel": 0
}
{% endif %}
} }
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment