mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-23 23:16:31 +00:00
Allow loading a custom PySide2 with a customised python location
* This is expected to be in a pyside\ subfolder, with an organisation matching our default setup. * We also now copy the shiboken2 python module (if it exists) as required by new pyside2 versions.
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<PythonBase>$(SolutionDir)\qrenderdoc\3rdparty\python</PythonBase>
|
||||
<PySide2Base>$(SolutionDir)\qrenderdoc\3rdparty\pyside</PySide2Base>
|
||||
|
||||
<PySide2Available>1</PySide2Available>
|
||||
|
||||
<CustomPythonUsed>0</CustomPythonUsed>
|
||||
|
||||
@@ -94,6 +97,7 @@
|
||||
|
||||
<PropertyGroup Condition="'$(CustomPythonUsed)'!='0'">
|
||||
<PythonBase>$(PythonOverride)</PythonBase>
|
||||
<PySide2Base>$(PythonOverride)\pyside</PySide2Base>
|
||||
|
||||
<PythonMajorMinor>$(CustomPythonUsed)</PythonMajorMinor>
|
||||
|
||||
@@ -107,12 +111,20 @@
|
||||
<PythonDLLsDir Condition="Exists('$(PythonOverride)\DLLs\_ctypes.pyd')">$(PythonBase)\DLLs</PythonDLLsDir>
|
||||
<PythonImportLib Condition="Exists('$(PythonOverride)\python$(PythonMajorMinor).lib')">$(PythonBase)\python$(PythonMajorMinor).lib</PythonImportLib>
|
||||
<PythonImportLib Condition="Exists('$(PythonOverride)\libs\python$(PythonMajorMinor).lib')">$(PythonBase)\libs\python$(PythonMajorMinor).lib</PythonImportLib>
|
||||
|
||||
<!-- see if PySide is also available in a subdirectory, this would have to be prepared specifically in the format we expect -->
|
||||
<PySide2Available>0</PySide2Available>
|
||||
<PySide2Available Condition="Exists('$(PySide2Base)\include\PySide2\pyside.h') AND Exists('$(PySide2Base)\$(Platform)\shiboken2.dll')">1</PySide2Available>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="PythonOverridden" AfterTargets="Build" Condition="'$(CustomPythonUsed)'!='0'">
|
||||
<Message Importance="high" Text="Built against python from $(PythonOverride)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="PythonOverriddenNoPySide" AfterTargets="Build" Condition="'$(CustomPythonUsed)'!='0' AND '$(PySide2Available)'!='0'">
|
||||
<Message Importance="high" Text="PySide2 found and used from $(PythonOverride)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="PythonFailedOverridden" AfterTargets="Build" Condition="'$(CustomPythonUsed)'=='0' AND $(PythonOverride)!=''">
|
||||
<Message Importance="high" Text="** Could not use python version $(PythonOverride) due to missing requirements." />
|
||||
<Message Importance="high" Text="** Check for $(PythonOverride)\include\Python.h, $(PythonOverride)\pythonMAJMIN.zip, and either $(PythonOverride)\pythonMAJMIN.lib or $(PythonOverride)\libs\pythonMAJMIN.lib" />
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir);3rdparty;$(IntDir)generated\;$(SolutionDir)\renderdoc\api\replay;$(PythonIncludeDir);3rdparty\pyside\include\PySide2;3rdparty\pyside\include\shiboken2;$(QtIncludeDir);$(QtIncludeDir)\QtWidgets;$(QtIncludeDir)\QtGui;$(QtIncludeDir)\QtCore;$(QtIncludeDir)\QtSvg;$(QtIncludeDir)\QtNetwork;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir);3rdparty;$(IntDir)generated\;$(SolutionDir)\renderdoc\api\replay;$(PythonIncludeDir);$(PySide2Base)\include\PySide2;$(PySide2Base)\include\shiboken2;$(QtIncludeDir);$(QtIncludeDir)\QtWidgets;$(QtIncludeDir)\QtGui;$(QtIncludeDir)\QtCore;$(QtIncludeDir)\QtSvg;$(QtIncludeDir)\QtNetwork;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>/Zc:strictStrings /Zc:throwingNew %(AdditionalOptions)</AdditionalOptions>
|
||||
<PreprocessorDefinitions>_WINDOWS;UNICODE;WIN32;WIN64;RENDERDOC_PLATFORM_WIN32;SCINTILLA_QT=1;MAKING_LIBRARY=1;SCI_LEXER=1;QT_NO_CAST_FROM_ASCII;QT_NO_CAST_TO_ASCII;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;QT_SVG_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
@@ -119,7 +119,7 @@
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalDependencies>user32.lib;$(PythonImportLib);qtmain.lib;Qt5Widgets.lib;Qt5Gui.lib;Qt5Core.lib;Qt5Svg.lib;Qt5Network.lib;shell32.lib</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>3rdparty\pyside\$(Platform);$(QtLibDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalLibraryDirectories>$(PySide2Base)\$(Platform);$(QtLibDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<DataExecutionPrevention>true</DataExecutionPrevention>
|
||||
<IgnoreImportLibrary>true</IgnoreImportLibrary>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -148,7 +148,7 @@
|
||||
<AdditionalDependencies>user32.lib;$(PythonImportLib);qtmaind.lib;Qt5Widgetsd.lib;Qt5Guid.lib;Qt5Cored.lib;Qt5Svgd.lib;Qt5Networkd.lib;shell32.lib</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="Exists('$(SolutionDir)\qrenderdoc\3rdparty\pyside\include\PySide2\pyside.h') AND '$(CustomPythonUsed)'=='0'">
|
||||
<ItemDefinitionGroup Condition="Exists('$(PySide2Base)\include\PySide2\pyside.h') AND '$(PySide2Available)'!='0'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>PYSIDE2_ENABLED=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
@@ -156,7 +156,7 @@
|
||||
<AdditionalDependencies>shiboken2.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="!Exists('$(SolutionDir)\qrenderdoc\3rdparty\pyside\include\PySide2\pyside.h') OR '$(CustomPythonUsed)'!='0'">
|
||||
<ItemDefinitionGroup Condition="!Exists('$(PySide2Base)\include\PySide2\pyside.h') OR '$(PySide2Available)'=='0'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>PYSIDE2_ENABLED=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
@@ -1843,42 +1843,47 @@
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<Visible>false</Visible>
|
||||
</Content>
|
||||
<Content Include="3rdparty\pyside\$(Platform)\shiboken2.dll" Condition="Exists('$(ProjectDir)3rdparty\pyside\$(Platform)\shiboken2.dll')">
|
||||
<Content Include="$(PySide2Base)\$(Platform)\shiboken2.dll" Condition="Exists('$(PySide2Base)\$(Platform)\shiboken2.dll')">
|
||||
<Link>shiboken2.dll</Link>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<Visible>false</Visible>
|
||||
</Content>
|
||||
<Content Include="3rdparty\pyside\$(Platform)\PySide2\pyside2.dll" Condition="Exists('$(ProjectDir)3rdparty\pyside\$(Platform)\PySide2\pyside2.dll')">
|
||||
<Content Include="$(PySide2Base)\$(Platform)\shiboken2\shiboken2.pyd" Condition="Exists('$(PySide2Base)\$(Platform)\shiboken2\shiboken2.pyd')">
|
||||
<Link>shiboken2\shiboken2.pyd</Link>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<Visible>false</Visible>
|
||||
</Content>
|
||||
<Content Include="$(PySide2Base)\$(Platform)\shiboken2\__init__.py" Condition="Exists('$(PySide2Base)\$(Platform)\shiboken2\__init__.py')">
|
||||
<Link>shiboken2\__init__.py</Link>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<Visible>false</Visible>
|
||||
</Content>
|
||||
<Content Include="$(PySide2Base)\$(Platform)\PySide2\pyside2.dll" Condition="Exists('$(PySide2Base)\$(Platform)\PySide2\pyside2.dll')">
|
||||
<Link>PySide2\pyside2.dll</Link>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<Visible>false</Visible>
|
||||
</Content>
|
||||
<Content Include="3rdparty\pyside\$(Platform)\PySide2\Qt5Qml.dll" Condition="Exists('$(ProjectDir)3rdparty\pyside\$(Platform)\PySide2\Qt5Qml.dll')">
|
||||
<Link>PySide2\Qt5Qml.dll</Link>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<Visible>false</Visible>
|
||||
</Content>
|
||||
<Content Include="3rdparty\pyside\$(Platform)\PySide2\__init__.py" Condition="Exists('$(ProjectDir)3rdparty\pyside\$(Platform)\PySide2\__init__.py')">
|
||||
<Content Include="$(PySide2Base)\$(Platform)\PySide2\__init__.py" Condition="Exists('$(PySide2Base)\$(Platform)\PySide2\__init__.py')">
|
||||
<Link>PySide2\__init__.py</Link>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<Visible>false</Visible>
|
||||
</Content>
|
||||
<Content Include="3rdparty\pyside\$(Platform)\PySide2\_utils.py" Condition="Exists('$(ProjectDir)3rdparty\pyside\$(Platform)\PySide2\_utils.py')">
|
||||
<Content Include="$(PySide2Base)\$(Platform)\PySide2\_utils.py" Condition="Exists('$(PySide2Base)\$(Platform)\PySide2\_utils.py')">
|
||||
<Link>PySide2\_utils.py</Link>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<Visible>false</Visible>
|
||||
</Content>
|
||||
<Content Include="3rdparty\pyside\$(Platform)\PySide2\QtCore.pyd" Condition="Exists('$(ProjectDir)3rdparty\pyside\$(Platform)\PySide2\QtCore.pyd')">
|
||||
<Content Include="$(PySide2Base)\$(Platform)\PySide2\QtCore.pyd" Condition="Exists('$(PySide2Base)\$(Platform)\PySide2\QtCore.pyd')">
|
||||
<Link>PySide2\QtCore.pyd</Link>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<Visible>false</Visible>
|
||||
</Content>
|
||||
<Content Include="3rdparty\pyside\$(Platform)\PySide2\QtGui.pyd" Condition="Exists('$(ProjectDir)3rdparty\pyside\$(Platform)\PySide2\QtGui.pyd')">
|
||||
<Content Include="$(PySide2Base)\$(Platform)\PySide2\QtGui.pyd" Condition="Exists('$(PySide2Base)\$(Platform)\PySide2\QtGui.pyd')">
|
||||
<Link>PySide2\QtGui.pyd</Link>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<Visible>false</Visible>
|
||||
</Content>
|
||||
<Content Include="3rdparty\pyside\$(Platform)\PySide2\QtWidgets.pyd" Condition="Exists('$(ProjectDir)3rdparty\pyside\$(Platform)\PySide2\QtWidgets.pyd')">
|
||||
<Content Include="$(PySide2Base)\$(Platform)\PySide2\QtWidgets.pyd" Condition="Exists('$(PySide2Base)\$(Platform)\PySide2\QtWidgets.pyd')">
|
||||
<Link>PySide2\QtWidgets.pyd</Link>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<Visible>false</Visible>
|
||||
|
||||
Reference in New Issue
Block a user