MSBuild: Add platform-agnostic task to convert WAV to OGG

This commit is contained in:
ivan tkachenko 2025-07-16 18:02:36 +03:00
parent f5dab20d67
commit 43d1565dbe
2 changed files with 18 additions and 0 deletions

View File

@ -2,9 +2,13 @@
<Project>
<PropertyGroup>
<!-- Copy this file to MuzikaGromche.props.user and uncomment one of two paths below: -->
<!-- On Linux: -->
<!-- <LethalCompanyDir>$(HOME)/.local/share/Steam/steamapps/common/Lethal Company/</LethalCompanyDir> -->
<!-- <WavExportDir>\home\ratijas\Music\SFX\Export</WavExportDir> -->
<!-- On Windows: -->
<!-- <LethalCompanyDir>C:/Program Files (x86)/Steam/steamapps/common/Lethal Company/</LethalCompanyDir> -->
<!-- <WavExportDir>D:\Code\MuzikaGromcheAudio\Export</WavExportDir> -->
</PropertyGroup>
</Project>

View File

@ -73,4 +73,18 @@
DestinationFolder="$(SolutionDir)dist\"
/>
</Target>
<!--
Usage:
Set WavExportDir in props.user file.
Run
> dotnet msbuild /t:wav2ogg /p:TrackName=GodMode
-->
<Target Name="wav2ogg">
<ItemGroup>
<TrackNames Include="$(TrackName)Start" />
<TrackNames Include="$(TrackName)Loop" />
</ItemGroup>
<Exec Command="ffmpeg -bitexact -y -i $(WavExportDir)%(TrackNames.Identity).wav $(SolutionDir)Assets\%(TrackNames.Identity).ogg"/>
</Target>
</Project>