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
cd34bfe6
Commit
cd34bfe6
authored
May 02, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
May 02, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Define common strings just once.
parent
46680915
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
55 additions
and
92 deletions
+55
-92
action.c
dlls/msi/action.c
+16
-34
appsearch.c
dlls/msi/appsearch.c
+1
-1
custom.c
dlls/msi/custom.c
+6
-11
dialog.c
dlls/msi/dialog.c
+1
-1
helpers.c
dlls/msi/helpers.c
+5
-7
install.c
dlls/msi/install.c
+1
-5
media.c
dlls/msi/media.c
+3
-3
msi.c
dlls/msi/msi.c
+4
-8
msipriv.h
dlls/msi/msipriv.h
+14
-4
package.c
dlls/msi/package.c
+3
-7
string.c
dlls/msi/string.c
+0
-5
table.c
dlls/msi/table.c
+0
-5
upgrade.c
dlls/msi/upgrade.c
+1
-1
No files found.
dlls/msi/action.c
View file @
cd34bfe6
...
...
@@ -47,16 +47,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi);
/*
* consts and values used
*/
static
const
WCHAR
c_colon
[]
=
{
'C'
,
':'
,
'\\'
,
0
};
static
const
WCHAR
szCreateFolders
[]
=
{
'C'
,
'r'
,
'e'
,
'a'
,
't'
,
'e'
,
'F'
,
'o'
,
'l'
,
'd'
,
'e'
,
'r'
,
's'
,
0
};
static
const
WCHAR
szCostFinalize
[]
=
{
'C'
,
'o'
,
's'
,
't'
,
'F'
,
'i'
,
'n'
,
'a'
,
'l'
,
'i'
,
'z'
,
'e'
,
0
};
static
const
WCHAR
szWriteRegistryValues
[]
=
{
'W'
,
'r'
,
'i'
,
't'
,
'e'
,
'R'
,
'e'
,
'g'
,
'i'
,
's'
,
't'
,
'r'
,
'y'
,
'V'
,
'a'
,
'l'
,
'u'
,
'e'
,
's'
,
0
};
static
const
WCHAR
szCostInitialize
[]
=
{
'C'
,
'o'
,
's'
,
't'
,
'I'
,
'n'
,
'i'
,
't'
,
'i'
,
'a'
,
'l'
,
'i'
,
'z'
,
'e'
,
0
};
static
const
WCHAR
szFileCost
[]
=
{
'F'
,
'i'
,
'l'
,
'e'
,
'C'
,
'o'
,
's'
,
't'
,
0
};
static
const
WCHAR
szInstallInitialize
[]
=
...
...
@@ -362,7 +358,7 @@ UINT msi_parse_command_line( MSIPACKAGE *package, LPCWSTR szCommandLine,
TRACE
(
"Found commandline property %s = %s
\n
"
,
debugstr_w
(
prop
),
debugstr_w
(
val
));
r
=
msi_set_property
(
package
->
db
,
prop
,
val
);
if
(
r
==
ERROR_SUCCESS
&&
!
strcmpW
(
prop
,
c
szSourceDir
))
if
(
r
==
ERROR_SUCCESS
&&
!
strcmpW
(
prop
,
szSourceDir
))
msi_reset_folders
(
package
,
TRUE
);
msi_free
(
val
);
...
...
@@ -1217,18 +1213,18 @@ UINT msi_set_sourcedir_props(MSIPACKAGE *package, BOOL replace)
msi_free
(
db
);
}
check
=
msi_dup_property
(
package
->
db
,
c
szSourceDir
);
check
=
msi_dup_property
(
package
->
db
,
szSourceDir
);
if
(
!
check
||
replace
)
{
UINT
r
=
msi_set_property
(
package
->
db
,
c
szSourceDir
,
source
);
UINT
r
=
msi_set_property
(
package
->
db
,
szSourceDir
,
source
);
if
(
r
==
ERROR_SUCCESS
)
msi_reset_folders
(
package
,
TRUE
);
}
msi_free
(
check
);
check
=
msi_dup_property
(
package
->
db
,
c
szSOURCEDIR
);
check
=
msi_dup_property
(
package
->
db
,
szSOURCEDIR
);
if
(
!
check
||
replace
)
msi_set_property
(
package
->
db
,
c
szSOURCEDIR
,
source
);
msi_set_property
(
package
->
db
,
szSOURCEDIR
,
source
);
msi_free
(
check
);
msi_free
(
source
);
...
...
@@ -1364,7 +1360,7 @@ static UINT ACTION_ProcessExecSequence(MSIPACKAGE *package, BOOL UIran)
{
TRACE
(
"Running the actions
\n
"
);
msi_set_property
(
package
->
db
,
c
szSourceDir
,
NULL
);
msi_set_property
(
package
->
db
,
szSourceDir
,
NULL
);
rc
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_Actions
,
package
);
msiobj_release
(
&
view
->
hdr
);
...
...
@@ -2158,7 +2154,7 @@ static UINT load_all_folders( MSIPACKAGE *package )
static
UINT
ACTION_CostInitialize
(
MSIPACKAGE
*
package
)
{
msi_set_property
(
package
->
db
,
szCostingComplete
,
szZero
);
msi_set_property
(
package
->
db
,
cszRootDrive
,
c_colon
);
msi_set_property
(
package
->
db
,
szRootDrive
,
szCRoot
);
load_all_folders
(
package
);
load_all_components
(
package
);
...
...
@@ -2346,14 +2342,12 @@ static BOOL process_overrides( MSIPACKAGE *package, int level )
UINT
MSI_SetFeatureStates
(
MSIPACKAGE
*
package
)
{
int
level
;
static
const
WCHAR
szlevel
[]
=
{
'I'
,
'N'
,
'S'
,
'T'
,
'A'
,
'L'
,
'L'
,
'L'
,
'E'
,
'V'
,
'E'
,
'L'
,
0
};
MSICOMPONENT
*
component
;
MSIFEATURE
*
feature
;
TRACE
(
"Checking Install Level
\n
"
);
level
=
msi_get_property_int
(
package
->
db
,
sz
l
evel
,
1
);
level
=
msi_get_property_int
(
package
->
db
,
sz
InstallL
evel
,
1
);
if
(
!
msi_get_property_int
(
package
->
db
,
szPreselected
,
0
))
{
...
...
@@ -2811,11 +2805,11 @@ void msi_resolve_target_folder( MSIPACKAGE *package, const WCHAR *name, BOOL loa
if
(
!
(
folder
=
get_loaded_folder
(
package
,
name
)))
return
;
if
(
!
strcmpW
(
folder
->
Directory
,
c
szTargetDir
))
/* special resolving for target root dir */
if
(
!
strcmpW
(
folder
->
Directory
,
szTargetDir
))
/* special resolving for target root dir */
{
if
(
!
load_prop
||
!
(
path
=
msi_dup_property
(
package
->
db
,
c
szTargetDir
)))
if
(
!
load_prop
||
!
(
path
=
msi_dup_property
(
package
->
db
,
szTargetDir
)))
{
path
=
msi_dup_property
(
package
->
db
,
c
szRootDrive
);
path
=
msi_dup_property
(
package
->
db
,
szRootDrive
);
}
}
else
if
(
!
load_prop
||
!
(
path
=
msi_dup_property
(
package
->
db
,
folder
->
Directory
)))
...
...
@@ -2840,8 +2834,6 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
{
static
const
WCHAR
condition_query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'C'
,
'o'
,
'n'
,
'd'
,
'i'
,
't'
,
'i'
,
'o'
,
'n'
,
'`'
,
0
};
static
const
WCHAR
szlevel
[]
=
{
'I'
,
'N'
,
'S'
,
'T'
,
'A'
,
'L'
,
'L'
,
'L'
,
'E'
,
'V'
,
'E'
,
'L'
,
0
};
static
const
WCHAR
szOutOfDiskSpace
[]
=
{
'O'
,
'u'
,
't'
,
'O'
,
'f'
,
'D'
,
'i'
,
's'
,
'k'
,
'S'
,
'p'
,
'a'
,
'c'
,
'e'
,
0
};
MSICOMPONENT
*
comp
;
...
...
@@ -2850,7 +2842,7 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
LPWSTR
level
;
TRACE
(
"Building directory properties
\n
"
);
msi_resolve_target_folder
(
package
,
c
szTargetDir
,
TRUE
);
msi_resolve_target_folder
(
package
,
szTargetDir
,
TRUE
);
TRACE
(
"Evaluating component conditions
\n
"
);
LIST_FOR_EACH_ENTRY
(
comp
,
&
package
->
components
,
MSICOMPONENT
,
entry
)
...
...
@@ -2868,7 +2860,7 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
ACTION_GetComponentInstallStates
(
package
);
ACTION_GetFeatureInstallStates
(
package
);
if
(
!
process_overrides
(
package
,
msi_get_property_int
(
package
->
db
,
sz
l
evel
,
1
)
))
if
(
!
process_overrides
(
package
,
msi_get_property_int
(
package
->
db
,
sz
InstallL
evel
,
1
)
))
{
TRACE
(
"Evaluating feature conditions
\n
"
);
...
...
@@ -2885,9 +2877,9 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
msi_set_property
(
package
->
db
,
szCostingComplete
,
szOne
);
/* set default run level if not set */
level
=
msi_dup_property
(
package
->
db
,
sz
l
evel
);
level
=
msi_dup_property
(
package
->
db
,
sz
InstallL
evel
);
if
(
!
level
)
msi_set_property
(
package
->
db
,
sz
l
evel
,
szOne
);
msi_set_property
(
package
->
db
,
sz
InstallL
evel
,
szOne
);
msi_free
(
level
);
/* FIXME: check volume disk space */
...
...
@@ -4460,12 +4452,8 @@ static UINT msi_publish_product_properties(MSIPACKAGE *package, HKEY hkey)
DWORD
size
;
UINT
r
;
static
const
WCHAR
szProductLanguage
[]
=
{
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
'L'
,
'a'
,
'n'
,
'g'
,
'u'
,
'a'
,
'g'
,
'e'
,
0
};
static
const
WCHAR
szARPProductIcon
[]
=
{
'A'
,
'R'
,
'P'
,
'P'
,
'R'
,
'O'
,
'D'
,
'U'
,
'C'
,
'T'
,
'I'
,
'C'
,
'O'
,
'N'
,
0
};
static
const
WCHAR
szProductVersion
[]
=
{
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
szAssignment
[]
=
{
'A'
,
's'
,
's'
,
'i'
,
'g'
,
'n'
,
'm'
,
'e'
,
'n'
,
't'
,
0
};
static
const
WCHAR
szAdvertiseFlags
[]
=
...
...
@@ -5324,8 +5312,6 @@ static UINT msi_publish_install_properties(MSIPACKAGE *package, HKEY hkey)
const
WCHAR
*
prop
,
*
key
;
static
const
WCHAR
date_fmt
[]
=
{
'%'
,
'i'
,
'%'
,
'0'
,
'2'
,
'i'
,
'%'
,
'0'
,
'2'
,
'i'
,
0
};
static
const
WCHAR
szWindowsInstaller
[]
=
{
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
modpath_fmt
[]
=
{
'M'
,
's'
,
'i'
,
'E'
,
'x'
,
'e'
,
'c'
,
'.'
,
'e'
,
'x'
,
'e'
,
' '
,
'/'
,
'I'
,
'['
,
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
'C'
,
'o'
,
'd'
,
'e'
,
']'
,
0
};
...
...
@@ -5335,10 +5321,6 @@ static UINT msi_publish_install_properties(MSIPACKAGE *package, HKEY hkey)
{
'U'
,
'n'
,
'i'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'S'
,
't'
,
'r'
,
'i'
,
'n'
,
'g'
,
0
};
static
const
WCHAR
szEstimatedSize
[]
=
{
'E'
,
's'
,
't'
,
'i'
,
'm'
,
'a'
,
't'
,
'e'
,
'd'
,
'S'
,
'i'
,
'z'
,
'e'
,
0
};
static
const
WCHAR
szProductLanguage
[]
=
{
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
'L'
,
'a'
,
'n'
,
'g'
,
'u'
,
'a'
,
'g'
,
'e'
,
0
};
static
const
WCHAR
szProductVersion
[]
=
{
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
szDisplayVersion
[]
=
{
'D'
,
'i'
,
's'
,
'p'
,
'l'
,
'a'
,
'y'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
szInstallSource
[]
=
...
...
@@ -5400,7 +5382,7 @@ static UINT msi_publish_install_properties(MSIPACKAGE *package, HKEY hkey)
szARPHELPLINK
,
szHelpLink
,
szARPHELPTELEPHONE
,
szHelpTelephone
,
szARPINSTALLLOCATION
,
szInstallLocation
,
cszSourceDir
,
szInstallSource
,
szSourceDir
,
szInstallSource
,
szManufacturer
,
szPublisher
,
szARPREADME
,
szReadme
,
szARPSIZE
,
szSize
,
...
...
dlls/msi/appsearch.c
View file @
cd34bfe6
...
...
@@ -1053,7 +1053,7 @@ static UINT iterate_appsearch(MSIRECORD *row, LPVOID param)
if
(
value
)
{
r
=
msi_set_property
(
package
->
db
,
propName
,
value
);
if
(
r
==
ERROR_SUCCESS
&&
!
strcmpW
(
propName
,
c
szSourceDir
))
if
(
r
==
ERROR_SUCCESS
&&
!
strcmpW
(
propName
,
szSourceDir
))
msi_reset_folders
(
package
,
TRUE
);
msi_free
(
value
);
...
...
dlls/msi/custom.c
View file @
cd34bfe6
...
...
@@ -41,8 +41,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
msi
);
#define CUSTOM_ACTION_TYPE_MASK 0x3F
static
const
WCHAR
c_collen
[]
=
{
'C'
,
':'
,
'\\'
,
0
};
static
const
WCHAR
cszTempFolder
[]
=
{
'T'
,
'e'
,
'm'
,
'p'
,
'F'
,
'o'
,
'l'
,
'd'
,
'e'
,
'r'
,
0
};
typedef
struct
tagMSIRUNNINGACTION
{
...
...
@@ -326,7 +324,7 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL
deformat_string
(
package
,
target
,
&
deformated
);
rc
=
msi_set_property
(
package
->
db
,
source
,
deformated
);
if
(
rc
==
ERROR_SUCCESS
&&
!
strcmpW
(
source
,
c
szSourceDir
))
if
(
rc
==
ERROR_SUCCESS
&&
!
strcmpW
(
source
,
szSourceDir
))
msi_reset_folders
(
package
,
TRUE
);
msi_free
(
deformated
);
break
;
...
...
@@ -375,7 +373,7 @@ static MSIBINARY *create_temp_binary( MSIPACKAGE *package, LPCWSTR source, BOOL
DWORD
sz
=
MAX_PATH
,
write
;
UINT
r
;
if
(
msi_get_property
(
package
->
db
,
c
szTempFolder
,
fmt
,
&
sz
)
!=
ERROR_SUCCESS
)
if
(
msi_get_property
(
package
->
db
,
szTempFolder
,
fmt
,
&
sz
)
!=
ERROR_SUCCESS
)
GetTempPathW
(
MAX_PATH
,
fmt
);
if
(
!
GetTempFileNameW
(
fmt
,
szMsi
,
0
,
tmpfile
))
...
...
@@ -892,7 +890,7 @@ static UINT HANDLE_CustomType23(MSIPACKAGE *package, LPCWSTR source,
UINT
r
;
size
=
MAX_PATH
;
msi_get_property
(
package
->
db
,
c
szSourceDir
,
package_path
,
&
size
);
msi_get_property
(
package
->
db
,
szSourceDir
,
package_path
,
&
size
);
lstrcatW
(
package_path
,
szBackSlash
);
lstrcatW
(
package_path
,
source
);
...
...
@@ -960,8 +958,7 @@ static UINT HANDLE_CustomType2(MSIPACKAGE *package, LPCWSTR source,
TRACE
(
"executing exe %s
\n
"
,
debugstr_w
(
cmd
));
rc
=
CreateProcessW
(
NULL
,
cmd
,
NULL
,
NULL
,
FALSE
,
0
,
NULL
,
c_collen
,
&
si
,
&
info
);
rc
=
CreateProcessW
(
NULL
,
cmd
,
NULL
,
NULL
,
FALSE
,
0
,
NULL
,
szCRoot
,
&
si
,
&
info
);
msi_free
(
cmd
);
if
(
!
rc
)
...
...
@@ -1037,8 +1034,7 @@ static UINT HANDLE_CustomType18(MSIPACKAGE *package, LPCWSTR source,
TRACE
(
"executing exe %s
\n
"
,
debugstr_w
(
cmd
));
rc
=
CreateProcessW
(
NULL
,
cmd
,
NULL
,
NULL
,
FALSE
,
0
,
NULL
,
c_collen
,
&
si
,
&
info
);
rc
=
CreateProcessW
(
NULL
,
cmd
,
NULL
,
NULL
,
FALSE
,
0
,
NULL
,
szCRoot
,
&
si
,
&
info
);
if
(
!
rc
)
{
...
...
@@ -1121,8 +1117,7 @@ static UINT HANDLE_CustomType50(MSIPACKAGE *package, LPCWSTR source,
TRACE
(
"executing exe %s
\n
"
,
debugstr_w
(
cmd
));
rc
=
CreateProcessW
(
NULL
,
cmd
,
NULL
,
NULL
,
FALSE
,
0
,
NULL
,
c_collen
,
&
si
,
&
info
);
rc
=
CreateProcessW
(
NULL
,
cmd
,
NULL
,
NULL
,
FALSE
,
0
,
NULL
,
szCRoot
,
&
si
,
&
info
);
if
(
!
rc
)
{
...
...
dlls/msi/dialog.c
View file @
cd34bfe6
...
...
@@ -585,7 +585,7 @@ static void msi_dialog_update_controls( msi_dialog *dialog, LPCWSTR property )
static
void
msi_dialog_set_property
(
MSIPACKAGE
*
package
,
LPCWSTR
property
,
LPCWSTR
value
)
{
UINT
r
=
msi_set_property
(
package
->
db
,
property
,
value
);
if
(
r
==
ERROR_SUCCESS
&&
!
strcmpW
(
property
,
c
szSourceDir
))
if
(
r
==
ERROR_SUCCESS
&&
!
strcmpW
(
property
,
szSourceDir
))
msi_reset_folders
(
package
,
TRUE
);
}
...
...
dlls/msi/helpers.c
View file @
cd34bfe6
...
...
@@ -34,8 +34,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
msi
);
static
const
WCHAR
cszDatabase
[]
=
{
'D'
,
'A'
,
'T'
,
'A'
,
'B'
,
'A'
,
'S'
,
'E'
,
0
};
LPWSTR
build_icon_path
(
MSIPACKAGE
*
package
,
LPCWSTR
icon_name
)
{
LPWSTR
SystemFolder
,
dest
,
FilePath
;
...
...
@@ -183,11 +181,11 @@ static LPWSTR get_source_root( MSIPACKAGE *package )
{
LPWSTR
path
,
p
;
path
=
msi_dup_property
(
package
->
db
,
c
szSourceDir
);
path
=
msi_dup_property
(
package
->
db
,
szSourceDir
);
if
(
path
)
return
path
;
path
=
msi_dup_property
(
package
->
db
,
c
szDatabase
);
path
=
msi_dup_property
(
package
->
db
,
szDatabase
);
if
(
path
)
{
p
=
strrchrW
(
path
,
'\\'
);
...
...
@@ -229,15 +227,15 @@ LPWSTR resolve_source_folder( MSIPACKAGE *package, LPCWSTR name, MSIFOLDER **fol
TRACE
(
"working to resolve %s
\n
"
,
debugstr_w
(
name
));
if
(
!
strcmpW
(
name
,
c
szSourceDir
))
name
=
c
szTargetDir
;
if
(
!
strcmpW
(
name
,
szSourceDir
))
name
=
szTargetDir
;
f
=
get_loaded_folder
(
package
,
name
);
if
(
!
f
)
return
NULL
;
/* special resolving for Target and Source root dir */
if
(
!
strcmpW
(
name
,
c
szTargetDir
))
if
(
!
strcmpW
(
name
,
szTargetDir
))
{
if
(
!
f
->
ResolvedSource
)
f
->
ResolvedSource
=
get_source_root
(
package
);
...
...
dlls/msi/install.c
View file @
cd34bfe6
...
...
@@ -1292,9 +1292,7 @@ LANGID WINAPI MsiGetLanguage(MSIHANDLE hInstall)
{
MSIPACKAGE
*
package
;
LANGID
langid
;
static
const
WCHAR
szProductLanguage
[]
=
{
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
'L'
,
'a'
,
'n'
,
'g'
,
'u'
,
'a'
,
'g'
,
'e'
,
0
};
package
=
msihandle2msiinfo
(
hInstall
,
MSIHANDLETYPE_PACKAGE
);
if
(
!
package
)
{
...
...
@@ -1321,8 +1319,6 @@ LANGID WINAPI MsiGetLanguage(MSIHANDLE hInstall)
UINT
MSI_SetInstallLevel
(
MSIPACKAGE
*
package
,
int
iInstallLevel
)
{
static
const
WCHAR
szInstallLevel
[]
=
{
'I'
,
'N'
,
'S'
,
'T'
,
'A'
,
'L'
,
'L'
,
'L'
,
'E'
,
'V'
,
'E'
,
'L'
,
0
};
static
const
WCHAR
fmt
[]
=
{
'%'
,
'd'
,
0
};
WCHAR
level
[
6
];
UINT
r
;
...
...
dlls/msi/media.c
View file @
cd34bfe6
...
...
@@ -85,7 +85,7 @@ static UINT msi_change_media(MSIPACKAGE *package, MSIMEDIAINFO *mi)
error
=
generate_error_string
(
package
,
1302
,
1
,
mi
->
disk_prompt
);
error_dialog
=
msi_dup_property
(
package
->
db
,
error_prop
);
source_dir
=
msi_dup_property
(
package
->
db
,
c
szSourceDir
);
source_dir
=
msi_dup_property
(
package
->
db
,
szSourceDir
);
while
(
r
==
ERROR_SUCCESS
&&
!
source_matches_volume
(
mi
,
source_dir
))
{
...
...
@@ -702,7 +702,7 @@ UINT msi_load_media_info(MSIPACKAGE *package, UINT Sequence, MSIMEDIAINFO *mi)
mi
->
first_volume
=
strdupW
(
mi
->
volume_label
);
msi_set_sourcedir_props
(
package
,
FALSE
);
source_dir
=
msi_dup_property
(
package
->
db
,
c
szSourceDir
);
source_dir
=
msi_dup_property
(
package
->
db
,
szSourceDir
);
lstrcpyW
(
mi
->
sourcedir
,
source_dir
);
mi
->
type
=
get_drive_type
(
source_dir
);
...
...
@@ -869,7 +869,7 @@ UINT ready_media(MSIPACKAGE *package, UINT Sequence, BOOL IsCompressed, MSIMEDIA
if
(
mi
->
volume_label
&&
mi
->
disk_id
>
1
&&
strcmpW
(
mi
->
first_volume
,
mi
->
volume_label
))
{
LPWSTR
source
=
msi_dup_property
(
package
->
db
,
c
szSourceDir
);
LPWSTR
source
=
msi_dup_property
(
package
->
db
,
szSourceDir
);
BOOL
matches
;
matches
=
source_matches_volume
(
mi
,
source
);
...
...
dlls/msi/msi.c
View file @
cd34bfe6
...
...
@@ -685,7 +685,7 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel,
static
const
WCHAR
szInstalled
[]
=
{
' '
,
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'e'
,
'd'
,
'='
,
'1'
,
0
};
static
const
WCHAR
szInstallLevel
[]
=
{
static
const
WCHAR
sz
Max
InstallLevel
[]
=
{
' '
,
'I'
,
'N'
,
'S'
,
'T'
,
'A'
,
'L'
,
'L'
,
'L'
,
'E'
,
'V'
,
'E'
,
'L'
,
'='
,
'3'
,
'2'
,
'7'
,
'6'
,
'7'
,
0
};
static
const
WCHAR
szRemoveAll
[]
=
{
' '
,
'R'
,
'E'
,
'M'
,
'O'
,
'V'
,
'E'
,
'='
,
'A'
,
'L'
,
'L'
,
0
};
...
...
@@ -719,7 +719,7 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel,
sz
+=
lstrlenW
(
szCommandLine
);
if
(
eInstallState
!=
INSTALLSTATE_DEFAULT
)
sz
+=
lstrlenW
(
szInstallLevel
);
sz
+=
lstrlenW
(
sz
Max
InstallLevel
);
if
(
eInstallState
==
INSTALLSTATE_ABSENT
)
sz
+=
lstrlenW
(
szRemoveAll
);
...
...
@@ -739,7 +739,7 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel,
lstrcpyW
(
commandline
,
szCommandLine
);
if
(
eInstallState
!=
INSTALLSTATE_DEFAULT
)
lstrcatW
(
commandline
,
szInstallLevel
);
lstrcatW
(
commandline
,
sz
Max
InstallLevel
);
if
(
eInstallState
==
INSTALLSTATE_ABSENT
)
lstrcatW
(
commandline
,
szRemoveAll
);
...
...
@@ -2098,9 +2098,6 @@ INSTALLSTATE WINAPI MsiQueryProductStateW(LPCWSTR szProduct)
DWORD
val
;
UINT
r
;
static
const
WCHAR
szWindowsInstaller
[]
=
{
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'e'
,
'r'
,
0
};
TRACE
(
"%s
\n
"
,
debugstr_w
(
szProduct
));
if
(
!
szProduct
||
!*
szProduct
)
...
...
@@ -3554,7 +3551,6 @@ end:
*/
UINT
WINAPI
MsiConfigureFeatureW
(
LPCWSTR
szProduct
,
LPCWSTR
szFeature
,
INSTALLSTATE
eInstallState
)
{
static
const
WCHAR
szCostInit
[]
=
{
'C'
,
'o'
,
's'
,
't'
,
'I'
,
'n'
,
'i'
,
't'
,
'i'
,
'a'
,
'l'
,
'i'
,
'z'
,
'e'
,
0
};
MSIPACKAGE
*
package
=
NULL
;
UINT
r
;
WCHAR
sourcepath
[
MAX_PATH
],
filename
[
MAX_PATH
];
...
...
@@ -3596,7 +3592,7 @@ UINT WINAPI MsiConfigureFeatureW(LPCWSTR szProduct, LPCWSTR szFeature, INSTALLST
MsiSetInternalUI
(
INSTALLUILEVEL_BASIC
,
NULL
);
r
=
ACTION_PerformUIAction
(
package
,
szCostInit
,
-
1
);
r
=
ACTION_PerformUIAction
(
package
,
szCostInit
ialize
,
-
1
);
if
(
r
!=
ERROR_SUCCESS
)
goto
end
;
...
...
dlls/msi/msipriv.h
View file @
cd34bfe6
...
...
@@ -1049,10 +1049,10 @@ extern void ui_progress(MSIPACKAGE *, int, int, int, int) DECLSPEC_HIDDEN;
extern
void
ui_actiondata
(
MSIPACKAGE
*
,
LPCWSTR
,
MSIRECORD
*
)
DECLSPEC_HIDDEN
;
/* common strings */
static
const
WCHAR
c
szSourceDir
[]
=
{
'S'
,
'o'
,
'u'
,
'r'
,
'c'
,
'e'
,
'D'
,
'i'
,
'r'
,
0
};
static
const
WCHAR
c
szSOURCEDIR
[]
=
{
'S'
,
'O'
,
'U'
,
'R'
,
'C'
,
'E'
,
'D'
,
'I'
,
'R'
,
0
};
static
const
WCHAR
c
szRootDrive
[]
=
{
'R'
,
'O'
,
'O'
,
'T'
,
'D'
,
'R'
,
'I'
,
'V'
,
'E'
,
0
};
static
const
WCHAR
c
szTargetDir
[]
=
{
'T'
,
'A'
,
'R'
,
'G'
,
'E'
,
'T'
,
'D'
,
'I'
,
'R'
,
0
};
static
const
WCHAR
szSourceDir
[]
=
{
'S'
,
'o'
,
'u'
,
'r'
,
'c'
,
'e'
,
'D'
,
'i'
,
'r'
,
0
};
static
const
WCHAR
szSOURCEDIR
[]
=
{
'S'
,
'O'
,
'U'
,
'R'
,
'C'
,
'E'
,
'D'
,
'I'
,
'R'
,
0
};
static
const
WCHAR
szRootDrive
[]
=
{
'R'
,
'O'
,
'O'
,
'T'
,
'D'
,
'R'
,
'I'
,
'V'
,
'E'
,
0
};
static
const
WCHAR
szTargetDir
[]
=
{
'T'
,
'A'
,
'R'
,
'G'
,
'E'
,
'T'
,
'D'
,
'I'
,
'R'
,
0
};
static
const
WCHAR
szLocalSid
[]
=
{
'S'
,
'-'
,
'1'
,
'-'
,
'5'
,
'-'
,
'1'
,
'8'
,
0
};
static
const
WCHAR
szEmpty
[]
=
{
0
};
static
const
WCHAR
szAll
[]
=
{
'A'
,
'L'
,
'L'
,
0
};
...
...
@@ -1130,6 +1130,16 @@ static const WCHAR szStreams[] = {'_','S','t','r','e','a','m','s',0};
static
const
WCHAR
szStorages
[]
=
{
'_'
,
'S'
,
't'
,
'o'
,
'r'
,
'a'
,
'g'
,
'e'
,
's'
,
0
};
static
const
WCHAR
szMsiPublishAssemblies
[]
=
{
'M'
,
's'
,
'i'
,
'P'
,
'u'
,
'b'
,
'l'
,
'i'
,
's'
,
'h'
,
'A'
,
's'
,
's'
,
'e'
,
'm'
,
'b'
,
'l'
,
'i'
,
'e'
,
's'
,
0
};
static
const
WCHAR
szCostingComplete
[]
=
{
'C'
,
'o'
,
's'
,
't'
,
'i'
,
'n'
,
'g'
,
'C'
,
'o'
,
'm'
,
'p'
,
'l'
,
'e'
,
't'
,
'e'
,
0
};
static
const
WCHAR
szTempFolder
[]
=
{
'T'
,
'e'
,
'm'
,
'p'
,
'F'
,
'o'
,
'l'
,
'd'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
szDatabase
[]
=
{
'D'
,
'A'
,
'T'
,
'A'
,
'B'
,
'A'
,
'S'
,
'E'
,
0
};
static
const
WCHAR
szCRoot
[]
=
{
'C'
,
':'
,
'\\'
,
0
};
static
const
WCHAR
szProductLanguage
[]
=
{
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
'L'
,
'a'
,
'n'
,
'g'
,
'u'
,
'a'
,
'g'
,
'e'
,
0
};
static
const
WCHAR
szProductVersion
[]
=
{
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
szWindowsInstaller
[]
=
{
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
szStringData
[]
=
{
'_'
,
'S'
,
't'
,
'r'
,
'i'
,
'n'
,
'g'
,
'D'
,
'a'
,
't'
,
'a'
,
0
};
static
const
WCHAR
szStringPool
[]
=
{
'_'
,
'S'
,
't'
,
'r'
,
'i'
,
'n'
,
'g'
,
'P'
,
'o'
,
'o'
,
'l'
,
0
};
static
const
WCHAR
szInstallLevel
[]
=
{
'I'
,
'N'
,
'S'
,
'T'
,
'A'
,
'L'
,
'L'
,
'L'
,
'E'
,
'V'
,
'E'
,
'L'
,
0
};
static
const
WCHAR
szCostInitialize
[]
=
{
'C'
,
'o'
,
's'
,
't'
,
'I'
,
'n'
,
'i'
,
't'
,
'i'
,
'a'
,
'l'
,
'i'
,
'z'
,
'e'
,
0
};
/* memory allocation macro functions */
static
void
*
msi_alloc
(
size_t
len
)
__WINE_ALLOC_SIZE
(
1
);
...
...
dlls/msi/package.c
View file @
cd34bfe6
...
...
@@ -690,9 +690,7 @@ static VOID set_installer_properties(MSIPACKAGE *package)
static
const
WCHAR
szLocalAppDataFolder
[]
=
{
'L'
,
'o'
,
'c'
,
'a'
,
'l'
,
'A'
,
'p'
,
'p'
,
'D'
,
'a'
,
't'
,
'a'
,
'F'
,
'o'
,
'l'
,
'd'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
szMyPicturesFolder
[]
=
{
'M'
,
'y'
,
'P'
,
'i'
,
'c'
,
't'
,
'u'
,
'r'
,
'e'
,
's'
,
'F'
,
'o'
,
'l'
,
'd'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
szPersonalFolder
[]
=
{
'P'
,
'e'
,
'r'
,
's'
,
'o'
,
'n'
,
'a'
,
'l'
,
'F'
,
'o'
,
'l'
,
'd'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
szWindowsFolder
[]
=
{
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
'F'
,
'o'
,
'l'
,
'd'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
szWindowsVolume
[]
=
{
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
'V'
,
'o'
,
'l'
,
'u'
,
'm'
,
'e'
,
0
};
static
const
WCHAR
szTempFolder
[]
=
{
'T'
,
'e'
,
'm'
,
'p'
,
'F'
,
'o'
,
'l'
,
'd'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
szPrivileged
[]
=
{
'P'
,
'r'
,
'i'
,
'v'
,
'i'
,
'l'
,
'e'
,
'g'
,
'e'
,
'd'
,
0
};
static
const
WCHAR
szVersion9x
[]
=
{
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
'9'
,
'X'
,
0
};
static
const
WCHAR
szVersionNT
[]
=
{
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
'N'
,
'T'
,
0
};
...
...
@@ -1137,7 +1135,6 @@ void msi_adjust_privilege_properties( MSIPACKAGE *package )
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
};
MSIPACKAGE
*
package
;
WCHAR
uilevel
[
10
];
...
...
@@ -1166,7 +1163,7 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url )
set_installer_properties
(
package
);
sprintfW
(
uilevel
,
szpi
,
gUILevel
);
msi_set_property
(
package
->
db
,
szLevel
,
uilevel
);
msi_set_property
(
package
->
db
,
sz
UI
Level
,
uilevel
);
r
=
msi_load_summary_properties
(
package
);
if
(
r
!=
ERROR_SUCCESS
)
...
...
@@ -1448,7 +1445,6 @@ static UINT validate_package( MSIPACKAGE *package )
UINT
MSI_OpenPackageW
(
LPCWSTR
szPackage
,
MSIPACKAGE
**
pPackage
)
{
static
const
WCHAR
Database
[]
=
{
'D'
,
'A'
,
'T'
,
'A'
,
'B'
,
'A'
,
'S'
,
'E'
,
0
};
static
const
WCHAR
dotmsi
[]
=
{
'.'
,
'm'
,
's'
,
'i'
,
0
};
MSIDATABASE
*
db
=
NULL
;
MSIPACKAGE
*
package
;
...
...
@@ -1581,7 +1577,7 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
msiobj_release
(
&
package
->
hdr
);
return
r
;
}
msi_set_property
(
package
->
db
,
Database
,
db
->
path
);
msi_set_property
(
package
->
db
,
sz
Database
,
db
->
path
);
if
(
UrlIsW
(
szPackage
,
URLIS_URL
)
)
msi_set_property
(
package
->
db
,
szOriginalDatabase
,
szPackage
);
...
...
@@ -2091,7 +2087,7 @@ UINT WINAPI MsiSetPropertyW( MSIHANDLE hInstall, LPCWSTR szName, LPCWSTR szValue
}
ret
=
msi_set_property
(
package
->
db
,
szName
,
szValue
);
if
(
ret
==
ERROR_SUCCESS
&&
!
strcmpW
(
szName
,
c
szSourceDir
))
if
(
ret
==
ERROR_SUCCESS
&&
!
strcmpW
(
szName
,
szSourceDir
))
msi_reset_folders
(
package
,
TRUE
);
msiobj_release
(
&
package
->
hdr
);
...
...
dlls/msi/string.c
View file @
cd34bfe6
...
...
@@ -461,11 +461,6 @@ static void string_totalsize( const string_table *st, UINT *datasize, UINT *pool
TRACE
(
"data %u pool %u codepage %x
\n
"
,
*
datasize
,
*
poolsize
,
st
->
codepage
);
}
static
const
WCHAR
szStringData
[]
=
{
'_'
,
'S'
,
't'
,
'r'
,
'i'
,
'n'
,
'g'
,
'D'
,
'a'
,
't'
,
'a'
,
0
};
static
const
WCHAR
szStringPool
[]
=
{
'_'
,
'S'
,
't'
,
'r'
,
'i'
,
'n'
,
'g'
,
'P'
,
'o'
,
'o'
,
'l'
,
0
};
HRESULT
msi_init_string_table
(
IStorage
*
stg
)
{
USHORT
zero
[
2
]
=
{
0
,
0
};
...
...
dlls/msi/table.c
View file @
cd34bfe6
...
...
@@ -82,11 +82,6 @@ struct tagMSITABLE
WCHAR
name
[
1
];
};
static
const
WCHAR
szStringData
[]
=
{
'_'
,
'S'
,
't'
,
'r'
,
'i'
,
'n'
,
'g'
,
'D'
,
'a'
,
't'
,
'a'
,
0
};
static
const
WCHAR
szStringPool
[]
=
{
'_'
,
'S'
,
't'
,
'r'
,
'i'
,
'n'
,
'g'
,
'P'
,
'o'
,
'o'
,
'l'
,
0
};
/* information for default tables */
static
WCHAR
szTables
[]
=
{
'_'
,
'T'
,
'a'
,
'b'
,
'l'
,
'e'
,
's'
,
0
};
static
WCHAR
szTable
[]
=
{
'T'
,
'a'
,
'b'
,
'l'
,
'e'
,
0
};
...
...
dlls/msi/upgrade.c
View file @
cd34bfe6
...
...
@@ -89,7 +89,7 @@ static void append_productcode(MSIPACKAGE* package, LPCWSTR action_property,
strcatW
(
newprop
,
productid
);
r
=
msi_set_property
(
package
->
db
,
action_property
,
newprop
);
if
(
r
==
ERROR_SUCCESS
&&
!
strcmpW
(
action_property
,
c
szSourceDir
))
if
(
r
==
ERROR_SUCCESS
&&
!
strcmpW
(
action_property
,
szSourceDir
))
msi_reset_folders
(
package
,
TRUE
);
TRACE
(
"Found Related Product... %s now %s
\n
"
,
...
...
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