diff --git a/play.it-2/src/30_launchers_native.sh b/play.it-2/src/30_launchers_native.sh index 30e4516b82b313ecb7b2c7e392ee32a21da380fe..d0bbefd2c8bb9540f0da14c62f81e359ad524684 100644 --- a/play.it-2/src/30_launchers_native.sh +++ b/play.it-2/src/30_launchers_native.sh @@ -131,9 +131,23 @@ launcher_write_script_native_run_common() { LD_LIBRARY_PATH="${library_path}$LD_LIBRARY_PATH" export LD_LIBRARY_PATH fi - "./$APP_EXE" $APP_OPTIONS $@ - EOF + if [ "$(get_value "${application}_PULSEAUDIO")" = 'true' ]; then + cat >> "$file" <<- 'EOF' + if command -v pulseaudio; then + pulse='pulseaudio --start &&' + else + pulse='apulse' + fi + $pulse "./$APP_EXE" $APP_OPTIONS $@ + + EOF + else + cat >> "$file" <<- 'EOF' + "./$APP_EXE" $APP_OPTIONS $@ + + EOF + fi launcher_write_script_postrun "$application" "$file"