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
dcb501de
Commit
dcb501de
authored
Jun 09, 2010
by
Hans Leidekker
Committed by
Alexandre Julliard
Jun 09, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Create directories right before installing files.
parent
f2229e6d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
50 deletions
+22
-50
action.c
dlls/msi/action.c
+0
-37
files.c
dlls/msi/files.c
+21
-8
msipriv.h
dlls/msi/msipriv.h
+0
-1
install.c
dlls/msi/tests/install.c
+1
-4
No files found.
dlls/msi/action.c
View file @
dcb501de
...
...
@@ -1003,43 +1003,6 @@ static UINT ITERATE_CreateFolders(MSIRECORD *row, LPVOID param)
return
ERROR_SUCCESS
;
}
/* FIXME: probably should merge this with the above function */
static
UINT
msi_create_directory
(
MSIPACKAGE
*
package
,
LPCWSTR
dir
)
{
UINT
rc
=
ERROR_SUCCESS
;
MSIFOLDER
*
folder
;
LPWSTR
install_path
;
install_path
=
resolve_folder
(
package
,
dir
,
FALSE
,
FALSE
,
TRUE
,
&
folder
);
if
(
!
install_path
)
return
ERROR_FUNCTION_FAILED
;
/* create the path */
if
(
folder
->
State
==
0
)
{
create_full_pathW
(
install_path
);
folder
->
State
=
2
;
}
msi_free
(
install_path
);
return
rc
;
}
UINT
msi_create_component_directories
(
MSIPACKAGE
*
package
)
{
MSICOMPONENT
*
comp
;
/* create all the folders required by the components are going to install */
LIST_FOR_EACH_ENTRY
(
comp
,
&
package
->
components
,
MSICOMPONENT
,
entry
)
{
if
(
comp
->
ActionRequest
!=
INSTALLSTATE_LOCAL
)
continue
;
msi_create_directory
(
package
,
comp
->
Directory
);
}
return
ERROR_SUCCESS
;
}
static
UINT
ACTION_CreateFolders
(
MSIPACKAGE
*
package
)
{
static
const
WCHAR
ExecSeqQuery
[]
=
...
...
dlls/msi/files.c
View file @
dcb501de
...
...
@@ -174,6 +174,24 @@ static UINT copy_install_file(MSIPACKAGE *package, MSIFILE *file, LPWSTR source)
return
gle
;
}
static
UINT
msi_create_directory
(
MSIPACKAGE
*
package
,
const
WCHAR
*
dir
)
{
MSIFOLDER
*
folder
;
WCHAR
*
install_path
;
install_path
=
resolve_folder
(
package
,
dir
,
FALSE
,
FALSE
,
TRUE
,
&
folder
);
if
(
!
install_path
)
return
ERROR_FUNCTION_FAILED
;
if
(
folder
->
State
==
0
)
{
create_full_pathW
(
install_path
);
folder
->
State
=
2
;
}
msi_free
(
install_path
);
return
ERROR_SUCCESS
;
}
static
BOOL
installfiles_cb
(
MSIPACKAGE
*
package
,
LPCWSTR
file
,
DWORD
action
,
LPWSTR
*
path
,
DWORD
*
attrs
,
PVOID
user
)
{
...
...
@@ -193,6 +211,7 @@ static BOOL installfiles_cb(MSIPACKAGE *package, LPCWSTR file, DWORD action,
return
FALSE
;
msi_file_update_ui
(
package
,
f
,
szInstallFiles
);
msi_create_directory
(
package
,
f
->
Component
->
Directory
);
*
path
=
strdupW
(
f
->
TargetPath
);
*
attrs
=
f
->
Attributes
;
...
...
@@ -224,14 +243,6 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
schedule_install_files
(
package
);
/*
* Despite MSDN specifying that the CreateFolders action
* should be called before InstallFiles, some installers don't
* do that, and they seem to work correctly. We need to create
* directories here to make sure that the files can be copied.
*/
msi_create_component_directories
(
package
);
mi
=
msi_alloc_zero
(
sizeof
(
MSIMEDIAINFO
)
);
LIST_FOR_EACH_ENTRY
(
file
,
&
package
->
files
,
MSIFILE
,
entry
)
...
...
@@ -273,6 +284,8 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
debugstr_w
(
file
->
TargetPath
));
msi_file_update_ui
(
package
,
file
,
szInstallFiles
);
msi_create_directory
(
package
,
file
->
Component
->
Directory
);
rc
=
copy_install_file
(
package
,
file
,
source
);
if
(
rc
!=
ERROR_SUCCESS
)
{
...
...
dlls/msi/msipriv.h
View file @
dcb501de
...
...
@@ -1002,7 +1002,6 @@ extern void ACTION_UpdateComponentStates(MSIPACKAGE *package, LPCWSTR szFeature)
extern
UINT
register_unique_action
(
MSIPACKAGE
*
,
LPCWSTR
);
extern
BOOL
check_unique_action
(
const
MSIPACKAGE
*
,
LPCWSTR
);
extern
WCHAR
*
generate_error_string
(
MSIPACKAGE
*
,
UINT
,
DWORD
,
...
);
extern
UINT
msi_create_component_directories
(
MSIPACKAGE
*
package
);
extern
UINT
msi_set_last_used_source
(
LPCWSTR
product
,
LPCWSTR
usersid
,
MSIINSTALLCONTEXT
context
,
DWORD
options
,
LPCWSTR
value
);
extern
UINT
msi_get_local_package_name
(
LPWSTR
path
,
LPCWSTR
suffix
);
...
...
dlls/msi/tests/install.c
View file @
dcb501de
...
...
@@ -3981,10 +3981,7 @@ static void test_caborder(void)
ok
(
!
delete_pf
(
"msitest
\\
maximus"
,
TRUE
),
"File is installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
augustus"
,
TRUE
),
"File is installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
caesar"
,
TRUE
),
"File is installed
\n
"
);
todo_wine
{
ok
(
!
delete_pf
(
"msitest"
,
FALSE
),
"File is installed
\n
"
);
}
ok
(
!
delete_pf
(
"msitest"
,
FALSE
),
"File is installed
\n
"
);
delete_cab_files
();
DeleteFile
(
msifile
);
...
...
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