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
58f22b03
Commit
58f22b03
authored
May 27, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advpack: Build with msvcrt.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1ff9bbd0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
20 deletions
+21
-20
Makefile.in
dlls/advpack/Makefile.in
+2
-0
advpack.c
dlls/advpack/advpack.c
+5
-5
files.c
dlls/advpack/files.c
+2
-2
install.c
dlls/advpack/install.c
+7
-8
reg.c
dlls/advpack/reg.c
+5
-5
No files found.
dlls/advpack/Makefile.in
View file @
58f22b03
...
...
@@ -2,6 +2,8 @@ MODULE = advpack.dll
IMPORTLIB
=
advpack
IMPORTS
=
ole32 setupapi version advapi32
EXTRADLLFLAGS
=
-mno-cygwin
C_SRCS
=
\
advpack.c
\
files.c
\
...
...
dlls/advpack/advpack.c
View file @
58f22b03
...
...
@@ -20,6 +20,7 @@
*/
#include <stdarg.h>
#include <stdlib.h>
#include "windef.h"
#include "winbase.h"
...
...
@@ -29,7 +30,6 @@
#include "winnls.h"
#include "setupapi.h"
#include "advpub.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "advpack_private.h"
...
...
@@ -139,7 +139,7 @@ void set_ldids(HINF hInf, LPCWSTR pszInstallSection, LPCWSTR pszWorkingDir)
/* SetupGetLineTextW returns the value if there is only one key, but
* returns the whole line if there is more than one key
*/
if
(
!
(
value
=
strchrW
(
line
,
'='
)))
if
(
!
(
value
=
wcschr
(
line
,
'='
)))
{
SetupGetStringFieldW
(
&
context
,
0
,
NULL
,
0
,
&
size
);
key
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
*
sizeof
(
WCHAR
));
...
...
@@ -158,10 +158,10 @@ void set_ldids(HINF hInf, LPCWSTR pszInstallSection, LPCWSTR pszWorkingDir)
value
++
;
/* Extract the flags */
ptr
=
strchrW
(
value
,
','
);
ptr
=
wcschr
(
value
,
','
);
if
(
ptr
)
{
*
ptr
=
'\0'
;
flags
=
atolW
(
ptr
+
1
);
flags
=
wcstol
(
ptr
+
1
,
NULL
,
10
);
}
/* set dest to pszWorkingDir if key is SourceDir */
...
...
@@ -177,7 +177,7 @@ void set_ldids(HINF hInf, LPCWSTR pszInstallSection, LPCWSTR pszWorkingDir)
/* set all ldids to dest */
while
((
ptr
=
get_parameter
(
&
key
,
','
,
FALSE
)))
{
ldid
=
atolW
(
ptr
);
ldid
=
wcstol
(
ptr
,
NULL
,
10
);
SetupSetDirectoryIdW
(
hInf
,
ldid
,
dest
);
}
HeapFree
(
GetProcessHeap
(),
0
,
key_copy
);
...
...
dlls/advpack/files.c
View file @
58f22b03
...
...
@@ -25,13 +25,13 @@
#include "winbase.h"
#include "winuser.h"
#include "winreg.h"
#include "winnls.h"
#include "winver.h"
#include "winternl.h"
#include "setupapi.h"
#include "advpub.h"
#include "fdi.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "advpack_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
advpack
);
...
...
@@ -505,7 +505,7 @@ HRESULT WINAPI DelNodeRunDLL32W(HWND hWnd, HINSTANCE hInst, LPWSTR cmdline, INT
szFlags
=
get_parameter
(
&
cmdline_ptr
,
','
,
TRUE
);
if
(
szFlags
)
dwFlags
=
atolW
(
szFlags
);
dwFlags
=
wcstol
(
szFlags
,
NULL
,
10
);
res
=
DelNodeW
(
szFilename
,
dwFlags
);
...
...
dlls/advpack/install.c
View file @
58f22b03
...
...
@@ -31,7 +31,6 @@
#include "advpub.h"
#include "ole2.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "advpack_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
advpack
);
...
...
@@ -207,7 +206,7 @@ LPWSTR get_parameter(LPWSTR *params, WCHAR separator, BOOL quoted)
if
(
quoted
&&
*
token
==
'"'
)
{
WCHAR
*
end
=
strchrW
(
token
+
1
,
'"'
);
WCHAR
*
end
=
wcschr
(
token
+
1
,
'"'
);
if
(
end
)
{
*
end
=
0
;
...
...
@@ -216,7 +215,7 @@ LPWSTR get_parameter(LPWSTR *params, WCHAR separator, BOOL quoted)
}
}
*
params
=
strchrW
(
*
params
,
separator
);
*
params
=
wcschr
(
*
params
,
separator
);
if
(
*
params
)
*
(
*
params
)
++
=
'\0'
;
...
...
@@ -397,7 +396,7 @@ static HRESULT get_working_dir(ADVInfo *info, LPCWSTR inf_filename, LPCWSTR work
static
const
WCHAR
backslash
[]
=
{
'\\'
,
0
};
static
const
WCHAR
inf_dir
[]
=
{
'\\'
,
'I'
,
'N'
,
'F'
,
0
};
if
((
ptr
=
strrchrW
(
inf_filename
,
'\\'
)))
if
((
ptr
=
wcsrchr
(
inf_filename
,
'\\'
)))
{
len
=
ptr
-
inf_filename
+
1
;
ptr
=
inf_filename
;
...
...
@@ -451,7 +450,7 @@ static HRESULT install_init(LPCWSTR inf_filename, LPCWSTR install_sec,
'D'
,
'e'
,
'f'
,
'a'
,
'u'
,
'l'
,
't'
,
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
0
};
if
(
!
(
ptr
=
strrchrW
(
inf_filename
,
'\\'
)))
if
(
!
(
ptr
=
wcsrchr
(
inf_filename
,
'\\'
)))
ptr
=
inf_filename
;
len
=
lstrlenW
(
ptr
);
...
...
@@ -769,7 +768,7 @@ INT WINAPI LaunchINFSectionW(HWND hWnd, HINSTANCE hInst, LPWSTR cmdline, INT sho
str_flags
=
get_parameter
(
&
cmdline_ptr
,
','
,
TRUE
);
if
(
str_flags
)
{
DWORD
inf_flags
=
atolW
(
str_flags
);
DWORD
inf_flags
=
wcstol
(
str_flags
,
NULL
,
10
);
if
(
inf_flags
&
LIS_QUIET
)
flags
|=
RSC_FLAG_QUIET
;
if
(
inf_flags
&
LIS_NOGRPCONV
)
flags
|=
RSC_FLAG_NGCONV
;
}
...
...
@@ -867,7 +866,7 @@ HRESULT WINAPI LaunchINFSectionExW(HWND hWnd, HINSTANCE hInst, LPWSTR cmdline, I
flags
=
get_parameter
(
&
cmdline_ptr
,
','
,
TRUE
);
if
(
flags
)
cabinfo
.
dwFlags
=
atolW
(
flags
);
cabinfo
.
dwFlags
=
wcstol
(
flags
,
NULL
,
10
);
if
(
!
is_full_path
(
cabinfo
.
pszCab
)
&&
!
is_full_path
(
cabinfo
.
pszInf
))
{
...
...
@@ -883,7 +882,7 @@ HRESULT WINAPI LaunchINFSectionExW(HWND hWnd, HINSTANCE hInst, LPWSTR cmdline, I
else
lstrcpyW
(
cabinfo
.
szSrcPath
,
cabinfo
.
pszCab
);
ptr
=
strrchrW
(
cabinfo
.
szSrcPath
,
'\\'
);
ptr
=
wcsrchr
(
cabinfo
.
szSrcPath
,
'\\'
);
*
(
++
ptr
)
=
'\0'
;
}
...
...
dlls/advpack/reg.c
View file @
58f22b03
...
...
@@ -22,11 +22,11 @@
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "winnls.h"
#include "winerror.h"
#include "winuser.h"
#include "winternl.h"
#include "advpub.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
advpack
);
...
...
@@ -186,16 +186,16 @@ static HRESULT write_predefined_strings(HMODULE hm, LPCWSTR ini_path)
*
sys_root
=
'\0'
;
GetEnvironmentVariableW
(
SystemRoot
,
sys_root
,
ARRAY_SIZE
(
sys_root
));
if
(
!
strncmpiW
(
sys_root
,
mod_path
+
1
,
strlenW
(
sys_root
)))
if
(
!
wcsnicmp
(
sys_root
,
mod_path
+
1
,
l
strlenW
(
sys_root
)))
{
*
sys_mod_path
=
'\"'
;
strcpyW
(
sys_mod_path
+
1
,
escaped_SystemRoot
);
strcatW
(
sys_mod_path
,
mod_path
+
1
+
strlenW
(
sys_root
));
l
strcpyW
(
sys_mod_path
+
1
,
escaped_SystemRoot
);
lstrcatW
(
sys_mod_path
,
mod_path
+
1
+
l
strlenW
(
sys_root
));
}
else
{
FIXME
(
"SYS_MOD_PATH needs more work
\n
"
);
strcpyW
(
sys_mod_path
,
mod_path
);
l
strcpyW
(
sys_mod_path
,
mod_path
);
}
WritePrivateProfileStringW
(
Strings
,
SYS_MOD_PATH
,
sys_mod_path
,
ini_path
);
...
...
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