Add depot_tools to env PATH

Fix for gclient not found, seems like sys.path.append does not work but path is added
This commit is contained in:
vzamanillo 2016-10-11 09:52:18 +02:00
parent b2b59c39a9
commit 426888c0e4

View File

@ -16,7 +16,7 @@ def grep_dep(reg, repo, dir):
(Var(\"chromium_git\")) + '%s@%s',
''' % (dir, repo, head)
try:
try:
opts, args = getopt.getopt(sys.argv[1:], "hc", ["clean", "help", "target_arch=", "nw_version="])
except getopt.GetoptError:
usage()
@ -41,10 +41,10 @@ for opt, arg in opts:
usage()
sys.exit(0)
elif opt in ("--target_arch"):
target_arch = arg
target_arch = arg
elif opt in ("--nw_version"):
nw_version = arg
elif opt in ("-c", "--clean"):
nw_version = arg
elif opt in ("-c", "--clean"):
shutil.rmtree("build", ignore_errors=True)
if target_arch == "ia32":
@ -66,6 +66,9 @@ chromium_git = 'https://chromium.googlesource.com'
os.system("git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git")
sys.path.append( os.getcwd() + "/depot_tools")
#fix for gclient not found, seems like sys.path.append does not work but path is added
os.environ["PATH"] += os.pathsep + os.getcwd() + "/depot_tools"
if platform.system() == 'Windows' or 'CYGWIN_NT' in platform.system():
os.environ["DEPOT_TOOLS_WIN_TOOLCHAIN"] = '0'
@ -261,4 +264,4 @@ os.system('gclient sync --no-history')
os.system('gn gen //out/nw "--args=is_debug=false is_component_ffmpeg=true target_cpu=\\\"%s\\\" is_official_build=true ffmpeg_branding=\\\"Chrome\\\""' % target_cpu)
#build ffmpeg
os.system("ninja -C out/nw ffmpeg")
os.system("ninja -C out/nw ffmpeg")