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
131ef637
Commit
131ef637
authored
Apr 14, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
Apr 14, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add support for maintaining a list of cabinet streams.
parent
55216463
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
0 deletions
+62
-0
media.c
dlls/msi/media.c
+40
-0
msipriv.h
dlls/msi/msipriv.h
+11
-0
package.c
dlls/msi/package.c
+11
-0
No files found.
dlls/msi/media.c
View file @
131ef637
...
...
@@ -890,3 +890,43 @@ UINT ready_media(MSIPACKAGE *package, UINT Sequence, BOOL IsCompressed, MSIMEDIA
msi_free
(
cabinet_file
);
return
ERROR_SUCCESS
;
}
UINT
msi_add_cabinet_stream
(
MSIPACKAGE
*
package
,
UINT
disk_id
,
IStorage
*
storage
,
const
WCHAR
*
name
)
{
MSICABINETSTREAM
*
cab
,
*
item
;
TRACE
(
"%p, %u, %p, %s
\n
"
,
package
,
disk_id
,
storage
,
debugstr_w
(
name
));
LIST_FOR_EACH_ENTRY
(
item
,
&
package
->
cabinet_streams
,
MSICABINETSTREAM
,
entry
)
{
if
(
item
->
disk_id
==
disk_id
)
{
TRACE
(
"duplicate disk id %u
\n
"
,
disk_id
);
return
ERROR_FUNCTION_FAILED
;
}
}
if
(
!
(
cab
=
msi_alloc
(
sizeof
(
*
cab
)
)))
return
ERROR_OUTOFMEMORY
;
if
(
!
(
cab
->
stream
=
msi_alloc
(
(
strlenW
(
name
)
+
1
)
*
sizeof
(
WCHAR
)
)))
{
msi_free
(
cab
);
return
ERROR_OUTOFMEMORY
;
}
strcpyW
(
cab
->
stream
,
name
);
cab
->
disk_id
=
disk_id
;
cab
->
storage
=
storage
;
IStorage_AddRef
(
storage
);
list_add_tail
(
&
package
->
cabinet_streams
,
&
cab
->
entry
);
return
ERROR_SUCCESS
;
}
MSICABINETSTREAM
*
msi_get_cabinet_stream
(
MSIPACKAGE
*
package
,
UINT
disk_id
)
{
MSICABINETSTREAM
*
cab
;
LIST_FOR_EACH_ENTRY
(
cab
,
&
package
->
cabinet_streams
,
MSICABINETSTREAM
,
entry
)
{
if
(
cab
->
disk_id
==
disk_id
)
return
cab
;
}
return
NULL
;
}
dlls/msi/msipriv.h
View file @
131ef637
...
...
@@ -157,6 +157,14 @@ typedef struct tagMSIMEDIAINFO
WCHAR
sourcedir
[
MAX_PATH
];
}
MSIMEDIAINFO
;
typedef
struct
tagMSICABINETSTREAM
{
struct
list
entry
;
UINT
disk_id
;
IStorage
*
storage
;
WCHAR
*
stream
;
}
MSICABINETSTREAM
;
typedef
struct
tagMSIPATCHINFO
{
struct
list
entry
;
...
...
@@ -350,6 +358,7 @@ typedef struct tagMSIPACKAGE
struct
list
tempfiles
;
struct
list
folders
;
struct
list
binaries
;
struct
list
cabinet_streams
;
LPWSTR
ActionFormat
;
LPWSTR
LastAction
;
HANDLE
log_file
;
...
...
@@ -1007,6 +1016,8 @@ extern UINT ready_media(MSIPACKAGE *package, UINT Sequence, BOOL IsCompressed, M
extern
UINT
msi_load_media_info
(
MSIPACKAGE
*
package
,
UINT
Sequence
,
MSIMEDIAINFO
*
mi
);
extern
void
msi_free_media_info
(
MSIMEDIAINFO
*
mi
);
extern
BOOL
msi_cabextract
(
MSIPACKAGE
*
package
,
MSIMEDIAINFO
*
mi
,
LPVOID
data
);
extern
MSICABINETSTREAM
*
msi_get_cabinet_stream
(
MSIPACKAGE
*
,
UINT
);
extern
UINT
msi_add_cabinet_stream
(
MSIPACKAGE
*
,
UINT
,
IStorage
*
,
const
WCHAR
*
);
/* control event stuff */
extern
VOID
ControlEvent_FireSubscribedEvent
(
MSIPACKAGE
*
package
,
LPCWSTR
event
,
...
...
dlls/msi/package.c
View file @
131ef637
...
...
@@ -300,6 +300,16 @@ static void free_package_structures( MSIPACKAGE *package )
msi_free
(
binary
);
}
LIST_FOR_EACH_SAFE
(
item
,
cursor
,
&
package
->
cabinet_streams
)
{
MSICABINETSTREAM
*
cab
=
LIST_ENTRY
(
item
,
MSICABINETSTREAM
,
entry
);
list_remove
(
&
cab
->
entry
);
IStorage_Release
(
cab
->
storage
);
msi_free
(
cab
->
stream
);
msi_free
(
cab
);
}
msi_free
(
package
->
BaseURL
);
msi_free
(
package
->
PackagePath
);
msi_free
(
package
->
ProductCode
);
...
...
@@ -1080,6 +1090,7 @@ static MSIPACKAGE *msi_alloc_package( void )
list_init
(
&
package
->
sourcelist_media
);
list_init
(
&
package
->
patches
);
list_init
(
&
package
->
binaries
);
list_init
(
&
package
->
cabinet_streams
);
}
return
package
;
...
...
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