dxdiag: Introduce the information collection infrastructure.
This commit is contained in:
parent
4122cf2df9
commit
c349a34e16
|
@ -4,6 +4,7 @@ APPMODE = -mwindows -municode
|
||||||
IMPORTS = user32
|
IMPORTS = user32
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
|
information.c \
|
||||||
main.c \
|
main.c \
|
||||||
output.c
|
output.c
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,12 @@
|
||||||
#define STRING_DXDIAG_TOOL 101
|
#define STRING_DXDIAG_TOOL 101
|
||||||
#define STRING_USAGE 102
|
#define STRING_USAGE 102
|
||||||
|
|
||||||
|
/* Information collection definitions. */
|
||||||
|
struct dxdiag_information;
|
||||||
|
|
||||||
|
struct dxdiag_information *collect_dxdiag_information(BOOL whql_check);
|
||||||
|
void free_dxdiag_information(struct dxdiag_information *dxdiag_info);
|
||||||
|
|
||||||
/* Output backend definitions. */
|
/* Output backend definitions. */
|
||||||
enum output_type
|
enum output_type
|
||||||
{
|
{
|
||||||
|
@ -50,4 +56,4 @@ static inline const char *debugstr_output_type(enum output_type type)
|
||||||
}
|
}
|
||||||
|
|
||||||
const WCHAR *get_output_extension(enum output_type type);
|
const WCHAR *get_output_extension(enum output_type type);
|
||||||
BOOL output_dxdiag_information(const WCHAR *filename, enum output_type type);
|
BOOL output_dxdiag_information(struct dxdiag_information *dxdiag_info, const WCHAR *filename, enum output_type type);
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
/*
|
||||||
|
* DxDiag information collection
|
||||||
|
*
|
||||||
|
* Copyright 2011 Andrew Nguyen
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "wine/debug.h"
|
||||||
|
|
||||||
|
#include "dxdiag_private.h"
|
||||||
|
|
||||||
|
WINE_DEFAULT_DEBUG_CHANNEL(dxdiag);
|
||||||
|
|
||||||
|
void free_dxdiag_information(struct dxdiag_information *system_info)
|
||||||
|
{
|
||||||
|
/* Do nothing for now. */
|
||||||
|
}
|
||||||
|
|
||||||
|
struct dxdiag_information *collect_dxdiag_information(BOOL whql_check)
|
||||||
|
{
|
||||||
|
WINE_FIXME("DxDiag information collection is not implemented\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
|
@ -174,6 +174,7 @@ static BOOL process_command_line(const WCHAR *cmdline, struct command_line_info
|
||||||
int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPWSTR cmdline, int cmdshow)
|
int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPWSTR cmdline, int cmdshow)
|
||||||
{
|
{
|
||||||
struct command_line_info info;
|
struct command_line_info info;
|
||||||
|
struct dxdiag_information *dxdiag_info;
|
||||||
|
|
||||||
hInstance = hInst;
|
hInstance = hInst;
|
||||||
|
|
||||||
|
@ -185,10 +186,19 @@ int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPWSTR cmdline, int cm
|
||||||
if (info.output_type != OUTPUT_NONE)
|
if (info.output_type != OUTPUT_NONE)
|
||||||
WINE_TRACE("Output filename: %s\n", debugstr_output_type(info.output_type));
|
WINE_TRACE("Output filename: %s\n", debugstr_output_type(info.output_type));
|
||||||
|
|
||||||
|
dxdiag_info = collect_dxdiag_information(info.whql_check);
|
||||||
|
if (!dxdiag_info)
|
||||||
|
{
|
||||||
|
WINE_ERR("DxDiag information collection failed\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (info.output_type != OUTPUT_NONE)
|
if (info.output_type != OUTPUT_NONE)
|
||||||
output_dxdiag_information(info.outfile, info.output_type);
|
output_dxdiag_information(dxdiag_info, info.outfile, info.output_type);
|
||||||
else
|
else
|
||||||
WINE_FIXME("Information dialog is not implemented\n");
|
WINE_FIXME("Information dialog is not implemented\n");
|
||||||
|
|
||||||
|
free_dxdiag_information(dxdiag_info);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ const WCHAR *get_output_extension(enum output_type type)
|
||||||
return output_backends[type - 1].filename_ext;
|
return output_backends[type - 1].filename_ext;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL output_dxdiag_information(const WCHAR *filename, enum output_type type)
|
BOOL output_dxdiag_information(struct dxdiag_information *dxdiag_info, const WCHAR *filename, enum output_type type)
|
||||||
{
|
{
|
||||||
WINE_FIXME("File information output is not implemented\n");
|
WINE_FIXME("File information output is not implemented\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in New Issue