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
c777d309
Commit
c777d309
authored
Jan 05, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Jan 07, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Factor out msi_set_sourcedir_props.
parent
4121c9bb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
34 deletions
+34
-34
action.c
dlls/msi/action.c
+34
-34
No files found.
dlls/msi/action.c
View file @
c777d309
...
...
@@ -608,6 +608,36 @@ BOOL ui_sequence_exists( MSIPACKAGE *package )
return
FALSE
;
}
static
UINT
msi_set_sourcedir_props
(
MSIPACKAGE
*
package
,
BOOL
replace
)
{
LPWSTR
p
;
LPWSTR
source
,
check
;
DWORD
len
;
p
=
strrchrW
(
package
->
PackagePath
,
'\\'
);
if
(
!
p
)
return
ERROR_SUCCESS
;
len
=
p
-
package
->
PackagePath
+
2
;
source
=
msi_alloc
(
len
*
sizeof
(
WCHAR
)
);
lstrcpynW
(
source
,
package
->
PackagePath
,
len
);
check
=
msi_dup_property
(
package
,
cszSourceDir
);
if
(
!
check
||
replace
)
MSI_SetPropertyW
(
package
,
cszSourceDir
,
source
);
msi_free
(
check
);
check
=
msi_dup_property
(
package
,
cszSOURCEDIR
);
if
(
!
check
||
replace
)
MSI_SetPropertyW
(
package
,
cszSOURCEDIR
,
source
);
msi_free
(
check
);
msi_free
(
source
);
return
ERROR_SUCCESS
;
}
/****************************************************
* TOP level entry points
*****************************************************/
...
...
@@ -629,7 +659,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
if
(
szPackagePath
)
{
LPWSTR
p
,
check
,
dir
;
LPWSTR
p
,
dir
;
LPCWSTR
file
;
dir
=
strdupW
(
szPackagePath
);
...
...
@@ -658,18 +688,9 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
lstrcpyW
(
package
->
PackagePath
,
dir
);
lstrcatW
(
package
->
PackagePath
,
file
);
check
=
msi_dup_property
(
package
,
cszSourceDir
);
if
(
!
check
)
MSI_SetPropertyW
(
package
,
cszSourceDir
,
dir
);
msi_free
(
check
);
check
=
msi_dup_property
(
package
,
cszSOURCEDIR
);
if
(
!
check
)
MSI_SetPropertyW
(
package
,
cszSOURCEDIR
,
dir
);
msi_free
(
dir
);
msi_free
(
check
);
msi_set_sourcedir_props
(
package
,
FALSE
);
}
msi_parse_command_line
(
package
,
szCommandLine
);
...
...
@@ -4156,27 +4177,6 @@ UINT ACTION_ForceReboot(MSIPACKAGE *package)
return
ERROR_INSTALL_SUSPEND
;
}
static
UINT
msi_set_sourcedir_props
(
MSIPACKAGE
*
package
)
{
LPWSTR
p
,
source
;
DWORD
len
;
p
=
strrchrW
(
package
->
PackagePath
,
'\\'
);
if
(
!
p
)
return
ERROR_SUCCESS
;
len
=
p
-
package
->
PackagePath
+
2
;
source
=
msi_alloc
(
len
*
sizeof
(
WCHAR
)
);
lstrcpynW
(
source
,
package
->
PackagePath
,
len
);
MSI_SetPropertyW
(
package
,
cszSourceDir
,
source
);
MSI_SetPropertyW
(
package
,
cszSOURCEDIR
,
source
);
msi_free
(
source
);
return
ERROR_SUCCESS
;
}
static
UINT
ACTION_ResolveSource
(
MSIPACKAGE
*
package
)
{
DWORD
attrib
;
...
...
@@ -4189,7 +4189,7 @@ static UINT ACTION_ResolveSource(MSIPACKAGE* package)
if
(
!
package
->
PackagePath
)
return
ERROR_SUCCESS
;
msi_set_sourcedir_props
(
package
);
msi_set_sourcedir_props
(
package
,
TRUE
);
attrib
=
GetFileAttributesW
(
package
->
PackagePath
);
if
(
attrib
==
INVALID_FILE_ATTRIBUTES
)
...
...
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