mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-28 15:53:55 -04:00
dxgsg9: drop support for old dxerr9.lib (part of #433)
This drops support for the *really* old DX SDKs. We still support the June 2010 SDK.
This commit is contained in:
parent
4c1373b721
commit
0b0f3d2f8e
@ -145,7 +145,7 @@ def usage(problem):
|
|||||||
print("")
|
print("")
|
||||||
print(" --nothing (disable every third-party lib)")
|
print(" --nothing (disable every third-party lib)")
|
||||||
print(" --everything (enable every third-party lib)")
|
print(" --everything (enable every third-party lib)")
|
||||||
print(" --directx-sdk=X (specify version of DirectX SDK to use: jun2010, aug2009, mar2009, aug2006)")
|
print(" --directx-sdk=X (specify version of DirectX SDK to use: jun2010, aug2009)")
|
||||||
print(" --windows-sdk=X (specify Windows SDK version, eg. 7.1, 8.1 or 10. Default is 8.1)")
|
print(" --windows-sdk=X (specify Windows SDK version, eg. 7.1, 8.1 or 10. Default is 8.1)")
|
||||||
print(" --msvc-version=X (specify Visual C++ version, eg. 10, 11, 12, 14, 14.1, 14.2. Default is 14)")
|
print(" --msvc-version=X (specify Visual C++ version, eg. 10, 11, 12, 14, 14.1, 14.2. Default is 14)")
|
||||||
print(" --use-icl (experimental setting to use an intel compiler instead of MSVC on Windows)")
|
print(" --use-icl (experimental setting to use an intel compiler instead of MSVC on Windows)")
|
||||||
@ -547,10 +547,7 @@ if (COMPILER == "MSVC"):
|
|||||||
|
|
||||||
LibName(pkg, 'd3dVNUM.lib'.replace("VNUM", vnum))
|
LibName(pkg, 'd3dVNUM.lib'.replace("VNUM", vnum))
|
||||||
LibName(pkg, 'd3dxVNUM.lib'.replace("VNUM", vnum))
|
LibName(pkg, 'd3dxVNUM.lib'.replace("VNUM", vnum))
|
||||||
if int(vnum) >= 9 and "GENERIC_DXERR_LIBRARY" in SDK:
|
LibName(pkg, 'dxerr.lib')
|
||||||
LibName(pkg, 'dxerr.lib')
|
|
||||||
else:
|
|
||||||
LibName(pkg, 'dxerrVNUM.lib'.replace("VNUM", vnum))
|
|
||||||
#LibName(pkg, 'ddraw.lib')
|
#LibName(pkg, 'ddraw.lib')
|
||||||
LibName(pkg, 'dxguid.lib')
|
LibName(pkg, 'dxguid.lib')
|
||||||
|
|
||||||
@ -2340,12 +2337,6 @@ def WriteConfigSettings():
|
|||||||
## if GetTarget() == 'windows' and GetTargetArch() == 'x64':
|
## if GetTarget() == 'windows' and GetTargetArch() == 'x64':
|
||||||
## dtool_config["SIMPLE_THREADS"] = 'UNDEF'
|
## dtool_config["SIMPLE_THREADS"] = 'UNDEF'
|
||||||
|
|
||||||
|
|
||||||
if ("GENERIC_DXERR_LIBRARY" in SDK):
|
|
||||||
dtool_config["USE_GENERIC_DXERR_LIBRARY"] = "1"
|
|
||||||
else:
|
|
||||||
dtool_config["USE_GENERIC_DXERR_LIBRARY"] = "UNDEF"
|
|
||||||
|
|
||||||
if (PkgSkip("SPEEDTREE")==0):
|
if (PkgSkip("SPEEDTREE")==0):
|
||||||
speedtree_parameters["SPEEDTREE_OPENGL"] = "UNDEF"
|
speedtree_parameters["SPEEDTREE_OPENGL"] = "UNDEF"
|
||||||
speedtree_parameters["SPEEDTREE_DIRECTX9"] = "UNDEF"
|
speedtree_parameters["SPEEDTREE_DIRECTX9"] = "UNDEF"
|
||||||
|
@ -1927,43 +1927,31 @@ def SdkLocateDirectX( strMode = 'default' ):
|
|||||||
if (dir != 0):
|
if (dir != 0):
|
||||||
print("Using DirectX SDK June 2010")
|
print("Using DirectX SDK June 2010")
|
||||||
SDK["DX9"] = dir.replace("\\", "/").rstrip("/")
|
SDK["DX9"] = dir.replace("\\", "/").rstrip("/")
|
||||||
SDK["GENERIC_DXERR_LIBRARY"] = 1;
|
|
||||||
if ("DX9" not in SDK):
|
if ("DX9" not in SDK):
|
||||||
dir = GetRegistryKey("SOFTWARE\\Microsoft\\DirectX\\Microsoft DirectX SDK (June 2010)", "InstallPath")
|
dir = GetRegistryKey("SOFTWARE\\Microsoft\\DirectX\\Microsoft DirectX SDK (June 2010)", "InstallPath")
|
||||||
if (dir != 0):
|
if (dir != 0):
|
||||||
print("Using DirectX SDK June 2010")
|
print("Using DirectX SDK June 2010")
|
||||||
SDK["DX9"] = dir.replace("\\", "/").rstrip("/")
|
SDK["DX9"] = dir.replace("\\", "/").rstrip("/")
|
||||||
SDK["GENERIC_DXERR_LIBRARY"] = 1;
|
|
||||||
if ("DX9" not in SDK):
|
if ("DX9" not in SDK):
|
||||||
dir = "C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)"
|
dir = "C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)"
|
||||||
if os.path.isdir(dir):
|
if os.path.isdir(dir):
|
||||||
print("Using DirectX SDK June 2010")
|
print("Using DirectX SDK June 2010")
|
||||||
SDK["DX9"] = dir
|
SDK["DX9"] = dir
|
||||||
SDK["GENERIC_DXERR_LIBRARY"] = 1
|
|
||||||
if ("DX9" not in SDK):
|
if ("DX9" not in SDK):
|
||||||
dir = "C:/Program Files/Microsoft DirectX SDK (June 2010)"
|
dir = "C:/Program Files/Microsoft DirectX SDK (June 2010)"
|
||||||
if os.path.isdir(dir):
|
if os.path.isdir(dir):
|
||||||
print("Using DirectX SDK June 2010")
|
print("Using DirectX SDK June 2010")
|
||||||
SDK["DX9"] = dir
|
SDK["DX9"] = dir
|
||||||
SDK["GENERIC_DXERR_LIBRARY"] = 1
|
|
||||||
if ("DX9" not in SDK):
|
if ("DX9" not in SDK):
|
||||||
dir = GetRegistryKey("SOFTWARE\\Wow6432Node\\Microsoft\\DirectX\\Microsoft DirectX SDK (August 2009)", "InstallPath")
|
dir = GetRegistryKey("SOFTWARE\\Wow6432Node\\Microsoft\\DirectX\\Microsoft DirectX SDK (August 2009)", "InstallPath")
|
||||||
if (dir != 0):
|
if (dir != 0):
|
||||||
print("Using DirectX SDK Aug 2009")
|
print("Using DirectX SDK Aug 2009")
|
||||||
SDK["DX9"] = dir.replace("\\", "/").rstrip("/")
|
SDK["DX9"] = dir.replace("\\", "/").rstrip("/")
|
||||||
SDK["GENERIC_DXERR_LIBRARY"] = 1;
|
|
||||||
if ("DX9" not in SDK):
|
if ("DX9" not in SDK):
|
||||||
dir = GetRegistryKey("SOFTWARE\\Microsoft\\DirectX\\Microsoft DirectX SDK (August 2009)", "InstallPath")
|
dir = GetRegistryKey("SOFTWARE\\Microsoft\\DirectX\\Microsoft DirectX SDK (August 2009)", "InstallPath")
|
||||||
if (dir != 0):
|
if (dir != 0):
|
||||||
print("Using DirectX SDK Aug 2009")
|
print("Using DirectX SDK Aug 2009")
|
||||||
SDK["DX9"] = dir.replace("\\", "/").rstrip("/")
|
SDK["DX9"] = dir.replace("\\", "/").rstrip("/")
|
||||||
SDK["GENERIC_DXERR_LIBRARY"] = 1;
|
|
||||||
if ("DX9" not in SDK):
|
|
||||||
## Try to locate the key within the "new" March 2009 location in the registry (yecch):
|
|
||||||
dir = GetRegistryKey("SOFTWARE\\Microsoft\\DirectX\\Microsoft DirectX SDK (March 2009)", "InstallPath")
|
|
||||||
if (dir != 0):
|
|
||||||
print("Using DirectX SDK March 2009")
|
|
||||||
SDK["DX9"] = dir.replace("\\", "/").rstrip("/")
|
|
||||||
archStr = GetTargetArch()
|
archStr = GetTargetArch()
|
||||||
if ("DX9" not in SDK):
|
if ("DX9" not in SDK):
|
||||||
uninstaller = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall"
|
uninstaller = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall"
|
||||||
@ -1986,22 +1974,18 @@ def SdkLocateDirectX( strMode = 'default' ):
|
|||||||
dir = GetRegistryKey("SOFTWARE\\Wow6432Node\\Microsoft\\DirectX\\Microsoft DirectX SDK (June 2010)", "InstallPath")
|
dir = GetRegistryKey("SOFTWARE\\Wow6432Node\\Microsoft\\DirectX\\Microsoft DirectX SDK (June 2010)", "InstallPath")
|
||||||
if (dir != 0):
|
if (dir != 0):
|
||||||
SDK["DX9"] = dir.replace("\\", "/").rstrip("/")
|
SDK["DX9"] = dir.replace("\\", "/").rstrip("/")
|
||||||
SDK["GENERIC_DXERR_LIBRARY"] = 1;
|
|
||||||
if ("DX9" not in SDK):
|
if ("DX9" not in SDK):
|
||||||
dir = GetRegistryKey("SOFTWARE\\Microsoft\\DirectX\\Microsoft DirectX SDK (June 2010)", "InstallPath")
|
dir = GetRegistryKey("SOFTWARE\\Microsoft\\DirectX\\Microsoft DirectX SDK (June 2010)", "InstallPath")
|
||||||
if (dir != 0):
|
if (dir != 0):
|
||||||
SDK["DX9"] = dir.replace("\\", "/").rstrip("/")
|
SDK["DX9"] = dir.replace("\\", "/").rstrip("/")
|
||||||
SDK["GENERIC_DXERR_LIBRARY"] = 1;
|
|
||||||
if ("DX9" not in SDK):
|
if ("DX9" not in SDK):
|
||||||
dir = "C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)"
|
dir = "C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)"
|
||||||
if os.path.isdir(dir):
|
if os.path.isdir(dir):
|
||||||
SDK["DX9"] = dir
|
SDK["DX9"] = dir
|
||||||
SDK["GENERIC_DXERR_LIBRARY"] = 1
|
|
||||||
if ("DX9" not in SDK):
|
if ("DX9" not in SDK):
|
||||||
dir = "C:/Program Files/Microsoft DirectX SDK (June 2010)"
|
dir = "C:/Program Files/Microsoft DirectX SDK (June 2010)"
|
||||||
if os.path.isdir(dir):
|
if os.path.isdir(dir):
|
||||||
SDK["DX9"] = dir
|
SDK["DX9"] = dir
|
||||||
SDK["GENERIC_DXERR_LIBRARY"] = 1
|
|
||||||
if ("DX9" not in SDK):
|
if ("DX9" not in SDK):
|
||||||
exit("Couldn't find DirectX June2010 SDK")
|
exit("Couldn't find DirectX June2010 SDK")
|
||||||
else:
|
else:
|
||||||
@ -2012,41 +1996,13 @@ def SdkLocateDirectX( strMode = 'default' ):
|
|||||||
if (dir != 0):
|
if (dir != 0):
|
||||||
print("Found DirectX SDK Aug 2009")
|
print("Found DirectX SDK Aug 2009")
|
||||||
SDK["DX9"] = dir.replace("\\", "/").rstrip("/")
|
SDK["DX9"] = dir.replace("\\", "/").rstrip("/")
|
||||||
SDK["GENERIC_DXERR_LIBRARY"] = 1;
|
|
||||||
if ("DX9" not in SDK):
|
if ("DX9" not in SDK):
|
||||||
dir = GetRegistryKey("SOFTWARE\\Microsoft\\DirectX\\Microsoft DirectX SDK (August 2009)", "InstallPath")
|
dir = GetRegistryKey("SOFTWARE\\Microsoft\\DirectX\\Microsoft DirectX SDK (August 2009)", "InstallPath")
|
||||||
if (dir != 0):
|
if (dir != 0):
|
||||||
print("Found DirectX SDK Aug 2009")
|
print("Found DirectX SDK Aug 2009")
|
||||||
SDK["DX9"] = dir.replace("\\", "/").rstrip("/")
|
SDK["DX9"] = dir.replace("\\", "/").rstrip("/")
|
||||||
SDK["GENERIC_DXERR_LIBRARY"] = 1;
|
|
||||||
if ("DX9" not in SDK):
|
if ("DX9" not in SDK):
|
||||||
exit("Couldn't find DirectX Aug 2009 SDK")
|
exit("Couldn't find DirectX Aug 2009 SDK")
|
||||||
elif strMode == 'mar2009':
|
|
||||||
if ("DX9" not in SDK):
|
|
||||||
## Try to locate the key within the "new" March 2009 location in the registry (yecch):
|
|
||||||
dir = GetRegistryKey("SOFTWARE\\Microsoft\\DirectX\\Microsoft DirectX SDK (March 2009)", "InstallPath")
|
|
||||||
if (dir != 0):
|
|
||||||
print("Found DirectX SDK March 2009")
|
|
||||||
SDK["DX9"] = dir.replace("\\", "/").rstrip("/")
|
|
||||||
if ("DX9" not in SDK):
|
|
||||||
exit("Couldn't find DirectX March 2009 SDK")
|
|
||||||
elif strMode == 'aug2006':
|
|
||||||
archStr = GetTargetArch()
|
|
||||||
if ("DX9" not in SDK):
|
|
||||||
uninstaller = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall"
|
|
||||||
for subdir in ListRegistryKeys(uninstaller):
|
|
||||||
if (subdir[0]=="{"):
|
|
||||||
dir = GetRegistryKey(uninstaller+"\\"+subdir, "InstallLocation")
|
|
||||||
if (dir != 0):
|
|
||||||
if (("DX9" not in SDK) and
|
|
||||||
(os.path.isfile(dir+"\\Include\\d3d9.h")) and
|
|
||||||
(os.path.isfile(dir+"\\Include\\d3dx9.h")) and
|
|
||||||
(os.path.isfile(dir+"\\Include\\dxsdkver.h")) and
|
|
||||||
(os.path.isfile(dir+"\\Lib\\" + archStr + "\\d3d9.lib")) and
|
|
||||||
(os.path.isfile(dir+"\\Lib\\" + archStr + "\\d3dx9.lib"))):
|
|
||||||
SDK["DX9"] = dir.replace("\\", "/").rstrip("/")
|
|
||||||
if ("DX9" not in SDK):
|
|
||||||
exit("Couldn't find a DirectX Aug 2006 SDK")
|
|
||||||
if ("DX9" in SDK):
|
if ("DX9" in SDK):
|
||||||
SDK["DIRECTCAM"] = SDK["DX9"]
|
SDK["DIRECTCAM"] = SDK["DX9"]
|
||||||
|
|
||||||
|
@ -34,19 +34,7 @@
|
|||||||
#undef Configure
|
#undef Configure
|
||||||
#include <d3d9.h>
|
#include <d3d9.h>
|
||||||
#include <d3dx9.h>
|
#include <d3dx9.h>
|
||||||
|
|
||||||
// This symbol is defined (or not defined) in Config.pp. #define
|
|
||||||
// USE_GENERIC_DXERR_LIBRARY 1
|
|
||||||
|
|
||||||
#ifdef USE_GENERIC_DXERR_LIBRARY
|
|
||||||
#include <dxerr.h>
|
#include <dxerr.h>
|
||||||
#define DX_GET_ERROR_STRING_FUNC DXGetErrorString
|
|
||||||
#define DX_GET_ERROR_DESCRIPTION_FUNC DXGetErrorDescription
|
|
||||||
#else
|
|
||||||
#include <dxerr9.h>
|
|
||||||
#define DX_GET_ERROR_STRING_FUNC DXGetErrorString9
|
|
||||||
#define DX_GET_ERROR_DESCRIPTION_FUNC DXGetErrorDescription9
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#undef WIN32_LEAN_AND_MEAN
|
#undef WIN32_LEAN_AND_MEAN
|
||||||
|
|
||||||
@ -56,9 +44,9 @@
|
|||||||
|
|
||||||
#ifndef D3DERRORSTRING
|
#ifndef D3DERRORSTRING
|
||||||
#ifdef NDEBUG
|
#ifdef NDEBUG
|
||||||
#define D3DERRORSTRING(HRESULT) " at (" << __FILE__ << ":" << __LINE__ << "), hr=" << DX_GET_ERROR_STRING_FUNC(HRESULT) << std::endl // leave out descriptions to shrink release build
|
#define D3DERRORSTRING(HRESULT) " at (" << __FILE__ << ":" << __LINE__ << "), hr=" << DXGetErrorString(HRESULT) << std::endl // leave out descriptions to shrink release build
|
||||||
#else
|
#else
|
||||||
#define D3DERRORSTRING(HRESULT) " at (" << __FILE__ << ":" << __LINE__ << "), hr=" << DX_GET_ERROR_STRING_FUNC(HRESULT) << ": " << DX_GET_ERROR_DESCRIPTION_FUNC(HRESULT) << std::endl
|
#define D3DERRORSTRING(HRESULT) " at (" << __FILE__ << ":" << __LINE__ << "), hr=" << DXGetErrorString(HRESULT) << ": " << DXGetErrorDescription(HRESULT) << std::endl
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user