Page 1 of 1

Simple vbscript-and-folder trick to package Love

Posted: Wed Apr 27, 2022 8:22 am
by RawinputWizard
You can run a Love app by simply dragging a folder onto love.exe, no need to make an archive.

https://i.imgur.com/OsmYnbP.mp4

Since the exe only needs path to directory, you can simply use vbscript to launch a relative path, and package the game into a loose directory like so:

https://love2d.org/imgmirrur/ZSDUctx.html

This makes any sort of modding or dynamic asset addition much easier to do since you don't need to re-archive all the game files.

Then, if your game is distributed through Steam, you can simply make the Steam shortcut point to launching the vbscript file directly to abstract it all away from the player.

I've attached a sample package here to showcase the simple directory structure using a modded version of Hydrogen Maniac's amazing Lead Haul game
LeadHaulModded.7z
(65.74 MiB) Downloaded 113 times

Re: Simple vbscript-and-folder trick to package Love

Posted: Wed Apr 27, 2022 9:42 am
by ReFreezed
This is silly.

You never had to re-archive a LÖVE game to apply a mod to it. Since LÖVE tries to load files from the save folder before the .love/.exe file (by default) users just have to put the modded files there (with no risk of accidentally breaking the original game files). You're just adding a dependency to VBScript (which is Windows only) and spreading out the game files.

Regarding Steam, if you still decide to separate the files like this, you can just point Steam at love.exe and set the correct arguments in Steamworks directly. No need to use VBScript in-between.

Not to mention that the game will show up as "love.exe" in the task manager etc. which is just confusing.

Re: Simple vbscript-and-folder trick to package Love

Posted: Wed Apr 27, 2022 12:54 pm
by darkfrei
ReFreezed wrote: Wed Apr 27, 2022 9:42 am Regarding Steam, if you still decide to separate the files like this, you can just point Steam at love.exe and set the correct arguments in Steamworks directly. No need to use VBScript in-between.

Not to mention that the game will show up as "love.exe" in the task manager etc. which is just confusing.
Is it possible to open the love.exe with argument for other name as love?

Re: Simple vbscript-and-folder trick to package Love

Posted: Thu Apr 28, 2022 12:28 pm
by ReFreezed
darkfrei wrote: Wed Apr 27, 2022 12:54 pm Is it possible to open the love.exe with argument for other name as love?
I don't know what you mean.

Re: Simple vbscript-and-folder trick to package Love

Posted: Thu Apr 28, 2022 1:14 pm
by MrFariator
darkfrei wrote: Wed Apr 27, 2022 12:54 pm Is it possible to open the love.exe with argument for other name as love?
Rename the love.exe? Of course, ideally you should just fuse your game for distribution, and maybe use something like ResourceHacker to modify the executable data, like application icon.