diff --git a/snap/scripts/sommelier b/snap/scripts/sommelier index d5fe856..2d1ec5b 100755 --- a/snap/scripts/sommelier +++ b/snap/scripts/sommelier @@ -13,7 +13,7 @@ function install_app() { # Downloads a file with progress using wget and yad wget "${INSTALL_URL}" -O "${TMPDIR}/${INSTALL_EXE}" 2>&1 | \ perl -p -e '$| = 1; s/^.* +([0-9]+%) +([0-9,.]+[GMKB]) +([0-9hms,.]+).*$/\1\n# Downloading... \2 (\3)/' | \ - yad --progress --title="${INSTALL_EXE}" --width=400 --center --no-buttons --auto-close --auto-kill --on-top + yad --progress --title="${INSTALL_EXE}" --width=400 --center --no-buttons --auto-close --auto-kill --on-top --no-escape # Installs the wine application env WINEARCH="${WINEARCH}" WINEPREFIX="${WINEPREFIX}" "${WINELOADER}" "${TMPDIR}/${INSTALL_EXE}" /silent # Removes the cached installer @@ -202,7 +202,7 @@ fi # Initialise wine if [ ! -f "${WINEPREFIX}/drive_c/windows/win.ini" ]; then # Splash - yad --window-icon="${SNAP}/meta/gui/tmnationsforever.png" --timeout=15 --timeout-indicator=bottom --text="${NOTICE}" --no-escape --width=460 --center --no-buttons --splash & + yad --timeout=15 --timeout-indicator=bottom --text="${NOTICE}" --no-escape --width=460 --center --no-buttons --splash & # Create the WINE environment env WINEARCH="${WINEARCH}" WINEPREFIX="${WINEPREFIX}" "${WINELOADER}" wineboot --init 2>&1 | \ yad --progress --title="Preparing Windows environment" --width=400 --center --no-buttons --auto-close --auto-kill --on-top --pulsate @@ -211,6 +211,9 @@ if [ ! -f "${WINEPREFIX}/drive_c/windows/win.ini" ]; then mkdir -p "${XDG_CACHE_HOME}/winetricks" echo 0 > "${XDG_CACHE_HOME}/winetricks/track_usage" fi +else + # Notification + notify-send --icon "${SNAP}/meta/gui/tmnationsforever.png" --expire-time=15000 "Track Mania Nations Forever" "${NOTICE}" fi # Launch wineboot/winecfg/winetricks if requested. @@ -221,4 +224,4 @@ elif [ -e "${WINE_EXE}" ]; then launch_app else install_app -fi \ No newline at end of file +fi diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 127c9fe..79df737 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -233,6 +233,7 @@ parts: - libgdk-pixbuf2.0-0:i386 # yad - libgtk-3-0:i386 # yad - libnotify4:i386 # yad + - libnotify-bin:i386 # sommelier - perl-base:i386 # winetricks - shared-mime-info:i386 - unzip:i386 # winetricks