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
c50ef541
Commit
c50ef541
authored
Sep 07, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Sep 07, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Keep temporary files in a seperate list.
parent
42744ff4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
32 deletions
+39
-32
action.c
dlls/msi/action.c
+0
-6
action.h
dlls/msi/action.h
+8
-1
files.c
dlls/msi/files.c
+0
-6
helpers.c
dlls/msi/helpers.c
+29
-19
msipriv.h
dlls/msi/msipriv.h
+1
-0
package.c
dlls/msi/package.c
+1
-0
No files found.
dlls/msi/action.c
View file @
c50ef541
...
...
@@ -1184,7 +1184,6 @@ static UINT load_file(MSIRECORD *row, LPVOID param)
file
->
Attributes
=
MSI_RecordGetInteger
(
row
,
7
);
file
->
Sequence
=
MSI_RecordGetInteger
(
row
,
8
);
file
->
Temporary
=
FALSE
;
file
->
State
=
0
;
TRACE
(
"File Loaded (%s)
\n
"
,
debugstr_w
(
file
->
File
));
...
...
@@ -1739,9 +1738,6 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
comp
=
file
->
Component
;
if
(
file
->
Temporary
==
TRUE
)
continue
;
if
(
comp
)
{
LPWSTR
p
;
...
...
@@ -2449,8 +2445,6 @@ static void ACTION_RefCountComponent( MSIPACKAGE* package, MSICOMPONENT *comp )
LIST_FOR_EACH_ENTRY
(
file
,
&
package
->
files
,
MSIFILE
,
entry
)
{
if
(
file
->
Temporary
)
continue
;
if
(
file
->
Component
==
comp
)
ACTION_WriteSharedDLLsCount
(
file
->
TargetPath
,
count
);
}
...
...
dlls/msi/action.h
View file @
c50ef541
...
...
@@ -114,11 +114,18 @@ typedef struct tagMSIFILE
/* 2 = present but replace */
/* 3 = present do not replace */
/* 4 = Installed */
/* 5 = Skipped */
LPWSTR
SourcePath
;
LPWSTR
TargetPath
;
BOOL
Temporary
;
}
MSIFILE
;
typedef
struct
tagMSITEMPFILE
{
struct
list
entry
;
LPWSTR
File
;
LPWSTR
Path
;
}
MSITEMPFILE
;
typedef
struct
tagMSIAPPID
{
struct
list
entry
;
...
...
dlls/msi/files.c
View file @
c50ef541
...
...
@@ -670,9 +670,6 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
{
MSICOMPONENT
*
comp
=
NULL
;
if
(
file
->
Temporary
)
continue
;
if
(
!
ACTION_VerifyComponentForAction
(
package
,
file
->
Component
,
INSTALLSTATE_LOCAL
))
{
...
...
@@ -712,9 +709,6 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
/* Pass 2 */
LIST_FOR_EACH_ENTRY
(
file
,
&
package
->
files
,
MSIFILE
,
entry
)
{
if
(
file
->
Temporary
)
continue
;
if
((
file
->
State
==
1
)
||
(
file
->
State
==
2
))
{
TRACE
(
"Pass 2: %s
\n
"
,
debugstr_w
(
file
->
File
));
...
...
dlls/msi/helpers.c
View file @
c50ef541
...
...
@@ -205,22 +205,32 @@ MSIFILE* get_loaded_file( MSIPACKAGE* package, LPCWSTR key )
int
track_tempfile
(
MSIPACKAGE
*
package
,
LPCWSTR
name
,
LPCWSTR
path
)
{
MSI
FILE
*
file
;
MSI
TEMPFILE
*
temp
;
if
(
!
package
)
return
-
2
;
return
-
1
;
LIST_FOR_EACH_ENTRY
(
temp
,
&
package
->
tempfiles
,
MSITEMPFILE
,
entry
)
{
if
(
lstrcmpW
(
name
,
temp
->
File
)
==
0
)
{
TRACE
(
"tempfile %s already exists with path %s
\n
"
,
debugstr_w
(
temp
->
File
),
debugstr_w
(
temp
->
Path
));
return
-
1
;
}
}
file
=
get_loaded_file
(
package
,
name
);
if
(
file
)
temp
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
MSITEMPFILE
)
);
if
(
!
temp
)
return
-
1
;
file
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
MSIFILE
)
);
list_add_head
(
&
package
->
tempfiles
,
&
temp
->
entry
);
file
->
File
=
strdupW
(
name
);
file
->
TargetPath
=
strdupW
(
path
);
file
->
Temporary
=
TRUE
;
temp
->
File
=
strdupW
(
name
);
temp
->
Path
=
strdupW
(
path
);
TRACE
(
"Tracking tempfile (%s)
\n
"
,
debugstr_w
(
file
->
File
));
TRACE
(
"adding tempfile %s with path %s
\n
"
,
debugstr_w
(
temp
->
File
),
debugstr_w
(
temp
->
Path
));
return
0
;
}
...
...
@@ -402,18 +412,18 @@ UINT schedule_action(MSIPACKAGE *package, UINT script, LPCWSTR action)
static
void
remove_tracked_tempfiles
(
MSIPACKAGE
*
package
)
{
MSIFILE
*
file
;
if
(
!
package
)
return
;
struct
list
*
item
,
*
cursor
;
LIST_FOR_EACH_
ENTRY
(
file
,
&
package
->
files
,
MSIFILE
,
entry
)
LIST_FOR_EACH_
SAFE
(
item
,
cursor
,
&
package
->
tempfiles
)
{
if
(
file
->
Temporary
)
{
TRACE
(
"Cleaning up %s
\n
"
,
debugstr_w
(
file
->
TargetPath
));
DeleteFileW
(
file
->
TargetPath
);
}
MSITEMPFILE
*
temp
=
LIST_ENTRY
(
item
,
MSITEMPFILE
,
entry
);
list_remove
(
&
temp
->
entry
);
TRACE
(
"deleting temp file %s
\n
"
,
debugstr_w
(
temp
->
Path
));
DeleteFileW
(
temp
->
Path
);
HeapFree
(
GetProcessHeap
(),
0
,
temp
->
File
);
HeapFree
(
GetProcessHeap
(),
0
,
temp
->
Path
);
HeapFree
(
GetProcessHeap
(),
0
,
temp
);
}
}
...
...
dlls/msi/msipriv.h
View file @
c50ef541
...
...
@@ -188,6 +188,7 @@ typedef struct tagMSIPACKAGE
struct
list
components
;
struct
list
features
;
struct
list
files
;
struct
list
tempfiles
;
struct
list
folders
;
LPWSTR
ActionFormat
;
LPWSTR
LastAction
;
...
...
dlls/msi/package.c
View file @
c50ef541
...
...
@@ -380,6 +380,7 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db )
list_init
(
&
package
->
components
);
list_init
(
&
package
->
features
);
list_init
(
&
package
->
files
);
list_init
(
&
package
->
tempfiles
);
list_init
(
&
package
->
folders
);
package
->
ActionFormat
=
NULL
;
package
->
LastAction
=
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