Skip to content

Commit

Permalink
Fix nuget restore and parameterize build (#174)
Browse files Browse the repository at this point in the history
* Fix nuget restore and parameterize build

* Add comment

* Fix command

* PR improvements

* Raise version
  • Loading branch information
tbragaf authored Oct 28, 2024
1 parent e74d0cc commit 3c4cf51
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
13 changes: 5 additions & 8 deletions CefGlue.BrowserProcess/CefGlue.BrowserProcess.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,24 @@
<PackageReference Include="System.Runtime.Loader" />
</ItemGroup>

<Target Name="Editbin" AfterTargets="Compile">
<Target Name="Editbin" AfterTargets="Compile" Condition="$(IsEditbinEnabled) == True And $(VcvarsFile) != '' And $([MSBuild]::IsOSPlatform('Windows'))">
<!--
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.
We just want this target to be executed for windows specs and when passed the VcvarsFile location.
Using VS Studio: VcvarsFile="$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvars64.bat"
Using VS Studio tools: VcvarsFile="C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars64.bat"
-->

<PropertyGroup>
<VcvarsFile Condition="'$(Platform)' == 'x64'">vcvars64.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;$(ApphostLocation)\apphost.exe&quot;&#xD;&#xA;" />
<Exec Command="call &quot;$(VcvarsFile)&quot;&#xD;&#xA; editbin /STACK:0x800000 &quot;$(ApphostLocation)\apphost.exe&quot;&#xD;&#xA;" />
</Target>

<Target Name="PublishApp" AfterTargets="AfterBuild" Condition="'$(_AssemblyTimestampBeforeCompile)' != '$(_AssemblyTimestampAfterCompile)' and '$(IsPublishing)' != 'True'">
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.207</Version>
<Version>120.6099.208</Version>
<Authors>XiliumHQ,OutSystems</Authors>
<Product>CefGlue</Product>
<AssemblyTitle>CefGlue</AssemblyTitle>
Expand Down

0 comments on commit 3c4cf51

Please sign in to comment.