diff --git a/CefSharp3.sln b/CefSharp3.sln index 3469e0ec43..4a0cc42ca3 100644 --- a/CefSharp3.sln +++ b/CefSharp3.sln @@ -42,15 +42,26 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CefSharp.WinForms.Example", EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuGet", "NuGet", "{A23AA466-1903-44F2-946D-25AD0500D56B}" ProjectSection(SolutionItems) = preProject + NuGet\CefSharp.Common.app.config.x64.transform = NuGet\CefSharp.Common.app.config.x64.transform + NuGet\CefSharp.Common.app.config.x86.transform = NuGet\CefSharp.Common.app.config.x86.transform NuGet\CefSharp.Common.nuspec = NuGet\CefSharp.Common.nuspec NuGet\CefSharp.Common.props = NuGet\CefSharp.Common.props NuGet\CefSharp.Common.targets = NuGet\CefSharp.Common.targets + NuGet\CefSharp.OffScreen.app.config.x64.transform = NuGet\CefSharp.OffScreen.app.config.x64.transform + NuGet\CefSharp.OffScreen.app.config.x86.transform = NuGet\CefSharp.OffScreen.app.config.x86.transform NuGet\CefSharp.OffScreen.nuspec = NuGet\CefSharp.OffScreen.nuspec NuGet\CefSharp.OffScreen.props = NuGet\CefSharp.OffScreen.props + NuGet\CefSharp.OffScreen.targets = NuGet\CefSharp.OffScreen.targets + NuGet\CefSharp.WinForms.app.config.x64.transform = NuGet\CefSharp.WinForms.app.config.x64.transform + NuGet\CefSharp.WinForms.app.config.x86.transform = NuGet\CefSharp.WinForms.app.config.x86.transform NuGet\CefSharp.WinForms.nuspec = NuGet\CefSharp.WinForms.nuspec NuGet\CefSharp.WinForms.props = NuGet\CefSharp.WinForms.props + NuGet\CefSharp.WinForms.targets = NuGet\CefSharp.WinForms.targets + NuGet\CefSharp.Wpf.app.config.x64.transform = NuGet\CefSharp.Wpf.app.config.x64.transform + NuGet\CefSharp.Wpf.app.config.x86.transform = NuGet\CefSharp.Wpf.app.config.x86.transform NuGet\CefSharp.Wpf.nuspec = NuGet\CefSharp.Wpf.nuspec NuGet\CefSharp.Wpf.props = NuGet\CefSharp.Wpf.props + NuGet\CefSharp.Wpf.targets = NuGet\CefSharp.Wpf.targets NuGet\Readme.txt = NuGet\Readme.txt EndProjectSection EndProject diff --git a/NuGet/CefSharp.Common.app.config.x64.transform b/NuGet/CefSharp.Common.app.config.x64.transform new file mode 100644 index 0000000000..fc03b7a548 --- /dev/null +++ b/NuGet/CefSharp.Common.app.config.x64.transform @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NuGet/CefSharp.Common.app.config.x86.transform b/NuGet/CefSharp.Common.app.config.x86.transform new file mode 100644 index 0000000000..aae29d53dd --- /dev/null +++ b/NuGet/CefSharp.Common.app.config.x86.transform @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NuGet/CefSharp.Common.nuspec b/NuGet/CefSharp.Common.nuspec index df8826e48c..f83624180f 100644 --- a/NuGet/CefSharp.Common.nuspec +++ b/NuGet/CefSharp.Common.nuspec @@ -49,6 +49,8 @@ + + diff --git a/NuGet/CefSharp.Common.targets b/NuGet/CefSharp.Common.targets index 95c9d915cc..eb867999d1 100644 --- a/NuGet/CefSharp.Common.targets +++ b/NuGet/CefSharp.Common.targets @@ -1,77 +1,57 @@ - - - - - - . - - + + + + + x86\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + Include + false + + + x86\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + Include + false + + + + - - - $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Include - false - - - $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Include - false - - - - - - $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Include - false - - - $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Include - false - - - - - - $(CefSharpTargetDir)\x86\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Include - false - - - $(CefSharpTargetDir)\x64\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Include - false - - - $(CefSharpTargetDir)\x86\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Include - false - - - $(CefSharpTargetDir)\x64\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Include - false - - + + + + + x64\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + Include + false + + + x64\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + Include + false + + + + + + + + + + + + diff --git a/NuGet/CefSharp.OffScreen.app.config.x64.transform b/NuGet/CefSharp.OffScreen.app.config.x64.transform new file mode 100644 index 0000000000..4bcd4ce565 --- /dev/null +++ b/NuGet/CefSharp.OffScreen.app.config.x64.transform @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NuGet/CefSharp.OffScreen.app.config.x86.transform b/NuGet/CefSharp.OffScreen.app.config.x86.transform new file mode 100644 index 0000000000..89103a4bfb --- /dev/null +++ b/NuGet/CefSharp.OffScreen.app.config.x86.transform @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NuGet/CefSharp.OffScreen.nuspec b/NuGet/CefSharp.OffScreen.nuspec index 5719d7f412..215086c59c 100644 --- a/NuGet/CefSharp.OffScreen.nuspec +++ b/NuGet/CefSharp.OffScreen.nuspec @@ -39,6 +39,8 @@ + + diff --git a/NuGet/CefSharp.OffScreen.targets b/NuGet/CefSharp.OffScreen.targets index 58a72c0b88..db09cf3a33 100644 --- a/NuGet/CefSharp.OffScreen.targets +++ b/NuGet/CefSharp.OffScreen.targets @@ -1,53 +1,43 @@ - - . - - - + - + - $(CefSharpTargetDir)\x86\%(RecursiveDir)%(FileName)%(Extension) + x86\%(RecursiveDir)%(FileName)%(Extension) PreserveNewest Include false - - $(CefSharpTargetDir)\x64\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Include - false - - + - + + + + - $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) + x64\%(RecursiveDir)%(FileName)%(Extension) PreserveNewest Include false - - - - - $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Include - false - - - + + + + + + + + diff --git a/NuGet/CefSharp.WinForms.app.config.x64.transform b/NuGet/CefSharp.WinForms.app.config.x64.transform new file mode 100644 index 0000000000..ca5c385a77 --- /dev/null +++ b/NuGet/CefSharp.WinForms.app.config.x64.transform @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NuGet/CefSharp.WinForms.app.config.x86.transform b/NuGet/CefSharp.WinForms.app.config.x86.transform new file mode 100644 index 0000000000..dd2f0fc140 --- /dev/null +++ b/NuGet/CefSharp.WinForms.app.config.x86.transform @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NuGet/CefSharp.WinForms.nuspec b/NuGet/CefSharp.WinForms.nuspec index 454b4796c6..79f3485768 100644 --- a/NuGet/CefSharp.WinForms.nuspec +++ b/NuGet/CefSharp.WinForms.nuspec @@ -39,6 +39,8 @@ + + diff --git a/NuGet/CefSharp.WinForms.targets b/NuGet/CefSharp.WinForms.targets index 9cfd4c624a..733488c5d4 100644 --- a/NuGet/CefSharp.WinForms.targets +++ b/NuGet/CefSharp.WinForms.targets @@ -1,53 +1,43 @@ - - . - - - + - + - $(CefSharpTargetDir)\x86\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Include - false - - - $(CefSharpTargetDir)\x64\%(RecursiveDir)%(FileName)%(Extension) + x86\%(RecursiveDir)%(FileName)%(Extension) PreserveNewest Include false - + + + + - $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) + x64\%(RecursiveDir)%(FileName)%(Extension) PreserveNewest - Include - false + Include + false - + - - - - - $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Include - false - - - + + + + + + + + diff --git a/NuGet/CefSharp.Wpf.app.config.x64.transform b/NuGet/CefSharp.Wpf.app.config.x64.transform new file mode 100644 index 0000000000..18fc2dcd7b --- /dev/null +++ b/NuGet/CefSharp.Wpf.app.config.x64.transform @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NuGet/CefSharp.Wpf.app.config.x86.transform b/NuGet/CefSharp.Wpf.app.config.x86.transform new file mode 100644 index 0000000000..0beedfd7d2 --- /dev/null +++ b/NuGet/CefSharp.Wpf.app.config.x86.transform @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NuGet/CefSharp.Wpf.nuspec b/NuGet/CefSharp.Wpf.nuspec index 5f230b32ed..3b1630a4c6 100644 --- a/NuGet/CefSharp.Wpf.nuspec +++ b/NuGet/CefSharp.Wpf.nuspec @@ -39,6 +39,8 @@ + + diff --git a/NuGet/CefSharp.Wpf.targets b/NuGet/CefSharp.Wpf.targets index 701fa70c04..7b894eb5ed 100644 --- a/NuGet/CefSharp.Wpf.targets +++ b/NuGet/CefSharp.Wpf.targets @@ -1,53 +1,43 @@ - - . - - - + - + - $(CefSharpTargetDir)\x86\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Include - false - - - $(CefSharpTargetDir)\x64\%(RecursiveDir)%(FileName)%(Extension) + x86\%(RecursiveDir)%(FileName)%(Extension) PreserveNewest Include false - + + + + - $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) + x64\%(RecursiveDir)%(FileName)%(Extension) PreserveNewest Include false - - - - - $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Include - false - - - + + + + + + + + diff --git a/build.ps1 b/build.ps1 index 6cffe298d1..10828f6d1f 100644 --- a/build.ps1 +++ b/build.ps1 @@ -381,6 +381,18 @@ function WriteVersionToManifest($manifest) [System.IO.File]::WriteAllLines($Filename, $NewString, $Utf8NoBomEncoding) } +function WriteVersionToTransform($transform) +{ + $Filename = Join-Path $WorkingDir $transform + $Regex = 'codeBase version="(.*?)"'; + + $TransformData = Get-Content -Encoding UTF8 $Filename + $NewString = $TransformData -replace $Regex, "codeBase version=""$AssemblyVersion.0""" + + $Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False + [System.IO.File]::WriteAllLines($Filename, $NewString, $Utf8NoBomEncoding) +} + function WriteVersionToResourceFile($resourceFile) { $Filename = Join-Path $WorkingDir $resourceFile @@ -445,6 +457,15 @@ WriteVersionToManifest "CefSharp.Wpf.Example\app.manifest" WriteVersionToResourceFile "CefSharp.BrowserSubprocess.Core\Resource.rc" WriteVersionToResourceFile "CefSharp.Core\Resource.rc" +WriteVersionToTransform "NuGet\CefSharp.Common.app.config.x64.transform" +WriteVersionToTransform "NuGet\CefSharp.Common.app.config.x86.transform" +WriteVersionToTransform "NuGet\CefSharp.OffScreen.app.config.x64.transform" +WriteVersionToTransform "nuget\CefSharp.OffScreen.app.config.x86.transform" +WriteVersionToTransform "NuGet\CefSharp.WinForms.app.config.x64.transform" +WriteVersionToTransform "NuGet\CefSharp.WinForms.app.config.x86.transform" +WriteVersionToTransform "NuGet\CefSharp.Wpf.app.config.x64.transform" +WriteVersionToTransform "NuGet\CefSharp.Wpf.app.config.x86.transform" + switch -Exact ($Target) { "nupkg-only"