(sourceHandle->ToPointer());
diff --git a/CefSharp.Core/packages.config b/CefSharp.Core/packages.config
index d52c16f88..bbef23d17 100644
--- a/CefSharp.Core/packages.config
+++ b/CefSharp.Core/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/CefSharp.Example/CefExample.cs b/CefSharp.Example/CefExample.cs
index f27dbfb1d..4dbc80ba4 100644
--- a/CefSharp.Example/CefExample.cs
+++ b/CefSharp.Example/CefExample.cs
@@ -16,6 +16,7 @@ namespace CefSharp.Example
settings.RemoteDebuggingPort = 8088;
//settings.CefCommandLineArgs.Add("renderer-process-limit", "1");
//settings.CefCommandLineArgs.Add("renderer-startup-dialog", "renderer-startup-dialog");
+ settings.LogSeverity = LogSeverity.Verbose;
if (debuggingSubProcess)
{
diff --git a/CefSharp.Example/Resources/Home.html b/CefSharp.Example/Resources/Home.html
index e0f345423..b809dee81 100644
--- a/CefSharp.Example/Resources/Home.html
+++ b/CefSharp.Example/Resources/Home.html
@@ -105,17 +105,17 @@
Perhaps very obvious, but still worth mentioning. Since CefSharp is based on
CEF, which is in turn based on
- Chromium (version 29 for the time being), CefSharp provides
+ Chromium (version 33 for the time being), CefSharp provides
one of the best HTML5 rendering experiences available -
-
- 468-470+ points out of 555
+
+ 470+ points out of 555
on html5test.com. Note:
YMMV
depending on .DLLs you add and features you enable.
Support for both x86 and x64
- Chromium 29 supports both x86 and x64, and so do we as of CefSharp 3.29.0. For the time being, it does not
+ Chromium 33 supports both x86 and x64, and so do we as of CefSharp 33.0.0 For the time being, it does not
"auto-detect" the platform being used (since this is quite complex), so you have to choose either one for
your project. This practically means that you will have to compile & package separate
binaries/installers of your app for x86 and x64 respectively if you want/need to support both of them.
diff --git a/CefSharp.Native.props b/CefSharp.Native.props
index 4c70d3d3a..56b6b68c7 100644
--- a/CefSharp.Native.props
+++ b/CefSharp.Native.props
@@ -1,22 +1,10 @@
-
- x64
- Win32
-
-
-
-
-
-
-
-
-
diff --git a/CefSharp.Test/CefSharp.Test.csproj b/CefSharp.Test/CefSharp.Test.csproj
index d456060a3..0aa234944 100644
--- a/CefSharp.Test/CefSharp.Test.csproj
+++ b/CefSharp.Test/CefSharp.Test.csproj
@@ -135,4 +135,11 @@
-->
+
+
+
+ This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
+
+
+
\ No newline at end of file
diff --git a/CefSharp.Test/packages.config b/CefSharp.Test/packages.config
index ff0fd105c..742fc0821 100644
--- a/CefSharp.Test/packages.config
+++ b/CefSharp.Test/packages.config
@@ -2,6 +2,7 @@
+
\ No newline at end of file
diff --git a/CefSharp.WinForms.Example/BrowserForm.Designer.cs b/CefSharp.WinForms.Example/BrowserForm.Designer.cs
index 35699b84f..56e15ba65 100644
--- a/CefSharp.WinForms.Example/BrowserForm.Designer.cs
+++ b/CefSharp.WinForms.Example/BrowserForm.Designer.cs
@@ -249,17 +249,17 @@
//
// showDevToolsMenuItem
//
- this.showDevToolsMenuItem.Enabled = false;
this.showDevToolsMenuItem.Name = "showDevToolsMenuItem";
this.showDevToolsMenuItem.Size = new System.Drawing.Size(158, 22);
this.showDevToolsMenuItem.Text = "Show Dev Tools";
+ this.showDevToolsMenuItem.Click += new System.EventHandler(this.ShowDevToolsMenuItemClick);
//
// closeDevToolsMenuItem
//
- this.closeDevToolsMenuItem.Enabled = false;
this.closeDevToolsMenuItem.Name = "closeDevToolsMenuItem";
this.closeDevToolsMenuItem.Size = new System.Drawing.Size(158, 22);
this.closeDevToolsMenuItem.Text = "Close Dev Tools";
+ this.closeDevToolsMenuItem.Click += new System.EventHandler(this.CloseDevToolsMenuItemClick);
//
// toolStripMenuItem3
//
diff --git a/CefSharp.WinForms.Example/BrowserForm.cs b/CefSharp.WinForms.Example/BrowserForm.cs
index 76c2b4f6f..4505b1caa 100644
--- a/CefSharp.WinForms.Example/BrowserForm.cs
+++ b/CefSharp.WinForms.Example/BrowserForm.cs
@@ -250,5 +250,15 @@ namespace CefSharp.WinForms.Example
},
TaskScheduler.FromCurrentSynchronizationContext());
}
+
+ private void ShowDevToolsMenuItemClick(object sender, EventArgs e)
+ {
+ browser.ShowDevTools();
+ }
+
+ private void CloseDevToolsMenuItemClick(object sender, EventArgs e)
+ {
+ browser.CloseDevTools();
+ }
}
}
diff --git a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj
index 8a88df10d..c34e16f1f 100644
--- a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj
+++ b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj
@@ -89,6 +89,7 @@
+
@@ -124,4 +125,11 @@
+
+
+
+ This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
+
+
+
\ No newline at end of file
diff --git a/CefSharp.WinForms.Example/Properties/AssemblyInfo.cs b/CefSharp.WinForms.Example/Properties/AssemblyInfo.cs
index 18adc9f5a..0f58787eb 100644
--- a/CefSharp.WinForms.Example/Properties/AssemblyInfo.cs
+++ b/CefSharp.WinForms.Example/Properties/AssemblyInfo.cs
@@ -4,11 +4,6 @@ using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("CefSharp.WinForms.Example")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
[assembly: AssemblyCompany(AssemblyInfo.AssemblyCompany)]
[assembly: AssemblyProduct(AssemblyInfo.AssemblyProduct)]
[assembly: AssemblyCopyright(AssemblyInfo.AssemblyCopyright)]
diff --git a/CefSharp.WinForms.Example/packages.config b/CefSharp.WinForms.Example/packages.config
new file mode 100644
index 000000000..b519c7ce7
--- /dev/null
+++ b/CefSharp.WinForms.Example/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/CefSharp.WinForms/ChromiumWebBrowser.cs b/CefSharp.WinForms/ChromiumWebBrowser.cs
index 9ff07b6b2..2685ed873 100644
--- a/CefSharp.WinForms/ChromiumWebBrowser.cs
+++ b/CefSharp.WinForms/ChromiumWebBrowser.cs
@@ -18,7 +18,7 @@ namespace CefSharp.WinForms
public string Title { get; set; }
public bool IsLoading { get; private set; }
public string TooltipText { get; private set; }
- public string Address { get; set; }
+ public string Address { get; private set; }
public IDialogHandler DialogHandler { get; set; }
public IJsDialogHandler JsDialogHandler { get; set; }
@@ -249,21 +249,14 @@ namespace CefSharp.WinForms
managedCefBrowserAdapter.StopFinding(clearSelection);
}
- void IWebBrowserInternal.ShowDevTools()
+ public void ShowDevTools()
{
- // TODO: Do something about this one.
- var devToolsUrl = managedCefBrowserAdapter.DevToolsUrl;
- throw new NotImplementedException("Implement when Cef upgraded to 1750.");
+ managedCefBrowserAdapter.ShowDevTools();
}
- void IWebBrowserInternal.CloseDevTools()
+ public void CloseDevTools()
{
- throw new NotImplementedException("Implement when Cef upgraded to 1750.");
- }
-
- public string DevToolsUrl
- {
- get { return managedCefBrowserAdapter.DevToolsUrl; }
+ managedCefBrowserAdapter.CloseDevTools();
}
public void Stop()
diff --git a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj
index 57748065b..219ed33d4 100644
--- a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj
+++ b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj
@@ -129,6 +129,7 @@
+
@@ -156,22 +157,13 @@
-
- x64
- Win32
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
+
+
+
\ No newline at end of file
diff --git a/CefSharp.Wpf.Example/Properties/AssemblyInfo.cs b/CefSharp.Wpf.Example/Properties/AssemblyInfo.cs
index d4e530020..c747afb17 100644
--- a/CefSharp.Wpf.Example/Properties/AssemblyInfo.cs
+++ b/CefSharp.Wpf.Example/Properties/AssemblyInfo.cs
@@ -1,10 +1,13 @@
-using System.Reflection;
+using System;
+using System.Reflection;
using System.Runtime.InteropServices;
+using CefSharp;
[assembly: AssemblyTitle("CefSharp.Wpf.Example")]
-[assembly: AssemblyCompany("The CefSharp Authors")]
-[assembly: AssemblyProduct("CefSharp")]
-[assembly: AssemblyCopyright("Copyright © The CefSharp Authors 2010-2014")]
-
-[assembly: AssemblyVersion("3.29.0.0")]
-[assembly: ComVisible(false)]
+[assembly: AssemblyCompany(AssemblyInfo.AssemblyCompany)]
+[assembly: AssemblyProduct(AssemblyInfo.AssemblyProduct)]
+[assembly: AssemblyCopyright(AssemblyInfo.AssemblyCopyright)]
+[assembly: ComVisible(AssemblyInfo.ComVisible)]
+[assembly: AssemblyVersion(AssemblyInfo.AssemblyVersion)]
+[assembly: AssemblyFileVersion(AssemblyInfo.AssemblyFileVersion)]
+[assembly: CLSCompliant(AssemblyInfo.ClsCompliant)]
diff --git a/CefSharp.Wpf.Example/packages.config b/CefSharp.Wpf.Example/packages.config
new file mode 100644
index 000000000..b519c7ce7
--- /dev/null
+++ b/CefSharp.Wpf.Example/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs
index 9fe8c1bc5..5e800ae28 100644
--- a/CefSharp.Wpf/ChromiumWebBrowser.cs
+++ b/CefSharp.Wpf/ChromiumWebBrowser.cs
@@ -148,21 +148,7 @@ namespace CefSharp.Wpf
return;
}
- if (!Cef.IsInitialized &&
- !Cef.Initialize())
- {
- throw new InvalidOperationException("Cef::Initialize() failed");
- }
-
- // TODO: Consider making the delay here configurable.
- tooltipTimer = new DispatcherTimer(
- TimeSpan.FromSeconds(0.5),
- DispatcherPriority.Render,
- OnTooltipTimerTick,
- Dispatcher
- );
-
- managedCefBrowserAdapter.LoadUrl(newValue);
+ Load(newValue);
}
#endregion Address dependency property
@@ -944,7 +930,21 @@ namespace CefSharp.Wpf
public void Load(string url)
{
- throw new NotImplementedException();
+ if (!Cef.IsInitialized &&
+ !Cef.Initialize())
+ {
+ throw new InvalidOperationException("Cef::Initialize() failed");
+ }
+
+ // TODO: Consider making the delay here configurable.
+ tooltipTimer = new DispatcherTimer(
+ TimeSpan.FromSeconds(0.5),
+ DispatcherPriority.Render,
+ OnTooltipTimerTick,
+ Dispatcher
+ );
+
+ managedCefBrowserAdapter.LoadUrl(url);
}
public void LoadHtml(string html, string url)
@@ -1051,21 +1051,14 @@ namespace CefSharp.Wpf
});
}
- void IWebBrowserInternal.ShowDevTools()
+ public void ShowDevTools()
{
- // TODO: Do something about this one.
- var devToolsUrl = managedCefBrowserAdapter.DevToolsUrl;
- throw new NotImplementedException("Implement when Cef upgraded to 1750.");
+ managedCefBrowserAdapter.ShowDevTools();
}
- void IWebBrowserInternal.CloseDevTools()
+ public void CloseDevTools()
{
- throw new NotImplementedException("Implement when Cef upgraded to 1750.");
- }
-
- public string DevToolsUrl
- {
- get { return managedCefBrowserAdapter.DevToolsUrl; }
+ managedCefBrowserAdapter.CloseDevTools();
}
void IWebBrowserInternal.OnFrameLoadStart(string url, bool isMainFrame)
diff --git a/CefSharp/IWebBrowser.cs b/CefSharp/IWebBrowser.cs
index 33b906d7b..a453ed2af 100644
--- a/CefSharp/IWebBrowser.cs
+++ b/CefSharp/IWebBrowser.cs
@@ -141,13 +141,12 @@ namespace CefSharp
bool CanReload { get; }
///
- /// The address (URL) which the browser control is currently displaying. Can be set to a simplified URL
- /// (e.g. www.google.com) or a full URL (e.g. http://www.google.com). Will automatically be updated as the user
- /// navigates to another page (e.g. by clicking on a link).
+ /// The address (URL) which the browser control is currently displaying.
+ /// Will automatically be updated as the user navigates to another page (e.g. by clicking on a link).
///
/// In the WPF control, this property is implemented as a Dependency Property and fully supports data
/// binding.
- string Address { get; set; }
+ string Address { get; }
///
/// The title of the web page being currently displayed.
@@ -169,11 +168,6 @@ namespace CefSharp
/// binding.
double ZoomLevel { get; set; }
- ///
- /// Url which can be loaded in a browser control to view the dev tools
- ///
- string DevToolsUrl { get; }
-
///
/// Search for text within the current page.
///
@@ -248,5 +242,15 @@ namespace CefSharp
/// Opens a Print Dialog which if used (can be user cancelled) will print the browser contents.
///
void Print();
+
+ ///
+ /// Open developer tools in its own window.
+ ///
+ void ShowDevTools();
+
+ ///
+ /// Explicitly close the developer tools window if one exists for this browser instance.
+ ///
+ void CloseDevTools();
}
}
diff --git a/CefSharp/Internals/IWebBrowserInternal.cs b/CefSharp/Internals/IWebBrowserInternal.cs
index 0c57c2c55..403189119 100644
--- a/CefSharp/Internals/IWebBrowserInternal.cs
+++ b/CefSharp/Internals/IWebBrowserInternal.cs
@@ -13,8 +13,6 @@ namespace CefSharp.Internals
void SetNavState(bool canGoBack, bool canGoForward, bool canReload);
void SetTitle(string title);
void SetTooltipText(string tooltipText);
- void ShowDevTools();
- void CloseDevTools();
void OnFrameLoadStart(string url, bool isMainFrame);
void OnFrameLoadEnd(string url, bool isMainFrame, int httpStatusCode);
diff --git a/CefSharp/Properties/AssemblyInfo.cs b/CefSharp/Properties/AssemblyInfo.cs
index 0145b2ed8..305a8a77d 100644
--- a/CefSharp/Properties/AssemblyInfo.cs
+++ b/CefSharp/Properties/AssemblyInfo.cs
@@ -33,8 +33,8 @@ namespace CefSharp
public const bool ComVisible = false;
public const string AssemblyCompany = "The CefSharp Authors";
public const string AssemblyProduct = "CefSharp";
- public const string AssemblyVersion = "31.0.0.0";
- public const string AssemblyFileVersion = "31.0.0.0";
+ public const string AssemblyVersion = "33.0.0.0";
+ public const string AssemblyFileVersion = "33.0.0.0";
public const string AssemblyCopyright = "Copyright © The CefSharp Authors 2010-2014";
public const string CefSharpCoreProject = "CefSharp.Core, PublicKey=" + PublicKey;
public const string CefSharpBrowserSubprocessProject = "CefSharp.BrowserSubprocess, PublicKey=" + PublicKey;
diff --git a/NuGet/CefSharp.Common.nuspec b/NuGet/CefSharp.Common.nuspec
index 7322252e7..7533eacb5 100644
--- a/NuGet/CefSharp.Common.nuspec
+++ b/NuGet/CefSharp.Common.nuspec
@@ -12,7 +12,7 @@
chrome browser
Copyright © 2010-2014 The CefSharp Authors
-
+
diff --git a/NuGet/CefSharp.WinForms.nuspec b/NuGet/CefSharp.WinForms.nuspec
new file mode 100644
index 000000000..01c2da4e6
--- /dev/null
+++ b/NuGet/CefSharp.WinForms.nuspec
@@ -0,0 +1,26 @@
+
+
+
+ CefSharp.WinForms
+ $version$
+ The CefSharp Authors
+ The CefSharp Authors
+ https://github.com/cefsharp/cefsharp
+ https://raw.github.com/cefsharp/CefSharp/master/LICENSE
+ false
+ The CefSharp Chromium-based browser component (WinForms control).
+ winforms chrome browser
+ Copyright © 2010-2014 The CefSharp Authors
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/NuGet/CefSharp.WinForms.props b/NuGet/CefSharp.WinForms.props
index c30b8d881..05acaa714 100644
--- a/NuGet/CefSharp.WinForms.props
+++ b/NuGet/CefSharp.WinForms.props
@@ -1,6 +1,10 @@
-
+
+
+
diff --git a/NuGet/pack.bat b/NuGet/pack.bat
index a64816511..093e6136f 100644
--- a/NuGet/pack.bat
+++ b/NuGet/pack.bat
@@ -1,19 +1,4 @@
-if "%APPVEYOR_BUILD_NUMBER%"=="" (
- set APPVEYOR_BUILD_NUMBER=10000
-)
-
-set version=31.0.0-JSWIP-PRE-%APPVEYOR_BUILD_NUMBER%
-REM set platform=x86
-
-if "%platform%"=="x64" (
- set DotPlatform=.x64
- set CPlatform=x64
-) else (
- set Platform=x86
- set DotPlatform=.x86
- set CPlatform=Win32
-)
-
-NuGet pack CefSharp.Common.nuspec -NoPackageAnalysis -Version %version% -Properties DotPlatform=%DotPlatform%;Platform=%Platform%;CPlatform=%CPlatform%
-NuGet pack CefSharp.WpfOrWinForms.nuspec -NoPackageAnalysis -Version %version% -Properties ControlType=Wpf;DotPlatform=%DotPlatform%;Platform=%Platform%
-NuGet pack CefSharp.WpfOrWinForms.nuspec -NoPackageAnalysis -Version %version% -Properties ControlType=WinForms;DotPlatform=%DotPlatform%;Platform=%Platform%
+set version=33.0.0-pre2
+NuGet pack CefSharp.Common.nuspec -NoPackageAnalysis -Version %version%
+NuGet pack CefSharp.Wpf.nuspec -NoPackageAnalysis -Version %version%
+NuGet pack CefSharp.WinForms.nuspec -NoPackageAnalysis -Version %version%
diff --git a/build.ps1 b/build.ps1
new file mode 100644
index 000000000..5413daef8
--- /dev/null
+++ b/build.ps1
@@ -0,0 +1,246 @@
+param(
+ [ValidateSet("vs2013", "vs2012", "nupkg", "nupkg-only")]
+ [Parameter(Position = 0)]
+ [string] $Target = "nupkg",
+ [Parameter(Position = 1)]
+ [string] $Version = "33.0.0-pre2"
+)
+
+$WorkingDir = split-path -parent $MyInvocation.MyCommand.Definition
+
+$CefSln = Join-Path $WorkingDir 'CefSharp3.sln'
+
+# https://github.com/jbake/Powershell_scripts/blob/master/Invoke-BatchFile.ps1
+function Invoke-BatchFile
+{
+ param(
+ [Parameter(Position = 0, Mandatory = $true, ValueFromPipeline = $true)]
+ [string]$Path,
+ [Parameter(Position = 1, Mandatory = $true, ValueFromPipeline = $true)]
+ [string]$Parameters
+ )
+
+ $tempFile = [IO.Path]::GetTempFileName()
+
+ cmd.exe /c " `"$Path`" $Parameters && set > `"$tempFile`" "
+
+ Get-Content $tempFile | Foreach-Object {
+ if ($_ -match "^(.*?)=(.*)$")
+ {
+ Set-Content "env:\$($matches[1])" $matches[2]
+ }
+ }
+
+ Remove-Item $tempFile
+}
+
+function Write-Diagnostic
+{
+ param(
+ [Parameter(Position = 0, Mandatory = $true, ValueFromPipeline = $true)]
+ [string] $Message
+ )
+
+ Write-Host
+ Write-Host $Message -ForegroundColor Green
+ Write-Host
+}
+
+function Die
+{
+ param(
+ [Parameter(Position = 0, ValueFromPipeline = $true)]
+ [string] $Message
+ )
+
+ Write-Host
+ Write-Error $Message
+ exit 1
+}
+
+function Warn
+{
+ param(
+ [Parameter(Position = 0, ValueFromPipeline = $true)]
+ [string] $Message
+ )
+
+ Write-Host
+ Write-Host $Message -ForegroundColor Yellow
+ Write-Host
+}
+
+function TernaryReturn
+{
+ param(
+ [Parameter(Position = 0, ValueFromPipeline = $true)]
+ [bool] $Yes,
+ [Parameter(Position = 1, ValueFromPipeline = $true)]
+ $Value,
+ [Parameter(Position = 2, ValueFromPipeline = $true)]
+ $Value2
+ )
+
+ if($Yes) {
+ return $Value
+ }
+
+ $Value2
+}
+
+function Msvs
+{
+ param(
+ [ValidateSet('v110', 'v120')]
+ [Parameter(Position = 0, ValueFromPipeline = $true)]
+ [string] $Toolchain,
+
+ [Parameter(Position = 1, ValueFromPipeline = $true)]
+ [ValidateSet('Debug', 'Release')]
+ [string] $Configuration,
+
+ [Parameter(Position = 2, ValueFromPipeline = $true)]
+ [ValidateSet('x86', 'x64')]
+ [string] $Platform
+ )
+
+ Write-Diagnostic "Targeting $Toolchain using configuration $Configuration on platform $Platform"
+
+ $VisualStudioVersion = $null
+ $VXXCommonTools = $null
+
+ switch -Exact ($Toolchain) {
+ 'v110' {
+ $VisualStudioVersion = '11.0'
+ $VXXCommonTools = Join-Path $env:VS110COMNTOOLS '..\..\vc'
+ }
+ 'v120' {
+ $VisualStudioVersion = '12.0'
+ $VXXCommonTools = Join-Path $env:VS120COMNTOOLS '..\..\vc'
+ }
+ }
+
+ if ($VXXCommonTools -eq $null -or (-not (Test-Path($VXXCommonTools)))) {
+ Die 'Error unable to find any visual studio environment'
+ }
+
+ $VCVarsAll = Join-Path $VXXCommonTools vcvarsall.bat
+ if (-not (Test-Path $VCVarsAll)) {
+ Die "Unable to find $VCVarsAll"
+ }
+
+ # Only configure build environment once
+ if($env:CEFSHARP_BUILD_IS_BOOTSTRAPPED -eq $null) {
+ Invoke-BatchFile $VCVarsAll $Platform
+ $env:CEFSHARP_BUILD_IS_BOOTSTRAPPED = $true
+ }
+
+ $Arch = TernaryReturn ($Platform -eq 'x64') 'x64' 'win32'
+
+ $Arguments = @(
+ "$CefSln",
+ "/t:rebuild",
+ "/p:VisualStudioVersion=$VisualStudioVersion",
+ "/p:Configuration=$Configuration",
+ "/p:Platform=$Arch"
+ )
+
+ $StartInfo = New-Object System.Diagnostics.ProcessStartInfo
+ $StartInfo.FileName = "msbuild.exe"
+ $StartInfo.Arguments = $Arguments
+
+ $StartInfo.EnvironmentVariables.Clear()
+
+ Get-ChildItem -Path env:* | ForEach-Object {
+ $StartInfo.EnvironmentVariables.Add($_.Name, $_.Value)
+ }
+
+ $StartInfo.UseShellExecute = $false
+ $StartInfo.CreateNoWindow = $false
+
+ $Process = New-Object System.Diagnostics.Process
+ $Process.StartInfo = $startInfo
+ $Process.Start()
+ $Process.WaitForExit()
+
+ if($Process.ExitCode -ne 0) {
+ Die "Build failed"
+ }
+}
+
+function VSX
+{
+ param(
+ [ValidateSet('v110', 'v120')]
+ [Parameter(Position = 0, ValueFromPipeline = $true)]
+ [string] $Toolchain
+ )
+
+ if($Toolchain -eq 'v120' -and $env:VS120COMNTOOLS -eq $null) {
+ Warn "Toolchain $Toolchain is not installed on your development machine, skipping build."
+ Return
+ }
+
+ if($Toolchain -eq 'v110' -and $env:VS110COMNTOOLS -eq $null) {
+ Warn "Toolchain $Toolchain is not installed on your development machine, skipping build."
+ Return
+ }
+
+ Write-Diagnostic "Starting to build targeting toolchain $Toolchain"
+
+ Msvs "$Toolchain" 'Release' 'x86'
+ Msvs "$Toolchain" 'Release' 'x64'
+
+ Write-Diagnostic "Finished build targeting toolchain $Toolchain"
+}
+
+function NugetPackageRestore
+{
+ $nuget = Join-Path $env:LOCALAPPDATA .\nuget\NuGet.exe
+ if(-not (Test-Path $nuget)) {
+ Die "Please install nuget. More information available at: http://docs.nuget.org/docs/start-here/installing-nuget"
+ }
+
+ Write-Diagnostic "Restore Nuget Packages"
+
+ # Restore packages
+ . $nuget restore $CefSln
+}
+
+function Nupkg
+{
+ $nuget = Join-Path $env:LOCALAPPDATA .\nuget\NuGet.exe
+ if(-not (Test-Path $nuget)) {
+ Die "Please install nuget. More information available at: http://docs.nuget.org/docs/start-here/installing-nuget"
+ }
+
+ Write-Diagnostic "Building nuget package"
+
+ # Build packages
+ . $nuget pack nuget\CefSharp.Common.nuspec -NoPackageAnalysis -Version $Version -OutputDirectory nuget
+ . $nuget pack nuget\CefSharp.Wpf.nuspec -NoPackageAnalysis -Version $Version -OutputDirectory nuget
+ . $nuget pack nuget\CefSharp.WinForms.nuspec -NoPackageAnalysis -Version $Version -OutputDirectory nuget
+}
+
+NugetPackageRestore
+
+switch -Exact ($Target) {
+ "nupkg"
+ {
+ VSX v120
+ #VSX v110
+ Nupkg
+ }
+ "nupkg-only"
+ {
+ Nupkg
+ }
+ "vs2013"
+ {
+ VSX v120
+ }
+ "vs2012"
+ {
+ VSX v110
+ }
+}
\ No newline at end of file