Skip to content

Commit

Permalink
Add UWP seperate project
Browse files Browse the repository at this point in the history
  • Loading branch information
ryancheung committed Mar 20, 2024
1 parent ad21400 commit 9387228
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,24 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }} Artifacts
path: |
FreeTypeSharp/bin/Release/*.nupkg
BuildUWP:
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2

- name: Build
run: msbuild FreeTypeSharp/FreeTypeSharp.UWP.csproj -t:Restore,Pack /property:Configuration=Release

- uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }} UWP Artifacts
path: |
FreeTypeSharp/bin/Release/*.nupkg
65 changes: 65 additions & 0 deletions FreeTypeSharp/FreeTypeSharp.UWP.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('windows'))">
<TargetFramework>uap10.0</TargetFramework>
</PropertyGroup>

<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<RootNamespace>FreeTypeSharp</RootNamespace>
<AssemblyName>FreeTypeSharp</AssemblyName>
<VersionPrefix>2.1.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>

<PropertyGroup>
<PackageProjectUrl>https://github.com/ryancheung/FreeTypeSharp</PackageProjectUrl>
<RepositoryUrl>https://github.com/ryancheung/FreeTypeSharp</RepositoryUrl>
<Authors>ryancheung</Authors>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Description>A modern cross-platform managed FreeType2 library.</Description>
<PackageTags>freetype2;netstandard2.0;.net8.0;</PackageTags>
<PackageId>FreeTypeSharp.UWP</PackageId>
<Copyright>Copyright 2024 ryancheung</Copyright>
</PropertyGroup>

<ItemGroup>
<None Include="..\README.md" Pack="true" PackagePath="\"/>
</ItemGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0'">
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
<TargetFrameworkIdentifier>.NETCore</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
<DefineConstants>$(DefineConstants);WINDOWS_UWP</DefineConstants>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'uap10.0' ">
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.14" />
</ItemGroup>

<ItemGroup>
<None Include="..\runtimes\FreeType2\win10-x86\freetype.dll">
<Pack>true</Pack>
<PackagePath>runtimes\win10-x86\native\</PackagePath>
<Link>runtimes\win10-x86\native\freetype.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>

<None Include="..\runtimes\FreeType2\win10-x64\freetype.dll">
<Pack>true</Pack>
<PackagePath>runtimes\win10-x64\native\</PackagePath>
<Link>runtimes\win10-x64\native\freetype.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>

<None Include="..\runtimes\FreeType2\win10-arm64\freetype.dll">
<Pack>true</Pack>
<PackagePath>runtimes\win10-arm64\native\</PackagePath>
<Link>runtimes\win10-arm64\native\freetype.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

0 comments on commit 9387228

Please sign in to comment.