This commit is contained in:
Nikhil Sonti
2025-07-09 08:36:56 -07:00
3 changed files with 8 additions and 12 deletions

View File

@@ -3,6 +3,7 @@
Main build orchestrator for Nxtscape Browser
"""
import os
import sys
import time
import click
@@ -83,6 +84,11 @@ def build_main(
"""Main build orchestration"""
log_info("🚀 Nxtscape Build System")
log_info("=" * 50)
# Set Windows-specific environment variables
if IS_WINDOWS:
os.environ["DEPOT_TOOLS_WIN_TOOLCHAIN"] = "0"
log_info("🔧 Set DEPOT_TOOLS_WIN_TOOLCHAIN=0 for Windows build")
# Setup context
root_dir = Path(__file__).parent.parent

View File

@@ -39,14 +39,7 @@ def configure(ctx: BuildContext, gn_flags_file: Optional[Path] = None) -> bool:
# Run gn gen
os.chdir(ctx.chromium_src)
gn_cmd = "gn.bat" if IS_WINDOWS else "gn"
# Windows needs DEPOT_TOOLS_WIN_TOOLCHAIN=0 to use local Visual Studio
if IS_WINDOWS:
env = os.environ.copy()
env["DEPOT_TOOLS_WIN_TOOLCHAIN"] = "0"
run_command([gn_cmd, "gen", ctx.out_dir, "--fail-on-unused-args"], env=env)
else:
run_command([gn_cmd, "gen", ctx.out_dir, "--fail-on-unused-args"])
run_command([gn_cmd, "gen", ctx.out_dir, "--fail-on-unused-args"])
log_success("Build configured")
return True

View File

@@ -44,10 +44,7 @@ def setup_git(ctx: BuildContext) -> bool:
log_info("📥 Syncing dependencies (this may take a while)...")
# Windows gclient doesn't support --shallow flag
if IS_WINDOWS:
# Windows needs DEPOT_TOOLS_WIN_TOOLCHAIN=0 to use local Visual Studio
env = os.environ.copy()
env["DEPOT_TOOLS_WIN_TOOLCHAIN"] = "0"
run_command(["gclient.bat", "sync", "-D", "--no-history", "--shallow"], env=env)
run_command(["gclient.bat", "sync", "-D", "--no-history", "--shallow"])
else:
run_command(["gclient", "sync", "-D", "--no-history", "--shallow"])