Page 2 of 2

Re: Love2D I/O to any directory?

Posted: Sun Jul 24, 2016 9:30 am
by Skeletonxf
Wouldn't you need different binaries again for Android and iOS?

Re: Love2D I/O to any directory?

Posted: Sun Jul 24, 2016 7:17 pm
by bobbyjones
Yeah. Idk if luafilesystem works on those platforms.

But it doesn't matter to the OP. He is making a desktop application presumably.

Re: Love2D I/O to any directory?

Posted: Mon Jul 25, 2016 11:41 pm
by Positive07
Fused games can load dlls from the Save folder (applies to all platforms)

Also I must point out this library which may fit better what you need. I'm pointing to my pull-request since there are instructions for building on Windows, you could also build it for Linux using GTK file dialogs or in MacOS X where you would get native Cocoa file dialogs, you just need to compile, package the library with your game and require "nfs" which provides three functions, each returns a path to the file selected:

Code: Select all

local nfs = require "nfs"

--Open a file from the image folder, filters them out by image extensions
local path = nfs.open("png;jpg,jpeg;bmp", "C:\Users\user\Images") 
print(path)

--There is also nfs.openMany(filter, path) which lets the user pick multiple files and returns a table with all the files paths

--And there is also nfs.save(filter, path) which works the same way as nfs.open
All functions are blocking, if you don't want to block the game run them from a thread