From 7ce46d59b48290591f39536acbfc7108ea265366 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Thu, 21 Dec 2017 13:57:22 +0100 Subject: [PATCH] [WINDOWSCODECS_WINETEST] Add a PCH. --- .../winetests/windowscodecs/CMakeLists.txt | 11 +++++++--- .../rostests/winetests/windowscodecs/bitmap.c | 19 +--------------- .../winetests/windowscodecs/bmpformat.c | 17 +------------- .../winetests/windowscodecs/converter.c | 18 +-------------- .../winetests/windowscodecs/gifformat.c | 15 +------------ .../rostests/winetests/windowscodecs/guid.c | 12 ++++++++++ .../winetests/windowscodecs/icoformat.c | 15 +------------ .../rostests/winetests/windowscodecs/info.c | 17 +------------- .../winetests/windowscodecs/metadata.c | 18 +-------------- .../winetests/windowscodecs/palette.c | 15 +------------ .../winetests/windowscodecs/pngformat.c | 17 ++------------ .../winetests/windowscodecs/precomp.h | 22 +++++++++++++++++++ .../winetests/windowscodecs/propertybag.c | 17 +------------- .../rostests/winetests/windowscodecs/stream.c | 10 +-------- .../winetests/windowscodecs/tiffformat.c | 15 +------------ 15 files changed, 55 insertions(+), 183 deletions(-) create mode 100644 modules/rostests/winetests/windowscodecs/guid.c create mode 100644 modules/rostests/winetests/windowscodecs/precomp.h diff --git a/modules/rostests/winetests/windowscodecs/CMakeLists.txt b/modules/rostests/winetests/windowscodecs/CMakeLists.txt index c9a85183346..293a4378534 100644 --- a/modules/rostests/winetests/windowscodecs/CMakeLists.txt +++ b/modules/rostests/winetests/windowscodecs/CMakeLists.txt @@ -13,10 +13,14 @@ list(APPEND SOURCE pngformat.c propertybag.c stream.c - testlist.c - tiffformat.c) + tiffformat.c + precomp.h) + +add_executable(windowscodecs_winetest + ${SOURCE} + guid.c + testlist.c) -add_executable(windowscodecs_winetest ${SOURCE}) set_module_type(windowscodecs_winetest win32cui) add_importlibs(windowscodecs_winetest windowscodecs oleaut32 ole32 propsys user32 gdi32 shlwapi msvcrt kernel32) @@ -24,4 +28,5 @@ if(MSVC) add_importlibs(windowscodecs_winetest ntdll) endif() +add_pch(windowscodecs_winetest precomp.h SOURCE) add_rostests_file(TARGET windowscodecs_winetest) diff --git a/modules/rostests/winetests/windowscodecs/bitmap.c b/modules/rostests/winetests/windowscodecs/bitmap.c index a6655a68779..b35c07fbf18 100644 --- a/modules/rostests/winetests/windowscodecs/bitmap.c +++ b/modules/rostests/winetests/windowscodecs/bitmap.c @@ -17,24 +17,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -//#include -#include -#include -//#include - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS -#define CONST_VTABLE - -#include -#include -#include -#include -#include -#include +#include "precomp.h" static IWICImagingFactory *factory; diff --git a/modules/rostests/winetests/windowscodecs/bmpformat.c b/modules/rostests/winetests/windowscodecs/bmpformat.c index f7565e0da7a..afa2bd92b84 100644 --- a/modules/rostests/winetests/windowscodecs/bmpformat.c +++ b/modules/rostests/winetests/windowscodecs/bmpformat.c @@ -16,22 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS - -#include -#include -#include -#include -//#include "wincodec.h" -#include -#include +#include "precomp.h" static const char testbmp_24bpp[] = { /* BITMAPFILEHEADER */ diff --git a/modules/rostests/winetests/windowscodecs/converter.c b/modules/rostests/winetests/windowscodecs/converter.c index 1f44513262f..baa7a9d3c47 100644 --- a/modules/rostests/winetests/windowscodecs/converter.c +++ b/modules/rostests/winetests/windowscodecs/converter.c @@ -17,23 +17,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include -#include - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS -#define CONST_VTABLE - -#include -#include -#include -#include -#include -#include +#include "precomp.h" static IWICImagingFactory *factory; diff --git a/modules/rostests/winetests/windowscodecs/gifformat.c b/modules/rostests/winetests/windowscodecs/gifformat.c index 4b75d06470b..3af0a80707e 100644 --- a/modules/rostests/winetests/windowscodecs/gifformat.c +++ b/modules/rostests/winetests/windowscodecs/gifformat.c @@ -16,20 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS - -#include -#include -#include -#include -#include +#include "precomp.h" HRESULT WINAPI WICCreateImagingFactory_Proxy(UINT, IWICImagingFactory**); diff --git a/modules/rostests/winetests/windowscodecs/guid.c b/modules/rostests/winetests/windowscodecs/guid.c new file mode 100644 index 00000000000..18f27682655 --- /dev/null +++ b/modules/rostests/winetests/windowscodecs/guid.c @@ -0,0 +1,12 @@ +/* DO NOT USE THE PRECOMPILED HEADER FOR THIS FILE! */ + +#define WIN32_NO_STATUS +#define _INC_WINDOWS + +#include +#include +#include +#include +#include + +/* NO CODE HERE, THIS IS JUST REQUIRED FOR THE GUID DEFINITIONS */ diff --git a/modules/rostests/winetests/windowscodecs/icoformat.c b/modules/rostests/winetests/windowscodecs/icoformat.c index 9bbedc03fba..c6148981318 100644 --- a/modules/rostests/winetests/windowscodecs/icoformat.c +++ b/modules/rostests/winetests/windowscodecs/icoformat.c @@ -16,20 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -//#include - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS - -#include -#include -#include -#include -#include +#include "precomp.h" static unsigned char testico_bad_icondirentry_size[] = { /* ICONDIR */ diff --git a/modules/rostests/winetests/windowscodecs/info.c b/modules/rostests/winetests/windowscodecs/info.c index e1a3a5980b0..83b729adaf2 100644 --- a/modules/rostests/winetests/windowscodecs/info.c +++ b/modules/rostests/winetests/windowscodecs/info.c @@ -16,22 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -//#include -//#include - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS - -#include -#include -#include -//#include "wincodec.h" -#include -#include +#include "precomp.h" #include DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); diff --git a/modules/rostests/winetests/windowscodecs/metadata.c b/modules/rostests/winetests/windowscodecs/metadata.c index f47036185eb..9de1c4d31e1 100644 --- a/modules/rostests/winetests/windowscodecs/metadata.c +++ b/modules/rostests/winetests/windowscodecs/metadata.c @@ -17,26 +17,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -//#include -//#include -#include +#include "precomp.h" -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS - -#include -#include #include -#include -#include -//#include "wincodec.h" -#include #include -#include #include DEFINE_GUID(IID_MdbrUnknown, 0x00240e6f,0x3f23,0x4432,0xb0,0xcc,0x48,0xd5,0xbb,0xff,0x6c,0x36); diff --git a/modules/rostests/winetests/windowscodecs/palette.c b/modules/rostests/winetests/windowscodecs/palette.c index 7302d725821..46d3bc83437 100644 --- a/modules/rostests/winetests/windowscodecs/palette.c +++ b/modules/rostests/winetests/windowscodecs/palette.c @@ -17,20 +17,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS - -#include -#include -#include -#include -#include +#include "precomp.h" static IWICImagingFactory *factory; diff --git a/modules/rostests/winetests/windowscodecs/pngformat.c b/modules/rostests/winetests/windowscodecs/pngformat.c index 4fd84898967..95ead413248 100644 --- a/modules/rostests/winetests/windowscodecs/pngformat.c +++ b/modules/rostests/winetests/windowscodecs/pngformat.c @@ -1,5 +1,5 @@ /* - * Copyright 2012,2016 Dmitry Timoshkov + * Copyright 2012, 2016 Dmitry Timoshkov * Copyright 2012 Hans Leidekker for CodeWeavers * * This library is free software; you can redistribute it and/or @@ -17,21 +17,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -//#include -#include +#include "precomp.h" -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS - -#include -#include -#include -#include -#include -#include #include /* 1x1 pixel PNG image */ diff --git a/modules/rostests/winetests/windowscodecs/precomp.h b/modules/rostests/winetests/windowscodecs/precomp.h new file mode 100644 index 00000000000..59d037ab1fb --- /dev/null +++ b/modules/rostests/winetests/windowscodecs/precomp.h @@ -0,0 +1,22 @@ +#ifndef _WINDOWSCODECS_WINETEST_PRECOMP_H_ +#define _WINDOWSCODECS_WINETEST_PRECOMP_H_ + +#include +#include +#include + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + +#define COBJMACROS +#define CONST_VTABLE + +#include + +#include +#include +#include +#include + +#endif /* _WINDOWSCODECS_WINETEST_PRECOMP_H_ */ diff --git a/modules/rostests/winetests/windowscodecs/propertybag.c b/modules/rostests/winetests/windowscodecs/propertybag.c index 1caee572597..b0a3bd34155 100644 --- a/modules/rostests/winetests/windowscodecs/propertybag.c +++ b/modules/rostests/winetests/windowscodecs/propertybag.c @@ -16,22 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -//#include - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS -#define CONST_VTABLE - -#include -#include -#include -//#include "wincodec.h" -#include -#include +#include "precomp.h" static const WCHAR wszTestProperty1[] = {'P','r','o','p','e','r','t','y','1',0}; static const WCHAR wszTestProperty2[] = {'P','r','o','p','e','r','t','y','2',0}; diff --git a/modules/rostests/winetests/windowscodecs/stream.c b/modules/rostests/winetests/windowscodecs/stream.c index 8b013c16cbf..70807aab649 100644 --- a/modules/rostests/winetests/windowscodecs/stream.c +++ b/modules/rostests/winetests/windowscodecs/stream.c @@ -16,15 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS -#include -#include +#include "precomp.h" static void test_StreamOnMemory(void) { diff --git a/modules/rostests/winetests/windowscodecs/tiffformat.c b/modules/rostests/winetests/windowscodecs/tiffformat.c index bc78182fc21..81bd6409e0d 100644 --- a/modules/rostests/winetests/windowscodecs/tiffformat.c +++ b/modules/rostests/winetests/windowscodecs/tiffformat.c @@ -16,20 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -//#include -#include - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS - -#include -#include -#include -#include -#include +#include "precomp.h" #define IFD_BYTE 1 #define IFD_ASCII 2 -- 2.17.1