OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/env python |
| 2 # Copyright 2017 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 from os import path as os_path |
| 7 from platform import system as platform_system |
| 8 |
| 9 |
| 10 _THIRD_PARTY_NODE_DIR = os_path.join(os_path.dirname(__file__)) |
| 11 |
| 12 # Gets the path to the Node binary based on current platform. |
| 13 def get_binary(): |
| 14 third_party_node_binary = ''; |
| 15 |
| 16 if platform_system() == 'Darwin': |
| 17 third_party_node_binary = os_path.join( |
| 18 'mac', 'node-darwin-x64', 'bin', 'node') |
| 19 elif platform_system() == 'Linux': |
| 20 third_party_node_binary = os_path.join( |
| 21 'linux', 'node-linux-x64', 'bin', 'node') |
| 22 elif platform_system() == 'Windows': |
| 23 third_party_node_binary = os_path.join('win', 'node.exe') |
| 24 |
| 25 return os_path.abspath(os_path.join( |
| 26 _THIRD_PARTY_NODE_DIR, third_party_node_binary)) |
OLD | NEW |