feat.PLONDS在线安装器继续优化

This commit is contained in:
lincube
2026-06-09 22:18:27 +08:00
parent 2768b76e1e
commit 13895e0f43
16 changed files with 287 additions and 120 deletions

View File

@@ -28,6 +28,7 @@ internal sealed class FilesPackageInstaller
var sourceAppDirectory = ResolveFullPackageAppDirectory(package.ExtractDirectory, package.Version);
var targetDeployment = BuildDeploymentDirectory(launcherRoot, package.Version);
InstallerElevation.EnsureCanInstall(launcherRoot);
InstallerPathGuard.EnsureUsableInstallPath(launcherRoot, EstimateRequiredBytes(sourceAppDirectory));
Directory.CreateDirectory(launcherRoot);
await CopyLauncherRootPayloadAsync(package.ExtractDirectory, sourceAppDirectory, launcherRoot, package.Version, progress, cancellationToken)
@@ -299,7 +300,9 @@ internal sealed class FilesPackageInstaller
return;
}
var startMenu = Environment.GetFolderPath(Environment.SpecialFolder.CommonStartMenu);
var startMenu = InstallerElevation.IsRunningElevated()
? Environment.GetFolderPath(Environment.SpecialFolder.CommonStartMenu)
: Environment.GetFolderPath(Environment.SpecialFolder.StartMenu);
if (string.IsNullOrWhiteSpace(startMenu))
{
startMenu = Environment.GetFolderPath(Environment.SpecialFolder.StartMenu);