From b2cadbfb63733dc48a54296a372da4b979128bc5 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 24 Mar 2017 15:53:08 +0000 Subject: [PATCH] Add pyrenderdoc VS project for generating python extension module --- .../pyrenderdoc/pyrenderdoc_module.vcxproj | 248 +++++++++++++++++ .../pyrenderdoc_module.vcxproj.filters | 10 + ...derdoc_module.cpp => pyrenderdoc_stub.cpp} | 0 .../pyrenderdoc/qrenderdoc_module.vcxproj | 259 ++++++++++++++++++ .../qrenderdoc_module.vcxproj.filters | 42 +++ .../Code/pyrenderdoc/qrenderdoc_stub.cpp | 54 ++++ 6 files changed, 613 insertions(+) create mode 100644 qrenderdoc/Code/pyrenderdoc/pyrenderdoc_module.vcxproj create mode 100644 qrenderdoc/Code/pyrenderdoc/pyrenderdoc_module.vcxproj.filters rename qrenderdoc/Code/pyrenderdoc/{pyrenderdoc_module.cpp => pyrenderdoc_stub.cpp} (100%) create mode 100644 qrenderdoc/Code/pyrenderdoc/qrenderdoc_module.vcxproj create mode 100644 qrenderdoc/Code/pyrenderdoc/qrenderdoc_module.vcxproj.filters create mode 100644 qrenderdoc/Code/pyrenderdoc/qrenderdoc_stub.cpp diff --git a/qrenderdoc/Code/pyrenderdoc/pyrenderdoc_module.vcxproj b/qrenderdoc/Code/pyrenderdoc/pyrenderdoc_module.vcxproj new file mode 100644 index 000000000..f8eab9675 --- /dev/null +++ b/qrenderdoc/Code/pyrenderdoc/pyrenderdoc_module.vcxproj @@ -0,0 +1,248 @@ + + + + + Development + Win32 + + + Development + x64 + + + Release + Win32 + + + Release + x64 + + + + {A8998B2D-652A-47F8-955B-5654B222B4EB} + Win32Proj + pyrenderdoc_module + pyrenderdoc_module + 8.1 + + + + DynamicLibrary + false + true + Unicode + v140 + + + DynamicLibrary + false + true + Unicode + v140 + + + DynamicLibrary + false + true + Unicode + v140 + + + DynamicLibrary + false + true + Unicode + v140 + + + + + + + + + + + + + + + + + + + $(SolutionDir)$(Platform)\$(Configuration)\obj\$(ProjectName)\ + + + false + $(SolutionDir)$(Platform)\$(Configuration)\ + $(LibraryPath) + $(ExecutablePath) + $(ExcludePath) + _renderdoc + .pyd + + + false + $(SolutionDir)$(Platform)\$(Configuration)\ + $(LibraryPath) + $(ExecutablePath) + $(ExcludePath) + _renderdoc + .pyd + + + true + $(SolutionDir)$(Platform)\$(Configuration)\ + $(LibraryPath) + $(ExecutablePath) + $(ExcludePath) + _renderdoc + .pyd + + + true + $(SolutionDir)$(Platform)\$(Configuration)\ + $(LibraryPath) + $(ExecutablePath) + $(ExcludePath) + _renderdoc + .pyd + + + + Level4 + NotUsing + MaxSpeed + true + true + RENDERDOC_PLATFORM_WIN32;WIN32;RELEASE;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + false + true + true + /wd4100 /wd4512 + $(ProjectDir)..\..\;..\..\3rdparty\python\include;$(SolutionDir)\renderdoc\api\replay + + + Windows + true + true + true + ..\..\3rdparty\python\$(Platform);%(AdditionalLibraryDirectories) + python36.lib;%(AdditionalDependencies) + + + true + true + + + + + Level4 + NotUsing + MaxSpeed + true + true + RENDERDOC_PLATFORM_WIN32;WIN64;WIN32;RELEASE;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + false + true + true + /wd4100 /wd4512 + $(ProjectDir)..\..\;..\..\3rdparty\python\include;$(SolutionDir)\renderdoc\api\replay + + + Windows + true + true + true + ..\..\3rdparty\python\$(Platform);%(AdditionalLibraryDirectories) + python36.lib;%(AdditionalDependencies) + + + true + + + + + Level4 + NotUsing + Disabled + false + false + RENDERDOC_PLATFORM_WIN32;WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + false + EnableFastChecks + false + false + true + true + /wd4100 /wd4512 + $(ProjectDir)..\..\;..\..\3rdparty\python\include;$(SolutionDir)\renderdoc\api\replay + + + Windows + true + false + false + Default + ..\..\3rdparty\python\$(Platform);%(AdditionalLibraryDirectories) + python36.lib;%(AdditionalDependencies) + + + true + + + + + Level4 + NotUsing + Disabled + false + false + RENDERDOC_PLATFORM_WIN32;WIN64;WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + false + EnableFastChecks + false + true + true + /wd4100 /wd4512 + $(ProjectDir)..\..\;..\..\3rdparty\python\include;$(SolutionDir)\renderdoc\api\replay + + + Windows + true + false + false + Default + ..\..\3rdparty\python\$(Platform);%(AdditionalLibraryDirectories) + python36.lib;%(AdditionalDependencies) + + + true + + + + + + Document + %(Fullpath);$(SolutionDir)renderdoc\api\replay\basic_types.h;$(SolutionDir)renderdoc\api\replay\capture_options.h;$(SolutionDir)renderdoc\api\replay\control_types.h;$(SolutionDir)renderdoc\api\replay\d3d11_pipestate.h;$(SolutionDir)renderdoc\api\replay\d3d12_pipestate.h;$(SolutionDir)renderdoc\api\replay\data_types.h;$(SolutionDir)renderdoc\api\replay\gl_pipestate.h;$(SolutionDir)renderdoc\api\replay\renderdoc_replay.h;$(SolutionDir)renderdoc\api\replay\replay_enums.h;$(SolutionDir)renderdoc\api\replay\shader_types.h;$(SolutionDir)renderdoc\api\replay\version.h;$(SolutionDir)renderdoc\api\replay\vk_pipestate.h;%(AdditionalInputs) + $(ProjectDir)..\..\3rdparty\swig\swig.exe -v -Wextra -Werror -O -c++ -python -modern -modernargs -enumclass -fastunpack -py3 -builtin -I$(SolutionDir)renderdoc\api\replay -outdir $(IntDir)generated -o $(IntDir)generated\%(Filename)_python.cxx %(FullPath) + Compiling SWIG interface + $(IntDir)generated\%(Filename).py;$(IntDir)generated\r%(Filename)_python.cxx;%(Outputs) + false + + + 4127;4456;4459;4701;4244;4706;4101;%(DisableSpecificWarnings) + + + + + {e2b46d67-90e2-40b6-9597-72930e7845e5} + + + + + + + + diff --git a/qrenderdoc/Code/pyrenderdoc/pyrenderdoc_module.vcxproj.filters b/qrenderdoc/Code/pyrenderdoc/pyrenderdoc_module.vcxproj.filters new file mode 100644 index 000000000..cab872e18 --- /dev/null +++ b/qrenderdoc/Code/pyrenderdoc/pyrenderdoc_module.vcxproj.filters @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/qrenderdoc/Code/pyrenderdoc/pyrenderdoc_module.cpp b/qrenderdoc/Code/pyrenderdoc/pyrenderdoc_stub.cpp similarity index 100% rename from qrenderdoc/Code/pyrenderdoc/pyrenderdoc_module.cpp rename to qrenderdoc/Code/pyrenderdoc/pyrenderdoc_stub.cpp diff --git a/qrenderdoc/Code/pyrenderdoc/qrenderdoc_module.vcxproj b/qrenderdoc/Code/pyrenderdoc/qrenderdoc_module.vcxproj new file mode 100644 index 000000000..e612f5c31 --- /dev/null +++ b/qrenderdoc/Code/pyrenderdoc/qrenderdoc_module.vcxproj @@ -0,0 +1,259 @@ + + + + + Development + Win32 + + + Development + x64 + + + Release + Win32 + + + Release + x64 + + + + {61157930-78C3-4355-8B49-4CC91B98F17B} + Win32Proj + qrenderdoc_module + qrenderdoc_module + 8.1 + + + + DynamicLibrary + false + true + Unicode + v140 + + + DynamicLibrary + false + true + Unicode + v140 + + + DynamicLibrary + false + true + Unicode + v140 + + + DynamicLibrary + false + true + Unicode + v140 + + + + + + + + + + + + + + + + + + + $(SolutionDir)$(Platform)\$(Configuration)\obj\$(ProjectName)\ + + + false + $(SolutionDir)$(Platform)\$(Configuration)\ + $(LibraryPath) + $(ExecutablePath) + $(ExcludePath) + _qrenderdoc + .pyd + + + false + $(SolutionDir)$(Platform)\$(Configuration)\ + $(LibraryPath) + $(ExecutablePath) + $(ExcludePath) + _qrenderdoc + .pyd + + + true + $(SolutionDir)$(Platform)\$(Configuration)\ + $(LibraryPath) + $(ExecutablePath) + $(ExcludePath) + _qrenderdoc + .pyd + + + true + $(SolutionDir)$(Platform)\$(Configuration)\ + $(LibraryPath) + $(ExecutablePath) + $(ExcludePath) + _qrenderdoc + .pyd + + + + Level4 + NotUsing + MaxSpeed + true + true + RENDERDOC_PLATFORM_WIN32;WIN32;RELEASE;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + false + true + true + /wd4100 /wd4512 /wd4127 + $(ProjectDir)..\..\;..\..\3rdparty\python\include;$(SolutionDir)\renderdoc\api\replay;..\..\3rdparty\qt\$(Platform)\include;..\..\3rdparty\qt\$(Platform)\include\QtWidgets;..\..\3rdparty\qt\$(Platform)\include\QtGui;..\..\3rdparty\qt\$(Platform)\include\QtCore + + + Windows + true + true + true + ..\..\3rdparty\python\$(Platform);..\..\3rdparty\qt\$(Platform)\lib;%(AdditionalLibraryDirectories) + python36.lib;Qt5Widgets.lib;Qt5Gui.lib;Qt5Core.lib;%(AdditionalDependencies) + + + true + true + + + + + Level4 + NotUsing + MaxSpeed + true + true + RENDERDOC_PLATFORM_WIN32;WIN64;WIN32;RELEASE;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + false + true + true + /wd4100 /wd4512 /wd4127 + $(ProjectDir)..\..\;..\..\3rdparty\python\include;$(SolutionDir)\renderdoc\api\replay;..\..\3rdparty\qt\$(Platform)\include;..\..\3rdparty\qt\$(Platform)\include\QtWidgets;..\..\3rdparty\qt\$(Platform)\include\QtGui;..\..\3rdparty\qt\$(Platform)\include\QtCore + + + Windows + true + true + true + ..\..\3rdparty\python\$(Platform);..\..\3rdparty\qt\$(Platform)\lib;%(AdditionalLibraryDirectories) + python36.lib;Qt5Widgets.lib;Qt5Gui.lib;Qt5Core.lib;%(AdditionalDependencies) + + + true + + + + + Level4 + NotUsing + Disabled + false + false + RENDERDOC_PLATFORM_WIN32;WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + false + EnableFastChecks + false + false + true + true + /wd4100 /wd4512 /wd4127 + $(ProjectDir)..\..\;..\..\3rdparty\python\include;$(SolutionDir)\renderdoc\api\replay;..\..\3rdparty\qt\$(Platform)\include;..\..\3rdparty\qt\$(Platform)\include\QtWidgets;..\..\3rdparty\qt\$(Platform)\include\QtGui;..\..\3rdparty\qt\$(Platform)\include\QtCore + + + Windows + true + false + false + Default + ..\..\3rdparty\python\$(Platform);..\..\3rdparty\qt\$(Platform)\lib;%(AdditionalLibraryDirectories) + python36.lib;Qt5Widgets.lib;Qt5Gui.lib;Qt5Core.lib;%(AdditionalDependencies) + + + true + + + + + Level4 + NotUsing + Disabled + false + false + RENDERDOC_PLATFORM_WIN32;WIN64;WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + false + EnableFastChecks + false + true + true + /wd4100 /wd4512 /wd4127 + $(ProjectDir)..\..\;..\..\3rdparty\python\include;$(SolutionDir)\renderdoc\api\replay;..\..\3rdparty\qt\$(Platform)\include;..\..\3rdparty\qt\$(Platform)\include\QtWidgets;..\..\3rdparty\qt\$(Platform)\include\QtGui;..\..\3rdparty\qt\$(Platform)\include\QtCore + + + Windows + true + false + false + Default + ..\..\3rdparty\python\$(Platform);..\..\3rdparty\qt\$(Platform)\lib;%(AdditionalLibraryDirectories) + python36.lib;Qt5Widgets.lib;Qt5Gui.lib;Qt5Core.lib;%(AdditionalDependencies) + + + true + + + + + + + + + + + Document + %(Fullpath);$(ProjectDir)renderdoc.i;$(SolutionDir)renderdoc\api\replay\basic_types.h;$(SolutionDir)renderdoc\api\replay\capture_options.h;$(SolutionDir)renderdoc\api\replay\control_types.h;$(SolutionDir)renderdoc\api\replay\d3d11_pipestate.h;$(SolutionDir)renderdoc\api\replay\d3d12_pipestate.h;$(SolutionDir)renderdoc\api\replay\data_types.h;$(SolutionDir)renderdoc\api\replay\gl_pipestate.h;$(SolutionDir)renderdoc\api\replay\renderdoc_replay.h;$(SolutionDir)renderdoc\api\replay\replay_enums.h;$(SolutionDir)renderdoc\api\replay\shader_types.h;$(SolutionDir)renderdoc\api\replay\version.h;$(SolutionDir)renderdoc\api\replay\vk_pipestate.h;$(ProjectDir)..\Interface\CommonPipelineState.h;$(ProjectDir)..\Interface\PersistantConfig.h;$(ProjectDir)..\Interface\RemoteHost.h;$(ProjectDir)..\Interface\QRDInterface.h;%(AdditionalInputs) + $(ProjectDir)..\..\3rdparty\swig\swig.exe -v -Wextra -Werror -O -c++ -python -modern -modernargs -enumclass -fastunpack -py3 -builtin -I$(ProjectDir)..\.. -I$(SolutionDir)renderdoc\api\replay -outdir $(IntDir)generated -o $(IntDir)generated\%(Filename)_python.cxx %(FullPath) + Compiling SWIG interface + $(IntDir)generated\%(Filename).py;$(IntDir)generated\%(Filename)_python.cxx;%(Outputs) + false + + + 4127;4456;4459;4701;4244;4706;4101;%(DisableSpecificWarnings) + + + + + {e2b46d67-90e2-40b6-9597-72930e7845e5} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/qrenderdoc/Code/pyrenderdoc/qrenderdoc_module.vcxproj.filters b/qrenderdoc/Code/pyrenderdoc/qrenderdoc_module.vcxproj.filters new file mode 100644 index 000000000..3b4b79ee3 --- /dev/null +++ b/qrenderdoc/Code/pyrenderdoc/qrenderdoc_module.vcxproj.filters @@ -0,0 +1,42 @@ + + + + + + + + + + + Interface + + + Interface + + + Interface + + + Interface + + + + + {c9305133-414c-4dfd-930b-7856901d3b1c} + + + + + Interface + + + Interface + + + Interface + + + Interface + + + \ No newline at end of file diff --git a/qrenderdoc/Code/pyrenderdoc/qrenderdoc_stub.cpp b/qrenderdoc/Code/pyrenderdoc/qrenderdoc_stub.cpp new file mode 100644 index 000000000..f0d83fd68 --- /dev/null +++ b/qrenderdoc/Code/pyrenderdoc/qrenderdoc_stub.cpp @@ -0,0 +1,54 @@ +/****************************************************************************** + * The MIT License (MIT) + * + * Copyright (c) 2017 Baldur Karlsson + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + ******************************************************************************/ + +#include +#include "Code/QRDUtils.h" +#include "PythonContext.h" + +// we only support the qrenderdoc module for docs generation, so it doesn't matter that these stub +// functions aren't valid + +void Formatter::setParams(int minFigures, int maxFigures, int expNegCutoff, int expPosCutoff) +{ +} + +bool SaveToJSON(QVariantMap &data, QIODevice &f, const char *magicIdentifier, uint32_t magicVersion) +{ + return false; +} + +bool LoadFromJSON(QVariantMap &data, QIODevice &f, const char *magicIdentifier, uint32_t magicVersion) +{ + return false; +} + +QWidget *PythonContext::QWidgetFromPy(PyObject *widget) +{ + return NULL; +} + +PyObject *PythonContext::QtObjectToPython(const char *typeName, QObject *object) +{ + return NULL; +}