mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Compare commits
8
Commits
3d
...
dotnet_test
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4874cfe511 | ||
|
|
63b9270710 | ||
|
|
2bac6a8d05 | ||
|
|
e51fc77c3f | ||
|
|
8c53f21690 | ||
|
|
ad1b37dc64 | ||
|
|
8e46945362 | ||
|
|
6a250d4927 |
+2
-2
@@ -1,6 +1,6 @@
|
||||
FileVersion = 1
|
||||
Projects = {Sandbox = {Path = "Sandbox"}, GlitchyEngine = {Path = "GlitchyEngine"}, GlitchLog = {Path = "GlitchLog"}, DirectX = {Path = "GlitchyEngine/vendor/directx/DirectX"}, DirectXTK = {Path = "GlitchyEngine/vendor/DirectXTK/DirectXTK-beef"}, LodePng = {Path = "vendor/lodepng-beef/lodepng-beef"}, FreeType = {Path = "GlitchyEngine/vendor/freetype"}, cgltf-beef = {Path = "GlitchyEngine/vendor/gltf/cgltf-beef"}, GlitchyEditor = {Path = "GlitchyEditor"}, msdfgen-beef = {Path = "GlitchyEngine/vendor/msdfgen/msdfgen-beef"}, ImGui = {Path = "GlitchyEngine/vendor/imgui/ImGui"}, ImGuiImplDX11 = {Path = "GlitchyEngine/vendor/imgui/ImGuiImplDX11"}, ImGuiImplWin32 = {Path = "GlitchyEngine/vendor/imgui/ImGuiImplWin32"}, ImGuizmo = {Path = "GlitchyEngine/vendor/imgui/ImGuizmo"}, GlitchyEngineHelper = {Path = "GlitchyEngineHelper"}, bon = {Path = "GlitchyEngine/vendor/bon"}}
|
||||
WorkspaceFolders = {GlitchyEngine = ["GlitchyEngine", "GlitchLog", "GlitchyEngineHelper"], "GlitchyEngine/Dependencies" = ["cgltf-beef", "DirectX", "DirectXTK", "FreeType", "ImGui", "ImGuiImplDX11", "ImGuiImplWin32", "ImGuizmo", "LodePng", "msdfgen-beef", "bon"]}
|
||||
Projects = {Sandbox = {Path = "Sandbox"}, GlitchyEngine = {Path = "GlitchyEngine"}, GlitchLog = {Path = "GlitchLog"}, DirectX = {Path = "GlitchyEngine/vendor/directx/DirectX"}, LodePng = {Path = "vendor/lodepng-beef/lodepng-beef"}, FreeType = {Path = "GlitchyEngine/vendor/freetype"}, cgltf-beef = {Path = "GlitchyEngine/vendor/gltf/cgltf-beef"}, GlitchyEditor = {Path = "GlitchyEditor"}, msdfgen-beef = {Path = "GlitchyEngine/vendor/msdfgen/msdfgen-beef"}, ImGui = {Path = "GlitchyEngine/vendor/imgui/ImGui"}, ImGuiImplDX11 = {Path = "GlitchyEngine/vendor/imgui/ImGuiImplDX11"}, ImGuiImplWin32 = {Path = "GlitchyEngine/vendor/imgui/ImGuiImplWin32"}, ImGuizmo = {Path = "GlitchyEngine/vendor/imgui/ImGuizmo"}, GlitchyEngineHelper = {Path = "GlitchyEngineHelper"}, bon = {Path = "GlitchyEngine/vendor/bon"}}
|
||||
WorkspaceFolders = {GlitchyEngine = ["GlitchyEngine", "GlitchLog", "GlitchyEngineHelper"], "GlitchyEngine/Dependencies" = ["cgltf-beef", "DirectX", "FreeType", "ImGui", "ImGuiImplDX11", "ImGuiImplWin32", "ImGuizmo", "LodePng", "msdfgen-beef", "bon"]}
|
||||
|
||||
[Workspace]
|
||||
StartupProject = "GlitchyEditor"
|
||||
|
||||
@@ -4,6 +4,9 @@ using System;
|
||||
using System.Collections;
|
||||
using GlitchyEngine.Collections;
|
||||
using GlitchyEditor.EditWindows;
|
||||
using GlitchyEngineHelper;
|
||||
using System.IO;
|
||||
using GlitchyEngineHelper.DotNet;
|
||||
|
||||
namespace GlitchyEditor
|
||||
{
|
||||
@@ -29,6 +32,21 @@ namespace GlitchyEditor
|
||||
/// Creates a new editor for the given world
|
||||
public this(Scene scene)
|
||||
{
|
||||
String exePath = Environment.GetExecutableFilePath(.. scope String());
|
||||
|
||||
String exeDir = Path.GetDirectoryPath(exePath, .. scope String());
|
||||
|
||||
String assemblyPath = scope String(exeDir, "/DotNetScriptingHelper.dll");
|
||||
|
||||
DotNetContext dotty = new DotNetContext(assemblyPath);
|
||||
defer delete dotty;
|
||||
|
||||
dotty.Init();
|
||||
|
||||
dotty.GetFunctionPointerUnmanagedCallersOnly("DotNetScriptingHelper.ScriptableEntity, DotNetScriptingHelper", "CreateInstance", out DotNetScriptComponent.CreateInstanceFn);
|
||||
dotty.GetFunctionPointerUnmanagedCallersOnly("DotNetScriptingHelper.ScriptableEntity, DotNetScriptingHelper", "UpdateEntity", out DotNetScriptComponent.UpdateInstanceFn);
|
||||
dotty.GetFunctionPointerUnmanagedCallersOnly("DotNetScriptingHelper.ScriptableEntity, DotNetScriptingHelper", "DestroyEntity", out DotNetScriptComponent.DestroyInstanceFn);
|
||||
|
||||
_scene = scene;
|
||||
_ecsWorld = _scene.[Friend]_ecsWorld;
|
||||
|
||||
|
||||
@@ -288,4 +288,68 @@ namespace GlitchyEngine.World
|
||||
DestroyInstanceFunction(&this);
|
||||
}
|
||||
}
|
||||
|
||||
struct DotNetScriptComponent : IDisposableComponent
|
||||
{
|
||||
public struct Instance : int {}
|
||||
|
||||
public Instance InstanceHandlePtr = 0;
|
||||
|
||||
private String TypeName = null;
|
||||
|
||||
typealias CreateInstanceDelegate = function Instance(void* typeNamePtr, int32 typeNameLength, EcsEntity entity, void* scene);
|
||||
typealias UpdateInstanceDelegate = function void(Instance instance, uint64 frameCount, TimeSpan totalTime, TimeSpan frameTime);
|
||||
typealias DestroyInstanceDelegate = function void(Instance instance);
|
||||
|
||||
public static CreateInstanceDelegate CreateInstanceFn;
|
||||
public static UpdateInstanceDelegate UpdateInstanceFn;
|
||||
public static DestroyInstanceDelegate DestroyInstanceFn;
|
||||
|
||||
public const Self ss = Self();
|
||||
|
||||
public void Bind(StringView dotNetAssemblyQualifiedTypeName) mut
|
||||
{
|
||||
TypeName = new String(dotNetAssemblyQualifiedTypeName);
|
||||
}
|
||||
|
||||
internal void CreateInstance(EcsEntity entity, Scene scene) mut
|
||||
{
|
||||
void* scenePtr = Internal.UnsafeCastToPtr(scene);
|
||||
|
||||
InstanceHandlePtr = CreateInstanceFn(TypeName.Ptr, (int32)TypeName.Length, entity, scenePtr);
|
||||
}
|
||||
|
||||
internal void UpdateInstance(GameTime gameTime)
|
||||
{
|
||||
UpdateInstanceFn(InstanceHandlePtr, gameTime.FrameCount, gameTime.TotalTime, gameTime.FrameTime);
|
||||
}
|
||||
|
||||
internal void DestroyInstance()
|
||||
{
|
||||
DestroyInstanceFn(InstanceHandlePtr);
|
||||
}
|
||||
|
||||
public void Dispose() mut
|
||||
{
|
||||
delete TypeName;
|
||||
}
|
||||
|
||||
[Export(), LinkName("GE_DoStuff")]
|
||||
public static int32 DoStuff()
|
||||
{
|
||||
return 69;
|
||||
}
|
||||
|
||||
[Export, LinkName("GE_DotNetScript_GetComponent")]
|
||||
private static void* GetComponent(EcsEntity entity, void* scenePtr)
|
||||
{
|
||||
Scene scene = (Scene)Internal.UnsafeCastToObject(scenePtr);
|
||||
|
||||
Entity e = .(entity, scene);
|
||||
|
||||
TransformComponent* ptr = e.GetComponent<TransformComponent>();
|
||||
|
||||
return ptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,6 +28,11 @@ namespace GlitchyEngine.World
|
||||
|
||||
cameraComponent.Camera.SetViewportSize(e.Scene.ViewportWidth, e.Scene.ViewportHeight);
|
||||
});
|
||||
|
||||
Entity dotNetEntity = CreateEntity("DotNet rocks!");
|
||||
dotNetEntity.AddComponent<SpriterRendererComponent>(.(Color(81, 43, 212)));
|
||||
var vv = dotNetEntity.AddComponent<DotNetScriptComponent>();
|
||||
vv.Bind("DotNetScriptingHelper.TestEntityScript, DotNetScriptingHelper");
|
||||
}
|
||||
|
||||
public ~this()
|
||||
@@ -50,6 +55,16 @@ namespace GlitchyEngine.World
|
||||
script.Instance.[Friend]OnUpdate(gameTime);
|
||||
}
|
||||
|
||||
for (var (entity, script) in _ecsWorld.Enumerate<DotNetScriptComponent>())
|
||||
{
|
||||
if (script.InstanceHandlePtr == 0)
|
||||
{
|
||||
script.[Friend]CreateInstance(entity, this);
|
||||
}
|
||||
|
||||
script.[Friend]UpdateInstance(gameTime);
|
||||
}
|
||||
|
||||
Camera* primaryCamera = null;
|
||||
Matrix primaryCameraTransform = default;
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
using System;
|
||||
using GlitchyEngine.Math;
|
||||
|
||||
namespace GlitchyEngine.World
|
||||
{
|
||||
[Ordered]
|
||||
public struct TransformComponent
|
||||
{
|
||||
EcsEntity _parent = .InvalidEntity;
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace GlitchyEngine.World
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.EngineLogger.AssertDebug(false, "Queried component is not registered for this world. This is invalid because the query would never return any results.");
|
||||
//Log.EngineLogger.AssertDebug(false, "Queried component is not registered for this world. This is invalid because the query would never return any results.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,398 @@
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
##
|
||||
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
|
||||
|
||||
# User-specific files
|
||||
*.rsuser
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Mono auto generated files
|
||||
mono_crash.*
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
[Ww][Ii][Nn]32/
|
||||
[Aa][Rr][Mm]/
|
||||
[Aa][Rr][Mm]64/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
[Ll]ogs/
|
||||
|
||||
# Visual Studio 2015/2017 cache/options directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# Visual Studio 2017 auto generated files
|
||||
Generated\ Files/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUnit
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
nunit-*.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# Benchmark Results
|
||||
BenchmarkDotNet.Artifacts/
|
||||
|
||||
# .NET Core
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
|
||||
# ASP.NET Scaffolding
|
||||
ScaffoldingReadMe.txt
|
||||
|
||||
# StyleCop
|
||||
StyleCopReport.xml
|
||||
|
||||
# Files built by Visual Studio
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_h.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.iobj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.ipdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*_wpftmp.csproj
|
||||
*.log
|
||||
*.tlog
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# Visual Studio Trace Files
|
||||
*.e2e
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# AxoCover is a Code Coverage Tool
|
||||
.axoCover/*
|
||||
!.axoCover/settings.json
|
||||
|
||||
# Coverlet is a free, cross platform Code Coverage Tool
|
||||
coverage*.json
|
||||
coverage*.xml
|
||||
coverage*.info
|
||||
|
||||
# Visual Studio code coverage results
|
||||
*.coverage
|
||||
*.coveragexml
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||
# in these scripts will be unencrypted
|
||||
PublishScripts/
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# NuGet Symbol Packages
|
||||
*.snupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/[Pp]ackages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/[Pp]ackages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/[Pp]ackages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignorable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
*.appx
|
||||
*.appxbundle
|
||||
*.appxupload
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!?*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.jfm
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
orleans.codegen.cs
|
||||
|
||||
# Including strong name files can present a security risk
|
||||
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||
#*.snk
|
||||
|
||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||
#bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
ServiceFabricBackup/
|
||||
*.rptproj.bak
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
*.ndf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
*.rptproj.rsuser
|
||||
*- [Bb]ackup.rdl
|
||||
*- [Bb]ackup ([0-9]).rdl
|
||||
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
node_modules/
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||
*.vbw
|
||||
|
||||
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
|
||||
*.vbp
|
||||
|
||||
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
|
||||
*.dsw
|
||||
*.dsp
|
||||
|
||||
# Visual Studio 6 technical files
|
||||
*.ncb
|
||||
*.aps
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
paket-files/
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
||||
|
||||
# CodeRush personal settings
|
||||
.cr/personal
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
# Cake - Uncomment if you are using it
|
||||
# tools/**
|
||||
# !tools/packages.config
|
||||
|
||||
# Tabs Studio
|
||||
*.tss
|
||||
|
||||
# Telerik's JustMock configuration file
|
||||
*.jmconfig
|
||||
|
||||
# BizTalk build output
|
||||
*.btp.cs
|
||||
*.btm.cs
|
||||
*.odx.cs
|
||||
*.xsd.cs
|
||||
|
||||
# OpenCover UI analysis results
|
||||
OpenCover/
|
||||
|
||||
# Azure Stream Analytics local run output
|
||||
ASALocalRun/
|
||||
|
||||
# MSBuild Binary and Structured Log
|
||||
*.binlog
|
||||
|
||||
# NVidia Nsight GPU debugger configuration file
|
||||
*.nvuser
|
||||
|
||||
# MFractors (Xamarin productivity tool) working folder
|
||||
.mfractor/
|
||||
|
||||
# Local History for Visual Studio
|
||||
.localhistory/
|
||||
|
||||
# Visual Studio History (VSHistory) files
|
||||
.vshistory/
|
||||
|
||||
# BeatPulse healthcheck temp database
|
||||
healthchecksdb
|
||||
|
||||
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||
MigrationBackup/
|
||||
|
||||
# Ionide (cross platform F# VS Code tools) working folder
|
||||
.ionide/
|
||||
|
||||
# Fody - auto-generated XML schema
|
||||
FodyWeavers.xsd
|
||||
|
||||
# VS Code files for those working on multiple tools
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
*.code-workspace
|
||||
|
||||
# Local History for Visual Studio Code
|
||||
.history/
|
||||
|
||||
# Windows Installer files from build outputs
|
||||
*.cab
|
||||
*.msi
|
||||
*.msix
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# JetBrains Rider
|
||||
*.sln.iml
|
||||
@@ -10,4 +10,4 @@ StartupObject = "GlitchyEngineHelper.Program"
|
||||
BuildCommandsOnCompile = "IfFilesChanged"
|
||||
BuildCommandsOnRun = "IfFilesChanged"
|
||||
LibPaths = ["$(ProjectDir)/out/build/x64-debug/GlitchyEngineHelper.lib"]
|
||||
PostBuildCmds = ["$(ProjectDir)\\..\\bin\\vscmake.bat x64 $(ProjectDir) x64-debug"]
|
||||
PreBuildCmds = ["$(ProjectDir)\\..\\bin\\vscmake.bat x64 $(ProjectDir) x64-debug", "CopyToDependents(\"$(ProjectDir)/out/build/x64-debug/*.dll\")", "dotnet build $(ProjectDir)/DotNetScriptingHelper/DotNetScriptingHelper.csproj -c Debug", "CopyToDependents(\"$(ProjectDir)/DotNetScriptingHelper/bin/Debug/*\")"]
|
||||
|
||||
@@ -5,11 +5,52 @@ cmake_minimum_required (VERSION 3.15)
|
||||
|
||||
project ("GlitchyEngineHelper")
|
||||
|
||||
# Add source to this project's executable.
|
||||
add_library (GlitchyEngineHelper "GlitchyEngineHelper.cpp" "GlitchyEngineHelper.h" "vendor/xxHash/xxhash.c" "vendor/xxHash/xxhash.h" "vendor/DirectXTK/Src/DDSTextureLoader.cpp")
|
||||
# DotNet Apphost:
|
||||
|
||||
include_directories("vendor/DirectXTK/Inc")
|
||||
# Base directory of dotnet app host
|
||||
SET(DOTNET_APP_HOST_BASE "${CMAKE_SOURCE_DIR}/vendor/dotnetapphost")
|
||||
|
||||
# Construct platform specific directory
|
||||
IF (WIN32)
|
||||
IF (${TARGET_ARCH} STREQUAL "amd64")
|
||||
SET(DOTNET_APP_HOST ${DOTNET_APP_HOST_BASE}/win-x64/)
|
||||
ELSE ()
|
||||
SET(DOTNET_APP_HOST ${DOTNET_APP_HOST_BASE}/win-x86/)
|
||||
ENDIF ()
|
||||
|
||||
SET(NET_HOST_LIB ${DOTNET_APP_HOST}/nethost.lib)
|
||||
SET(NET_HOST_DLL_NAME "nethost.dll")
|
||||
ELSE ()
|
||||
# LINUX/MAC/...
|
||||
ENDIF ()
|
||||
|
||||
# Less sketchy way of adding a library. If the other method breaks (because it's sketchy) use this one and include nethost.lib manually in Beef-IDE
|
||||
# target_link_libraries(GlitchyEngineHelper "vendor/dotnethost/nethost.lib")
|
||||
|
||||
# Sketchy way to compile a static library into a static target. Notice that we add the objects of this libary in add_library(GlitchyEngineHelper ...
|
||||
add_library(NetHost OBJECT IMPORTED)
|
||||
set_property(TARGET NetHost PROPERTY IMPORTED_OBJECTS ${NET_HOST_LIB})
|
||||
|
||||
# Copy nethost.dll to output directory
|
||||
configure_file("${DOTNET_APP_HOST}/${NET_HOST_DLL_NAME}" "${CMAKE_CURRENT_BINARY_DIR}/${NET_HOST_DLL_NAME}" COPYONLY)
|
||||
|
||||
# GlitchyEngineHelper:
|
||||
|
||||
# Add source to this project's executable.
|
||||
add_library (GlitchyEngineHelper STATIC
|
||||
"GlitchyEngineHelper.cpp" "GlitchyEngineHelper.h" "vendor/xxHash/xxhash.c" "vendor/xxHash/xxhash.h" "vendor/DirectXTK/Src/DDSTextureLoader.cpp"
|
||||
# Link object files from nethost into library (kinda dirty I think, but avoids linking to nethost.lib when compiling in beef)
|
||||
$<TARGET_OBJECTS:NetHost>
|
||||
)
|
||||
|
||||
target_include_directories(GlitchyEngineHelper PRIVATE
|
||||
"vendor/DirectXTK/Inc"
|
||||
${DOTNET_APP_HOST}
|
||||
)
|
||||
|
||||
IF (WIN32)
|
||||
add_compile_definitions(WINDOWS)
|
||||
ENDIF()
|
||||
|
||||
# Use statically linked multithreaded MSVC runtime
|
||||
set_property(TARGET GlitchyEngineHelper PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreadedDebug")
|
||||
#$<$<CONFIG:Debug>:Debug>
|
||||
set_property(TARGET GlitchyEngineHelper PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
@@ -26,7 +26,8 @@
|
||||
"strategy": "external"
|
||||
},
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug"
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"TARGET_ARCH": "amd64"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -34,7 +35,8 @@
|
||||
"displayName": "x64 Release",
|
||||
"inherits": "x64-debug",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release"
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"TARGET_ARCH": "amd64"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -46,7 +48,8 @@
|
||||
"strategy": "external"
|
||||
},
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug"
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"TARGET_ARCH": "x86"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -54,7 +57,8 @@
|
||||
"displayName": "x86 Release",
|
||||
"inherits": "x86-debug",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release"
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"TARGET_ARCH": "x86"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -0,0 +1,229 @@
|
||||
using System.Numerics;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace DotNetScriptingHelper.Components;
|
||||
|
||||
[GameComponent, StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct LameTransformComponent
|
||||
{
|
||||
private EcsEntity _parent;
|
||||
|
||||
private Vector3 _position;
|
||||
private Quaternion _rotation;
|
||||
private Vector3 _scale;
|
||||
|
||||
private Vector3 _editorRotationEuler;
|
||||
|
||||
private Matrix4x4 _localTransform;
|
||||
private bool _isDirty;
|
||||
private Matrix4x4 _worldTransform;
|
||||
|
||||
private UIntPtr _frame;
|
||||
|
||||
public EcsEntity Parent
|
||||
{
|
||||
get => _parent;
|
||||
set
|
||||
{
|
||||
if (_parent == value)
|
||||
return;
|
||||
|
||||
_parent = value;
|
||||
_isDirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
public Matrix4x4 LocalTransform
|
||||
{
|
||||
get => _localTransform;
|
||||
set
|
||||
{
|
||||
if (_localTransform == value)
|
||||
return;
|
||||
|
||||
_localTransform = value;
|
||||
|
||||
Matrix4x4.Decompose(_localTransform, out _position, out _rotation, out _scale);
|
||||
_isDirty = true;
|
||||
}
|
||||
}
|
||||
// Todo: WorldTransform?
|
||||
|
||||
public Vector3 Position
|
||||
{
|
||||
get => _position;
|
||||
set
|
||||
{
|
||||
if (_position == value)
|
||||
return;
|
||||
|
||||
_position = value;
|
||||
_isDirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
public Quaternion Rotation
|
||||
{
|
||||
get => _rotation;
|
||||
set
|
||||
{
|
||||
if (_rotation == value)
|
||||
return;
|
||||
|
||||
_rotation = value;
|
||||
_isDirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
public (Vector3 Axis, float Angle) RotationAxisAngle
|
||||
{
|
||||
get => _rotation.ToAxisAngle();
|
||||
set
|
||||
{
|
||||
Quaternion quat = Quaternion.CreateFromAxisAngle(value.Axis, value.Angle);
|
||||
|
||||
if (_rotation == quat)
|
||||
return;
|
||||
|
||||
_rotation = quat;
|
||||
_isDirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
public Vector3 RotationEuler
|
||||
{
|
||||
get => _rotation.ToEulerAngles();
|
||||
set => Rotation = Quaternion.CreateFromYawPitchRoll(value.Y, value.X, value.Z);
|
||||
}
|
||||
|
||||
public Vector3 Scale
|
||||
{
|
||||
get => _scale;
|
||||
set
|
||||
{
|
||||
if (_scale == value)
|
||||
return;
|
||||
|
||||
_scale = value;
|
||||
_isDirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe struct TransformComponent
|
||||
{
|
||||
[GameComponent, StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
internal struct TransformComponentData
|
||||
{
|
||||
internal EcsEntity _parent;
|
||||
|
||||
internal Vector3 _position;
|
||||
internal Quaternion _rotation;
|
||||
internal Vector3 _scale;
|
||||
|
||||
internal Vector3 _editorRotationEuler;
|
||||
|
||||
internal Matrix4x4 _localTransform;
|
||||
internal bool _isDirty;
|
||||
internal Matrix4x4 _worldTransform;
|
||||
|
||||
internal UIntPtr _frame;
|
||||
}
|
||||
|
||||
private TransformComponentData* _component;
|
||||
|
||||
internal TransformComponent(IntPtr component)
|
||||
{
|
||||
_component = (TransformComponentData*)component;
|
||||
}
|
||||
|
||||
public EcsEntity Parent
|
||||
{
|
||||
get => _component->_parent;
|
||||
set
|
||||
{
|
||||
if (_component->_parent == value)
|
||||
return;
|
||||
|
||||
_component->_parent = value;
|
||||
_component->_isDirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
public Matrix4x4 LocalTransform
|
||||
{
|
||||
get => _component->_localTransform;
|
||||
set
|
||||
{
|
||||
if (_component->_localTransform == value)
|
||||
return;
|
||||
|
||||
_component->_localTransform = value;
|
||||
|
||||
Matrix4x4.Decompose(_component->_localTransform,
|
||||
out _component->_position, out _component->_rotation, out _component->_scale);
|
||||
_component->_isDirty = true;
|
||||
}
|
||||
}
|
||||
// Todo: WorldTransform?
|
||||
|
||||
public Vector3 Position
|
||||
{
|
||||
get => _component->_position;
|
||||
set
|
||||
{
|
||||
if (_component->_position == value)
|
||||
return;
|
||||
|
||||
_component->_position = value;
|
||||
_component->_isDirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
public Quaternion Rotation
|
||||
{
|
||||
get => _component->_rotation;
|
||||
set
|
||||
{
|
||||
if (_component->_rotation == value)
|
||||
return;
|
||||
|
||||
_component->_rotation = value;
|
||||
_component->_isDirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
public (Vector3 Axis, float Angle) RotationAxisAngle
|
||||
{
|
||||
get => _component->_rotation.ToAxisAngle();
|
||||
set
|
||||
{
|
||||
Quaternion quat = Quaternion.CreateFromAxisAngle(value.Axis, value.Angle);
|
||||
|
||||
if (_component->_rotation == quat)
|
||||
return;
|
||||
|
||||
_component->_rotation = quat;
|
||||
_component->_isDirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
public Vector3 RotationEuler
|
||||
{
|
||||
get => _component->_rotation.ToEulerAngles();
|
||||
set => Rotation = Quaternion.CreateFromYawPitchRoll(value.Y, value.X, value.Z);
|
||||
}
|
||||
|
||||
public Vector3 Scale
|
||||
{
|
||||
get => _component->_scale;
|
||||
set
|
||||
{
|
||||
if (_component->_scale == value)
|
||||
return;
|
||||
|
||||
_component->_scale = value;
|
||||
_component->_isDirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
||||
<EnableDynamicLoading>true</EnableDynamicLoading>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
<BaseOutputPath></BaseOutputPath>
|
||||
<DebugType>embedded</DebugType>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.1.32328.378
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNetScriptingHelper", "DotNetScriptingHelper.csproj", "{4B439162-2FA7-494E-A459-8F6D34FED80C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{4B439162-2FA7-494E-A459-8F6D34FED80C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4B439162-2FA7-494E-A459-8F6D34FED80C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4B439162-2FA7-494E-A459-8F6D34FED80C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4B439162-2FA7-494E-A459-8F6D34FED80C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {968CFBCF-61D9-404C-83CC-0F616E89DA10}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,33 @@
|
||||
namespace DotNetScriptingHelper;
|
||||
|
||||
public readonly struct EcsEntity
|
||||
{
|
||||
// Binary Format:
|
||||
// Bits: [0 - 31] [32 - 64]
|
||||
// Data: Version Index
|
||||
|
||||
private readonly ulong _id;
|
||||
|
||||
internal uint Version => (uint)_id;
|
||||
|
||||
internal uint Index => (uint)(_id >> 32);
|
||||
|
||||
public EcsEntity(uint index, uint version)
|
||||
{
|
||||
_id = ((ulong)index << 32) | version;
|
||||
}
|
||||
|
||||
public bool IsValid => Index != InvalidEntity.Index;
|
||||
|
||||
public static readonly EcsEntity InvalidEntity = new(uint.MaxValue, 0);
|
||||
|
||||
public static bool operator ==(EcsEntity left, EcsEntity right)
|
||||
{
|
||||
return left._id == right._id;
|
||||
}
|
||||
|
||||
public static bool operator !=(EcsEntity left, EcsEntity right)
|
||||
{
|
||||
return left._id != right._id;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
namespace DotNetScriptingHelper;
|
||||
|
||||
public struct Entity
|
||||
{
|
||||
public EcsEntity Handle { get; }
|
||||
public IntPtr Scene { get; }
|
||||
|
||||
public bool IsValid => Handle.IsValid;
|
||||
|
||||
public Entity(EcsEntity handle, IntPtr scene)
|
||||
{
|
||||
Handle = handle;
|
||||
Scene = scene;
|
||||
}
|
||||
|
||||
// TODO: Get Parent, Children
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
namespace DotNetScriptingHelper;
|
||||
|
||||
public class GameTime
|
||||
{
|
||||
private ulong _frameCount;
|
||||
|
||||
private TimeSpan _totalTime;
|
||||
private TimeSpan _frameTime;
|
||||
|
||||
public ulong FrameCount => _frameCount;
|
||||
public TimeSpan TotalTime => _totalTime;
|
||||
public TimeSpan FrameTime => _frameTime;
|
||||
|
||||
public float DeltaTime => (float)_frameTime.TotalSeconds;
|
||||
public float TotalSeconds => (float)_totalTime.TotalSeconds;
|
||||
|
||||
internal GameTime(ulong frameCount, TimeSpan totalTime, TimeSpan frameTime)
|
||||
{
|
||||
_frameCount = frameCount;
|
||||
_totalTime = totalTime;
|
||||
_frameTime = frameTime;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
namespace DotNetScriptingHelper;
|
||||
|
||||
public interface IGameComponent
|
||||
{
|
||||
static int I { get; }
|
||||
}
|
||||
|
||||
public class GameComponentAttribute : Attribute
|
||||
{
|
||||
public GameComponentAttribute()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace DotNetScriptingHelper;
|
||||
|
||||
public class InteropHelper
|
||||
{
|
||||
struct CreateArgs
|
||||
{
|
||||
public IntPtr Ptr;
|
||||
public int Length;
|
||||
|
||||
public string ManagedCopy => Marshal.PtrToStringUTF8(Ptr, Length);
|
||||
}
|
||||
|
||||
//[UnmanagedCallersOnly]
|
||||
public static int SomeMethod(IntPtr args, int argLength)
|
||||
{
|
||||
Debug.WriteLine(typeof(InteropHelper).AssemblyQualifiedName);
|
||||
|
||||
return 5;
|
||||
}
|
||||
|
||||
[UnmanagedCallersOnly]
|
||||
public static IntPtr CreateInstance(IntPtr args, int argLength)
|
||||
{
|
||||
try
|
||||
{
|
||||
Debug.Assert(Marshal.SizeOf<CreateArgs>() == argLength, "Provided argument has wrong size.");
|
||||
|
||||
CreateArgs createArgs = Marshal.PtrToStructure<CreateArgs>(args);
|
||||
|
||||
string str = createArgs.ManagedCopy;
|
||||
|
||||
Console.WriteLine($"Trying to get type \"{str}\"");
|
||||
|
||||
Type? type = Type.GetType(createArgs.ManagedCopy, true);
|
||||
|
||||
if (type == null)
|
||||
{
|
||||
Console.WriteLine("Type was null.");
|
||||
return IntPtr.Zero;
|
||||
}
|
||||
|
||||
object? instance = Activator.CreateInstance(type);
|
||||
|
||||
if (instance == null)
|
||||
return IntPtr.Zero;
|
||||
|
||||
GCHandle handle = GCHandle.Alloc(instance);
|
||||
|
||||
return GCHandle.ToIntPtr(handle);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[UnmanagedCallersOnly]
|
||||
public static void CallMethod(IntPtr instance, IntPtr methodName, int methodNameLength)
|
||||
{
|
||||
GCHandle handle = GCHandle.FromIntPtr(instance);
|
||||
|
||||
if (handle.Target == null)
|
||||
throw new Exception("Handle has no target?");
|
||||
|
||||
Type type = handle.Target.GetType();
|
||||
|
||||
string name = Marshal.PtrToStringUTF8(methodName, methodNameLength);
|
||||
|
||||
MethodInfo? mi = type.GetMethod(name);
|
||||
|
||||
if (mi == null)
|
||||
throw new Exception("MethodInfo is null.");
|
||||
|
||||
mi.Invoke(handle.Target, null);
|
||||
}
|
||||
|
||||
|
||||
public delegate void FreeInstanceEntryPoint(IntPtr instance);
|
||||
|
||||
[UnmanagedCallersOnly]
|
||||
public static void FreeInstance(IntPtr instance)
|
||||
{
|
||||
GCHandle handle = GCHandle.FromIntPtr(instance);
|
||||
handle.Free();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
using System.Numerics;
|
||||
|
||||
namespace DotNetScriptingHelper;
|
||||
|
||||
public static class QuaternionExtensions
|
||||
{
|
||||
public static (Vector3 Axis, float Angle) ToAxisAngle(this Quaternion quat)
|
||||
{
|
||||
// scalar part = cos(θ/2)
|
||||
// So, we can extract the angle directly.
|
||||
float angle = 2.0f * MathF.Acos(quat.W);
|
||||
|
||||
// vector part = axis * sin(θ/2)
|
||||
// In other words, the vector part is the axis, but with length of sin(θ/2).
|
||||
// We assume quaternion is unit length, so subtracting w^2 gives us length of just vector part (aka sin(θ/2)).
|
||||
float length = MathF.Sqrt(1.0f - (quat.W * quat.W));
|
||||
|
||||
Vector3 axis;
|
||||
|
||||
// Normalize vector part to get the axis!
|
||||
if (length == 0)
|
||||
{
|
||||
axis = Vector3.Zero;
|
||||
}
|
||||
else
|
||||
{
|
||||
length = 1.0f / length;
|
||||
axis.X = quat.X * length;
|
||||
axis.Y = quat.Y * length;
|
||||
axis.Z = quat.Z * length;
|
||||
}
|
||||
|
||||
return (axis, angle);
|
||||
}
|
||||
|
||||
public static Vector3 ToEulerAngles(this Quaternion q)
|
||||
{
|
||||
// http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToEuler/
|
||||
|
||||
Vector3 result;
|
||||
|
||||
float sqw = q.W * q.W;
|
||||
float sqx = q.X * q.X;
|
||||
float sqy = q.Y * q.Y;
|
||||
float sqz = q.Z * q.Z;
|
||||
float unit = sqx + sqy + sqz + sqw; // if normalised is one, otherwise is correction factor
|
||||
float test = q.X * q.Y + q.Z * q.W;
|
||||
if (test > 0.4999f * unit)
|
||||
{ // singularity at north pole
|
||||
result.Y = 2.0f * MathF.Atan2(q.X, q.W);
|
||||
result.Z = MathF.PI / 2.0f;
|
||||
result.X = 0.0f;
|
||||
return result;
|
||||
}
|
||||
if (test < -0.4999f * unit)
|
||||
{ // singularity at south pole
|
||||
result.Y = -2.0f * MathF.Atan2(q.X, q.W);
|
||||
result.Z = -MathF.PI / 2.0f;
|
||||
result.X = 0.0f;
|
||||
return result;
|
||||
}
|
||||
result.Y = MathF.Atan2(2 * q.Y * q.W - 2 * q.X * q.Z, sqx - sqy - sqz + sqw);
|
||||
result.Z = MathF.Asin(2 * test / unit);
|
||||
result.X = MathF.Atan2(2 * q.X * q.W - 2 * q.Y * q.Z, -sqx + sqy - sqz + sqw);
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using DotNetScriptingHelper.Components;
|
||||
|
||||
namespace DotNetScriptingHelper;
|
||||
|
||||
public abstract class ScriptableEntity
|
||||
{
|
||||
internal Entity Entity;
|
||||
|
||||
public virtual void OnCreate() { }
|
||||
protected virtual void OnDestroy() { }
|
||||
protected virtual void OnUpdate(GameTime gameTime) { }
|
||||
|
||||
[UnmanagedCallersOnly]
|
||||
public static IntPtr CreateInstance(IntPtr typeNamePtr, int typeNameLength, EcsEntity entity, IntPtr scene)
|
||||
{
|
||||
try
|
||||
{
|
||||
string typeName = Marshal.PtrToStringUTF8(typeNamePtr, typeNameLength);
|
||||
|
||||
Type? type = Type.GetType(typeName, true);
|
||||
|
||||
Debug.Assert(type != null, "Type not found.");
|
||||
|
||||
object? instance = Activator.CreateInstance(type);
|
||||
|
||||
Debug.Assert(instance != null, "Instance could not be created");
|
||||
|
||||
Debug.Assert(instance is ScriptableEntity, "Activated instance doesn't inherit from ScriptableEntity");
|
||||
|
||||
if (instance is not ScriptableEntity scriptableEntity)
|
||||
return IntPtr.Zero;
|
||||
|
||||
scriptableEntity.Entity = new Entity(entity, scene);
|
||||
scriptableEntity.OnCreate();
|
||||
|
||||
GCHandle handle = GCHandle.Alloc(instance);
|
||||
return GCHandle.ToIntPtr(handle);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[UnmanagedCallersOnly]
|
||||
public static void DestroyEntity(IntPtr entityPtr)
|
||||
{
|
||||
GCHandle entityHandle = GCHandle.FromIntPtr(entityPtr);
|
||||
|
||||
if (entityHandle.Target is ScriptableEntity entity)
|
||||
{
|
||||
entity.OnDestroy();
|
||||
}
|
||||
|
||||
entityHandle.Free();
|
||||
}
|
||||
|
||||
[UnmanagedCallersOnly]
|
||||
public static void UpdateEntity(IntPtr entityPtr, ulong frameCount, TimeSpan totalTime, TimeSpan frameTime)
|
||||
{
|
||||
GCHandle entityHandle = GCHandle.FromIntPtr(entityPtr);
|
||||
|
||||
if (entityHandle.Target is ScriptableEntity entity)
|
||||
{
|
||||
GameTime gameTime = new GameTime(frameCount, totalTime, frameTime);
|
||||
|
||||
entity.OnUpdate(gameTime);
|
||||
}
|
||||
}
|
||||
|
||||
[DllImport("GlitchyEditor.exe", EntryPoint = "GE_DoStuff")]
|
||||
static extern int DoStuff();
|
||||
|
||||
[DllImport("GlitchyEditor.exe", EntryPoint = "GE_DotNetScript_GetComponent")]
|
||||
private static extern IntPtr GetComponent(EcsEntity entity, IntPtr scenePtr);
|
||||
|
||||
protected TransformComponent GetTransform()// where T : struct
|
||||
{
|
||||
IntPtr component = GetComponent(Entity.Handle, Entity.Scene);
|
||||
|
||||
return new TransformComponent(component);
|
||||
|
||||
//unsafe
|
||||
//{
|
||||
// TransformComponent* transform = (TransformComponent*)component;
|
||||
|
||||
// return ref *transform;
|
||||
//}
|
||||
|
||||
//GameComponentAttribute? attribute = typeof(T).GetCustomAttribute<GameComponentAttribute>();
|
||||
|
||||
//Debug.Assert(attribute != null, $"Requested type {typeof(T)} is not a component.");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System.Numerics;
|
||||
using DotNetScriptingHelper.Components;
|
||||
|
||||
namespace DotNetScriptingHelper;
|
||||
|
||||
public class TestEntityScript : ScriptableEntity
|
||||
{
|
||||
private TransformComponent _transform;
|
||||
|
||||
public override void OnCreate()
|
||||
{
|
||||
_transform = GetTransform();
|
||||
}
|
||||
|
||||
protected override void OnUpdate(GameTime gameTime)
|
||||
{
|
||||
float f = (float)Math.Sin(gameTime.TotalSeconds);
|
||||
|
||||
Vector3 pos = _transform.Position;
|
||||
|
||||
pos.Y = f;
|
||||
|
||||
_transform.Position = pos;
|
||||
|
||||
float fx = MathF.Sin(gameTime.TotalSeconds * 2) / 2 + 1;
|
||||
float fy = MathF.Cos(gameTime.TotalSeconds * 2) / 2 + 1;
|
||||
|
||||
Vector3 scl = _transform.Scale;
|
||||
|
||||
scl.X = fx;
|
||||
scl.Y = fy;
|
||||
|
||||
_transform.Scale = scl;
|
||||
|
||||
float fr = MathF.Cos(gameTime.TotalSeconds / 4) * MathF.PI * 10;
|
||||
|
||||
_transform.Rotation = Quaternion.CreateFromYawPitchRoll(0, 0, fr);
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,8 @@
|
||||
//
|
||||
|
||||
#include "GlitchyEngineHelper.h"
|
||||
#include "vendor/xxHash/xxhash.h"
|
||||
#include "vendor/DirectXTK/Inc/DDSTextureLoader.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
@@ -5,6 +5,3 @@
|
||||
|
||||
#define GE_EXPORT extern "C" __declspec(dllexport)
|
||||
#define GE_CALLTYPE __cdecl
|
||||
|
||||
#include "vendor/xxHash/xxhash.h"
|
||||
#include "vendor/DirectXTK/Inc/DDSTextureLoader.h"
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Interop;
|
||||
|
||||
using internal GlitchyEngineHelper.DotNet;
|
||||
|
||||
namespace GlitchyEngineHelper.DotNet
|
||||
{
|
||||
static
|
||||
{
|
||||
#if BF_PLATFORM_WINDOWS
|
||||
internal typealias char = char16;
|
||||
#else
|
||||
internal typealias char = char8;
|
||||
#endif
|
||||
}
|
||||
|
||||
static class CoreClr
|
||||
{
|
||||
public const char* UNMANAGEDCALLERSONLY_METHOD = (char*)(void*)-1;
|
||||
|
||||
public typealias LoadAssemblyAndGetFunctionPointerFn = function [CallingConvention(.Stdcall)] c_int(
|
||||
char* assemblyPath,
|
||||
char* typeName,
|
||||
char* methodName,
|
||||
char* delegateTypeName,
|
||||
void* reserved,
|
||||
out void* outDelegate);
|
||||
|
||||
public typealias GetFunctionPointerFn = function [CallingConvention(.Stdcall)] c_int(
|
||||
char* typeName,
|
||||
char* MethodName,
|
||||
char* delegateTypeName,
|
||||
void* loadContext,
|
||||
void* reserved,
|
||||
out void* outDelegate
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Interop;
|
||||
using System.Diagnostics;
|
||||
using GlitchyEngineHelper.DotNet;
|
||||
|
||||
namespace GlitchyEngineHelper.DotNet
|
||||
{
|
||||
class DotNetContext
|
||||
{
|
||||
#if BF_PLATFORM_WINDOWS
|
||||
internal typealias char = char16;
|
||||
#else
|
||||
internal typealias char = char8;
|
||||
#endif
|
||||
|
||||
HostFxr.InitializeForDotnetCommandLineFn InitFn;
|
||||
HostFxr.GetRuntimeDelegateFn GetDelegate;
|
||||
HostFxr.CloseFn Close;
|
||||
HostFxr.SetRuntimePropertyValueFn SetRuntimePropertyValueFn;
|
||||
|
||||
CoreClr.LoadAssemblyAndGetFunctionPointerFn LoadAssemblyAndGetFunctionPointerFn;
|
||||
CoreClr.GetFunctionPointerFn GetFunctionPointerFn;
|
||||
|
||||
private String _configPath ~ delete _;
|
||||
|
||||
public this(String configPath)
|
||||
{
|
||||
_configPath = new String(configPath);
|
||||
}
|
||||
|
||||
private mixin RawPointer(StringView str)
|
||||
{
|
||||
#if BF_PLATFORM_WINDOWS
|
||||
str.ToScopedNativeWChar!:mixin()
|
||||
#else
|
||||
str.CStr()
|
||||
#endif
|
||||
}
|
||||
|
||||
public void Init()
|
||||
{
|
||||
LoadHostFxr();
|
||||
|
||||
InitAndStartRuntime();
|
||||
}
|
||||
|
||||
private void LoadHostFxr()
|
||||
{
|
||||
char[256] buffer = ?;
|
||||
c_size bufferSize = buffer.Count;
|
||||
int rc = NetHost.get_hostfxr_path(&buffer, &bufferSize, null);
|
||||
|
||||
Debug.Assert(rc == 0);
|
||||
|
||||
// Load hostfxr and get desired exports
|
||||
void* lib = LoadLibrary(&buffer);
|
||||
InitFn = GetExport<HostFxr.InitializeForDotnetCommandLineFn>(lib, "hostfxr_initialize_for_dotnet_command_line");
|
||||
GetDelegate = GetExport<HostFxr.GetRuntimeDelegateFn>(lib, "hostfxr_get_runtime_delegate");
|
||||
SetRuntimePropertyValueFn = GetExport<HostFxr.SetRuntimePropertyValueFn>(lib, "hostfxr_set_runtime_property_value");
|
||||
Close = GetExport<HostFxr.CloseFn>(lib, "hostfxr_close");
|
||||
|
||||
Debug.Assert(InitFn != null && GetDelegate != null && Close != null);
|
||||
}
|
||||
|
||||
private void InitAndStartRuntime()
|
||||
{
|
||||
char* ptr = RawPointer!(_configPath);
|
||||
|
||||
char*[2] args = char*[](
|
||||
ptr,
|
||||
null
|
||||
);
|
||||
|
||||
HostFxr.Handle cxt = null;
|
||||
|
||||
int rc = InitFn(1, &args, null, &cxt);
|
||||
|
||||
if (rc != 0 || cxt == null)
|
||||
{
|
||||
Debug.WriteLine($"Init failed: {rc}");
|
||||
Close(cxt);
|
||||
|
||||
Debug.Assert(rc == 0);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.Assert(rc == 0);
|
||||
|
||||
rc = GetDelegate(cxt, .LoadAssemblyAndGetFunctionPointer, (void**)&LoadAssemblyAndGetFunctionPointerFn);
|
||||
|
||||
Debug.Assert(rc == 0, scope $"Get delegate failed: {rc}");
|
||||
|
||||
rc = GetDelegate(cxt, .GetFunctionPointer, (void**)&GetFunctionPointerFn);
|
||||
|
||||
Debug.Assert(rc == 0, scope $"Get delegate failed: {rc}");
|
||||
|
||||
Close(cxt);
|
||||
}
|
||||
|
||||
/*public int SetRuntimePropertyValue(StringView property, StringView value)
|
||||
{
|
||||
return SetRuntimePropertyValueFn(cxt, RawPointer!(property), RawPointer!(value));
|
||||
}*/
|
||||
|
||||
public int LoadAssemblyAndGetFunctionPointer<T>(StringView libraryPath, StringView typeName, StringView methodName, StringView delegateName, out T outDelegate) where T: operator explicit void*
|
||||
{
|
||||
void* funPtr = null;
|
||||
|
||||
int rc = LoadAssemblyAndGetFunctionPointerFn(RawPointer!(libraryPath), RawPointer!(typeName), RawPointer!(methodName), RawPointer!(delegateName), null, out funPtr);
|
||||
|
||||
outDelegate = (T)funPtr;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
public int LoadAssemblyAndGetFunctionPointerUnmanagedCallersOnly<T>(String libraryPath, String typeName, String methodName, out T outDelegate) where T: operator explicit void*
|
||||
{
|
||||
void* funPtr = null;
|
||||
|
||||
int rc = LoadAssemblyAndGetFunctionPointerFn(RawPointer!(libraryPath), RawPointer!(typeName), RawPointer!(methodName), CoreClr.UNMANAGEDCALLERSONLY_METHOD, null, out funPtr);
|
||||
|
||||
outDelegate = (T)funPtr;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
public int GetFunctionPointer<T>(String typeName, String methodName, String delegateName, out T outDelegate) where T: operator explicit void*
|
||||
{
|
||||
void* funPtr = null;
|
||||
|
||||
int rc = GetFunctionPointerFn(RawPointer!(typeName), RawPointer!(methodName), RawPointer!(delegateName), null, null, out funPtr);
|
||||
|
||||
outDelegate = (T)funPtr;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
public int GetFunctionPointerUnmanagedCallersOnly<T>(String typeName, String methodName, out T outDelegate) where T: operator explicit void*
|
||||
{
|
||||
void* funPtr = null;
|
||||
|
||||
int rc = GetFunctionPointerFn(RawPointer!(typeName), RawPointer!(methodName), CoreClr.UNMANAGEDCALLERSONLY_METHOD, null, null, out funPtr);
|
||||
|
||||
outDelegate = (T)funPtr;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
#if BF_PLATFORM_WINDOWS
|
||||
private void* LoadLibrary(char* path)
|
||||
{
|
||||
Windows.HInstance handle = Windows.LoadLibraryW(path);
|
||||
|
||||
Debug.Assert(handle != 0);
|
||||
|
||||
return (void*)(int)handle;
|
||||
}
|
||||
|
||||
private T GetExport<T>(void* handle, char8* name) where T : operator explicit void*
|
||||
{
|
||||
void* f = Windows.GetProcAddress((Windows.HModule)(int)handle, name);
|
||||
|
||||
Debug.Assert(f != null);
|
||||
|
||||
return (T)f;
|
||||
}
|
||||
#else
|
||||
private void* LoadLibrary(char* path)
|
||||
{
|
||||
// TODO!
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.Interop;
|
||||
|
||||
using internal GlitchyEngineHelper.DotNet;
|
||||
|
||||
namespace GlitchyEngineHelper.DotNet
|
||||
{
|
||||
static class HostFxr
|
||||
{
|
||||
public enum DelegateType : c_int
|
||||
{
|
||||
ComActivation,
|
||||
LoadInMemoryAssembly,
|
||||
WinrtActivation,
|
||||
ComRegister,
|
||||
ComUnregister,
|
||||
LoadAssemblyAndGetFunctionPointer,
|
||||
GetFunctionPointer,
|
||||
}
|
||||
|
||||
public typealias Handle = void*;
|
||||
|
||||
[CRepr]
|
||||
public struct InitializeParameters
|
||||
{
|
||||
public c_size Size = sizeof(InitializeParameters);
|
||||
public char* HostPath;
|
||||
public char* DotnetRoot;
|
||||
};
|
||||
|
||||
public typealias InitializeForRuntimeConfigFn = function [CallingConvention(.Cdecl)] int32(char* runtimeConfigPath, InitializeParameters* parameters, Handle* hostContextHandle);
|
||||
public typealias InitializeForDotnetCommandLineFn = function [CallingConvention(.Cdecl)] int32(c_int argc, char** argv, InitializeParameters* parameters, Handle* hostContextHandle);
|
||||
public typealias GetRuntimeDelegateFn = function [CallingConvention(.Cdecl)] int32(Handle host_context_handle, DelegateType type, void** outDelegate);
|
||||
public typealias SetRuntimePropertyValueFn = function [CallingConvention(.Cdecl)] int32(Handle host_context_handle, char* name, char* value);
|
||||
public typealias CloseFn = function [CallingConvention(.Cdecl)] int32(Handle host_context_handle);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Interop;
|
||||
|
||||
using internal GlitchyEngineHelper.DotNet;
|
||||
|
||||
namespace GlitchyEngineHelper.DotNet
|
||||
{
|
||||
static class NetHost
|
||||
{
|
||||
public struct get_hostfxr_parameters
|
||||
{
|
||||
public c_size size;
|
||||
public char* assembly_path;
|
||||
public char* dotnet_root;
|
||||
};
|
||||
|
||||
[CallingConvention(.Stdcall), LinkName("get_hostfxr_path")]
|
||||
public static extern int get_hostfxr_path(
|
||||
char* buffer,
|
||||
c_size* buffer_size,
|
||||
get_hostfxr_parameters *parameters);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) .NET Foundation and Contributors
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
[InternetShortcut]
|
||||
URL=https://www.nuget.org/packages/Microsoft.NETCore.App.Host.win-x64/6.0.4
|
||||
IDList=
|
||||
HotKey=0
|
||||
IconFile=C:\Users\Simon\AppData\Local\Mozilla\Firefox\Profiles\4fg8w6bv.default-release\shortcutCache\ZRtEa8YtjlqBgeyz_pfmfw==.ico
|
||||
IconIndex=0
|
||||
@@ -0,0 +1,939 @@
|
||||
.NET Runtime uses third-party libraries or other resources that may be
|
||||
distributed under licenses different than the .NET Runtime software.
|
||||
|
||||
In the event that we accidentally failed to list a required notice, please
|
||||
bring it to our attention. Post an issue or email us:
|
||||
|
||||
dotnet@microsoft.com
|
||||
|
||||
The attached notices are provided for information only.
|
||||
|
||||
License notice for ASP.NET
|
||||
-------------------------------
|
||||
|
||||
Copyright (c) .NET Foundation. All rights reserved.
|
||||
Licensed under the Apache License, Version 2.0.
|
||||
|
||||
Available at
|
||||
https://github.com/dotnet/aspnetcore/blob/main/LICENSE.txt
|
||||
|
||||
License notice for Slicing-by-8
|
||||
-------------------------------
|
||||
|
||||
http://sourceforge.net/projects/slicing-by-8/
|
||||
|
||||
Copyright (c) 2004-2006 Intel Corporation - All Rights Reserved
|
||||
|
||||
|
||||
This software program is licensed subject to the BSD License, available at
|
||||
http://www.opensource.org/licenses/bsd-license.html.
|
||||
|
||||
|
||||
License notice for Unicode data
|
||||
-------------------------------
|
||||
|
||||
https://www.unicode.org/license.html
|
||||
|
||||
Copyright © 1991-2020 Unicode, Inc. All rights reserved.
|
||||
Distributed under the Terms of Use in https://www.unicode.org/copyright.html.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Unicode data files and any associated documentation
|
||||
(the "Data Files") or Unicode software and any associated documentation
|
||||
(the "Software") to deal in the Data Files or Software
|
||||
without restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, and/or sell copies of
|
||||
the Data Files or Software, and to permit persons to whom the Data Files
|
||||
or Software are furnished to do so, provided that either
|
||||
(a) this copyright and permission notice appear with all copies
|
||||
of the Data Files or Software, or
|
||||
(b) this copyright and permission notice appear in associated
|
||||
Documentation.
|
||||
|
||||
THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
|
||||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
||||
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
|
||||
NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
|
||||
DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THE DATA FILES OR SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of a copyright holder
|
||||
shall not be used in advertising or otherwise to promote the sale,
|
||||
use or other dealings in these Data Files or Software without prior
|
||||
written authorization of the copyright holder.
|
||||
|
||||
License notice for Zlib
|
||||
-----------------------
|
||||
|
||||
https://github.com/madler/zlib
|
||||
http://zlib.net/zlib_license.html
|
||||
|
||||
/* zlib.h -- interface of the 'zlib' general purpose compression library
|
||||
version 1.2.11, January 15th, 2017
|
||||
|
||||
Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Jean-loup Gailly Mark Adler
|
||||
jloup@gzip.org madler@alumni.caltech.edu
|
||||
|
||||
*/
|
||||
|
||||
License notice for Mono
|
||||
-------------------------------
|
||||
|
||||
http://www.mono-project.com/docs/about-mono/
|
||||
|
||||
Copyright (c) .NET Foundation Contributors
|
||||
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the Software), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
License notice for International Organization for Standardization
|
||||
-----------------------------------------------------------------
|
||||
|
||||
Portions (C) International Organization for Standardization 1986:
|
||||
Permission to copy in any form is granted for use with
|
||||
conforming SGML systems and applications as defined in
|
||||
ISO 8879, provided this notice is included in all copies.
|
||||
|
||||
License notice for Intel
|
||||
------------------------
|
||||
|
||||
"Copyright (c) 2004-2006 Intel Corporation - All Rights Reserved
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
License notice for Xamarin and Novell
|
||||
-------------------------------------
|
||||
|
||||
Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
Copyright (c) 2011 Novell, Inc (http://www.novell.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
Third party notice for W3C
|
||||
--------------------------
|
||||
|
||||
"W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE
|
||||
Status: This license takes effect 13 May, 2015.
|
||||
This work is being provided by the copyright holders under the following license.
|
||||
License
|
||||
By obtaining and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.
|
||||
Permission to copy, modify, and distribute this work, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the work or portions thereof, including modifications:
|
||||
The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
|
||||
Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software and Document Short Notice should be included.
|
||||
Notice of any changes or modifications, through a copyright statement on the new code or document such as "This software or document includes material copied from or derived from [title and URI of the W3C document]. Copyright © [YEAR] W3C® (MIT, ERCIM, Keio, Beihang)."
|
||||
Disclaimers
|
||||
THIS WORK IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENT WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
|
||||
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENT.
|
||||
The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the work without specific, written prior permission. Title to copyright in this work will at all times remain with copyright holders."
|
||||
|
||||
License notice for Bit Twiddling Hacks
|
||||
--------------------------------------
|
||||
|
||||
Bit Twiddling Hacks
|
||||
|
||||
By Sean Eron Anderson
|
||||
seander@cs.stanford.edu
|
||||
|
||||
Individually, the code snippets here are in the public domain (unless otherwise
|
||||
noted) — feel free to use them however you please. The aggregate collection and
|
||||
descriptions are © 1997-2005 Sean Eron Anderson. The code and descriptions are
|
||||
distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY and
|
||||
without even the implied warranty of merchantability or fitness for a particular
|
||||
purpose.
|
||||
|
||||
License notice for Brotli
|
||||
--------------------------------------
|
||||
|
||||
Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
compress_fragment.c:
|
||||
Copyright (c) 2011, Google Inc.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* Neither the name of Google Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
decode_fuzzer.c:
|
||||
Copyright (c) 2015 The Chromium Authors. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* Neither the name of Google Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
|
||||
License notice for Json.NET
|
||||
-------------------------------
|
||||
|
||||
https://github.com/JamesNK/Newtonsoft.Json/blob/master/LICENSE.md
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2007 James Newton-King
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
License notice for vectorized base64 encoding / decoding
|
||||
--------------------------------------------------------
|
||||
|
||||
Copyright (c) 2005-2007, Nick Galbreath
|
||||
Copyright (c) 2013-2017, Alfred Klomp
|
||||
Copyright (c) 2015-2017, Wojciech Mula
|
||||
Copyright (c) 2016-2017, Matthieu Darbois
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
License notice for RFC 3492
|
||||
---------------------------
|
||||
|
||||
The punycode implementation is based on the sample code in RFC 3492
|
||||
|
||||
Copyright (C) The Internet Society (2003). All Rights Reserved.
|
||||
|
||||
This document and translations of it may be copied and furnished to
|
||||
others, and derivative works that comment on or otherwise explain it
|
||||
or assist in its implementation may be prepared, copied, published
|
||||
and distributed, in whole or in part, without restriction of any
|
||||
kind, provided that the above copyright notice and this paragraph are
|
||||
included on all such copies and derivative works. However, this
|
||||
document itself may not be modified in any way, such as by removing
|
||||
the copyright notice or references to the Internet Society or other
|
||||
Internet organizations, except as needed for the purpose of
|
||||
developing Internet standards in which case the procedures for
|
||||
copyrights defined in the Internet Standards process must be
|
||||
followed, or as required to translate it into languages other than
|
||||
English.
|
||||
|
||||
The limited permissions granted above are perpetual and will not be
|
||||
revoked by the Internet Society or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is provided on an
|
||||
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
|
||||
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
|
||||
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
License notice for Algorithm from Internet Draft document "UUIDs and GUIDs"
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc.
|
||||
Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. &
|
||||
Digital Equipment Corporation, Maynard, Mass.
|
||||
To anyone who acknowledges that this file is provided "AS IS"
|
||||
without any express or implied warranty: permission to use, copy,
|
||||
modify, and distribute this file for any purpose is hereby
|
||||
granted without fee, provided that the above copyright notices and
|
||||
this notice appears in all source code copies, and that none of
|
||||
the names of Open Software Foundation, Inc., Hewlett-Packard
|
||||
Company, or Digital Equipment Corporation be used in advertising
|
||||
or publicity pertaining to distribution of the software without
|
||||
specific, written prior permission. Neither Open Software
|
||||
Foundation, Inc., Hewlett-Packard Company, Microsoft, nor Digital Equipment
|
||||
Corporation makes any representations about the suitability of
|
||||
this software for any purpose.
|
||||
|
||||
Copyright(C) The Internet Society 1997. All Rights Reserved.
|
||||
|
||||
This document and translations of it may be copied and furnished to others,
|
||||
and derivative works that comment on or otherwise explain it or assist in
|
||||
its implementation may be prepared, copied, published and distributed, in
|
||||
whole or in part, without restriction of any kind, provided that the above
|
||||
copyright notice and this paragraph are included on all such copies and
|
||||
derivative works.However, this document itself may not be modified in any
|
||||
way, such as by removing the copyright notice or references to the Internet
|
||||
Society or other Internet organizations, except as needed for the purpose of
|
||||
developing Internet standards in which case the procedures for copyrights
|
||||
defined in the Internet Standards process must be followed, or as required
|
||||
to translate it into languages other than English.
|
||||
|
||||
The limited permissions granted above are perpetual and will not be revoked
|
||||
by the Internet Society or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is provided on an "AS IS"
|
||||
basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE
|
||||
DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
||||
ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY
|
||||
RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
|
||||
PARTICULAR PURPOSE.
|
||||
|
||||
License notice for Algorithm from RFC 4122 -
|
||||
A Universally Unique IDentifier (UUID) URN Namespace
|
||||
----------------------------------------------------
|
||||
|
||||
Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc.
|
||||
Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. &
|
||||
Digital Equipment Corporation, Maynard, Mass.
|
||||
Copyright (c) 1998 Microsoft.
|
||||
To anyone who acknowledges that this file is provided "AS IS"
|
||||
without any express or implied warranty: permission to use, copy,
|
||||
modify, and distribute this file for any purpose is hereby
|
||||
granted without fee, provided that the above copyright notices and
|
||||
this notice appears in all source code copies, and that none of
|
||||
the names of Open Software Foundation, Inc., Hewlett-Packard
|
||||
Company, Microsoft, or Digital Equipment Corporation be used in
|
||||
advertising or publicity pertaining to distribution of the software
|
||||
without specific, written prior permission. Neither Open Software
|
||||
Foundation, Inc., Hewlett-Packard Company, Microsoft, nor Digital
|
||||
Equipment Corporation makes any representations about the
|
||||
suitability of this software for any purpose."
|
||||
|
||||
License notice for The LLVM Compiler Infrastructure
|
||||
---------------------------------------------------
|
||||
|
||||
Developed by:
|
||||
|
||||
LLVM Team
|
||||
|
||||
University of Illinois at Urbana-Champaign
|
||||
|
||||
http://llvm.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal with
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimers.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimers in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the names of the LLVM Team, University of Illinois at
|
||||
Urbana-Champaign, nor the names of its contributors may be used to
|
||||
endorse or promote products derived from this Software without specific
|
||||
prior written permission.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
|
||||
SOFTWARE.
|
||||
|
||||
License notice for Bob Jenkins
|
||||
------------------------------
|
||||
|
||||
By Bob Jenkins, 1996. bob_jenkins@burtleburtle.net. You may use this
|
||||
code any way you wish, private, educational, or commercial. It's free.
|
||||
|
||||
License notice for Greg Parker
|
||||
------------------------------
|
||||
|
||||
Greg Parker gparker@cs.stanford.edu December 2000
|
||||
This code is in the public domain and may be copied or modified without
|
||||
permission.
|
||||
|
||||
License notice for libunwind based code
|
||||
----------------------------------------
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
License notice for Printing Floating-Point Numbers (Dragon4)
|
||||
------------------------------------------------------------
|
||||
|
||||
/******************************************************************************
|
||||
Copyright (c) 2014 Ryan Juckett
|
||||
http://www.ryanjuckett.com/
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source
|
||||
distribution.
|
||||
******************************************************************************/
|
||||
|
||||
License notice for Printing Floating-point Numbers (Grisu3)
|
||||
-----------------------------------------------------------
|
||||
|
||||
Copyright 2012 the V8 project authors. All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials provided
|
||||
with the distribution.
|
||||
* Neither the name of Google Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
License notice for xxHash
|
||||
-------------------------
|
||||
|
||||
xxHash Library
|
||||
Copyright (c) 2012-2014, Yann Collet
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||
list of conditions and the following disclaimer in the documentation and/or
|
||||
other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
License notice for Berkeley SoftFloat Release 3e
|
||||
------------------------------------------------
|
||||
|
||||
https://github.com/ucb-bar/berkeley-softfloat-3
|
||||
https://github.com/ucb-bar/berkeley-softfloat-3/blob/master/COPYING.txt
|
||||
|
||||
License for Berkeley SoftFloat Release 3e
|
||||
|
||||
John R. Hauser
|
||||
2018 January 20
|
||||
|
||||
The following applies to the whole of SoftFloat Release 3e as well as to
|
||||
each source file individually.
|
||||
|
||||
Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the
|
||||
University of California. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions, and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions, and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the University nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
License notice for xoshiro RNGs
|
||||
--------------------------------
|
||||
|
||||
Written in 2018 by David Blackman and Sebastiano Vigna (vigna@acm.org)
|
||||
|
||||
To the extent possible under law, the author has dedicated all copyright
|
||||
and related and neighboring rights to this software to the public domain
|
||||
worldwide. This software is distributed without any warranty.
|
||||
|
||||
See <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
|
||||
License for fastmod (https://github.com/lemire/fastmod) and ibm-fpgen (https://github.com/nigeltao/parse-number-fxx-test-data)
|
||||
--------------------------------------
|
||||
|
||||
Copyright 2018 Daniel Lemire
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
License notice for The C++ REST SDK
|
||||
-----------------------------------
|
||||
|
||||
C++ REST SDK
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Microsoft Corporation
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
License notice for MessagePack-CSharp
|
||||
-------------------------------------
|
||||
|
||||
MessagePack for C#
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017 Yoshifumi Kawai
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
License notice for lz4net
|
||||
-------------------------------------
|
||||
|
||||
lz4net
|
||||
|
||||
Copyright (c) 2013-2017, Milosz Krajewski
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
License notice for Nerdbank.Streams
|
||||
-----------------------------------
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Andrew Arnott
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
License notice for RapidJSON
|
||||
----------------------------
|
||||
|
||||
Tencent is pleased to support the open source community by making RapidJSON available.
|
||||
|
||||
Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
|
||||
|
||||
Licensed under the MIT License (the "License"); you may not use this file except
|
||||
in compliance with the License. You may obtain a copy of the License at
|
||||
|
||||
http://opensource.org/licenses/MIT
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software distributed
|
||||
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations under the License.
|
||||
|
||||
License notice for DirectX Math Library
|
||||
---------------------------------------
|
||||
|
||||
https://github.com/microsoft/DirectXMath/blob/master/LICENSE
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2011-2020 Microsoft Corp
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
software and associated documentation files (the "Software"), to deal in the Software
|
||||
without restriction, including without limitation the rights to use, copy, modify,
|
||||
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies
|
||||
or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
||||
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
|
||||
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
License notice for ldap4net
|
||||
---------------------------
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2018 Alexander Chermyanin
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
License notice for vectorized sorting code
|
||||
------------------------------------------
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 Dan Shechter
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
License notice for musl
|
||||
-----------------------
|
||||
|
||||
musl as a whole is licensed under the following standard MIT license:
|
||||
|
||||
Copyright © 2005-2020 Rich Felker, et al.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
License notice for "Faster Unsigned Division by Constants"
|
||||
------------------------------
|
||||
|
||||
Reference implementations of computing and using the "magic number" approach to dividing
|
||||
by constants, including codegen instructions. The unsigned division incorporates the
|
||||
"round down" optimization per ridiculous_fish.
|
||||
|
||||
This is free and unencumbered software. Any copyright is dedicated to the Public Domain.
|
||||
|
||||
|
||||
License notice for mimalloc
|
||||
-----------------------------------
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019 Microsoft Corporation, Daan Leijen
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,47 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
|
||||
#ifndef __CORECLR_DELEGATES_H__
|
||||
#define __CORECLR_DELEGATES_H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#if defined(_WIN32)
|
||||
#define CORECLR_DELEGATE_CALLTYPE __stdcall
|
||||
#ifdef _WCHAR_T_DEFINED
|
||||
typedef wchar_t char_t;
|
||||
#else
|
||||
typedef unsigned short char_t;
|
||||
#endif
|
||||
#else
|
||||
#define CORECLR_DELEGATE_CALLTYPE
|
||||
typedef char char_t;
|
||||
#endif
|
||||
|
||||
#define UNMANAGEDCALLERSONLY_METHOD ((const char_t*)-1)
|
||||
|
||||
// Signature of delegate returned by coreclr_delegate_type::load_assembly_and_get_function_pointer
|
||||
typedef int (CORECLR_DELEGATE_CALLTYPE *load_assembly_and_get_function_pointer_fn)(
|
||||
const char_t *assembly_path /* Fully qualified path to assembly */,
|
||||
const char_t *type_name /* Assembly qualified type name */,
|
||||
const char_t *method_name /* Public static method name compatible with delegateType */,
|
||||
const char_t *delegate_type_name /* Assembly qualified delegate type name or null
|
||||
or UNMANAGEDCALLERSONLY_METHOD if the method is marked with
|
||||
the UnmanagedCallersOnlyAttribute. */,
|
||||
void *reserved /* Extensibility parameter (currently unused and must be 0) */,
|
||||
/*out*/ void **delegate /* Pointer where to store the function pointer result */);
|
||||
|
||||
// Signature of delegate returned by load_assembly_and_get_function_pointer_fn when delegate_type_name == null (default)
|
||||
typedef int (CORECLR_DELEGATE_CALLTYPE *component_entry_point_fn)(void *arg, int32_t arg_size_in_bytes);
|
||||
|
||||
typedef int (CORECLR_DELEGATE_CALLTYPE *get_function_pointer_fn)(
|
||||
const char_t *type_name /* Assembly qualified type name */,
|
||||
const char_t *method_name /* Public static method name compatible with delegateType */,
|
||||
const char_t *delegate_type_name /* Assembly qualified delegate type name or null,
|
||||
or UNMANAGEDCALLERSONLY_METHOD if the method is marked with
|
||||
the UnmanagedCallersOnlyAttribute. */,
|
||||
void *load_context /* Extensibility parameter (currently unused and must be 0) */,
|
||||
void *reserved /* Extensibility parameter (currently unused and must be 0) */,
|
||||
/*out*/ void **delegate /* Pointer where to store the function pointer result */);
|
||||
|
||||
#endif // __CORECLR_DELEGATES_H__
|
||||
@@ -0,0 +1,323 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
|
||||
#ifndef __HOSTFXR_H__
|
||||
#define __HOSTFXR_H__
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#if defined(_WIN32)
|
||||
#define HOSTFXR_CALLTYPE __cdecl
|
||||
#ifdef _WCHAR_T_DEFINED
|
||||
typedef wchar_t char_t;
|
||||
#else
|
||||
typedef unsigned short char_t;
|
||||
#endif
|
||||
#else
|
||||
#define HOSTFXR_CALLTYPE
|
||||
typedef char char_t;
|
||||
#endif
|
||||
|
||||
enum hostfxr_delegate_type
|
||||
{
|
||||
hdt_com_activation,
|
||||
hdt_load_in_memory_assembly,
|
||||
hdt_winrt_activation,
|
||||
hdt_com_register,
|
||||
hdt_com_unregister,
|
||||
hdt_load_assembly_and_get_function_pointer,
|
||||
hdt_get_function_pointer,
|
||||
};
|
||||
|
||||
typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_main_fn)(const int argc, const char_t **argv);
|
||||
typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_main_startupinfo_fn)(
|
||||
const int argc,
|
||||
const char_t **argv,
|
||||
const char_t *host_path,
|
||||
const char_t *dotnet_root,
|
||||
const char_t *app_path);
|
||||
typedef int32_t(HOSTFXR_CALLTYPE* hostfxr_main_bundle_startupinfo_fn)(
|
||||
const int argc,
|
||||
const char_t** argv,
|
||||
const char_t* host_path,
|
||||
const char_t* dotnet_root,
|
||||
const char_t* app_path,
|
||||
int64_t bundle_header_offset);
|
||||
|
||||
typedef void(HOSTFXR_CALLTYPE *hostfxr_error_writer_fn)(const char_t *message);
|
||||
|
||||
//
|
||||
// Sets a callback which is to be used to write errors to.
|
||||
//
|
||||
// Parameters:
|
||||
// error_writer
|
||||
// A callback function which will be invoked every time an error is to be reported.
|
||||
// Or nullptr to unregister previously registered callback and return to the default behavior.
|
||||
// Return value:
|
||||
// The previously registered callback (which is now unregistered), or nullptr if no previous callback
|
||||
// was registered
|
||||
//
|
||||
// The error writer is registered per-thread, so the registration is thread-local. On each thread
|
||||
// only one callback can be registered. Subsequent registrations overwrite the previous ones.
|
||||
//
|
||||
// By default no callback is registered in which case the errors are written to stderr.
|
||||
//
|
||||
// Each call to the error writer is sort of like writing a single line (the EOL character is omitted).
|
||||
// Multiple calls to the error writer may occure for one failure.
|
||||
//
|
||||
// If the hostfxr invokes functions in hostpolicy as part of its operation, the error writer
|
||||
// will be propagated to hostpolicy for the duration of the call. This means that errors from
|
||||
// both hostfxr and hostpolicy will be reporter through the same error writer.
|
||||
//
|
||||
typedef hostfxr_error_writer_fn(HOSTFXR_CALLTYPE *hostfxr_set_error_writer_fn)(hostfxr_error_writer_fn error_writer);
|
||||
|
||||
typedef void* hostfxr_handle;
|
||||
struct hostfxr_initialize_parameters
|
||||
{
|
||||
size_t size;
|
||||
const char_t *host_path;
|
||||
const char_t *dotnet_root;
|
||||
};
|
||||
|
||||
//
|
||||
// Initializes the hosting components for a dotnet command line running an application
|
||||
//
|
||||
// Parameters:
|
||||
// argc
|
||||
// Number of argv arguments
|
||||
// argv
|
||||
// Command-line arguments for running an application (as if through the dotnet executable).
|
||||
// Only command-line arguments which are accepted by runtime installation are supported, SDK/CLI commands are not supported.
|
||||
// For example 'app.dll app_argument_1 app_argument_2`.
|
||||
// parameters
|
||||
// Optional. Additional parameters for initialization
|
||||
// host_context_handle
|
||||
// On success, this will be populated with an opaque value representing the initialized host context
|
||||
//
|
||||
// Return value:
|
||||
// Success - Hosting components were successfully initialized
|
||||
// HostInvalidState - Hosting components are already initialized
|
||||
//
|
||||
// This function parses the specified command-line arguments to determine the application to run. It will
|
||||
// then find the corresponding .runtimeconfig.json and .deps.json with which to resolve frameworks and
|
||||
// dependencies and prepare everything needed to load the runtime.
|
||||
//
|
||||
// This function only supports arguments for running an application. It does not support SDK commands.
|
||||
//
|
||||
// This function does not load the runtime.
|
||||
//
|
||||
typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_initialize_for_dotnet_command_line_fn)(
|
||||
int argc,
|
||||
const char_t **argv,
|
||||
const struct hostfxr_initialize_parameters *parameters,
|
||||
/*out*/ hostfxr_handle *host_context_handle);
|
||||
|
||||
//
|
||||
// Initializes the hosting components using a .runtimeconfig.json file
|
||||
//
|
||||
// Parameters:
|
||||
// runtime_config_path
|
||||
// Path to the .runtimeconfig.json file
|
||||
// parameters
|
||||
// Optional. Additional parameters for initialization
|
||||
// host_context_handle
|
||||
// On success, this will be populated with an opaque value representing the initialized host context
|
||||
//
|
||||
// Return value:
|
||||
// Success - Hosting components were successfully initialized
|
||||
// Success_HostAlreadyInitialized - Config is compatible with already initialized hosting components
|
||||
// Success_DifferentRuntimeProperties - Config has runtime properties that differ from already initialized hosting components
|
||||
// CoreHostIncompatibleConfig - Config is incompatible with already initialized hosting components
|
||||
//
|
||||
// This function will process the .runtimeconfig.json to resolve frameworks and prepare everything needed
|
||||
// to load the runtime. It will only process the .deps.json from frameworks (not any app/component that
|
||||
// may be next to the .runtimeconfig.json).
|
||||
//
|
||||
// This function does not load the runtime.
|
||||
//
|
||||
// If called when the runtime has already been loaded, this function will check if the specified runtime
|
||||
// config is compatible with the existing runtime.
|
||||
//
|
||||
// Both Success_HostAlreadyInitialized and Success_DifferentRuntimeProperties codes are considered successful
|
||||
// initializations. In the case of Success_DifferentRuntimeProperties, it is left to the consumer to verify that
|
||||
// the difference in properties is acceptable.
|
||||
//
|
||||
typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_initialize_for_runtime_config_fn)(
|
||||
const char_t *runtime_config_path,
|
||||
const struct hostfxr_initialize_parameters *parameters,
|
||||
/*out*/ hostfxr_handle *host_context_handle);
|
||||
|
||||
//
|
||||
// Gets the runtime property value for an initialized host context
|
||||
//
|
||||
// Parameters:
|
||||
// host_context_handle
|
||||
// Handle to the initialized host context
|
||||
// name
|
||||
// Runtime property name
|
||||
// value
|
||||
// Out parameter. Pointer to a buffer with the property value.
|
||||
//
|
||||
// Return value:
|
||||
// The error code result.
|
||||
//
|
||||
// The buffer pointed to by value is owned by the host context. The lifetime of the buffer is only
|
||||
// guaranteed until any of the below occur:
|
||||
// - a 'run' method is called for the host context
|
||||
// - properties are changed via hostfxr_set_runtime_property_value
|
||||
// - the host context is closed via 'hostfxr_close'
|
||||
//
|
||||
// If host_context_handle is nullptr and an active host context exists, this function will get the
|
||||
// property value for the active host context.
|
||||
//
|
||||
typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_get_runtime_property_value_fn)(
|
||||
const hostfxr_handle host_context_handle,
|
||||
const char_t *name,
|
||||
/*out*/ const char_t **value);
|
||||
|
||||
//
|
||||
// Sets the value of a runtime property for an initialized host context
|
||||
//
|
||||
// Parameters:
|
||||
// host_context_handle
|
||||
// Handle to the initialized host context
|
||||
// name
|
||||
// Runtime property name
|
||||
// value
|
||||
// Value to set
|
||||
//
|
||||
// Return value:
|
||||
// The error code result.
|
||||
//
|
||||
// Setting properties is only supported for the first host context, before the runtime has been loaded.
|
||||
//
|
||||
// If the property already exists in the host context, it will be overwritten. If value is nullptr, the
|
||||
// property will be removed.
|
||||
//
|
||||
typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_set_runtime_property_value_fn)(
|
||||
const hostfxr_handle host_context_handle,
|
||||
const char_t *name,
|
||||
const char_t *value);
|
||||
|
||||
//
|
||||
// Gets all the runtime properties for an initialized host context
|
||||
//
|
||||
// Parameters:
|
||||
// host_context_handle
|
||||
// Handle to the initialized host context
|
||||
// count
|
||||
// [in] Size of the keys and values buffers
|
||||
// [out] Number of properties returned (size of keys/values buffers used). If the input value is too
|
||||
// small or keys/values is nullptr, this is populated with the number of available properties
|
||||
// keys
|
||||
// Array of pointers to buffers with runtime property keys
|
||||
// values
|
||||
// Array of pointers to buffers with runtime property values
|
||||
//
|
||||
// Return value:
|
||||
// The error code result.
|
||||
//
|
||||
// The buffers pointed to by keys and values are owned by the host context. The lifetime of the buffers is only
|
||||
// guaranteed until any of the below occur:
|
||||
// - a 'run' method is called for the host context
|
||||
// - properties are changed via hostfxr_set_runtime_property_value
|
||||
// - the host context is closed via 'hostfxr_close'
|
||||
//
|
||||
// If host_context_handle is nullptr and an active host context exists, this function will get the
|
||||
// properties for the active host context.
|
||||
//
|
||||
typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_get_runtime_properties_fn)(
|
||||
const hostfxr_handle host_context_handle,
|
||||
/*inout*/ size_t * count,
|
||||
/*out*/ const char_t **keys,
|
||||
/*out*/ const char_t **values);
|
||||
|
||||
//
|
||||
// Load CoreCLR and run the application for an initialized host context
|
||||
//
|
||||
// Parameters:
|
||||
// host_context_handle
|
||||
// Handle to the initialized host context
|
||||
//
|
||||
// Return value:
|
||||
// If the app was successfully run, the exit code of the application. Otherwise, the error code result.
|
||||
//
|
||||
// The host_context_handle must have been initialized using hostfxr_initialize_for_dotnet_command_line.
|
||||
//
|
||||
// This function will not return until the managed application exits.
|
||||
//
|
||||
typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_run_app_fn)(const hostfxr_handle host_context_handle);
|
||||
|
||||
//
|
||||
// Gets a typed delegate from the currently loaded CoreCLR or from a newly created one.
|
||||
//
|
||||
// Parameters:
|
||||
// host_context_handle
|
||||
// Handle to the initialized host context
|
||||
// type
|
||||
// Type of runtime delegate requested
|
||||
// delegate
|
||||
// An out parameter that will be assigned the delegate.
|
||||
//
|
||||
// Return value:
|
||||
// The error code result.
|
||||
//
|
||||
// If the host_context_handle was initialized using hostfxr_initialize_for_runtime_config,
|
||||
// then all delegate types are supported.
|
||||
// If the host_context_handle was initialized using hostfxr_initialize_for_dotnet_command_line,
|
||||
// then only the following delegate types are currently supported:
|
||||
// hdt_load_assembly_and_get_function_pointer
|
||||
// hdt_get_function_pointer
|
||||
//
|
||||
typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_get_runtime_delegate_fn)(
|
||||
const hostfxr_handle host_context_handle,
|
||||
enum hostfxr_delegate_type type,
|
||||
/*out*/ void **delegate);
|
||||
|
||||
//
|
||||
// Closes an initialized host context
|
||||
//
|
||||
// Parameters:
|
||||
// host_context_handle
|
||||
// Handle to the initialized host context
|
||||
//
|
||||
// Return value:
|
||||
// The error code result.
|
||||
//
|
||||
typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_close_fn)(const hostfxr_handle host_context_handle);
|
||||
|
||||
struct hostfxr_dotnet_environment_sdk_info
|
||||
{
|
||||
size_t size;
|
||||
const char_t* version;
|
||||
const char_t* path;
|
||||
};
|
||||
|
||||
typedef void(HOSTFXR_CALLTYPE* hostfxr_get_dotnet_environment_info_result_fn)(
|
||||
const struct hostfxr_dotnet_environment_info* info,
|
||||
void* result_context);
|
||||
|
||||
struct hostfxr_dotnet_environment_framework_info
|
||||
{
|
||||
size_t size;
|
||||
const char_t* name;
|
||||
const char_t* version;
|
||||
const char_t* path;
|
||||
};
|
||||
|
||||
struct hostfxr_dotnet_environment_info
|
||||
{
|
||||
size_t size;
|
||||
|
||||
const char_t* hostfxr_version;
|
||||
const char_t* hostfxr_commit_hash;
|
||||
|
||||
size_t sdk_count;
|
||||
const hostfxr_dotnet_environment_sdk_info* sdks;
|
||||
|
||||
size_t framework_count;
|
||||
const hostfxr_dotnet_environment_framework_info* frameworks;
|
||||
};
|
||||
|
||||
#endif //__HOSTFXR_H__
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,99 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
|
||||
#ifndef __NETHOST_H__
|
||||
#define __NETHOST_H__
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef NETHOST_EXPORT
|
||||
#define NETHOST_API __declspec(dllexport)
|
||||
#else
|
||||
// Consuming the nethost as a static library
|
||||
// Shouldn't export attempt to dllimport.
|
||||
#ifdef NETHOST_USE_AS_STATIC
|
||||
#define NETHOST_API
|
||||
#else
|
||||
#define NETHOST_API __declspec(dllimport)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define NETHOST_CALLTYPE __stdcall
|
||||
#ifdef _WCHAR_T_DEFINED
|
||||
typedef wchar_t char_t;
|
||||
#else
|
||||
typedef unsigned short char_t;
|
||||
#endif
|
||||
#else
|
||||
#ifdef NETHOST_EXPORT
|
||||
#define NETHOST_API __attribute__((__visibility__("default")))
|
||||
#else
|
||||
#define NETHOST_API
|
||||
#endif
|
||||
|
||||
#define NETHOST_CALLTYPE
|
||||
typedef char char_t;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// Parameters for get_hostfxr_path
|
||||
//
|
||||
// Fields:
|
||||
// size
|
||||
// Size of the struct. This is used for versioning.
|
||||
//
|
||||
// assembly_path
|
||||
// Path to the compenent's assembly.
|
||||
// If specified, hostfxr is located as if the assembly_path is the apphost
|
||||
//
|
||||
// dotnet_root
|
||||
// Path to directory containing the dotnet executable.
|
||||
// If specified, hostfxr is located as if an application is started using
|
||||
// 'dotnet app.dll', which means it will be searched for under the dotnet_root
|
||||
// path and the assembly_path is ignored.
|
||||
//
|
||||
struct get_hostfxr_parameters {
|
||||
size_t size;
|
||||
const char_t *assembly_path;
|
||||
const char_t *dotnet_root;
|
||||
};
|
||||
|
||||
//
|
||||
// Get the path to the hostfxr library
|
||||
//
|
||||
// Parameters:
|
||||
// buffer
|
||||
// Buffer that will be populated with the hostfxr path, including a null terminator.
|
||||
//
|
||||
// buffer_size
|
||||
// [in] Size of buffer in char_t units.
|
||||
// [out] Size of buffer used in char_t units. If the input value is too small
|
||||
// or buffer is nullptr, this is populated with the minimum required size
|
||||
// in char_t units for a buffer to hold the hostfxr path
|
||||
//
|
||||
// get_hostfxr_parameters
|
||||
// Optional. Parameters that modify the behaviour for locating the hostfxr library.
|
||||
// If nullptr, hostfxr is located using the enviroment variable or global registration
|
||||
//
|
||||
// Return value:
|
||||
// 0 on success, otherwise failure
|
||||
// 0x80008098 - buffer is too small (HostApiBufferTooSmall)
|
||||
//
|
||||
// Remarks:
|
||||
// The full search for the hostfxr library is done on every call. To minimize the need
|
||||
// to call this function multiple times, pass a large buffer (e.g. PATH_MAX).
|
||||
//
|
||||
NETHOST_API int NETHOST_CALLTYPE get_hostfxr_path(
|
||||
char_t * buffer,
|
||||
size_t * buffer_size,
|
||||
const struct get_hostfxr_parameters *parameters);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // __NETHOST_H__
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user