Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
a300682f
Commit
a300682f
authored
21 years ago
by
Michael McCormack
Committed by
Alexandre Julliard
21 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Handle quoting on the command line in uninstaller.
parent
9964e429
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
programs/uninstaller/Makefile.in
+1
-1
1 addition, 1 deletion
programs/uninstaller/Makefile.in
programs/uninstaller/main.c
+29
-19
29 additions, 19 deletions
programs/uninstaller/main.c
with
30 additions
and
20 deletions
programs/uninstaller/Makefile.in
+
1
−
1
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
=
\
...
...
This diff is collapsed.
Click to expand it.
programs/uninstaller/main.c
+
29
−
19
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
)
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment