Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
7ef8428b
Commit
7ef8428b
authored
Apr 11, 2007
by
James Hawkins
Committed by
Alexandre Julliard
Apr 12, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Reset the is_extracted flag when every cabinet is loaded.
parent
a9355f2b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
79 additions
and
0 deletions
+79
-0
files.c
dlls/msi/files.c
+1
-0
install.c
dlls/msi/tests/install.c
+78
-0
No files found.
dlls/msi/files.c
View file @
7ef8428b
...
...
@@ -526,6 +526,7 @@ static UINT load_media_info(MSIPACKAGE *package, MSIFILE *file, struct media_inf
return
ERROR_FUNCTION_FAILED
;
}
mi
->
is_extracted
=
FALSE
;
mi
->
disk_id
=
MSI_RecordGetInteger
(
row
,
1
);
mi
->
last_sequence
=
MSI_RecordGetInteger
(
row
,
2
);
msi_free
(
mi
->
disk_prompt
);
...
...
dlls/msi/tests/install.c
View file @
7ef8428b
...
...
@@ -285,6 +285,37 @@ static const CHAR sdp_custom_action_dat[] = "Action\tType\tSource\tTarget\tISCom
"CustomAction
\t
Action
\n
"
"SetDirProperty
\t
51
\t
MSITESTDIR
\t
[CommonFilesFolder]msitest
\\\t\n
"
;
static
const
CHAR
cie_component_dat
[]
=
"Component
\t
ComponentId
\t
Directory_
\t
Attributes
\t
Condition
\t
KeyPath
\n
"
"s72
\t
S38
\t
s72
\t
i2
\t
S255
\t
S72
\n
"
"Component
\t
Component
\n
"
"maximus
\t\t
MSITESTDIR
\t
0
\t
1
\t
maximus
\n
"
"augustus
\t\t
MSITESTDIR
\t
0
\t
1
\t
augustus
\n
"
"caesar
\t\t
MSITESTDIR
\t
0
\t
1
\t
caesar
\n
"
"gaius
\t\t
MSITESTDIR
\t
0
\t
1
\t
gaius
\n
"
;
static
const
CHAR
cie_feature_comp_dat
[]
=
"Feature_
\t
Component_
\n
"
"s38
\t
s72
\n
"
"FeatureComponents
\t
Feature_
\t
Component_
\n
"
"feature
\t
maximus
\n
"
"feature
\t
augustus
\n
"
"feature
\t
caesar
\n
"
"feature
\t
gaius"
;
static
const
CHAR
cie_file_dat
[]
=
"File
\t
Component_
\t
FileName
\t
FileSize
\t
Version
\t
Language
\t
Attributes
\t
Sequence
\n
"
"s72
\t
s72
\t
l255
\t
i4
\t
S72
\t
S20
\t
I2
\t
i2
\n
"
"File
\t
File
\n
"
"maximus
\t
maximus
\t
maximus
\t
500
\t\t\t
16384
\t
1
\n
"
"augustus
\t
augustus
\t
augustus
\t
50000
\t\t\t
16384
\t
2
\n
"
"caesar
\t
caesar
\t
caesar
\t
500
\t\t\t
16384
\t
12
\n
"
"gaius
\t
gaius
\t
gaius
\t
500
\t\t\t
8192
\t
11"
;
static
const
CHAR
cie_media_dat
[]
=
"DiskId
\t
LastSequence
\t
DiskPrompt
\t
Cabinet
\t
VolumeLabel
\t
Source
\n
"
"i2
\t
i4
\t
L64
\t
S255
\t
S32
\t
S72
\n
"
"Media
\t
DiskId
\n
"
"1
\t
1
\t\t
test1.cab
\t
DISK1
\t\n
"
"2
\t
2
\t\t
test2.cab
\t
DISK2
\t\n
"
"3
\t
12
\t\t
test3.cab
\t
DISK3
\t\n
"
;
typedef
struct
_msi_table
{
const
CHAR
*
filename
;
...
...
@@ -408,6 +439,18 @@ static const msi_table sdp_tables[] =
ADD_TABLE
(
property
),
};
static
const
msi_table
cie_tables
[]
=
{
ADD_TABLE
(
cie_component
),
ADD_TABLE
(
directory
),
ADD_TABLE
(
cc_feature
),
ADD_TABLE
(
cie_feature_comp
),
ADD_TABLE
(
cie_file
),
ADD_TABLE
(
install_exec_seq
),
ADD_TABLE
(
cie_media
),
ADD_TABLE
(
property
),
};
/* cabinet definitions */
/* make the max size large so there is only one cab file */
...
...
@@ -1261,6 +1304,40 @@ static void test_setdirproperty(void)
DeleteFile
(
msifile
);
}
static
void
test_cabisextracted
(
void
)
{
UINT
r
;
CreateDirectoryA
(
"msitest"
,
NULL
);
create_file
(
"msitest
\\
gaius"
,
500
);
create_file
(
"maximus"
,
500
);
create_file
(
"augustus"
,
500
);
create_file
(
"caesar"
,
500
);
create_database
(
msifile
,
mm_tables
,
sizeof
(
mm_tables
)
/
sizeof
(
msi_table
));
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
create_cab_file
(
"test1.cab"
,
MEDIA_SIZE
,
"maximus
\0
"
);
create_cab_file
(
"test2.cab"
,
MEDIA_SIZE
,
"augustus
\0
"
);
create_cab_file
(
"test3.cab"
,
MEDIA_SIZE
,
"caesar
\0
"
);
create_database
(
msifile
,
cie_tables
,
sizeof
(
cie_tables
)
/
sizeof
(
msi_table
));
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiInstallProductA
(
msifile
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
delete_pf
(
"msitest
\\
maximus"
,
TRUE
),
"File not installed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
augustus"
,
TRUE
),
"File not installed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
caesar"
,
TRUE
),
"File not installed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
gaius"
,
TRUE
),
"File not installed
\n
"
);
ok
(
delete_pf
(
"msitest"
,
FALSE
),
"File not installed
\n
"
);
delete_cab_files
();
DeleteFile
(
msifile
);
}
START_TEST
(
install
)
{
DWORD
len
;
...
...
@@ -1288,6 +1365,7 @@ START_TEST(install)
test_uiLevelFlags
();
test_readonlyfile
();
test_setdirproperty
();
test_cabisextracted
();
SetCurrentDirectoryA
(
prev_path
);
}
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