refactor: do not use electron.gyp contents in the verify-ffmpeg script

Also run verify ffmpeg with cmd instead of powershell
This commit is contained in:
Aleksei Kuzmin 2018-08-31 13:52:21 +02:00
parent 8e525f965d
commit 57a4d86669
4 changed files with 39 additions and 29 deletions

View file

@ -1,6 +1,7 @@
#!/usr/bin/env python
import subprocess
import sys
from util import scoped_cwd
@ -9,9 +10,15 @@ class GNProject:
def __init__(self, out_dir):
self.out_dir = out_dir
def _get_executable_name(self):
if sys.platform == 'win32':
return 'gn.bat'
return 'gn'
def run(self, command_name, command_args):
with scoped_cwd(self.out_dir):
complete_args = ['gn', command_name, '.'] + command_args
complete_args = [self._get_executable_name(), command_name, '.'] + command_args
return subprocess.check_output(complete_args)
def args(self):