1414 [string ] $CefBinaryDir = " ../cefsource/chromium/src/cef/binary_distrib/" ,
1515
1616 [Parameter (Position = 3 )]
17- $CefVersion = " 3.3202.1686.gd665578 "
17+ $CefVersion = " 3.3202.1690.gcd6b88f "
1818)
1919
2020$WorkingDir = split-path - parent $MyInvocation.MyCommand.Definition
@@ -45,8 +45,9 @@ if ($env:APPVEYOR_REPO_TAG -eq "True")
4545 Write-Diagnostic " Setting version based on tag to $CefVersion "
4646}
4747
48- # Take the cef version and strip the commit hash
49- $CefPackageVersion = $CefVersion.SubString (0 , $CefVersion.LastIndexOf (' .' ))
48+ # Take the CEF version and strip the commit hash. We also add a "prerelease identifier" to identify that we have been
49+ # compiled with support for proprietary codecs.
50+ $CefPackageVersion = $CefVersion.SubString (0 , $CefVersion.LastIndexOf (' .' )) + ' -proprietary-codecs'
5051
5152# https://github.com/jbake/Powershell_scripts/blob/master/Invoke-BatchFile.ps1
5253function Invoke-BatchFile
@@ -137,8 +138,9 @@ function Bootstrap
137138 Remove-Item $Cef - Recurse | Out-Null
138139 }
139140
141+
140142 # Copy include files
141- Copy-Item $Cef64 \include $CefInclude - Recurse | Out-Null
143+ Copy-Item $Cef32 \include $CefInclude - Recurse | Out-Null
142144
143145 # Create default directory structure
144146 md ' cef\win32' | Out-Null
@@ -306,8 +308,9 @@ function VSX
306308
307309 Msvs " $Toolchain " ' Debug' ' x86'
308310 Msvs " $Toolchain " ' Release' ' x86'
309- Msvs " $Toolchain " ' Debug' ' x64'
310- Msvs " $Toolchain " ' Release' ' x64'
311+
312+ # TODO: x64 disabled for now since my x64 linking failed on OOM.
313+ # Msvs "$Toolchain" 'Release' 'x64'
311314
312315 Write-Diagnostic " Finished build targeting toolchain $Toolchain "
313316}
@@ -359,14 +362,13 @@ function Nupkg
359362 }
360363
361364 # Build 32bit packages
362- # . $Nuget pack nuget\cef.redist.nuspec -NoPackageAnalysis -Version $CefPackageVersion -Properties 'Configuration=Debug;DotConfiguration=.Debug;Platform=x86;CPlatform=windows32;' -OutputDirectory nuget
363365 . $Nuget pack nuget\cef.redist.nuspec - NoPackageAnalysis - Version $CefPackageVersion - Properties ' Configuration=Release;DotConfiguration=;Platform=x86;CPlatform=windows32;' - OutputDirectory nuget
364366
365367 # Build 64bit packages
366- # . $Nuget pack nuget\cef.redist.nuspec -NoPackageAnalysis -Version $CefPackageVersion -Properties 'Configuration=Debug;DotConfiguration=.Debug;Platform= x64;CPlatform=windows64;' -OutputDirectory nuget
367- . $Nuget pack nuget\cef.redist.nuspec - NoPackageAnalysis - Version $CefPackageVersion - Properties ' Configuration=Release;DotConfiguration=;Platform=x64;CPlatform=windows64;' - OutputDirectory nuget
368+ # TODO: disabled until I have a working x64 build
369+ # . $Nuget pack nuget\cef.redist.nuspec -NoPackageAnalysis -Version $CefPackageVersion -Properties 'Configuration=Release;DotConfiguration=;Platform=x64;CPlatform=windows64;' -OutputDirectory nuget
368370
369- # Build sdk
371+ # Build SDK
370372 $Filename = Resolve-Path " .\nuget\cef.sdk.props"
371373 $Text = (Get-Content $Filename ) -replace ' <CefSdkVer>.*<\/CefSdkVer>' , " <CefSdkVer>cef.sdk.$CefPackageVersion </CefSdkVer>"
372374 [System.IO.File ]::WriteAllLines($Filename , $Text )
@@ -386,88 +388,81 @@ function DownloadNuget()
386388
387389function DownloadCefBinaryAndUnzip ()
388390{
389- $Client = New-Object System.Net.WebClient;
390-
391- $CefBuildServerUrl = " http://opensource.spotify.com/cefbuilds/"
392- $CefBuildServerJsonPackageList = $CefBuildServerUrl + " index.json"
391+ $Client = New-Object System.Net.WebClient;
392+ $CefBuildServerUrl = ' http://cef.perlun.eu.org/'
393393
394- $CefBuildsJson = Invoke-WebRequest - Uri $CefBuildServerJsonPackageList | ConvertFrom-Json
395- $CefWin32CefVersion = $CefBuildsJson .windows32.versions | Where-Object { $_ .cef_version -eq $CefVersion }
396- $CefWin64CefVersion = $CefBuildsJson .windows64.versions | Where-Object { $_ .cef_version -eq $CefVersion }
394+ # Ugly and hardwired for the sake of this very temporary branch.
395+ $Cef32FileName = ' cef_binary_3.3202.1690.gcd6b88f_windows32_minimal.tar.bz2 '
396+ $Cef64FileName = ' cef_binary_3.3202.1690.gcd6b88f_windows64_minimal.tar.bz2 '
397397
398- $Cef32FileName = ($CefWin32CefVersion.files | Where-Object {$_.type -eq " standard" }).name
399- $Cef64FileName = ($CefWin64CefVersion.files | Where-Object {$_.type -eq " standard" }).name
398+ set-alias sz " $env: ProgramFiles \7-Zip\7z.exe"
400399
401- # Make sure there is a 32bit and 64bit version for the specified build
402- if ($CefWin32CefVersion.cef_version -ne $CefWin64CefVersion.cef_version )
403- {
404- Die ' Win32 version is $CefWin32CefVersion.cef_version and Win64 version is $CefWin64CefVersion.cef_version - both must be the same'
405- }
400+ $LocalFile = Join-Path $WorkingDir $Cef32FileName
406401
407- set-alias sz " $env: ProgramFiles \7-Zip\7z.exe"
408-
409- $LocalFile = Join-Path $WorkingDir $Cef32FileName
402+ if (-not (Test-Path $LocalFile ))
403+ {
404+ $Url = $CefBuildServerUrl + $Cef32FileName
405+ Write-Diagnostic " Downloading $Url ; this will take a while as the file is approximately 80 MiB large."
406+ $Client.DownloadFile ($Url , $LocalFile );
407+ Write-Diagnostic " Download $Cef32FileName complete"
408+ }
410409
411- if (-not (Test-Path $LocalFile ))
412- {
413- Write-Diagnostic " Downloading $Cef32FileName ; this will take a while as the file is approximately 200 MiB large."
414- $Client.DownloadFile ($CefBuildServerUrl + $Cef32FileName , $LocalFile );
415- Write-Diagnostic " Download $Cef32FileName complete"
416- }
410+ if (-not (Test-Path (Join-Path $Cef32 ' \include\cef_version.h' )))
411+ {
412+ # Extract bzip file
413+ sz e $LocalFile
417414
418- if (-not (Test-Path (Join-Path $Cef32 ' \include\cef_version.h' )))
419- {
420- # Extract bzip file
421- sz e $LocalFile
422- # Extract tar file
423- $TarFile = ($LocalFile ).Substring(0 , $LocalFile.length - 4 )
424- sz x $TarFile
425- # Sleep for a short period to allow 7z to release it's file handles
426- sleep - m 2000
427- # Remove tar file
428- Remove-Item $TarFile
429- $Folder = Join-Path $WorkingDir ($Cef32FileName.Substring (0 , $Cef32FileName.length - 8 ))
430- Move-Item ($Folder + ' \*' ) $Cef32 - force
431- Remove-Item $Folder
432- }
415+ # Extract tar file
416+ $TarFile = ($LocalFile ).Substring(0 , $LocalFile.length - 4 )
417+ sz x $TarFile
433418
434- $LocalFile = Join-Path $WorkingDir $Cef64FileName
419+ # Sleep for a short period to allow 7z to release it's file handles
420+ sleep - m 2000
435421
436- if (-not (Test-Path $LocalFile ))
437- {
438-
439- Write-Diagnostic " Downloading $Cef64FileName ; this will take a while as the file is approximately 200 MiB large."
440- $Client.DownloadFile ($CefBuildServerUrl + $Cef64FileName , $LocalFile );
441- Write-Diagnostic " Download $Cef64FileName complete"
442- }
422+ Remove-Item $TarFile
423+ $Folder = Join-Path $WorkingDir ($Cef32FileName.Substring (0 , $Cef32FileName.length - 8 ))
424+ Move-Item ($Folder + ' \*' ) $Cef32 - force
425+ Remove-Item $Folder
426+ }
443427
444- if (-not (Test-Path (Join-Path $Cef64 ' \include\cef_version.h' )))
445- {
446- # Extract bzip file
447- sz e $LocalFile
448- # Extract tar file
449- $TarFile = ($LocalFile ).Substring(0 , $LocalFile.length - 4 )
450- sz x $TarFile
451- # Sleep for a short period to allow 7z to release it's file handles
452- sleep - m 2000
453- # Remove tar file
454- Remove-Item $TarFile
455- $Folder = Join-Path $WorkingDir ($Cef64FileName.Substring (0 , $Cef64FileName.length - 8 ))
456- Move-Item ($Folder + ' \*' ) $Cef64 - force
457- Remove-Item $Folder
458- }
428+ # TODO: Disabled until my local x64 build is complete.
429+ # $LocalFile = Join-Path $WorkingDir $Cef64FileName
430+
431+ # if(-not (Test-Path $LocalFile))
432+ # {
433+
434+ # Write-Diagnostic "Downloading $Cef64FileName; this will take a while as the file is approximately 80 MiB large."
435+ # $Client.DownloadFile($CefBuildServerUrl + $Cef64FileName, $LocalFile);
436+ # Write-Diagnostic "Download $Cef64FileName complete"
437+ # }
438+
439+ # if(-not (Test-Path (Join-Path $Cef64 '\include\cef_version.h')))
440+ # {
441+ # # Extract bzip file
442+ # sz e $LocalFile
443+ # # Extract tar file
444+ # $TarFile = ($LocalFile).Substring(0, $LocalFile.length - 4)
445+ # sz x $TarFile
446+ # #Sleep for a short period to allow 7z to release it's file handles
447+ # sleep -m 2000
448+ # #Remove tar file
449+ # Remove-Item $TarFile
450+ # $Folder = Join-Path $WorkingDir ($Cef64FileName.Substring(0, $Cef64FileName.length - 8))
451+ # Move-Item ($Folder + '\*') $Cef64 -force
452+ # Remove-Item $Folder
453+ # }
459454}
460455
461456function CopyFromLocalCefBuild ()
462457{
463458 # Example file names from cefsource build:
464- # 32-bit: cef_binary_3.2924.1538.gbfdeccd_windows32 .tar.bz2
465- # 64-bit: cef_binary_3.2924.1538.gbfdeccd_windows64 .tar.bz2
459+ # 32-bit: cef_binary_3.2924.1538.gbfdeccd_windows32_minimal .tar.bz2
460+ # 64-bit: cef_binary_3.2924.1538.gbfdeccd_windows64_minimal .tar.bz2
466461
467462 Write-Host $CefVersion
468463
469- $Cef32FileName = " cef_binary_$ ( $CefVersion ) _windows32 .tar.bz2"
470- $Cef64FileName = " cef_binary_$ ( $CefVersion ) _windows64 .tar.bz2"
464+ $Cef32FileName = " cef_binary_$ ( $CefVersion ) _windows32_minimal .tar.bz2"
465+ $Cef64FileName = " cef_binary_$ ( $CefVersion ) _windows64_minimal .tar.bz2"
471466
472467 set-alias sz " $env: ProgramFiles \7-Zip\7z.exe"
473468
@@ -484,67 +479,68 @@ function CopyFromLocalCefBuild()
484479
485480 if (-not (Test-Path $LocalFile ))
486481 {
487- Write-Diagnostic " Copy $Cef32FileName (approx 200mb)"
482+ Write-Diagnostic " Copy $Cef32FileName (approx 200mb)"
488483 Copy-Item ($CefBuildDir + $Cef32FileName ) $LocalFile
489- Write-Diagnostic " Copy of $Cef32FileName complete"
484+ Write-Diagnostic " Copy of $Cef32FileName complete"
490485 }
491486
492487 if (-not (Test-Path (Join-Path $Cef32 ' \include\cef_version.h' )))
493488 {
494- # Extract bzip file
495- sz e $LocalFile
496- # Extract tar file
497- $TarFile = ($LocalFile ).Substring(0 , $LocalFile.length - 4 )
498- sz x $TarFile
499- # Sleep for a short period to allow 7z to release it's file handles
500- sleep - m 2000
501- # Remove tar file
502- Remove-Item $TarFile
489+ # Extract bzip file
490+ sz e $LocalFile
491+ # Extract tar file
492+ $TarFile = ($LocalFile ).Substring(0 , $LocalFile.length - 4 )
493+ sz x $TarFile
494+ # Sleep for a short period to allow 7z to release it's file handles
495+ sleep - m 2000
496+ # Remove tar file
497+ Remove-Item $TarFile
503498 $Folder = Join-Path $WorkingDir ($Cef32FileName.Substring (0 , $Cef32FileName.length - 8 ))
504499 Move-Item ($Folder + ' \*' ) $Cef32 - force
505500 Remove-Item $Folder
506501 }
507502
508- $LocalFile = Join-Path $WorkingDir $Cef64FileName
509-
510- if (-not (Test-Path $LocalFile ))
511- {
512-
513- Write-Diagnostic " Copy $Cef64FileName (approx 200mb)"
514- Copy-Item ($CefBuildDir + $Cef64FileName ) $LocalFile ;
515- Write-Diagnostic " Copy of $Cef64FileName complete"
516- }
517-
518- if (-not (Test-Path (Join-Path $Cef64 ' \include\cef_version.h' )))
519- {
520- # Extract bzip file
521- sz e $LocalFile
522- # Extract tar file
523- $TarFile = ($LocalFile ).Substring(0 , $LocalFile.length - 4 )
524- sz x $TarFile
525- # Sleep for a short period to allow 7z to release it's file handles
526- sleep - m 2000
527- # Remove tar file
528- Remove-Item $TarFile
529- $Folder = Join-Path $WorkingDir ($Cef64FileName.Substring (0 , $Cef64FileName.length - 8 ))
530- Move-Item ($Folder + ' \*' ) $Cef64 - force
531- Remove-Item $Folder
532- }
503+ # Disabled: my local x64 build of CEF isn't ready yet.
504+ # $LocalFile = Join-Path $WorkingDir $Cef64FileName
505+
506+ # if(-not (Test-Path $LocalFile))
507+ # {
508+
509+ # Write-Diagnostic "Copy $Cef64FileName (approx 200mb)"
510+ # Copy-Item ($CefBuildDir+$Cef64FileName) $LocalFile;
511+ # Write-Diagnostic "Copy of $Cef64FileName complete"
512+ # }
513+
514+ # if(-not (Test-Path (Join-Path $Cef64 '\include\cef_version.h')))
515+ # {
516+ # # Extract bzip file
517+ # sz e $LocalFile
518+ # # Extract tar file
519+ # $TarFile = ($LocalFile).Substring(0, $LocalFile.length - 4)
520+ # sz x $TarFile
521+ # #Sleep for a short period to allow 7z to release it's file handles
522+ # sleep -m 2000
523+ # #Remove tar file
524+ # Remove-Item $TarFile
525+ # $Folder = Join-Path $WorkingDir ($Cef64FileName.Substring(0, $Cef64FileName.length - 8))
526+ # Move-Item ($Folder + '\*') $Cef64 -force
527+ # Remove-Item $Folder
528+ # }
533529}
534530
535531function CheckDependencies ()
536532{
537- # Check for cmake
538- if ((Get-Command " cmake.exe" - ErrorAction SilentlyContinue) -eq $null )
539- {
540- Die " Unable to find cmake.exe in your PATH"
541- }
542-
543- # Check for 7zip
544- if (-not (test-path " $env: ProgramFiles \7-Zip\7z.exe" ))
545- {
546- Die " $env: ProgramFiles \7-Zip\7z.exe is required"
547- }
533+ # Check for cmake
534+ if ((Get-Command " cmake.exe" - ErrorAction SilentlyContinue) -eq $null )
535+ {
536+ Die " Unable to find cmake.exe in your PATH"
537+ }
538+
539+ # Check for 7zip
540+ if (-not (test-path " $env: ProgramFiles \7-Zip\7z.exe" ))
541+ {
542+ Die " $env: ProgramFiles \7-Zip\7z.exe is required"
543+ }
548544}
549545
550546CheckDependencies
@@ -570,7 +566,7 @@ Bootstrap
570566switch - Exact ($Target ) {
571567 " nupkg" {
572568 # VSX v110
573- VSX v120
569+ VSX v120
574570 VSX v140
575571 Nupkg
576572 }
0 commit comments