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

Side by Side Diff: build/android/gyp/create_device_library_links.py

Issue 358993003: [Android] Switch to DeviceUtils versions of file functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | build/android/gyp/push_libraries.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2013 The Chromium Authors. All rights reserved. 3 # Copyright 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """Creates symlinks to native libraries for an APK. 7 """Creates symlinks to native libraries for an APK.
8 8
9 The native libraries should have previously been pushed to the device (in 9 The native libraries should have previously been pushed to the device (in
10 options.target_dir). This script then creates links in an apk's lib/ folder to 10 options.target_dir). This script then creates links in an apk's lib/ folder to
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 if not device: 57 if not device:
58 return 58 return
59 59
60 apk_package = apk_helper.GetPackageName(options.apk) 60 apk_package = apk_helper.GetPackageName(options.apk)
61 apk_libraries_dir = '/data/data/%s/lib' % apk_package 61 apk_libraries_dir = '/data/data/%s/lib' % apk_package
62 62
63 device_dir = os.path.dirname(options.script_device_path) 63 device_dir = os.path.dirname(options.script_device_path)
64 mkdir_cmd = ('if [ ! -e %(dir)s ]; then mkdir -p %(dir)s; fi ' % 64 mkdir_cmd = ('if [ ! -e %(dir)s ]; then mkdir -p %(dir)s; fi ' %
65 { 'dir': device_dir }) 65 { 'dir': device_dir })
66 RunShellCommand(device, mkdir_cmd) 66 RunShellCommand(device, mkdir_cmd)
67 device.PushIfNeeded(options.script_host_path, options.script_device_path) 67 device.PushChangedFiles(options.script_host_path, options.script_device_path)
68 68
69 trigger_cmd = ( 69 trigger_cmd = (
70 'APK_LIBRARIES_DIR=%(apk_libraries_dir)s; ' 70 'APK_LIBRARIES_DIR=%(apk_libraries_dir)s; '
71 'STRIPPED_LIBRARIES_DIR=%(target_dir)s; ' 71 'STRIPPED_LIBRARIES_DIR=%(target_dir)s; '
72 '. %(script_device_path)s' 72 '. %(script_device_path)s'
73 ) % { 73 ) % {
74 'apk_libraries_dir': apk_libraries_dir, 74 'apk_libraries_dir': apk_libraries_dir,
75 'target_dir': options.target_dir, 75 'target_dir': options.target_dir,
76 'script_device_path': options.script_device_path 76 'script_device_path': options.script_device_path
77 } 77 }
(...skipping 25 matching lines...) Expand all
103 103
104 CreateSymlinkScript(options) 104 CreateSymlinkScript(options)
105 TriggerSymlinkScript(options) 105 TriggerSymlinkScript(options)
106 106
107 if options.stamp: 107 if options.stamp:
108 build_utils.Touch(options.stamp) 108 build_utils.Touch(options.stamp)
109 109
110 110
111 if __name__ == '__main__': 111 if __name__ == '__main__':
112 sys.exit(main()) 112 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | build/android/gyp/push_libraries.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698