Solved Steam + XBMC using Advanced launcher
#1
I'm using a popular script for advanced launcher to allow me to start up steam in big picture mode through XBMC, which also allows me to close it and brings focus back to XBMC, this works, however its not how id like it to work ideally.

What id like to accomplish is this:


skipping to about 0:20 in that video, you can see that once you click steam, steam big picture just starts up, as where normally i click steam, then I'm brought to a new screen where i have to click steam again to launch it, does anyone know how I can tied and advanced launcher item directly to the main menu like that?

thanks in advance!

Michael
Reply
#2
I've managed to do this to launch Hyperspin, and as fate would have it, I have just deleted all trace of my changes after a fresh install >.<

What I can tell you, is that (in this skin at least) you need to bypass Advanced Launcher all together, and edit the menu xml Confluence's home.xml.

Here's an old thread I quickly found, which gives you an idea of the kind of edit you need to make:

http://forum.xbmc.org/showthread.php?tid=77604

But the above applies to adding an item within the Programs menu, which you can achieve just fine with Advanced Launcher. From memory, the syntax was slightly different to launch an exe direct from the home menu. I know all this is pretty vague, but hopefully it gets you looking in the right direction.

As I type this I realise I may have my changes saved somewhere courtesy of xbmc-backup... I will check.


[edit] Thank god for internet history. Here are the threads I got my answer from:

http://forum.xbmc.org/showthread.php?tid=68858
http://forum.xbmc.org/showthread.php?tid=138509 (iirc, the slightly different syntax in the last post got it working in the end)

For reference, the golden search term was 'xbmc system exec'.
Reply
#3
Sorry for double post. I've tested this out, and here is how to do it.

I'm using Confluence Mod 2, so I'm editing C:\Users\media\AppData\Roaming\XBMC\addons\skin.moddedconfluence2\720p\home.xml

This is what I have added:

Code:
<item id="445">
<label>Steam</label>
<onclick>System.Exec(""D:\Steam\Steam.exe"")</onclick>
<icon>special://skin/backgrounds/settings.jpg</icon>
</item>

The item id is plucked out of the air. Your Steam path will be different of course. Note it uses the icon for Settings, because I've copy-pasted the Settings entry to make this. I don't see the icon, so I didn't bother changing it. Here is my complete home.xml for reference - you will see the Steam entry at line 1176. It's the second last <item> in this section, so on screen it appears to the left of Settings. Make sure you put the above code into your own home.xml manually of course - if you use my complete xml you will probably break your home screen.

On the Steam side of things, simply go into Settings -> Interface and tick "Launch in Big Picture mode".
Reply
#4
THANK YOU SO MUCH! I havent tried it yet, but at the very least youve given me a direction to go, Im acutally using a script of sorts (a hotkey script converted to exe) to start steam in big picture mode and to return focus back to XBMC after being closed, Im pretty sure i can jsut use that exe instead of the steam one in your path Tongue

Im assuming i can find the aeon flux version of this xml file right? (i havent messed around much with the xml files so sorry if thats a noob question Tongue)

ok, heres my home.xml (for Aeon nox theme)

http://pastebin.com/VDZLAhEC

any chance you could help me find a palce to add this line that wont interfere with anything? I cant really tell where one block ends and a new begins
Reply
#5
Looks like the procedure will be a little different for that theme (you may even be able to add it via home menu customisation options). I'm off to work now, but I'll take a look later today.
Reply
#6
I've messed a lot with home customization options a lot, I couldn't find a way, I'll stop messing with stuff before I break things until then XD thanks a lot for the help!
Reply
#7
I've done it! thanks a lot for the help!

for anyone else trying to accomplish this here's a way (this will only work with the Aeon Nox theme)

navigate to settings->appearance->skin->settings

from there select "customizers" and select "Main /menu item customizer (backgrounds, widgets)

grab one of the unused custom slots (which one don't matter as long as its not in use)

from here you select "choose type" and select "custom" from the list it brings up. Next it will bring up an OSD keyboard and ask for a label, in this section type the following:

XBMC.System.Exec(x:\yoursteam/scriptdirectory)

for example I'm using a script that launches steam in big picture automatically, and mine looks like this:

XBMC.System.Exec(C:\Users\Michael\Desktop\XBMCSTEAM\XBMCSTEAM.exe)

after you've done that, name it by selecting "change label" and tying whatever you want it to be displayed as, make sure the "disabled" tick is off and your good to go!

note: this should work with any kind of exe you want, so this isn't just for steam Tongue

Hope I help someone with this info

thanks Gruso, i found the solution because you pointed me in the direction, telling me the golden search temer helped a lot.. I jsut had to modify it some to get what I needed Tongue
Reply
#8
Good stuff man Smile

For the record you could skip using "xmcbsteam.exe" all together if you wanted. Valve have refined Big Picture functionality these days, so now you can launch straight into BP mode and exit back to XBMC seamlessly without third party tools. No need to change things if you're happy though.
Reply
#9
(2013-04-29, 10:09)Gruso Wrote: Good stuff man Smile

For the record you could skip using "xmcbsteam.exe" all together if you wanted. Valve have refined Big Picture functionality these days, so now you can launch straight into BP mode and exit back to XBMC seamlessly without third party tools. No need to change things if you're happy though.

oh have they? did they even make it so it returns focus back to xbmc specifically after its closed? (ive knowna bout their improvements to laucnching steam in big picture and such Tongue)
Reply
#10
Yep. Wen you hit the exit button in Big Picture, it pops up menu options to drop back to normal Steam, or exit Steam completely. Choose the second one, it kills Steam and you're back in XBMC.
Reply
#11
Hi I get a error when trying to run steam with xbmc.exec I think it's because my path has spaces in it eg. C:\user\my documents\ any suggestion oh what I can do?
Reply
#12
Adding quotes is generally the solution to that.
Code:
"C:\user\my documents\..."

Note that double quotes may be required depending on theme / where the shortcut is going. If you're using Confluence and adding the link to the main menu, the full line of code will need to look like this:

Code:
<onclick>System.Exec(""D:\Steam\Steam.exe"")</onclick>

(Double quotes are required even when there are no spaces)
Reply
#13
Thanks gruso all I needed was double quotes
Reply
#14
I did it using a simple compiled autohotkey script.

Download autohotkey from http://www.autohotkey.com/

Create new text file somewhere, preferably in steam folder and name it something like launchbig.ahk. Be sure to use the ahk filetype.

Then edit the script and paste in this code:

Code:
Process, Exist, Steam.exe
if ErrorLevel
Run, "steam://open/bigpicture"
else
Run, "C:\Program Files (x86)\Steam\Steam.exe" -bigpicture
WinWait, Steam ahk_class CUIEngineWin32
WinWaitClose, Steam ahk_class CUIEngineWin32
SetTitleMatchMode, 2 ; approximate match
WinActivate, XBMC


Change the folder names if you have steam installed in elsewhere. Then just compile it to exe by rightclicking and selecting compile script. You should be then able to add it to the advanced launcher.
Reply
#15
I'm doing this with PowerShell (note that you might have to enable either running scripts before (run "Set-Executionpolicy Unrestricted" inside a powershell, you may need to be in an elevated powershell though) or sign the script):
Code:
#Launcher-Script for Steam
echo "Looking for running steam"
$ErrorActionPreference = "silentlycontinue"
Get-Process -Name Steam > $NULL
if ($? -eq $TRUE)
{
    echo "Steam Running - Launching BigPicture"
    Start-Process -FilePath "F:\Steam\Steam.exe" -ArgumentList "steam://open/bigpicture" -Wait
    
    Sleep 10
    $BREAKLOOP=$FALSE
    while (!$BREAKLOOP)
    {
        Get-Process -Name Steam > null
        
        if ($? -eq $TRUE)
        {
            sleep 2
        }
        else
        {
            $BREAKLOOP=$TRUE
        }
    }
}
else
{
    echo "Launching Steam"
    Start-Process -FilePath "F:\Steam\Steam.exe" -ArgumentList "-bigpicture" -Wait
}
echo Done


I'm doing this with a few games, by the way. This enables me to wait for the game to be started and wait until I finished playing. The Powershell-Script then only returns when the game is closed (this is helpful, because XBMC wants to bring itself to the front again when the launched application quits).
For example Borderlands 2:
Code:
#Launcher-Script for Borderlands 2
echo "Launching Borderlands 2"
Start-Process -FilePath "F:\Steam\steamapps\common\Borderlands 2\Binaries\Win32\Borderlands2.exe" -Wait
$ISOPEN = 1
$ErrorActionPreference = "silentlycontinue"

sleep 30

while ($ISOPEN -eq 1)
{
    Get-Process borderlands2 >> $NULL

    if ($? -eq $TRUE)
    {
        $ISOPEN = 1
    }
    else
    {
        $ISOPEN = 0
        sleep 2
    }
}

sleep 30
echo Done


I also wrote a little program that automatically creates launcherscripts in the location Advanced Launcher is looking at, I use ps1 as the extension for that launcher and it works like a treat (I launch all games via Powershell, but usually it is as simple as Start-Process C:\File\To\Launch.exe -Wait)
Need help? Check out my XBMC Frodo Guide. It contains full featured guides to Sickbeard and CouchPotato as well.

Image
Reply

Logout Mark Read Team Forum Stats Members Help
Steam + XBMC using Advanced launcher1