mirror of
https://github.com/storytold/figcraft.git
synced 2026-10-24 10:27:00 -06:00
#346: FreeBSD's desktop entry matches the window class there (the binary's name)
This commit is contained in:
@@ -177,6 +177,8 @@ fn main() -> eframe::Result {
|
||||
control_server::start(p, queue.clone(), ctx_slot.clone());
|
||||
}
|
||||
let icon = services::window_icon();
|
||||
// The app id is the Wayland app_id and the X11 window class on Linux: the desktop entry's name
|
||||
// and StartupWMClass (FreeBSD's package matches the binary's name instead).
|
||||
let mut viewport = egui::ViewportBuilder::default()
|
||||
.with_title("FigCraft")
|
||||
.with_app_id("ai.storyteller.figcraft")
|
||||
|
||||
@@ -76,8 +76,11 @@ for b in "${BINS[@]}"; do
|
||||
install -m 755 "$BIN/$b" "$STAGE/bin/"
|
||||
strip "$STAGE/bin/$b" 2>/dev/null || true
|
||||
done
|
||||
# The desktop entry, MIME type, metainfo and icons are the freedesktop files Linux ships.
|
||||
install -m 644 "$LINUX/$APP_ID.desktop" "$STAGE/share/applications/$APP_ID.desktop"
|
||||
# The desktop entry, MIME type, metainfo and icons are the freedesktop files Linux ships. The
|
||||
# window's X11 class is the binary's name here (egui-winit names the window after the app id on
|
||||
# Linux only), so the entry matches that.
|
||||
sed -e "s/^StartupWMClass=.*/StartupWMClass=figcraft/" "$LINUX/$APP_ID.desktop" >"$STAGE/share/applications/$APP_ID.desktop"
|
||||
chmod 644 "$STAGE/share/applications/$APP_ID.desktop"
|
||||
install -m 644 "$LINUX/$APP_ID.mime.xml" "$STAGE/share/mime/packages/$APP_ID.xml"
|
||||
sed -e "s/@VERSION@/$VERSION/g" -e "s/@DATE@/$FIGCRAFT_BUILD_DATE/g" \
|
||||
"$LINUX/$APP_ID.metainfo.xml.in" >"$STAGE/share/metainfo/$APP_ID.metainfo.xml"
|
||||
|
||||
Reference in New Issue
Block a user