Skip to content

Commit

Permalink
client/clr: add System.Drawing type forwarder for new client references
Browse files Browse the repository at this point in the history
  • Loading branch information
blattersturm committed Mar 14, 2019
1 parent efea735 commit 663ad49
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
12 changes: 12 additions & 0 deletions code/client/clrref/System.Drawing.cs
@@ -0,0 +1,12 @@
using System.Reflection;
using System.Runtime.CompilerServices;

[assembly: TypeForwardedTo(typeof(System.Drawing.Color))]
[assembly: TypeForwardedTo(typeof(System.Drawing.Point))]
[assembly: TypeForwardedTo(typeof(System.Drawing.PointF))]
[assembly: TypeForwardedTo(typeof(System.Drawing.Size))]
[assembly: TypeForwardedTo(typeof(System.Drawing.SizeF))]
[assembly: AssemblyVersion("4.0.0.0")]
[assembly: AssemblyTitle("System.Drawing.dll")]
[assembly: AssemblyDescription("System.Drawing.dll")]
[assembly: AssemblyDefaultAlias("System.Drawing.dll")]
Binary file added code/client/clrref/msft.snk
Binary file not shown.
29 changes: 29 additions & 0 deletions code/premake5.lua
Expand Up @@ -193,6 +193,16 @@ premake.override(premake.vstudio.dotnetbase, 'debugProps', function(base, cfg)
end)

local function WriteDocumentationFileXml(_premake, _cfg)
if _cfg.project.name == 'CitiMonoSystemDrawingStub' then
_premake.w(('<AssemblyOriginatorKeyFile>%s</AssemblyOriginatorKeyFile>'):format(
path.getabsolute("client/clrref/msft.snk")
))
_premake.w('<SignAssembly>true</SignAssembly>')
_premake.w('<DelaySign>true</DelaySign>')

return
end

if _cfg.project.name ~= 'CitiMono' then
return
end
Expand Down Expand Up @@ -277,6 +287,25 @@ end)
configuration "Release*"
targetdir (binroot .. '/release/citizen/clr2/lib/mono/4.5/')

if _OPTIONS['game'] ~= 'server' then
project "CitiMonoSystemDrawingStub"
targetname "System.Drawing"
language "C#"
kind "SharedLib"

links { "CitiMono" }

files {
"client/clrref/System.Drawing.cs"
}

configuration "Debug*"
targetdir (binroot .. '/debug/citizen/clr2/lib/mono/4.5/')

configuration "Release*"
targetdir (binroot .. '/release/citizen/clr2/lib/mono/4.5/')
end

if os.istarget('windows') then
project "CitiMonoRef"
if _OPTIONS['game'] == 'server' then
Expand Down

0 comments on commit 663ad49

Please sign in to comment.