Making a love EXE download a DLL and then use it without restarting?

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
Guard13007
Party member
Posts: 132
Joined: Sat Oct 25, 2014 3:42 am
Location: Internet, USA
Contact:

Making a love EXE download a DLL and then use it without restarting?

Post by Guard13007 »

I will be doing some testing later anyhow, but I figured I'd ask real quick in case someone else has tried it.

Is it possible to download a DLL file to the same directory as a fused Love game and then use it without restarting the game? I would imagine so, but I don't know the internals of such things. :/
User avatar
ReFreezed
Party member
Posts: 612
Joined: Sun Oct 25, 2015 11:32 pm
Location: Sweden
Contact:

Re: Making a love EXE download a DLL and then use it without restarting?

Post by ReFreezed »

Additional DLLs, just like Lua files, aren't loaded until you require() them so I'd imagine you can do that, though you're probably gonna run into problems in the OS at some point if your program tries to modify its install folder. That's what the save directory is for. (See info in love.filesystem.isFused)
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
User avatar
Guard13007
Party member
Posts: 132
Joined: Sat Oct 25, 2014 3:42 am
Location: Internet, USA
Contact:

Re: Making a love EXE download a DLL and then use it without restarting?

Post by Guard13007 »

That's a good point I didn't consider, I will make sure I use the save directory if attempting to download next to the exe does not work.

My main concern with it not working is if I attempt to require it first, then download it, I hope there isn't some cache that would interfere saying nah I already know that doesn't exist.
User avatar
ReFreezed
Party member
Posts: 612
Joined: Sun Oct 25, 2015 11:32 pm
Location: Sweden
Contact:

Re: Making a love EXE download a DLL and then use it without restarting?

Post by ReFreezed »

Well, the cache is package.loaded. :) If a module isn't there then require() tries to load it. That's also how you reload modules - by removing them from package.loaded and requiring them again. Not sure if reloading works flawlessly with DLL files. I've never tried that.
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 147 guests