OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/env python |
| 2 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. |
| 5 |
| 6 import os |
| 7 import platform |
| 8 |
| 9 _THIRD_PARTY_NODE_DIR = os.path.join(os.path.dirname(__file__)) |
| 10 |
| 11 # Gets the path to the Node binary based on current platform. |
| 12 def get_binary(): |
| 13 third_party_node_binary = ''; |
| 14 |
| 15 if platform.system() == 'Darwin': |
| 16 third_party_node_binary = os.path.join( |
| 17 'mac', 'node-darwin-x64', 'bin', 'node') |
| 18 elif platform.system() == 'Linux': |
| 19 third_party_node_binary = os.path.join( |
| 20 'linux', 'node-linux-x64', 'bin', 'node') |
| 21 elif platform.system() == 'Windows': |
| 22 third_party_node_binary = os.path.join('win', 'node.exe') |
| 23 |
| 24 return os.path.abspath(os.path.join( |
| 25 _THIRD_PARTY_NODE_DIR, third_party_node_binary)) |
| 26 |
| 27 if __name__ == '__main__': |
| 28 pass |
OLD | NEW |