From 26e6a09d5a7b476d8f8a95fb31c66a721962b3e3 Mon Sep 17 00:00:00 2001
From: chylex <contact@chylex.com>
Date: Sat, 29 Jan 2022 15:01:06 +0100
Subject: [PATCH] Fix PostCefUpdate.ps1 script

---
 windows/TweetDuck/Resources/PostCefUpdate.ps1 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/windows/TweetDuck/Resources/PostCefUpdate.ps1 b/windows/TweetDuck/Resources/PostCefUpdate.ps1
index 1ff4c67d..ff2688ab 100644
--- a/windows/TweetDuck/Resources/PostCefUpdate.ps1
+++ b/windows/TweetDuck/Resources/PostCefUpdate.ps1
@@ -2,12 +2,12 @@ $ErrorActionPreference = "Stop"
 
 try{
   $mainProj = "..\TweetDuck.csproj"
-  $browserProj = "..\subprocess\TweetDuck.Browser.csproj"
+  $browserProj = "..\..\TweetDuck.Browser\TweetDuck.Browser.csproj"
   
-  $cefMatch = Select-String -Path $mainProj '<Import Project="packages\\cef\.redist\.x86\.(.*?)\\'
+  $cefMatch = Select-String -Path $mainProj '<Import Project="..\\..\\packages\\cef\.redist\.x86\.(.*?)\\'
   $cefVersion = $cefMatch.Matches[0].Groups[1].Value
   
-  $sharpMatch = Select-String -Path $mainProj '<Import Project="packages\\CefSharp\.Common\.(.*?)\\'
+  $sharpMatch = Select-String -Path $mainProj '<Import Project="..\\..\\packages\\CefSharp\.Common\.(.*?)\\'
   $sharpVersion = $sharpMatch.Matches[0].Groups[1].Value
   
   # Greetings
@@ -23,7 +23,7 @@ try{
   Write-Host "Updating browser subprocess reference..."
   
   $contents = [IO.File]::ReadAllText($browserProj)
-  $contents = $contents -Replace '(?<=<HintPath>\.\.\\packages\\CefSharp\.Common\.)(.*?)(?=\\)', $sharpVersion
+  $contents = $contents -Replace '(?<=<HintPath>\.\.\\\.\.\\packages\\CefSharp\.Common\.)(.*?)(?=\\)', $sharpVersion
   $contents = $contents -Replace '(?<=<Reference Include="CefSharp, Version=)(\d+)', $sharpVersion.Split(".")[0]
   $contents = $contents -Replace '(?<=<Reference Include="CefSharp\.BrowserSubprocess\.Core, Version=)(\d+)', $sharpVersion.Split(".")[0]