Jump to content
LaunchBox Community Forums

Automated Platforms Split Script


bd00

Recommended Posts

I have created a script(s) that will automate the process of splitting your library into platform segments, with navigation between each segment. This will not replace your main LaunchBox instance which contains all your games, but rather extend it, allowing you to split up your collection into platforms. The best thing is, it will not affect your current instance of LaunchBox in any way and when the feature is added to LaunchBox natively, you can simply delete the folder containing the platform instances and it will be as if they were never there. No games, info, images, emulators, etc. will be affected in any way. NOTE: Only Windows OS is supported. Who might like this? People with large libraries who find LaunchBox sluggish. People with a HTPC setup. Anybody else who would like the added benefit of having a main menu where they can choose a platform. How it works:
How-To in a nutshell: *Unzip SeperatePlatforms.zip *Copy Libraries folder to current LaunchBox Directory *Open "Add a new platform.bat" Script *Enter platform name (Must use exact name from your LaunchBox library. Read below for more info) *Wait a few seconds *Your Done! *Repeat for each platform.
The zip file you will download contains 2 Instances of LaunchBox and a bunch of scripts. One instance of LaunchBox acts as a main menu where you will add each platform in your collection. This instance contains navigation back to your main LaunchBox instance (All Games) and will contain navigation to each of your platforms personal instances, once you add them. Sorry, but I could not automate this part, but I made it as easy as possible. The second instance of LaunchBox acts as a template and will be used when creating your new platform instances. The scripts are mostly batch files, but I had to turn to PowerShell to export the data from the current LaunchBox.xml and import it into the new LaunchBox.xml. First download the zip file from the bottom of this post and unzip it. Then copy the Libraries folder to the same folder your current LaunchBox.exe is located. It is essential that you put this directory in the correct place, otherwise it simply won't work. Now open the Libraries folder you just moved and open _TEMPLATE_ folder. Here you need to customize LaunchBox with your personal settings. These settings will be passed to every platform instance you add. Get this right now so you don't have to set it up individually for all your platforms later. Don't delete the navigation buttons or you will lose the navigation between platforms. Once you have everything set the way you like, exit LaunchBox. Navigate back to the Libraries directory and open the Add a new platform.bat and you will be greeted with a pop up box asking you to enter the name of the platform you wish to set up. Here you MUST enter the platform name EXACTLY like it is set in your current LaunchBox library. So if it is Nintendo Entertainment System (NES) in LaunchBox you must enter Nintendo Entertainment System (NES) in this box. Word for word, letter for letter, this is very important. Once you have entered the platform click OK. (Note: NEVER click the cancel button, even if you change your mind. All that will do is tell the script you don't have a platform name and it will continue anyway and copy an instance of LaunchBox directly into the folder you are currently in.) That's it your done! The scripts will do all work now. Just wait a few seconds and it will be ready. You will notice a new folder appear in the directory where you launched the script, named whatever platform you added. Open that folder and start LaunchBox. You should have all you games from that platform fully imported, game info, images, emulator and all. Repeat the last step for all your platforms. Once you have all your platform instances created, it is time to set up your main menu. Navigate to the Libraries directory and open the _Launcher_ folder. Open that instance of LaunchBox. You will see a exit button and an all games poster, this will take you to your main instance of LaunchBox where all your games are, but leave that for now. Add a new game. In the title field type the name of your platform and add an image for that platform. Then go down to Application Path and click the browse button. Here, you need to navigate to the _Navigation Scripts_ located in the libraries directory (there is also a Navigation Scripts folder in the _Launcher_ directory, but this is the WRONG one. In the correct _Navigation_Scripts_ folder you will see a handfull of .bat files named like your platforms. Choose the .bat file of the platform you are adding and click OK. Add any other info you wish in the Add Game window then click OK. That's it. Repeat this process for each platform you have. Unfortunately, you cannot just add another instance of LaunchBox to the application path. LaunchBox doesn't like having 2 instances open at the same time. So these scripts are need to kill the current instance and open the next and this allows you to navigate between each platform. Your Finished! Enjoy! What are these scripts doing? First, a copy of the template instance is copied and renamed to $platform. Then the template navigation script is copied and renamed to $platform. Then PowerShell takes over and parses the LaunchBox.xml file, matching any games that match the platform you entered. It takes all the results and creates a new xml file that is merged with the platform instance. It also outputs a series of text files that have the game ID's as their name. Then these txt files are used to match the image folders of that platforms artwork. The image folders are copied into the platform instance directory, then those txt files are deleted. Finished. The navigation scripts simply kill the current instance of LaunchBox and then load the next.
Download Link: DOWNLOAD
You may wish to add a link from your main (all games) LaunchBox to the main menu. To do this just add a game and point the application path to Libraries/_Launcher_/Navigation Scripts/_back_button.bat
Screenshots:
Spoiler
Main Menu
Spoiler
Platform Info
Spoiler
Platform Screen

Enjoy!
Link to comment
Share on other sites

Yeah sorry, ran out of space on Dropbox so migrating a lot of stuff to other accounts. Unfortunately that means all the stuff I had hosted on Dropbox needs updating, most stuff on LaunchBox forums included. All the images I posted in other threads that were hosted on Dropbox are missing too. I just need to get round to updating all the links, bloody nightmare. I will get to it, at some point. I tried to remove this thread temporarily until I get round to updating links on LB but I couldn't delete it, so I just removed everything. I suppose I could update this one link now, that won't kill me Kiss
*EDIT* Done.
Link to comment
Share on other sites

  • 9 months later...
bd000 this is an awesome concept, way nicer than selecting a platform from the sidebar, and much more Platform information friendly. The little hover icons akin to those on the Games boxart images being used to display a Platform Details popup box with the device's statistics fields and user notes, and an Images popup box to view images of the device plus whatever images the user adds like variations, peripherals etc. The bad news is that the download link shows a Dropbox 404 item possibly deleted or removed. I was really looking forward to installing and checking this out. As a 3rd party addon I'm assuming it will work with LaunchBox 4.9 as well as the new 5.0 betas (the BigBox ones). I'd love to see Jason integrating this concept into LaunchBox. Great vision and work here bd000. Just one thing. Just below the download link you mention the option of adding a link from the main (all games) LaunchBox to the main menu. What will this actually do?
Link to comment
Share on other sites

OK, the link is fixed. Steps:
1. Extract the zip file, and move the Libraries folder into your main LB directory (next to the LaunchBox.exe file). THIS IS IMPORTANT! 2. The zip file contains 2 instances of LaunchBox; Main Menu & Template. Both are old versions (3.x) and will need updating first. Also, I can't be sure if this will work with a newer version. 3. Next, you need to customize the template instance (_TEMPLATE_\LaunchBox.exe) with your personal settings. It is best to do this first, or you will have to do every platform manually later on. Also, if you have a license, put it in the _TEMPLATE_ folder now. 4. Now navigate to "Libraries\_LAUNCHER_\Navigation Scripts" and run the _ADD_NEW_PLATFORM_.bat file. (names must be exactly as they are in LaunchBox) 5. Repeat step 4 for each platform in your collection.
A few things to know before experimenting with this:
1. I needed to use PowerShell (PS) to make this work and this will cause many of you problems. Windows will not let you run this PS script without changing the execution policies first. You will need to change it to unrestricted. Here is more info and instructions how to do it: https://technet.microsoft.com/en-us/library/ee176961.aspx There is nothing I can do about this and it is required for this to work. 2. This will not work in BigBox mode. You can view and play the games in BBM, but navigating between platforms will not work properly and the exit button will not work at all. 3. This will not affect your current (main) instance/install/whatever of LaunchBox at all. Nothing will be edited/moved/renamed/touched/etc. 4. If a better solution is built into LB in the future, you can literally just delete the Libraries folder to uninstall. 5. Let me know if this works for you or(and) if you find any bugs. 6. Once you have added all of you platforms, you can use the main menu instance as your main launcher. It is located here: "Libraries\_LAUNCHER_\LaunchBox.exe" Create a shortcut to this on your desktop or whatever. 7. There is more info in the first post of this thread. 8. Good luck!
Let me know how you get on Smile
Link to comment
Share on other sites

Bil said Thanks for the scripts bd000, everything worked as you explained. Only thing I found was that I had to edit the "SET library" path in _TEMPLATE_.bat and _back_button.bat
Excellent find, thank you. Smile I have updated the scripts to fix this issue.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...