Skip to content

Commit

Permalink
just in case
Browse files Browse the repository at this point in the history
  • Loading branch information
aliakseis committed Nov 24, 2024
1 parent 7113f8b commit b885035
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
6 changes: 4 additions & 2 deletions Player/Player.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,9 @@
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>Winmm.lib;dxva2.lib;d3d9.lib;Oleacc.lib;$(VcpkgRoot)\installed\$(VcpkgTriplet)\lib\Python*.lib;%(AdditionalDependencies);$(INTELOCLSDKROOT)\lib\x86\OpenCL.lib</AdditionalDependencies>
<AdditionalDependencies>Winmm.lib;dxva2.lib;d3d9.lib;Oleacc.lib;$(VcpkgRoot)\installed\$(VcpkgTriplet)\lib\Python*.lib;%(AdditionalDependencies);OpenCL.lib</AdditionalDependencies>
<DelayLoadDLLs>opencl.dll</DelayLoadDLLs>
<AdditionalLibraryDirectories>$(INTELOCLSDKROOT)\lib\x86\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<Midl>
<MkTypLibCompatible>false</MkTypLibCompatible>
Expand Down Expand Up @@ -130,8 +131,9 @@
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>Winmm.lib;dxva2.lib;d3d9.lib;Oleacc.lib;$(INTELOCLSDKROOT)\lib\x64\OpenCL.lib;$(VcpkgRoot)\installed\$(VcpkgTriplet)\lib\Python*.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>Winmm.lib;dxva2.lib;d3d9.lib;Oleacc.lib;OpenCL.lib;$(VcpkgRoot)\installed\$(VcpkgTriplet)\lib\Python*.lib;%(AdditionalDependencies)</AdditionalDependencies>
<DelayLoadDLLs>opencl.dll</DelayLoadDLLs>
<AdditionalLibraryDirectories>$(INTELOCLSDKROOT)\lib\x64\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<Midl>
<MkTypLibCompatible>false</MkTypLibCompatible>
Expand Down
23 changes: 14 additions & 9 deletions Player/YouTuber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -736,16 +736,21 @@ void CheckPython()
exit(1);
}

boost::python::object path(boost::python::borrowed(sysPath));
const auto length = len(path);
if (length < 1)
{
exit(1);
}
try {
boost::python::object path(boost::python::borrowed(sysPath));
const auto length = len(path);
if (length < 1)
{
exit(1);
}

std::string v{ boost::python::extract<std::string>(path[0]) };
if (v.empty())
{
std::string v{ boost::python::extract<std::string>(path[0]) };
if (v.empty())
{
exit(1);
}
}
catch (...) {
exit(1);
}
}
Expand Down

0 comments on commit b885035

Please sign in to comment.