mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Build: Cleaning up the build process but breaking windows publish
This commit is contained in:
parent
c44272a098
commit
acf87b2619
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net5.0</TargetFramework>
|
<TargetFramework>net5.0</TargetFramework>
|
||||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
|
||||||
<Title>Kyoo.Abstractions</Title>
|
<Title>Kyoo.Abstractions</Title>
|
||||||
<Authors>Zoe Roux</Authors>
|
<Authors>Zoe Roux</Authors>
|
||||||
<Description>Base package to create plugins for Kyoo.</Description>
|
<Description>Base package to create plugins for Kyoo.</Description>
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
<DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules/**</DefaultItemExcludes>
|
<DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules/**</DefaultItemExcludes>
|
||||||
<SpaRoot>Front/</SpaRoot>
|
<SpaRoot>Front/</SpaRoot>
|
||||||
|
<NpmStamp>$(SpaRoot)node_modules/.install-stamp</NpmStamp>
|
||||||
|
|
||||||
<!-- Set this to true if you enable server-side prerendering -->
|
<!-- Set this to true if you enable server-side prerendering -->
|
||||||
<BuildServerSideRenderer>false</BuildServerSideRenderer>
|
<BuildServerSideRenderer>false</BuildServerSideRenderer>
|
||||||
@ -35,16 +36,20 @@
|
|||||||
</Content>
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="RunWebpack" Condition="'$(SkipWebApp)' != 'true' And '$(CustomRuntime)' != 'true'">
|
<Target Name="NpmInstall" BeforeTargets="RunWebpack" Inputs="$(SpaRoot)/package.json" Outputs="$(NpmStamp)">
|
||||||
<Exec Command="node --version" ContinueOnError="true">
|
<Exec Command="node --version" ContinueOnError="true">
|
||||||
<Output TaskParameter="ExitCode" PropertyName="ErrorCode" />
|
<Output TaskParameter="ExitCode" PropertyName="ErrorCode" />
|
||||||
</Exec>
|
</Exec>
|
||||||
<Error Condition="'$(ErrorCode)' != '0'" Text="Node.js is required to build and run this project. To continue, please install Node.js from https://nodejs.org/, and then restart your command prompt or IDE." />
|
<Error Condition="'$(ErrorCode)' != '0'" Text="Node.js is required to build and run this project. To continue, please install Node.js from https://nodejs.org/, and then restart your command prompt or IDE." />
|
||||||
|
|
||||||
<Message Importance="high" Text="Restoring dependencies using 'npm'. This may take several minutes..." />
|
<Message Importance="high" Text="Restoring dependencies using 'npm'. This may take several minutes..." />
|
||||||
<Exec WorkingDirectory="$(SpaRoot)" Command="npm install" Condition="'$(Configuration)' != 'Debug' Or !Exists('$(SpaRoot)node_modules')" />
|
<Exec WorkingDirectory="$(SpaRoot)" Command="npm install" />
|
||||||
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build -- --prod" Condition="'$(Configuration)' != 'Debug'" />
|
<Touch Files="$(NpmStamp)" AlwaysCreate="true" />
|
||||||
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build:ssr -- --prod" Condition="'$(Configuration)' != 'Debug' And '$(BuildServerSideRenderer)' == 'true'" />
|
</Target>
|
||||||
|
|
||||||
|
<Target Name="RunWebpack" Condition="'$(SkipWebApp)' != 'true' And '$(Configuration)' == 'Debug'">
|
||||||
|
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build -- --prod" />
|
||||||
|
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build:ssr -- --prod" Condition="'$(BuildServerSideRenderer)' == 'true'" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="CopyFrontEndFiles" AfterTargets="RunWebpack" BeforeTargets="GetCopyToOutputDirectoryItems" Condition="'$(Configuration)' != 'Debug'">
|
<Target Name="CopyFrontEndFiles" AfterTargets="RunWebpack" BeforeTargets="GetCopyToOutputDirectoryItems" Condition="'$(Configuration)' != 'Debug'">
|
||||||
@ -66,6 +71,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<BuildDependsOn>
|
<BuildDependsOn>
|
||||||
|
NpmInstall;
|
||||||
RunWebpack;
|
RunWebpack;
|
||||||
$(BuildDependsOn)
|
$(BuildDependsOn)
|
||||||
</BuildDependsOn>
|
</BuildDependsOn>
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="../Kyoo/Kyoo.csproj" Properties="CustomRuntime=true;SelfContainedValue=$(SelfContained);RuntimeIdentifierValue=$(RuntimeIdentifier)" />
|
<ProjectReference Include="../Kyoo/Kyoo.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@ -20,4 +20,4 @@
|
|||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -11,11 +11,6 @@
|
|||||||
<LangVersion>default</LangVersion>
|
<LangVersion>default</LangVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="$(CustomRuntime) == true">
|
|
||||||
<SelfContained>$(SelfContainedValue)</SelfContained>
|
|
||||||
<RuntimeIdentifier>$(RuntimeIdentifierValue)</RuntimeIdentifier>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<IsWindows Condition="$([MSBuild]::IsOSPlatform('Windows'))">true</IsWindows>
|
<IsWindows Condition="$([MSBuild]::IsOSPlatform('Windows'))">true</IsWindows>
|
||||||
<IsOSX Condition="$([MSBuild]::IsOSPlatform('OSX'))">true</IsOSX>
|
<IsOSX Condition="$([MSBuild]::IsOSPlatform('OSX'))">true</IsOSX>
|
||||||
@ -50,7 +45,7 @@
|
|||||||
<ProjectReference Include="../Kyoo.Postgresql/Kyoo.Postgresql.csproj" />
|
<ProjectReference Include="../Kyoo.Postgresql/Kyoo.Postgresql.csproj" />
|
||||||
<ProjectReference Include="../Kyoo.SqLite/Kyoo.SqLite.csproj" />
|
<ProjectReference Include="../Kyoo.SqLite/Kyoo.SqLite.csproj" />
|
||||||
<ProjectReference Include="../Kyoo.Authentication/Kyoo.Authentication.csproj" />
|
<ProjectReference Include="../Kyoo.Authentication/Kyoo.Authentication.csproj" />
|
||||||
<ProjectReference Include="../Kyoo.WebApp/Kyoo.WebApp.csproj" Properties="CustomRuntime=$(CustomRuntime)" />
|
<ProjectReference Include="../Kyoo.WebApp/Kyoo.WebApp.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="BuildTranscoder" BeforeTargets="BeforeBuild" Condition="'$(SkipTranscoder)' != 'true' And !Exists('$(TranscoderRoot)/build/$(TranscoderBinary)')">
|
<Target Name="BuildTranscoder" BeforeTargets="BeforeBuild" Condition="'$(SkipTranscoder)' != 'true' And !Exists('$(TranscoderRoot)/build/$(TranscoderBinary)')">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user