Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
dc2c580b
Commit
dc2c580b
authored
Apr 04, 2019
by
Vincent Povirk
Committed by
Alexandre Julliard
Apr 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mscoree: Search shared addon locations for mono runtime.
Signed-off-by:
Vincent Povirk
<
vincent@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
179797a6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
2 deletions
+71
-2
Makefile.in
dlls/mscoree/Makefile.in
+2
-0
metahost.c
dlls/mscoree/metahost.c
+66
-1
mscoree_main.c
dlls/mscoree/mscoree_main.c
+1
-1
mscoree_private.h
dlls/mscoree/mscoree_private.h
+2
-0
No files found.
dlls/mscoree/Makefile.in
View file @
dc2c580b
...
...
@@ -11,3 +11,5 @@ C_SRCS = \
mscoree_main.c
IDL_SRCS
=
mscoree_classes.idl
metahost_EXTRADEFS
=
-DINSTALL_DATADIR
=
"
\"
${
datadir
}
\"
"
dlls/mscoree/metahost.c
View file @
dc2c580b
...
...
@@ -712,10 +712,75 @@ static BOOL get_mono_path_registry(LPWSTR path)
return
ret
;
}
static
BOOL
get_mono_path_unix
(
const
char
*
unix_dir
,
LPWSTR
path
)
{
static
WCHAR
*
(
CDECL
*
p_wine_get_dos_file_name
)(
const
char
*
);
LPWSTR
dos_dir
;
WCHAR
mono_dll_path
[
MAX_PATH
];
BOOL
ret
;
if
(
!
p_wine_get_dos_file_name
)
{
p_wine_get_dos_file_name
=
(
void
*
)
GetProcAddress
(
GetModuleHandleA
(
"kernel32"
),
"wine_get_dos_file_name"
);
if
(
!
p_wine_get_dos_file_name
)
return
FALSE
;
}
dos_dir
=
p_wine_get_dos_file_name
(
unix_dir
);
if
(
!
dos_dir
)
return
FALSE
;
ret
=
find_mono_dll
(
dos_dir
,
mono_dll_path
);
if
(
ret
)
strcpyW
(
path
,
dos_dir
);
heap_free
(
dos_dir
);
return
ret
;
}
static
BOOL
get_mono_path_datadir
(
LPWSTR
path
)
{
const
char
*
data_dir
;
char
*
package_dir
;
int
len
;
BOOL
ret
;
if
((
data_dir
=
wine_get_data_dir
()))
{
len
=
strlen
(
data_dir
);
package_dir
=
heap_alloc
(
len
+
sizeof
(
"/mono/wine-mono-"
WINE_MONO_VERSION
));
memcpy
(
package_dir
,
data_dir
,
len
);
strcpy
(
package_dir
+
len
,
"/mono/wine-mono-"
WINE_MONO_VERSION
);
}
else
if
((
data_dir
=
wine_get_build_dir
()))
{
len
=
strlen
(
data_dir
);
package_dir
=
heap_alloc
(
len
+
sizeof
(
"/../wine-mono-"
WINE_MONO_VERSION
));
memcpy
(
package_dir
,
data_dir
,
len
);
strcpy
(
package_dir
+
len
,
"/../wine-mono-"
WINE_MONO_VERSION
);
}
else
{
return
FALSE
;
}
ret
=
get_mono_path_unix
(
package_dir
,
path
);
heap_free
(
package_dir
);
return
ret
;
}
static
BOOL
get_mono_path
(
LPWSTR
path
)
{
return
get_mono_path_local
(
path
)
||
get_mono_path_registry
(
path
);
get_mono_path_registry
(
path
)
||
get_mono_path_datadir
(
path
)
||
get_mono_path_unix
(
INSTALL_DATADIR
"/wine/mono/wine-mono-"
WINE_MONO_VERSION
,
path
)
||
(
strcmp
(
INSTALL_DATADIR
,
"/usr/share"
)
&&
get_mono_path_unix
(
"/usr/share/wine/mono/wine-mono-"
WINE_MONO_VERSION
,
path
))
||
get_mono_path_unix
(
"/opt/wine/mono/wine-mono-"
WINE_MONO_VERSION
,
path
);
}
struct
InstalledRuntimeEnum
...
...
dlls/mscoree/mscoree_main.c
View file @
dc2c580b
...
...
@@ -682,7 +682,7 @@ static BOOL install_wine_mono(void)
LONG
len
;
BOOL
ret
;
static
const
char
*
mono_version
=
"4.8.1"
;
static
const
char
*
mono_version
=
WINE_MONO_VERSION
;
static
const
char
*
mono_upgrade_code
=
"{DE624609-C6B5-486A-9274-EF0B854F6BC5}"
;
static
const
WCHAR
controlW
[]
=
{
'\\'
,
'c'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'.'
,
'e'
,
'x'
,
'e'
,
0
};
...
...
dlls/mscoree/mscoree_private.h
View file @
dc2c580b
...
...
@@ -45,6 +45,8 @@ extern HRESULT assembly_get_runtime_version(ASSEMBLY *assembly, LPSTR *version)
extern
HRESULT
assembly_get_vtable_fixups
(
ASSEMBLY
*
assembly
,
VTableFixup
**
fixups
,
DWORD
*
count
)
DECLSPEC_HIDDEN
;
extern
HRESULT
assembly_get_native_entrypoint
(
ASSEMBLY
*
assembly
,
NativeEntryPointFunc
*
func
)
DECLSPEC_HIDDEN
;
#define WINE_MONO_VERSION "4.8.1"
/* Mono embedding */
typedef
struct
_MonoDomain
MonoDomain
;
typedef
struct
_MonoAssembly
MonoAssembly
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment