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
6a6a2185
Commit
6a6a2185
authored
Nov 25, 2007
by
James Hawkins
Committed by
Alexandre Julliard
Nov 26, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Set the file contents of the file hash test file explicitly.
parent
e1002889
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
13 deletions
+17
-13
install.c
dlls/msi/tests/install.c
+17
-13
No files found.
dlls/msi/tests/install.c
View file @
6a6a2185
...
...
@@ -557,7 +557,7 @@ static const CHAR mc_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tV
static
const
CHAR
mc_file_hash_dat
[]
=
"File_
\t
Options
\t
HashPart1
\t
HashPart2
\t
HashPart3
\t
HashPart4
\n
"
"s72
\t
i2
\t
i4
\t
i4
\t
i4
\t
i4
\n
"
"MsiFileHash
\t
File_
\n
"
"caesar
\t
0
\t
1477005400
\t
-2141257985
\t
284379198
\t
21485139
"
;
"caesar
\t
0
\t
850433704
\t
-241429251
\t
675791761
\t
-1221108824
"
;
typedef
struct
_msi_table
{
...
...
@@ -1100,24 +1100,26 @@ static BOOL get_program_files_dir(LPSTR buf, LPSTR buf2)
return
TRUE
;
}
static
void
create_file
(
const
CHAR
*
name
,
DWORD
size
)
static
void
create_file
_data
(
LPCSTR
name
,
LPCSTR
data
,
DWORD
size
)
{
HANDLE
file
;
DWORD
written
,
left
;
DWORD
written
;
file
=
CreateFileA
(
name
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
0
,
NULL
);
ok
(
file
!=
INVALID_HANDLE_VALUE
,
"Failure to open file %s
\n
"
,
name
);
WriteFile
(
file
,
name
,
strlen
(
name
),
&
written
,
NULL
);
WriteFile
(
file
,
"
\n
"
,
strlen
(
"
\n
"
),
&
written
,
NULL
);
WriteFile
(
file
,
data
,
strlen
(
data
),
&
written
,
NULL
);
left
=
size
-
lstrlen
(
name
)
-
1
;
if
(
size
)
{
SetFilePointer
(
file
,
size
,
NULL
,
FILE_BEGIN
);
SetEndOfFile
(
file
);
}
SetFilePointer
(
file
,
left
,
NULL
,
FILE_CURRENT
);
SetEndOfFile
(
file
);
CloseHandle
(
file
);
}
#define create_file(name, size) create_file_data(name, name, size)
static
void
create_test_files
(
void
)
{
CreateDirectoryA
(
"msitest"
,
NULL
);
...
...
@@ -3286,7 +3288,7 @@ static void test_adminprops(void)
RemoveDirectory
(
"msitest"
);
}
static
void
create_pf
(
LPCSTR
file
,
BOOL
is_file
)
static
void
create_pf
_data
(
LPCSTR
file
,
LPCSTR
data
,
BOOL
is_file
)
{
CHAR
path
[
MAX_PATH
];
...
...
@@ -3295,11 +3297,13 @@ static void create_pf(LPCSTR file, BOOL is_file)
lstrcatA
(
path
,
file
);
if
(
is_file
)
create_file
(
path
,
500
);
create_file
_data
(
path
,
data
,
500
);
else
CreateDirectoryA
(
path
,
NULL
);
}
#define create_pf(file, is_file) create_pf_data(file, file, is_file)
static
void
test_removefiles
(
void
)
{
UINT
r
;
...
...
@@ -3533,7 +3537,7 @@ static void test_missingcab(void)
create_cab_file
(
"test1.cab"
,
MEDIA_SIZE
,
"maximus
\0
"
);
create_pf
(
"msitest"
,
FALSE
);
create_pf
(
"msitest
\\
caesar
"
,
TRUE
);
create_pf
_data
(
"msitest
\\
caesar"
,
"abcdefgh
"
,
TRUE
);
r
=
MsiInstallProductA
(
msifile
,
NULL
);
todo_wine
...
...
@@ -3547,7 +3551,7 @@ static void test_missingcab(void)
ok
(
delete_pf
(
"msitest"
,
FALSE
),
"File not installed
\n
"
);
create_pf
(
"msitest"
,
FALSE
);
create_pf
(
"msitest
\\
caesar
"
,
TRUE
);
create_pf
_data
(
"msitest
\\
caesar"
,
"abcdefgh
"
,
TRUE
);
create_pf
(
"msitest
\\
gaius"
,
TRUE
);
r
=
MsiInstallProductA
(
msifile
,
"GAIUS=1"
);
...
...
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