Launching XBE files with real path.

Discussion of plugin / script development for XBMC4Xbox
Post Reply
User avatar
Rocky5
Posts: 974
Joined: Sat Feb 08, 2014 5:27 am
Has thanked: 101 times
Been thanked: 254 times

Launching XBE files with real path.

Post by Rocky5 »

OK, I have made a script for use with XMugen, so we can have a fancy UI.

Now the issue is XBMC wont launch an XBE with the real path set.
example = "C:/dashboard/Game Packs/Pack1/default.xbe"

but it will launch with "Special://XBMC/Game Packs/Pack1/default.xbe"

Now the above is of no use to me, as the Game Packs folder will not be in the XBMC directory, so I have to use the real file paths.

It seems like a bug or I'm doing something wrong. (but dough that, since its simply)
xbmc.executebuiltin( "RunXBE('C:/dashboard/Game Packs/Pack1/default.xbe')" )

Any help or info would be great thanks.

Not working.

Code: Select all

15:41:09 M: 25501696  NOTICE: //////////////////////////////
15:41:09 M: 25501696  NOTICE: //////////////////////////////
15:41:09 M: 25501696  NOTICE: .
15:41:09 M: 25501696  NOTICE: XMugen Launcher Script.
15:41:09 M: 25501696  NOTICE: Version 0.6
15:41:09 M: 25501696  NOTICE: .
15:41:09 M: 25501696  NOTICE: //////////////////////////////
15:41:09 M: 25501696  NOTICE: .
15:41:09 M: 25501696  NOTICE: Checking for Z:/tmp file.
15:41:09 M: 25501696  NOTICE: Doesn't Exist.
15:41:09 M: 25501696  NOTICE: .
15:41:09 M: 25501696  NOTICE: //////////////////////////////
15:41:09 M: 25481216  NOTICE: .
15:41:09 M: 25481216  NOTICE: Real Path.
15:41:09 M: 25481216  NOTICE: C:/
15:41:09 M: 25481216  NOTICE: .
15:41:09 M: 25501696  NOTICE: //////////////////////////////
15:41:09 M: 25501696  NOTICE: .
15:41:09 M: 25501696  NOTICE: File locations.
15:41:09 M: 25501696  NOTICE: C:/dashboard/Game Packs/Pack1/launch
15:41:09 M: 25501696  NOTICE: C:/linux/launch/
15:41:09 M: 25501696  NOTICE: .
15:41:09 M: 25501696  NOTICE: //////////////////////////////
15:41:09 M: 25501696  NOTICE: .
15:41:09 M: 25501696  NOTICE: Game Pack Name.
15:41:09 M: 25501696  NOTICE: Mortal Kombat
15:41:09 M: 25501696  NOTICE: .
15:41:09 M: 25501696  NOTICE: //////////////////////////////
15:41:09 M: 25501696  NOTICE: .
15:41:09 M: 25501696  NOTICE: Moving Launch File to
15:41:09 M: 25501696  NOTICE: C:/linux/launch/
15:41:09 M: 25501696  NOTICE: .
15:41:09 M: 25485312  NOTICE: //////////////////////////////
15:41:09 M: 25485312  NOTICE: .
15:41:09 M: 25485312  NOTICE: Launching the Gentoox loader xbe
15:41:09 M: 25485312  NOTICE: C:/dashboard/Game Packs/Pack1/default.xbe
15:41:09 M: 25485312  NOTICE: .
15:41:09 M: 25505792    INFO: Scriptresult: Success
15:41:09 M: 25526272    INFO: Python script stopped
15:41:09 M: 26050560   DEBUG: python thread 1 destructed
15:41:09 M: 26050560    INFO: Python, unloading python27.dll because no scripts are running anymore
15:41:09 M: 26476544   DEBUG: Q:\system\python\python27.dll (base 1E000000): Detected memory leaks: 254 leaks
15:41:09 M: 28504064   DEBUG: leak caller address 1E078BE4, size   222720, counter 123
15:41:09 M: 28504064   DEBUG: leak caller address 1E0866F2, size    35568, counter 36
15:41:09 M: 28504064   DEBUG: leak caller address 1E087F3E, size     1224, counter 35
15:41:09 M: 28504064   DEBUG: leak caller address 1E088022, size       20, counter 2
15:41:09 M: 28504064   DEBUG: leak caller address 1E093C8C, size      448, counter 1
15:41:09 M: 28504064   DEBUG: leak caller address 1E093D62, size  1835008, counter 7
15:41:09 M: 28504064   DEBUG: leak caller address 1E09408F, size    31198, counter 36
15:41:09 M: 28504064   DEBUG: leak caller address 1E09F6BC, size     1600, counter 8
15:41:09 M: 28504064   DEBUG: leak caller address 1E0BC0E2, size      233, counter 1
15:41:09 M: 28504064   DEBUG: leak caller address 1E0F16E6, size       60, counter 5
15:41:09 M: 28504064   DEBUG: python27.dll: Total bytes leaked: 2128079
15:41:09 M: 30965760   DEBUG: CUtil::RunFFPatchedXBE - Auto Filter Flicker is off. Skipping Filter Flicker Patching.
15:41:09 M: 30965760   ERROR: Unable to run xbe : C:/dashboard/Game Packs/Pack1/default.xbe
Working.

Code: Select all

15:42:03 M: 25509888  NOTICE: //////////////////////////////
15:42:03 M: 25509888  NOTICE: //////////////////////////////
15:42:03 M: 25509888  NOTICE: .
15:42:03 M: 25509888  NOTICE: XMugen Launcher Script.
15:42:03 M: 25509888  NOTICE: Version 0.6
15:42:03 M: 25509888  NOTICE: .
15:42:03 M: 25509888  NOTICE: //////////////////////////////
15:42:03 M: 25489408  NOTICE: .
15:42:03 M: 25489408  NOTICE: Real Path.
15:42:03 M: 25489408  NOTICE: C:/
15:42:03 M: 25489408  NOTICE: .
15:42:03 M: 25489408  NOTICE: //////////////////////////////
15:42:03 M: 25489408  NOTICE: .
15:42:03 M: 25489408  NOTICE: File locations.
15:42:03 M: 25489408  NOTICE: C:/dashboard/Game Packs/Pack1/launch
15:42:03 M: 25489408  NOTICE: C:/linux/launch/
15:42:03 M: 25489408  NOTICE: .
15:42:03 M: 25489408  NOTICE: //////////////////////////////
15:42:03 M: 25489408  NOTICE: .
15:42:03 M: 25489408  NOTICE: Game Pack Name.
15:42:03 M: 25489408  NOTICE: Mortal Kombat
15:42:03 M: 25489408  NOTICE: .
15:42:03 M: 25489408  NOTICE: //////////////////////////////
15:42:03 M: 25489408  NOTICE: .
15:42:03 M: 25489408  NOTICE: Moving Launch File to
15:42:03 M: 25489408  NOTICE: C:/linux/launch/
15:42:03 M: 25489408  NOTICE: .
15:42:03 M: 25489408  NOTICE: //////////////////////////////
15:42:03 M: 25489408  NOTICE: .
15:42:03 M: 25489408  NOTICE: Launching the Gentoox loader xbe
15:42:03 M: 25489408  NOTICE: Special://XBMC/Game Packs/Pack1/default.xbe
15:42:03 M: 25489408  NOTICE: .
15:42:03 M: 25505792    INFO: Scriptresult: Success
15:42:03 M: 25526272    INFO: Python script stopped
15:42:03 M: 26050560   DEBUG: python thread 2 destructed
15:42:03 M: 26050560    INFO: Python, unloading python27.dll because no scripts are running anymore
15:42:03 M: 26464256   DEBUG: Q:\system\python\python27.dll (base 1E000000): Detected memory leaks: 255 leaks
15:42:03 M: 28499968   DEBUG: leak caller address 1E078BE4, size   222720, counter 123
15:42:03 M: 28499968   DEBUG: leak caller address 1E0866F2, size    36556, counter 37
15:42:03 M: 28499968   DEBUG: leak caller address 1E087F3E, size     1224, counter 35
15:42:03 M: 28499968   DEBUG: leak caller address 1E088022, size       20, counter 2
15:42:03 M: 28499968   DEBUG: leak caller address 1E093C8C, size      448, counter 1
15:42:03 M: 28499968   DEBUG: leak caller address 1E093D62, size  1835008, counter 7
15:42:03 M: 28499968   DEBUG: leak caller address 1E09408F, size    31198, counter 36
15:42:03 M: 28499968   DEBUG: leak caller address 1E09F6BC, size     1600, counter 8
15:42:03 M: 28499968   DEBUG: leak caller address 1E0BC0E2, size      233, counter 1
15:42:03 M: 28499968   DEBUG: leak caller address 1E0F16E6, size       60, counter 5
15:42:03 M: 28499968   DEBUG: python27.dll: Total bytes leaked: 2129067
15:42:04 M: 30969856   DEBUG: CUtil::RunFFPatchedXBE - Auto Filter Flicker is off. Skipping Filter Flicker Patching.
15:42:04 M: 30969856  NOTICE: Storing total System Uptime
15:42:04 M: 30969856  NOTICE: Saving settings
15:42:04 M: 30969856  NOTICE: stop all
15:42:04 M: 30969856   DEBUG: CNetwork::NetworkMessage - Stopping network services
15:42:04 M: 30969856  NOTICE: stop time server client
15:42:04 M: 30973952  NOTICE: Webserver: Stopping...
15:42:04 M: 30973952   DEBUG: WebServer:Exiting thread sockReady=0, sockSelect=0.
15:42:04 M: 30973952   DEBUG: WebServer:OnExit - Exit web server.
15:42:04 M: 31109120   DEBUG: xbmcHttpShim ends
15:42:04 M: 31113216   DEBUG: xbmcHttp ends
15:42:04 M: 31121408  NOTICE: Webserver: Stopped...
15:42:04 M: 31121408    INFO: XBFileZilla: Stopping...
15:42:04 M: 31387648    INFO: XBFileZilla: Stopped
15:42:04 M: 31387648  NOTICE: ES: Stopping event server
15:42:04 M: 31387648  NOTICE: ES: UDP Event server stopped
15:42:04 M: 31920128   DEBUG: CLastfmScrobbler: Journal with 0 entries saved to special://masterprofile/LastfmScrobbler.xml
15:42:04 M: 31920128   DEBUG: CLibrefmScrobbler: Journal with 0 entries saved to special://masterprofile/LibrefmScrobbler.xml
15:42:04 M: 31920128  NOTICE: stop dvd detect media
15:42:04 M: 31985664  NOTICE: stop fancontroller
15:42:04 M: 31997952  NOTICE: stop daap clients
15:42:04 M: 31997952  NOTICE: clean cached files!
15:42:04 M: 31997952  NOTICE: unload skin
15:42:04 M: 32534528   DEBUG: ------ Window Deinit (custom_pack1.xml) ------
15:42:04 M: 42307584   DEBUG: ------ Window Deinit (Pointer.xml) ------
15:42:04 M: 42307584   DEBUG: ------ Window Deinit (DialogMuteBug.xml) ------
15:42:04 M: 43851776  NOTICE: stop python
15:42:04 M: 43851776  NOTICE: stopped
15:42:04 M: 43937792  NOTICE: unload sections
15:42:04 M: 43937792   DEBUG: SECTION:UnloadAll(SECTION: SNTP)
15:42:04 M: 43937792   DEBUG: SECTION:UnloadAll(SECTION: LIBHTTP)
15:42:04 M: 44015616   DEBUG: SECTION:UnloadAll(DLL: Q:\system\libcurl.dll)
15:42:04 M: 54255616    INFO: launch xbe:Harddisk0\Partition2\dashboard\Game Packs\Pack1 d:\default.xbe
15:42:04 M: 54255616    INFO:  mount Harddisk0\Partition2\dashboard\Game Packs\Pack1 as D:
15:42:04 M: 54255616  NOTICE: Unmapped drive D
15:42:04 M: 54255616  NOTICE: Mapping drive D to Harddisk0\Partition2\dashboard\Game Packs\Pack1
15:42:04 M: 54255616    INFO: launch xbe:d:\default.xbe
Download Xbox Softmodding Tool & Extras Disc
XBMC4Kids Mod


Xbox Gamertag = Connxtion
PSN ID = JCRocky5
User avatar
Dan Dar3
Posts: 1169
Joined: Sun Jul 08, 2012 4:09 pm
Has thanked: 256 times
Been thanked: 253 times
Contact:

Re: Launching XBE files with real path.

Post by Dan Dar3 »

I don't think you should quote the RunXBE path, can you try:
(the 'r' in front of the string is tell it's 'raw' so you don't have to use slashes or to escape backslashes, readability only realy):

Code: Select all

xbmc.executebuiltin(r"XBMC.RunXBE(C:\dashboard\Game Packs\Pack1\default.xbe)")
User avatar
Rocky5
Posts: 974
Joined: Sat Feb 08, 2014 5:27 am
Has thanked: 101 times
Been thanked: 254 times

Re: Launching XBE files with real path.

Post by Rocky5 »

Dan Dar3 wrote:

Code: Select all

xbmc.executebuiltin(r"XBMC.RunXBE(C:\dashboard\Game Packs\Pack1\default.xbe)")
That works, but this doesn't, I have to get the paths dynamical.

Code: Select all

 
xbmc.executebuiltin(r"XBMC.RunXBE(" + xbe + ")" ) 
I have to use (" + xbe + ") or it doesn't even see the path.

Here is the hole script, I'm still new to python & dont even know all the basics yet.
removed until finished.
Last edited by Rocky5 on Sat Feb 14, 2015 7:47 pm, edited 1 time in total.
Download Xbox Softmodding Tool & Extras Disc
XBMC4Kids Mod


Xbox Gamertag = Connxtion
PSN ID = JCRocky5
User avatar
Dan Dar3
Posts: 1169
Joined: Sun Jul 08, 2012 4:09 pm
Has thanked: 256 times
Been thanked: 253 times
Contact:

Re: Launching XBE files with real path.

Post by Dan Dar3 »

Maybe it has a problem with forward slashes (/) in RunXBE paths, try escaping them when you build your xbe variable, e.g.:

Code: Select all

xbe = RealPath + LauncherName + "\\Game Packs\\" + InfoPath + "\\default.xbe"
btw, there is an easier and errorproof way to build paths where it assumes the correct path separator for each platform and that looks like this:
https://docs.python.org/2/library/os.path.html

Code: Select all

import os.path
xbe = os.path.join(RealPath, LauncherName, "Game Packs", InfoPath, "default.xbe")
Also use string % for formatting, makes code easier to read and less prone to coding errors as you can see exactly where each parameter should go, e.g.
https://developers.google.com/edu/python/strings

Code: Select all

xbmc.executebuiltin( "XBMC.RunXBE(%s)" % (x) )
In both cases + concatenation is messy to read and you can easily loose track of separators and closing brackets.
User avatar
Rocky5
Posts: 974
Joined: Sat Feb 08, 2014 5:27 am
Has thanked: 101 times
Been thanked: 254 times

Re: Launching XBE files with real path.

Post by Rocky5 »

Brilliant, I removed the code to replace \\ with / & changed to os.path.join & it works :D

Thank you.
Download Xbox Softmodding Tool & Extras Disc
XBMC4Kids Mod


Xbox Gamertag = Connxtion
PSN ID = JCRocky5
User avatar
Dan Dar3
Posts: 1169
Joined: Sun Jul 08, 2012 4:09 pm
Has thanked: 256 times
Been thanked: 253 times
Contact:

Re: Launching XBE files with real path.

Post by Dan Dar3 »

Great stuff! first steps are a bit harder, but it gets easier with practice, and enjoying the results of your work, priceless :-)
User avatar
Rocky5
Posts: 974
Joined: Sat Feb 08, 2014 5:27 am
Has thanked: 101 times
Been thanked: 254 times

Re: Launching XBE files with real path.

Post by Rocky5 »

Can I ask one more question, is it possible to pass a texture path via python to a skin?

I have been trying to get SetProperty to work, but cant for the life of me work it out.

I basically need to load an image outside of the XBMC directory.

Code: Select all

path = ( "C:\dashboard\Game Packs\Pack1\Extras\banner.png" )
xbmcgui.Window(xbmcgui.getCurrentWindowId()).setProperty("banner", path)

Code: Select all

<texture>$INFO[Window.Property(banner)]</texture>
Download Xbox Softmodding Tool & Extras Disc
XBMC4Kids Mod


Xbox Gamertag = Connxtion
PSN ID = JCRocky5
fxmech
Posts: 673
Joined: Wed Aug 01, 2012 9:15 am
Has thanked: 37 times
Been thanked: 46 times

Re: Launching XBE files with real path.

Post by fxmech »

Rocky5, are you by chance working on a ROM Collection Browser type of script? It seems as though you are defining a path to the xtras... :D

I'll be honored to try out your code, should I be so lucky. Best of luck during the experiments
User avatar
Dan Dar3
Posts: 1169
Joined: Sun Jul 08, 2012 4:09 pm
Has thanked: 256 times
Been thanked: 253 times
Contact:

Re: Launching XBE files with real path.

Post by Dan Dar3 »

Sorry this is stepping a bit towards skinning and I don't know if I can help you that much, especially without seeing the full code, but looking at the documentation you might be missing the round brackets for the Window call (the square brackets mean the value is optional, in your case the window id, which would mean current window), Window.Property(xmlfile) has a different use - see http://www.xbmc4xbox.org.uk/wiki/InfoLabels

Code: Select all

<texture>$INFO[Window().Property(banner)]</texture>
User avatar
Rocky5
Posts: 974
Joined: Sat Feb 08, 2014 5:27 am
Has thanked: 101 times
Been thanked: 254 times

Re: Launching XBE files with real path.

Post by Rocky5 »

fxmech wrote:Rocky5, are you by chance working on a ROM Collection Browser type of script? It seems as though you are defining a path to the xtras... :D

I'll be honored to try out your code, should I be so lucky. Best of luck during the experiments
I'm actually doing a XMugen skin & script mod for XBMC, so we can have a fancy UI for it, instead of UnleashX.
Dan Dar3 wrote:Sorry this is stepping a bit towards skinning and I don't know if I can help you that much, especially without seeing the full code, but looking at the documentation you might be missing the round brackets for the Window call (the square brackets mean the value is optional, in your case the window id, which would mean current window), Window.Property(xmlfile) has a different use - see http://www.xbmc4xbox.org.uk/wiki/InfoLabels

Code: Select all

<texture>$INFO[Window().Property(banner)]</texture>
Got it working, thank you.

Here are a couple images.
Image
Image
Image
Download Xbox Softmodding Tool & Extras Disc
XBMC4Kids Mod


Xbox Gamertag = Connxtion
PSN ID = JCRocky5
User avatar
Dom DXecutioner
Posts: 585
Joined: Thu Jul 05, 2012 11:59 pm
Location: California
Has thanked: 249 times
Been thanked: 219 times
Contact:

Re: Launching XBE files with real path.

Post by Dom DXecutioner »

@Rocky5,

Since you got it working, mind sharing so that anyone who may have the same problem benefits from you findings? Thanks!

Out of curiosity, what method are you using? Are you using the Window object via python or are you loading a Custom_WindowID.xml?
Image
User avatar
Rocky5
Posts: 974
Joined: Sat Feb 08, 2014 5:27 am
Has thanked: 101 times
Been thanked: 254 times

Re: Launching XBE files with real path.

Post by Rocky5 »

Dom DXecutioner wrote:@Rocky5,

Since you got it working, mind sharing so that anyone who may have the same problem benefits from you findings? Thanks!

Out of curiosity, what method are you using? Are you using the Window object via python or are you loading a Custom_WindowID.xml?
Used, to set the Extras folder path. (obviously there is more code to go with it)

Code: Select all

Extras_Path = os.path.join(RealPath, Game_Pack_Directory)
xbmcgui.Window( 10000 ).setProperty( 'Extras_Path' , Extras_Path )
includes_XMugen.xml how I load textures.

Code: Select all

<texture>$INFO[Window(home).Property(Extras_Path)]\$INFO[Container(1).ListItem.Label]\Extras\background.png</texture>
For the windows I used custom xml files, ie, custom_Pack1.xml but there only use is to load an includes & have a fixedlist. (so I can loaded the loader.py)

I will send you a PM with everything.

I did use the programs section to begin with, but XBMC wants to load an XBE when (A) is pressed & it also required the packs to have a default.xbe in the root folder & the user to set the source, I didn't want this. So it was simpler to just use a custom xml with some visible tags to jump between them, that way I have full control on what & where files are loaded/run & a python script to gather the paths I need.
Download Xbox Softmodding Tool & Extras Disc
XBMC4Kids Mod


Xbox Gamertag = Connxtion
PSN ID = JCRocky5
hawsey
Posts: 507
Joined: Tue Jul 17, 2012 8:25 pm
Has thanked: 47 times
Been thanked: 30 times

Re: Launching XBE files with real path.

Post by hawsey »

Erm I just realised what you were doing here , does this mean I won't have to keep re naming my Xmugen packs so that it boots up the one you want ?
Thanks
User avatar
Rocky5
Posts: 974
Joined: Sat Feb 08, 2014 5:27 am
Has thanked: 101 times
Been thanked: 254 times

Re: Launching XBE files with real path.

Post by Rocky5 »

hawsey wrote:Erm I just realised what you were doing here , does this mean I won't have to keep re naming my Xmugen packs so that it boots up the one you want ?
Thanks
That depends, I was doing this for Raven (he never asked) as the Unleashx way is good, but it's lacking in the looks department & this would function the same way as his UnleashX loader.

I will get a Mugen pack from him & see how it's setup, then I can fix the scripts so they point to the proper locations. That's if he has released v3, supposedly he has but who knows.

The guys difficult to deal with, it's like trying to get blood out of a stone.

(Basically you should be able to select a pack & it will load that pack, so no need for you to rename anything, that's the plan.)
Download Xbox Softmodding Tool & Extras Disc
XBMC4Kids Mod


Xbox Gamertag = Connxtion
PSN ID = JCRocky5
hawsey
Posts: 507
Joined: Tue Jul 17, 2012 8:25 pm
Has thanked: 47 times
Been thanked: 30 times

Re: Launching XBE files with real path.

Post by hawsey »

I will wait patiently then heh he it would be great if we could do that :-)
User avatar
Dom DXecutioner
Posts: 585
Joined: Thu Jul 05, 2012 11:59 pm
Location: California
Has thanked: 249 times
Been thanked: 219 times
Contact:

Re: Launching XBE files with real path.

Post by Dom DXecutioner »

@Rocky5,

Got the pm with the files; though I did take a look at the scripts, I have not had the opportunity to load the files to the xbox for testing... I think i get the concept of what you're trying to do.

The one advantage I see to using your current setup is that by using various custom windows, you can have different objects (images or group of images) and animations from any place within the interface for each package. Though a lot of extra work, but the end result can be similar to hyperspin, which I've just seen on youtube.

On the other hand, because mugen is a fighting platform, i would have used a more static approach with one character - two at most - for each respective "package" coming from the side, a background image, the video object, maybe an overlay. Then used one single window using pure python and do everything within that window.

Good work!
Image
User avatar
Rocky5
Posts: 974
Joined: Sat Feb 08, 2014 5:27 am
Has thanked: 101 times
Been thanked: 254 times

Re: Launching XBE files with real path.

Post by Rocky5 »

Dom DXecutioner wrote:@Rocky5,

Got the pm with the files; though I did take a look at the scripts, I have not had the opportunity to load the files to the xbox for testing... I think i get the concept of what you're trying to do.

The one advantage I see to using your current setup is that by using various custom windows, you can have different objects (images or group of images) and animations from any place within the interface for each package. Though a lot of extra work, but the end result can be similar to hyperspin, which I've just seen on youtube.

On the other hand, because mugen is a fighting platform, i would have used a more static approach with one character - two at most - for each respective "package" coming from the side, a background image, the video object, maybe an overlay. Then used one single window using pure python and do everything within that window.

Good work!
Currently each window uses the same animations. (Loaded via an includes)

As for the images, I use 2 for characters, 1 for a background effect falling leaves or blood eg..., a background image, a footer image, a header ie, game title image & a video file.

Artwork1.png
Artwork2.png
Artwork3.png
Background.png
Footer.png
Header.png
Preview.xmv

Files that are animated.
Artwork1.png - zooms in from the left & moves back an forth.
Artwork2.png - zooms in from the right & moves up & down.
Artwork3.png - falls from the top in randomish patterns like snow, leaves falling eg...
Header.png - pulses every 20/30 seconds.

You can see the footer in the Street fighter alpha 2 image above, it gives the illusion that the characters are in the grass.

As for using Python to do the GUI, I was still trying to get to grips with loading texturs & such, but the xml way works just as good, if not better.
Download Xbox Softmodding Tool & Extras Disc
XBMC4Kids Mod


Xbox Gamertag = Connxtion
PSN ID = JCRocky5
Post Reply