Kodi Community Forum
[CLOSED] Advanced Launcher - Applications Launcher Addon for XBMC - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Game Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=291)
+---- Thread: [CLOSED] Advanced Launcher - Applications Launcher Addon for XBMC (/showthread.php?tid=85724)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453


- Angelscry - 2010-12-08

Pinhead Wrote:I am using XBMC RC2 and Mame 140.

I tested my copy of Mame by creating a shortcut to the app and adding a "-listfull" argument. When running the shortcut the terminal pops up and prints a list of games. I other words, listfull works as an argument with my version of Mame.

Also, regarding the "remove" button; proof that Im not going crazy:

Image
I'm using the same versions of XBMC and MAME as you under windows. The only difference is that you are under Vista 64 and I'm under Windows 7 64-bits. But I don't think this problem is related to the windows version.

Could you give me the result of the command :
Code:
mame -listfull mslug

Normally you wil have exactly this :
Code:
Name:             Description:
mslug             "Metal Slug - Super Vehicle-001"

For the Remove option, ok I have found the problem. I think we are limited by the number of options we could display under XBMC. Under windows you have an additional option "Toggle Wait State" that hide the "Remove". That's not a really good news, beacause that's mean that we will be limited into the number of displayed option. I will try to shorten the menu list for the next version : mix both search option into ony one and move the Toggle Wait State" option into the launcher Edit option.

Thank you for your feedback.


- Pinhead - 2010-12-08

Yes, Mame does return: mslug "Metal Slug - Super Vehicle-001".


- Angelscry - 2010-12-08

falafael Wrote:is there a simpletons manual for this plugin, i really am bit stuck on this plugin, would love to get it how pinheads got it, i have a stack of roms, but am just a bit lost with this plugin....Thanks!
No manual yet. The Advanced Launcher is not yet finished or stable. So it is not actually my priority, but I will add it to my todo list. Maybe someone else will have time to make one. Sorry.


- Angelscry - 2010-12-08

Pinhead Wrote:Yes, Mame does return: mslug "Metal Slug - Super Vehicle-001".
Is it also returning the "Name: Description:" line? Could you please copy/paste the exact returned info (using the forum code tag)? Could be just some differences like TAB, white space number, quotes, string format, that create the error. Thank you.


- Pinhead - 2010-12-08

Angelscry Wrote:Is it also returning the "Name: Description:" line? Could you please copy/paste the exact returned info (using the forum code tag)? Could be just some differences like TAB, white space number, quotes, string format, that create the error. Thank you.

Here is a a copy/paste of the terminal window.

Code:
Name:             Description:
mslug             "Metal Slug - Super Vehicle-001"



- Angelscry - 2010-12-08

Pinhead Wrote:Here is a a copy/paste of the terminal window.

Code:
Name:             Description:
mslug             "Metal Slug - Super Vehicle-001"
Ok thank you. It return the same string, but cannot use it...Eek I will investigate into this. The subprocess.Popen command seems not working the same way depending the system used. I have to found the cause : different locales, different characters encoding, different OS interpretation...


- Eldorado - 2010-12-08

Angelscry Wrote:Yes, the Advanced Launcher support filenames and paths with spaces. But I'm not sure Nestopia and Project64 support them.

They do if I put some quotes around the whole path+filename

So I was assuming that the launcher does not use quotes?

Same issue with ZSNES, SNES9x.. I can duplicate the error I see by running from command line, then I simply put some quotes on and it works

eg.
Produces error:
nestopia smb:\\Games\Emulator\NES\ROMS\Final Fantasy (U).nes

Runs fine:
nestopia "smb:\\Games\Emulator\NES\ROMS\Final Fantasy (U).nes"
or
nestopia smb:\\Games\Emulator\NES\ROMS\FinalFantasy(U).nes


- Eldorado - 2010-12-08

Sorry one more item I noticed - along with not being able to remove a launcher which I see you just spotted the problem

When I edit a launcher, why can't I edit ALL of the properties that come with it? Eg. location of fanart, thumbs, roms etc? I made some mistakes while playing around and couldn't easily change all of the launchers properties


- Angelscry - 2010-12-08

Eldorado Wrote:They do if I put some quotes around the whole path+filename

So I was assuming that the launcher does not use quotes?

Same issue with ZSNES, SNES9x.. I can duplicate the error I see by running from command line, then I simply put some quotes on and it works

eg.
Produces error:
nestopia smb:\\Games\Emulator\NES\ROMS\Final Fantasy (U).nes

Runs fine:
nestopia "smb:\\Games\Emulator\NES\ROMS\Final Fantasy (U).nes"
or
nestopia smb:\\Games\Emulator\NES\ROMS\FinalFantasy(U).nes
I clearly understand your problem, but the Advanced launcher use quotes for all the paths (application path and roms path) :
Code:
if (sys.platform == 'win32'):
                        if (launcher["wait"] == "true"):
                            cmd = "System.ExecWait"
                        else:
                            cmd = "System.Exec"
                        xbmc.executebuiltin("%s(\\\"%s\\\" %s \\\"%s\\\")" % (cmd, launcher["application"], launcher["args"], rom["filename"]))
                    elif (sys.platform.startswith('linux')):
                        #this minimizes xbmc some apps seems to need it
                        xbmc.executehttpapi("Action(199)")
                        os.system("\"%s\" %s \"%s\"" % (launcher["application"], launcher["args"], rom["filename"]))
                        #this brings xbmc back
                        xbmc.executehttpapi("Action(199)")
                    elif (sys.platform.startswith('darwin')):
                        os.system("\"%s\" %s \"%s\"" % (launcher["application"], launcher["args"], rom["filename"]))
So that's not the problem. Could you please post here the content of your launchers.xml file? Thank you.


- Angelscry - 2010-12-08

Eldorado Wrote:Sorry one more item I noticed - along with not being able to remove a launcher which I see you just spotted the problem

When I edit a launcher, why can't I edit ALL of the properties that come with it? Eg. location of fanart, thumbs, roms etc? I made some mistakes while playing around and couldn't easily change all of the launchers properties
Yes I will try to fix the "remove option" as soon as possible. After creation of a launcher you cannot change any of the paths. Imagine you already have defined those paths and scan for some roms and scraped some thumbs and fanarts. If you decide to change the paths, tha'ts mean that you have to relocate all your already scanned roms and saved images. It will start to be difficult to manage all this. The simplest way is to remove and recreate the launcher.


- Jurai - 2010-12-08

fwiw, I also can't launch roms with Project64 1.6, but rom launching does work with the 1.7 beta

edit: pj64 1.6 apparently does not work if you pass it quotation marks around the path, since the plugin is always appending quotes I don't see it working unless an option to disable them is added


- jpreville - 2010-12-08

i have been playing around with part of your code outside of xbmc. just trying to get a feel for how Popen works... its almost like its going to fast to grab the variables or something..

here's the code i was playing with. just does a list of all roms in mame directory then takes it through a loop to try to get the rom full names..
Have not gotten it to work properly.

Quote:import os
import re
import subprocess
lsprocess=subprocess.Popen('ls -1 /home/john/.mame/roms/',shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
filenames=lsprocess.stdout.read()
filename=re.findall('(.+?).zip',filenames)

for index1 in range(len(filename)):
file=filename[index1]
file=file.strip()
file='/usr/games/mame','-listxml '
process = subprocess.Popen(file)
name= process.stdout.read()
print 'return code:'+ name
name2=re.findall('<description>(.+?)</description>',name)
print name2



- Angelscry - 2010-12-08

jpreville Wrote:i have been playing around with part of your code outside of xbmc. just trying to get a feel for how Popen works... its almost like its going to fast to grab the variables or something..

here's the code i was playing with. just does a list of all roms in mame directory then takes it through a loop to try to get the rom full names..
Have not gotten it to work properly.
Ok. thank you jpreville for your tests. It was really strange that the Popen command works but not on all systems. I was try to found around the web explanation but nothing. I will try to see if I cannot found an alternative to the Popen command. We could try to create a temporary file to store the information... but it is not proper as the Popen command. Again something to add on my todo list... Confused My problem is that I not able to recreate the error conditions on my computer....


- Angelscry - 2010-12-08

jpreville Wrote:i have been playing around with part of your code outside of xbmc. just trying to get a feel for how Popen works... its almost like its going to fast to grab the variables or something..

here's the code i was playing with. just does a list of all roms in mame directory then takes it through a loop to try to get the rom full names..
Have not gotten it to work properly.
It it is to fast, maybe we can add :
Quote:....
file='/usr/games/mame','-listxml '
process = subprocess.Popen(file)
process.wait()
name= process.stdout.read()
print 'return code:'+ name
....
You can maybe also try to use the communicate() function that manage the Popen process.


- Angelscry - 2010-12-08

Jurai Wrote:edit: pj64 1.6 apparently does not work if you pass it quotation marks around the path, since the plugin is always appending quotes I don't see it working unless an option to disable them is added
But... if you do not use quotation, paths with white spaces will not working. No ? Huh