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
a248f4f0
Commit
a248f4f0
authored
Jan 21, 2013
by
Hans Leidekker
Committed by
Alexandre Julliard
Jan 21, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Set the OriginalDatabase property after applying transforms, not before.
parent
f6bdaf36
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
12 deletions
+31
-12
action.c
dlls/msi/action.c
+1
-0
msipriv.h
dlls/msi/msipriv.h
+1
-0
package.c
dlls/msi/package.c
+28
-11
package.c
dlls/msi/tests/package.c
+1
-1
No files found.
dlls/msi/action.c
View file @
a248f4f0
...
...
@@ -7790,6 +7790,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
/* properties may have been added by a transform */
msi_clone_properties
(
package
);
msi_set_original_database_property
(
package
->
db
,
szPackagePath
);
msi_parse_command_line
(
package
,
szCommandLine
,
FALSE
);
msi_adjust_privilege_properties
(
package
);
...
...
dlls/msi/msipriv.h
View file @
a248f4f0
...
...
@@ -1041,6 +1041,7 @@ extern BOOL msi_init_assembly_caches(MSIPACKAGE *) DECLSPEC_HIDDEN;
extern
void
msi_destroy_assembly_caches
(
MSIPACKAGE
*
)
DECLSPEC_HIDDEN
;
extern
WCHAR
*
msi_font_version_from_file
(
const
WCHAR
*
)
DECLSPEC_HIDDEN
;
extern
WCHAR
**
msi_split_string
(
const
WCHAR
*
,
WCHAR
)
DECLSPEC_HIDDEN
;
extern
UINT
msi_set_original_database_property
(
MSIDATABASE
*
,
const
WCHAR
*
)
DECLSPEC_HIDDEN
;
/* media */
...
...
dlls/msi/package.c
View file @
a248f4f0
...
...
@@ -1510,6 +1510,28 @@ static UINT get_local_package( const WCHAR *filename, WCHAR *localfile )
return
r
;
}
UINT
msi_set_original_database_property
(
MSIDATABASE
*
db
,
const
WCHAR
*
package
)
{
UINT
r
;
if
(
UrlIsW
(
package
,
URLIS_URL
))
r
=
msi_set_property
(
db
,
szOriginalDatabase
,
package
,
-
1
);
else
if
(
package
[
0
]
==
'#'
)
r
=
msi_set_property
(
db
,
szOriginalDatabase
,
db
->
path
,
-
1
);
else
{
DWORD
len
;
WCHAR
*
path
;
if
(
!
(
len
=
GetFullPathNameW
(
package
,
0
,
NULL
,
NULL
)))
return
GetLastError
();
if
(
!
(
path
=
msi_alloc
(
len
*
sizeof
(
WCHAR
)
)))
return
ERROR_OUTOFMEMORY
;
len
=
GetFullPathNameW
(
package
,
len
,
path
,
NULL
);
r
=
msi_set_property
(
db
,
szOriginalDatabase
,
path
,
len
);
msi_free
(
path
);
}
return
r
;
}
UINT
MSI_OpenPackageW
(
LPCWSTR
szPackage
,
MSIPACKAGE
**
pPackage
)
{
static
const
WCHAR
dotmsi
[]
=
{
'.'
,
'm'
,
's'
,
'i'
,
0
};
...
...
@@ -1619,17 +1641,6 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
return
r
;
}
msi_set_property
(
package
->
db
,
szDatabase
,
db
->
path
,
-
1
);
if
(
UrlIsW
(
szPackage
,
URLIS_URL
)
)
msi_set_property
(
package
->
db
,
szOriginalDatabase
,
szPackage
,
-
1
);
else
if
(
szPackage
[
0
]
==
'#'
)
msi_set_property
(
package
->
db
,
szOriginalDatabase
,
db
->
path
,
-
1
);
else
{
WCHAR
fullpath
[
MAX_PATH
];
DWORD
len
=
GetFullPathNameW
(
szPackage
,
MAX_PATH
,
fullpath
,
NULL
);
msi_set_property
(
package
->
db
,
szOriginalDatabase
,
fullpath
,
len
);
}
msi_set_context
(
package
);
while
(
1
)
...
...
@@ -1656,6 +1667,12 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
msi_clone_properties
(
package
);
msi_adjust_privilege_properties
(
package
);
}
r
=
msi_set_original_database_property
(
package
->
db
,
szPackage
);
if
(
r
!=
ERROR_SUCCESS
)
{
msiobj_release
(
&
package
->
hdr
);
return
r
;
}
if
(
gszLogFile
)
package
->
log_file
=
CreateFileW
(
gszLogFile
,
GENERIC_WRITE
,
FILE_SHARE_WRITE
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
...
...
dlls/msi/tests/package.c
View file @
a248f4f0
...
...
@@ -2250,7 +2250,7 @@ static void test_property_table(void)
sprintf
(
package
,
"#%i"
,
hdb
);
r
=
MsiOpenPackage
(
package
,
&
hpkg
);
todo_wine
ok
(
r
!=
ERROR_SUCCESS
,
"MsiOpenPackage succeeded
\n
"
);
ok
(
r
!=
ERROR_SUCCESS
,
"MsiOpenPackage succeeded
\n
"
);
if
(
r
==
ERROR_SUCCESS
)
MsiCloseHandle
(
hpkg
);
...
...
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