mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-25 03:04:26 +08:00
feat.增加了无.net10的安装包版本,实验性的修改了融合桌面设置下的组件库样式。
This commit is contained in:
@@ -20,6 +20,14 @@
|
||||
#define MyAppArch "x64"
|
||||
#endif
|
||||
|
||||
#ifndef MyAppSuffix
|
||||
#define MyAppSuffix ""
|
||||
#endif
|
||||
|
||||
#ifndef IsSelfContained
|
||||
#define IsSelfContained "true"
|
||||
#endif
|
||||
|
||||
[Setup]
|
||||
AppId={#MyAppId}
|
||||
AppName={#MyAppName}
|
||||
@@ -34,7 +42,7 @@ LanguageDetectionMethod=uilanguage
|
||||
DefaultGroupName={cm:AppShortcutName}
|
||||
UninstallDisplayIcon={app}\{#MyAppExeName}
|
||||
OutputDir={#MyOutputDir}
|
||||
OutputBaseFilename={#MyAppName}-Setup-{#MyAppVersion}-{#MyAppArch}
|
||||
OutputBaseFilename={#MyAppName}-Setup-{#MyAppVersion}-{#MyAppArch}{#MyAppSuffix}
|
||||
Compression=lzma2/ultra64
|
||||
SolidCompression=yes
|
||||
WizardStyle=modern
|
||||
@@ -93,7 +101,17 @@ chinesesimplified.UpgradeCleanupMissingUninstaller=安装程序发现了现有
|
||||
english.UpgradeCleanupFailedPrefix=Setup could not remove the existing installation automatically. Error code:
|
||||
chinesesimplified.UpgradeCleanupFailedPrefix=安装程序无法自动移除现有安装。错误代码:
|
||||
english.UpgradeCleanupFailedSuffix=Please close LanMountainDesktop, uninstall the current version manually, and then run this installer again.
|
||||
chinesesimplified.UpgradeCleanupFailedSuffix=请关闭 LanMountainDesktop,手动卸载当前版本,然后重新运行此安装程序。
|
||||
chinesesimplified.UpgradeCleanupFailedSuffix=请关闭 LanMountain Desktop,手动卸载当前版本,然后重新运行此安装程序。
|
||||
english.DotNetRuntimeMissingTitle=.NET Desktop Runtime Required
|
||||
chinesesimplified.DotNetRuntimeMissingTitle=需要 .NET Desktop Runtime
|
||||
english.DotNetRuntimeMissingMessage=This application requires .NET 10.0 Desktop Runtime to run.
|
||||
chinesesimplified.DotNetRuntimeMissingMessage=此应用程序需要 .NET 10.0 Desktop Runtime 才能运行。
|
||||
english.DotNetRuntimeMissingAction=Click "Yes" to open the official download page. Install it first, then run this installer again.
|
||||
chinesesimplified.DotNetRuntimeMissingAction=单击"是"打开官方下载页面。请先完成安装,然后重新运行此安装程序。
|
||||
english.DotNetRuntimeOpenFailedMessage=Unable to open the download page automatically.
|
||||
chinesesimplified.DotNetRuntimeOpenFailedMessage=无法自动打开下载页面。
|
||||
english.DotNetRuntimeOpenFailedAction=Please open this URL manually:
|
||||
chinesesimplified.DotNetRuntimeOpenFailedAction=请手动打开以下链接:
|
||||
|
||||
[Tasks]
|
||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
|
||||
@@ -127,6 +145,7 @@ const
|
||||
UninstallRegSubkey = 'Software\Microsoft\Windows\CurrentVersion\Uninstall\{#MyAppRegistryId}_is1';
|
||||
WebView2RuntimeKeyPath = 'SOFTWARE\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}';
|
||||
WebView2RuntimeDownloadUrl = 'https://go.microsoft.com/fwlink/p/?LinkId=2124703';
|
||||
DotNetRuntimeDownloadUrl = 'https://dotnet.microsoft.com/download/dotnet/10.0';
|
||||
UpgradeChoiceInPlace = 0;
|
||||
UpgradeChoiceRelocate = 1;
|
||||
|
||||
@@ -435,10 +454,58 @@ begin
|
||||
RegQueryStringValue(HKCU32, WebView2RuntimeKeyPath, 'pv', VersionValue);
|
||||
end;
|
||||
|
||||
function IsDotNetDesktopRuntimeInstalled(): Boolean;
|
||||
var
|
||||
RuntimePath: String;
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
RuntimePath := ExpandConstant('{commonpf64}\dotnet\shared\Microsoft.WindowsDesktop.App');
|
||||
if DirExists(RuntimePath) then
|
||||
begin
|
||||
Result := True;
|
||||
exit;
|
||||
end;
|
||||
|
||||
RuntimePath := ExpandConstant('{commonpf}\dotnet\shared\Microsoft.WindowsDesktop.App');
|
||||
if DirExists(RuntimePath) then
|
||||
begin
|
||||
Result := True;
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
function InitializeSetup(): Boolean;
|
||||
var
|
||||
ErrorCode: Integer;
|
||||
IsSelfContainedBuild: Boolean;
|
||||
begin
|
||||
IsSelfContainedBuild := ('{#IsSelfContained}' = 'true');
|
||||
|
||||
if not IsSelfContainedBuild then
|
||||
begin
|
||||
if not IsDotNetDesktopRuntimeInstalled() then
|
||||
begin
|
||||
if MsgBox(
|
||||
CustomMessage('DotNetRuntimeMissingMessage') + #13#10#13#10 +
|
||||
CustomMessage('DotNetRuntimeMissingAction'),
|
||||
mbConfirmation,
|
||||
MB_YESNO) = IDYES then
|
||||
begin
|
||||
if not ShellExec('open', DotNetRuntimeDownloadUrl, '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode) then
|
||||
begin
|
||||
MsgBox(
|
||||
CustomMessage('DotNetRuntimeOpenFailedMessage') + #13#10 +
|
||||
CustomMessage('DotNetRuntimeOpenFailedAction') + #13#10 + DotNetRuntimeDownloadUrl,
|
||||
mbError,
|
||||
MB_OK);
|
||||
end;
|
||||
end;
|
||||
Result := False;
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
if IsWebView2RuntimeInstalled() then
|
||||
begin
|
||||
Result := True;
|
||||
|
||||
Reference in New Issue
Block a user