Skip to content

Commit d308021

Browse files
committed
build.ps1 - Add support for new CEF format.
Resolves #76
1 parent 1e0f092 commit d308021

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

build.ps1

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ param(
1414
[string] $CefBinaryDir = "../cefsource/chromium/src/cef/binary_distrib/",
1515

1616
[Parameter(Position = 3)]
17-
$CefVersion = "3.3578.1860.g36610bd",
17+
$CefVersion = "73.1.12+gee4b49f+chromium-73.0.3683.75",
1818

1919
[ValidateSet("tar.bz2","zip","7z")]
2020
[Parameter()]
@@ -47,7 +47,6 @@ try
4747
$CefVersion = ($name -replace "cef_binary_", "") -replace "_windows64.$Extension";
4848
}
4949

50-
5150
$Cef = Join-Path $WorkingDir 'cef'
5251
$CefInclude = Join-Path $Cef 'include'
5352
$Cef32 = Join-Path $WorkingDir 'cef_binary_3.y.z_windows32'
@@ -73,9 +72,18 @@ try
7372
$CefVersion = "$env:APPVEYOR_REPO_TAG_NAME".Substring(1) # trim leading "v"
7473
Write-Diagnostic "Setting version based on tag to $CefVersion"
7574
}
76-
77-
# Take the cef version and strip the commit hash
78-
$CefPackageVersion = $CefVersion.SubString(0, $CefVersion.LastIndexOf('.'))
75+
76+
if($CefVersion.StartsWith('3.'))
77+
{
78+
# Take the cef version and strip the commit hash
79+
$CefPackageVersion = $CefVersion.SubString(0, $CefVersion.LastIndexOf('.'))
80+
}
81+
else
82+
{
83+
# Take the cef version and strip the commit hash, chromium version
84+
# we should end up with something like 73.1.12
85+
$CefPackageVersion = $CefVersion.SubString(0, $CefVersion.IndexOf('+'))
86+
}
7987

8088
# https://github.com/jbake/Powershell_scripts/blob/master/Invoke-BatchFile.ps1
8189
function Invoke-BatchFile
@@ -531,7 +539,7 @@ try
531539
if (-not (Test-Path $LocalFile))
532540
{
533541
Write-Diagnostic "Downloading $Cef32FileName; this will take a while as the file is $Cef32FileSize MB."
534-
$Client.DownloadFile($CefBuildServerUrl + $Cef32FileName, $LocalFile);
542+
$Client.DownloadFile($CefBuildServerUrl + [System.Web.HttpUtility]::UrlEncode($Cef32FileName), $LocalFile);
535543

536544
$Cef32LocalFileHash = (Get-FileHash -Path $LocalFile -Algorithm SHA1).Hash
537545

@@ -570,7 +578,7 @@ try
570578
if (-not (Test-Path $LocalFile))
571579
{
572580
Write-Diagnostic "Downloading $Cef64FileName; this will take a while as the file is $Cef64FileSize MB."
573-
$Client.DownloadFile($CefBuildServerUrl + $Cef64FileName, $LocalFile);
581+
$Client.DownloadFile($CefBuildServerUrl + [System.Web.HttpUtility]::UrlEncode($Cef64FileName), $LocalFile);
574582

575583
$Cef64LocalFileHash = (Get-FileHash -Path $LocalFile -Algorithm SHA1).Hash
576584

0 commit comments

Comments
 (0)