diff --git a/panda/src/downloader/Sources.pp b/panda/src/downloader/Sources.pp index 3c30407750..266692caa3 100644 --- a/panda/src/downloader/Sources.pp +++ b/panda/src/downloader/Sources.pp @@ -8,11 +8,11 @@ #begin lib_target #define TARGET downloader - #define SOURCES \ - config_downloader.cxx \ + #define SOURCES \ + config_downloader.cxx \ 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 \ multiplexStreamBuf.I multiplexStreamBuf.cxx multiplexStreamBuf.h @@ -20,12 +20,12 @@ downloadDb.I downloadDb.cxx downloadDb.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 #define IF_CRYPTO_SOURCES \ - patcher.cxx \ + patcher.cxx \ patcher.h patcher.I #define INSTALL_HEADERS \ @@ -39,6 +39,8 @@ multiplexStreamBuf.I multiplexStreamBuf.I \ patcher.h patcher.I \ zcompressor.I zcompressor.h + + #define PRECOMPILED_HEADER downloader_headers.h #define IGATESCAN all diff --git a/panda/src/downloader/asyncDecompressor.cxx b/panda/src/downloader/asyncDecompressor.cxx index 9a9072ab86..b44a5f86b1 100644 --- a/panda/src/downloader/asyncDecompressor.cxx +++ b/panda/src/downloader/asyncDecompressor.cxx @@ -21,7 +21,13 @@ //////////////////////////////////////////////////////////////////// // 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 @@ -30,6 +36,9 @@ #include #include #include +#endif + +#include "asyncDecompressor.h" //////////////////////////////////////////////////////////////////// // Defines diff --git a/panda/src/downloader/asyncDownloader.cxx b/panda/src/downloader/asyncDownloader.cxx index bff788d78b..179196e575 100644 --- a/panda/src/downloader/asyncDownloader.cxx +++ b/panda/src/downloader/asyncDownloader.cxx @@ -15,18 +15,27 @@ // panda3d@yahoogroups.com . // //////////////////////////////////////////////////////////////////// -#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 #include #include #include -#include #include -#include #include #include +#endif + +#include "asyncDownloader.h" +#include +#include #if !defined(WIN32_VC) // #define errno wsaGetLastError() diff --git a/panda/src/downloader/asyncExtractor.cxx b/panda/src/downloader/asyncExtractor.cxx index 66ba2e335c..d2c7efba4d 100644 --- a/panda/src/downloader/asyncExtractor.cxx +++ b/panda/src/downloader/asyncExtractor.cxx @@ -15,7 +15,13 @@ // panda3d@yahoogroups.com . // //////////////////////////////////////////////////////////////////// -#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 @@ -23,6 +29,9 @@ #include #include #include +#endif + +#include "asyncExtractor.h" //////////////////////////////////////////////////////////////////// // Defines diff --git a/panda/src/downloader/asyncUtility.cxx b/panda/src/downloader/asyncUtility.cxx index 8be18f2e1a..7cfba5df39 100644 --- a/panda/src/downloader/asyncUtility.cxx +++ b/panda/src/downloader/asyncUtility.cxx @@ -15,14 +15,19 @@ // panda3d@yahoogroups.com . // //////////////////////////////////////////////////////////////////// -#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" -#if defined(WIN32) - #define WINDOWS_LEAN_AND_MEAN - #include - #include - #undef WINDOWS_LEAN_AND_MEAN -#else +#endif + +#include "asyncUtility.h" + +#if !defined(WIN32) #include #endif diff --git a/panda/src/downloader/config_downloader.cxx b/panda/src/downloader/config_downloader.cxx index 4d8a3a1114..b63c56af4b 100644 --- a/panda/src/downloader/config_downloader.cxx +++ b/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 #include +#if !defined(WIN32_VC) || defined(NO_PCH) +#include "config_downloader.h" +#endif + + Configure(config_downloader); NotifyCategoryDef(downloader, ""); diff --git a/panda/src/downloader/decompressor.cxx b/panda/src/downloader/decompressor.cxx index 9bd2642341..65915a1adf 100644 --- a/panda/src/downloader/decompressor.cxx +++ b/panda/src/downloader/decompressor.cxx @@ -21,15 +21,25 @@ //////////////////////////////////////////////////////////////////// // 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 #include -#include - #include +#include +#include +#endif + +#include "decompressor.h" + + //////////////////////////////////////////////////////////////////// // Defines //////////////////////////////////////////////////////////////////// diff --git a/panda/src/downloader/downloadDb.cxx b/panda/src/downloader/downloadDb.cxx index a891819892..c266031b07 100644 --- a/panda/src/downloader/downloadDb.cxx +++ b/panda/src/downloader/downloadDb.cxx @@ -15,8 +15,17 @@ // panda3d@yahoogroups.com . // //////////////////////////////////////////////////////////////////// -#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" +#endif + +#include "downloadDb.h" #include //////////////////////////////////////////////////////////////////// diff --git a/panda/src/downloader/download_utils.cxx b/panda/src/downloader/download_utils.cxx index 7a528a13d6..8d09b58803 100644 --- a/panda/src/downloader/download_utils.cxx +++ b/panda/src/downloader/download_utils.cxx @@ -18,9 +18,17 @@ // 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 "config_downloader.h" #include +#endif ulong check_crc(Filename name) { diff --git a/panda/src/downloader/downloader.cxx b/panda/src/downloader/downloader.cxx index d26b8bb6e7..f2ed3348dc 100644 --- a/panda/src/downloader/downloader.cxx +++ b/panda/src/downloader/downloader.cxx @@ -15,7 +15,13 @@ // panda3d@yahoogroups.com . // //////////////////////////////////////////////////////////////////// -#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 @@ -23,6 +29,9 @@ #include #include +#endif + +#include "downloader.h" #if !defined(WIN32_VC) #include diff --git a/panda/src/downloader/downloader_headers.h b/panda/src/downloader/downloader_headers.h new file mode 100644 index 0000000000..2ea607a914 --- /dev/null +++ b/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 +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + +#define WINDOWS_LEAN_AND_MEAN +#include +#undef WINDOWS_LEAN_AND_MEAN + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "config_downloader.h" +#pragma hdrstop + diff --git a/panda/src/downloader/extractor.cxx b/panda/src/downloader/extractor.cxx index 2a1532fe4f..2a59f1ceda 100644 --- a/panda/src/downloader/extractor.cxx +++ b/panda/src/downloader/extractor.cxx @@ -15,13 +15,22 @@ // panda3d@yahoogroups.com . // //////////////////////////////////////////////////////////////////// -#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 #include #include +#endif + +#include "extractor.h" //////////////////////////////////////////////////////////////////// // Defines diff --git a/panda/src/downloader/multiplexStream.cxx b/panda/src/downloader/multiplexStream.cxx index 8af771afb0..f2b36c9c34 100644 --- a/panda/src/downloader/multiplexStream.cxx +++ b/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" + diff --git a/panda/src/downloader/multiplexStreamBuf.cxx b/panda/src/downloader/multiplexStreamBuf.cxx index 4e0f180330..058eeae566 100644 --- a/panda/src/downloader/multiplexStreamBuf.cxx +++ b/panda/src/downloader/multiplexStreamBuf.cxx @@ -16,6 +16,18 @@ // //////////////////////////////////////////////////////////////////// +#if defined(WIN32_VC) && !defined(NO_PCH) +#include "downloader_headers.h" +#endif + +#pragma hdrstop + +#if defined(WIN32_VC) && defined(NO_PCH) +#define WINDOWS_LEAN_AND_MEAN +#include +#undef WINDOWS_LEAN_AND_MEAN +#endif + #include "multiplexStreamBuf.h" // We use real assert() instead of nassert(), because we're likely @@ -23,12 +35,6 @@ // risk infinite recursion. #include -#if defined(WIN32_VC) -#define WINDOWS_LEAN_AND_MEAN -#include -#undef WINDOWS_LEAN_AND_MEAN -#endif - #ifndef HAVE_STREAMSIZE // Some compilers--notably SGI--don't define this for us. typedef int streamsize; diff --git a/panda/src/downloader/patcher.cxx b/panda/src/downloader/patcher.cxx index f673f4c0db..9cc6b5adf2 100644 --- a/panda/src/downloader/patcher.cxx +++ b/panda/src/downloader/patcher.cxx @@ -15,10 +15,19 @@ // panda3d@yahoogroups.com . // //////////////////////////////////////////////////////////////////// -#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 +#endif + +#include "patcher.h" //////////////////////////////////////////////////////////////////// // Defines diff --git a/panda/src/downloader/zcompressor.cxx b/panda/src/downloader/zcompressor.cxx index 5a8fb93534..746d740fa4 100644 --- a/panda/src/downloader/zcompressor.cxx +++ b/panda/src/downloader/zcompressor.cxx @@ -21,9 +21,18 @@ //////////////////////////////////////////////////////////////////// // 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 +#endif + +#include "zcompressor.h" //////////////////////////////////////////////////////////////////// // Defines