add support for directly launching windows exes from file exporer using .desktop shortcut

This commit is contained in:
olcxja 2026-09-30 17:32:30 +02:00
commit 5e217472aa
15 changed files with 440 additions and 28 deletions

View file

@ -24,16 +24,20 @@ if [ -f "$ICON_SRC" ]; then
fi
echo "2. Creating shortcut..."
# MimeType + Exec %f: "Open with ..." in Dolphin/Nautilus lists PLWL for
# Windows executables and hands the file path over as an argument (the
# launcher then shows the wine/prefix picker).
mkdir -p "$APP_DIR"
cat > "$APP_DIR/olcxja.plwl.desktop" << EOF
[Desktop Entry]
Type=Application
Name=PLWL
Comment=Portable Linux Wine Launcher
Exec="$EXE"
Exec="$EXE" %f
Icon=olcxja.plwl
Terminal=false
Categories=Game;
MimeType=application/x-ms-dos-executable;application/x-msi;application/x-msdownload;
EOF
chmod +x "$APP_DIR/olcxja.plwl.desktop"
command -v update-desktop-database >/dev/null 2>&1 && update-desktop-database "$APP_DIR" 2>/dev/null || true

View file

@ -40,15 +40,19 @@ if [ -f "$ICON_SRC" ]; then
fi
echo "3. Creating shortcut..."
# MimeType + Exec %f: "Open with ..." in Dolphin/Nautilus lists PLWL for
# Windows executables and hands the file path over as an argument (the
# launcher then shows the wine/prefix picker).
cat > "$APP_DIR/olcxja.plwl.desktop" << EOF
[Desktop Entry]
Type=Application
Name=PLWL
Comment=Portable Linux Wine Launcher
Exec="$EXE"
Exec="$EXE" %f
Icon=olcxja.plwl
Terminal=false
Categories=Game;
MimeType=application/x-ms-dos-executable;application/x-msi;application/x-msdownload;
EOF
chmod +x "$APP_DIR/olcxja.plwl.desktop"