Added nuget export options for development. Added nuget patch script for dotnet-script
This commit is contained in:
@@ -5,49 +5,65 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||
<IsPackable>true</IsPackable>
|
||||
<Version>2.1.0</Version>
|
||||
<Title>Moonlight.ApiServer</Title>
|
||||
<Authors>Moonlight Panel</Authors>
|
||||
<Description>A build of moonlight's api server as a nuget package to develop moonlight plugins/modules</Description>
|
||||
<Copyright>Moonlight Panel</Copyright>
|
||||
<PackageProjectUrl>https://github.com/Moonlight-Panel/Moonlight</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/Moonlight-Panel/Moonlight</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<PackageTags>moonlight</PackageTags>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ExCSS" Version="4.3.0" />
|
||||
<PackageReference Include="Hangfire.AspNetCore" Version="1.8.18" />
|
||||
<PackageReference Include="Hangfire.Core" Version="1.8.18" />
|
||||
<PackageReference Include="Hangfire.EntityFrameworkCore" Version="0.7.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.10"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.8">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="MoonCore" Version="1.8.5" />
|
||||
<PackageReference Include="MoonCore.Extended" Version="1.3.2" />
|
||||
<PackageReference Include="MoonCore.PluginFramework" Version="1.0.5" />
|
||||
<PackageReference Include="SharpZipLib" Version="1.4.2" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0"/>
|
||||
<PackageReference Include="Ben.Demystifier" Version="0.4.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Moonlight.Client\Moonlight.Client.csproj"/>
|
||||
<ProjectReference Include="..\Moonlight.Shared\Moonlight.Shared.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Database\Migrations\" />
|
||||
<Folder Include="Database\Migrations\"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="..\.dockerignore">
|
||||
<Link>.dockerignore</Link>
|
||||
</Content>
|
||||
<Content Include="..\.dockerignore">
|
||||
<Link>.dockerignore</Link>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<PropertyGroup>
|
||||
<PackageId>Moonlight.ApiServer</PackageId>
|
||||
<Version>2.1.0</Version>
|
||||
<Authors>Moonlight Panel</Authors>
|
||||
<Description>A build of the api server for moonlight development</Description>
|
||||
<PackageProjectUrl>https://github.com/Moonlight-Panel/Moonlight</PackageProjectUrl>
|
||||
<DevelopmentDependency>true</DevelopmentDependency>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<IsPackable>true</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ExCSS" Version="4.3.0"/>
|
||||
<PackageReference Include="Hangfire.AspNetCore" Version="1.8.18"/>
|
||||
<PackageReference Include="Hangfire.Core" Version="1.8.18"/>
|
||||
<PackageReference Include="Hangfire.EntityFrameworkCore" Version="0.7.0"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.10"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.8"/>
|
||||
<PackageReference Include="MoonCore" Version="1.8.5"/>
|
||||
<PackageReference Include="MoonCore.Extended" Version="1.3.2"/>
|
||||
<PackageReference Include="MoonCore.PluginFramework" Version="1.0.5"/>
|
||||
<PackageReference Include="SharpZipLib" Version="1.4.2"/>
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0"/>
|
||||
<PackageReference Include="Ben.Demystifier" Version="0.4.1"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="**\*.cs" Exclude="storage\**\*;bin\**\*;obj\**\*">
|
||||
<Pack>true</Pack>
|
||||
<PackagePath>src</PackagePath>
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="**\*.razor" Exclude="storage\**\*;bin\**\*;obj\**\*">
|
||||
<Pack>true</Pack>
|
||||
<PackagePath>src</PackagePath>
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</None>
|
||||
<Compile Remove="storage\**\*" />
|
||||
<Content Remove="storage\**\*" />
|
||||
<None Remove="storage\**\*" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -6,29 +6,53 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||
<IsPackable>true</IsPackable>
|
||||
<Version>2.1.0</Version>
|
||||
<Title>Moonlight.Client</Title>
|
||||
<Authors>Moonlight Panel</Authors>
|
||||
<Description>A build of moonlight's client as a nuget package to develop moonlight plugins/modules</Description>
|
||||
<Copyright>Moonlight Panel</Copyright>
|
||||
<PackageProjectUrl>https://github.com/Moonlight-Panel/Moonlight</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/Moonlight-Panel/Moonlight</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<PackageTags>moonlight</PackageTags>
|
||||
<DefaultItemExcludes>
|
||||
**\bin\**;**\obj\**;**\node_modules\**;**\Styles\*.json
|
||||
</DefaultItemExcludes>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<PropertyGroup>
|
||||
<PackageId>Moonlight.Client</PackageId>
|
||||
<Version>2.1.0</Version>
|
||||
<Authors>Moonlight Panel</Authors>
|
||||
<Description>A build of the client for moonlight development</Description>
|
||||
<PackageProjectUrl>https://github.com/Moonlight-Panel/Moonlight</PackageProjectUrl>
|
||||
<DevelopmentDependency>true</DevelopmentDependency>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<IsPackable>true</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Blazor-ApexCharts" Version="4.0.1" />
|
||||
<PackageReference Include="Blazor-ApexCharts" Version="4.0.1"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.10"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.10" PrivateAssets="all"/>
|
||||
<PackageReference Include="MoonCore" Version="1.8.5" />
|
||||
<PackageReference Include="MoonCore.Blazor" Version="1.2.9" />
|
||||
<PackageReference Include="MoonCore" Version="1.8.5"/>
|
||||
<PackageReference Include="MoonCore.Blazor" Version="1.2.9"/>
|
||||
<PackageReference Include="MoonCore.PluginFramework" Version="1.0.5"/>
|
||||
<PackageReference Include="MoonCore.Blazor.Tailwind" Version="1.4.2" />
|
||||
<PackageReference Include="MoonCore.Blazor.Tailwind" Version="1.4.2"/>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="**\*.cs" Exclude="storage\**\*;bin\**\*;obj\**\*">
|
||||
<Pack>true</Pack>
|
||||
<PackagePath>src</PackagePath>
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="**\*.razor" Exclude="storage\**\*;bin\**\*;obj\**\*">
|
||||
<Pack>true</Pack>
|
||||
<PackagePath>src</PackagePath>
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Styles\**\*" Exclude="storage\**\*;bin\**\*;obj\**\*;Styles\node_modules\**\*">
|
||||
<Pack>true</Pack>
|
||||
<PackagePath>styles</PackagePath>
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</None>
|
||||
<Compile Remove="storage\**\*"/>
|
||||
<Content Remove="storage\**\*"/>
|
||||
<None Remove="storage\**\*"/>
|
||||
</ItemGroup>
|
||||
|
||||
<!--
|
||||
@@ -50,7 +74,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Helpers\"/>
|
||||
<Folder Include="Styles\" />
|
||||
<Folder Include="Styles\"/>
|
||||
<Folder Include="wwwroot\css\"/>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -4,17 +4,17 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<IsPackable>true</IsPackable>
|
||||
<PropertyGroup>
|
||||
<PackageId>Moonlight.Shared</PackageId>
|
||||
<Version>2.1.0</Version>
|
||||
<Title>Moonlight.Shared</Title>
|
||||
<Authors>Moonlight Panel</Authors>
|
||||
<Description>A build of moonlight's shared classes as a nuget package to develop moonlight plugins/modules</Description>
|
||||
<Copyright>Moonlight Panel</Copyright>
|
||||
<Description>A build of the shared classes for moonlight development</Description>
|
||||
<PackageProjectUrl>https://github.com/Moonlight-Panel/Moonlight</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/Moonlight-Panel/Moonlight</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<PackageTags>moonlight</PackageTags>
|
||||
<DevelopmentDependency>true</DevelopmentDependency>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<IsPackable>true</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
66
Resources/Scripts/patchClient.csx
Normal file
66
Resources/Scripts/patchClient.csx
Normal file
@@ -0,0 +1,66 @@
|
||||
using System.IO.Compression;
|
||||
using System.Text;
|
||||
using System.Xml.Linq;
|
||||
|
||||
// Handle arguments
|
||||
if (Args.Count != 1)
|
||||
{
|
||||
Console.WriteLine("You need to provide the path to a nuget file as a parameter");
|
||||
return;
|
||||
}
|
||||
|
||||
var nugetPath = Args[0];
|
||||
|
||||
// Check if file exists
|
||||
if (!File.Exists(nugetPath))
|
||||
{
|
||||
Console.WriteLine("The provided file does not exist");
|
||||
return;
|
||||
}
|
||||
|
||||
// Open file to modify
|
||||
Console.WriteLine($"Modding nuget package: {nugetPath}");
|
||||
var zipFile = ZipFile.Open(nugetPath, ZipArchiveMode.Update, Encoding.UTF8);
|
||||
|
||||
// First we want to remove the framework files
|
||||
Console.WriteLine("Removing framework files");
|
||||
|
||||
var frameworkEntries = zipFile.Entries
|
||||
.Where(x => x.FullName.Contains("staticwebassets/_framework"))
|
||||
.ToArray();
|
||||
|
||||
foreach (var frameworkEntry in frameworkEntries)
|
||||
frameworkEntry.Delete();
|
||||
|
||||
// Then we want to modify the build targets for static web assets
|
||||
var oldBuildTarget = zipFile.Entries
|
||||
.First(x => x.FullName == "build/Microsoft.AspNetCore.StaticWebAssets.props");
|
||||
|
||||
// Load old content
|
||||
var oldContentStream = oldBuildTarget.Open();
|
||||
|
||||
// Parse xml and remove framework references
|
||||
Console.WriteLine("Removing framework web asset references");
|
||||
|
||||
var contentXml = XDocument.Load(oldContentStream);
|
||||
oldContentStream.Close();
|
||||
oldContentStream.Dispose();
|
||||
oldBuildTarget.Delete();
|
||||
|
||||
var assetsToRemove = contentXml
|
||||
.Descendants("StaticWebAsset")
|
||||
.Where(asset =>
|
||||
asset.Element("RelativePath")?.Value.Contains("_framework") == true)
|
||||
.ToArray();
|
||||
|
||||
foreach (var asset in assetsToRemove)
|
||||
asset.Remove();
|
||||
|
||||
var newBuildTarget = zipFile.CreateEntry("build/Microsoft.AspNetCore.StaticWebAssets.props");
|
||||
var newContentStream = newBuildTarget.Open();
|
||||
contentXml.Save(newContentStream);
|
||||
|
||||
await newContentStream.FlushAsync();
|
||||
newContentStream.Close();
|
||||
|
||||
zipFile.Dispose();
|
||||
Reference in New Issue
Block a user