Version 5.2.1: Restored .NET 4.0 source compatibility, updated build and
deployment info in Readme.txt.
This commit is contained in:
Родитель
e12345ed24
Коммит
589e2fb9e9
|
@ -73,5 +73,5 @@ using System.Runtime.InteropServices;
|
|||
[assembly: InternalsVisibleTo("ClearScriptTest")]
|
||||
|
||||
[assembly: ComVisible(false)]
|
||||
[assembly: AssemblyVersion("5.2.0.0")]
|
||||
[assembly: AssemblyFileVersion("5.2.0.0")]
|
||||
[assembly: AssemblyVersion("5.2.1.0")]
|
||||
[assembly: AssemblyFileVersion("5.2.1.0")]
|
||||
|
|
|
@ -132,6 +132,14 @@ namespace Microsoft.ClearScript
|
|||
|
||||
#region IScriptEngineException implementation
|
||||
|
||||
/// <summary>
|
||||
/// Gets an <see href="http://en.wikipedia.org/wiki/HRESULT">HRESULT</see> error code if one is available, zero otherwise.
|
||||
/// </summary>
|
||||
int IScriptEngineException.HResult
|
||||
{
|
||||
get { return HResult; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name associated with the script engine instance.
|
||||
/// </summary>
|
||||
|
|
|
@ -132,6 +132,14 @@ namespace Microsoft.ClearScript
|
|||
|
||||
#region IScriptEngineException implementation
|
||||
|
||||
/// <summary>
|
||||
/// Gets an <see href="http://en.wikipedia.org/wiki/HRESULT">HRESULT</see> error code if one is available, zero otherwise.
|
||||
/// </summary>
|
||||
int IScriptEngineException.HResult
|
||||
{
|
||||
get { return HResult; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name associated with the script engine instance.
|
||||
/// </summary>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
Index: tools/gyp/v8.gyp
|
||||
===================================================================
|
||||
--- tools/gyp/v8.gyp (revision 14077)
|
||||
--- tools/gyp/v8.gyp (revision 14518)
|
||||
+++ tools/gyp/v8.gyp (working copy)
|
||||
@@ -32,6 +32,7 @@
|
||||
'targets': [
|
||||
|
|
|
@ -61,5 +61,5 @@
|
|||
|
||||
|
||||
|
||||
#define CLEARSCRIPT_VERSION_STRING "5.2.0.0"
|
||||
#define CLEARSCRIPT_VERSION_COMMA_SEPARATED 5,2,0,0
|
||||
#define CLEARSCRIPT_VERSION_STRING "5.2.1.0"
|
||||
#define CLEARSCRIPT_VERSION_COMMA_SEPARATED 5,2,1,0
|
||||
|
|
|
@ -511,14 +511,15 @@ namespace Microsoft.ClearScript.Windows
|
|||
|
||||
private void ThrowScriptError(Exception exception)
|
||||
{
|
||||
if (exception is COMException)
|
||||
var comException = exception as COMException;
|
||||
if (comException != null)
|
||||
{
|
||||
if (exception.HResult == RawCOMHelpers.HResult.SCRIPT_E_REPORTED)
|
||||
if (comException.ErrorCode == RawCOMHelpers.HResult.SCRIPT_E_REPORTED)
|
||||
{
|
||||
// a script error was reported; the corresponding exception should be in the script frame
|
||||
ThrowScriptError(CurrentScriptFrame.ScriptError ?? CurrentScriptFrame.PendingScriptError);
|
||||
}
|
||||
else if (exception.HResult == RawCOMHelpers.HResult.CLEARSCRIPT_E_HOSTEXCEPTION)
|
||||
else if (comException.ErrorCode == RawCOMHelpers.HResult.CLEARSCRIPT_E_HOSTEXCEPTION)
|
||||
{
|
||||
// A host exception surrogate passed through the COM boundary; this happens
|
||||
// when some script engines are invoked via script item access rather than
|
||||
|
|
|
@ -65,6 +65,7 @@ using System.Dynamic;
|
|||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.InteropServices.Expando;
|
||||
using Microsoft.ClearScript.Util;
|
||||
|
||||
|
@ -127,9 +128,10 @@ namespace Microsoft.ClearScript.Windows
|
|||
return true;
|
||||
}
|
||||
|
||||
if (exception != null)
|
||||
var comException = exception as COMException;
|
||||
if (comException != null)
|
||||
{
|
||||
var hr = exception.HResult;
|
||||
var hr = comException.ErrorCode;
|
||||
if ((hr == RawCOMHelpers.HResult.SCRIPT_E_REPORTED) && (engine.CurrentScriptFrame != null))
|
||||
{
|
||||
scriptError = engine.CurrentScriptFrame.ScriptError ?? engine.CurrentScriptFrame.PendingScriptError;
|
||||
|
@ -156,15 +158,15 @@ namespace Microsoft.ClearScript.Windows
|
|||
scriptError = new ScriptEngineException(engine.Name, "Invalid object or property access", null, RawCOMHelpers.HResult.CLEARSCRIPT_E_SCRIPTITEMEXCEPTION, exception.InnerException);
|
||||
return true;
|
||||
}
|
||||
else if (hr == RawCOMHelpers.HResult.E_INVALIDARG)
|
||||
}
|
||||
else
|
||||
{
|
||||
var argumentException = exception as ArgumentException;
|
||||
if ((argumentException != null) && (argumentException.ParamName == null))
|
||||
{
|
||||
var argumentException = exception as ArgumentException;
|
||||
if ((argumentException != null) && (argumentException.ParamName == null))
|
||||
{
|
||||
// this usually indicates invalid object or property access in VBScript
|
||||
scriptError = new ScriptEngineException(engine.Name, "Invalid object or property access", null, RawCOMHelpers.HResult.CLEARSCRIPT_E_SCRIPTITEMEXCEPTION, exception.InnerException);
|
||||
return true;
|
||||
}
|
||||
// this usually indicates invalid object or property access in VBScript
|
||||
scriptError = new ScriptEngineException(engine.Name, "Invalid object or property access", null, RawCOMHelpers.HResult.CLEARSCRIPT_E_SCRIPTITEMEXCEPTION, exception.InnerException);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -69,5 +69,5 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyCopyright("© Microsoft Corporation")]
|
||||
|
||||
[assembly: ComVisible(false)]
|
||||
[assembly: AssemblyVersion("5.2.0.0")]
|
||||
[assembly: AssemblyFileVersion("5.2.0.0")]
|
||||
[assembly: AssemblyVersion("5.2.1.0")]
|
||||
[assembly: AssemblyFileVersion("5.2.1.0")]
|
||||
|
|
|
@ -69,5 +69,5 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyCopyright("© Microsoft Corporation")]
|
||||
|
||||
[assembly: ComVisible(false)]
|
||||
[assembly: AssemblyVersion("5.2.0.0")]
|
||||
[assembly: AssemblyFileVersion("5.2.0.0")]
|
||||
[assembly: AssemblyVersion("5.2.1.0")]
|
||||
[assembly: AssemblyFileVersion("5.2.1.0")]
|
||||
|
|
|
@ -69,5 +69,5 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyCopyright("© Microsoft Corporation")]
|
||||
|
||||
[assembly: ComVisible(false)]
|
||||
[assembly: AssemblyVersion("5.2.0.0")]
|
||||
[assembly: AssemblyFileVersion("5.2.0.0")]
|
||||
[assembly: AssemblyVersion("5.2.1.0")]
|
||||
[assembly: AssemblyFileVersion("5.2.1.0")]
|
||||
|
|
|
@ -553,7 +553,7 @@ namespace Microsoft.ClearScript.Test
|
|||
var property = member as PropertyInfo;
|
||||
if (property != null)
|
||||
{
|
||||
Assert.AreEqual(property.GetValue(target), engine.Evaluate(objectName + "." + scriptMemberName));
|
||||
Assert.AreEqual(property.GetValue(target, MiscHelpers.GetEmptyArray<object>()), engine.Evaluate(objectName + "." + scriptMemberName));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
34
ReadMe.txt
34
ReadMe.txt
|
@ -44,7 +44,7 @@ build, and import V8:
|
|||
3. Open a Visual Studio developer command prompt and run the V8Update script
|
||||
from your ClearScript root directory:
|
||||
|
||||
C:\ClearScript> V8Update [/N] [Debug|Release]
|
||||
C:\ClearScript> V8Update [/N] [Debug|Release]
|
||||
|
||||
This script downloads the latest versions of V8 and its prerequisites,
|
||||
builds 32-bit and 64-bit V8 shared libraries, and imports the results into
|
||||
|
@ -65,14 +65,23 @@ build, and import V8:
|
|||
|
||||
You are now ready to build the full ClearScript solution using Visual Studio.
|
||||
|
||||
OPTIONAL: If you'd like your copy of ClearScript to use .NET Framework 4.0
|
||||
instead of 4.5, you must change the Target Framework setting for all projects
|
||||
in the solution. Note that the Visual Studio IDE does not allow you to change
|
||||
this setting for C++ projects. Instead, you must open the following files in a
|
||||
text editor and change the TargetFrameworkVersion element manually:
|
||||
|
||||
ClearScript\V8\ClearScriptV8\32\ClearScriptV8-32.vcxproj
|
||||
ClearScript\V8\ClearScriptV8\64\ClearScriptV8-64.vcxproj
|
||||
|
||||
OPTIONAL: The ClearScript distribution includes a copy of the ClearScript
|
||||
Library Reference in Compiled HTML (.CHM) format. If you'd like to rebuild this
|
||||
file, use Sandcastle Help File Builder (SHFB, http://shfb.codeplex.com) with
|
||||
the provided SHFB project file (ClearScript\doc\Reference.shfbproj).
|
||||
|
||||
-------------------------------------------
|
||||
III. Adding ClearScript to your application
|
||||
-------------------------------------------
|
||||
----------------------------------------------------------------
|
||||
III. Integrating and deploying ClearScript with your application
|
||||
----------------------------------------------------------------
|
||||
|
||||
Once you've built ClearScript, here's how to add it to your application:
|
||||
|
||||
|
@ -85,10 +94,15 @@ Once you've built ClearScript, here's how to add it to your application:
|
|||
3. IMPORTANT: If you're using V8, you must also copy the following files from
|
||||
your ClearScript output directory to your application's directory:
|
||||
|
||||
ClearScriptV8-32.dll
|
||||
ClearScriptV8-64.dll
|
||||
v8-ia32.dll
|
||||
v8-x64.dll
|
||||
ClearScriptV8-32.dll
|
||||
ClearScriptV8-64.dll
|
||||
v8-ia32.dll
|
||||
v8-x64.dll
|
||||
|
||||
In addition, if Visual Studio is not installed on the deployment machine,
|
||||
you must install 32-bit and 64-bit Visual C++ Redistributable packages:
|
||||
|
||||
http://www.microsoft.com/en-us/download/details.aspx?id=30679
|
||||
|
||||
-------------------------------------
|
||||
IV. Debugging with ClearScript and V8
|
||||
|
@ -100,14 +114,14 @@ code running in V8 is to use the open-source Eclipse IDE:
|
|||
|
||||
1. Install Eclipse:
|
||||
|
||||
http://www.eclipse.org/downloads/
|
||||
http://www.eclipse.org/downloads/
|
||||
|
||||
2. Install Google Chrome Developer Tools for Java:
|
||||
|
||||
a. Launch Eclipse and click "Help" -> "Install New Software...".
|
||||
b. Paste the following URL into the "Work with:" field:
|
||||
|
||||
http://chromedevtools.googlecode.com/svn/update/dev/
|
||||
http://chromedevtools.googlecode.com/svn/update/dev/
|
||||
|
||||
c. Select "Google Chrome Developer Tools" and complete the dialog.
|
||||
d. Restart Eclipse.
|
||||
|
|
|
@ -1 +1 @@
|
|||
<# var version = new Version(5, 2, 0, 0); #>
|
||||
<# var version = new Version(5, 2, 1, 0); #>
|
||||
|
|
Загрузка…
Ссылка в новой задаче