https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4cfc324cd1bf5e236f809…
commit 4cfc324cd1bf5e236f809039fb2a46216e2c653b
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Mon Dec 18 13:48:13 2017 +0100
[MSI_WINETEST] Add a PCH.
---
modules/rostests/winetests/msi/CMakeLists.txt | 5 +++--
modules/rostests/winetests/msi/action.c | 16 +---------------
modules/rostests/winetests/msi/automation.c | 13 ++-----------
modules/rostests/winetests/msi/db.c | 12 +-----------
modules/rostests/winetests/msi/format.c | 8 +-------
modules/rostests/winetests/msi/install.c | 16 +---------------
modules/rostests/winetests/msi/msi.c | 13 +------------
modules/rostests/winetests/msi/package.c | 10 +---------
modules/rostests/winetests/msi/patch.c | 12 +-----------
modules/rostests/winetests/msi/precomp.h | 27 +++++++++++++++++++++++++++
modules/rostests/winetests/msi/record.c | 6 +-----
modules/rostests/winetests/msi/source.c | 11 +----------
modules/rostests/winetests/msi/suminfo.c | 10 +---------
13 files changed, 42 insertions(+), 117 deletions(-)
diff --git a/modules/rostests/winetests/msi/CMakeLists.txt
b/modules/rostests/winetests/msi/CMakeLists.txt
index 01498466d0..3a3a03d77f 100644
--- a/modules/rostests/winetests/msi/CMakeLists.txt
+++ b/modules/rostests/winetests/msi/CMakeLists.txt
@@ -15,10 +15,11 @@ list(APPEND SOURCE
record.c
source.c
suminfo.c
- testlist.c)
+ precomp.h)
-add_executable(msi_winetest ${SOURCE})
+add_executable(msi_winetest ${SOURCE} testlist.c)
target_link_libraries(msi_winetest uuid)
set_module_type(msi_winetest win32cui)
add_importlibs(msi_winetest cabinet msi shell32 ole32 oleaut32 user32 advapi32 version
msvcrt kernel32)
+add_pch(msi_winetest precomp.h SOURCE)
add_rostests_file(TARGET msi_winetest)
diff --git a/modules/rostests/winetests/msi/action.c
b/modules/rostests/winetests/msi/action.c
index 11e244c6e2..7d8eaa2ebf 100644
--- a/modules/rostests/winetests/msi/action.c
+++ b/modules/rostests/winetests/msi/action.c
@@ -19,21 +19,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define _WIN32_MSI 300
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <windows.h>
-#include <msiquery.h>
-#include <msidefs.h>
-#include <msi.h>
-#include <fci.h>
-#include <srrestoreptapi.h>
-#include <wtypes.h>
-#include <shellapi.h>
-#include <winsvc.h>
-
-#include "wine/test.h"
+#include "precomp.h"
static UINT (WINAPI *pMsiQueryComponentStateA)
(LPCSTR, LPCSTR, MSIINSTALLCONTEXT, LPCSTR, INSTALLSTATE *);
diff --git a/modules/rostests/winetests/msi/automation.c
b/modules/rostests/winetests/msi/automation.c
index e4d2faad5c..1cb4959bc3 100644
--- a/modules/rostests/winetests/msi/automation.c
+++ b/modules/rostests/winetests/msi/automation.c
@@ -19,19 +19,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define COBJMACROS
-#include <stdio.h>
+#include "precomp.h"
-#include <initguid.h>
-#include <windows.h>
-#include <msiquery.h>
-#include <msidefs.h>
-#include <msi.h>
-#include <fci.h>
-#include <oaidl.h>
-
-#include "wine/test.h"
+#include <ole2.h>
static BOOL is_wow64;
diff --git a/modules/rostests/winetests/msi/db.c b/modules/rostests/winetests/msi/db.c
index 4ea1f10024..5f0738d845 100644
--- a/modules/rostests/winetests/msi/db.c
+++ b/modules/rostests/winetests/msi/db.c
@@ -18,17 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define COBJMACROS
-
-#include <stdio.h>
-
-#include <windows.h>
-#include <objidl.h>
-#include <msi.h>
-#include <msidefs.h>
-#include <msiquery.h>
-
-#include "wine/test.h"
+#include "precomp.h"
static const char *msifile = "winetest-db.msi";
static const char *msifile2 = "winetst2-db.msi";
diff --git a/modules/rostests/winetests/msi/format.c
b/modules/rostests/winetests/msi/format.c
index b476c6b290..a8bd290069 100644
--- a/modules/rostests/winetests/msi/format.c
+++ b/modules/rostests/winetests/msi/format.c
@@ -19,13 +19,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdio.h>
-#include <windows.h>
-#include <shlwapi.h>
-#include <msi.h>
-#include <msiquery.h>
-
-#include "wine/test.h"
+#include "precomp.h"
static const char msifile[] = "winetest-format.msi";
static const WCHAR msifileW[] =
diff --git a/modules/rostests/winetests/msi/install.c
b/modules/rostests/winetests/msi/install.c
index 47a8ad9eff..21ef1b2e79 100644
--- a/modules/rostests/winetests/msi/install.c
+++ b/modules/rostests/winetests/msi/install.c
@@ -18,21 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define _WIN32_MSI 300
-#define COBJMACROS
-
-#include <stdio.h>
-
-#include <windows.h>
-#include <msiquery.h>
-#include <msidefs.h>
-#include <msi.h>
-#include <fci.h>
-#include <objidl.h>
-#include <srrestoreptapi.h>
-#include <shlobj.h>
-
-#include "wine/test.h"
+#include "precomp.h"
static UINT (WINAPI *pMsiQueryComponentStateA)
(LPCSTR, LPCSTR, MSIINSTALLCONTEXT, LPCSTR, INSTALLSTATE*);
diff --git a/modules/rostests/winetests/msi/msi.c b/modules/rostests/winetests/msi/msi.c
index 6ae7753870..25d9dad459 100644
--- a/modules/rostests/winetests/msi/msi.c
+++ b/modules/rostests/winetests/msi/msi.c
@@ -18,18 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define _WIN32_MSI 300
-#define COBJMACROS
-
-#include <stdio.h>
-#include <windows.h>
-#include <msi.h>
-#include <msiquery.h>
-#include <msidefs.h>
-#include <sddl.h>
-#include <fci.h>
-
-#include "wine/test.h"
+#include "precomp.h"
static BOOL is_wow64;
static const char msifile[] = "winetest.msi";
diff --git a/modules/rostests/winetests/msi/package.c
b/modules/rostests/winetests/msi/package.c
index c00ed61c18..6834bec6af 100644
--- a/modules/rostests/winetests/msi/package.c
+++ b/modules/rostests/winetests/msi/package.c
@@ -19,19 +19,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define COBJMACROS
+#include "precomp.h"
#include <assert.h>
-#include <stdio.h>
-#include <windows.h>
-#include <msidefs.h>
-#include <msi.h>
-#include <msiquery.h>
-#include <srrestoreptapi.h>
#include <shlobj.h>
-#include "wine/test.h"
-
static BOOL is_wow64;
static const char msifile[] = "winetest-package.msi";
static const WCHAR msifileW[] =
diff --git a/modules/rostests/winetests/msi/patch.c
b/modules/rostests/winetests/msi/patch.c
index 6aeb4b1615..bb2276ee58 100644
--- a/modules/rostests/winetests/msi/patch.c
+++ b/modules/rostests/winetests/msi/patch.c
@@ -18,17 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define _WIN32_MSI 300
-#define COBJMACROS
-
-#include <stdio.h>
-
-#include <windows.h>
-#include <msiquery.h>
-#include <msidefs.h>
-#include <msi.h>
-
-#include "wine/test.h"
+#include "precomp.h"
static UINT (WINAPI *pMsiApplyPatchA)( LPCSTR, LPCSTR, INSTALLTYPE, LPCSTR );
static UINT (WINAPI *pMsiGetPatchInfoExA)( LPCSTR, LPCSTR, LPCSTR, MSIINSTALLCONTEXT,
diff --git a/modules/rostests/winetests/msi/precomp.h
b/modules/rostests/winetests/msi/precomp.h
new file mode 100644
index 0000000000..67839b12f0
--- /dev/null
+++ b/modules/rostests/winetests/msi/precomp.h
@@ -0,0 +1,27 @@
+#ifndef _MSI_WINETEST_PRECOMP_H_
+#define _MSI_WINETEST_PRECOMP_H_
+
+#define _WIN32_MSI 300
+
+#include <stdio.h>
+
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+#define COBJMACROS
+
+#include <wine/test.h>
+
+#include <winuser.h>
+#include <winreg.h>
+#include <winnls.h>
+#include <winsvc.h>
+#include <winver.h>
+#include <objbase.h>
+#include <msiquery.h>
+#include <msidefs.h>
+#include <fci.h>
+#include <srrestoreptapi.h>
+#include <shellapi.h>
+
+#endif /* !_MSI_WINETEST_PRECOMP_H_ */
diff --git a/modules/rostests/winetests/msi/record.c
b/modules/rostests/winetests/msi/record.c
index 5caaefc72d..1106e25376 100644
--- a/modules/rostests/winetests/msi/record.c
+++ b/modules/rostests/winetests/msi/record.c
@@ -18,11 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <windows.h>
-#include <msi.h>
-#include <msiquery.h>
-
-#include "wine/test.h"
+#include "precomp.h"
static const char *msifile = "winetest-record.msi";
static const WCHAR msifileW[] =
diff --git a/modules/rostests/winetests/msi/source.c
b/modules/rostests/winetests/msi/source.c
index 1d94695609..daf2979bbb 100644
--- a/modules/rostests/winetests/msi/source.c
+++ b/modules/rostests/winetests/msi/source.c
@@ -18,19 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define _WIN32_MSI 300
+#include "precomp.h"
-#include <stdio.h>
-
-#include <windows.h>
-#include <msiquery.h>
-#include <msidefs.h>
-#include <msi.h>
-#include <sddl.h>
#include <secext.h>
-#include "wine/test.h"
-
static BOOL is_wow64;
static BOOL (WINAPI *pConvertSidToStringSidA)(PSID, LPSTR*);
diff --git a/modules/rostests/winetests/msi/suminfo.c
b/modules/rostests/winetests/msi/suminfo.c
index 8c2e292ab8..40fcef4488 100644
--- a/modules/rostests/winetests/msi/suminfo.c
+++ b/modules/rostests/winetests/msi/suminfo.c
@@ -18,15 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define COBJMACROS
-
-#include <stdio.h>
-#include <windows.h>
-#include <msi.h>
-#include <msiquery.h>
-#include <objidl.h>
-
-#include "wine/test.h"
+#include "precomp.h"
/*
* The following are defined in Windows SDK's msidefs.h