CLI Launcher
Based on the difficulty I was having trying to launch different configs for PCSX2 through XBMC (via advanced launcher), I created a command line launcher to simplify the task.

  • Launches PCSX2 using a links text file, allowing you to keep your configuration commands in one spot
  • Links file can be optionally specified using the '--linkspath="<path>"' switch. If switch is not used, defaults to 'Links.txt' file located in the same directory as the launcher.
  • Allows you to suspend another application through the optional switch '--suspendapp=<APP>' (e.g. --suspendapp="XBMC.exe")
  • Ensures launched app (e.g. pcsx2.exe) closes when pressing escape (works around issue with --nogui switch not closing pcsx2.exe)
  • While this was written for PCSX2, it is flexible enough to be used with other emulators that support configuration via command line.
  • If used with Advanced Launcher in XBMC, keeps you from having to edit the launchers.xml file for each game (path to game doesn't have to change to links, for example)

  • Currently only matches launch configuration based on full iso path
  • Each command in the links.txt file must be on its own line, and must not span multiple lines!

  • Let me know!

Usage (parameter order does not matter):

C:\games\launcher\launcher.exe --suspendapp="XBMC.exe" --linkspath="C:\games\launcher\links.txt" "C:\games\ps2\Final Fantasy XII\Final Fantasy XII [SLUS-20963].iso"

Example line in links.txt
C:\games\ps2\pcsx2\4954\pcsx2.exe "C:\games\ps2\Final Fantasy XII\Final Fantasy XII [SLUS-20963].iso" --cfgpath="C:\games\ps2\Final Fantasy XII\config" --nogui --fullscreen

A sample links.txt file is included in the uploaded zip file.
Please let me know if you have any issues with the launcher, or if you have any ideas for improvement!

Attached Files
.zip (Size: 269,69 KB / Downloads: 787)

Sponsored links

Nice! Smile
(11-05-2011, 10:37 PM)Rezard Wrote: Nice! Smile

+1 Smile

Any chance you'll publish the source code?
(11-05-2011, 11:33 PM)avih Wrote: +1 Smile

Any chance you'll publish the source code?

Sure. I'm not sure that I should post it on github or anything like that (since it's just a small script), but for now I'll just post it here.

Truthfully, it's just an AutoIt Script. I got the idea for it after looking at a simple script for PCSX2 and Advanced Launcher and realizing I needed a little more control.

Attached Files
.zip (Size: 1,19 KB / Downloads: 440)
Thanks Smile
Yesterday I expanded on that script too. My version assumes a folder structure, looks for configuration files and memory card and creates them (actually writes the config files that need custom entries like where to find each games memory card) and finally launches the game. I would put mine up as well but I would need to make a way to configure it for each user and I'm not sure the interest warrants the effort, especially with your script which I'm reading through right now (and when did I start to be able to read code while responding to forum posts on the other screen? I just impressed myself!)
I went down that path at first too (the assumed folder structure), but the programmer in me doesn't like to hard-code, so I tried to make it more generic.

One current issue with my script is the fact that the game won't launch without an entry in the links.txt file. I was thinking of adding a 'default' line (maybe the last line in the links.txt file) that specifies a generic 'best case' configuration for most games. This way I'm dealing with the exception rather than the rule for custom configurations.
Nice one Smile

Avih Wrote:+1 Smile
Wheres the +1 for him. I don't see that. Tongue2

Users browsing this thread: 1 Guest(s)