2014-02-05, 08:44
(2014-02-04, 17:16)Jamyz Wrote: Hi!! I try to launch this script under MAC OS X (Maverick).
But he doesn't work....
in Linux - Steam Location I Have
/APPLICATIONS/STEAM.APP/CONTENTS/MACOS/STEAM.SH
and doesn't run.
Any tips.
I try with Advanced Launcher and it´s OK. But i want you´re script.
Thanks,,,,
I thought that would be the case, early versions would run on osx but I didnt think new ones would. Can you open steam-launch.sh (located in xbmc/userdata/addon_data/script.steam.launcher/scripts/ in the xbmc userdata directory)in a text editor and delete its contents and paste in the following:
Code:
#!/bin/bash
# App Launch script - Quit XBMC to launch another program
# Thanks to rodalpho @ # http://xbmc.org/forum/showthread.php?t=34635
# By Redsandro 2008-07-07
# By ryosaeba87 2010-08-24 (Added support for MacOSX)
#
case "$(uname -s)" in
Darwin)
XBMC_PID=$(ps -A | grep XBMC.app | grep -v Helper | grep -v grep | awk '{print $1}')
XBMC_BIN=$(ps -A | grep XBMC.app | grep -v Helper | grep -v grep | awk '{print $5}')
STEAM_PID=$(ps -A | grep STEAM.app | grep -v Helper | grep -v grep | awk '{print $1}')
STEAM_BIN=$(ps -A | grep STEAM.app | grep -v Helper | grep -v grep | awk '{print $5}')
;;
Linux)
XBMC_PID=$(pidof xbmc.bin)
XBMC_BIN="xbmc"
STEAM_BIN="steam"
STEAM_PID=$(pidof steam)
;;
*)
echo "I don't support this OS!"
exit 1
;;
esac
#Kill XBMC
kill -9 $XBMC_PID #There are better ways of doing this but this is the most consistent
echo "Shutdown XBMC"
# Is Steam running?
if [ $STEAM_PID ]
then
$STEAM_BIN steam://open/bigpicture #steam is brought to focus better this way
echo "Steam already running"
else
$STEAM_BIN -bigpicture #steam opens better like this if not already open
echo "Steam not running, launching"
fi
# Wait for Steam to exit
while [ $(ps -A | grep STEAM.app | grep -v Helper | grep -v grep | awk '{print $1}') ]; do #STEAM_PID variable doesnt work here, needs work
echo "Steam running"
sleep 1
done
#Restart XBMC
$XBMC_BIN &
Make the script executable via the addon's settings before running. This version will only restart xbmc when you completely quit steam. I dont have a mac so I cant test or improve the mac version myself, if you can get me a script that mimics the windows/linux versions I could try integrating it into the addon.
(2014-02-04, 20:32)dkplayaclub Wrote: OK. Now I'm just being a pest. The more I play with this addon, the more questions I have. I was wondering if you could make it optional to shut down XBMC when launching Steam. This would come in very handy if someone sends me a message while I am watching a movie, or if I want to use the Web Browser while listening to music.
Yeah good point. Here is a test ahk script which minimizes/maximizes xbmc instead of killing/restarting it. Copy it over the exisiting file in "%AppData%\XBMC\userdata\addon_data\script.steam.launcher\scripts\". You also need to comment out/delete line 114 in default.py. Its working well here, let me know how it goes.
https://dl.dropboxusercontent.com/u/2241...er-AHK.exe