I'm make an installation wizard for my maui app with inno setup and am very close to complete it except for this problem after the app is installed and lunched the window is empty 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
├── myapp.iss
├── Dependencies/
│ ├── WindowsAppRuntimeInstall-x64.exe
│ └── MicrosoftEdgeWebView2RuntimeInstallerX64.exe
│ └── VC_redist.x64.exe
└── publish/ win-x64 folder is where is my release build exist and it is a self-contant build
<PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
</PropertyGroup>
publish is where is the published version of my app exist using this code dotnet publish -c Release -f net8.0-windows10.0.19041.0 --sc -p:RuntimeIdentifier=win-x64 -p:WindowsPackageType=None and yes this project is not build as an msix package it is an unpackage app myapp.iss file is where my inno code exists
#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;
so how to fix this problem