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
120009e9
Commit
120009e9
authored
Oct 08, 2004
by
Aric Stewart
Committed by
Alexandre Julliard
Oct 08, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly compare file versions when upgrading files so that new
versions get properly installed.
parent
b4c7e6c7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
12 deletions
+30
-12
action.c
dlls/msi/action.c
+30
-12
No files found.
dlls/msi/action.c
View file @
120009e9
...
...
@@ -2105,21 +2105,29 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
DWORD
versize
;
UINT
sz
;
LPVOID
version
;
static
const
WCHAR
name
[]
=
{
'\\'
,
0
};
static
const
WCHAR
name_fmt
[]
=
{
'%'
,
'u'
,
'.'
,
'%'
,
'u'
,
'.'
,
'%'
,
'u'
,
'.'
,
'%'
,
'u'
,
0
};
WCHAR
filever
[
0x100
];
static
const
WCHAR
name
[]
=
{
'\\'
,
'V'
,
'a'
,
'r'
,
'F'
,
'i'
,
'l'
,
'e'
,
'I'
,
'n'
,
'f'
,
'o'
,
'\\'
,
'F'
,
'i'
,
'l'
,
'e'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
0
};
VS_FIXEDFILEINFO
*
lpVer
;
FIXME
(
"Version comparison.. Untried Untested and most "
"likely very very wrong
\n
"
);
FIXME
(
"Version comparison..
\n
"
);
versize
=
GetFileVersionInfoSizeW
(
file
->
TargetPath
,
&
handle
);
version
=
HeapAlloc
(
GetProcessHeap
(),
0
,
versize
);
GetFileVersionInfoW
(
file
->
TargetPath
,
0
,
versize
,
version
);
sz
=
0x100
;
VerQueryValueW
(
version
,
name
,(
LPVOID
)
filever
,
&
sz
);
HeapFree
(
GetProcessHeap
(),
0
,
version
);
if
(
strcmpW
(
version
,
file
->
Version
)
<
0
)
VerQueryValueW
(
version
,
name
,
(
LPVOID
*
)
&
lpVer
,
&
sz
);
sprintfW
(
filever
,
name_fmt
,
HIWORD
(
lpVer
->
dwFileVersionMS
),
LOWORD
(
lpVer
->
dwFileVersionMS
),
HIWORD
(
lpVer
->
dwFileVersionLS
),
LOWORD
(
lpVer
->
dwFileVersionLS
));
TRACE
(
"new %s old %s
\n
"
,
debugstr_w
(
file
->
Version
),
debugstr_w
(
filever
));
if
(
strcmpiW
(
filever
,
file
->
Version
)
<
0
)
{
file
->
State
=
2
;
FIXME
(
"cost should be diff in size
\n
"
);
...
...
@@ -2127,6 +2135,7 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
}
else
file
->
State
=
3
;
HeapFree
(
GetProcessHeap
(),
0
,
version
);
}
else
file
->
State
=
3
;
...
...
@@ -2586,8 +2595,17 @@ static UINT ACTION_InstallFiles(MSIPACKAGE *package)
if
(
!
MoveFileW
(
file
->
SourcePath
,
file
->
TargetPath
))
{
rc
=
GetLastError
();
ERR
(
"Unable to move file (error %d)
\n
"
,
rc
);
break
;
ERR
(
"Unable to move file (%s -> %s) (error %d)
\n
"
,
debugstr_w
(
file
->
SourcePath
),
debugstr_w
(
file
->
TargetPath
),
rc
);
if
(
rc
==
ERROR_ALREADY_EXISTS
&&
file
->
State
==
2
)
{
CopyFileW
(
file
->
SourcePath
,
file
->
TargetPath
,
FALSE
);
DeleteFileW
(
file
->
SourcePath
);
rc
=
0
;
}
else
break
;
}
else
file
->
State
=
4
;
...
...
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