Skip to content

Commit 4c504fd

Browse files
Merge pull request #1 from YimingZhanshen/copilot/optimize-project-and-fix-bugs
Migrate to .NET 8.0 and add multi-platform CI
2 parents 806fd39 + e2ab7d9 commit 4c504fd

3 files changed

Lines changed: 71 additions & 12 deletions

File tree

.github/workflows/build.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build and Test
2+
3+
on:
4+
push:
5+
branches: [ main, master, develop ]
6+
pull_request:
7+
branches: [ main, master, develop ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
runs-on: ${{ matrix.os }}
13+
permissions:
14+
contents: read
15+
strategy:
16+
matrix:
17+
os: [ubuntu-latest, windows-latest, macos-latest]
18+
configuration: [Debug, Release]
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Setup .NET
25+
uses: actions/setup-dotnet@v4
26+
with:
27+
dotnet-version: '8.0.x'
28+
29+
- name: Restore dependencies
30+
run: dotnet restore AirPlay.sln
31+
32+
- name: Build
33+
run: dotnet build AirPlay.sln --configuration ${{ matrix.configuration }} --no-restore
34+
35+
- name: Display build output location
36+
shell: bash
37+
run: |
38+
echo "Build completed for ${{ matrix.os }} - ${{ matrix.configuration }}"
39+
find AirPlay/bin/${{ matrix.configuration }} -type f -name "AirPlay.dll" || true

AirPlay/AirPlay.csproj

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,29 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp2.2</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
6+
<NoWarn>$(NoWarn);SYSLIB0011</NoWarn>
67
</PropertyGroup>
78

89
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
910
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
1011
<Prefer32Bit>false</Prefer32Bit>
11-
<DefineConstants>TRACE;DEBUG;NETCOREAPP;NETCOREAPP2_2;DUMP</DefineConstants>
12+
<DefineConstants>TRACE;DEBUG;DUMP</DefineConstants>
1213
</PropertyGroup>
1314
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
1415
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
1516
</PropertyGroup>
1617
<ItemGroup>
18+
<PackageReference Include="curve25519-pcl" Version="1.0.1" />
1719
<PackageReference Include="Makaretu.Dns.Multicast" Version="0.27.0" />
18-
<PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" />
19-
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="5.0.0" />
20-
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />
20+
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
21+
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
22+
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
2123
<PackageReference Include="RtspClientSharp" Version="1.3.3" />
22-
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
23-
<PackageReference Include="BouncyCastle" Version="1.8.6.1" />
24-
<PackageReference Include="Curve25519" Version="1.0.1" />
24+
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
25+
<PackageReference Include="BouncyCastle.Cryptography" Version="2.4.0" />
2526
<PackageReference Include="Chaos.NaCl.Core" Version="1.0.0" />
26-
<PackageReference Include="curve25519-pcl" Version="1.0.1" />
27+
<PackageReference Include="Curve25519" Version="1.0.1" />
2728
</ItemGroup>
2829

2930
<ItemGroup>

README.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,31 @@
11
# AirPlay Receiver
2-
Open source implementation of AirPlay 2 Mirroring / Audio protocol in C# .Net Core.
2+
Open source implementation of AirPlay 2 Mirroring / Audio protocol in C# and .NET.
3+
4+
![Build Status](https://github.com/YimingZhanshen/Airplay2OnWindows/workflows/Build%20and%20Test/badge.svg)
5+
6+
## Requirements
7+
8+
- .NET 8.0 SDK or later
9+
- C++ build tools for compiling AAC and ALAC codecs
310

411
## Generic
512

613
Tested on macOS with iPhone 12 Pro iOS14.
714

8-
The project is fully functional, but the AAC and ALAC libraries written in C ++ must be built.
9-
15+
The project is fully functional, but the AAC and ALAC libraries written in C++ must be built.
16+
17+
## Building the Project
18+
19+
### Prerequisites
20+
1. Install [.NET 8.0 SDK](https://dotnet.microsoft.com/download/dotnet/8.0)
21+
2. Build the required codecs (see below)
22+
23+
### Compile the Project
24+
```bash
25+
$ dotnet restore AirPlay.sln
26+
$ dotnet build AirPlay.sln --configuration Release
27+
```
28+
1029
## How To
1130

1231
### Build AAC Codec

0 commit comments

Comments
 (0)