mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-12-25 14:27:28 -05:00
112 lines
5.9 KiB
XML
112 lines
5.9 KiB
XML
<Project Sdk="Microsoft.NET.Sdk.Web">
|
|
|
|
<PropertyGroup>
|
|
<TargetFramework>net5.0</TargetFramework>
|
|
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
|
|
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
|
|
<IsPackable>false</IsPackable>
|
|
<SpaRoot>Views/WebClient/</SpaRoot>
|
|
<LoginRoot>Views/Login/</LoginRoot>
|
|
<TranscoderRoot>../transcoder</TranscoderRoot>
|
|
<DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules/**</DefaultItemExcludes>
|
|
|
|
<!-- Set this to true if you enable server-side prerendering -->
|
|
<BuildServerSideRenderer>false</BuildServerSideRenderer>
|
|
<Company>SDG</Company>
|
|
<Authors>Zoe Roux</Authors>
|
|
<RepositoryUrl>https://github.com/AnonymusRaccoon/Kyoo</RepositoryUrl>
|
|
<StartupObject>Kyoo.Program</StartupObject>
|
|
<LangVersion>default</LangVersion>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<ProjectReference Include="../Kyoo.Common/Kyoo.Common.csproj" />
|
|
<ProjectReference Include="../Kyoo.CommonAPI/Kyoo.CommonAPI.csproj" />
|
|
<PackageReference Include="IdentityServer4" Version="4.1.1" />
|
|
<PackageReference Include="IdentityServer4.AspNetIdentity" Version="4.1.1" />
|
|
<PackageReference Include="IdentityServer4.EntityFramework" Version="4.1.1" />
|
|
<PackageReference Include="IdentityServer4.EntityFramework.Storage" Version="4.1.1" />
|
|
<PackageReference Include="IdentityServer4.Storage" Version="4.1.1" />
|
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.3" />
|
|
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="5.0.2" />
|
|
<PackageReference Include="Portable.BouncyCastle" Version="1.8.9" />
|
|
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.1" />
|
|
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.7" />
|
|
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="5.0.3" />
|
|
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.3" />
|
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.3" />
|
|
<PackageReference Include="Microsoft.AspNetCore.SpaServices" Version="3.1.12" />
|
|
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="5.0.3" />
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.3" />
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="5.0.3" />
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.3">
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
<PrivateAssets>all</PrivateAssets>
|
|
</PackageReference>
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="5.0.3" />
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.3" />
|
|
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<Content Remove="$(SpaRoot)**" />
|
|
<None Include="$(SpaRoot)**" Exclude="$(SpaRoot)node_modules/**" />
|
|
<StaticFiles Include="$(SpaRoot)static/**" />
|
|
<LoginFiles Include="$(LoginRoot)**" />
|
|
<StaticFiles Include="Views/Login/material-icons.css" />
|
|
</ItemGroup>
|
|
|
|
<Target Name="PublishRunWebpack" AfterTargets="ComputeFilesToPublish">
|
|
<Exec WorkingDirectory="$(SpaRoot)" Command="npm install" />
|
|
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build -- --prod" />
|
|
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build:ssr -- --prod" Condition=" '$(BuildServerSideRenderer)' == 'true' " />
|
|
|
|
<ItemGroup>
|
|
<DistFiles Include="$(SpaRoot)dist/**; $(SpaRoot)dist-server/**" />
|
|
<DistFiles Include="$(SpaRoot)node_modules/**" Condition="'$(BuildServerSideRenderer)' == 'true'" />
|
|
<ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
|
|
<RelativePath>wwwroot/%(DistFiles.Filename)%(DistFiles.Extension)</RelativePath>
|
|
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
|
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
|
</ResolvedFileToPublish>
|
|
<ResolvedFileToPublish Include="@(StaticFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
|
|
<RelativePath>wwwroot/%(StaticFiles.RecursiveDir)%(StaticFiles.Filename)%(StaticFiles.Extension)</RelativePath>
|
|
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
|
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
|
</ResolvedFileToPublish>
|
|
<ResolvedFileToPublish Include="@(LoginFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
|
|
<RelativePath>login/%(LoginFiles.RecursiveDir)%(LoginFiles.Filename)%(LoginFiles.Extension)</RelativePath>
|
|
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
|
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
|
</ResolvedFileToPublish>
|
|
</ItemGroup>
|
|
</Target>
|
|
|
|
<Target Name="Prepare the web app" AfterTargets="Build" Condition="$(Configuration) == 'Debug'">
|
|
<Copy SourceFiles="@(StaticFiles)" DestinationFolder="$(OutputPath)/wwwroot/%(RecursiveDir)" />
|
|
<Copy SourceFiles="@(LoginFiles)" DestinationFolder="$(OutputPath)/login/%(RecursiveDir)" />
|
|
<Exec WorkingDirectory="$(SpaRoot)" Command="npm install" />
|
|
</Target>
|
|
|
|
<Target Name="Compile the transcoder" BeforeTargets="BeforeBuild">
|
|
<Exec WorkingDirectory="$(TranscoderRoot)" Command="mkdir --parent build; cd build; cmake ..; make -j" />
|
|
<Copy SourceFiles="$(TranscoderRoot)/build/libtranscoder.so" DestinationFolder="." />
|
|
</Target>
|
|
|
|
<ItemGroup>
|
|
<None Include="transcoder.dll" Condition="$(OS) == 'Windows_NT'">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
</ItemGroup>
|
|
<ItemGroup>
|
|
<None Include="libtranscoder.so" Condition="$(OS) == 'Unix'">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
</ItemGroup>
|
|
<ItemGroup>
|
|
<Folder Include="Models\DatabaseMigrations" />
|
|
<Folder Include="Models\DatabaseMigrations\IdentityDatbase" />
|
|
<Folder Include="Models\DatabaseMigrations\Internal" />
|
|
</ItemGroup>
|
|
</Project>
|