Jump to content
LaunchBox Community Forums

Can I zip a pc game and have LaunchBox unzip it and run it.


Recommended Posts

no and yes. there is no native support for what you're asking about, LaunchBox cannot unpack the compressed directory. but scripting would get it done. 7-zip can be controlled via command line so it would be possible to use AHK, batch file, or other script equivalent to automate this. First unpacking the compressed file/folder with 7-zip, then run the game from the location you unpacked it too, then at game exit, you could have the uncompressed files/folders deleted so used disk space doesn't increase.

Link to comment
Share on other sites

  • 1 month later...
23 hours ago, NIGHTKILLER05 said:

Hi! I want to have my MUGEN and OPENBOR games zipped too, would you please post an example to follow of that script to unzip the games?

Here is a working example doing what I describe in my previous post

RunWait, 7z.exe x "E:\PC Games\Commandos\Commandos - Behind Enemy Lines.7z" -o"E:\PC Games\Commandos\Temp", C:\Program Files\7-Zip, Hide
Run, commandos.exe, E:\PC Games\Commandos\Temp\Commandos - Behind Enemy Lines
WinWait, ahk_exe commandos.exe
WinWaitClose, ahk_exe commandos.exe
FileRemoveDir, E:\PC Games\Commandos\Temp, 1

 

  • Thanks 1
Link to comment
Share on other sites

On 8/6/2024 at 2:00 PM, Suhrvivor said:

Is it really worth the saved space if you have to wait much longer for the game to start? I rather have Launchbox be fast and slim than slow and cluttered.

I don't actually employ this tactic. I just knew it was possible, so provided the answer.

In my opinion this only makes sense for a DRM free game, which likely means something old, or maybe a more modern game from GOG could fit the bill. I provided an example using a game from 1998. It's a few GB's in size (maybe less! cannot recall off the top of my head) and would take less time than the frontend's startup screen to unpack it! Meaning, if this method were used optimally a user would have no idea this is how things are being handled under the hood. The amount of space being saved is likely not going to matter much unless you have quite a collection of games that fit this niche use case.

Slower is factually correct because even if it's only 1.5 secs long to unpack it, that is longer than not unpacking it. I could not make any argument that it is not slower, but most use cases the extra time will not be meaningful. It would be silly to use this for some monster 100GB+ game for ex. Making clutter though.....meh.....that's a stretch. Consider LB does this with emulators that need ROM files unpacked, and also creates temp AHK files anytime a script is ran that was inputted to a field in LB (like the "Running Script" field). I wouldn't consider that clutter. Users aren't going to care if something is created/deleted for temp use, you gotta go outta your way to find these things. Though LB does this for more operational/functional reasons rather than saving disk space

Link to comment
Share on other sites

  • 2 weeks later...
On 8/4/2024 at 6:52 PM, skizzosjt said:

Here is a working example doing what I describe in my previous post

RunWait, 7z.exe x "E:\PC Games\Commandos\Commandos - Behind Enemy Lines.7z" -o"E:\PC Games\Commandos\Temp", C:\Program Files\7-Zip, Hide
Run, commandos.exe, E:\PC Games\Commandos\Temp\Commandos - Behind Enemy Lines
WinWait, ahk_exe commandos.exe
WinWaitClose, ahk_exe commandos.exe
FileRemoveDir, E:\PC Games\Commandos\Temp, 1

 

Thank you !!!

Link to comment
Share on other sites

On 8/6/2024 at 1:00 PM, Suhrvivor said:

Is it really worth the saved space if you have to wait much longer for the game to start? I rather have Launchbox be fast and slim than slow and cluttered.

I think the real question is "is it helpful posting in the troubleshooting category for a non-constructive reason?" and the answer is no.

@skizzosjt Thanks for the example script, I've recently been going through my collection of fangames and opensource ports and such and this will greatly come in handy!

  • Game On 1
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...