Def-Diags - Cross platform desktop open and save dialogs

Simple cross-platform (OSX, Windows, Linux) native open and save dialogs for Defold.

(Uses the awesome minimal lib: https://github.com/mlabbe/nativefiledialog)

Usage

-- Open file dialog
print("diags.open:", diags.open())

-- Save file dialog
print("diags.save:", diags.save())

-- Open multiple files
local r, t = diags.open_multiple()
print("diags.open_multiple:", r)
pprint(t)

-- Open folder
print("diags.open_folder:", diags.open_folder())

Example:

12 Likes

@sven I tried to use this today but I just got a pile of build errors (on windows).

1 Like

Haven’t had time to try it on Windows, will try to give it a look today!

1 Like

Fixed so it works on Windows now, but currently only possible on Defold alpha (and Editor 2.0) since I had to do a fix in the SDK as well. :slight_smile:

2 Likes

Ahh, so awesome! Thanks a lot!

3 Likes

strange bug appear when i try to build Windows version of my app with Def-diags (i have no this bug few weeks ago in this project)

Hmm, do you see anything else in the compile log? E.g. a line with “error:” in it?

unfortunately I can’t copy log (editor2 issue)
do you know path to the log?

Unfortunately no, but hopefully @Erik_Angelin, @Ragnar_Dahlen or @mats.gisselson could help with this?

1 Like


this error?

Ah, no. That is only a “warning:”, and we are currently not compiling with"/Wx" (which turns warnings into errors)
Look further down if it says anything like “error:” or perhaps “unresolved” or anything else suspicious.

1 Like

whole log on the screenshot (

Sadly I don’t have access to a Windows machine at the moment, will try to check when I’m back at the office on Wednesday.

hmm, i try to build Windows bundle on mac (i didn’t have problem with this before)

1 Like

I tried on OSX as well, got a compile error there too, but I get even less info than you did. I will look at this tomorrow.

5 Likes

It was an issue with build server. Now all works fine, thanks!

4 Likes

@sven Does Def-Diags need to be updated to work on Linux? I’d like to get the latest version of my polygon editor working cross-platform. At the moment it doesn’t bundle for Linux, but I’m not 100% sure if that’s because of the extension, or because Editor 2 doesn’t support that yet?

Thanks!

Almost 100% sure that the extension has no Linux support yet.

2 Likes

I haven’t had time to look into Linux yet, but it should probably not be a big issue since the underlaying library I use has Linux support.

3 Likes