mirror of
https://github.com/ChronosX88/mta-mono.git
synced 2024-11-24 11:12:20 +00:00
Загрузка конфигов домена для .NET 4.5, иначе некоторые библиотеки не работают (такие как MySQL Connector/Net)
This commit is contained in:
parent
457aa93ec4
commit
ade2e99586
@ -175,6 +175,11 @@ MonoObject* CMonoDomain::CreateObject( MonoClass* klass )
|
|||||||
return mono_object_new( this->m_pDomain, klass );
|
return mono_object_new( this->m_pDomain, klass );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CMonoDomain::SetConfig( const char *szBaseDir, const char *szConfigFileName )
|
||||||
|
{
|
||||||
|
mono_domain_set_config( this->m_pDomain, szBaseDir, szConfigFileName );
|
||||||
|
}
|
||||||
|
|
||||||
MonoString* CMonoDomain::NewString( const char* szText )
|
MonoString* CMonoDomain::NewString( const char* szText )
|
||||||
{
|
{
|
||||||
return mono_string_new( this->m_pDomain, szText );
|
return mono_string_new( this->m_pDomain, szText );
|
||||||
|
@ -55,6 +55,7 @@ public:
|
|||||||
bool Set ( bool bForce );
|
bool Set ( bool bForce );
|
||||||
MonoAssembly* OpenAssembly ( const char *szName );
|
MonoAssembly* OpenAssembly ( const char *szName );
|
||||||
MonoObject* CreateObject ( MonoClass* klass );
|
MonoObject* CreateObject ( MonoClass* klass );
|
||||||
|
void SetConfig ( const char *szBaseDir, const char *szConfigFileName );
|
||||||
|
|
||||||
MonoString* NewString ( const char* szText );
|
MonoString* NewString ( const char* szText );
|
||||||
MonoString* NewString ( string strText );
|
MonoString* NewString ( string strText );
|
||||||
|
@ -156,6 +156,8 @@ bool CResource::Init( void )
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this->m_pMonoDomain->SetConfig( "mods/deathmatch/", "mods/deathmatch/mono/etc/mono/4.5/machine.config" );
|
||||||
|
|
||||||
this->m_pMonoDomain->Set( false );
|
this->m_pMonoDomain->Set( false );
|
||||||
|
|
||||||
this->m_pMonoDomain->Init();
|
this->m_pMonoDomain->Init();
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#define MODULE_NAME "Mono 4.2.1"
|
#define MODULE_NAME "Mono 4.2.1"
|
||||||
#define MODULE_AUTHOR "Dmitry Korolev <kernell@mtaroleplay.ru>"
|
#define MODULE_AUTHOR "Dmitry Korolev <kernell@mtaroleplay.ru>"
|
||||||
#define MODULE_VERSION 0.1f
|
#define MODULE_VERSION 0.2f
|
||||||
|
|
||||||
#include "CFunctions.h"
|
#include "CFunctions.h"
|
||||||
#include "CResource.h"
|
#include "CResource.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user