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
e7cc2868
Commit
e7cc2868
authored
Nov 03, 2009
by
Ilya Shpigor
Committed by
Alexandre Julliard
Nov 04, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extrac32: Add command-line parsing.
parent
95c525e2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
87 additions
and
1 deletion
+87
-1
Makefile.in
programs/extrac32/Makefile.in
+1
-1
extrac32.c
programs/extrac32/extrac32.c
+86
-0
No files found.
programs/extrac32/Makefile.in
View file @
e7cc2868
...
...
@@ -5,7 +5,7 @@ VPATH = @srcdir@
MODULE
=
extrac32.exe
APPMODE
=
-mwindows
-municode
EXTRADEFS
=
-DWINE_NO_UNICODE
IMPORTS
=
kernel32
IMPORTS
=
shell32 user32
kernel32
C_SRCS
=
\
extrac32.c
...
...
programs/extrac32/extrac32.c
View file @
e7cc2868
...
...
@@ -2,6 +2,7 @@
* Extract - Wine-compatible program for extract *.cab files.
*
* Copyright 2007 Etersoft (Lyutin Anatoly)
* Copyright 2009 Ilya Shpigor
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -19,6 +20,7 @@
*/
#include <windows.h>
#include <shellapi.h>
#include "wine/unicode.h"
#include "wine/debug.h"
...
...
@@ -27,5 +29,89 @@ WINE_DEFAULT_DEBUG_CHANNEL(extrac32);
int
PASCAL
wWinMain
(
HINSTANCE
hInstance
,
HINSTANCE
prev
,
LPWSTR
cmdline
,
int
show
)
{
LPWSTR
*
argv
;
int
argc
;
int
i
;
WCHAR
check
,
cmd
=
0
;
WCHAR
path
[
MAX_PATH
];
WCHAR
backslash
[]
=
{
'\\'
,
0
};
LPCWSTR
cabfile
=
NULL
;
path
[
0
]
=
0
;
argv
=
CommandLineToArgvW
(
cmdline
,
&
argc
);
if
(
!
argv
)
{
WINE_ERR
(
"Bad command line arguments
\n
"
);
return
0
;
}
/* Parse arguments */
for
(
i
=
0
;
i
<
argc
;
i
++
)
{
/* Get cabfile */
if
((
argv
[
i
][
0
]
!=
'/'
)
&&
!
cabfile
)
{
cabfile
=
argv
[
i
];
continue
;
}
/* Get parameters for commands */
check
=
toupperW
(
argv
[
i
][
1
]
);
switch
(
check
)
{
case
'A'
:
WINE_FIXME
(
"/A not implemented
\n
"
);
break
;
case
'Y'
:
WINE_FIXME
(
"/Y not implemented
\n
"
);
break
;
case
'L'
:
if
((
i
+
1
)
>=
argc
)
return
0
;
if
(
!
GetFullPathNameW
(
argv
[
++
i
],
MAX_PATH
,
path
,
NULL
))
return
0
;
break
;
case
'C'
:
if
(
cmd
)
return
0
;
if
((
i
+
2
)
>=
argc
)
return
0
;
cmd
=
check
;
cabfile
=
argv
[
++
i
];
if
(
!
GetFullPathNameW
(
argv
[
++
i
],
MAX_PATH
,
path
,
NULL
))
return
0
;
break
;
case
'E'
:
case
'D'
:
if
(
cmd
)
return
0
;
cmd
=
check
;
break
;
default:
return
0
;
}
}
if
(
!
cabfile
)
return
0
;
if
(
!
path
[
0
])
GetCurrentDirectoryW
(
MAX_PATH
,
path
);
lstrcatW
(
path
,
backslash
);
/* Execute the specified command */
switch
(
cmd
)
{
case
'C'
:
/* Copy file */
WINE_FIXME
(
"/C not implemented
\n
"
);
break
;
case
'E'
:
/* Extract CAB archive */
WINE_FIXME
(
"/E not implemented
\n
"
);
break
;
case
0
:
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