-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
76fa79e
commit be8272b
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Turn off echo and set error preference to continue on error | ||
$ErrorActionPreference = 'Continue' | ||
|
||
# Define environment variables | ||
$env:GN_DEFINES = "is_chrome_branded=false symbol_level=1 is_official_build=true use_thin_lto=false proprietary_codecs=true ffmpeg_branding=Chrome enable_widevine=true" | ||
$env:GYP_MSVS_VERSION = "2022" | ||
|
||
# Get the current directory of the script | ||
$CURRENT_DIR = Split-Path -Parent $MyInvocation.MyCommand.Path | ||
|
||
# Attempt to remove X: mapping; ignore errors | ||
Remove-PSDrive -Name "X" -ErrorAction SilentlyContinue | ||
|
||
# Map X: to the current directory's parent | ||
New-PSDrive -Name "X" -PSProvider FileSystem -Root "${CURRENT_DIR}\.." -ErrorAction SilentlyContinue | ||
|
||
# Define more variables using the new drive mapping | ||
$DOWNLOAD_DIR = "X:\chromium_git" | ||
$DEPOT_TOOLS_DIR = "X:\depot_tools" | ||
|
||
# Execute the build using dynamic paths | ||
& python "X:\build\automate-git.py" ` | ||
--url="https://github.com/citizenfx/cef.git" ` | ||
--checkout="cfx-m124" ` | ||
--download-dir="$DOWNLOAD_DIR" ` | ||
--depot-tools-dir="$DEPOT_TOOLS_DIR" ` | ||
--x64-build ` | ||
--no-cef-update ` | ||
--no-depot-tools-update ` | ||
--with-pgo-profiles $args | ||
|
||
# Attempt to clean up and remove X: mapping at the end; ignore errors | ||
Remove-PSDrive -Name "X" -ErrorAction SilentlyContinue |