feat.在线安装器,更好的Issue与pull request模板。

This commit is contained in:
lincube
2026-06-03 00:50:52 +08:00
parent 29bd47986c
commit 28b06031f7
38 changed files with 2976 additions and 123 deletions

View File

@@ -0,0 +1,81 @@
namespace LanDesktopPLONDS.Installer.Services;
internal sealed record InstallerPlondsSource(
string Id,
string Kind,
string ManifestUrl,
int Priority = 0);
internal sealed record InstallerPlondsManifest(
string FormatVersion,
string CurrentVersion,
string PreviousVersion,
bool IsFullUpdate,
bool RequiresCleanInstall,
string Channel,
string Platform,
DateTimeOffset UpdatedAt,
IReadOnlyDictionary<string, InstallerPlondsFileEntry> FilesMap,
IReadOnlyDictionary<string, InstallerPlondsChangedFileEntry> ChangedFilesMap,
IReadOnlyDictionary<string, string> Checksums,
InstallerPlondsDownloads? Downloads,
IReadOnlyList<InstallerPlondsSource>? Sources);
internal sealed record InstallerPlondsFileEntry(
string Action,
string Hash,
long Size,
string HashAlgorithm = "sha256");
internal sealed record InstallerPlondsChangedFileEntry(
string ArchivePath,
string Hash,
long Size,
string HashAlgorithm = "sha256");
internal sealed record InstallerPlondsDownloads(
InstallerPlondsGitHubDownloads? GitHub,
InstallerPlondsS3Downloads? S3);
internal sealed record InstallerPlondsGitHubDownloads(
string? ReleaseUrl,
string? ManifestUrl,
string? ChangedZipUrl,
string? FilesZipUrl);
internal sealed record InstallerPlondsS3Downloads(
string? Bucket,
string? Prefix,
string? ManifestKey,
string? ManifestUrl,
string? ChangedZipKey,
string? ChangedZipUrl,
string? ChangedFolderKey,
string? ChangedFolderUrl,
string? FilesZipKey,
string? FilesZipUrl,
string? FilesFolderKey,
string? FilesFolderUrl);
public sealed record OnlineInstallPackageInfo(
string Version,
string SourceId,
Uri FilesZipUrl,
long EstimatedBytes);
public sealed record OnlineInstallOptions(bool CreateDesktopShortcut)
{
public static OnlineInstallOptions Default { get; } = new(CreateDesktopShortcut: false);
}
internal sealed record InstallerPlondsCandidate(
InstallerPlondsSource Source,
InstallerPlondsManifest Manifest,
Uri FilesZipUrl);
internal sealed record PreparedFilesPackage(
string Version,
string SourceId,
string ZipPath,
string ExtractDirectory,
InstallerPlondsManifest Manifest);