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
280dbcf8
Commit
280dbcf8
authored
Aug 23, 2011
by
Michał Ziętek
Committed by
Alexandre Julliard
Aug 25, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wscript: Implemented Host_get_Interactive.
parent
4252bd86
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
3 deletions
+32
-3
host.c
programs/wscript/host.c
+5
-2
main.c
programs/wscript/main.c
+24
-1
run.js
programs/wscript/tests/run.js
+1
-0
wscript.h
programs/wscript/wscript.h
+2
-0
No files found.
programs/wscript/host.c
View file @
280dbcf8
...
...
@@ -34,6 +34,7 @@
static
const
WCHAR
wshNameW
[]
=
{
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
' '
,
'S'
,
'c'
,
'r'
,
'i'
,
'p'
,
't'
,
' '
,
'H'
,
'o'
,
's'
,
't'
,
0
};
static
const
WCHAR
wshVersionW
[]
=
{
'5'
,
'.'
,
'8'
};
VARIANT_BOOL
wshInteractive
=
VARIANT_TRUE
;
WINE_DEFAULT_DEBUG_CHANNEL
(
wscript
);
...
...
@@ -145,8 +146,10 @@ static HRESULT WINAPI Host_get_Path(IHost *iface, BSTR *out_Path)
static
HRESULT
WINAPI
Host_get_Interactive
(
IHost
*
iface
,
VARIANT_BOOL
*
out_Interactive
)
{
WINE_FIXME
(
"(%p)
\n
"
,
out_Interactive
);
return
E_NOTIMPL
;
WINE_TRACE
(
"(%p)
\n
"
,
out_Interactive
);
*
out_Interactive
=
wshInteractive
;
return
S_OK
;
}
static
HRESULT
WINAPI
Host_put_Interactive
(
IHost
*
iface
,
VARIANT_BOOL
v
)
...
...
programs/wscript/main.c
View file @
280dbcf8
...
...
@@ -322,6 +322,28 @@ static void run_script(const WCHAR *filename, IActiveScript *script, IActiveScri
WINE_FIXME
(
"SetScriptState failed: %08x
\n
"
,
hres
);
}
static
BOOL
set_host_properties
(
const
WCHAR
*
prop
)
{
static
const
WCHAR
iactive
[]
=
{
'i'
,
0
};
static
const
WCHAR
batch
[]
=
{
'b'
,
0
};
if
(
*
prop
==
'/'
)
{
++
prop
;
if
(
*
prop
==
'/'
)
++
prop
;
}
else
++
prop
;
if
(
strcmpiW
(
prop
,
iactive
)
==
0
)
wshInteractive
=
VARIANT_TRUE
;
else
if
(
strcmpiW
(
prop
,
batch
)
==
0
)
wshInteractive
=
VARIANT_FALSE
;
else
return
FALSE
;
return
TRUE
;
}
int
WINAPI
wWinMain
(
HINSTANCE
hInst
,
HINSTANCE
hPrevInst
,
LPWSTR
cmdline
,
int
cmdshow
)
{
const
WCHAR
*
ext
,
*
filename
=
NULL
;
...
...
@@ -340,7 +362,8 @@ int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPWSTR cmdline, int cm
for
(
i
=
0
;
i
<
argc
;
i
++
)
{
if
(
*
argv
[
i
]
==
'/'
||
*
argv
[
i
]
==
'-'
)
{
WINE_FIXME
(
"Unsupported argument %s
\n
"
,
wine_dbgstr_w
(
argv
[
i
]));
if
(
!
set_host_properties
(
argv
[
i
]))
return
1
;
}
else
{
filename
=
argv
[
i
];
argums
=
argv
+
i
+
1
;
...
...
programs/wscript/tests/run.js
View file @
280dbcf8
...
...
@@ -42,5 +42,6 @@ try {
}
catch
(
e
)
{}
ok
(
WScript
.
Arguments
.
Count
()
===
3
,
"WScript.Arguments.Count() = "
+
WScript
.
Arguments
.
Count
());
ok
(
WScript
.
Arguments
.
length
===
3
,
"WScript.Arguments.length = "
+
WScript
.
Arguments
.
length
);
ok
(
WScript
.
Interactive
===
true
,
"WScript.Interactive = "
+
WScript
.
Interactive
);
winetest
.
reportSuccess
();
programs/wscript/wscript.h
View file @
280dbcf8
...
...
@@ -31,3 +31,5 @@ extern WCHAR scriptFullName[];
extern
WCHAR
**
argums
;
extern
int
numOfArgs
;
extern
VARIANT_BOOL
wshInteractive
;
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