Downloading Love.app Problems

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
OmarShehata
Party member
Posts: 259
Joined: Tue May 29, 2012 6:46 pm
Location: Egypt
Contact:

Downloading Love.app Problems

Post by OmarShehata »

The Setup

The launcher of my game is a fused love.app+launcher.love file, which when opened, downloads the game files to the save directory of the launcher. It also downloads a love.app inside there so that the launcher can run the command:

Code: Select all

os.execute("cd '" .. love.filesystem.getSaveDirectory() .. "' && open -n -a love 'Game'")
And opens the game.

The whole idea is for the launcher and the game to work without the user having to download Love manually. (The purpose of the launcher is to automatically download updates and such)

The Problem

The launcher can't successfully download Love.app (I'm guessing because it includes these aliases inside its folder structure, so it downloads all the files but doesn't work)

I wouldn't need to download Love.app again in the save directory if I can somehow use the fused love.app to open the game in the save directory instead of opening the launcher.love inside of it (but I'm not sure how to do that)

My Attempt

I thought the most guarenteed way to download the Love.app correctly would be to download it as a zip, but then, Love can't really unzip files, can it? (I know about the unmount but would that work?)

So either that or figuring out how to use the fused love.app to open another file instead of the .love inside it

Thanks!
User avatar
mickeyjm
Party member
Posts: 237
Joined: Thu Dec 29, 2011 11:41 am

Re: Downloading Love.app Problems

Post by mickeyjm »

I think an easier method than downloading the love.app and the game files then relaunching the game would probably be to just download the game files in a zip then mount them with

Code: Select all

love.filesystem.mount("NAME_OF_ZIP","SOME_DIR")
then requiring "SOME_DIR.main". You may have to modify require to look in SOME_DIR automatically however to prevent all of the other requires from breaking. Something like this should work:

Code: Select all

local req = require
function require(path)
    return req("SOME_DIR."..path)
end
Your screen is very zoomed in...
User avatar
OmarShehata
Party member
Posts: 259
Joined: Tue May 29, 2012 6:46 pm
Location: Egypt
Contact:

Re: Downloading Love.app Problems

Post by OmarShehata »

The reason I download the game files individually, and not in a zip is mainly because:

-To be able to update single files instead of the whole package (so if only a couple of code files changes, it would only take a few seconds to get the new updates)

-To easily be able to access things like: startup.ini, the Levels directory, the Mods directory and so on, without having to zip/unzip
jjmafiae
Party member
Posts: 1331
Joined: Tue Jul 24, 2012 8:22 am

Re: Downloading Love.app Problems

Post by jjmafiae »

Just tried it with my launcher and the conclusion is: It doesn't work.
Post Reply

Who is online

Users browsing this forum: No registered users and 213 guests