Browse Source

use precomp hdrs

cxgeorge 24 years ago
parent
commit
e552144af2

+ 9 - 7
panda/src/downloader/Sources.pp

@@ -8,11 +8,11 @@
 #begin lib_target
 #begin lib_target
   #define TARGET downloader
   #define TARGET downloader
 
 
-  #define SOURCES							\
-    config_downloader.cxx						\
+  #define SOURCES                           \
+    config_downloader.cxx                       \
     config_downloader.h \
     config_downloader.h \
-    asyncUtility.I asyncUtility.cxx asyncUtility.h			\
-    extractor.cxx extractor.h	\
+    asyncUtility.I asyncUtility.cxx asyncUtility.h          \
+    extractor.cxx extractor.h   \
     multiplexStream.I multiplexStream.cxx multiplexStream.h \
     multiplexStream.I multiplexStream.cxx multiplexStream.h \
     multiplexStreamBuf.I multiplexStreamBuf.cxx multiplexStreamBuf.h 
     multiplexStreamBuf.I multiplexStreamBuf.cxx multiplexStreamBuf.h 
 
 
@@ -20,12 +20,12 @@
     downloadDb.I downloadDb.cxx downloadDb.h \
     downloadDb.I downloadDb.cxx downloadDb.h \
     downloader.I downloader.cxx downloader.h
     downloader.I downloader.cxx downloader.h
 
 
-  #define IF_ZLIB_SOURCES						\
-    decompressor.cxx decompressor.h zcompressor.I zcompressor.cxx	\
+  #define IF_ZLIB_SOURCES                       \
+    decompressor.cxx decompressor.h zcompressor.I zcompressor.cxx   \
     zcompressor.h download_utils.cxx download_utils.h
     zcompressor.h download_utils.cxx download_utils.h
 
 
   #define IF_CRYPTO_SOURCES \
   #define IF_CRYPTO_SOURCES \
-    patcher.cxx								\
+    patcher.cxx                             \
     patcher.h patcher.I
     patcher.h patcher.I
 
 
   #define INSTALL_HEADERS \
   #define INSTALL_HEADERS \
@@ -39,6 +39,8 @@
     multiplexStreamBuf.I multiplexStreamBuf.I \
     multiplexStreamBuf.I multiplexStreamBuf.I \
     patcher.h patcher.I \
     patcher.h patcher.I \
     zcompressor.I zcompressor.h
     zcompressor.I zcompressor.h
+    
+  #define PRECOMPILED_HEADER downloader_headers.h 
 
 
   #define IGATESCAN all
   #define IGATESCAN all
 
 

+ 10 - 1
panda/src/downloader/asyncDecompressor.cxx

@@ -21,7 +21,13 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 // Includes
 // Includes
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-#include "asyncDecompressor.h"
+#if defined(WIN32_VC) && !defined(NO_PCH)
+#include "downloader_headers.h"
+#endif
+
+#pragma hdrstop
+
+#if !defined(WIN32_VC) || defined(NO_PCH)
 #include "config_downloader.h"
 #include "config_downloader.h"
 
 
 #include <event.h>
 #include <event.h>
@@ -30,6 +36,9 @@
 #include <eventParameter.h>
 #include <eventParameter.h>
 #include <filename.h>
 #include <filename.h>
 #include <stdio.h>
 #include <stdio.h>
+#endif
+
+#include "asyncDecompressor.h"
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 // Defines
 // Defines

+ 12 - 3
panda/src/downloader/asyncDownloader.cxx

@@ -15,18 +15,27 @@
 // [email protected] .
 // [email protected] .
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-#include "asyncDownloader.h"
+#if defined(WIN32_VC) && !defined(NO_PCH)
+#include "downloader_headers.h"
+#endif
+
+#pragma hdrstop
+
+#if !defined(WIN32_VC) || defined(NO_PCH)
 #include "config_downloader.h"
 #include "config_downloader.h"
 
 
 #include <event.h>
 #include <event.h>
 #include <pt_Event.h>
 #include <pt_Event.h>
 #include <throw_event.h>
 #include <throw_event.h>
 #include <eventParameter.h>
 #include <eventParameter.h>
-#include <circBuffer.h>
 #include <filename.h>
 #include <filename.h>
-#include <list>
 #include <errno.h>
 #include <errno.h>
 #include <math.h>
 #include <math.h>
+#endif
+
+#include "asyncDownloader.h"
+#include <circBuffer.h>
+#include <list>
 
 
 #if !defined(WIN32_VC)
 #if !defined(WIN32_VC)
 // #define errno wsaGetLastError()
 // #define errno wsaGetLastError()

+ 10 - 1
panda/src/downloader/asyncExtractor.cxx

@@ -15,7 +15,13 @@
 // [email protected] .
 // [email protected] .
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-#include "asyncExtractor.h"
+#if defined(WIN32_VC) && !defined(NO_PCH)
+#include "downloader_headers.h"
+#endif
+
+#pragma hdrstop
+
+#if !defined(WIN32_VC) || defined(NO_PCH)
 #include "config_downloader.h"
 #include "config_downloader.h"
 
 
 #include <event.h>
 #include <event.h>
@@ -23,6 +29,9 @@
 #include <throw_event.h>
 #include <throw_event.h>
 #include <eventParameter.h>
 #include <eventParameter.h>
 #include <filename.h>
 #include <filename.h>
+#endif
+
+#include "asyncExtractor.h"
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 // Defines
 // Defines

+ 12 - 7
panda/src/downloader/asyncUtility.cxx

@@ -15,14 +15,19 @@
 // [email protected] .
 // [email protected] .
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-#include "asyncUtility.h"
+#if defined(WIN32_VC) && !defined(NO_PCH)
+#include "downloader_headers.h"
+#endif
+
+#pragma hdrstop
+
+#if !defined(WIN32_VC) || defined(NO_PCH)
 #include "config_downloader.h"
 #include "config_downloader.h"
-#if defined(WIN32)
-  #define WINDOWS_LEAN_AND_MEAN
-  #include <windows.h>
-  #include <winbase.h>
-  #undef WINDOWS_LEAN_AND_MEAN
-#else
+#endif
+
+#include "asyncUtility.h"
+  
+#if !defined(WIN32)
   #include <sys/time.h>
   #include <sys/time.h>
 #endif
 #endif
 
 

+ 10 - 1
panda/src/downloader/config_downloader.cxx

@@ -16,11 +16,20 @@
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
-#include "config_downloader.h"
+#if defined(WIN32_VC) && !defined(NO_PCH)
+#include "downloader_headers.h"
+#endif
+
+#pragma hdrstop
 
 
 #include <dconfig.h>
 #include <dconfig.h>
 #include <get_config_path.h>
 #include <get_config_path.h>
 
 
+#if !defined(WIN32_VC) || defined(NO_PCH)
+#include "config_downloader.h"
+#endif
+
+
 Configure(config_downloader);
 Configure(config_downloader);
 NotifyCategoryDef(downloader, "");
 NotifyCategoryDef(downloader, "");
 
 

+ 13 - 3
panda/src/downloader/decompressor.cxx

@@ -21,14 +21,24 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 // Includes
 // Includes
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-#include "decompressor.h"
+#if defined(WIN32_VC) && !defined(NO_PCH)
+#include "downloader_headers.h"
+#endif
+
+#pragma hdrstop
+
+#if !defined(WIN32_VC) || defined(NO_PCH)
 #include "config_downloader.h"
 #include "config_downloader.h"
 
 
-#include <filename.h>
 #include <stdio.h>
 #include <stdio.h>
+#include <errno.h>
+
 #include <error_utils.h>
 #include <error_utils.h>
+#include <filename.h>
+#endif
+
+#include "decompressor.h"
 
 
-#include <errno.h>
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 // Defines
 // Defines

+ 10 - 1
panda/src/downloader/downloadDb.cxx

@@ -15,8 +15,17 @@
 // [email protected] .
 // [email protected] .
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-#include "downloadDb.h"
+#if defined(WIN32_VC) && !defined(NO_PCH)
+#include "downloader_headers.h"
+#endif
+
+#pragma hdrstop
+
+#if !defined(WIN32_VC) || defined(NO_PCH)
 #include "config_downloader.h"
 #include "config_downloader.h"
+#endif
+
+#include "downloadDb.h"
 #include <algorithm>
 #include <algorithm>
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////

+ 8 - 0
panda/src/downloader/download_utils.cxx

@@ -18,9 +18,17 @@
 
 
 // This file is compiled only if we have zlib installed.
 // This file is compiled only if we have zlib installed.
 
 
+#if defined(WIN32_VC) && !defined(NO_PCH)
+#include "downloader_headers.h"
+#endif
+
+#pragma hdrstop
+
+#if !defined(WIN32_VC) || defined(NO_PCH)
 #include "download_utils.h"
 #include "download_utils.h"
 #include "config_downloader.h"
 #include "config_downloader.h"
 #include <zlib.h>
 #include <zlib.h>
+#endif
 
 
 ulong
 ulong
 check_crc(Filename name) {
 check_crc(Filename name) {

+ 10 - 1
panda/src/downloader/downloader.cxx

@@ -15,7 +15,13 @@
 // [email protected] .
 // [email protected] .
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-#include "downloader.h"
+#if defined(WIN32_VC) && !defined(NO_PCH)
+#include "downloader_headers.h"
+#endif
+
+#pragma hdrstop
+
+#if !defined(WIN32_VC) || defined(NO_PCH)
 #include "config_downloader.h"
 #include "config_downloader.h"
 
 
 #include <error_utils.h>
 #include <error_utils.h>
@@ -23,6 +29,9 @@
 
 
 #include <errno.h>
 #include <errno.h>
 #include <math.h>
 #include <math.h>
+#endif
+
+#include "downloader.h"
 
 
 #if !defined(WIN32_VC)
 #if !defined(WIN32_VC)
   #include <sys/time.h>
   #include <sys/time.h>

+ 37 - 0
panda/src/downloader/downloader_headers.h

@@ -0,0 +1,37 @@
+// Filename: downloader_headers.h
+// Created by:  georges (30May01)
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
+
+#define WINDOWS_LEAN_AND_MEAN
+#include <windows.h>
+#undef WINDOWS_LEAN_AND_MEAN
+
+#include <errno.h>
+#include <error_utils.h>
+#include <math.h>
+#include <stdio.h>
+#include <zlib.h>
+
+#include <filename.h>
+#include <event.h>
+#include <pt_Event.h>
+#include <eventParameter.h>
+#include <throw_event.h>
+
+#include "config_downloader.h"
+#pragma hdrstop
+

+ 10 - 1
panda/src/downloader/extractor.cxx

@@ -15,13 +15,22 @@
 // [email protected] .
 // [email protected] .
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-#include "extractor.h"
+#if defined(WIN32_VC) && !defined(NO_PCH)
+#include "downloader_headers.h"
+#endif
+
+#pragma hdrstop
+
+#if !defined(WIN32_VC) || defined(NO_PCH)
 #include "config_downloader.h"
 #include "config_downloader.h"
 
 
 #include <filename.h>
 #include <filename.h>
 #include <error_utils.h>
 #include <error_utils.h>
 
 
 #include <errno.h>
 #include <errno.h>
+#endif
+
+#include "extractor.h"
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 // Defines
 // Defines

+ 7 - 0
panda/src/downloader/multiplexStream.cxx

@@ -16,4 +16,11 @@
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
+#if defined(WIN32_VC) && !defined(NO_PCH)
+#include "downloader_headers.h"
+#endif
+
+#pragma hdrstop
+
 #include "multiplexStream.h"
 #include "multiplexStream.h"
+

+ 12 - 6
panda/src/downloader/multiplexStreamBuf.cxx

@@ -16,19 +16,25 @@
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
-#include "multiplexStreamBuf.h"
+#if defined(WIN32_VC) && !defined(NO_PCH)
+#include "downloader_headers.h"
+#endif
 
 
-// We use real assert() instead of nassert(), because we're likely
-// to be invoked directly by notify here, and we don't want to
-// risk infinite recursion.
-#include <assert.h>
+#pragma hdrstop
 
 
-#if defined(WIN32_VC)
+#if defined(WIN32_VC) && defined(NO_PCH)
 #define WINDOWS_LEAN_AND_MEAN
 #define WINDOWS_LEAN_AND_MEAN
 #include <windows.h>
 #include <windows.h>
 #undef WINDOWS_LEAN_AND_MEAN
 #undef WINDOWS_LEAN_AND_MEAN
 #endif
 #endif
 
 
+#include "multiplexStreamBuf.h"
+
+// We use real assert() instead of nassert(), because we're likely
+// to be invoked directly by notify here, and we don't want to
+// risk infinite recursion.
+#include <assert.h>
+
 #ifndef HAVE_STREAMSIZE
 #ifndef HAVE_STREAMSIZE
 // Some compilers--notably SGI--don't define this for us.
 // Some compilers--notably SGI--don't define this for us.
 typedef int streamsize;
 typedef int streamsize;

+ 10 - 1
panda/src/downloader/patcher.cxx

@@ -15,10 +15,19 @@
 // [email protected] .
 // [email protected] .
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-#include "patcher.h"
+#if defined(WIN32_VC) && !defined(NO_PCH)
+#include "downloader_headers.h"
+#endif
+
+#pragma hdrstop
+
+#if !defined(WIN32_VC) || defined(NO_PCH)
 #include "config_downloader.h"
 #include "config_downloader.h"
 
 
 #include <filename.h>
 #include <filename.h>
+#endif
+
+#include "patcher.h"
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 // Defines
 // Defines

+ 10 - 1
panda/src/downloader/zcompressor.cxx

@@ -21,9 +21,18 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 // Includes
 // Includes
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-#include "zcompressor.h"
+#if defined(WIN32_VC) && !defined(NO_PCH)
+#include "downloader_headers.h"
+#endif
+
+#pragma hdrstop
+
+#if !defined(WIN32_VC) || defined(NO_PCH)
 #include "config_downloader.h"
 #include "config_downloader.h"
 #include <zlib.h>
 #include <zlib.h>
+#endif
+
+#include "zcompressor.h"
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 // Defines
 // Defines