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
843382f2
Commit
843382f2
authored
Oct 15, 2009
by
Hans Leidekker
Committed by
Alexandre Julliard
Oct 15, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Define common strings only once.
parent
f84a6bdf
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
104 additions
and
193 deletions
+104
-193
action.c
dlls/msi/action.c
+0
-0
appsearch.c
dlls/msi/appsearch.c
+7
-13
classes.c
dlls/msi/classes.c
+0
-13
cond.y
dlls/msi/cond.y
+0
-1
custom.c
dlls/msi/custom.c
+10
-27
database.c
dlls/msi/database.c
+4
-7
dialog.c
dlls/msi/dialog.c
+5
-14
events.c
dlls/msi/events.c
+0
-4
files.c
dlls/msi/files.c
+1
-10
helpers.c
dlls/msi/helpers.c
+1
-7
media.c
dlls/msi/media.c
+1
-4
msi.c
dlls/msi/msi.c
+6
-20
msipriv.h
dlls/msi/msipriv.h
+38
-6
package.c
dlls/msi/package.c
+25
-39
registry.c
dlls/msi/registry.c
+1
-9
source.c
dlls/msi/source.c
+3
-8
string.c
dlls/msi/string.c
+1
-2
table.c
dlls/msi/table.c
+0
-3
upgrade.c
dlls/msi/upgrade.c
+1
-6
No files found.
dlls/msi/action.c
View file @
843382f2
This diff is collapsed.
Click to expand it.
dlls/msi/appsearch.c
View file @
843382f2
...
...
@@ -162,8 +162,6 @@ static LPWSTR app_search_file(LPWSTR path, MSISIGNATURE *sig)
LPWSTR
val
=
NULL
;
LPBYTE
buffer
;
static
const
WCHAR
root
[]
=
{
'\\'
,
0
};
if
(
!
sig
->
File
)
{
PathRemoveFileSpecW
(
path
);
...
...
@@ -193,7 +191,7 @@ static LPWSTR app_search_file(LPWSTR path, MSISIGNATURE *sig)
if
(
!
GetFileVersionInfoW
(
path
,
0
,
size
,
buffer
))
goto
done
;
if
(
!
VerQueryValueW
(
buffer
,
root
,
(
LPVOID
)
&
info
,
&
size
)
||
!
info
)
if
(
!
VerQueryValueW
(
buffer
,
szBackSlash
,
(
LPVOID
)
&
info
,
&
size
)
||
!
info
)
goto
done
;
if
(
sig
->
MinVersionLS
||
sig
->
MinVersionMS
)
...
...
@@ -633,12 +631,11 @@ static UINT ACTION_FileVersionMatches(const MSISIGNATURE *sig, LPCWSTR filePath,
if
(
buf
)
{
static
const
WCHAR
rootW
[]
=
{
'\\'
,
0
};
UINT
versionLen
;
LPVOID
subBlock
=
NULL
;
if
(
GetFileVersionInfoW
(
filePath
,
0
,
size
,
buf
))
VerQueryValueW
(
buf
,
rootW
,
&
subBlock
,
&
versionLen
);
VerQueryValueW
(
buf
,
szBackSlash
,
&
subBlock
,
&
versionLen
);
if
(
subBlock
)
{
VS_FIXEDFILEINFO
*
info
=
subBlock
;
...
...
@@ -742,8 +739,6 @@ static UINT ACTION_RecurseSearchDirectory(MSIPACKAGE *package, LPWSTR *appValue,
WCHAR
subpath
[
MAX_PATH
];
WCHAR
*
buf
;
static
const
WCHAR
dot
[]
=
{
'.'
,
0
};
static
const
WCHAR
dotdot
[]
=
{
'.'
,
'.'
,
0
};
static
const
WCHAR
starDotStarW
[]
=
{
'*'
,
'.'
,
'*'
,
0
};
TRACE
(
"Searching directory %s for file %s, depth %d
\n
"
,
debugstr_w
(
dir
),
...
...
@@ -792,8 +787,8 @@ static UINT ACTION_RecurseSearchDirectory(MSIPACKAGE *package, LPWSTR *appValue,
if
(
hFind
!=
INVALID_HANDLE_VALUE
)
{
if
(
findData
.
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
&&
lstrcmpW
(
findData
.
cFileName
,
d
ot
)
&&
lstrcmpW
(
findData
.
cFileName
,
dotd
ot
))
lstrcmpW
(
findData
.
cFileName
,
szD
ot
)
&&
lstrcmpW
(
findData
.
cFileName
,
szDotD
ot
))
{
lstrcpyW
(
subpath
,
dir
);
PathAppendW
(
subpath
,
findData
.
cFileName
);
...
...
@@ -804,8 +799,8 @@ static UINT ACTION_RecurseSearchDirectory(MSIPACKAGE *package, LPWSTR *appValue,
while
(
rc
==
ERROR_SUCCESS
&&
!*
appValue
&&
FindNextFileW
(
hFind
,
&
findData
)
!=
0
)
{
if
(
!
lstrcmpW
(
findData
.
cFileName
,
d
ot
)
||
!
lstrcmpW
(
findData
.
cFileName
,
dotd
ot
))
if
(
!
lstrcmpW
(
findData
.
cFileName
,
szD
ot
)
||
!
lstrcmpW
(
findData
.
cFileName
,
szDotD
ot
))
continue
;
lstrcpyW
(
subpath
,
dir
);
...
...
@@ -1079,7 +1074,6 @@ static UINT ITERATE_CCPSearch(MSIRECORD *row, LPVOID param)
UINT
r
=
ERROR_SUCCESS
;
static
const
WCHAR
success
[]
=
{
'C'
,
'C'
,
'P'
,
'_'
,
'S'
,
'u'
,
'c'
,
'c'
,
'e'
,
's'
,
's'
,
0
};
static
const
WCHAR
one
[]
=
{
'1'
,
0
};
signature
=
MSI_RecordGetString
(
row
,
1
);
...
...
@@ -1089,7 +1083,7 @@ static UINT ITERATE_CCPSearch(MSIRECORD *row, LPVOID param)
if
(
value
)
{
TRACE
(
"Found signature %s
\n
"
,
debugstr_w
(
signature
));
MSI_SetPropertyW
(
package
,
success
,
o
ne
);
MSI_SetPropertyW
(
package
,
success
,
szO
ne
);
msi_free
(
value
);
r
=
ERROR_NO_MORE_ITEMS
;
}
...
...
dlls/msi/classes.c
View file @
843382f2
...
...
@@ -42,17 +42,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
msi
);
extern
const
WCHAR
szRegisterClassInfo
[];
extern
const
WCHAR
szRegisterProgIdInfo
[];
extern
const
WCHAR
szRegisterExtensionInfo
[];
extern
const
WCHAR
szRegisterMIMEInfo
[];
extern
const
WCHAR
szUnregisterClassInfo
[];
extern
const
WCHAR
szUnregisterExtensionInfo
[];
extern
const
WCHAR
szUnregisterMIMEInfo
[];
extern
const
WCHAR
szUnregisterProgIdInfo
[];
static
MSIAPPID
*
load_appid
(
MSIPACKAGE
*
package
,
MSIRECORD
*
row
)
{
LPCWSTR
buffer
;
...
...
@@ -798,7 +787,6 @@ UINT ACTION_RegisterClassInfo(MSIPACKAGE *package)
static
const
WCHAR
szProgID
[]
=
{
'P'
,
'r'
,
'o'
,
'g'
,
'I'
,
'D'
,
0
};
static
const
WCHAR
szVIProgID
[]
=
{
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
'I'
,
'n'
,
'd'
,
'e'
,
'p'
,
'e'
,
'n'
,
'd'
,
'e'
,
'n'
,
't'
,
'P'
,
'r'
,
'o'
,
'g'
,
'I'
,
'D'
,
0
};
static
const
WCHAR
szAppID
[]
=
{
'A'
,
'p'
,
'p'
,
'I'
,
'D'
,
0
};
static
const
WCHAR
szSpace
[]
=
{
' '
,
0
};
static
const
WCHAR
szFileType_fmt
[]
=
{
'F'
,
'i'
,
'l'
,
'e'
,
'T'
,
'y'
,
'p'
,
'e'
,
'\\'
,
'%'
,
's'
,
'\\'
,
'%'
,
'i'
,
0
};
HKEY
hkey
,
hkey2
,
hkey3
;
MSICLASS
*
cls
;
...
...
@@ -1098,7 +1086,6 @@ static UINT register_verb(MSIPACKAGE *package, LPCWSTR progid,
strcpyW
(
command
,
advertise
);
if
(
verb
->
Argument
)
{
static
const
WCHAR
szSpace
[]
=
{
' '
,
0
};
strcatW
(
command
,
szSpace
);
strcatW
(
command
,
verb
->
Argument
);
}
...
...
dlls/msi/cond.y
View file @
843382f2
...
...
@@ -64,7 +64,6 @@ struct cond_str {
static
LPWSTR
COND_GetString
(
const
struct
cond_str
*
str
);
static
LPWSTR
COND_GetLiteral
(
const
struct
cond_str
*
str
);
static
int
cond_lex
(
void
*
COND_lval
,
COND_input
*
info
);
static
const
WCHAR
szEmpty
[]
=
{
0
};
static
INT
compare_int
(
INT
a
,
INT
operator
,
INT
b
);
static
INT
compare_string
(
LPCWSTR
a
,
INT
operator
,
LPCWSTR
b
,
BOOL
convert
);
...
...
dlls/msi/custom.c
View file @
843382f2
...
...
@@ -44,15 +44,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi);
static
const
WCHAR
c_collen
[]
=
{
'C'
,
':'
,
'\\'
,
0
};
static
const
WCHAR
cszTempFolder
[]
=
{
'T'
,
'e'
,
'm'
,
'p'
,
'F'
,
'o'
,
'l'
,
'd'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
szActionData
[]
=
{
'C'
,
'u'
,
's'
,
't'
,
'o'
,
'm'
,
'A'
,
'c'
,
't'
,
'i'
,
'o'
,
'n'
,
'D'
,
'a'
,
't'
,
'a'
,
0
};
static
const
WCHAR
ProdCode
[]
=
{
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
'C'
,
'o'
,
'd'
,
'e'
,
0
};
static
const
WCHAR
UserSID
[]
=
{
'U'
,
's'
,
'e'
,
'r'
,
'S'
,
'I'
,
'D'
,
0
};
typedef
struct
tagMSIRUNNINGACTION
{
struct
list
entry
;
...
...
@@ -172,17 +163,17 @@ static void set_deferred_action_props(MSIPACKAGE *package, LPWSTR deferred_data)
end
=
strstrW
(
beg
,
sep
);
*
end
=
'\0'
;
MSI_SetPropertyW
(
package
,
szActionData
,
beg
);
MSI_SetPropertyW
(
package
,
sz
Custom
ActionData
,
beg
);
beg
=
end
+
3
;
end
=
strstrW
(
beg
,
sep
);
*
end
=
'\0'
;
MSI_SetPropertyW
(
package
,
UserSID
,
beg
);
MSI_SetPropertyW
(
package
,
sz
UserSID
,
beg
);
beg
=
end
+
3
;
end
=
strchrW
(
beg
,
']'
);
*
end
=
'\0'
;
MSI_SetPropertyW
(
package
,
Prod
Code
,
beg
);
MSI_SetPropertyW
(
package
,
szProduct
Code
,
beg
);
}
UINT
ACTION_CustomAction
(
MSIPACKAGE
*
package
,
LPCWSTR
action
,
UINT
script
,
BOOL
execute
)
...
...
@@ -241,8 +232,8 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL
if
(
!
execute
)
{
LPWSTR
actiondata
=
msi_dup_property
(
package
,
action
);
LPWSTR
usersid
=
msi_dup_property
(
package
,
UserSID
);
LPWSTR
prodcode
=
msi_dup_property
(
package
,
Prod
Code
);
LPWSTR
usersid
=
msi_dup_property
(
package
,
sz
UserSID
);
LPWSTR
prodcode
=
msi_dup_property
(
package
,
szProduct
Code
);
LPWSTR
deferred
=
msi_get_deferred_action
(
action
,
actiondata
,
usersid
,
prodcode
);
if
(
type
&
msidbCustomActionTypeCommit
)
...
...
@@ -265,8 +256,6 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL
}
else
{
static
const
WCHAR
szBlank
[]
=
{
0
};
LPWSTR
actiondata
=
msi_dup_property
(
package
,
action
);
switch
(
script
)
...
...
@@ -287,9 +276,9 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL
if
(
deferred_data
)
set_deferred_action_props
(
package
,
deferred_data
);
else
if
(
actiondata
)
MSI_SetPropertyW
(
package
,
szActionData
,
actiondata
);
MSI_SetPropertyW
(
package
,
szCustomActionData
,
actiondata
);
else
MSI_SetPropertyW
(
package
,
szActionData
,
szBlank
);
MSI_SetPropertyW
(
package
,
szCustomActionData
,
szEmpty
);
msi_free
(
actiondata
);
}
...
...
@@ -383,7 +372,6 @@ static UINT store_binary_to_temp(MSIPACKAGE *package, LPCWSTR source,
MSIRECORD
*
row
=
0
;
HANDLE
file
;
CHAR
buffer
[
1024
];
static
const
WCHAR
f1
[]
=
{
'm'
,
's'
,
'i'
,
0
};
WCHAR
fmt
[
MAX_PATH
];
DWORD
sz
=
MAX_PATH
;
UINT
r
;
...
...
@@ -391,7 +379,7 @@ static UINT store_binary_to_temp(MSIPACKAGE *package, LPCWSTR source,
if
(
MSI_GetPropertyW
(
package
,
cszTempFolder
,
fmt
,
&
sz
)
!=
ERROR_SUCCESS
)
GetTempPathW
(
MAX_PATH
,
fmt
);
if
(
GetTempFileNameW
(
fmt
,
f1
,
0
,
tmp_file
)
==
0
)
if
(
GetTempFileNameW
(
fmt
,
szMsi
,
0
,
tmp_file
)
==
0
)
{
TRACE
(
"Unable to create file
\n
"
);
return
ERROR_FUNCTION_FAILED
;
...
...
@@ -853,11 +841,9 @@ static UINT HANDLE_CustomType23(MSIPACKAGE *package, LPCWSTR source,
DWORD
size
;
UINT
r
;
static
const
WCHAR
backslash
[]
=
{
'\\'
,
0
};
size
=
MAX_PATH
;
MSI_GetPropertyW
(
package
,
cszSourceDir
,
package_path
,
&
size
);
lstrcatW
(
package_path
,
backs
lash
);
lstrcatW
(
package_path
,
szBackS
lash
);
lstrcatW
(
package_path
,
source
);
TRACE
(
"Installing package %s concurrently
\n
"
,
debugstr_w
(
package_path
));
...
...
@@ -884,10 +870,7 @@ static UINT HANDLE_CustomType1(MSIPACKAGE *package, LPCWSTR source,
debugstr_w
(
tmp_file
));
if
(
!
strchrW
(
tmp_file
,
'.'
))
{
static
const
WCHAR
dot
[]
=
{
'.'
,
0
};
strcatW
(
tmp_file
,
dot
);
}
strcatW
(
tmp_file
,
szDot
);
info
=
do_msidbCustomActionTypeDll
(
package
,
type
,
tmp_file
,
target
,
action
);
...
...
dlls/msi/database.c
View file @
843382f2
...
...
@@ -78,7 +78,6 @@ UINT MSI_OpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIDATABASE **pdb)
BOOL
created
=
FALSE
;
WCHAR
path
[
MAX_PATH
];
static
const
WCHAR
backslash
[]
=
{
'\\'
,
0
};
static
const
WCHAR
szTables
[]
=
{
'_'
,
'T'
,
'a'
,
'b'
,
'l'
,
'e'
,
's'
,
0
};
TRACE
(
"%s %s
\n
"
,
debugstr_w
(
szDBPath
),
debugstr_w
(
szPersist
)
);
...
...
@@ -177,7 +176,7 @@ UINT MSI_OpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIDATABASE **pdb)
if
(
!
strchrW
(
save_path
,
'\\'
))
{
GetCurrentDirectoryW
(
MAX_PATH
,
path
);
lstrcatW
(
path
,
backs
lash
);
lstrcatW
(
path
,
szBackS
lash
);
lstrcatW
(
path
,
save_path
);
}
else
...
...
@@ -656,7 +655,6 @@ static UINT MSI_DatabaseImport(MSIDATABASE *db, LPCWSTR folder, LPCWSTR file)
LPWSTR
**
records
=
NULL
;
LPWSTR
**
temp_records
;
static
const
WCHAR
backslash
[]
=
{
'\\'
,
0
};
static
const
WCHAR
suminfo
[]
=
{
'_'
,
'S'
,
'u'
,
'm'
,
'm'
,
'a'
,
'r'
,
'y'
,
'I'
,
'n'
,
'f'
,
'o'
,
'r'
,
'm'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
...
...
@@ -665,13 +663,13 @@ static UINT MSI_DatabaseImport(MSIDATABASE *db, LPCWSTR folder, LPCWSTR file)
if
(
folder
==
NULL
||
file
==
NULL
)
return
ERROR_INVALID_PARAMETER
;
len
=
lstrlenW
(
folder
)
+
lstrlenW
(
backs
lash
)
+
lstrlenW
(
file
)
+
1
;
len
=
lstrlenW
(
folder
)
+
lstrlenW
(
szBackS
lash
)
+
lstrlenW
(
file
)
+
1
;
path
=
msi_alloc
(
len
*
sizeof
(
WCHAR
)
);
if
(
!
path
)
return
ERROR_OUTOFMEMORY
;
lstrcpyW
(
path
,
folder
);
lstrcatW
(
path
,
backs
lash
);
lstrcatW
(
path
,
szBackS
lash
);
lstrcatW
(
path
,
file
);
data
=
msi_read_text_archive
(
path
);
...
...
@@ -878,7 +876,6 @@ static UINT MSI_DatabaseExport( MSIDATABASE *db, LPCWSTR table,
{
static
const
WCHAR
query
[]
=
{
's'
,
'e'
,
'l'
,
'e'
,
'c'
,
't'
,
' '
,
'*'
,
' '
,
'f'
,
'r'
,
'o'
,
'm'
,
' '
,
'%'
,
's'
,
0
};
static
const
WCHAR
szbs
[]
=
{
'\\'
,
0
};
static
const
WCHAR
forcecodepage
[]
=
{
'_'
,
'F'
,
'o'
,
'r'
,
'c'
,
'e'
,
'C'
,
'o'
,
'd'
,
'e'
,
'p'
,
'a'
,
'g'
,
'e'
,
0
};
MSIRECORD
*
rec
=
NULL
;
...
...
@@ -899,7 +896,7 @@ static UINT MSI_DatabaseExport( MSIDATABASE *db, LPCWSTR table,
return
ERROR_OUTOFMEMORY
;
lstrcpyW
(
filename
,
folder
);
lstrcatW
(
filename
,
sz
bs
);
lstrcatW
(
filename
,
sz
BackSlash
);
lstrcatW
(
filename
,
file
);
handle
=
CreateFileW
(
filename
,
GENERIC_READ
|
GENERIC_WRITE
,
0
,
...
...
dlls/msi/dialog.c
View file @
843382f2
...
...
@@ -495,7 +495,6 @@ static LPWSTR msi_create_tmp_path(void)
{
WCHAR
tmp
[
MAX_PATH
];
LPWSTR
path
=
NULL
;
static
const
WCHAR
prefix
[]
=
{
'm'
,
's'
,
'i'
,
0
};
DWORD
len
,
r
;
r
=
GetTempPathW
(
MAX_PATH
,
tmp
);
...
...
@@ -505,7 +504,7 @@ static LPWSTR msi_create_tmp_path(void)
path
=
msi_alloc
(
len
*
sizeof
(
WCHAR
)
);
if
(
path
)
{
r
=
GetTempFileNameW
(
tmp
,
prefix
,
0
,
path
);
r
=
GetTempFileNameW
(
tmp
,
szMsi
,
0
,
path
);
if
(
!
r
)
{
msi_free
(
path
);
...
...
@@ -588,8 +587,6 @@ void msi_dialog_handle_event( msi_dialog* dialog, LPCWSTR control,
LPCWSTR
font_text
,
text
=
NULL
;
LPWSTR
font
;
static
const
WCHAR
empty
[]
=
{
0
};
ctrl
=
msi_dialog_find_control
(
dialog
,
control
);
if
(
!
ctrl
)
return
;
...
...
@@ -597,7 +594,7 @@ void msi_dialog_handle_event( msi_dialog* dialog, LPCWSTR control,
{
font_text
=
MSI_RecordGetString
(
rec
,
1
);
font
=
msi_dialog_get_style
(
font_text
,
&
text
);
if
(
!
text
)
text
=
e
mpty
;
if
(
!
text
)
text
=
szE
mpty
;
SetWindowTextW
(
ctrl
->
hwnd
,
text
);
msi_free
(
font
);
msi_dialog_check_messages
(
NULL
);
...
...
@@ -2390,8 +2387,6 @@ static void msi_dialog_update_directory_list( msi_dialog *dialog, msi_control *c
HANDLE
file
;
static
const
WCHAR
asterisk
[]
=
{
'*'
,
0
};
static
const
WCHAR
dot
[]
=
{
'.'
,
0
};
static
const
WCHAR
dotdot
[]
=
{
'.'
,
'.'
,
0
};
if
(
!
control
&&
!
(
control
=
msi_dialog_find_control_by_type
(
dialog
,
szDirectoryList
)))
return
;
...
...
@@ -2415,7 +2410,7 @@ static void msi_dialog_update_directory_list( msi_dialog *dialog, msi_control *c
if
(
wfd
.
dwFileAttributes
!=
FILE_ATTRIBUTE_DIRECTORY
)
continue
;
if
(
!
lstrcmpW
(
wfd
.
cFileName
,
dot
)
||
!
lstrcmpW
(
wfd
.
cFileName
,
dotd
ot
)
)
if
(
!
lstrcmpW
(
wfd
.
cFileName
,
szDot
)
||
!
lstrcmpW
(
wfd
.
cFileName
,
szDotD
ot
)
)
continue
;
item
.
mask
=
LVIF_TEXT
;
...
...
@@ -2471,8 +2466,6 @@ static UINT msi_dialog_dirlist_handler( msi_dialog *dialog,
LVITEMW
item
;
int
index
;
static
const
WCHAR
backslash
[]
=
{
'\\'
,
0
};
if
(
nmhdr
->
code
!=
LVN_ITEMACTIVATE
)
return
ERROR_SUCCESS
;
...
...
@@ -2494,7 +2487,7 @@ static UINT msi_dialog_dirlist_handler( msi_dialog *dialog,
lstrcpyW
(
new_path
,
path
);
lstrcatW
(
new_path
,
text
);
lstrcatW
(
new_path
,
backs
lash
);
lstrcatW
(
new_path
,
szBackS
lash
);
MSI_SetPropertyW
(
dialog
->
package
,
prop
,
new_path
);
...
...
@@ -2564,7 +2557,6 @@ static void msi_dialog_vcl_add_columns( msi_dialog *dialog, msi_control *control
LVCOLUMNW
lvc
;
DWORD
count
=
0
;
static
const
WCHAR
zero
[]
=
{
'0'
,
0
};
static
const
WCHAR
negative
[]
=
{
'-'
,
0
};
if
(
!
text
)
return
;
...
...
@@ -2582,7 +2574,7 @@ static void msi_dialog_vcl_add_columns( msi_dialog *dialog, msi_control *control
begin
+=
end
-
begin
+
1
;
/* empty braces or '0' hides the column */
if
(
!
num
[
0
]
||
!
lstrcmpW
(
num
,
z
ero
)
)
if
(
!
num
[
0
]
||
!
lstrcmpW
(
num
,
szZ
ero
)
)
{
count
++
;
msi_free
(
num
);
...
...
@@ -3760,7 +3752,6 @@ UINT msi_spawn_error_dialog( MSIPACKAGE *package, LPWSTR error_dialog, LPWSTR er
DWORD
size
=
MAX_PATH
;
int
res
;
static
const
WCHAR
szUILevel
[]
=
{
'U'
,
'I'
,
'L'
,
'e'
,
'v'
,
'e'
,
'l'
,
0
};
static
const
WCHAR
pn_prop
[]
=
{
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
'N'
,
'a'
,
'm'
,
'e'
,
0
};
static
const
WCHAR
title_fmt
[]
=
{
'%'
,
's'
,
' '
,
'W'
,
'a'
,
'r'
,
'n'
,
'i'
,
'n'
,
'g'
,
0
};
static
const
WCHAR
error_abort
[]
=
{
'E'
,
'r'
,
'r'
,
'o'
,
'r'
,
'A'
,
'b'
,
'o'
,
'r'
,
't'
,
0
};
...
...
dlls/msi/events.c
View file @
843382f2
...
...
@@ -170,7 +170,6 @@ static UINT ControlEvent_DoAction(MSIPACKAGE* package, LPCWSTR argument,
static
UINT
ControlEvent_AddLocal
(
MSIPACKAGE
*
package
,
LPCWSTR
argument
,
msi_dialog
*
dialog
)
{
static
const
WCHAR
szAll
[]
=
{
'A'
,
'L'
,
'L'
,
0
};
MSIFEATURE
*
feature
=
NULL
;
if
(
lstrcmpW
(
szAll
,
argument
))
...
...
@@ -190,7 +189,6 @@ static UINT ControlEvent_AddLocal(MSIPACKAGE* package, LPCWSTR argument,
static
UINT
ControlEvent_Remove
(
MSIPACKAGE
*
package
,
LPCWSTR
argument
,
msi_dialog
*
dialog
)
{
static
const
WCHAR
szAll
[]
=
{
'A'
,
'L'
,
'L'
,
0
};
MSIFEATURE
*
feature
=
NULL
;
if
(
lstrcmpW
(
szAll
,
argument
))
...
...
@@ -210,7 +208,6 @@ static UINT ControlEvent_Remove(MSIPACKAGE* package, LPCWSTR argument,
static
UINT
ControlEvent_AddSource
(
MSIPACKAGE
*
package
,
LPCWSTR
argument
,
msi_dialog
*
dialog
)
{
static
const
WCHAR
szAll
[]
=
{
'A'
,
'L'
,
'L'
,
0
};
MSIFEATURE
*
feature
=
NULL
;
if
(
lstrcmpW
(
szAll
,
argument
))
...
...
@@ -383,7 +380,6 @@ static UINT ControlEvent_DirectoryListUp(MSIPACKAGE *package, LPCWSTR argument,
static
UINT
ControlEvent_ReinstallMode
(
MSIPACKAGE
*
package
,
LPCWSTR
argument
,
msi_dialog
*
dialog
)
{
static
const
WCHAR
szReinstallMode
[]
=
{
'R'
,
'E'
,
'I'
,
'N'
,
'S'
,
'T'
,
'A'
,
'L'
,
'L'
,
'M'
,
'O'
,
'D'
,
'E'
,
0
};
return
MSI_SetPropertyW
(
package
,
szReinstallMode
,
argument
);
}
...
...
dlls/msi/files.c
View file @
843382f2
...
...
@@ -47,13 +47,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
msi
);
extern
const
WCHAR
szInstallFiles
[];
extern
const
WCHAR
szDuplicateFiles
[];
extern
const
WCHAR
szMoveFiles
[];
extern
const
WCHAR
szPatchFiles
[];
extern
const
WCHAR
szRemoveDuplicateFiles
[];
extern
const
WCHAR
szRemoveFiles
[];
static
void
msi_file_update_ui
(
MSIPACKAGE
*
package
,
MSIFILE
*
f
,
const
WCHAR
*
action
)
{
MSIRECORD
*
uirow
;
...
...
@@ -164,14 +157,12 @@ static UINT copy_install_file(MSIPACKAGE *package, MSIFILE *file, LPWSTR source)
}
if
(
gle
==
ERROR_SHARING_VIOLATION
)
{
static
const
WCHAR
msiW
[]
=
{
'm'
,
's'
,
'i'
,
0
};
static
const
WCHAR
slashW
[]
=
{
'\\'
,
0
};
WCHAR
tmpfileW
[
MAX_PATH
],
*
pathW
,
*
p
;
DWORD
len
;
TRACE
(
"file in use, scheduling rename operation
\n
"
);
GetTempFileNameW
(
s
lashW
,
msiW
,
0
,
tmpfileW
);
GetTempFileNameW
(
s
zBackSlash
,
szMsi
,
0
,
tmpfileW
);
len
=
strlenW
(
file
->
TargetPath
)
+
strlenW
(
tmpfileW
)
+
1
;
if
(
!
(
pathW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
))))
return
ERROR_OUTOFMEMORY
;
...
...
dlls/msi/helpers.c
View file @
843382f2
...
...
@@ -37,12 +37,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi);
static
const
WCHAR
cszTargetDir
[]
=
{
'T'
,
'A'
,
'R'
,
'G'
,
'E'
,
'T'
,
'D'
,
'I'
,
'R'
,
0
};
static
const
WCHAR
cszDatabase
[]
=
{
'D'
,
'A'
,
'T'
,
'A'
,
'B'
,
'A'
,
'S'
,
'E'
,
0
};
const
WCHAR
cszSourceDir
[]
=
{
'S'
,
'o'
,
'u'
,
'r'
,
'c'
,
'e'
,
'D'
,
'i'
,
'r'
,
0
};
const
WCHAR
cszSOURCEDIR
[]
=
{
'S'
,
'O'
,
'U'
,
'R'
,
'C'
,
'E'
,
'D'
,
'I'
,
'R'
,
0
};
const
WCHAR
cszRootDrive
[]
=
{
'R'
,
'O'
,
'O'
,
'T'
,
'D'
,
'R'
,
'I'
,
'V'
,
'E'
,
0
};
const
WCHAR
cszbs
[]
=
{
'\\'
,
0
};
const
WCHAR
szLocalSid
[]
=
{
'S'
,
'-'
,
'1'
,
'-'
,
'5'
,
'-'
,
'1'
,
'8'
,
0
};
LPWSTR
build_icon_path
(
MSIPACKAGE
*
package
,
LPCWSTR
icon_name
)
{
LPWSTR
SystemFolder
,
dest
,
FilePath
;
...
...
@@ -724,7 +718,7 @@ LPWSTR build_directory_name(DWORD count, ...)
continue
;
strcatW
(
dir
,
str
);
if
(
((
i
+
1
)
!=
count
)
&&
dir
[
strlenW
(
dir
)
-
1
]
!=
'\\'
)
strcatW
(
dir
,
cszbs
);
strcatW
(
dir
,
szBackSlash
);
}
return
dir
;
}
...
...
dlls/msi/media.c
View file @
843382f2
...
...
@@ -75,7 +75,6 @@ static UINT msi_change_media(MSIPACKAGE *package, MSIMEDIAINFO *mi)
LPWSTR
source_dir
;
UINT
r
=
ERROR_SUCCESS
;
static
const
WCHAR
szUILevel
[]
=
{
'U'
,
'I'
,
'L'
,
'e'
,
'v'
,
'e'
,
'l'
,
0
};
static
const
WCHAR
error_prop
[]
=
{
'E'
,
'r'
,
'r'
,
'o'
,
'r'
,
'D'
,
'i'
,
'a'
,
'l'
,
'o'
,
'g'
,
0
};
if
((
msi_get_property_int
(
package
,
szUILevel
,
0
)
&
INSTALLUILEVEL_MASK
)
==
...
...
@@ -356,14 +355,12 @@ static INT_PTR cabinet_copy_file(FDINOTIFICATIONTYPE fdint,
}
if
(
err
==
ERROR_SHARING_VIOLATION
)
{
static
const
WCHAR
msiW
[]
=
{
'm'
,
's'
,
'i'
,
0
};
static
const
WCHAR
slashW
[]
=
{
'\\'
,
0
};
WCHAR
tmpfileW
[
MAX_PATH
],
*
tmppathW
,
*
p
;
DWORD
len
;
TRACE
(
"file in use, scheduling rename operation
\n
"
);
GetTempFileNameW
(
s
lashW
,
msiW
,
0
,
tmpfileW
);
GetTempFileNameW
(
s
zBackSlash
,
szMsi
,
0
,
tmpfileW
);
len
=
strlenW
(
path
)
+
strlenW
(
tmpfileW
)
+
1
;
if
(
!
(
tmppathW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
))))
return
ERROR_OUTOFMEMORY
;
...
...
dlls/msi/msi.c
View file @
843382f2
...
...
@@ -264,8 +264,6 @@ UINT WINAPI MsiReinstallProductA(LPCSTR szProduct, DWORD dwReinstallMode)
UINT
WINAPI
MsiReinstallProductW
(
LPCWSTR
szProduct
,
DWORD
dwReinstallMode
)
{
static
const
WCHAR
szAll
[]
=
{
'A'
,
'L'
,
'L'
,
0
};
TRACE
(
"%s %08x
\n
"
,
debugstr_w
(
szProduct
),
dwReinstallMode
);
return
MsiReinstallFeatureW
(
szProduct
,
szAll
,
dwReinstallMode
);
...
...
@@ -311,7 +309,6 @@ static UINT MSI_ApplyPatchW(LPCWSTR szPatchPackage, LPCWSTR szProductCode, LPCWS
LPWSTR
beg
,
end
;
LPWSTR
cmd
=
NULL
,
codes
=
NULL
;
static
const
WCHAR
space
[]
=
{
' '
,
0
};
static
const
WCHAR
patcheq
[]
=
{
'P'
,
'A'
,
'T'
,
'C'
,
'H'
,
'='
,
0
};
static
WCHAR
empty
[]
=
{
0
};
...
...
@@ -361,7 +358,7 @@ static UINT MSI_ApplyPatchW(LPCWSTR szPatchPackage, LPCWSTR szProductCode, LPCWS
}
lstrcpyW
(
cmd
,
cmd_ptr
);
if
(
szCommandLine
)
lstrcatW
(
cmd
,
space
);
if
(
szCommandLine
)
lstrcatW
(
cmd
,
s
zS
pace
);
lstrcatW
(
cmd
,
patcheq
);
lstrcatW
(
cmd
,
szPatchPackage
);
...
...
@@ -1216,9 +1213,7 @@ UINT WINAPI MsiGetProductInfoExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
DWORD
type
;
UINT
r
=
ERROR_UNKNOWN_PRODUCT
;
static
const
WCHAR
one
[]
=
{
'1'
,
0
};
static
const
WCHAR
five
[]
=
{
'5'
,
0
};
static
const
WCHAR
empty
[]
=
{
0
};
static
const
WCHAR
displayname
[]
=
{
'D'
,
'i'
,
's'
,
'p'
,
'l'
,
'a'
,
'y'
,
'N'
,
'a'
,
'm'
,
'e'
,
0
};
static
const
WCHAR
displayversion
[]
=
{
...
...
@@ -1315,7 +1310,7 @@ UINT WINAPI MsiGetProductInfoExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
val
=
msi_reg_get_value
(
props
,
szProperty
,
&
type
);
if
(
!
val
)
val
=
strdupW
(
e
mpty
);
val
=
strdupW
(
szE
mpty
);
r
=
msi_copy_outval
(
val
,
szValue
,
pcchValue
);
}
...
...
@@ -1340,7 +1335,7 @@ UINT WINAPI MsiGetProductInfoExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
val
=
msi_reg_get_value
(
hkey
,
szProperty
,
&
type
);
if
(
!
val
)
val
=
strdupW
(
e
mpty
);
val
=
strdupW
(
szE
mpty
);
r
=
msi_copy_outval
(
val
,
szValue
,
pcchValue
);
}
...
...
@@ -1358,7 +1353,7 @@ UINT WINAPI MsiGetProductInfoExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
val
=
strdupW
(
five
);
}
else
val
=
strdupW
(
o
ne
);
val
=
strdupW
(
szO
ne
);
r
=
msi_copy_outval
(
val
,
szValue
,
pcchValue
);
goto
done
;
...
...
@@ -1372,7 +1367,7 @@ UINT WINAPI MsiGetProductInfoExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
}
if
(
prod
||
managed
)
val
=
strdupW
(
o
ne
);
val
=
strdupW
(
szO
ne
);
else
goto
done
;
...
...
@@ -1384,7 +1379,7 @@ UINT WINAPI MsiGetProductInfoExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
goto
done
;
/* FIXME */
val
=
strdupW
(
e
mpty
);
val
=
strdupW
(
szE
mpty
);
r
=
msi_copy_outval
(
val
,
szValue
,
pcchValue
);
}
else
...
...
@@ -1482,9 +1477,6 @@ UINT WINAPI MsiGetPatchInfoExW(LPCWSTR szPatchCode, LPCWSTR szProductCode,
DWORD
len
;
LONG
res
;
static
const
WCHAR
szEmpty
[]
=
{
0
};
static
const
WCHAR
szPatches
[]
=
{
'P'
,
'a'
,
't'
,
'c'
,
'h'
,
'e'
,
's'
,
0
};
static
const
WCHAR
szInstalled
[]
=
{
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'e'
,
'd'
,
0
};
static
const
WCHAR
szManagedPackage
[]
=
{
'M'
,
'a'
,
'n'
,
'a'
,
'g'
,
'e'
,
'd'
,
'L'
,
'o'
,
'c'
,
'a'
,
'l'
,
'P'
,
'a'
,
'c'
,
'k'
,
'a'
,
'g'
,
'e'
,
0
};
...
...
@@ -2971,8 +2963,6 @@ static USERINFOSTATE MSI_GetUserInfo(LPCWSTR szProduct,
LPCWSTR
orgptr
;
UINT
r
;
static
const
WCHAR
szEmpty
[]
=
{
0
};
TRACE
(
"%s %p %p %p %p %p %p
\n
"
,
debugstr_w
(
szProduct
),
lpUserNameBuf
,
pcchUserNameBuf
,
lpOrgNameBuf
,
pcchOrgNameBuf
,
lpSerialBuf
,
pcchSerialBuf
);
...
...
@@ -3385,10 +3375,6 @@ UINT WINAPI MsiReinstallFeatureW( LPCWSTR szProduct, LPCWSTR szFeature,
WCHAR
filename
[
MAX_PATH
];
static
const
WCHAR
szLogVerbose
[]
=
{
' '
,
'L'
,
'O'
,
'G'
,
'V'
,
'E'
,
'R'
,
'B'
,
'O'
,
'S'
,
'E'
,
0
};
static
const
WCHAR
szInstalled
[]
=
{
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'e'
,
'd'
,
0
};
static
const
WCHAR
szReinstall
[]
=
{
'R'
,
'E'
,
'I'
,
'N'
,
'S'
,
'T'
,
'A'
,
'L'
,
'L'
,
0
};
static
const
WCHAR
szReinstallMode
[]
=
{
'R'
,
'E'
,
'I'
,
'N'
,
'S'
,
'T'
,
'A'
,
'L'
,
'L'
,
'M'
,
'O'
,
'D'
,
'E'
,
0
};
static
const
WCHAR
szOne
[]
=
{
'1'
,
0
};
WCHAR
reinstallmode
[
11
];
LPWSTR
ptr
;
DWORD
sz
;
...
...
dlls/msi/msipriv.h
View file @
843382f2
...
...
@@ -1029,12 +1029,44 @@ extern DWORD call_script(MSIHANDLE hPackage, INT type, LPCWSTR script, LPCWSTR f
extern
void
ui_progress
(
MSIPACKAGE
*
,
int
,
int
,
int
,
int
);
extern
void
ui_actiondata
(
MSIPACKAGE
*
,
LPCWSTR
,
MSIRECORD
*
);
/* string consts use a number of places and defined in helpers.c*/
extern
const
WCHAR
cszSourceDir
[];
extern
const
WCHAR
cszSOURCEDIR
[];
extern
const
WCHAR
cszRootDrive
[];
extern
const
WCHAR
cszbs
[];
extern
const
WCHAR
szLocalSid
[];
/* common strings */
static
const
WCHAR
cszSourceDir
[]
=
{
'S'
,
'o'
,
'u'
,
'r'
,
'c'
,
'e'
,
'D'
,
'i'
,
'r'
,
0
};
static
const
WCHAR
cszSOURCEDIR
[]
=
{
'S'
,
'O'
,
'U'
,
'R'
,
'C'
,
'E'
,
'D'
,
'I'
,
'R'
,
0
};
static
const
WCHAR
cszRootDrive
[]
=
{
'R'
,
'O'
,
'O'
,
'T'
,
'D'
,
'R'
,
'I'
,
'V'
,
'E'
,
0
};
static
const
WCHAR
szLocalSid
[]
=
{
'S'
,
'-'
,
'1'
,
'-'
,
'5'
,
'-'
,
'1'
,
'8'
,
0
};
static
const
WCHAR
szEmpty
[]
=
{
0
};
static
const
WCHAR
szAll
[]
=
{
'A'
,
'L'
,
'L'
,
0
};
static
const
WCHAR
szOne
[]
=
{
'1'
,
0
};
static
const
WCHAR
szZero
[]
=
{
'0'
,
0
};
static
const
WCHAR
szSpace
[]
=
{
' '
,
0
};
static
const
WCHAR
szBackSlash
[]
=
{
'\\'
,
0
};
static
const
WCHAR
szForwardSlash
[]
=
{
'/'
,
0
};
static
const
WCHAR
szDot
[]
=
{
'.'
,
0
};
static
const
WCHAR
szDotDot
[]
=
{
'.'
,
'.'
,
0
};
static
const
WCHAR
szSemiColon
[]
=
{
';'
,
0
};
static
const
WCHAR
szPreselected
[]
=
{
'P'
,
'r'
,
'e'
,
's'
,
'e'
,
'l'
,
'e'
,
'c'
,
't'
,
'e'
,
'd'
,
0
};
static
const
WCHAR
szPatches
[]
=
{
'P'
,
'a'
,
't'
,
'c'
,
'h'
,
'e'
,
's'
,
0
};
static
const
WCHAR
szState
[]
=
{
'S'
,
't'
,
'a'
,
't'
,
'e'
,
0
};
static
const
WCHAR
szMsi
[]
=
{
'm'
,
's'
,
'i'
,
0
};
static
const
WCHAR
szPatch
[]
=
{
'P'
,
'A'
,
'T'
,
'C'
,
'H'
,
0
};
static
const
WCHAR
szSourceList
[]
=
{
'S'
,
'o'
,
'u'
,
'r'
,
'c'
,
'e'
,
'L'
,
'i'
,
's'
,
't'
,
0
};
static
const
WCHAR
szInstalled
[]
=
{
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'e'
,
'd'
,
0
};
static
const
WCHAR
szReinstall
[]
=
{
'R'
,
'E'
,
'I'
,
'N'
,
'S'
,
'T'
,
'A'
,
'L'
,
'L'
,
0
};
static
const
WCHAR
szReinstallMode
[]
=
{
'R'
,
'E'
,
'I'
,
'N'
,
'S'
,
'T'
,
'A'
,
'L'
,
'L'
,
'M'
,
'O'
,
'D'
,
'E'
,
0
};
static
const
WCHAR
szRemove
[]
=
{
'R'
,
'E'
,
'M'
,
'O'
,
'V'
,
'E'
,
0
};
static
const
WCHAR
szUserSID
[]
=
{
'U'
,
's'
,
'e'
,
'r'
,
'S'
,
'I'
,
'D'
,
0
};
static
const
WCHAR
szProductCode
[]
=
{
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
'C'
,
'o'
,
'd'
,
'e'
,
0
};
static
const
WCHAR
szRegisterClassInfo
[]
=
{
'R'
,
'e'
,
'g'
,
'i'
,
's'
,
't'
,
'e'
,
'r'
,
'C'
,
'l'
,
'a'
,
's'
,
's'
,
'I'
,
'n'
,
'f'
,
'o'
,
0
};
static
const
WCHAR
szRegisterProgIdInfo
[]
=
{
'R'
,
'e'
,
'g'
,
'i'
,
's'
,
't'
,
'e'
,
'r'
,
'P'
,
'r'
,
'o'
,
'g'
,
'I'
,
'd'
,
'I'
,
'n'
,
'f'
,
'o'
,
0
};
static
const
WCHAR
szRegisterExtensionInfo
[]
=
{
'R'
,
'e'
,
'g'
,
'i'
,
's'
,
't'
,
'e'
,
'r'
,
'E'
,
'x'
,
't'
,
'e'
,
'n'
,
's'
,
'i'
,
'o'
,
'n'
,
'I'
,
'n'
,
'f'
,
'o'
,
0
};
static
const
WCHAR
szRegisterMIMEInfo
[]
=
{
'R'
,
'e'
,
'g'
,
'i'
,
's'
,
't'
,
'e'
,
'r'
,
'M'
,
'I'
,
'M'
,
'E'
,
'I'
,
'n'
,
'f'
,
'o'
,
0
};
static
const
WCHAR
szDuplicateFiles
[]
=
{
'D'
,
'u'
,
'p'
,
'l'
,
'i'
,
'c'
,
'a'
,
't'
,
'e'
,
'F'
,
'i'
,
'l'
,
'e'
,
's'
,
0
};
static
const
WCHAR
szInstallFiles
[]
=
{
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'F'
,
'i'
,
'l'
,
'e'
,
's'
,
0
};
static
const
WCHAR
szRemoveFiles
[]
=
{
'R'
,
'e'
,
'm'
,
'o'
,
'v'
,
'e'
,
'F'
,
'i'
,
'l'
,
'e'
,
's'
,
0
};
static
const
WCHAR
szFindRelatedProducts
[]
=
{
'F'
,
'i'
,
'n'
,
'd'
,
'R'
,
'e'
,
'l'
,
'a'
,
't'
,
'e'
,
'd'
,
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
's'
,
0
};
static
const
WCHAR
szAllUsers
[]
=
{
'A'
,
'L'
,
'L'
,
'U'
,
'S'
,
'E'
,
'R'
,
'S'
,
0
};
static
const
WCHAR
szCustomActionData
[]
=
{
'C'
,
'u'
,
's'
,
't'
,
'o'
,
'm'
,
'A'
,
'c'
,
't'
,
'i'
,
'o'
,
'n'
,
'D'
,
'a'
,
't'
,
'a'
,
0
};
static
const
WCHAR
szUILevel
[]
=
{
'U'
,
'I'
,
'L'
,
'e'
,
'v'
,
'e'
,
'l'
,
0
};
/* memory allocation macro functions */
static
void
*
msi_alloc
(
size_t
len
)
__WINE_ALLOC_SIZE
(
1
);
...
...
dlls/msi/package.c
View file @
843382f2
...
...
@@ -150,9 +150,6 @@ UINT msi_clone_properties(MSIPACKAGE *package)
*/
static
UINT
set_installed_prop
(
MSIPACKAGE
*
package
)
{
static
const
WCHAR
szInstalled
[]
=
{
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'e'
,
'd'
,
0
};
WCHAR
val
[
2
]
=
{
'1'
,
0
};
HKEY
hkey
=
0
;
UINT
r
;
...
...
@@ -160,7 +157,7 @@ static UINT set_installed_prop( MSIPACKAGE *package )
if
(
r
==
ERROR_SUCCESS
)
{
RegCloseKey
(
hkey
);
MSI_SetPropertyW
(
package
,
szInstalled
,
val
);
MSI_SetPropertyW
(
package
,
szInstalled
,
szOne
);
}
return
r
;
...
...
@@ -175,8 +172,6 @@ static UINT set_user_sid_prop( MSIPACKAGE *package )
PSID
psid
=
NULL
;
UINT
r
=
ERROR_FUNCTION_FAILED
;
static
const
WCHAR
user_sid
[]
=
{
'U'
,
's'
,
'e'
,
'r'
,
'S'
,
'I'
,
'D'
,
0
};
size
=
0
;
GetUserNameW
(
NULL
,
&
size
);
...
...
@@ -205,7 +200,7 @@ static UINT set_user_sid_prop( MSIPACKAGE *package )
if
(
!
ConvertSidToStringSidW
(
psid
,
&
sid_str
))
goto
done
;
r
=
MSI_SetPropertyW
(
package
,
user_sid
,
sid_str
);
r
=
MSI_SetPropertyW
(
package
,
szUserSID
,
sid_str
);
done:
LocalFree
(
sid_str
);
...
...
@@ -226,7 +221,6 @@ static LPWSTR get_fusion_filename(MSIPACKAGE *package)
WCHAR
name
[
MAX_PATH
];
WCHAR
windir
[
MAX_PATH
];
static
const
WCHAR
backslash
[]
=
{
'\\'
,
0
};
static
const
WCHAR
fusion
[]
=
{
'f'
,
'u'
,
's'
,
'i'
,
'o'
,
'n'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
};
static
const
WCHAR
sub
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
...
...
@@ -265,10 +259,10 @@ static LPWSTR get_fusion_filename(MSIPACKAGE *package)
}
lstrcpyW
(
check
,
windir
);
lstrcatW
(
check
,
backs
lash
);
lstrcatW
(
check
,
szBackS
lash
);
lstrcatW
(
check
,
subdir
);
lstrcatW
(
check
,
name
);
lstrcatW
(
check
,
backs
lash
);
lstrcatW
(
check
,
szBackS
lash
);
lstrcatW
(
check
,
fusion
);
if
(
GetFileAttributesW
(
check
)
!=
INVALID_FILE_ATTRIBUTES
)
...
...
@@ -360,7 +354,6 @@ static VOID set_installer_properties(MSIPACKAGE *package)
SYSTEMTIME
systemtime
;
LANGID
langid
;
static
const
WCHAR
cszbs
[]
=
{
'\\'
,
0
};
static
const
WCHAR
CFF
[]
=
{
'C'
,
'o'
,
'm'
,
'm'
,
'o'
,
'n'
,
'F'
,
'i'
,
'l'
,
'e'
,
's'
,
'F'
,
'o'
,
'l'
,
'd'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
PFF
[]
=
...
...
@@ -407,8 +400,6 @@ static VOID set_installer_properties(MSIPACKAGE *package)
{
'A'
,
'd'
,
'm'
,
'i'
,
'n'
,
'U'
,
's'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
szPriv
[]
=
{
'P'
,
'r'
,
'i'
,
'v'
,
'i'
,
'l'
,
'e'
,
'g'
,
'e'
,
'd'
,
0
};
static
const
WCHAR
szOne
[]
=
{
'1'
,
0
};
static
const
WCHAR
v9x
[]
=
{
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
'9'
,
'X'
,
0
};
static
const
WCHAR
vNT
[]
=
{
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
'N'
,
'T'
,
0
};
static
const
WCHAR
szMsiNTProductType
[]
=
{
'M'
,
's'
,
'i'
,
'N'
,
'T'
,
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
'T'
,
'y'
,
'p'
,
'e'
,
0
};
...
...
@@ -465,76 +456,76 @@ static VOID set_installer_properties(MSIPACKAGE *package)
*/
SHGetFolderPathW
(
NULL
,
CSIDL_PROGRAM_FILES_COMMON
,
NULL
,
0
,
pth
);
strcatW
(
pth
,
cszbs
);
strcatW
(
pth
,
szBackSlash
);
MSI_SetPropertyW
(
package
,
CFF
,
pth
);
SHGetFolderPathW
(
NULL
,
CSIDL_PROGRAM_FILES
,
NULL
,
0
,
pth
);
strcatW
(
pth
,
cszbs
);
strcatW
(
pth
,
szBackSlash
);
MSI_SetPropertyW
(
package
,
PFF
,
pth
);
SHGetFolderPathW
(
NULL
,
CSIDL_COMMON_APPDATA
,
NULL
,
0
,
pth
);
strcatW
(
pth
,
cszbs
);
strcatW
(
pth
,
szBackSlash
);
MSI_SetPropertyW
(
package
,
CADF
,
pth
);
SHGetFolderPathW
(
NULL
,
CSIDL_FAVORITES
,
NULL
,
0
,
pth
);
strcatW
(
pth
,
cszbs
);
strcatW
(
pth
,
szBackSlash
);
MSI_SetPropertyW
(
package
,
FaF
,
pth
);
SHGetFolderPathW
(
NULL
,
CSIDL_FONTS
,
NULL
,
0
,
pth
);
strcatW
(
pth
,
cszbs
);
strcatW
(
pth
,
szBackSlash
);
MSI_SetPropertyW
(
package
,
FoF
,
pth
);
SHGetFolderPathW
(
NULL
,
CSIDL_SENDTO
,
NULL
,
0
,
pth
);
strcatW
(
pth
,
cszbs
);
strcatW
(
pth
,
szBackSlash
);
MSI_SetPropertyW
(
package
,
SendTF
,
pth
);
SHGetFolderPathW
(
NULL
,
CSIDL_STARTMENU
,
NULL
,
0
,
pth
);
strcatW
(
pth
,
cszbs
);
strcatW
(
pth
,
szBackSlash
);
MSI_SetPropertyW
(
package
,
SMF
,
pth
);
SHGetFolderPathW
(
NULL
,
CSIDL_STARTUP
,
NULL
,
0
,
pth
);
strcatW
(
pth
,
cszbs
);
strcatW
(
pth
,
szBackSlash
);
MSI_SetPropertyW
(
package
,
StF
,
pth
);
SHGetFolderPathW
(
NULL
,
CSIDL_TEMPLATES
,
NULL
,
0
,
pth
);
strcatW
(
pth
,
cszbs
);
strcatW
(
pth
,
szBackSlash
);
MSI_SetPropertyW
(
package
,
TemplF
,
pth
);
SHGetFolderPathW
(
NULL
,
CSIDL_DESKTOP
,
NULL
,
0
,
pth
);
strcatW
(
pth
,
cszbs
);
strcatW
(
pth
,
szBackSlash
);
MSI_SetPropertyW
(
package
,
DF
,
pth
);
SHGetFolderPathW
(
NULL
,
CSIDL_PROGRAMS
,
NULL
,
0
,
pth
);
strcatW
(
pth
,
cszbs
);
strcatW
(
pth
,
szBackSlash
);
MSI_SetPropertyW
(
package
,
PMF
,
pth
);
SHGetFolderPathW
(
NULL
,
CSIDL_ADMINTOOLS
,
NULL
,
0
,
pth
);
strcatW
(
pth
,
cszbs
);
strcatW
(
pth
,
szBackSlash
);
MSI_SetPropertyW
(
package
,
ATF
,
pth
);
SHGetFolderPathW
(
NULL
,
CSIDL_APPDATA
,
NULL
,
0
,
pth
);
strcatW
(
pth
,
cszbs
);
strcatW
(
pth
,
szBackSlash
);
MSI_SetPropertyW
(
package
,
ADF
,
pth
);
SHGetFolderPathW
(
NULL
,
CSIDL_SYSTEM
,
NULL
,
0
,
pth
);
strcatW
(
pth
,
cszbs
);
strcatW
(
pth
,
szBackSlash
);
MSI_SetPropertyW
(
package
,
SF
,
pth
);
MSI_SetPropertyW
(
package
,
SF16
,
pth
);
SHGetFolderPathW
(
NULL
,
CSIDL_LOCAL_APPDATA
,
NULL
,
0
,
pth
);
strcatW
(
pth
,
cszbs
);
strcatW
(
pth
,
szBackSlash
);
MSI_SetPropertyW
(
package
,
LADF
,
pth
);
SHGetFolderPathW
(
NULL
,
CSIDL_MYPICTURES
,
NULL
,
0
,
pth
);
strcatW
(
pth
,
cszbs
);
strcatW
(
pth
,
szBackSlash
);
MSI_SetPropertyW
(
package
,
MPF
,
pth
);
SHGetFolderPathW
(
NULL
,
CSIDL_PERSONAL
,
NULL
,
0
,
pth
);
strcatW
(
pth
,
cszbs
);
strcatW
(
pth
,
szBackSlash
);
MSI_SetPropertyW
(
package
,
PF
,
pth
);
SHGetFolderPathW
(
NULL
,
CSIDL_WINDOWS
,
NULL
,
0
,
pth
);
strcatW
(
pth
,
cszbs
);
strcatW
(
pth
,
szBackSlash
);
MSI_SetPropertyW
(
package
,
WF
,
pth
);
/* Physical Memory is specified in MB. Using total amount. */
...
...
@@ -788,8 +779,6 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url )
{
static
const
WCHAR
szLevel
[]
=
{
'U'
,
'I'
,
'L'
,
'e'
,
'v'
,
'e'
,
'l'
,
0
};
static
const
WCHAR
szpi
[]
=
{
'%'
,
'i'
,
0
};
static
const
WCHAR
szProductCode
[]
=
{
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
'C'
,
'o'
,
'd'
,
'e'
,
0
};
MSIPACKAGE
*
package
;
WCHAR
uilevel
[
10
];
UINT
r
;
...
...
@@ -843,10 +832,9 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url )
static
LPCWSTR
copy_package_to_temp
(
LPCWSTR
szPackage
,
LPWSTR
filename
)
{
WCHAR
path
[
MAX_PATH
];
static
const
WCHAR
szMSI
[]
=
{
'm'
,
's'
,
'i'
,
0
};
GetTempPathW
(
MAX_PATH
,
path
);
GetTempFileNameW
(
path
,
szM
SI
,
0
,
filename
);
GetTempFileNameW
(
path
,
szM
si
,
0
,
filename
);
if
(
!
CopyFileW
(
szPackage
,
filename
,
FALSE
)
)
{
...
...
@@ -1148,7 +1136,6 @@ INT MSI_ProcessMessage( MSIPACKAGE *package, INSTALLMESSAGE eMessageType,
LPWSTR
tmp
;
WCHAR
number
[
3
];
static
const
WCHAR
format
[]
=
{
'%'
,
'i'
,
':'
,
' '
,
0
};
static
const
WCHAR
space
[]
=
{
' '
,
0
};
sz
=
0
;
MSI_RecordGetStringW
(
record
,
i
,
NULL
,
&
sz
);
sz
+=
4
;
...
...
@@ -1165,7 +1152,7 @@ INT MSI_ProcessMessage( MSIPACKAGE *package, INSTALLMESSAGE eMessageType,
}
strcatW
(
message
,
tmp
);
if
(
msg_field
>
1
)
strcatW
(
message
,
s
pace
);
strcatW
(
message
,
szS
pace
);
msi_free
(
tmp
);
}
...
...
@@ -1526,7 +1513,6 @@ int msi_get_property_int(MSIPACKAGE *package, LPCWSTR prop, int def)
static
UINT
MSI_GetProperty
(
MSIHANDLE
handle
,
LPCWSTR
name
,
awstring
*
szValueBuf
,
LPDWORD
pchValueBuf
)
{
static
const
WCHAR
empty
[]
=
{
0
};
MSIPACKAGE
*
package
;
MSIRECORD
*
row
=
NULL
;
UINT
r
=
ERROR_FUNCTION_FAILED
;
...
...
@@ -1602,7 +1588,7 @@ done:
val
=
MSI_RecordGetString
(
row
,
1
);
if
(
!
val
)
val
=
e
mpty
;
val
=
szE
mpty
;
r
=
msi_strcpy_to_awstring
(
val
,
szValueBuf
,
pchValueBuf
);
...
...
dlls/msi/registry.c
View file @
843382f2
...
...
@@ -416,9 +416,8 @@ DWORD msi_version_str_to_dword(LPCWSTR p)
LONG
msi_reg_set_val_str
(
HKEY
hkey
,
LPCWSTR
name
,
LPCWSTR
value
)
{
static
const
WCHAR
emptyW
[]
=
{
0
};
DWORD
len
;
if
(
!
value
)
value
=
emptyW
;
if
(
!
value
)
value
=
szEmpty
;
len
=
(
lstrlenW
(
value
)
+
1
)
*
sizeof
(
WCHAR
);
return
RegSetValueExW
(
hkey
,
name
,
0
,
REG_SZ
,
(
const
BYTE
*
)
value
,
len
);
}
...
...
@@ -1779,9 +1778,6 @@ static UINT msi_get_patch_state(LPCWSTR prodcode, LPCWSTR usersid,
LONG
res
;
UINT
r
=
ERROR_NO_MORE_ITEMS
;
static
const
WCHAR
szPatches
[]
=
{
'P'
,
'a'
,
't'
,
'c'
,
'h'
,
'e'
,
's'
,
0
};
static
const
WCHAR
szState
[]
=
{
'S'
,
't'
,
'a'
,
't'
,
'e'
,
0
};
*
state
=
MSIPATCHSTATE_INVALID
;
r
=
MSIREG_OpenUserDataProductKey
(
prodcode
,
context
,
...
...
@@ -1830,10 +1826,6 @@ static UINT msi_check_product_patches(LPCWSTR prodcode, LPCWSTR usersid,
LONG
res
;
UINT
temp
,
r
=
ERROR_NO_MORE_ITEMS
;
static
const
WCHAR
szPatches
[]
=
{
'P'
,
'a'
,
't'
,
'c'
,
'h'
,
'e'
,
's'
,
0
};
static
const
WCHAR
szState
[]
=
{
'S'
,
't'
,
'a'
,
't'
,
'e'
,
0
};
static
const
WCHAR
szEmpty
[]
=
{
0
};
if
(
MSIREG_OpenProductKey
(
prodcode
,
usersid
,
context
,
&
prod
,
FALSE
)
!=
ERROR_SUCCESS
)
return
ERROR_NO_MORE_ITEMS
;
...
...
dlls/msi/source.c
View file @
843382f2
...
...
@@ -57,7 +57,6 @@ static UINT OpenSourceKey(LPCWSTR szProduct, HKEY* key, DWORD dwOptions,
{
HKEY
rootkey
=
0
;
UINT
rc
=
ERROR_FUNCTION_FAILED
;
static
const
WCHAR
szSourceList
[]
=
{
'S'
,
'o'
,
'u'
,
'r'
,
'c'
,
'e'
,
'L'
,
'i'
,
's'
,
't'
,
0
};
if
(
context
==
MSIINSTALLCONTEXT_USERUNMANAGED
)
{
...
...
@@ -1096,9 +1095,6 @@ UINT WINAPI MsiSourceListAddSourceExW( LPCWSTR szProduct, LPCWSTR szUserSid,
DWORD
index
;
static
const
WCHAR
fmt
[]
=
{
'%'
,
'i'
,
0
};
static
const
WCHAR
one
[]
=
{
'1'
,
0
};
static
const
WCHAR
backslash
[]
=
{
'\\'
,
0
};
static
const
WCHAR
forwardslash
[]
=
{
'/'
,
0
};
TRACE
(
"%s %s %x %x %s %i
\n
"
,
debugstr_w
(
szProduct
),
debugstr_w
(
szUserSid
),
dwContext
,
dwOptions
,
debugstr_w
(
szSource
),
dwIndex
);
...
...
@@ -1138,7 +1134,7 @@ UINT WINAPI MsiSourceListAddSourceExW( LPCWSTR szProduct, LPCWSTR szUserSid,
return
ERROR_FUNCTION_FAILED
;
}
postfix
=
(
dwOptions
&
MSISOURCETYPE_NETWORK
)
?
backslash
:
forwards
lash
;
postfix
=
(
dwOptions
&
MSISOURCETYPE_NETWORK
)
?
szBackSlash
:
szForwardS
lash
;
if
(
szSource
[
lstrlenW
(
szSource
)
-
1
]
==
*
postfix
)
source
=
strdupW
(
szSource
);
else
...
...
@@ -1158,7 +1154,7 @@ UINT WINAPI MsiSourceListAddSourceExW( LPCWSTR szProduct, LPCWSTR szUserSid,
if
(
count
==
0
)
{
rc
=
RegSetValueExW
(
typekey
,
o
ne
,
0
,
REG_EXPAND_SZ
,
(
LPBYTE
)
source
,
size
);
rc
=
RegSetValueExW
(
typekey
,
szO
ne
,
0
,
REG_EXPAND_SZ
,
(
LPBYTE
)
source
,
size
);
goto
done
;
}
else
if
(
dwIndex
>
count
||
dwIndex
==
0
)
...
...
@@ -1248,7 +1244,6 @@ UINT WINAPI MsiSourceListAddMediaDiskW(LPCWSTR szProduct, LPCWSTR szUserSid,
DWORD
size
;
static
const
WCHAR
fmt
[]
=
{
'%'
,
'i'
,
0
};
static
const
WCHAR
semicolon
[]
=
{
';'
,
0
};
TRACE
(
"%s %s %x %x %i %s %s
\n
"
,
debugstr_w
(
szProduct
),
debugstr_w
(
szUserSid
),
dwContext
,
dwOptions
,
dwDiskId
,
...
...
@@ -1289,7 +1284,7 @@ UINT WINAPI MsiSourceListAddMediaDiskW(LPCWSTR szProduct, LPCWSTR szUserSid,
*
buffer
=
'\0'
;
if
(
szVolumeLabel
)
lstrcpyW
(
buffer
,
szVolumeLabel
);
lstrcatW
(
buffer
,
s
emic
olon
);
lstrcatW
(
buffer
,
s
zSemiC
olon
);
if
(
szDiskPrompt
)
lstrcatW
(
buffer
,
szDiskPrompt
);
RegSetValueExW
(
mediakey
,
szIndex
,
0
,
REG_SZ
,
(
LPBYTE
)
buffer
,
size
);
...
...
dlls/msi/string.c
View file @
843382f2
...
...
@@ -314,9 +314,8 @@ int msi_addstringW( string_table *st, UINT n, const WCHAR *data, int len, UINT r
/* find the string identified by an id - return null if there's none */
const
WCHAR
*
msi_string_lookup_id
(
const
string_table
*
st
,
UINT
id
)
{
static
const
WCHAR
zero
[]
=
{
0
};
if
(
id
==
0
)
return
zero
;
return
szEmpty
;
if
(
id
>=
st
->
maxcount
)
return
NULL
;
...
...
dlls/msi/table.c
View file @
843382f2
...
...
@@ -1189,8 +1189,6 @@ static UINT msi_stream_name( const MSITABLEVIEW *tv, UINT row, LPWSTR *pstname )
type
=
tv
->
columns
[
i
].
type
;
if
(
type
&
MSITYPE_KEY
)
{
static
const
WCHAR
szDot
[]
=
{
'.'
,
0
};
r
=
TABLE_fetch_int
(
view
,
row
,
i
+
1
,
&
ival
);
if
(
r
!=
ERROR_SUCCESS
)
goto
err
;
...
...
@@ -2377,7 +2375,6 @@ static UINT read_raw_int(const BYTE *data, UINT col, UINT bytes)
static
UINT
msi_record_encoded_stream_name
(
const
MSITABLEVIEW
*
tv
,
MSIRECORD
*
rec
,
LPWSTR
*
pstname
)
{
static
const
WCHAR
szDot
[]
=
{
'.'
,
0
};
LPWSTR
stname
=
NULL
,
sval
,
p
;
DWORD
len
;
UINT
i
,
r
;
...
...
dlls/msi/upgrade.c
View file @
843382f2
...
...
@@ -40,10 +40,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
msi
);
extern
const
WCHAR
szFindRelatedProducts
[];
extern
const
WCHAR
szMigrateFeatureStates
[];
extern
const
WCHAR
szRemoveExistingProducts
[];
static
BOOL
check_language
(
DWORD
lang1
,
LPCWSTR
lang2
,
DWORD
attributes
)
{
DWORD
langdword
;
...
...
@@ -65,7 +61,6 @@ static void append_productcode(MSIPACKAGE* package, LPCWSTR action_property,
LPWSTR
prop
;
LPWSTR
newprop
;
DWORD
len
;
static
const
WCHAR
separator
[]
=
{
';'
,
0
};
prop
=
msi_dup_property
(
package
,
action_property
);
if
(
prop
)
...
...
@@ -86,7 +81,7 @@ static void append_productcode(MSIPACKAGE* package, LPCWSTR action_property,
if
(
prop
)
{
strcpyW
(
newprop
,
prop
);
strcatW
(
newprop
,
s
eparator
);
strcatW
(
newprop
,
s
zSemiColon
);
}
else
newprop
[
0
]
=
0
;
...
...
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