Skip to content

Commit aa6a80e

Browse files
committed
fix: resolve Photino window icon against app base directory
The icon path was relative and resolved against the working directory (e.g. the directory the AppImage was launched from) rather than the install directory, crashing on startup. Resolve it against AppDomain.BaseDirectory, consistent with the wwwroot file provider.
1 parent 85bfd87 commit aa6a80e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Desktop/Platforms/Photino/PhotinoEntryPoint.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,12 @@ private static void Start(CliOptions config)
8484

8585
var app = builder.Build();
8686

87+
// Resolve the icon against the app's base directory; the working directory is
88+
// wherever the AppImage was launched from (e.g. ~/Downloads), not the install dir.
89+
var iconFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot", "images", "Icon512.png");
90+
8791
app.MainWindow
88-
.SetIconFile("wwwroot/images/Icon512.png")
92+
.SetIconFile(iconFile)
8993
.SetTitle("OpenShock Desktop");
9094

9195
app.MainWindow.MinHeight = 600;

0 commit comments

Comments
 (0)