Index: copy_apprtc.py |
diff --git a/copy_apprtc.py b/copy_apprtc.py |
index 538e50fc6fb026b57631d42db463c707ffdea7aa..2ed2e954de6b9990c24e3000f61cd782a08e0631 100755 |
--- a/copy_apprtc.py |
+++ b/copy_apprtc.py |
@@ -3,23 +3,15 @@ |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
-"""Moves Apprtc to the out/ directory, where the browser test can find it. |
- |
-This copy will resolve symlinks on all platforms, which is useful for Apprtc |
-since it uses symlinks for its common javascript files (and Windows does not |
-understand those symlinks). |
-""" |
+"""Moves Apprtc to the out/ directory, where the browser test can find it.""" |
import fileinput |
import os |
import shutil |
import sys |
-import utils |
- |
-def _ConfigureApprtcServerToDeveloperMode(apprtc_dir): |
- app_yaml_path = os.path.join(apprtc_dir, 'app.yaml') |
+def _ConfigureApprtcServerToDeveloperMode(app_yaml_path): |
if not os.path.exists(app_yaml_path): |
return 'Expected app.yaml at %s.' % os.path.abspath(app_yaml_path) |
@@ -31,24 +23,16 @@ def _ConfigureApprtcServerToDeveloperMode(apprtc_dir): |
sys.stdout.write(line) |
-def _CopyApprtcToTargetDir(target_dir, apprtc_subdir): |
+def main(): |
+ target_dir = os.path.join('src', 'out', 'apprtc') |
shutil.rmtree(target_dir, ignore_errors=True) |
- shutil.copytree('webrtc-samples', |
+ shutil.copytree('apprtc', |
target_dir, ignore=shutil.ignore_patterns('.svn', '.git')) |
- # This file is symlinked on windows, so copy it since win doesn't understand |
- # symlinks. |
- shutil.copyfile(os.path.join('webrtc-samples', 'samples', 'web', |
- 'js', 'adapter.js'), |
- os.path.join(target_dir, apprtc_subdir, 'js', 'adapter.js')) |
+ app_yaml_path = os.path.join(target_dir, 'src', 'app_engine', 'app.yaml') |
+ _ConfigureApprtcServerToDeveloperMode(app_yaml_path) |
-def main(): |
- target_dir = os.path.join('src', 'out', 'webrtc-samples') |
- apprtc_subdir = os.path.join('samples', 'web', 'content', 'apprtc') |
- _CopyApprtcToTargetDir(target_dir, apprtc_subdir) |
- _ConfigureApprtcServerToDeveloperMode(os.path.join(target_dir, apprtc_subdir)) |
- |
if __name__ == '__main__': |
sys.exit(main()) |