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
e5e79bb7
Commit
e5e79bb7
authored
May 03, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explorer: Build with msvcrt.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ed22f045
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
35 deletions
+31
-35
Makefile.in
programs/explorer/Makefile.in
+2
-1
appbar.c
programs/explorer/appbar.c
+0
-1
desktop.c
programs/explorer/desktop.c
+21
-24
explorer.c
programs/explorer/explorer.c
+8
-9
No files found.
programs/explorer/Makefile.in
View file @
e5e79bb7
MODULE
=
explorer.exe
APPMODE
=
-mwindows
-municode
IMPORTS
=
rpcrt4 user32 gdi32 advapi32
DELAYIMPORTS
=
comctl32 shell32 oleaut32 ole32 shlwapi
EXTRADLLFLAGS
=
-mwindows
-municode
-mno-cygwin
C_SRCS
=
\
appbar.c
\
desktop.c
\
...
...
programs/explorer/appbar.c
View file @
e5e79bb7
...
...
@@ -29,7 +29,6 @@
#include "windows.h"
#include "shellapi.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "explorer_private.h"
...
...
programs/explorer/desktop.c
View file @
e5e79bb7
...
...
@@ -19,8 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdio.h>
#define COBJMACROS
...
...
@@ -31,7 +29,6 @@
#include <shellapi.h>
#include "exdisp.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "explorer_private.h"
...
...
@@ -249,10 +246,10 @@ static void do_launch( const struct launcher *launcher )
static
WCHAR
*
append_path
(
const
WCHAR
*
path
,
const
WCHAR
*
filename
,
int
len_filename
)
{
int
len_path
=
strlenW
(
path
);
int
len_path
=
l
strlenW
(
path
);
WCHAR
*
ret
;
if
(
len_filename
==
-
1
)
len_filename
=
strlenW
(
filename
);
if
(
len_filename
==
-
1
)
len_filename
=
l
strlenW
(
filename
);
if
(
!
(
ret
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
len_path
+
len_filename
+
2
)
*
sizeof
(
WCHAR
)
)))
return
NULL
;
memcpy
(
ret
,
path
,
len_path
*
sizeof
(
WCHAR
)
);
...
...
@@ -314,7 +311,7 @@ static WCHAR *build_title( const WCHAR *filename, int len )
const
WCHAR
*
p
;
WCHAR
*
ret
;
if
(
len
==
-
1
)
len
=
strlenW
(
filename
);
if
(
len
==
-
1
)
len
=
l
strlenW
(
filename
);
for
(
p
=
filename
+
len
-
1
;
p
>=
filename
;
p
--
)
{
if
(
*
p
==
'.'
)
...
...
@@ -381,7 +378,7 @@ static BOOL remove_launcher( const WCHAR *folder, const WCHAR *filename, int len
if
(
!
(
path
=
append_path
(
folder
,
filename
,
len_filename
)))
return
FALSE
;
for
(
i
=
0
;
i
<
nb_launchers
;
i
++
)
{
if
(
!
strcmpiW
(
launchers
[
i
]
->
path
,
path
))
if
(
!
wcsicmp
(
launchers
[
i
]
->
path
,
path
))
{
free_launcher
(
launchers
[
i
]
);
if
(
--
nb_launchers
)
...
...
@@ -514,14 +511,14 @@ error:
static
void
add_folder
(
const
WCHAR
*
folder
)
{
static
const
WCHAR
lnkW
[]
=
{
'\\'
,
'*'
,
'.'
,
'l'
,
'n'
,
'k'
,
0
};
int
len
=
strlenW
(
folder
)
+
strlenW
(
lnkW
);
int
len
=
lstrlenW
(
folder
)
+
l
strlenW
(
lnkW
);
WIN32_FIND_DATAW
data
;
HANDLE
handle
;
WCHAR
*
glob
;
if
(
!
(
glob
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
len
+
1
)
*
sizeof
(
WCHAR
)
)))
return
;
strcpyW
(
glob
,
folder
);
strcatW
(
glob
,
lnkW
);
l
strcpyW
(
glob
,
folder
);
l
strcatW
(
glob
,
lnkW
);
if
((
handle
=
FindFirstFileW
(
glob
,
&
data
))
!=
INVALID_HANDLE_VALUE
)
{
...
...
@@ -668,11 +665,11 @@ static BOOL parse_size( const WCHAR *size, unsigned int *width, unsigned int *he
{
WCHAR
*
end
;
*
width
=
strtoulW
(
size
,
&
end
,
10
);
*
width
=
wcstoul
(
size
,
&
end
,
10
);
if
(
end
==
size
)
return
FALSE
;
if
(
*
end
!=
'x'
)
return
FALSE
;
size
=
end
+
1
;
*
height
=
strtoulW
(
size
,
&
end
,
10
);
*
height
=
wcstoul
(
size
,
&
end
,
10
);
return
!*
end
;
}
...
...
@@ -691,7 +688,7 @@ static const WCHAR *get_default_desktop_name(void)
if
(
desk
&&
GetUserObjectInformationW
(
desk
,
UOI_NAME
,
buffer
,
ARRAY_SIZE
(
buffer
),
NULL
))
{
if
(
strcmpiW
(
buffer
,
defaultW
))
return
buffer
;
if
(
wcsicmp
(
buffer
,
defaultW
))
return
buffer
;
}
/* @@ Wine registry key: HKCU\Software\Wine\Explorer */
...
...
@@ -779,7 +776,7 @@ static HMODULE load_graphics_driver( const WCHAR *driver, const GUID *guid )
if
(
!
driver
)
{
strcpyW
(
buffer
,
default_driver
);
l
strcpyW
(
buffer
,
default_driver
);
/* @@ Wine registry key: HKCU\Software\Wine\Drivers */
if
(
!
RegOpenKeyW
(
HKEY_CURRENT_USER
,
driversW
,
&
hkey
))
...
...
@@ -794,10 +791,10 @@ static HMODULE load_graphics_driver( const WCHAR *driver, const GUID *guid )
name
=
buffer
;
while
(
name
)
{
next
=
strchrW
(
name
,
','
);
next
=
wcschr
(
name
,
','
);
if
(
next
)
*
next
++
=
0
;
s
nprintfW
(
libname
,
ARRAY_SIZE
(
libname
),
drv_formatW
,
name
);
s
wprintf
(
libname
,
ARRAY_SIZE
(
libname
),
drv_formatW
,
name
);
if
((
module
=
LoadLibraryW
(
libname
))
!=
0
)
break
;
switch
(
GetLastError
())
{
...
...
@@ -820,7 +817,7 @@ static HMODULE load_graphics_driver( const WCHAR *driver, const GUID *guid )
TRACE
(
"display %s driver %s
\n
"
,
debugstr_guid
(
guid
),
debugstr_w
(
buffer
)
);
}
s
printfW
(
key
,
device_keyW
,
guid
->
Data1
,
guid
->
Data2
,
guid
->
Data3
,
s
wprintf
(
key
,
ARRAY_SIZE
(
key
)
,
device_keyW
,
guid
->
Data1
,
guid
->
Data2
,
guid
->
Data3
,
guid
->
Data4
[
0
],
guid
->
Data4
[
1
],
guid
->
Data4
[
2
],
guid
->
Data4
[
3
],
guid
->
Data4
[
4
],
guid
->
Data4
[
5
],
guid
->
Data4
[
6
],
guid
->
Data4
[
7
]
);
...
...
@@ -829,7 +826,7 @@ static HMODULE load_graphics_driver( const WCHAR *driver, const GUID *guid )
{
if
(
module
)
RegSetValueExW
(
hkey
,
graphics_driverW
,
0
,
REG_SZ
,
(
BYTE
*
)
buffer
,
(
strlenW
(
buffer
)
+
1
)
*
sizeof
(
WCHAR
)
);
(
BYTE
*
)
buffer
,
(
l
strlenW
(
buffer
)
+
1
)
*
sizeof
(
WCHAR
)
);
else
RegSetValueExA
(
hkey
,
"DriverError"
,
0
,
REG_SZ
,
(
BYTE
*
)
error
,
strlen
(
error
)
+
1
);
RegCloseKey
(
hkey
);
...
...
@@ -866,7 +863,7 @@ static void set_desktop_window_title( HWND hwnd, const WCHAR *name )
return
;
}
window_title_len
=
strlenW
(
name
)
*
sizeof
(
WCHAR
)
window_title_len
=
l
strlenW
(
name
)
*
sizeof
(
WCHAR
)
+
sizeof
(
desktop_name_separatorW
)
+
sizeof
(
desktop_nameW
);
window_titleW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
window_title_len
);
...
...
@@ -876,9 +873,9 @@ static void set_desktop_window_title( HWND hwnd, const WCHAR *name )
return
;
}
strcpyW
(
window_titleW
,
name
);
strcatW
(
window_titleW
,
desktop_name_separatorW
);
strcatW
(
window_titleW
,
desktop_nameW
);
l
strcpyW
(
window_titleW
,
name
);
l
strcatW
(
window_titleW
,
desktop_name_separatorW
);
l
strcatW
(
window_titleW
,
desktop_nameW
);
SetWindowTextW
(
hwnd
,
window_titleW
);
HeapFree
(
GetProcessHeap
(),
0
,
window_titleW
);
...
...
@@ -920,10 +917,10 @@ void manage_desktop( WCHAR *arg )
{
arg
++
;
name
=
arg
;
if
((
p
=
strchrW
(
arg
,
','
)))
if
((
p
=
wcschr
(
arg
,
','
)))
{
*
p
++
=
0
;
if
((
driver
=
strchrW
(
p
,
','
)))
*
driver
++
=
0
;
if
((
driver
=
wcschr
(
p
,
','
)))
*
driver
++
=
0
;
}
if
(
!
p
||
!
parse_size
(
p
,
&
width
,
&
height
))
get_default_desktop_size
(
name
,
&
width
,
&
height
);
...
...
programs/explorer/explorer.c
View file @
e5e79bb7
...
...
@@ -22,7 +22,6 @@
#define COBJMACROS
#include "wine/unicode.h"
#include "wine/debug.h"
#include "wine/heap.h"
#include "explorer_private.h"
...
...
@@ -671,7 +670,7 @@ static WCHAR *copy_path_string(WCHAR *target, WCHAR *source)
{
INT
i
=
0
;
while
(
is
spaceW
(
*
source
))
source
++
;
while
(
is
wspace
(
*
source
))
source
++
;
if
(
*
source
==
'\"'
)
{
...
...
@@ -735,23 +734,23 @@ static void parse_command_line(LPWSTR commandline,parameters_struct *parameters)
while
(
*
p
)
{
while
(
is
spaceW
(
*
p
))
p
++
;
if
(
strncmpW
(
p
,
arg_n
,
ARRAY_SIZE
(
arg_n
))
==
0
)
while
(
is
wspace
(
*
p
))
p
++
;
if
(
wcsncmp
(
p
,
arg_n
,
ARRAY_SIZE
(
arg_n
))
==
0
)
{
parameters
->
explorer_mode
=
FALSE
;
p
+=
ARRAY_SIZE
(
arg_n
);
}
else
if
(
strncmpW
(
p
,
arg_e
,
ARRAY_SIZE
(
arg_e
))
==
0
)
else
if
(
wcsncmp
(
p
,
arg_e
,
ARRAY_SIZE
(
arg_e
))
==
0
)
{
parameters
->
explorer_mode
=
TRUE
;
p
+=
ARRAY_SIZE
(
arg_e
);
}
else
if
(
strncmpW
(
p
,
arg_root
,
ARRAY_SIZE
(
arg_root
))
==
0
)
else
if
(
wcsncmp
(
p
,
arg_root
,
ARRAY_SIZE
(
arg_root
))
==
0
)
{
p
+=
ARRAY_SIZE
(
arg_root
);
p
=
copy_path_string
(
parameters
->
root
,
p
);
}
else
if
(
strncmpW
(
p
,
arg_select
,
ARRAY_SIZE
(
arg_select
))
==
0
)
else
if
(
wcsncmp
(
p
,
arg_select
,
ARRAY_SIZE
(
arg_select
))
==
0
)
{
p
+=
ARRAY_SIZE
(
arg_select
);
p
=
copy_path_string
(
parameters
->
selection
,
p
);
...
...
@@ -759,13 +758,13 @@ static void parse_command_line(LPWSTR commandline,parameters_struct *parameters)
copy_path_root
(
parameters
->
root
,
parameters
->
selection
);
}
else
if
(
strncmpW
(
p
,
arg_desktop
,
ARRAY_SIZE
(
arg_desktop
))
==
0
)
else
if
(
wcsncmp
(
p
,
arg_desktop
,
ARRAY_SIZE
(
arg_desktop
))
==
0
)
{
p
+=
ARRAY_SIZE
(
arg_desktop
);
manage_desktop
(
p
);
/* the rest of the command line is handled by desktop mode */
}
/* workaround for Worms Armageddon that hardcodes a /desktop option with quotes */
else
if
(
strncmpW
(
p
,
arg_desktop_quotes
,
ARRAY_SIZE
(
arg_desktop_quotes
))
==
0
)
else
if
(
wcsncmp
(
p
,
arg_desktop_quotes
,
ARRAY_SIZE
(
arg_desktop_quotes
))
==
0
)
{
p
+=
ARRAY_SIZE
(
arg_desktop_quotes
);
manage_desktop
(
p
);
/* the rest of the command line is handled by desktop mode */
...
...
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