Skip to content

Commit

Permalink
tweak(build-tools): required build tools for mono v2 runtime
Browse files Browse the repository at this point in the history
* Clean up of the C# project generation code (removing duplicate code).
* Dedicated v2 native code generator.
* Native enums now show an obsolete warning for both v1 and v2.
* prebuild_natives.bat function for updating native files.
* prebuild_natives.bat fix where it would only update files the new and old file were the same, not when there were actual changes.

Prerequisite to mono_rt2
  • Loading branch information
thorium-cfx committed Mar 26, 2023
1 parent 3d410d1 commit 39ea0b3
Show file tree
Hide file tree
Showing 9 changed files with 973 additions and 180 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.sh text eol=lf
*.cmd text eol=crlf

# helpers for GH language stats
*.h linguist-language=C++
Expand Down
2 changes: 1 addition & 1 deletion code/client/clrcore-v2/Native/Native.cs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ internal override unsafe void PushNativeValue(ref CustomNativeInvoker.CustomInvo

internal override unsafe void PullNativeValue(ref CustomNativeInvoker.CustomInvocation ctx)
{
m_nativeValue = ctx.m_ctx.retDataPtr[ctx.m_offset++];
m_nativeValue = ctx.m_ctx.functionDataPtr[ctx.m_offset++];
}
}

Expand Down
2 changes: 2 additions & 0 deletions code/components/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ if _OPTIONS['game'] == 'server' then
end]]
component 'citizen-scripting-v8node'
component 'citizen-scripting-mono'
component 'citizen-scripting-mono-v2'
component 'citizen-server-instance'
component 'citizen-server-impl'
component 'citizen-server-state-fivesv'
Expand Down Expand Up @@ -63,6 +64,7 @@ else
component 'net'

component 'citizen-scripting-mono'
component 'citizen-scripting-mono-v2'

if _OPTIONS['game'] ~= 'ny' then
component 'citizen-scripting-v8client'
Expand Down
Loading

0 comments on commit 39ea0b3

Please sign in to comment.