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
9d08045a
Commit
9d08045a
authored
Apr 22, 2013
by
Sergey Guralnik
Committed by
Alexandre Julliard
Apr 24, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extrac32: Add /D switch support.
parent
b4b45471
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
10 deletions
+36
-10
extrac32.c
programs/extrac32/extrac32.c
+36
-10
No files found.
programs/extrac32/extrac32.c
View file @
9d08045a
...
...
@@ -31,6 +31,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
extrac32
);
static
BOOL
force_mode
;
static
BOOL
show_content
;
static
void
create_target_directory
(
LPWSTR
Target
)
{
...
...
@@ -56,12 +57,37 @@ static UINT WINAPI ExtCabCallback(PVOID Context, UINT Notification, UINT_PTR Par
{
case
SPFILENOTIFY_FILEINCABINET
:
pInfo
=
(
FILE_IN_CABINET_INFO_W
*
)
Param1
;
lstrcpyW
(
pInfo
->
FullTargetName
,
(
LPCWSTR
)
Context
);
lstrcatW
(
pInfo
->
FullTargetName
,
pInfo
->
NameInCabinet
);
/* SetupIterateCabinet() doesn't create full path to target by itself,
so we should do it manually */
create_target_directory
(
pInfo
->
FullTargetName
);
return
FILEOP_DOIT
;
if
(
show_content
)
{
FILETIME
ft
;
SYSTEMTIME
st
;
CHAR
date
[
12
],
time
[
12
],
buf
[
2
*
MAX_PATH
];
int
count
;
DWORD
dummy
;
/* DosDate and DosTime already represented at local time */
DosDateTimeToFileTime
(
pInfo
->
DosDate
,
pInfo
->
DosTime
,
&
ft
);
FileTimeToSystemTime
(
&
ft
,
&
st
);
GetDateFormatA
(
0
,
0
,
&
st
,
"MM'-'dd'-'yyyy"
,
date
,
sizeof
date
);
GetTimeFormatA
(
0
,
0
,
&
st
,
"HH':'mm':'ss"
,
time
,
sizeof
time
);
count
=
wsprintfA
(
buf
,
"%s %s %c%c%c%c %15u %S
\n
"
,
date
,
time
,
pInfo
->
DosAttribs
&
FILE_ATTRIBUTE_ARCHIVE
?
'A'
:
'-'
,
pInfo
->
DosAttribs
&
FILE_ATTRIBUTE_HIDDEN
?
'H'
:
'-'
,
pInfo
->
DosAttribs
&
FILE_ATTRIBUTE_READONLY
?
'R'
:
'-'
,
pInfo
->
DosAttribs
&
FILE_ATTRIBUTE_SYSTEM
?
'S'
:
'-'
,
pInfo
->
FileSize
,
pInfo
->
NameInCabinet
);
WriteFile
(
GetStdHandle
(
STD_OUTPUT_HANDLE
),
buf
,
count
,
&
dummy
,
NULL
);
return
FILEOP_SKIP
;
}
else
{
lstrcpyW
(
pInfo
->
FullTargetName
,
(
LPCWSTR
)
Context
);
lstrcatW
(
pInfo
->
FullTargetName
,
pInfo
->
NameInCabinet
);
/* SetupIterateCabinet() doesn't create full path to target by itself,
so we should do it manually */
create_target_directory
(
pInfo
->
FullTargetName
);
return
FILEOP_DOIT
;
}
case
SPFILENOTIFY_FILEEXTRACTED
:
pFilePaths
=
(
FILEPATHS_W
*
)
Param1
;
WINE_TRACE
(
"Extracted %s
\n
"
,
wine_dbgstr_w
(
pFilePaths
->
Target
));
...
...
@@ -281,14 +307,14 @@ int PASCAL wWinMain(HINSTANCE hInstance, HINSTANCE prev, LPWSTR cmdline, int sho
/* Copy file */
copy_file
(
cabfile
,
path
);
break
;
case
'D'
:
/* Display CAB archive */
show_content
=
TRUE
;
/* Fall through */
case
'E'
:
/* Extract CAB archive */
extract
(
cabfile
,
path
);
break
;
case
'D'
:
/* Display CAB archive */
WINE_FIXME
(
"/D not implemented
\n
"
);
break
;
}
return
0
;
}
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