mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
csproj: Reworking static file packing
This commit is contained in:
parent
e35b4f5527
commit
b7acae88b5
@ -21,20 +21,10 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<LoginFiles Include="$(LoginRoot)**" Visible="false" />
|
<None Remove="$(LoginRoot)**;" />
|
||||||
|
<Content Include="$(LoginRoot)**">
|
||||||
|
<Link>login/%(RecursiveDir)%(Filename)%(Extension)</Link>
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="Publish login files" AfterTargets="ComputeFilesToPublish">
|
|
||||||
<ItemGroup>
|
|
||||||
<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 static files" AfterTargets="Build" Condition="$(Configuration) == 'Debug'">
|
|
||||||
<Copy SourceFiles="@(LoginFiles)" DestinationFolder="$(OutputPath)/login/%(RecursiveDir)" />
|
|
||||||
</Target>
|
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit dc37ce398d6c9cacc7703e21552a116c42b548ed
|
Subproject commit 49cf0c3d17f889f40fa9adbb383edfc0d2c99779
|
@ -49,6 +49,7 @@
|
|||||||
Command="mkdir -p build %26%26 cd build %26%26 cmake .. %26%26 make -j" />
|
Command="mkdir -p build %26%26 cd build %26%26 cmake .. %26%26 make -j" />
|
||||||
<Exec WorkingDirectory="$(TranscoderRoot)" Condition="'$(IsWindows)' == 'true'"
|
<Exec WorkingDirectory="$(TranscoderRoot)" Condition="'$(IsWindows)' == 'true'"
|
||||||
Command="(if not exist build mkdir build) %26%26 cd build %26%26 cmake .. -G "NMake Makefiles" %26%26 nmake" />
|
Command="(if not exist build mkdir build) %26%26 cd build %26%26 cmake .. -G "NMake Makefiles" %26%26 nmake" />
|
||||||
|
<!--TODO maybe don't copy the transcoder binary to the project root but directly copy it to the output folder (maybe a none include outside of the project)-->
|
||||||
<Copy SourceFiles="$(TranscoderRoot)/build/$(TranscoderBinary)" DestinationFolder="." />
|
<Copy SourceFiles="$(TranscoderRoot)/build/$(TranscoderBinary)" DestinationFolder="." />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ using Kyoo.SqLite;
|
|||||||
using Kyoo.Tasks;
|
using Kyoo.Tasks;
|
||||||
using Kyoo.TheMovieDb;
|
using Kyoo.TheMovieDb;
|
||||||
using Kyoo.TheTvdb;
|
using Kyoo.TheTvdb;
|
||||||
|
using Kyoo.WebApp;
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
@ -46,8 +47,10 @@ namespace Kyoo
|
|||||||
{
|
{
|
||||||
_plugins = plugins;
|
_plugins = plugins;
|
||||||
_configuration = configuration;
|
_configuration = configuration;
|
||||||
|
// TODO enable the web app only if it was build with it.
|
||||||
_plugins.LoadPlugins(
|
_plugins.LoadPlugins(
|
||||||
typeof(CoreModule),
|
typeof(CoreModule),
|
||||||
|
typeof(WebAppModule),
|
||||||
typeof(AuthenticationModule),
|
typeof(AuthenticationModule),
|
||||||
typeof(PostgresModule),
|
typeof(PostgresModule),
|
||||||
typeof(SqLiteModule),
|
typeof(SqLiteModule),
|
||||||
|
@ -33,6 +33,8 @@ namespace Kyoo
|
|||||||
|
|
||||||
IHostBuilder builder = CreateWebHostBuilder(args);
|
IHostBuilder builder = CreateWebHostBuilder(args);
|
||||||
|
|
||||||
|
// TODO remove ENVIRONEMENT handling and force it to the build env
|
||||||
|
|
||||||
bool? debug = Environment.GetEnvironmentVariable("ENVIRONMENT")?.ToLowerInvariant() switch
|
bool? debug = Environment.GetEnvironmentVariable("ENVIRONMENT")?.ToLowerInvariant() switch
|
||||||
{
|
{
|
||||||
"d" => true,
|
"d" => true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user