Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
d8848e74
Commit
d8848e74
authored
Jan 14, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecfg: Fix list of configurable dlls to account for PE files.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
541e254b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
21 deletions
+29
-21
libraries.c
programs/winecfg/libraries.c
+29
-21
No files found.
programs/winecfg/libraries.c
View file @
d8848e74
...
@@ -69,9 +69,6 @@ static const char * const builtin_only[] =
...
@@ -69,9 +69,6 @@ static const char * const builtin_only[] =
"user32"
,
"user32"
,
"vdmdbg"
,
"vdmdbg"
,
"w32skrnl"
,
"w32skrnl"
,
"wined3d"
,
"winedos"
,
"wineps"
,
"winmm"
,
"winmm"
,
"wintab32"
,
"wintab32"
,
"wnaspi32"
,
"wnaspi32"
,
...
@@ -208,6 +205,7 @@ static inline BOOL is_builtin_only( const char *name )
...
@@ -208,6 +205,7 @@ static inline BOOL is_builtin_only( const char *name )
!
strcmp
(
ext
,
".tlb"
))
!
strcmp
(
ext
,
".tlb"
))
return
TRUE
;
return
TRUE
;
}
}
if
(
!
strncmp
(
name
,
"wine"
,
4
))
return
TRUE
;
return
bsearch
(
&
name
,
builtin_only
,
ARRAY_SIZE
(
builtin_only
),
return
bsearch
(
&
name
,
builtin_only
,
ARRAY_SIZE
(
builtin_only
),
sizeof
(
builtin_only
[
0
]),
compare_dll
)
!=
NULL
;
sizeof
(
builtin_only
[
0
]),
compare_dll
)
!=
NULL
;
}
}
...
@@ -224,6 +222,8 @@ static BOOL show_dll_in_list( const char *name )
...
@@ -224,6 +222,8 @@ static BOOL show_dll_in_list( const char *name )
/* skip exes */
/* skip exes */
if
(
!
strcmp
(
ext
,
".exe"
))
return
FALSE
;
if
(
!
strcmp
(
ext
,
".exe"
))
return
FALSE
;
}
}
/* skip api set placeholders */
if
(
!
strncmp
(
name
,
"api-ms-"
,
7
)
||
!
strncmp
(
name
,
"ext-ms-"
,
7
))
return
FALSE
;
/* skip dlls that should always be builtin */
/* skip dlls that should always be builtin */
return
!
is_builtin_only
(
name
);
return
!
is_builtin_only
(
name
);
}
}
...
@@ -253,7 +253,9 @@ static void clear_settings(HWND dialog)
...
@@ -253,7 +253,9 @@ static void clear_settings(HWND dialog)
/* load the list of available libraries from a given dir */
/* load the list of available libraries from a given dir */
static
void
load_library_list_from_dir
(
HWND
dialog
,
const
char
*
dir_path
,
int
check_subdirs
)
static
void
load_library_list_from_dir
(
HWND
dialog
,
const
char
*
dir_path
,
int
check_subdirs
)
{
{
static
const
char
*
const
ext
[]
=
{
".dll"
,
".dll.so"
,
".so"
,
""
};
char
*
buffer
=
NULL
,
name
[
256
];
char
*
buffer
=
NULL
,
name
[
256
];
unsigned
int
i
;
struct
dirent
*
de
;
struct
dirent
*
de
;
DIR
*
dir
=
opendir
(
dir_path
);
DIR
*
dir
=
opendir
(
dir_path
);
...
@@ -266,30 +268,36 @@ static void load_library_list_from_dir( HWND dialog, const char *dir_path, int c
...
@@ -266,30 +268,36 @@ static void load_library_list_from_dir( HWND dialog, const char *dir_path, int c
{
{
size_t
len
=
strlen
(
de
->
d_name
);
size_t
len
=
strlen
(
de
->
d_name
);
if
(
len
>
sizeof
(
name
))
continue
;
if
(
len
>
sizeof
(
name
))
continue
;
if
(
len
>
3
&&
!
strcmp
(
de
->
d_name
+
len
-
3
,
".so"
))
if
(
check_subdirs
)
{
len
-=
3
;
if
(
len
>
4
&&
!
strcmp
(
de
->
d_name
+
len
-
4
,
".dll.so"
))
len
-=
4
;
memcpy
(
name
,
de
->
d_name
,
len
);
name
[
len
]
=
0
;
if
(
!
show_dll_in_list
(
name
))
continue
;
SendDlgItemMessageA
(
dialog
,
IDC_DLLCOMBO
,
CB_ADDSTRING
,
0
,
(
LPARAM
)
name
);
}
else
if
(
check_subdirs
)
{
{
struct
stat
st
;
struct
stat
st
;
if
(
!
strcmp
(
de
->
d_name
,
"."
))
continue
;
if
(
!
strcmp
(
de
->
d_name
,
".."
))
continue
;
if
(
!
show_dll_in_list
(
de
->
d_name
))
continue
;
if
(
!
show_dll_in_list
(
de
->
d_name
))
continue
;
sprintf
(
buffer
,
"%s/%s/%s.dll.so"
,
dir_path
,
de
->
d_name
,
de
->
d_name
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
ext
);
i
++
)
if
(
!
stat
(
buffer
,
&
st
))
{
{
SendDlgItemMessageA
(
dialog
,
IDC_DLLCOMBO
,
CB_ADDSTRING
,
0
,
(
LPARAM
)
de
->
d_name
);
sprintf
(
buffer
,
"%s/%s/%s%s"
,
dir_path
,
de
->
d_name
,
de
->
d_name
,
ext
[
i
]
);
continue
;
if
(
!
stat
(
buffer
,
&
st
))
{
SendDlgItemMessageA
(
dialog
,
IDC_DLLCOMBO
,
CB_ADDSTRING
,
0
,
(
LPARAM
)
de
->
d_name
);
break
;
}
}
}
sprintf
(
buffer
,
"%s/%s/%s.so"
,
dir_path
,
de
->
d_name
,
de
->
d_name
);
}
if
(
!
stat
(
buffer
,
&
st
))
else
{
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
ext
);
i
++
)
{
{
SendDlgItemMessageA
(
dialog
,
IDC_DLLCOMBO
,
CB_ADDSTRING
,
0
,
(
LPARAM
)
de
->
d_name
);
if
(
!
ext
[
i
][
0
])
continue
;
continue
;
if
(
len
>
strlen
(
ext
[
i
])
&&
!
strcmp
(
de
->
d_name
+
len
-
strlen
(
ext
[
i
]),
ext
[
i
]))
{
len
-=
strlen
(
ext
[
i
]
);
memcpy
(
name
,
de
->
d_name
,
len
);
name
[
len
]
=
0
;
if
(
!
show_dll_in_list
(
name
))
continue
;
SendDlgItemMessageA
(
dialog
,
IDC_DLLCOMBO
,
CB_ADDSTRING
,
0
,
(
LPARAM
)
name
);
}
}
}
}
}
}
}
...
...
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