Skip to content

Commit

Permalink
BrowserSubProcess - Increase x64/arm64 stack size
Browse files Browse the repository at this point in the history
- For Net 4.5.2 it appears we need to resign the exe
- For .Net Core as the exes are native it doesn't look
 like we need to sign them (the CefSharp.BrowserSubprocess.dll is actually
 the one that's signed).
- Remove unused CefSharpBrowserSubprocessPostBuildEvent

Issue #3986
  • Loading branch information
amaitland committed Mar 1, 2022
1 parent 8b9a5e2 commit 0d15db9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
<None Remove="obj.netcore\**" />
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="if $(PlatformName) == x86 (&#xD;&#xA; call &quot;$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvars32.bat&quot;&#xD;&#xA; editbin /largeaddressaware /TSAWARE &quot;$(TargetPath)&quot; &#xD;&#xA; sn -R &quot;$(TargetPath)&quot; &quot;$(ProjectDir)..\CefSharp.snk&quot;&#xD;&#xA;) else (&#xD;&#xA; call &quot;$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvars64.bat&quot;&#xD;&#xA; editbin /TSAWARE &quot;$(TargetPath)&quot;&#xD;&#xA;)" />
<Exec Command="if $(PlatformName) == x86 (&#xD;&#xA; call &quot;$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvars32.bat&quot;&#xD;&#xA; editbin /largeaddressaware /TSAWARE &quot;$(TargetPath)&quot; &#xD;&#xA; sn -R &quot;$(TargetPath)&quot; &quot;$(ProjectDir)..\CefSharp.snk&quot;&#xD;&#xA;) else (&#xD;&#xA; call &quot;$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvars64.bat&quot;&#xD;&#xA; editbin /TSAWARE /STACK:0x800000 &quot;$(TargetPath)&quot;&#xD;&#xA; sn -R &quot;$(TargetPath)&quot; &quot;$(ProjectDir)..\CefSharp.snk&quot;&#xD;&#xA;)" />
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@
<ProjectReference Include="..\CefSharp\CefSharp.netcore.csproj" />
</ItemGroup>

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="if $(PlatformName) == x86 (&#xD;&#xA; call &quot;$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvars32.bat&quot;&#xD;&#xA; editbin /largeaddressaware /TSAWARE &quot;$(TargetDir)CefSharp.BrowserSubprocess.exe&quot; &#xD;&#xA;) else if $(PlatformName) == x64 (&#xD;&#xA; call &quot;$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvars64.bat&quot;&#xD;&#xA; editbin /STACK:0x800000 &quot;$(TargetDir)CefSharp.BrowserSubprocess.exe&quot;&#xD;&#xA;) else if $(PlatformName) == arm64 (&#xD;&#xA; call &quot;$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvarsamd64_arm64.bat&quot;&#xD;&#xA; editbin /STACK:0x800000 &quot;$(TargetDir)CefSharp.BrowserSubprocess.exe&quot;&#xD;&#xA;)&#xD;&#xA;" />
</Target>

<!-- Implicit bottom import -->
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>
19 changes: 3 additions & 16 deletions CefSharp.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,9 @@
<PlatformToolset Condition="'$(VisualStudioVersion)'=='17.0'">v143</PlatformToolset>

<!-- TODO: We might need to do something here when VS2019 and VS2022 are installed -->
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<!-- <WindowsTargetPlatformVersion Condition="'$(VisualStudioVersion)'=='16.0'">10.0</WindowsTargetPlatformVersion> -->
<!-- <WindowsTargetPlatformVersion Condition="'$(VisualStudioVersion)'=='17.0'">10.0</WindowsTargetPlatformVersion> -->

<CefSharpBrowserSubprocessPostBuildEvent>
<![CDATA[
if $(PlatformName) == x86 (
call "$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvars32.bat"
editbin /largeaddressaware /TSAWARE "$(TargetPath)"
sn -R "$(TargetPath)" "$(ProjectDir)..\CefSharp.snk"
) else (
call "$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvars64.bat"
editbin /TSAWARE "$(TargetPath)"
)
]]>
</CefSharpBrowserSubprocessPostBuildEvent>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<!-- <WindowsTargetPlatformVersion Condition="'$(VisualStudioVersion)'=='16.0'">10.0</WindowsTargetPlatformVersion> -->
<!-- <WindowsTargetPlatformVersion Condition="'$(VisualStudioVersion)'=='17.0'">10.0</WindowsTargetPlatformVersion> -->
</PropertyGroup>

</Project>

0 comments on commit 0d15db9

Please sign in to comment.