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
bfdfae1c
Commit
bfdfae1c
authored
Aug 20, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 20, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wscript.exe: Improved argument parsing.
parent
3bae9b72
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
7 deletions
+24
-7
Makefile.in
programs/wscript/Makefile.in
+1
-1
main.c
programs/wscript/main.c
+23
-6
No files found.
programs/wscript/Makefile.in
View file @
bfdfae1c
...
...
@@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
MODULE
=
wscript.exe
APPMODE
=
-mwindows
-municode
IMPORTS
=
uuid oleaut32 ole32 advapi32
IMPORTS
=
uuid
shell32
oleaut32 ole32 advapi32
EXTRADEFS
=
-DWINE_NO_UNICODE_MACROS
RC_SRCS
=
\
...
...
programs/wscript/main.c
View file @
bfdfae1c
...
...
@@ -320,21 +320,38 @@ static void run_script(const WCHAR *filename, IActiveScript *script, IActiveScri
int
WINAPI
wWinMain
(
HINSTANCE
hInst
,
HINSTANCE
hPrevInst
,
LPWSTR
cmdline
,
int
cmdshow
)
{
const
WCHAR
*
ext
,
*
filename
=
NULL
;
IActiveScriptParse
*
parser
;
IActiveScript
*
script
;
const
WCHAR
*
ext
;
WCHAR
**
argv
;
CLSID
clsid
;
int
argc
,
i
;
WINE_TRACE
(
"(%p %p %s %x)
\n
"
,
hInst
,
hPrevInst
,
wine_dbgstr_w
(
cmdline
),
cmdshow
);
if
(
!*
cmdline
)
argv
=
CommandLineToArgvW
(
cmdline
,
&
argc
);
if
(
!
argv
)
return
1
;
ext
=
strchrW
(
cmdline
,
'.'
);
for
(
i
=
0
;
i
<
argc
;
i
++
)
{
if
(
*
argv
[
i
]
==
'/'
||
*
argv
[
i
]
==
'-'
)
{
WINE_FIXME
(
"Unsupported argument %s
\n
"
,
wine_dbgstr_w
(
argv
[
i
]));
}
else
{
filename
=
argv
[
i
];
break
;
}
}
if
(
!
filename
)
{
WINE_FIXME
(
"No file name specified
\n
"
);
return
1
;
}
ext
=
strchrW
(
filename
,
'.'
);
if
(
!
ext
)
ext
=
cmdlin
e
;
ext
=
filenam
e
;
if
(
!
get_engine_clsid
(
ext
,
&
clsid
))
{
WINE_FIXME
(
"Could not fin
e
engine for %s
\n
"
,
wine_dbgstr_w
(
ext
));
WINE_FIXME
(
"Could not fin
d
engine for %s
\n
"
,
wine_dbgstr_w
(
ext
));
return
1
;
}
...
...
@@ -347,7 +364,7 @@ int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPWSTR cmdline, int cm
}
if
(
init_engine
(
script
,
parser
))
{
run_script
(
cmdlin
e
,
script
,
parser
);
run_script
(
filenam
e
,
script
,
parser
);
IActiveScript_Close
(
script
);
ITypeInfo_Release
(
host_ti
);
}
else
{
...
...
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