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 - 2011-12-19

jubilex Wrote:Hi, thanks for the Add-On. I am using it to launch PC games as file launchers. Most games work fine, but some games, on exit and return to XBMC, have XBMC running in small window on my desktop.

More details:

The display is 1280x720. XBMC is set to "use a fullscreen window" of 1280x720. My games are all set to 1920x1080p or at least 1600x[whatever]. All but two of the games have no problems. Those two, Crysis and Dead Space 2, upon exiting the game, return me to my PC desktop with XBMC running in a small window in the corner (fully functional). If I launch one of the "broken" games then, XBMC will return to fullscreen as soon as I click on the game, and play the game fullscreen, but will still return to the small window upon exiting the game. If I launch one of the "good" games, it will remain correctly in fullscreen after exiting the game.

XBMC's system>video output screen and Windows 7 resolution all continue to report 1280x720 while this is going on.

On a different display that is 1080p, I have the opposite problem. After exiting the game, XBMC is in a too-large window that extends outside the screen.

edit: After more testing, this is not an Advanced Launcher problem per se; this happens if I launch a game manually from Windows while XBMC is running, and then quit the game. I guess it's an XBMC issue of some sort? I don't know what to do about it since both XBMC and Windows, after quitting the game, still say they are at the correct resolution.
What happen is that your games and XBMC may use the same graphic rendering engine. So when you start a game, it surely take the control of the rendering display over XBMC and force this last one to be reduced, minimized, and force XBMC to change its resolution. Then when you close the game, XBMC is not able to return correctly to it's initial state the game have change it. And that's why you have problem.

It is hard to control this from Advanced Launcher because it depend of the game you have started. Actually the way to fix this is to create a small .bat script, specifically dedicated to the game that will act as an intermediate launcher an that will control the game and XBMC display.

On way to proceed is to use such kind of script : http://www.gwenael.org/forum/viewtopic.php?id=6 that will force XBMC to close before before starting the game and that will restart XBMC after the game will be closed. By this way you avoid any rendering incompatibility problems between XBMC and the game.

Another method is to create a small script that will control the XBMC windows state using the nircmd application for example : http://www.gwenael.org/forum/viewtopic.php?id=26


- hentai23 - 2011-12-21

hey angel found someone doing a request for improving the picture viewing features in xbmc in this thread perhaps you would like to add something to that?

http://forum.xbmc.org/showthread.php?tid=113290&page=2


you know pertaining to comics viewing etc , then we could view comics without the need of an external program how bout it? and would be a first step towards comic heaven not to mention youre addon that is in plans of course xD


- jubilex - 2011-12-23

Angelscry Wrote:What happen is that your games and XBMC may use the same graphic rendering engine. So when you start a game, it surely take the control of the rendering display over XBMC and force this last one to be reduced, minimized, and force XBMC to change its resolution. Then when you close the game, XBMC is not able to return correctly to it's initial state the game have change it. And that's why you have problem.

It is hard to control this from Advanced Launcher because it depend of the game you have started. Actually the way to fix this is to create a small .bat script, specifically dedicated to the game that will act as an intermediate launcher an that will control the game and XBMC display.

On way to proceed is to use such kind of script : http://www.gwenael.org/forum/viewtopic.php?id=6 that will force XBMC to close before before starting the game and that will restart XBMC after the game will be closed. By this way you avoid any rendering incompatibility problems between XBMC and the game.

Another method is to create a small script that will control the XBMC windows state using the nircmd application for example : http://www.gwenael.org/forum/viewtopic.php?id=26

Hi AC, thanks for the response! I tried nircmd but unfortunately it doesn't do anything. I put it in my .bat file to maximize XBMC after the game closes, but it doesn't. Even if I manually run it from a commandline, it still doesn't get XBMC back to fullscreen. I can hide xbmc, activate it, minimize it with nircmd, but maximizing, redrawing, setsizing, etc all have no effect whatsoever.

I'd like to avoid closing and reopening XBMC entirely because that is a very clumsy way to do it, and would involve navigating back through menus every time I just want to switch games.

The only way I've found to fix it is to go to settings>system>video output, change the display mode to Windowed, let that happen, and then change it back to full screen. This makes it seem like it really is something with how XBMC is drawing itself improperly after returning from a game. Is this a bug?

Any other ideas? It seems really weird that I would be the only one having this problem; these are popular games.


- Angelscry - 2011-12-23

jubilex Wrote:The only way I've found to fix it is to go to settings>system>video output, change the display mode to Windowed, let that happen, and then change it back to full screen. This makes it seem like it really is something with how XBMC is drawing itself improperly after returning from a game. Is this a bug?

Any other ideas? It seems really weird that I would be the only one having this problem; these are popular games.
No, you are not the only one who have this problem. This is a recurrent XBMC bug under windows systems. When XBMC minimize, when it start an external application (using RCB, launcher, executor or Advanced Launcher or any other similar plugin), it is not able to come back correctly to fullscreen when XBMC true fullscreen mode is activated.


- jubilex - 2011-12-23

Angelscry Wrote:No, you are not the only one who have this problem. This is a recurrent XBMC bug under windows systems. When XBMC minimize, when it start an external application (using RCB, launcher, executor or Advanced Launcher or any other similar plugin), it is not able to come back correctly to fullscreen when XBMC true fullscreen mode is activated.

I actually have it set to use fullscreen window rather than true fullscreen.

edit: Autohotkey to the rescue once again. Made a script with its winactivate and winmaximize functions that is run from the .bat I use to launch the problematic games. Works fine.

edit2: Oddly, the AHK script works when returning to XBMC from Crysis, but not from Dead Space 2. Final solution - set up Ultramon hotkey to maximize the current window. So the .bat for the game launches the game, then on game close runs the AHK script, which sends the hotkey to Ultramon. Ugly as hell, but it works.

Very unfortunate XBMC doesn't simply redraw itself properly once the offending application is closed.

Thanks for your help and for the add-on!


- Angelscry - 2011-12-24

jubilex Wrote:I actually have it set to use fullscreen window rather than true fullscreen.

edit: Autohotkey to the rescue once again. Made a script with its winactivate and winmaximize functions that is run from the .bat I use to launch the problematic games. Works fine.

edit2: Oddly, the AHK script works when returning to XBMC from Crysis, but not from Dead Space 2. Final solution - set up Ultramon hotkey to maximize the current window. So the .bat for the game launches the game, then on game close runs the AHK script, which sends the hotkey to Ultramon. Ugly as hell, but it works.

Very unfortunate XBMC doesn't simply redraw itself properly once the offending application is closed.

Thanks for your help and for the add-on!
For each launcher, into context menu, advanced settings, you also have an "Toggle XBMC fullscreen" option that you can activate/desactivate to "normally" force XBMC to switch into fullscreen mode. It not works all the time... but could give positive result on your system.

Other solution, as you done with AHK/Ultramon script, is too create a small autoit script specifically for games that create problem. You will found here some example how autoit script could be used with Advanced Launcher to controle windows states : http://www.gwenael.org/forum/viewforum.php?id=2


- jubilex - 2011-12-24

Hmm, all of a sudden it doesn't seem to work for me anymore. My .bat file just runs all the commands in a row, so it has run through the batch before the game has even reached the title screen.

Code:
pssuspend XBMC.exe
cd "x:\games\crysis\Bin64"
Crysis.exe
pssuspend -r XBMC.exe
cd "x:\games"
maxwin.ahk

Shouldn't those other commands only run once Crysis.exe is closed? It seems to work for other games.
edit: It's because crysis.exe then launches crysis64.exe. Unfortunately launching crysis64.exe just results in crash. I admitted defeat and just assigned a button on the remote to manually maximize XBMC with Autohotkey. Ugly solution but I've wasted way too much time on this.

Sorry for the off-topic questions!


- kevenz - 2011-12-27

Angelscry Wrote:Another possibility to avoid to use 2 different launcher, will be that you add/create a small script that will be started by Advanced Launcher and that will identify which game you want to start. Then, the script will start the official version of MAME or its modified version, depending of the game that will be selected.

I see, you mean a .bat file with "if" and "then" ?

It's a good idea, i just don't remember how to program them Smile


- Angelscry - 2011-12-28

jubilex Wrote:edit: It's because crysis.exe then launches crysis64.exe. Unfortunately launching crysis64.exe just results in crash. I admitted defeat and just assigned a button on the remote to manually maximize XBMC with Autohotkey. Ugly solution but I've wasted way too much time on this.
You can create a small autoit script that will start automatically crysis.exe, then, when the process crysis.exe will be closed that will check if the crysis64.exe process is running or not. And then the process crysis64.exe will be ended, the autoit script will maximaze XBMC.

kevenz Wrote:I see, you mean a .bat file with "if" and "then" ?
It's a good idea, i just don't remember how to program them Smile
Yes... You can create a .bat file or a small autoit script.


- Muyfa666 - 2011-12-28

Does this addon only work with emulators? I've tried to add PowerDVD in Eden Beta 1, but can not get it to work at all. Any suggestions?


- Angelscry - 2011-12-28

Muyfa666 Wrote:Does this addon only work with emulators? I've tried to add PowerDVD in Eden Beta 1, but can not get it to work at all. Any suggestions?
This Add-on works with ALL applications. What is exactly not working with PowerDVD?


- Muyfa666 - 2011-12-28

Uh, it's not starting at all. Maybe I'm adding it wrong...?

EDIT: I'm gonna go over it very carefully tomorrow and see if I can get it to work.


- Angelscry - 2011-12-29

Muyfa666 Wrote:Uh, it's not starting at all. Maybe I'm adding it wrong...?

EDIT: I'm gonna go over it very carefully tomorrow and see if I can get it to work.
You just have to create a stand alone launcher and select the PowerDVD executable file. You will found a Youtube tutorial for stand-alone launcher creation here : http://www.youtube.com/watch?v=CvaGzEc_6e4
If it still not working, please post here, using pastebin service, the content of your launchers.xml file (locate into XBMC's userdata forlder).


- Muyfa666 - 2011-12-29

Ok, tried it once more, with a completely fresh Eden Beta 1 install. No old settings saved. Downloaded Advanced Launcher v1.6.7 from repository.

I added it according to the youtube video, which is the same way I tried before.

When I try to launch the program, XBMC quickly flashes to desktop and back again. No error message, and PowerDVD does not start.

Here's my launcher.xml pastebin:

http://pastebin.com/sP6ezVS8

EDIT: I tried to add XVI32 hex editor, just for test, and it works fine. Could it be that PowerDVD needs some kind of argument?

EDIT2: Starting XVI32 works, but after I exit the program, XBMC does not regain focus.


- Angelscry - 2011-12-29

Muyfa666 Wrote:Ok, tried it once more, with a completely fresh Eden Beta 1 install. No old settings saved. Downloaded Advanced Launcher v1.6.7 from repository.

I added it according to the youtube video, which is the same way I tried before.

When I try to launch the program, XBMC quickly flashes to desktop and back again. No error message, and PowerDVD does not start.

Here's my launcher.xml pastebin:

http://pastebin.com/sP6ezVS8

EDIT: I tried to add XVI32 hex editor, just for test, and it works fine. Could it be that PowerDVD needs some kind of argument?

EDIT2: Starting XVI32 works, but after I exit the program, XBMC does not regain focus.
If XBMC do not regain focus after closing an application, you must go into XBMC settings and activate the Use a fullscreen window rather than true fullscreen option that is present into XBMC system settings (http://www.gwenael.org/forum/viewtopic.php?id=3). If you really want to continue to use Advanced Launcher with the true fullscreen mode of XBMC, you will need to use a small script that will force XBMC to maximize after the started application will be closed : http://www.gwenael.org/forum/viewtopic.php?id=199

Concerning PowerDVD, your configuration seems good. Now I'm not sure if it is the right way to start PowerDVD (I'm not using it). Maybe the command line to start it is different than the one into your launcher.xml file. For example, how looks like the command line into the PowerDVD .lnk windows shortcut?