mirror of
https://github.com/browseros-ai/BrowserOS.git
synced 2025-07-21 00:21:28 +03:00
Merge branch 'main' of https://github.com/browseros-ai/BrowserOS
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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"])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user