How to make Portable Version?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
darkfrei
Party member
Posts: 1181
Joined: Sat Feb 08, 2020 11:09 pm

How to make Portable Version?

Post by darkfrei »

Hi all!

Is it possible to make a portable game, like C:/games/myGame/ with C:/games/myGame/saves/ so all saved data are in the folder near of fused .exe file?
:awesome: in Lua we Löve
:awesome: Platformer Guide
:awesome: freebies
User avatar
milon
Party member
Posts: 472
Joined: Thu Jan 18, 2018 9:14 pm

Re: How to make Portable Version?

Post by milon »

In the case of a fused game, you can use love.filesystem.getSourceBaseDirectory. Get the path, mount it, and access a subfolder or zip file you've probably called "saves".

I believe the next major release of Love will let you mount the whole filesystem, so you could mount that path for non-fused games too, I think.
Any code samples/ideas by me should be considered Public Domain (no attribution needed) license unless otherwise stated.
User avatar
togFox
Party member
Posts: 779
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Re: How to make Portable Version?

Post by togFox »

I've been doing this for years using nativefs library. You looking for a way that doesn't work around Love?
Current project:
https://togfox.itch.io/backyard-gridiron-manager
American football manager/sim game - build and manage a roster and win season after season
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 63 guests