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
a300682f
Commit
a300682f
authored
Oct 09, 2003
by
Mike McCormack
Committed by
Alexandre Julliard
Oct 09, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle quoting on the command line in uninstaller.
parent
9964e429
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
20 deletions
+30
-20
Makefile.in
programs/uninstaller/Makefile.in
+1
-1
main.c
programs/uninstaller/main.c
+29
-19
No files found.
programs/uninstaller/Makefile.in
View file @
a300682f
...
...
@@ -3,7 +3,7 @@ TOPOBJDIR = ../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
MODULE
=
uninstaller.exe
APPMODE
=
g
ui
APPMODE
=
c
ui
IMPORTS
=
user32 gdi32 advapi32 kernel32
C_SRCS
=
\
...
...
programs/uninstaller/main.c
View file @
a300682f
...
...
@@ -121,33 +121,43 @@ void RemoveSpecificProgram(char *name)
}
}
int
WINAPI
WinMain
(
HINSTANCE
hInst
,
HINSTANCE
hPrevInst
,
LPSTR
cmdline
,
int
cmdshow
)
int
main
(
int
argc
,
char
*
argv
[])
{
MSG
msg
;
WNDCLASS
wc
;
HWND
hWnd
;
LPSTR
token
=
NULL
;
int
i
=
1
;
HINSTANCE
hInst
=
NULL
;
/*------------------------------------------------------------------------
** Handle requests just to list the programs
**----------------------------------------------------------------------*/
if
(
cmdline
&&
strlen
(
cmdline
)
>=
6
&&
memcmp
(
cmdline
,
"--list"
,
6
)
==
0
)
while
(
i
<
argc
)
{
ListUninstallPrograms
();
return
(
0
);
}
token
=
argv
[
i
++
];
/*------------------------------------------------------------------------
** Handle requests to remove one program
**----------------------------------------------------------------------*/
if
(
cmdline
&&
strlen
(
cmdline
)
>
9
&&
memcmp
(
cmdline
,
"--remove "
,
9
)
==
0
)
{
RemoveSpecificProgram
(
cmdline
+
9
);
return
(
0
);
/* Handle requests just to list the programs */
if
(
!
lstrcmpA
(
token
,
"--list"
)
)
{
ListUninstallPrograms
();
return
0
;
}
else
if
(
!
lstrcmpA
(
token
,
"--remove"
)
)
{
if
(
i
>=
argc
)
{
WINE_ERR
(
"The remove option requires a parameter.
\n
"
);
return
1
;
}
RemoveSpecificProgram
(
argv
[
i
++
]
);
return
0
;
}
else
{
WINE_ERR
(
"unknown option %s
\n
"
,
token
);
return
1
;
}
}
LoadString
(
hInst
,
IDS_APPNAME
,
appname
,
sizeof
(
appname
));
wc
.
style
=
0
;
...
...
@@ -169,7 +179,7 @@ int WINAPI WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdline, int cmd
if
(
!
hWnd
)
exit
(
1
);
ShowWindow
(
hWnd
,
cmdshow
);
ShowWindow
(
hWnd
,
SW_SHOW
);
UpdateWindow
(
hWnd
);
while
(
GetMessage
(
&
msg
,
NULL_HANDLE
,
0
,
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