the image of the installed app after being launched
my thou my published version works fine
this is my file structure
win-x64/
├── appicon.ico
├ack ├мобил. /> │ └acke vc_redist.x64.exe < /p>
└ инструквис.
Код: Выделить всё
win-x64
true
< /code>
Publish Is Is Where Is опубликованная версия моего приложения существует
Использование этого кода
dotnet publish -c release -f net8.0 -windows10.0.19041.0 -sc -p: runtimeIdentifier = win -x64 -p: windowspackageTyp = none
, и да, это не строительство. /> myApp.iss file
- это то, где существует мой инноированный код < /p>
#define MyAppName "[myappname]"
#define MyAppVersion "1.0.0"
#define MyAppPublisher "[myCompany]"
#define MyAppURL "https://www.mycompanywebiste.com"
#define MyAppExeName "[myappname].exe"
#define MyAppIconFullName "appicon.ico"
#define DependenciesFolderName "Dependencies"
#define PublishFolderName "publish"
[Setup]
AppId={{AUTO_GUID}}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={autopf}\{#MyAppName}
DefaultGroupName={#MyAppName}
DisableProgramGroupPage=yes
OutputBaseFilename=[myappname]_Setup_{#MyAppVersion}_x64
Compression=lzma
SolidCompression=yes
WizardStyle=modern
PrivilegesRequired=admin
ArchitecturesInstallIn64BitMode=x64
SetupIconFile={#MyAppIconFullName}
UninstallDisplayIcon={app}\{#MyAppIconFullName}
DisableDirPage=no
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "{#PublishFolderName}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{#MyAppIconFullName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#DependenciesFolderName}\VC_redist.x64.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall
Source: "{#DependenciesFolderName}\MicrosoftEdgeWebView2RuntimeInstallerX64.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall
Source: "{#DependenciesFolderName}\WindowsAppRuntimeInstall-x64.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\{#MyAppIconFullName}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon; IconFilename: "{app}\{#MyAppIconFullName}"
[Run]
Filename: "{tmp}\VC_redist.x64.exe"; Parameters: "/install /passive /norestart"; StatusMsg: "Installing Microsoft Visual C++ Redistributable (x64)..."; Check: VCRedistNeedsInstall; Flags: skipifdoesntexist
Filename: "{tmp}\MicrosoftEdgeWebView2RuntimeInstallerX64.exe"; Parameters: "/silent /install"; StatusMsg: "Installing Microsoft Edge WebView2 Runtime..."; Check: WebView2RuntimeNeedsInstall; Flags: skipifdoesntexist
Filename: "{tmp}\WindowsAppRuntimeInstall-x64.exe"; Parameters: "-q --force"; StatusMsg: "Installing Windows App Runtime..."; Check: WindowsAppRuntimeNeedsInstall; Flags: skipifdoesntexist
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#MyAppName}}"; Flags: nowait postinstall skipifsilent unchecked
[Code]
function VCRedistNeedsInstall: Boolean;
begin
Result := True;
end;
function WebView2RuntimeNeedsInstall: Boolean;
var
Version: string;
begin
if RegQueryStringValue(HKLM64, 'SOFTWARE\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}', 'pv', Version) then
begin
if Version '' then
begin
Log(Format('WebView2 Runtime found (HKLM64), version: %s. Skipping installation.', [Version]));
Result := False;
Exit;
end;
end;
if IsWin64 then
begin
if RegQueryStringValue(HKLM32, 'SOFTWARE\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}', 'pv', Version) then
begin
if Version '' then
begin
Log(Format('WebView2 Runtime found (HKLM32 on Win64), version: %s. Skipping installation.', [Version]));
Result := False;
Exit;
end;
end;
end;
Log('WebView2 Runtime not found or version string is empty. Proceeding with installation.');
Result := True;
end;
function WindowsAppRuntimeNeedsInstall: Boolean;
begin
Result := True;
end;
function InitializeSetup(): Boolean;
begin
Log('Setup initialization started. AppName: {#MyAppName}, AppVersion: {#MyAppVersion}');
Result := True;
end;
procedure DeinitializeSetup();
begin
Log('Setup finished.');
end;
function InitializeUninstall(): Boolean;
begin
Log('Uninstallation initialization started.');
Result := True;
end;
procedure DeinitializeUninstall();
begin
Log('Uninstallation finished.');
end;
Подробнее здесь: https://stackoverflow.com/questions/796 ... ybrid-apps