Skip to content

Commit

Permalink
Increase stack size in windows OS (fixes #171) (#172)
Browse files Browse the repository at this point in the history
* Fix published artifacts

* Raise version

* Review comments
  • Loading branch information
tbragaf authored Oct 21, 2024
1 parent e0a716f commit e74d0cc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions CefGlue.BrowserProcess/CefGlue.BrowserProcess.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,33 @@
<PackageReference Include="System.Runtime.Loader" />
</ItemGroup>

<Target Name="Editbin" BeforeTargets="AfterBuild">
<Target Name="Editbin" AfterTargets="Compile">
<!--
Quick explanation: This target runs after build, and currently 3 more times for each MSBuild command executed in the next target "PublishApp".
Quick explanation: This target runs after compile, and currently 3 more times for each MSBuild command executed in the next target "PublishApp".
We just want this target to be executed for windows specs.
-->

<PropertyGroup>
<VcvarsFile Condition="'$(Platform)' == 'x64'">vcvars64.bat</VcvarsFile>
<VcvarsFile Condition="'$(Platform)' == 'ARM64'">vcvarsamd64_arm64.bat</VcvarsFile>
<VcvarsLocation Condition="Exists($(DevEnvDir))">$(DevEnvDir)..\..\VC\Auxiliary\Build\</VcvarsLocation>
<VcvarsLocation Condition="!Exists($(DevEnvDir))">C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\</VcvarsLocation> <!-- Path used in Microsoft-hosted agents -->
<RunsEditBin Condition="$(VcvarsFile) != '' And $(IsEditbinEnabled) == True And $([MSBuild]::IsOSPlatform('Windows'))">True</RunsEditBin>
<ApphostLocation>$(ProjectDir)$(BaseIntermediateOutputPath)$(Platform)\$(Configuration)\$(TargetFramework)\</ApphostLocation>
<ApphostLocation Condition="'$(IsPublishing)' == 'True'">$(ApphostLocation)$(RuntimeIdentifier)\</ApphostLocation> <!-- When publishing, we also use the runtime identifiers (check the next target "PublishApp") -->
</PropertyGroup>

<!--
This command aims at increasing the stack size of Xilium.CefGlue.BrowserProcess.exe to 8 MiBs, using the visual studio tool "editbin".
Since we are reaching the .exe at the compile time, the file name is "apphost.exe" instead and located at /obj folder
Comment it only for development purposes.
-->
<Exec Condition="$(RunsEditBin) == True" Command="call &quot;$(VcvarsLocation)$(VcvarsFile)&quot;&#xD;&#xA; editbin /STACK:0x800000 &quot;$(TargetDir)Xilium.CefGlue.BrowserProcess.exe&quot;&#xD;&#xA;" />
<Exec Condition="$(RunsEditBin) == True" Command="call &quot;$(VcvarsLocation)$(VcvarsFile)&quot;&#xD;&#xA; editbin /STACK:0x800000 &quot;$(ApphostLocation)\apphost.exe&quot;&#xD;&#xA;" />
</Target>

<Target Name="PublishApp" AfterTargets="Editbin" Condition="'$(_AssemblyTimestampBeforeCompile)' != '$(_AssemblyTimestampAfterCompile)' and '$(IsPublishing)' != 'True'">
<Target Name="PublishApp" AfterTargets="AfterBuild" Condition="'$(_AssemblyTimestampBeforeCompile)' != '$(_AssemblyTimestampAfterCompile)' and '$(IsPublishing)' != 'True'">
<!-- WINDOWS -->
<Message Text="Publishing CefGlue.BrowserProcess on Windows ($(Platform))..." Importance="High" />
<MSBuild Projects="CefGlue.BrowserProcess.csproj" Targets="Publish" Properties="$(PublishCommonConfig)win-$(ArchitectureConfig);IsEditbinEnabled=True;" />
<MSBuild Projects="CefGlue.BrowserProcess.csproj" Targets="Publish" Properties="$(PublishCommonConfig)win-$(ArchitectureConfig);IsEditbinEnabled=True;" />

<!-- LINUX -->
<Message Text="Publishing CefGlue.BrowserProcess on Linux ($(Platform))..." Importance="High" />
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<PropertyGroup>
<PackageOutputPath>$(MSBuildProjectDirectory)\..\Nuget\output</PackageOutputPath>
<Version>120.6099.206</Version>
<Version>120.6099.207</Version>
<Authors>XiliumHQ,OutSystems</Authors>
<Product>CefGlue</Product>
<AssemblyTitle>CefGlue</AssemblyTitle>
Expand Down

0 comments on commit e74d0cc

Please sign in to comment.