ExOK / Celeste64

A game made by the Celeste developers in a week(ish, closer to 2)
1.59k stars 125 forks source link

running dotnet publish puts the FMOD libs for the current plarform, not the target #19

Closed NoelFB closed 5 months ago

NoelFB commented 5 months ago

For example if you run dotnet publish -r win-x64 from Linux it will copy the linux FMOD libs to the publish directory, instead of the Windows ones. These entries need to check for the target platform, not the current one:

  <ItemGroup Condition="$([MSBuild]::IsOSPlatform('Linux'))">
    <Content Include="Source/Audio/FMOD/libs/lib64/**" CopyToOutputDirectory="PreserveNewest" Link="%(Filename)%(Extension)" />
  </ItemGroup>

  <ItemGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
    <Content Include="Source/Audio/FMOD/libs/x64/**" CopyToOutputDirectory="PreserveNewest" Link="%(Filename)%(Extension)" />
  </ItemGroup>

  <ItemGroup Condition="$([MSBuild]::IsOSPlatform('OSX'))">
    <Content Include="Source/Audio/FMOD/libs/osx/**" CopyToOutputDirectory="PreserveNewest" Link="%(Filename)%(Extension)" />
  </ItemGroup>