Skip to content

Commit

Permalink
Remove native code from stride.core project (stride3d#1688)
Browse files Browse the repository at this point in the history
* Remove native code from stride.core project
  • Loading branch information
Jklawreszuk authored Jun 20, 2023
1 parent 9167fe6 commit 64b64d1
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 128 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@
<Project>{5210FB81-B807-49BB-AF0D-31FB6A83A572}</Project>
<Name>Stride.Core.Serialization</Name>
</ProjectReference>
<StrideEmbeddedNativeLibrary Include="$(StridePackageStridePlatformBin)\libcore">
<Visible>false</Visible>
</StrideEmbeddedNativeLibrary>
<ProjectReference Include="..\Stride.Core\Stride.Core.csproj">
<Project>{0E916AB7-5A6C-4820-8AB1-AA492FE66D68}</Project>
<Name>Stride.Core</Name>
</ProjectReference>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="..\..\targets\Stride.UnitTests.targets" Condition="Exists('..\..\targets\Stride.UnitTests.targets')" />
Expand Down
7 changes: 4 additions & 3 deletions sources/core/Stride.Core.Tests/Stride.Core.Tests.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@
<Project>{5210FB81-B807-49BB-AF0D-31FB6A83A572}</Project>
<Name>Stride.Core.Serialization</Name>
</ProjectReference>
<StrideEmbeddedNativeLibrary Include="$(StridePackageStridePlatformBin)\libcore">
<Visible>false</Visible>
</StrideEmbeddedNativeLibrary>
<ProjectReference Include="..\Stride.Core\Stride.Core.csproj">
<Project>{0E916AB7-5A6C-4820-8AB1-AA492FE66D68}</Project>
<Name>Stride.Core</Name>
</ProjectReference>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="..\..\targets\Stride.UnitTests.targets" Condition="Exists('..\..\targets\Stride.UnitTests.targets')" />
Expand Down
18 changes: 0 additions & 18 deletions sources/core/Stride.Core/Native/CoreNative.c

This file was deleted.

27 changes: 0 additions & 27 deletions sources/core/Stride.Core/Native/CoreNative.h

This file was deleted.

63 changes: 0 additions & 63 deletions sources/core/Stride.Core/Native/NativeInvoke.cs

This file was deleted.

1 change: 0 additions & 1 deletion sources/core/Stride.Core/Stride.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
</PropertyGroup>

<PropertyGroup>
<StrideNativeOutputName>libcore</StrideNativeOutputName>
<StrideAssemblyProcessor>true</StrideAssemblyProcessor>
<StrideAssemblyProcessorOptions>--auto-module-initializer --serialization</StrideAssemblyProcessorOptions>
<StrideBuildTags>*</StrideBuildTags>
Expand Down
11 changes: 0 additions & 11 deletions sources/engine/Stride.Native/NativeInvoke.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.

using System;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Security;
using Stride.Core;
using Stride.Core.Mathematics;
using Stride.Core.Reflection;

namespace Stride.Native
{
Expand Down Expand Up @@ -37,13 +35,4 @@ static NativeInvoke()
[DllImport(Library, CallingConvention = CallingConvention.Cdecl)]
public static extern void xnGraphicsFastTextRendererGenerateVertices(RectangleF constantInfos, RectangleF renderInfos, string text, out IntPtr textLength, out IntPtr vertexBufferPointer);
}

internal class Module
{
[ModuleInitializer]
public static void Initialize()
{
Core.Native.NativeInvoke.Setup();
}
}
}
2 changes: 0 additions & 2 deletions sources/engine/Stride.VirtualReality/GoogleVR/GoogleVR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@ extern "C" {
#if defined(ANDROID)
gGvrLibrary = LoadDynamicLibrary("libgvr");
gGvrGLESv2 = LoadDynamicLibrary("libGLESv2");
auto core = LoadDynamicLibrary("libcore");
cnDebugPrintLine = (CnPrintDebugFunc)GetSymbolAddress(core, "cnDebugPrintLine");
#else
gGvrLibrary = LoadDynamicLibrary(NULL);
gGvrGLESv2 = LoadDynamicLibrary(NULL);
Expand Down

0 comments on commit 64b64d1

Please sign in to comment.