Skip to content
This repository has been archived by the owner on Mar 30, 2019. It is now read-only.

Commit

Permalink
Changed base package to use new project system. Currently builds on .…
Browse files Browse the repository at this point in the history
…net45 and netstandard1.1
  • Loading branch information
jkoritzinsky committed Mar 19, 2017
1 parent 18affc7 commit 4b827d7
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 149 deletions.
177 changes: 28 additions & 149 deletions Source/SharpDX/SharpDX.csproj
Original file line number Diff line number Diff line change
@@ -1,163 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(SolutionDir)\Build\SharpDX.PreSettings.targets" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{D0BCD56A-41C4-4A4E-8590-26864CED07FF}</ProjectGuid>
<RootNamespace>SharpDX</RootNamespace>
<AssemblyName>SharpDX</AssemblyName>
<TargetFrameworks>net45;netstandard1.1</TargetFrameworks>
<!-- Disable FastUpToDate check in order to let VS to always run BeforeBuild.
Related to this issue http://connect.microsoft.com/VisualStudio/feedback/details/735718/visual-studio-2011-beta-is-incorrectly-building-solution -->
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DebugType>full</DebugType>
<DefineConstants>$(DefineConstants);DIRECTX11_1;DIRECTX11_2;DirectX12</DefineConstants>

<PackageId>SharpDX</PackageId>
<PackageIconUrl>http://sharpdx.org/logo_100x100.png</PackageIconUrl>
<PackageLicenseUrl>http://sharpdx.org/License.txt</PackageLicenseUrl>
<PackageProjectUrl>http://sharpdx.org</PackageProjectUrl>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageTags>SharpDX DirectX Direct3D Multimedia MDX 3D</PackageTags>
<Title>SharpDX</Title>
<Authors>Alexandre Mutel</Authors>
<Owners>Alexandre Mutel</Owners>
<Copyright>Copyright (c) 2010-2014 Alexandre Mutel</Copyright>
<Description>Core assembly for all SharpDX assemblies.</Description>
</PropertyGroup>
<ItemGroup>
<None Include="Mapping-core.xml" />
<None Include="Direct3D\Mapping.xml" />
<None Include="Documentation\CodeComments.xml" />
<None Include="Mapping.xml" />
<None Include="Multimedia\Mapping.xml" />
<None Include="SharpDX.nuspec" />
<Compile Include="..\SharedAssemblyInfo.cs">
<Link>Properties\SharedAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Direct3D\CompilationException.cs" />
<Compile Include="Direct3D\CompilationResultBase.cs" />
<Compile Include="Mathematics\Interop\RawBox.cs" />
<Compile Include="Mathematics\Interop\RawMatrix4x3.cs" />
<Compile Include="Mathematics\Interop\RawMatrix5x4.cs" />
<Compile Include="Mathematics\Interop\RawPlane.cs" />
<Compile Include="Mathematics\Interop\RawBool.cs" />
<Compile Include="Mathematics\Interop\RawBool4.cs" />
<Compile Include="CallbackBase.cs" />
<Compile Include="Collections\EqualityComparer.cs" />
<Compile Include="Mathematics\Interop\RawColor3.cs" />
<Compile Include="Mathematics\Interop\RawColor4.cs" />
<Compile Include="Mathematics\Interop\RawColorBGRA.cs" />
<Compile Include="DisposeEventArgs.cs" />
<Compile Include="Direct3D\Blob.cs" />
<Compile Include="Mathematics\Interop\RawInt3.cs" />
<Compile Include="Mathematics\Interop\RawInt4.cs" />
<Compile Include="Mathematics\Interop\RawMatrix.cs" />
<Compile Include="Mathematics\Interop\RawMatrix3x2.cs" />
<Compile Include="Mathematics\Interop\RawQuaternion.cs" />
<Compile Include="Mathematics\Interop\RawRectangleF.cs" />
<Compile Include="ModuleInit.cs" />
<Compile Include="Mathematics\Interop\RawPoint.cs" />
<Compile Include="Mathematics\Interop\RawRectangle.cs" />
<Compile Include="Reflection\ObfuscationAttributes.cs" />
<Compile Include="ComArray.cs" />
<Compile Include="AssemblyDoc.cs" />
<Compile Include="IInspectable.cs" />
<Compile Include="InspectableShadow.cs" />
<Compile Include="ServiceEventArgs.cs" />
<Compile Include="DataPointer.cs" />
<Compile Include="Diagnostics\NamespaceDoc.cs" />
<Compile Include="Direct3D\NamespaceDoc.cs" />
<Compile Include="DisposeCollector.cs" />
<Compile Include="IO\NamespaceDoc.cs" />
<Compile Include="Multimedia\AudioEndpointRole.cs" />
<Compile Include="Multimedia\NamespaceDoc.cs" />
<Compile Include="ShadowAttribute.cs" />
<Compile Include="ResultDescriptor.cs" />
<Compile Include="IO\NativeFile.cs" />
<Compile Include="IO\NativeFileStream.cs" />
<Compile Include="IO\NativeFileAccess.cs" />
<Compile Include="IO\NativeFileOptions.cs" />
<Compile Include="IO\NativeFileMode.cs" />
<Compile Include="IO\NativeFileShare.cs" />
<Compile Include="ShadowContainer.cs" />
<Compile Include="ComBaseStreamNative.cs" />
<Compile Include="ComObject.cs" />
<Compile Include="ComObjectCallback.cs" />
<Compile Include="ComObjectShadow.cs" />
<Compile Include="Configuration.cs" />
<Compile Include="CppObject.cs" />
<Compile Include="CppObjectShadow.cs" />
<Compile Include="CppObjectVtbl.cs" />
<Compile Include="DataBox.cs" />
<Compile Include="DataRectangle.cs" />
<Compile Include="DataStream.cs" />
<Compile Include="DataBuffer.cs" />
<Compile Include="Diagnostics\ObjectReference.cs" />
<Compile Include="Diagnostics\ObjectTracker.cs" />
<Compile Include="DisposeBase.cs" />
<Compile Include="FunctionCallback.cs" />
<Compile Include="Generated\Direct3D\Enumerations.cs" />
<Compile Include="Generated\Direct3D\Functions.cs" />
<Compile Include="Generated\Direct3D\Interfaces.cs" />
<Compile Include="Generated\Direct3D\Structures.cs" />
<Compile Include="Generated\LocalInterop.cs" />
<Compile Include="Generated\Multimedia\Enumerations.cs" />
<Compile Include="Generated\Win32\Enumerations.cs" />
<Compile Include="Generated\Win32\Functions.cs" />
<Compile Include="Generated\Win32\Interfaces.cs" />
<Compile Include="Generated\Win32\Structures.cs" />
<Compile Include="ICallbackable.cs" />
<Compile Include="Interop.cs" />
<Compile Include="IUnknown.cs" />
<Compile Include="Multimedia\SoundStream.cs" />
<Compile Include="Multimedia\WaveFormatAdpcm.cs" />
<Compile Include="Multimedia\FourCC.cs" />
<Compile Include="Multimedia\RiffChunk.cs" />
<Compile Include="Multimedia\RiffParser.cs" />
<Compile Include="Multimedia\SpeakersExtensions.cs" />
<Compile Include="Multimedia\WaveFormat.cs" />
<Compile Include="Multimedia\WaveFormatExtensible.cs" />
<Compile Include="NamespaceDoc.cs" />
<Compile Include="Size2.cs" />
<Compile Include="Size2F.cs" />
<Compile Include="TagAttribute.cs" />
<Compile Include="Text\ASCIIEncoding.cs" />
<Compile Include="Text\NamespaceDoc.cs" />
<Compile Include="Mathematics\Interop\RawVector2.cs" />
<Compile Include="Mathematics\Interop\RawVector3.cs" />
<Compile Include="Mathematics\Interop\RawVector4.cs" />
<Compile Include="Mathematics\Interop\RawViewport.cs" />
<Compile Include="Mathematics\Interop\RawViewportF.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Result.cs" />
<Compile Include="Direct3D\ShaderMacro.cs" />
<Compile Include="PointerSize.cs" />
<Compile Include="SharpDXException.cs" />
<Compile Include="Utilities.cs" />
<Compile Include="Win32\BitmapInfoHeader.cs" />
<Compile Include="Win32\ComStream.cs" />
<Compile Include="Win32\ComStreamProxy.cs" />
<Compile Include="Win32\ComStreamShadow.cs" />
<Compile Include="Win32\ComStreamBaseShadow.cs" />
<Compile Include="Win32\ErrorCode.cs" />
<Compile Include="Win32\NamespaceDoc.cs" />
<Compile Include="Win32\NativeMessage.cs" />
<Compile Include="Win32\PropertyBag.cs" />
<Compile Include="Win32\IStream.cs" />
<Compile Include="Win32\IStreamBase.cs" />
<Compile Include="Win32\PropertyBagKey.cs" />
<Compile Include="Win32\ComStringEnumerator.cs" />
<Compile Include="Win32\SecurityAttributes.cs" />
<Compile Include="Win32\Variant.cs" />
<Compile Include="Win32\VariantElementType.cs" />
<Compile Include="Win32\VariantType.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Mapping-core.xml">
<SubType>Designer</SubType>
</None>
<None Include="Direct3D\Mapping.xml">
<SubType>Designer</SubType>
</None>
<None Include="Documentation\CodeComments.xml" />
<None Include="Mapping.xml">
<SubType>Designer</SubType>
</None>
<None Include="Multimedia\Mapping.xml">
<SubType>Designer</SubType>
</None>
<None Include="SharpDX.nuspec" />
</ItemGroup>
<ItemGroup />
<Import Project="$(SolutionDir)\Build\SharpDX.PostSettings.targets" />
<Target Name="BeforeBuild">

<Target Name="RunGenerator" BeforeTargets="BeforeBuild">
<Exec Command="&quot;$(SolutionDir)Source\Tools\SharpGen\RunGenerator.bat&quot; $(ConfigurationName)" />
</Target>
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="AfterBuild">
<Target Name="PatchAssembly" AfterTargets="AfterBuild">
<Exec Command="&quot;$(SolutionDir)\Source\Bin\SharpCLI.exe&quot; &quot;$(TargetPath)&quot;" />
</Target>
-->
</Project>
13 changes: 13 additions & 0 deletions Source/SharpDX/SharpJit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ namespace SharpDX
internal class SharpJit
{

#if !NETSTANDARD1_1
private static byte[] clrCallToStdcallX86Prolog = new byte[]
{
// 00000 58 pop eax
Expand All @@ -50,19 +51,26 @@ internal class SharpJit
0xff, 0x21
};

#endif

static SharpJit()
{
Install(typeof(SharpJit));
}

public static void Install(Assembly assembly)
{
#if !NETSTANDARD1_1
foreach (var type in assembly.GetTypes())
Install(type);
#else
throw new PlatformNotSupportedException();
#endif
}

public static void Install(Type typeToPatch)
{
#if !NETSTANDARD1_1
unsafe
{
void* test;
Expand All @@ -85,8 +93,12 @@ public static void Install(Type typeToPatch)
}
}
}
#else
throw new PlatformNotSupportedException();
#endif
}

#if !NETSTANDARD1_1
private static void EmitTrampoline(MethodInfo method, byte[] asmCode)
{
RuntimeHelpers.PrepareMethod(method.MethodHandle);
Expand All @@ -99,6 +111,7 @@ private static void EmitTrampoline(MethodInfo method, byte[] asmCode)
//00000 ff 21 jmp ecx
0xff, 0xe1,
};
#endif
}
}

0 comments on commit 4b827d7

Please sign in to comment.