Skip to content

Commit

Permalink
Size optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
Razmoth committed Jan 21, 2024
1 parent f0f322c commit e362f91
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 9 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: nuget restore

- name: Build for Windows
run: dotnet publish Audio.Desktop -c Release -r win-x64 --self-contained true
run: dotnet publish Audio.Desktop -c Release -r win-x64

- name: Upload build artifacts
uses: actions/upload-artifact@v3
Expand All @@ -48,11 +48,11 @@ jobs:
- name: Restore the application
run: nuget restore

- name: Build for Linux
run: dotnet publish Audio.Desktop -c Release -r linux-x64 --self-contained true
- name: Build for Mac
run: dotnet publish Audio.Desktop -c Release -r osx-x64

- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: net7.0_linux
path: Audio.Desktop/bin/Release/net7.0/linux-x64/publish
name: net7.0_osx
path: Audio.Desktop/bin/Release/net7.0/osx-x64/publish
33 changes: 30 additions & 3 deletions Audio.Desktop/Audio.Desktop.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,39 @@
<Nullable>enable</Nullable>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<ApplicationManifest>app.manifest</ApplicationManifest>
<SelfContained>True</SelfContained>
<PublishTrimmed>true</PublishTrimmed>
<PublishSingleFile>true</PublishSingleFile>
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>

<PropertyGroup Condition="'$(RuntimeIdentifier)' == '' And '$(Platform)' == 'x64' And $([MSBuild]::IsOSPlatform('Windows'))">
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup>

<PropertyGroup Condition="'$(RuntimeIdentifier)' == '' And '$(Platform)' == 'x64' And $([MSBuild]::IsOSPlatform('OSX'))">
<RuntimeIdentifier>osx-64</RuntimeIdentifier>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Avalonia.Desktop" Version="11.0.5" />
</ItemGroup>

<ItemGroup Condition="'$(RuntimeIdentifier)' == 'win-x64'">
<PackageReference Include="VideoLAN.LibVLC.Windows" Version="3.0.20" />
</ItemGroup>

<ItemGroup Condition="'$(RuntimeIdentifier)' == 'osx-64'">
<PackageReference Include="VideoLAN.LibVLC.Mac" Version="3.1.3.1" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Avalonia.Desktop" Version="11.0.5" />
<PackageReference Include="VideoLAN.LibVLC.Windows" Version="3.0.20" />
<PackageReference Include="VideoLAN.LibVLC.Mac" Version="3.1.3.1" />
<VlcWindowsX64IncludeFiles Include="libvlc.dll" />
<VlcWindowsX64IncludeFiles Include="libvlccore.dll" />
<VlcWindowsX64IncludeFiles Include="plugins\access\libfilesystem_plugin.dll" />
<VlcWindowsX64IncludeFiles Include="plugins\audio_output\libmmdevice_plugin.dll" />
<VlcWindowsX64IncludeFiles Include="plugins\audio_output\libwasapi_plugin.dll" />
<VlcWindowsX64IncludeFiles Include="plugins\codec\libavcodec_plugin.dll" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 10 additions & 0 deletions Audio.sln
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,27 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{380008C4-71AF-48B5-AB70-03968CD4826B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{380008C4-71AF-48B5-AB70-03968CD4826B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{380008C4-71AF-48B5-AB70-03968CD4826B}.Debug|x64.ActiveCfg = Debug|Any CPU
{380008C4-71AF-48B5-AB70-03968CD4826B}.Debug|x64.Build.0 = Debug|Any CPU
{380008C4-71AF-48B5-AB70-03968CD4826B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{380008C4-71AF-48B5-AB70-03968CD4826B}.Release|Any CPU.Build.0 = Release|Any CPU
{380008C4-71AF-48B5-AB70-03968CD4826B}.Release|x64.ActiveCfg = Release|x64
{380008C4-71AF-48B5-AB70-03968CD4826B}.Release|x64.Build.0 = Release|x64
{5E7ED7B4-8376-4BBE-BEA3-4FE9E696C819}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5E7ED7B4-8376-4BBE-BEA3-4FE9E696C819}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5E7ED7B4-8376-4BBE-BEA3-4FE9E696C819}.Debug|x64.ActiveCfg = Debug|x64
{5E7ED7B4-8376-4BBE-BEA3-4FE9E696C819}.Debug|x64.Build.0 = Debug|x64
{5E7ED7B4-8376-4BBE-BEA3-4FE9E696C819}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5E7ED7B4-8376-4BBE-BEA3-4FE9E696C819}.Release|Any CPU.Build.0 = Release|Any CPU
{5E7ED7B4-8376-4BBE-BEA3-4FE9E696C819}.Release|x64.ActiveCfg = Release|x64
{5E7ED7B4-8376-4BBE-BEA3-4FE9E696C819}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 1 addition & 1 deletion Audio/Audio.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.5" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.5" />
<PackageReference Include="LibVLCSharp" Version="3.8.2" />
<PackageReference Include="LibVLCSharp.Avalonia" Version="3.8.2" />
</ItemGroup>
</Project>

0 comments on commit e362f91

Please sign in to comment.