Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(423)

Unified Diff: remoting/webapp/build-webapp.py

Issue 870273002: Revert of Copy debug PNaCl plugin in Dev builds of the chromoting webapp. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@all
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/remoting_client.gypi ('k') | remoting/webapp/crd/remoting_client_pnacl.nmf » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/build-webapp.py
diff --git a/remoting/webapp/build-webapp.py b/remoting/webapp/build-webapp.py
index 3909316bf2e86ae44999cdf7be2d9104f1caf278..833e1f3ead52e6bde15223ae3576f37e9a90e5d0 100755
--- a/remoting/webapp/build-webapp.py
+++ b/remoting/webapp/build-webapp.py
@@ -117,20 +117,29 @@
if buildtype != 'Official' and buildtype != 'Release' and buildtype != 'Dev':
raise Exception('Unknown buildtype: ' + buildtype)
- jinja_context = {
- 'webapp_type': webapp_type,
- '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
# Copy all the files.
for current_file in files:
destination_file = os.path.join(destination, os.path.basename(current_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)
+ 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)
else:
shutil.copy2(current_file, destination_file)
« no previous file with comments | « remoting/remoting_client.gypi ('k') | remoting/webapp/crd/remoting_client_pnacl.nmf » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698