[SHELLBTRFS] Add a PCH.
authorAmine Khaldi <amine.khaldi@reactos.org>
Sun, 26 Nov 2017 13:16:29 +0000 (14:16 +0100)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sun, 26 Nov 2017 13:34:53 +0000 (14:34 +0100)
14 files changed:
dll/shellext/shellbtrfs/CMakeLists.txt
dll/shellext/shellbtrfs/balance.h
dll/shellext/shellbtrfs/contextmenu.h
dll/shellext/shellbtrfs/devices.h
dll/shellext/shellbtrfs/factory.h
dll/shellext/shellbtrfs/guid.c [new file with mode: 0644]
dll/shellext/shellbtrfs/iconoverlay.h
dll/shellext/shellbtrfs/precomp.h [new file with mode: 0644]
dll/shellext/shellbtrfs/propsheet.h
dll/shellext/shellbtrfs/recv.h
dll/shellext/shellbtrfs/scrub.h
dll/shellext/shellbtrfs/send.h
dll/shellext/shellbtrfs/shellext.h
dll/shellext/shellbtrfs/volpropsheet.h

index fd11cc1..6802f6b 100644 (file)
@@ -3,6 +3,8 @@ set_cpp(WITH_RUNTIME WITH_EXCEPTIONS WITH_STL)
 remove_definitions(-D_WIN32_WINNT=0x502)
 add_definitions(-D_WIN32_WINNT=0x603)
 
+include_directories(${REACTOS_SOURCE_DIR}/drivers/filesystems/btrfs)
+
 spec2def(shellbtrfs.dll shellbtrfs.spec)
 
 list(APPEND SOURCE
@@ -18,16 +20,19 @@ list(APPEND SOURCE
     scrub.cpp
     send.cpp
     volpropsheet.cpp
-    ${CMAKE_CURRENT_BINARY_DIR}/shellbtrfs.def)
+    precomp.h)
 
-include_directories(
-    ${REACTOS_SOURCE_DIR}/drivers/filesystems/btrfs)
+add_library(shellbtrfs SHARED
+    ${SOURCE}
+    guid.c
+    shellbtrfs.rc
+    ${CMAKE_CURRENT_BINARY_DIR}/shellbtrfs.def)
 
 file(GLOB shellbtrfs_rc_deps *.ico)
 add_rc_deps(shellbtrfs.rc ${shellbtrfs_rc_deps})
 
-add_library(shellbtrfs SHARED ${SOURCE} shellbtrfs.rc)
 set_module_type(shellbtrfs win32dll UNICODE)
 target_link_libraries(shellbtrfs uuid)
 add_importlibs(shellbtrfs advapi32 advapi32_vista ole32 shell32 shlwapi user32 comctl32 uxtheme setupapi comdlg32 gdi32 msvcrt kernel32_vista kernel32 ntdll)
+add_pch(shellbtrfs precomp.h SOURCE)
 add_cd_file(TARGET shellbtrfs DESTINATION reactos/system32 FOR all)
index 262f299..0c07de4 100644 (file)
@@ -15,6 +15,8 @@
  * You should have received a copy of the GNU Lesser General Public Licence
  * along with WinBtrfs.  If not, see <http://www.gnu.org/licenses/>. */
 
+#pragma once
+
 #include <windows.h>
 #ifndef __REACTOS__
 #include "../btrfsioctl.h"
index d9d32ed..12779f4 100644 (file)
@@ -15,6 +15,8 @@
  * You should have received a copy of the GNU Lesser General Public Licence
  * along with WinBtrfs.  If not, see <http://www.gnu.org/licenses/>. */
 
+#pragma once
+
 #include <shlobj.h>
 
 extern LONG objs_loaded;
index 218a244..e6b949a 100644 (file)
@@ -15,6 +15,8 @@
  * You should have received a copy of the GNU Lesser General Public Licence
  * along with WinBtrfs.  If not, see <http://www.gnu.org/licenses/>. */
 
+#pragma once
+
 #ifndef __REACTOS__
 #include <windows.h>
 #include <winternl.h>
index af8b46b..8575e61 100644 (file)
@@ -15,6 +15,8 @@
  * You should have received a copy of the GNU Lesser General Public Licence
  * along with WinBtrfs.  If not, see <http://www.gnu.org/licenses/>. */
 
+#pragma once
+
 extern LONG objs_loaded;
 
 typedef enum {
diff --git a/dll/shellext/shellbtrfs/guid.c b/dll/shellext/shellbtrfs/guid.c
new file mode 100644 (file)
index 0000000..2396fb1
--- /dev/null
@@ -0,0 +1,13 @@
+/* DO NOT USE THE PRECOMPILED HEADER FOR THIS FILE! */
+
+#define WIN32_NO_STATuS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+
+#include <windef.h>
+#include <winbase.h>
+#include <initguid.h>
+#define DEVICE_TYPE ULONG
+#include <ntddstor.h>
+
+/* NO CODE HERE, THIS IS JUST REQUIRED FOR THE GUID DEFINITIONS */
index efcc1e7..24276dd 100644 (file)
@@ -15,6 +15,8 @@
  * You should have received a copy of the GNU Lesser General Public Licence
  * along with WinBtrfs.  If not, see <http://www.gnu.org/licenses/>. */
 
+#pragma once
+
 #include <shlobj.h>
 
 extern LONG objs_loaded;
diff --git a/dll/shellext/shellbtrfs/precomp.h b/dll/shellext/shellbtrfs/precomp.h
new file mode 100644 (file)
index 0000000..dde8baa
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef _SHELLBTRFS_PRECOMP_H_
+#define _SHELLBTRFS_PRECOMP_H_
+
+#include <stddef.h>
+#include <stdio.h>
+#include <string>
+#include <sys/stat.h>
+#define WIN32_NO_STATUS
+#include <windows.h>
+#define STRSAFE_NO_DEPRECATE
+#include <strsafe.h>
+#define NO_SHLWAPI_STRFCNS
+#include <shlwapi.h>
+#include <ntddstor.h>
+#include <ndk/iofuncs.h>
+#include <ndk/rtlfuncs.h>
+#include <shlobj.h>
+#include <shellext.h>
+#include <btrfsioctl.h>
+#include <uxtheme.h>
+
+#include "contextmenu.h"
+#include "factory.h"
+#include "iconoverlay.h"
+#include "propsheet.h"
+#include "resource.h"
+#include "volpropsheet.h"
+
+#endif /* _SHELLBTRFS_PRECOMP_H_ */
index 90d9fc0..1920dbb 100644 (file)
@@ -15,6 +15,8 @@
  * You should have received a copy of the GNU Lesser General Public Licence
  * along with WinBtrfs.  If not, see <http://www.gnu.org/licenses/>. */
 
+#pragma once
+
 #include <shlobj.h>
 #include <deque>
 #include <string>
index 85e9329..8301a20 100644 (file)
@@ -15,6 +15,8 @@
  * You should have received a copy of the GNU Lesser General Public Licence
  * along with WinBtrfs.  If not, see <http://www.gnu.org/licenses/>. */
 
+#pragma once
+
 #include <shlobj.h>
 #include <string>
 #include <vector>
index 8ac94ac..daae712 100644 (file)
@@ -15,6 +15,8 @@
  * You should have received a copy of the GNU Lesser General Public Licence
  * along with WinBtrfs.  If not, see <http://www.gnu.org/licenses/>. */
 
+#pragma once
+
 #include <windows.h>
 #ifndef __REACTOS__
 #include "../btrfs.h"
index 713031b..5d1b939 100644 (file)
@@ -15,6 +15,8 @@
  * You should have received a copy of the GNU Lesser General Public Licence
  * along with WinBtrfs.  If not, see <http://www.gnu.org/licenses/>. */
 
+#pragma once
+
 #ifdef __REACTOS__
 #include "btrfs.h"
 #include <stdlib.h>
index 152f4a1..a31c44b 100644 (file)
@@ -15,6 +15,8 @@
  * You should have received a copy of the GNU Lesser General Public Licence
  * along with WinBtrfs.  If not, see <http://www.gnu.org/licenses/>. */
 
+#pragma once
+
 #define ISOLATION_AWARE_ENABLED 1
 #define STRSAFE_NO_DEPRECATE
 
index a0e618b..6600dbb 100644 (file)
@@ -15,6 +15,8 @@
  * You should have received a copy of the GNU Lesser General Public Licence
  * along with WinBtrfs.  If not, see <http://www.gnu.org/licenses/>. */
 
+#pragma once
+
 #include <shlobj.h>
 #ifndef __REACTOS__
 #include "../btrfsioctl.h"