mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 18:35:41 +00:00
[CSCRIPT][WSCRIPT] Sync with Wine Staging 3.3. CORE-14434
This commit is contained in:
parent
407c54bae3
commit
eae3333c2f
8 changed files with 79 additions and 42 deletions
|
@ -7,7 +7,7 @@ list(APPEND SOURCE
|
||||||
${wscript_folder}/arguments.c
|
${wscript_folder}/arguments.c
|
||||||
${wscript_folder}/host.c
|
${wscript_folder}/host.c
|
||||||
${wscript_folder}/main.c
|
${wscript_folder}/main.c
|
||||||
${wscript_folder}/wscript.h)
|
${wscript_folder}/precomp.h)
|
||||||
|
|
||||||
add_executable(cscript ${SOURCE} rsrc.rc)
|
add_executable(cscript ${SOURCE} rsrc.rc)
|
||||||
add_idl_headers(cscript_idlheader ihost.idl)
|
add_idl_headers(cscript_idlheader ihost.idl)
|
||||||
|
@ -17,5 +17,5 @@ target_link_libraries(cscript uuid wine)
|
||||||
set_module_type(cscript win32cui UNICODE)
|
set_module_type(cscript win32cui UNICODE)
|
||||||
add_importlibs(cscript shell32 oleaut32 ole32 advapi32 user32 msvcrt kernel32 ntdll)
|
add_importlibs(cscript shell32 oleaut32 ole32 advapi32 user32 msvcrt kernel32 ntdll)
|
||||||
add_dependencies(cscript stdole2 cscript_idlheader)
|
add_dependencies(cscript stdole2 cscript_idlheader)
|
||||||
add_pch(cscript ${wscript_folder}/wscript.h SOURCE)
|
add_pch(cscript ${wscript_folder}/precomp.h SOURCE)
|
||||||
add_cd_file(TARGET cscript DESTINATION reactos/system32 FOR all)
|
add_cd_file(TARGET cscript DESTINATION reactos/system32 FOR all)
|
||||||
|
|
|
@ -3,7 +3,7 @@ list(APPEND SOURCE
|
||||||
arguments.c
|
arguments.c
|
||||||
host.c
|
host.c
|
||||||
main.c
|
main.c
|
||||||
wscript.h)
|
precomp.h)
|
||||||
|
|
||||||
add_executable(wscript ${SOURCE} rsrc.rc)
|
add_executable(wscript ${SOURCE} rsrc.rc)
|
||||||
add_idl_headers(wscript_idlheader ihost.idl)
|
add_idl_headers(wscript_idlheader ihost.idl)
|
||||||
|
@ -13,5 +13,5 @@ target_link_libraries(wscript uuid wine)
|
||||||
set_module_type(wscript win32gui UNICODE)
|
set_module_type(wscript win32gui UNICODE)
|
||||||
add_importlibs(wscript shell32 oleaut32 ole32 user32 advapi32 msvcrt kernel32 ntdll)
|
add_importlibs(wscript shell32 oleaut32 ole32 user32 advapi32 msvcrt kernel32 ntdll)
|
||||||
add_dependencies(wscript stdole2 wscript_idlheader)
|
add_dependencies(wscript stdole2 wscript_idlheader)
|
||||||
add_pch(wscript wscript.h SOURCE)
|
add_pch(wscript precomp.h SOURCE)
|
||||||
add_cd_file(TARGET wscript DESTINATION reactos/system32 FOR all)
|
add_cd_file(TARGET wscript DESTINATION reactos/system32 FOR all)
|
||||||
|
|
|
@ -16,8 +16,21 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#define COBJMACROS
|
||||||
|
#define CONST_VTABLE
|
||||||
|
|
||||||
|
#include <windef.h>
|
||||||
|
#include <winbase.h>
|
||||||
|
#include <ole2.h>
|
||||||
|
|
||||||
#include "wscript.h"
|
#include "wscript.h"
|
||||||
|
|
||||||
|
#include <wine/debug.h>
|
||||||
|
|
||||||
|
WINE_DEFAULT_DEBUG_CHANNEL(wscript);
|
||||||
|
|
||||||
WCHAR **argums;
|
WCHAR **argums;
|
||||||
int numOfArgs;
|
int numOfArgs;
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,23 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#define COBJMACROS
|
||||||
|
#define CONST_VTABLE
|
||||||
|
|
||||||
|
#include <windef.h>
|
||||||
|
#include <winbase.h>
|
||||||
|
#include <ole2.h>
|
||||||
|
|
||||||
#include "wscript.h"
|
#include "wscript.h"
|
||||||
|
|
||||||
|
#include <wine/debug.h>
|
||||||
|
#include <wine/heap.h>
|
||||||
|
#include <wine/unicode.h>
|
||||||
|
|
||||||
|
WINE_DEFAULT_DEBUG_CHANNEL(wscript);
|
||||||
|
|
||||||
#define BUILDVERSION 16535
|
#define BUILDVERSION 16535
|
||||||
|
|
||||||
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 wshNameW[] = {'W','i','n','d','o','w','s',' ','S','c','r','i','p','t',' ','H','o','s','t',0};
|
||||||
|
@ -307,7 +322,11 @@ static HRESULT WINAPI Host_Echo(IHost *iface, SAFEARRAY *args)
|
||||||
{
|
{
|
||||||
WCHAR *output = NULL, *ptr;
|
WCHAR *output = NULL, *ptr;
|
||||||
unsigned argc, i, len;
|
unsigned argc, i, len;
|
||||||
|
#ifdef __REACTOS__
|
||||||
LONG ubound, lbound;
|
LONG ubound, lbound;
|
||||||
|
#else
|
||||||
|
int ubound, lbound;
|
||||||
|
#endif
|
||||||
VARIANT *argv;
|
VARIANT *argv;
|
||||||
BSTR *strs;
|
BSTR *strs;
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
|
|
@ -16,10 +16,25 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "wscript.h"
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#define COBJMACROS
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
#define CONST_VTABLE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <windef.h>
|
||||||
|
#include <winbase.h>
|
||||||
|
#include <winreg.h>
|
||||||
|
#include <ole2.h>
|
||||||
#include <shellapi.h>
|
#include <shellapi.h>
|
||||||
#include <activscp.h>
|
#include <activscp.h>
|
||||||
|
#include <initguid.h>
|
||||||
|
|
||||||
|
#include "wscript.h"
|
||||||
|
|
||||||
|
#include <wine/debug.h>
|
||||||
|
#include <wine/unicode.h>
|
||||||
|
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
|
|
||||||
|
@ -35,6 +50,8 @@
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
WINE_DEFAULT_DEBUG_CHANNEL(wscript);
|
||||||
|
|
||||||
static const WCHAR wscriptW[] = {'W','S','c','r','i','p','t',0};
|
static const WCHAR wscriptW[] = {'W','S','c','r','i','p','t',0};
|
||||||
static const WCHAR wshW[] = {'W','S','H',0};
|
static const WCHAR wshW[] = {'W','S','H',0};
|
||||||
WCHAR scriptFullName[MAX_PATH];
|
WCHAR scriptFullName[MAX_PATH];
|
||||||
|
|
21
base/applications/cmdutils/wscript/precomp.h
Normal file
21
base/applications/cmdutils/wscript/precomp.h
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
|
||||||
|
#ifndef _WSCRIPT_PRECOMP_H_
|
||||||
|
#define _WSCRIPT_PRECOMP_H_
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#define WIN32_NO_STATUS
|
||||||
|
#define _INC_WINDOWS
|
||||||
|
#define COBJMACROS
|
||||||
|
#define CONST_VTABLE
|
||||||
|
|
||||||
|
#include <windef.h>
|
||||||
|
#include <winbase.h>
|
||||||
|
#include <initguid.h>
|
||||||
|
#include <ole2.h>
|
||||||
|
#include <wine/debug.h>
|
||||||
|
#include <wine/unicode.h>
|
||||||
|
|
||||||
|
#include "wscript.h"
|
||||||
|
|
||||||
|
#endif /* !_WSCRIPT_PRECOMP_H_ */
|
|
@ -16,25 +16,9 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _WSCRIPT_H_
|
#pragma once
|
||||||
#define _WSCRIPT_H_
|
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include "ihost.h"
|
||||||
|
|
||||||
#define WIN32_NO_STATUS
|
|
||||||
#define _INC_WINDOWS
|
|
||||||
#define COBJMACROS
|
|
||||||
#define CONST_VTABLE
|
|
||||||
|
|
||||||
#include <windef.h>
|
|
||||||
#include <winbase.h>
|
|
||||||
#include <initguid.h>
|
|
||||||
#include <ole2.h>
|
|
||||||
#include <ihost.h>
|
|
||||||
#include <wine/debug.h>
|
|
||||||
#include <wine/unicode.h>
|
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(wscript);
|
|
||||||
|
|
||||||
extern IHost host_obj;
|
extern IHost host_obj;
|
||||||
|
|
||||||
|
@ -51,20 +35,3 @@ extern WCHAR **argums;
|
||||||
extern int numOfArgs;
|
extern int numOfArgs;
|
||||||
|
|
||||||
extern VARIANT_BOOL wshInteractive;
|
extern VARIANT_BOOL wshInteractive;
|
||||||
|
|
||||||
static inline void * __WINE_ALLOC_SIZE(1) heap_alloc(size_t len)
|
|
||||||
{
|
|
||||||
return HeapAlloc(GetProcessHeap(), 0, len);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void * __WINE_ALLOC_SIZE(1) heap_alloc_zero(size_t len)
|
|
||||||
{
|
|
||||||
return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline BOOL heap_free(void *mem)
|
|
||||||
{
|
|
||||||
return HeapFree(GetProcessHeap(), 0, mem);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _WSCRIPT_H_ */
|
|
||||||
|
|
|
@ -226,12 +226,12 @@ reactos/win32ss/printing/monitors/localmon/ui/ # Synced to WineStaging-3.3 (kno
|
||||||
|
|
||||||
ReactOS shares the following programs with Winehq.
|
ReactOS shares the following programs with Winehq.
|
||||||
|
|
||||||
reactos/base/applications/cmdutils/cscript # Synced to WineStaging-2.9
|
reactos/base/applications/cmdutils/cscript # Synced to WineStaging-3.3
|
||||||
reactos/base/applications/cmdutils/reg # Synced to Wine-3.0
|
reactos/base/applications/cmdutils/reg # Synced to Wine-3.0
|
||||||
reactos/base/applications/cmdutils/schtasks # Synced to WineStaging-2.9
|
reactos/base/applications/cmdutils/schtasks # Synced to WineStaging-2.9
|
||||||
reactos/base/applications/cmdutils/taskkill # Synced to Wine-3.0
|
reactos/base/applications/cmdutils/taskkill # Synced to Wine-3.0
|
||||||
reactos/base/applications/cmdutils/wmic # Synced to WineStaging-2.9
|
reactos/base/applications/cmdutils/wmic # Synced to WineStaging-2.9
|
||||||
reactos/base/applications/cmdutils/wscript # Synced to WineStaging-2.9
|
reactos/base/applications/cmdutils/wscript # Synced to WineStaging-3.3
|
||||||
reactos/base/applications/cmdutils/xcopy # Synced to Wine-3.0
|
reactos/base/applications/cmdutils/xcopy # Synced to Wine-3.0
|
||||||
reactos/base/applications/games/winmine # Synced to WineStaging-2.16 with our own resources.
|
reactos/base/applications/games/winmine # Synced to WineStaging-2.16 with our own resources.
|
||||||
reactos/base/applications/extrac32 # Synced to WineStaging-2.9
|
reactos/base/applications/extrac32 # Synced to WineStaging-2.9
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue