mirror of
https://github.com/the-sane/lug-helper.git
synced 2025-09-08 08:27:57 +00:00
Put .desktop file in prefix by default. Make sure applications dir exists.
This commit is contained in:
@@ -2436,12 +2436,12 @@ install_game_wine() {
|
|||||||
cp "$rsi_icon" "$data_dir/icons/hicolor/256x256/apps"
|
cp "$rsi_icon" "$data_dir/icons/hicolor/256x256/apps"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# $HOME/Desktop/RSI Launcher.desktop
|
|
||||||
home_desktop_file="${XDG_DESKTOP_DIR:-$HOME/Desktop}/RSI Launcher.desktop"
|
|
||||||
# $HOME/.local/share/applications/RSI Launcher.desktop
|
|
||||||
localshare_desktop_file="$data_dir/applications/RSI Launcher.desktop"
|
|
||||||
# $HOME/Games/star-citizen/RSI Launcher.desktop
|
# $HOME/Games/star-citizen/RSI Launcher.desktop
|
||||||
prefix_desktop_file="$install_dir/RSI Launcher.desktop"
|
prefix_desktop_file="$install_dir/RSI Launcher.desktop"
|
||||||
|
# $HOME/.local/share/applications/RSI Launcher.desktop
|
||||||
|
localshare_desktop_file="$data_dir/applications/RSI Launcher.desktop"
|
||||||
|
# $HOME/Desktop/RSI Launcher.desktop
|
||||||
|
home_desktop_file="${XDG_DESKTOP_DIR:-$HOME/Desktop}/RSI Launcher.desktop"
|
||||||
|
|
||||||
echo "[Desktop Entry]
|
echo "[Desktop Entry]
|
||||||
Name=RSI Launcher
|
Name=RSI Launcher
|
||||||
@@ -2452,12 +2452,15 @@ StartupNotify=true
|
|||||||
StartupWMClass=rsi launcher.exe
|
StartupWMClass=rsi launcher.exe
|
||||||
Icon=rsi-launcher.png
|
Icon=rsi-launcher.png
|
||||||
Exec=\"$installed_launch_script\"
|
Exec=\"$installed_launch_script\"
|
||||||
Path=$(echo $install_dir | sed 's/ /\\\s/g')/dosdevices/c:/Program\sFiles/Roberts\sSpace\sIndustries/RSI\sLauncher" > "$localshare_desktop_file"
|
Path=$(echo $install_dir | sed 's/ /\\\s/g')/dosdevices/c:/Program\sFiles/Roberts\sSpace\sIndustries/RSI\sLauncher" > "$prefix_desktop_file"
|
||||||
|
|
||||||
|
# Copy the new desktop file to ~/.local/share/applications
|
||||||
|
mkdir -p "$data_dir/applications"
|
||||||
|
cp "$prefix_desktop_file" "$localshare_desktop_file"
|
||||||
# Copy the new desktop file to the user's desktop directory
|
# Copy the new desktop file to the user's desktop directory
|
||||||
cp "$localshare_desktop_file" "$home_desktop_file"
|
if [ -d "$(dirname "$home_desktop_file")" ]; then
|
||||||
# Copy the new desktop file to the user's prefix directory as a backup alongside the launch script
|
cp "$prefix_desktop_file" "$home_desktop_file"
|
||||||
cp "$localshare_desktop_file" "$prefix_desktop_file"
|
fi
|
||||||
|
|
||||||
# Update the .desktop file database if the command is available
|
# Update the .desktop file database if the command is available
|
||||||
if [ -x "$(command -v update-desktop-database)" ]; then
|
if [ -x "$(command -v update-desktop-database)" ]; then
|
||||||
|
Reference in New Issue
Block a user