mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-14 12:15:48 +02:00
Add a script to fix browser project references after updating CEF
This commit is contained in:
parent
a867e1fc40
commit
8078c0081a
13
Resources/PostCefUpdate.ps1
Normal file
13
Resources/PostCefUpdate.ps1
Normal file
@ -0,0 +1,13 @@
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$MainProj = "..\TweetDuck.csproj"
|
||||
$BrowserProj = "..\subprocess\TweetDuck.Browser.csproj"
|
||||
|
||||
$Match = Select-String -Path $MainProj '<Import Project="packages\\CefSharp\.Common\.(.*?)\\'
|
||||
$Version = $Match.Matches[0].Groups[1].Value
|
||||
|
||||
$Contents = [IO.File]::ReadAllText($BrowserProj)
|
||||
$Contents = $Contents -Replace '(?<=<HintPath>\.\.\\packages\\CefSharp\.Common\.)(.*?)(?=\\)', $Version
|
||||
$Contents = $Contents -Replace '(?<=<Reference Include="CefSharp\.BrowserSubprocess\.Core, Version=)(\d+)', $Version.Split(".")[0]
|
||||
|
||||
[IO.File]::WriteAllText($BrowserProj, $Contents)
|
Loading…
Reference in New Issue
Block a user