upload correct mono lib for linux, set mono runtime to 8.0. (current mono lib version windows/linux 8.0.22)

This commit is contained in:
2025-12-10 15:30:47 +08:00
parent 5444f42c2c
commit 804c1d84ce
371 changed files with 3877 additions and 5 deletions

View File

@ -100,7 +100,7 @@ namespace Prism
static void InitMono() static void InitMono()
{ {
mono_set_dirs("library/mono/net8.0", ""); mono_set_dirs("library/mono/net8.0", "");
// mono_set_assemblies_path("mono/lib"); mono_set_assemblies_path("library/mono/net8.0");
// mono_jit_set_trace_options("--verbose"); // mono_jit_set_trace_options("--verbose");
auto domain = mono_jit_init("Prism"); auto domain = mono_jit_init("Prism");
@ -157,7 +157,7 @@ namespace Prism
static MonoMethod* GetMethod(MonoImage* image, const std::string& methodDesc) static MonoMethod* GetMethod(MonoImage* image, const std::string& methodDesc)
{ {
MonoMethodDesc* desc = mono_method_desc_new(methodDesc.c_str(), NULL); MonoMethodDesc* desc = mono_method_desc_new(methodDesc.c_str(), 0);
if (!desc) if (!desc)
std::cout << "mono_method_desc_new failed" << std::endl; std::cout << "mono_method_desc_new failed" << std::endl;

View File

@ -6,13 +6,34 @@ target_include_directories(mono INTERFACE
include include
) )
file(GLOB MONO_DLL bin/*.dll) if(WIN32)
file(COPY ${MONO_DLL} DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) set(PLATFORM_FLAG Windows)
else ()
set(PLATFORM_FLAG Windows)
endif ()
file(GLOB DOTNET_RUNTIME_DLLS dlls/${PLATFORM_FLAG}/mono)
file(COPY ${DOTNET_RUNTIME_DLLS} DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/library)
if (WIN32) if (WIN32)
file(GLOB_RECURSE MONO_LIBRARY lib/Windows/*.lib) file(GLOB_RECURSE MONO_LIBRARY lib/Windows/*.lib)
file(GLOB NATIVE_RUNTIME_DLLS
dlls/Windows/native/*.dll
)
file(COPY ${NATIVE_RUNTIME_DLLS} DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
else () else ()
file(GLOB_RECURSE MONO_LIBRARY lib/Linux/*.a) file(GLOB_RECURSE MONO_LIBRARY
lib/Linux/*.so
lib/Linux/*.a
)
file(GLOB NATIVE_RUNTIME_DLLS
lib/Linux/*.so
lib/Linux/*.dll
)
file(COPY ${NATIVE_RUNTIME_DLLS} DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/library/mono/net8.0)
endif () endif ()
target_link_libraries(mono INTERFACE ${MONO_LIBRARY}) target_link_libraries(mono INTERFACE ${MONO_LIBRARY})

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
{
"runtimeOptions": {
"tfm": "net8.0"
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More