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
de02d20e
Commit
de02d20e
authored
Feb 19, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winetest: Try to trigger the Gecko install for mshtml tests, and skip them otherwise.
parent
cd656fa7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
1 deletion
+37
-1
Makefile.in
programs/winetest/Makefile.in
+1
-1
main.c
programs/winetest/main.c
+36
-0
No files found.
programs/winetest/Makefile.in
View file @
de02d20e
...
@@ -4,7 +4,7 @@ SRCDIR = @srcdir@
...
@@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
VPATH
=
@srcdir@
MODULE
=
winetest.exe
MODULE
=
winetest.exe
APPMODE
=
-mconsole
APPMODE
=
-mconsole
IMPORTS
=
comctl32 version user32 gdi32 advapi32 wsock32 kernel32
IMPORTS
=
uuid
comctl32 version user32 gdi32 advapi32 wsock32 kernel32
EXTRARCFLAGS
=
-DBUILD_SHA1
=
\"
`
GIT_DIR
=
$(TOPSRCDIR)
/.git git rev-parse HEAD 2>/dev/null
`
\"
EXTRARCFLAGS
=
-DBUILD_SHA1
=
\"
`
GIT_DIR
=
$(TOPSRCDIR)
/.git git rev-parse HEAD 2>/dev/null
`
\"
...
...
programs/winetest/main.c
View file @
de02d20e
...
@@ -28,9 +28,11 @@
...
@@ -28,9 +28,11 @@
#include "config.h"
#include "config.h"
#include "wine/port.h"
#include "wine/port.h"
#define COBJMACROS
#include <stdio.h>
#include <stdio.h>
#include <assert.h>
#include <assert.h>
#include <windows.h>
#include <windows.h>
#include <mshtml.h>
#include "winetest.h"
#include "winetest.h"
#include "resource.h"
#include "resource.h"
...
@@ -149,6 +151,34 @@ static int running_on_visible_desktop (void)
...
@@ -149,6 +151,34 @@ static int running_on_visible_desktop (void)
return
IsWindowVisible
(
desktop
);
return
IsWindowVisible
(
desktop
);
}
}
/* check if Gecko is present, trying to trigger the install if not */
static
BOOL
gecko_check
(
void
)
{
HMODULE
mshtml
;
HRESULT
(
WINAPI
*
pDllGetClassObject
)(
REFCLSID
rclsid
,
REFIID
riid
,
LPVOID
*
ppv
);
IClassFactory
*
factory
=
NULL
;
IHTMLDocument2
*
doc
=
NULL
;
IHTMLElement
*
body
;
BOOL
ret
=
FALSE
;
if
(
!
(
mshtml
=
LoadLibraryA
(
"mshtml.dll"
)))
return
FALSE
;
if
(
!
(
pDllGetClassObject
=
(
void
*
)
GetProcAddress
(
mshtml
,
"DllGetClassObject"
)))
goto
done
;
if
(
FAILED
(
pDllGetClassObject
(
&
CLSID_HTMLDocument
,
&
IID_IClassFactory
,
(
void
**
)
&
factory
)))
goto
done
;
if
(
FAILED
(
IClassFactory_CreateInstance
(
factory
,
NULL
,
&
IID_IHTMLDocument2
,
(
void
**
)
&
doc
)))
goto
done
;
if
(
FAILED
(
IHTMLDocument2_get_body
(
doc
,
&
body
)))
goto
done
;
IHTMLElement_Release
(
body
);
ret
=
TRUE
;
done:
if
(
doc
)
IHTMLDocument_Release
(
doc
);
if
(
factory
)
IClassFactory_Release
(
factory
);
FreeLibrary
(
mshtml
);
return
ret
;
}
static
void
print_version
(
void
)
static
void
print_version
(
void
)
{
{
#ifdef __i386__
#ifdef __i386__
...
@@ -520,6 +550,12 @@ extract_test_proc (HMODULE hModule, LPCTSTR lpszType,
...
@@ -520,6 +550,12 @@ extract_test_proc (HMODULE hModule, LPCTSTR lpszType,
xprintf
(
" %s=dll is missing
\n
"
,
dllname
);
xprintf
(
" %s=dll is missing
\n
"
,
dllname
);
return
TRUE
;
return
TRUE
;
}
}
if
(
!
strcmp
(
dllname
,
"mshtml"
)
&&
running_under_wine
()
&&
!
gecko_check
())
{
FreeLibrary
(
dll
);
xprintf
(
" %s=load error Gecko is not installed
\n
"
,
dllname
);
return
TRUE
;
}
GetModuleFileNameA
(
dll
,
filename
,
MAX_PATH
);
GetModuleFileNameA
(
dll
,
filename
,
MAX_PATH
);
FreeLibrary
(
dll
);
FreeLibrary
(
dll
);
...
...
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