<Project>
<Target Name="ResolveSpaceEngineersAssemblies"
BeforeTargets="ResolveAssemblyReferences"
Condition="'$(UseSpaceEngineersAssemblies)' == 'true'">
<Exec Command="powershell.exe -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Bypass -File "$(MSBuildThisFileDirectory)build\Find-SpaceEngineers.ps1" -BinPath "$(SpaceEngineersBinPath)" -RootPath "$(SpaceEngineersRootPath)""
ConsoleToMSBuild="true"
StandardOutputImportance="Low">
<Output TaskParameter="ConsoleOutput" PropertyName="_DetectedSpaceEngineersBinPath" />
</Exec>
<PropertyGroup>
<SpaceEngineersBinPath>$(_DetectedSpaceEngineersBinPath)</SpaceEngineersBinPath>
</PropertyGroup>
<Error Condition="'$(SpaceEngineersBinPath)' == ''"
Text="Space Engineers was not found. Install the game, set SPACE_ENGINEERS_BIN, or build with /p:SpaceEngineersBinPath="X:\...\SpaceEngineers\Bin64"." />
<ItemGroup>
<_SpaceEngineersAssemblyName Include="EmptyKeys.UserInterface.dll;EmptyKeys.UserInterface.Core.dll;HavokWrapper.dll;ProtoBuf.Net.dll;ProtoBuf.Net.Core.dll;Sandbox.Common.dll;Sandbox.Game.dll;Sandbox.Game.XmlSerializers.dll;Sandbox.Graphics.dll;Sandbox.RenderDirect.dll;SpaceEngineers.Game.dll;SpaceEngineers.ObjectBuilders.dll;SpaceEngineers.ObjectBuilders.XmlSerializers.dll;Steamworks.NET.dll;VRage.dll;VRage.Ansel.dll;VRage.Audio.dll;VRage.Game.dll;VRage.Game.XmlSerializers.dll;VRage.Input.dll;VRage.Library.dll;VRage.Math.dll;VRage.Math.XmlSerializers.dll;VRage.NativeWrapper.dll;VRage.Network.dll;VRage.Render.dll;VRage.Render11.dll;VRage.Scripting.dll;VRage.Steam.dll;VRage.XmlSerializers.dll" />
<_MissingSpaceEngineersAssembly Include="@(_SpaceEngineersAssemblyName)"
Condition="!Exists('$(SpaceEngineersBinPath)\%(Identity)')" />
</ItemGroup>
<Error Condition="'@(_MissingSpaceEngineersAssembly)' != ''"
Text="The detected Space Engineers installation is incomplete. Missing from $(SpaceEngineersBinPath): @(_MissingSpaceEngineersAssembly, ', ')" />
<ItemGroup>
<_SpaceEngineersAssemblyFile Include="@(_SpaceEngineersAssemblyName->'$(SpaceEngineersBinPath)\%(Identity)')" />
<Reference Include="@(_SpaceEngineersAssemblyFile)">
<Private>false</Private>
</Reference>
</ItemGroup>
<Message Importance="High" Text="Using Space Engineers assemblies from $(SpaceEngineersBinPath)" />
</Target>
</Project>
<Project>
<Target Name="ResolveSpaceEngineersAssemblies"
BeforeTargets="ResolveAssemblyReferences"
Condition="'$(UseSpaceEngineersAssemblies)' == 'true'">
<Exec Command="powershell.exe -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Bypass -File "$(MSBuildThisFileDirectory)build\Find-SpaceEngineers.ps1" -BinPath "$(SpaceEngineersBinPath)" -RootPath "$(SpaceEngineersRootPath)""
ConsoleToMSBuild="true"
StandardOutputImportance="Low">
<Output TaskParameter="ConsoleOutput" PropertyName="_DetectedSpaceEngineersBinPath" />
</Exec>
<PropertyGroup>
<SpaceEngineersBinPath>$(_DetectedSpaceEngineersBinPath)</SpaceEngineersBinPath>
</PropertyGroup>
<Error Condition="'$(SpaceEngineersBinPath)' == ''"
Text="Space Engineers was not found. Install the game, set SPACE_ENGINEERS_BIN, or build with /p:SpaceEngineersBinPath="X:\...\SpaceEngineers\Bin64"." />
<ItemGroup>
<_SpaceEngineersAssemblyName Include="EmptyKeys.UserInterface.dll;EmptyKeys.UserInterface.Core.dll;HavokWrapper.dll;ProtoBuf.Net.dll;ProtoBuf.Net.Core.dll;Sandbox.Common.dll;Sandbox.Game.dll;Sandbox.Game.XmlSerializers.dll;Sandbox.Graphics.dll;Sandbox.RenderDirect.dll;SpaceEngineers.Game.dll;SpaceEngineers.ObjectBuilders.dll;SpaceEngineers.ObjectBuilders.XmlSerializers.dll;Steamworks.NET.dll;VRage.dll;VRage.Ansel.dll;VRage.Audio.dll;VRage.Game.dll;VRage.Game.XmlSerializers.dll;VRage.Input.dll;VRage.Library.dll;VRage.Math.dll;VRage.Math.XmlSerializers.dll;VRage.NativeWrapper.dll;VRage.Network.dll;VRage.Render.dll;VRage.Render11.dll;VRage.Scripting.dll;VRage.Steam.dll;VRage.XmlSerializers.dll" />
<_MissingSpaceEngineersAssembly Include="@(_SpaceEngineersAssemblyName)"
Condition="!Exists('$(SpaceEngineersBinPath)\%(Identity)')" />
</ItemGroup>
<Error Condition="'@(_MissingSpaceEngineersAssembly)' != ''"
Text="The detected Space Engineers installation is incomplete. Missing from $(SpaceEngineersBinPath): @(_MissingSpaceEngineersAssembly, ', ')" />
<ItemGroup>
<_SpaceEngineersAssemblyFile Include="@(_SpaceEngineersAssemblyName->'$(SpaceEngineersBinPath)\%(Identity)')" />
<Reference Include="@(_SpaceEngineersAssemblyFile)">
<Private>false</Private>
</Reference>
</ItemGroup>
<Message Importance="High" Text="Using Space Engineers assemblies from $(SpaceEngineersBinPath)" />
</Target>
</Project>