2016-05-10 19:05:33 +02:00
|
|
|
--- lib/scripts.lib.orig 2016-01-03 22:16:17 UTC
|
2016-02-18 14:24:14 +01:00
|
|
|
+++ lib/scripts.lib
|
2016-05-10 19:05:33 +02:00
|
|
|
@@ -382,10 +382,14 @@ POL_Shortcut()
|
2016-02-18 14:24:14 +01:00
|
|
|
# Menus
|
|
|
|
if [ ! "$(POL_Config_Read NO_MENU_ICON)" = "TRUE" ]; then
|
|
|
|
# Do nothing on Mac OS
|
|
|
|
- if [ -n "$Categories" -a "$POL_OS" = "Linux" ] || [ -n "$Categories" -a "$POL_OS" = "BSD" ]; then
|
2016-05-16 09:51:55 +02:00
|
|
|
+ if [ -n "$Categories" -a "$POL_OS" = "Linux" ]; then
|
2016-02-18 14:24:14 +01:00
|
|
|
LOCALAPPS="$HOME/.local/share/applications"
|
|
|
|
make_desktop_shortcut "$iconPath" "$ICON_FILENAME" "$LOCALAPPS" "$PLAYONLINUX/playonlinux --run \"$ICON_FILENAME\"" "$binary_name" "$Categories" "playonlinux-"
|
|
|
|
fi
|
2016-05-10 19:05:33 +02:00
|
|
|
+ if [ -n "$Categories" -a "$POL_OS" = "FreeBSD" ]; then
|
|
|
|
+ LOCALAPPS="$HOME/.local/share/applications"
|
2016-05-16 09:51:55 +02:00
|
|
|
+ make_desktop_shortcut "$iconPath" "$ICON_FILENAME" "$LOCALAPPS" "$PLAYONLINUX/playonfreebsd --run \"$ICON_FILENAME\"" "$binary_name" "$Categories" "playonlinux-"
|
2016-05-10 19:05:33 +02:00
|
|
|
+ fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Desktop
|
|
|
|
@@ -1002,9 +1006,8 @@ POL_Shortcut_AddProfileLink()
|
2016-02-18 14:24:14 +01:00
|
|
|
}
|
|
|
|
POL_LoadVar_Distro ()
|
|
|
|
{
|
|
|
|
- if [ "$POL_OS" = "Linux" ] || [ "$POL_OS" == "FreeBSD" ]; then
|
|
|
|
- export DISTRO="$(lsb_release -d | cut -d':' -f2 | tr -d \\t)"
|
|
|
|
- else
|
|
|
|
+ case "$POL_OS" in
|
|
|
|
+ Mac)
|
|
|
|
main_kernel="$(uname -r | cut -d '.' -f 1)"
|
|
|
|
second_kernel="$(uname -r | cut -d '.' -f 2)"
|
|
|
|
|
2016-05-10 19:05:33 +02:00
|
|
|
@@ -1015,7 +1018,14 @@ POL_LoadVar_Distro ()
|
2016-02-18 14:24:14 +01:00
|
|
|
[ "$main_kernel" = "12" ] && MacOS="Mountain Lion"
|
|
|
|
|
|
|
|
export DISTRO="$MacOS 10.$(( main_kernel - 4)).$second_kernel ($(uname -r))"
|
|
|
|
- fi
|
|
|
|
+ ;;
|
|
|
|
+ Linux)
|
|
|
|
+ export DISTRO="$(lsb_release -d | cut -d':' -f2 | tr -d \\t)"
|
|
|
|
+ ;;
|
|
|
|
+ FreeBSD)
|
|
|
|
+ export DISTRO="$(uname -sr) ($(uname -p))"
|
|
|
|
+ ;;
|
|
|
|
+ esac
|
|
|
|
}
|
|
|
|
POL_Shortcut_MakeDesktopShortcut()
|
|
|
|
{
|
2016-05-16 09:51:55 +02:00
|
|
|
@@ -1039,7 +1049,7 @@ POL_Shortcut_MakeDesktopShortcut()
|
|
|
|
# http://stackoverflow.com/questions/8939580/bash-split-a-string-exactly-like-readline-would-split-it
|
|
|
|
eval set -- $(grep '^POL_Wine ' "$POL_USER_ROOT/shortcuts/$PACKAGE"|tail -n 1)
|
|
|
|
local binary="$2"
|
|
|
|
- make_desktop_shortcut "$iconPath" "$PACKAGE" "$DESKTOP" "$PLAYONLINUX/playonlinux --run \"$PACKAGE\"" "$binary" ""
|
|
|
|
+ make_desktop_shortcut "$iconPath" "$PACKAGE" "$DESKTOP" "$PLAYONLINUX/playonfreebsd --run \"$PACKAGE\"" "$binary" ""
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|