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
2052538a
Commit
2052538a
authored
Sep 25, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved loadorder support to dlls/ntdll.
Removed the --dll option and replaced it by the WINEDLLOVERRIDES environment variable.
parent
1d2eb37b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
87 additions
and
59 deletions
+87
-59
ne_module.c
dlls/kernel/ne_module.c
+13
-1
process.c
dlls/kernel/process.c
+2
-2
Makefile.in
dlls/ntdll/Makefile.in
+1
-1
loader.c
dlls/ntdll/loader.c
+3
-1
loadorder.c
dlls/ntdll/loadorder.c
+0
-0
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+1
-0
wine.man.in
documentation/wine.man.in
+51
-47
module.h
include/module.h
+2
-2
options.c
misc/options.c
+11
-2
runtest
tools/runtest
+3
-3
No files found.
dlls/kernel/ne_module.c
View file @
2052538a
...
...
@@ -47,6 +47,7 @@
#include "builtin16.h"
#include "stackframe.h"
#include "excpt.h"
#include "wine/unicode.h"
#include "wine/exception.h"
#include "wine/debug.h"
...
...
@@ -1201,7 +1202,18 @@ static HINSTANCE16 MODULE_LoadModule16( LPCSTR libname, BOOL implicit, BOOL lib_
loadorder
[
0
]
=
LOADORDER_BI
;
loadorder
[
1
]
=
LOADORDER_INVALID
;
}
else
MODULE_GetLoadOrder
(
loadorder
,
basename
,
FALSE
);
else
{
WCHAR
buffer
[
MAX_PATH
],
*
p
;
if
(
!
GetModuleFileNameW
(
0
,
buffer
,
MAX_PATH
))
p
=
NULL
;
else
{
if
((
p
=
strrchrW
(
buffer
,
'\\'
)))
p
++
;
else
p
=
buffer
;
}
MODULE_GetLoadOrder
(
loadorder
,
p
,
basename
,
FALSE
);
}
for
(
i
=
0
;
i
<
LOADORDER_NTYPES
;
i
++
)
{
...
...
dlls/kernel/process.c
View file @
2052538a
...
...
@@ -185,7 +185,7 @@ static HANDLE open_exe_file( const char *name )
name
=
buffer
;
}
MODULE_GetLoadOrder
(
loadorder
,
name
,
TRUE
);
MODULE_GetLoadOrder
(
loadorder
,
NULL
,
name
,
TRUE
);
for
(
i
=
0
;
i
<
LOADORDER_NTYPES
;
i
++
)
{
...
...
@@ -246,7 +246,7 @@ static BOOL find_exe_file( const char *name, char *buffer, int buflen, HANDLE *h
return
FALSE
;
}
MODULE_GetLoadOrder
(
loadorder
,
buffer
,
TRUE
);
MODULE_GetLoadOrder
(
loadorder
,
NULL
,
buffer
,
TRUE
);
for
(
i
=
0
;
i
<
LOADORDER_NTYPES
;
i
++
)
{
...
...
dlls/ntdll/Makefile.in
View file @
2052538a
...
...
@@ -12,7 +12,6 @@ C_SRCS = \
$(TOPOBJDIR)
/files/drive.c
\
$(TOPOBJDIR)
/files/file.c
\
$(TOPOBJDIR)
/files/smb.c
\
$(TOPOBJDIR)
/loader/loadorder.c
\
$(TOPOBJDIR)
/loader/module.c
\
$(TOPOBJDIR)
/loader/task.c
\
$(TOPOBJDIR)
/loader/ne/module.c
\
...
...
@@ -42,6 +41,7 @@ C_SRCS = \
heap.c
\
large_int.c
\
loader.c
\
loadorder.c
\
misc.c
\
nt.c
\
om.c
\
...
...
dlls/ntdll/loader.c
View file @
2052538a
...
...
@@ -1263,6 +1263,7 @@ static NTSTATUS load_dll( LPCSTR libname, DWORD flags, WINE_MODREF** pwm )
LPSTR
filename
;
const
char
*
filetype
=
""
;
DWORD
found
;
WINE_MODREF
*
main_exe
;
BOOL
allocated_libdir
=
FALSE
;
static
LPCSTR
libdir
=
NULL
;
/* See above */
NTSTATUS
nts
=
STATUS_NO_SUCH_FILE
;
...
...
@@ -1343,7 +1344,8 @@ static NTSTATUS load_dll( LPCSTR libname, DWORD flags, WINE_MODREF** pwm )
return
STATUS_SUCCESS
;
}
MODULE_GetLoadOrder
(
loadorder
,
filename
,
TRUE
);
main_exe
=
get_modref
(
NtCurrentTeb
()
->
Peb
->
ImageBaseAddress
);
MODULE_GetLoadOrder
(
loadorder
,
main_exe
->
ldr
.
BaseDllName
.
Buffer
,
filename
,
TRUE
);
for
(
i
=
0
;
i
<
LOADORDER_NTYPES
;
i
++
)
{
...
...
loader
/loadorder.c
→
dlls/ntdll
/loadorder.c
View file @
2052538a
This diff is collapsed.
Click to expand it.
dlls/ntdll/ntdll_misc.h
View file @
2052538a
...
...
@@ -51,6 +51,7 @@ static inline HANDLE ntdll_get_process_heap(void)
{
return
NtCurrentTeb
()
->
Peb
->
ProcessHeap
;
}
#define GetProcessHeap() ntdll_get_process_heap()
static
inline
RTL_USER_PROCESS_PARAMETERS
*
ntdll_get_process_pmts
(
void
)
{
...
...
documentation/wine.man.in
View file @
2052538a
...
...
@@ -104,49 +104,6 @@ For more information on debugging messages, see the file
.I documentation/running.sgml
in the source distribution (FIXME: outdated).
.RE
.TP
.I --dll name[,name[,...]]={native|builtin}[,{n|b}[,...]]
Selects the override type and load order of dll used in the loading
process for any dll. The default is set in the configuration
file. There are currently three types of libraries that can be loaded
into a process' address space: Native windows dlls (
.I native
),
.B wine
internal dlls (
.I builtin
). The type may be abbreviated with the first letter of the type (
.I n, b
). Each sequence of orders must be separated by commas.
.br
Each dll may have its own specific load order. The load order
determines which version of the dll is attempted to be loaded into the
address space. If the first fails, then the next is tried and so
on. Multiple libraries with the same load order can be separated with
commas. It is also possible to use the --dll option several times, to
specify different loadorders for different libraries
.br
Examples:
.br
.I --dll comdlg32,commdlg=n,b
.br
Try to load comdlg32 and commdlg as native windows dll first and try
the builtin version if the native load fails.
.br
.I --dll shell,shell32=n --dll c:\(rs\(rsfoo\(rs\(rsbar\(rs\(rsbaz=b
.br
Try to load the libraries shell and shell32 as native windows dlls. Furthermore, if
an application request to load c:\(rsfoo\(rsbar\(rsbaz.dll load the builtin library baz.
.br
.I --dll comdlg32,commdlg=b,n --dll shell,shell32=b --dll comctl32,commctrl=n
.br
Try to load comdlg32 and commdlg as builtin first and try the native version
if the builtin load fails; load shell32/shell always as builtin and
comctl32/commctrl always as native.
.br
Note: It is wise to keep dll pairs (comdlg32/commdlg, shell/shell32, etc.)
having exactly the same load order. This will prevent mismatches at runtime.
See also configuration file format below.
.PD 1
.SH PROGRAM/ARGUMENTS
The program name may be specified in DOS format (
...
...
@@ -181,7 +138,7 @@ by
For example, if you want to execute
.B wine
with the options
.I --d
ll riched32=n
.I --d
ebugmsg +module
and if
.B wine
should run the program
...
...
@@ -191,7 +148,7 @@ with the arguments
, then you could use the following command line to invoke
.B wine:
.PP
.I wine --d
ll riched32=n
-- myapp.exe --display 3d somefile
.I wine --d
ebugmsg +module
-- myapp.exe --display 3d somefile
.PP
Note that in contrast to previous versions of
.B wine,
...
...
@@ -255,14 +212,61 @@ addition to any directory specified in
Wine will also look in
.B @dlldir@.
.TP
.I WINEDLLOVERRIDES
Defines the override type and load order of dlls used in the loading
process for any dll. The default is set in the configuration
file. There are currently two types of libraries that can be loaded
into a process' address space: Native windows dlls (
.I native
),
.B wine
internal dlls (
.I builtin
). The type may be abbreviated with the first letter of the type (
.I n, b
). Each sequence of orders must be separated by commas.
.br
Each dll may have its own specific load order. The load order
determines which version of the dll is attempted to be loaded into the
address space. If the first fails, then the next is tried and so
on. Multiple libraries with the same load order can be separated with
commas. It is also possible to use specify different loadorders for
different libraries by separating the entries by ";".
.br
Examples:
.RS
.TP
WINEDLLOVERRIDES="comdlg32,commdlg=n,b"
.br
Try to load comdlg32 and commdlg as native windows dll first and try
the builtin version if the native load fails.
.TP
WINEDLLOVERRIDES="shell,shell32=n;c:\(rs\(rsfoo\(rs\(rsbar\(rs\(rsbaz=b"
.br
Try to load the libraries shell and shell32 as native windows dlls. Furthermore, if
an application request to load c:\(rsfoo\(rsbar\(rsbaz.dll load the builtin library baz.
.TP
WINEDLLOVERRIDES="comdlg32,commdlg=b,n;shell,shell32=b;comctl32,commctrl=n"
.br
Try to load comdlg32 and commdlg as builtin first and try the native version
if the builtin load fails; load shell32/shell always as builtin and
comctl32/commctrl always as native.
.br
Note: It is wise to keep dll pairs (comdlg32/commdlg, shell/shell32, etc.)
having exactly the same load order. This will prevent mismatches at runtime.
See also configuration file format below.
.RE
.TP
.I DISPLAY
Specifies the X11 display to use.
.SH CONFIGURATION FILE
.B wine
expects a configuration file (
.I $WINEPREFIX/config
(~/.wine/config)
), which must conform to the format specified in the
or
.I ~/.wine/config
if WINEPREFIX is not set), which must conform to the format specified
in the
.BR wine.conf (5)
man page. A sample configuration file is documentation/samples/config in the
.B wine
...
...
include/module.h
View file @
2052538a
...
...
@@ -217,8 +217,8 @@ extern HRSRC PE_FindResourceExW(HMODULE,LPCWSTR,LPCWSTR,WORD);
/* loader/loadorder.c */
extern
BOOL
MODULE_GetBuiltinPath
(
const
char
*
libname
,
const
char
*
ext
,
char
*
filename
,
UINT
size
);
extern
void
MODULE_GetLoadOrder
(
enum
loadorder_type
plo
[],
const
char
*
path
,
BOOL
win32
);
extern
void
MODULE_AddLoadOrderOption
(
const
char
*
option
);
extern
void
MODULE_GetLoadOrder
(
enum
loadorder_type
plo
[],
const
WCHAR
*
app_name
,
const
char
*
path
,
BOOL
win32
);
/* relay32/builtin.c */
extern
HMODULE
BUILTIN32_LoadExeModule
(
HMODULE
main
);
...
...
misc/options.c
View file @
2052538a
...
...
@@ -56,6 +56,7 @@ static void out_of_memory(void)
}
static
void
do_debugmsg
(
const
char
*
arg
);
static
void
do_dll
(
const
char
*
arg
);
static
void
do_help
(
const
char
*
arg
);
static
void
do_version
(
const
char
*
arg
);
...
...
@@ -63,8 +64,8 @@ static const struct option_descr option_table[] =
{
{
"debugmsg"
,
0
,
1
,
1
,
do_debugmsg
,
"--debugmsg name Turn debugging-messages on or off"
},
{
"dll"
,
0
,
1
,
1
,
MODULE_AddLoadOrderOption
,
"--dll name
Enable or disable built-in DLLs
"
},
{
"dll"
,
0
,
1
,
1
,
do_dll
,
"--dll name
This option is no longer supported
"
},
{
"help"
,
'h'
,
0
,
0
,
do_help
,
"--help,-h Show this help message"
},
{
"version"
,
'v'
,
0
,
0
,
do_version
,
...
...
@@ -96,6 +97,14 @@ static void do_debugmsg( const char *arg )
}
}
static
void
do_dll
(
const
char
*
arg
)
{
MESSAGE
(
"The --dll option has been removed, you should use
\n
"
"the WINEDLLOVERRIDES environment variable instead.
\n
"
"To see a help message, run:
\n
"
" WINEDLLOVERRIDES=help wine <program.exe>
\n
"
);
ExitProcess
(
1
);
}
static
void
remove_options
(
char
*
argv
[],
int
pos
,
int
count
,
int
inherit
)
{
...
...
tools/runtest
View file @
2052538a
...
...
@@ -109,9 +109,9 @@ fi
# set environment variables needed for Wine
if
[
-n
"
$modules
"
]
;
then
WINE
OPTIONS
=
"
$WINEOPTIONS
--dll
$modules
=b"
export
WINE
OPTION
S
if
[
-n
"
$modules
"
]
;
then
WINE
DLLOVERRIDES
=
"
$WINEDLLOVERRIDES
;
$modules
=b"
export
WINE
DLLOVERRIDE
S
fi
WINETEST_PLATFORM
=
${
platform
:-
wine
}
export
WINETEST_PLATFORM WINETEST_DEBUG
...
...
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