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
07be9f05
Commit
07be9f05
authored
Jan 31, 2013
by
Hans Leidekker
Committed by
Alexandre Julliard
Jan 31, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Improve parsing of the supported platforms string.
parent
d4e9b2cd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
11 deletions
+29
-11
msipriv.h
dlls/msi/msipriv.h
+1
-0
package.c
dlls/msi/package.c
+20
-11
install.c
dlls/msi/tests/install.c
+8
-0
No files found.
dlls/msi/msipriv.h
View file @
07be9f05
...
...
@@ -338,6 +338,7 @@ typedef struct msi_dialog_tag msi_dialog;
enum
platform
{
PLATFORM_UNKNOWN
,
PLATFORM_INTEL
,
PLATFORM_INTEL64
,
PLATFORM_X64
,
...
...
dlls/msi/package.c
View file @
07be9f05
...
...
@@ -1269,9 +1269,18 @@ UINT msi_create_empty_local_file( LPWSTR path, LPCWSTR suffix )
return
ERROR_SUCCESS
;
}
static
enum
platform
parse_platform
(
WCHAR
*
str
)
{
if
(
!
str
[
0
]
||
!
strcmpW
(
str
,
szIntel
))
return
PLATFORM_INTEL
;
else
if
(
!
strcmpW
(
str
,
szIntel64
))
return
PLATFORM_INTEL64
;
else
if
(
!
strcmpW
(
str
,
szX64
)
||
!
strcmpW
(
str
,
szAMD64
))
return
PLATFORM_X64
;
else
if
(
!
strcmpW
(
str
,
szARM
))
return
PLATFORM_ARM
;
return
PLATFORM_UNKNOWN
;
}
static
UINT
msi_parse_summary
(
MSISUMMARYINFO
*
si
,
MSIPACKAGE
*
package
)
{
WCHAR
*
template
,
*
p
,
*
q
;
WCHAR
*
template
,
*
p
,
*
q
,
*
platform
;
DWORD
i
,
count
;
package
->
version
=
msi_suminfo_get_int32
(
si
,
PID_PAGECOUNT
);
...
...
@@ -1291,16 +1300,16 @@ static UINT msi_parse_summary( MSISUMMARYINFO *si, MSIPACKAGE *package )
return
ERROR_PATCH_PACKAGE_INVALID
;
}
*
p
=
0
;
if
((
q
=
strchrW
(
template
,
','
)))
*
q
=
0
;
if
(
!
template
[
0
]
||
!
strcmpW
(
template
,
szIntel
))
package
->
platform
=
PLATFORM_INTEL
;
else
if
(
!
strcmpW
(
template
,
szIntel64
)
)
package
->
platform
=
PLATFORM_INTEL64
;
else
if
(
!
strcmpW
(
template
,
szX64
)
||
!
strcmpW
(
template
,
szAMD64
))
package
->
platform
=
PLATFORM_X64
;
else
if
(
!
strcmpW
(
template
,
szARM
))
package
->
platform
=
PLATFORM_ARM
;
else
platform
=
template
;
if
(
(
q
=
strchrW
(
platform
,
','
)))
*
q
=
0
;
package
->
platform
=
parse_platform
(
platform
)
;
while
(
package
->
platform
==
PLATFORM_UNKNOWN
&&
q
)
{
platform
=
q
+
1
;
if
((
q
=
strchrW
(
platform
,
','
)))
*
q
=
0
;
package
->
platform
=
parse_platform
(
platform
);
}
if
(
package
->
platform
==
PLATFORM_UNKNOWN
)
{
WARN
(
"unknown platform %s
\n
"
,
debugstr_w
(
template
));
msi_free
(
template
);
...
...
dlls/msi/tests/install.c
View file @
07be9f05
...
...
@@ -6295,6 +6295,14 @@ static void test_package_validation(void)
ok
(
delete_pf
(
"msitest"
,
FALSE
),
"directory does not exist
\n
"
);
DeleteFile
(
msifile
);
create_database_template
(
msifile
,
pv_tables
,
sizeof
(
pv_tables
)
/
sizeof
(
msi_table
),
100
,
"Alpha,Beta,Intel;0"
);
r
=
MsiInstallProductA
(
msifile
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
delete_pf
(
"msitest
\\
maximus"
,
TRUE
),
"file does not exist
\n
"
);
ok
(
delete_pf
(
"msitest"
,
FALSE
),
"directory does not exist
\n
"
);
DeleteFile
(
msifile
);
create_database_template
(
msifile
,
pv_tables
,
sizeof
(
pv_tables
)
/
sizeof
(
msi_table
),
100
,
"x64;0"
);
r
=
MsiInstallProductA
(
msifile
,
NULL
);
...
...
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