summaryrefslogtreecommitdiff
path: root/modules/mono/build_scripts
diff options
context:
space:
mode:
authorIgnacio Etcheverry <ignalfonsore@gmail.com>2019-11-28 23:42:37 +0100
committerIgnacio Etcheverry <ignalfonsore@gmail.com>2019-11-29 00:36:05 +0100
commit66de28eda8239e006c5d53debdea75f131b32f77 (patch)
tree2a2049727d84c173e7e0a924350ce2cdd15e01ee /modules/mono/build_scripts
parent7735af7e768e16efb4b3b6de1c72c3dfb50c9412 (diff)
Mono/C#: Add option to export assemblies outside of PCK
When using this options, assemblies will be saved in the Assemblies folder of the data directory: 'data_AppName/Assemblies/'.
Diffstat (limited to 'modules/mono/build_scripts')
-rw-r--r--modules/mono/build_scripts/mono_configure.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/modules/mono/build_scripts/mono_configure.py b/modules/mono/build_scripts/mono_configure.py
index 5388061f84..c09690ba6d 100644
--- a/modules/mono/build_scripts/mono_configure.py
+++ b/modules/mono/build_scripts/mono_configure.py
@@ -120,9 +120,9 @@ def configure(env, env_mono):
env.Append(LIBPATH=mono_lib_path)
env_mono.Prepend(CPPPATH=os.path.join(mono_root, 'include', 'mono-2.0'))
- if mono_static:
- lib_suffix = Environment()['LIBSUFFIX']
+ lib_suffix = Environment()['LIBSUFFIX']
+ if mono_static:
if env.msvc:
mono_static_lib_name = 'libmono-static-sgen'
else:
@@ -144,13 +144,13 @@ def configure(env, env_mono):
env.Append(LIBS=['psapi'])
env.Append(LIBS=['version'])
else:
- mono_lib_name = find_file_in_dir(mono_lib_path, mono_lib_names, extension='.lib')
+ mono_lib_name = find_file_in_dir(mono_lib_path, mono_lib_names, extension=lib_suffix)
if not mono_lib_name:
raise RuntimeError('Could not find mono library in: ' + mono_lib_path)
if env.msvc:
- env.Append(LINKFLAGS=mono_lib_name + Environment()['LIBSUFFIX'])
+ env.Append(LINKFLAGS=mono_lib_name + lib_suffix)
else:
env.Append(LIBS=[mono_lib_name])
@@ -426,15 +426,17 @@ def copy_mono_shared_libs(env, mono_root, target_mono_root_dir):
platform = env['platform']
if platform == 'windows':
+ src_mono_bin_dir = os.path.join(mono_root, 'bin')
target_mono_bin_dir = os.path.join(target_mono_root_dir, 'bin')
if not os.path.isdir(target_mono_bin_dir):
os.makedirs(target_mono_bin_dir)
- copy(os.path.join(mono_root, 'bin', 'MonoPosixHelper.dll'), target_mono_bin_dir)
+ mono_posix_helper_name = find_file_in_dir(src_mono_bin_dir, ['MonoPosixHelper', 'libMonoPosixHelper'], extension='.dll')
+ copy(os.path.join(src_mono_bin_dir, mono_posix_helper_name + '.dll'), os.path.join(target_mono_bin_dir, 'MonoPosixHelper.dll'))
# For newer versions
- btls_dll_path = os.path.join(mono_root, 'bin', 'libmono-btls-shared.dll')
+ btls_dll_path = os.path.join(src_mono_bin_dir, 'libmono-btls-shared.dll')
if os.path.isfile(btls_dll_path):
copy(btls_dll_path, target_mono_bin_dir)
else: