Просмотр исходного кода

tools-imgui: use nativefiledialog

Daniele Bartolini 8 лет назад
Родитель
Сommit
61692dd171
56 измененных файлов с 8195 добавлено и 0 удалено
  1. 181 0
      3rdparty/nativefiledialog/.gitignore
  2. 16 0
      3rdparty/nativefiledialog/LICENSE
  3. 152 0
      3rdparty/nativefiledialog/README.md
  4. 1 0
      3rdparty/nativefiledialog/build/dont_run_premake.txt
  5. 103 0
      3rdparty/nativefiledialog/build/gmake_linux/Makefile
  6. 191 0
      3rdparty/nativefiledialog/build/gmake_linux/nfd.make
  7. 187 0
      3rdparty/nativefiledialog/build/gmake_linux/test_opendialog.make
  8. 187 0
      3rdparty/nativefiledialog/build/gmake_linux/test_opendialogmultiple.make
  9. 187 0
      3rdparty/nativefiledialog/build/gmake_linux/test_pickfolder.make
  10. 187 0
      3rdparty/nativefiledialog/build/gmake_linux/test_savedialog.make
  11. 103 0
      3rdparty/nativefiledialog/build/gmake_macosx/Makefile
  12. 191 0
      3rdparty/nativefiledialog/build/gmake_macosx/nfd.make
  13. 187 0
      3rdparty/nativefiledialog/build/gmake_macosx/test_opendialog.make
  14. 187 0
      3rdparty/nativefiledialog/build/gmake_macosx/test_opendialogmultiple.make
  15. 187 0
      3rdparty/nativefiledialog/build/gmake_macosx/test_pickfolder.make
  16. 187 0
      3rdparty/nativefiledialog/build/gmake_macosx/test_savedialog.make
  17. 103 0
      3rdparty/nativefiledialog/build/gmake_windows/Makefile
  18. 191 0
      3rdparty/nativefiledialog/build/gmake_windows/nfd.make
  19. 187 0
      3rdparty/nativefiledialog/build/gmake_windows/test_opendialog.make
  20. 187 0
      3rdparty/nativefiledialog/build/gmake_windows/test_opendialogmultiple.make
  21. 187 0
      3rdparty/nativefiledialog/build/gmake_windows/test_pickfolder.make
  22. 187 0
      3rdparty/nativefiledialog/build/gmake_windows/test_savedialog.make
  23. 213 0
      3rdparty/nativefiledialog/build/premake5.lua
  24. 78 0
      3rdparty/nativefiledialog/build/vs2010/NativeFileDialog.sln
  25. 165 0
      3rdparty/nativefiledialog/build/vs2010/nfd.vcxproj
  26. 19 0
      3rdparty/nativefiledialog/build/vs2010/nfd.vcxproj.filters
  27. 188 0
      3rdparty/nativefiledialog/build/vs2010/test_opendialog.vcxproj
  28. 188 0
      3rdparty/nativefiledialog/build/vs2010/test_opendialogmultiple.vcxproj
  29. 188 0
      3rdparty/nativefiledialog/build/vs2010/test_pickfolder.vcxproj
  30. 188 0
      3rdparty/nativefiledialog/build/vs2010/test_savedialog.vcxproj
  31. 19 0
      3rdparty/nativefiledialog/build/xcode4/NativeFileDialog.xcworkspace/contents.xcworkspacedata
  32. 231 0
      3rdparty/nativefiledialog/build/xcode4/nfd.xcodeproj/project.pbxproj
  33. 295 0
      3rdparty/nativefiledialog/build/xcode4/test_opendialog.xcodeproj/project.pbxproj
  34. 295 0
      3rdparty/nativefiledialog/build/xcode4/test_opendialogmultiple.xcodeproj/project.pbxproj
  35. 295 0
      3rdparty/nativefiledialog/build/xcode4/test_pickfolder.xcodeproj/project.pbxproj
  36. 295 0
      3rdparty/nativefiledialog/build/xcode4/test_savedialog.xcodeproj/project.pbxproj
  37. 31 0
      3rdparty/nativefiledialog/docs/build.md
  38. 25 0
      3rdparty/nativefiledialog/docs/submitting_pull_requests.md
  39. BIN
      3rdparty/nativefiledialog/screens/open_cocoa.png
  40. BIN
      3rdparty/nativefiledialog/screens/open_gtk3.png
  41. BIN
      3rdparty/nativefiledialog/screens/open_win8.png
  42. 102 0
      3rdparty/nativefiledialog/src/SConstruct
  43. 21 0
      3rdparty/nativefiledialog/src/common.h
  44. 74 0
      3rdparty/nativefiledialog/src/include/nfd.h
  45. 276 0
      3rdparty/nativefiledialog/src/nfd_cocoa.m
  46. 142 0
      3rdparty/nativefiledialog/src/nfd_common.c
  47. 37 0
      3rdparty/nativefiledialog/src/nfd_common.h
  48. 379 0
      3rdparty/nativefiledialog/src/nfd_gtk.c
  49. 753 0
      3rdparty/nativefiledialog/src/nfd_win.cpp
  50. 74 0
      3rdparty/nativefiledialog/test/SConstruct
  51. 29 0
      3rdparty/nativefiledialog/test/test_opendialog.c
  52. 34 0
      3rdparty/nativefiledialog/test/test_opendialogmultiple.c
  53. 29 0
      3rdparty/nativefiledialog/test/test_pickfolder.c
  54. 28 0
      3rdparty/nativefiledialog/test/test_savedialog.c
  55. 11 0
      scripts/level-editor-imgui.lua
  56. 17 0
      tools-imgui/level_editor.cpp

+ 181 - 0
3rdparty/nativefiledialog/.gitignore

@@ -0,0 +1,181 @@
+.sconsign.dblite
+# Object files
+*.o
+*.ko
+*.obj
+*.elf
+# Precompiled Headers
+*.gch
+*.pch
+# Libraries
+*.lib
+*.a
+*.la
+*.lo
+# Shared objects (inc. Windows DLLs)
+*.dll
+*.so
+*.so.*
+*.dylib
+# Executables
+*.exe
+*.out
+*.app
+*.i*86
+*.x86_64
+*.hex
+
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+# User-specific files
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+# User-specific folders
+*.sln.ide/
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+bld/
+[Bb]in/
+[Oo]bj/
+# Roslyn cache directories
+*.ide/
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+#NUNIT
+*.VisualState.xml
+TestResult.xml
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+*_i.c
+*_p.c
+*_i.h
+*.ilk
+*.meta
+*.obj
+*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+# Chutzpah Test files
+_Chutzpah*
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opensdf
+*.sdf
+*.cachefile
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+# TFS 2012 Local Workspace
+$tf/
+# Guidance Automation Toolkit
+*.gpState
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+# JustCode is a .NET coding addin-in
+.JustCode
+# TeamCity is a build add-in
+_TeamCity*
+# DotCover is a Code Coverage Tool
+*.dotCover
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+# Web workbench (sass)
+.sass-cache/
+# Installshield output folder
+[Ee]xpress/
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+# Click-Once directory
+publish/
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# TODO: Comment the next line if you want to checkin your web deploy settings
+# but database connection strings (with potential passwords) will be unencrypted
+*.pubxml
+*.publishproj
+# NuGet Packages
+*.nupkg
+# The packages folder can be ignored because of Package Restore
+**/packages/*
+# except build/, which is used as an MSBuild target.
+!**/packages/build/
+# If using the old MSBuild-Integrated Package Restore, uncomment this:
+#!**/packages/repositories.config
+# Windows Azure Build Output
+csx/
+*.build.csdef
+# Windows Store app package directory
+AppPackages/
+# Others
+sql/
+*.Cache
+ClientBin/
+[Ss]tyle[Cc]op.*
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.pfx
+*.publishsettings
+node_modules/
+bower_components/
+# RIA/Silverlight projects
+Generated_Code/
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+# SQL Server files
+*.mdf
+*.ldf
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+# Microsoft Fakes
+FakesAssemblies/

+ 16 - 0
3rdparty/nativefiledialog/LICENSE

@@ -0,0 +1,16 @@
+This software is provided 'as-is', without any express or implied
+warranty.  In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+   claim that you wrote the original software. If you use this software
+   in a product, an acknowledgment in the product documentation would be
+   appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be
+   misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+

+ 152 - 0
3rdparty/nativefiledialog/README.md

@@ -0,0 +1,152 @@
+# Native File Dialog #
+
+A tiny, neat C library that portably invokes native file open, folder select and save dialogs.  Write dialog code once and have it pop up native dialogs on all supported platforms.  Avoid linking large dependencies like wxWidgets and qt.
+
+Features:
+
+ - Lean C API, static library -- no ObjC, no C++, no STL.
+ - Zlib licensed.
+ - Consistent UTF-8 support on all platforms.
+ - Simple universal file filter syntax.
+ - Paid support available.
+ - Multiple file selection support.
+ - 64-bit and 32-bit friendly.
+ - GCC, Clang, Xcode, Mingw and Visual Studio supported.
+ - No third party dependencies for building or linking.
+ - Support for Vista's modern `IFileDialog` on Windows.
+ - Support for non-deprecated Cocoa APIs on OS X.
+ - GTK+3 dialog on Linux.
+ - Tested, works alongside [http://www.libsdl.org](SDL2) on all platforms, for the game developers out there.
+
+# Example Usage #
+
+```C
+#include <nfd.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int main( void )
+{
+    nfdchar_t *outPath = NULL;
+    nfdresult_t result = NFD_OpenDialog( NULL, NULL, &outPath );
+        
+    if ( result == NFD_OKAY ) {
+        puts("Success!");
+        puts(outPath);
+        free(outPath);
+    }
+    else if ( result == NFD_CANCEL ) {
+        puts("User pressed cancel.");
+    }
+    else {
+        printf("Error: %s\n", NFD_GetError() );
+    }
+
+    return 0;
+}
+```
+
+See [NFD.h](src/include/nfd.h) for more options.
+
+# Screenshots #
+
+![Windows 8 rendering an IFileOpenDialog](screens/open_win8.png?raw=true)
+![GTK3 on Linux](screens/open_gtk3.png?raw=true)
+![Cocoa on Yosemite](screens/open_cocoa.png?raw=true)
+
+## Changelog ##
+
+The current version is 1.1.1
+
+release | what's new                  | date
+--------|-----------------------------|---------
+1.0.0   | initial                     | oct 2014
+1.1.0   | premake5; scons deprecated  | aug 2016
+1.1.1   | mingw support, build fixes  | aug 2016
+1.1.2   | test_pickfolder() added     | aug 2016
+
+## Building ##
+
+NFD uses [Premake5](https://premake.github.io/download.html) generated Makefiles and IDE project files.  The generated project files are checked in under `build/` so you don't have to download and use Premake in most cases.
+
+If you need to run Premake5 directly, further [build documentation](docs/build.md) is available.
+
+Previously, NFD used SCons to build.  It still works, but is now deprecated; updates to it are discouraged.  Opt to use the native build system where possible.
+
+`nfd.a` will be built for release builds, and `nfd_d.a` will be built for debug builds.
+
+### Makefiles ###
+
+The makefile offers four options, with `release_x64` as the default.
+
+    make config=release_x86
+    make config=release_x64
+    make config=debug_x86
+    make config=debug_x64
+
+### Compiling Your Programs ###
+
+ 1. Add `src/include` to your include search path.
+ 2. Add `nfd.lib` or `nfd_d.lib` to the list of list of static libraries to link against (for release or debug, respectively).
+ 3. Add `build/<debug|release>/<arch>` to the library search path.
+
+On Linux, you must compile and link against GTK+.  Recommend use of `pkg-config --cflags --libs gtk+-3.0`.
+
+On Mac OS X, add `AppKit` to the list of frameworks.
+
+On Windows, ensure you are building against `comctl32.lib`.
+
+## Usage ##
+
+See `NFD.h` for API calls.  See `tests/*.c` for example code.
+
+After compiling, `build/bin` contains compiled test programs.
+
+## File Filter Syntax ##
+
+There is a form of file filtering in every file dialog API, but no consistent means of supporting it.  NFD provides support for filtering files by groups of extensions, providing its own descriptions (where applicable) for the extensions.
+
+A wildcard filter is always added to every dialog.
+
+### Separators ###
+
+ - `;` Begin a new filter.
+ - `,` Add a separate type to the filter.
+
+#### Examples ####
+
+`txt` The default filter is for text files.  There is a wildcard option in a dropdown.
+
+`png,jpg;psd` The default filter is for png and jpg files.  A second filter is available for psd files.  There is a wildcard option in a dropdown.
+
+`NULL` Wildcard only.
+
+## Iterating Over PathSets ##
+
+See [test_opendialogmultiple.c](test/test_opendialogmultiple.c).
+
+# Known Limitations #
+
+I accept quality code patches, or will resolve these and other matters through support.  See [submitting pull requests](docs/submitting_pull_requests.md) for details.
+
+ - No support for Windows XP's legacy dialogs such as `GetOpenFileName`.
+ - No support for file filter names -- ex: "Image Files" (*.png, *.jpg).  Nameless filters are supported, however.
+ - On Linux, GTK+ cannot be uninitialized to save memory.  Launching a file dialog costs memory.  I am open to accepting an alternative `nfd_zenity.c` implementation which uses Zenity and pipes.
+
+# Copyright and Credit #
+
+Copyright &copy; 2014-2016 [Frogtoss Games](http://www.frogtoss.com), Inc.
+File [LICENSE](LICENSE) covers all files in this repo.
+
+Native File Dialog by Michael Labbe
+<[email protected]>
+
+Tomasz Konojacki for [microutf8](http://puszcza.gnu.org.ua/software/microutf8/)
+
+[Denis Kolodin](https://github.com/DenisKolodin) for mingw support.
+
+## Support ##
+
+Directed support for this work is available from the original author under a paid agreement.
+
+[Contact Frogtoss Games](http://www.frogtoss.com/pages/contact.html).

+ 1 - 0
3rdparty/nativefiledialog/build/dont_run_premake.txt

@@ -0,0 +1 @@
+Premake-generated build systems are already checked in, in build subdirectories.  Use one of them before attempting to run premake.  See docs/build.md for more.

+ 103 - 0
3rdparty/nativefiledialog/build/gmake_linux/Makefile

@@ -0,0 +1,103 @@
+# GNU Make workspace makefile autogenerated by Premake
+
+.NOTPARALLEL:
+
+ifndef config
+  config=release_x64
+endif
+
+ifndef verbose
+  SILENT = @
+endif
+
+ifeq ($(config),release_x64)
+  nfd_config = release_x64
+  test_pickfolder_config = release_x64
+  test_opendialog_config = release_x64
+  test_opendialogmultiple_config = release_x64
+  test_savedialog_config = release_x64
+endif
+ifeq ($(config),release_x86)
+  nfd_config = release_x86
+  test_pickfolder_config = release_x86
+  test_opendialog_config = release_x86
+  test_opendialogmultiple_config = release_x86
+  test_savedialog_config = release_x86
+endif
+ifeq ($(config),debug_x64)
+  nfd_config = debug_x64
+  test_pickfolder_config = debug_x64
+  test_opendialog_config = debug_x64
+  test_opendialogmultiple_config = debug_x64
+  test_savedialog_config = debug_x64
+endif
+ifeq ($(config),debug_x86)
+  nfd_config = debug_x86
+  test_pickfolder_config = debug_x86
+  test_opendialog_config = debug_x86
+  test_opendialogmultiple_config = debug_x86
+  test_savedialog_config = debug_x86
+endif
+
+PROJECTS := nfd test_pickfolder test_opendialog test_opendialogmultiple test_savedialog
+
+.PHONY: all clean help $(PROJECTS) 
+
+all: $(PROJECTS)
+
+nfd:
+ifneq (,$(nfd_config))
+	@echo "==== Building nfd ($(nfd_config)) ===="
+	@${MAKE} --no-print-directory -C . -f nfd.make config=$(nfd_config)
+endif
+
+test_pickfolder: nfd
+ifneq (,$(test_pickfolder_config))
+	@echo "==== Building test_pickfolder ($(test_pickfolder_config)) ===="
+	@${MAKE} --no-print-directory -C . -f test_pickfolder.make config=$(test_pickfolder_config)
+endif
+
+test_opendialog: nfd
+ifneq (,$(test_opendialog_config))
+	@echo "==== Building test_opendialog ($(test_opendialog_config)) ===="
+	@${MAKE} --no-print-directory -C . -f test_opendialog.make config=$(test_opendialog_config)
+endif
+
+test_opendialogmultiple: nfd
+ifneq (,$(test_opendialogmultiple_config))
+	@echo "==== Building test_opendialogmultiple ($(test_opendialogmultiple_config)) ===="
+	@${MAKE} --no-print-directory -C . -f test_opendialogmultiple.make config=$(test_opendialogmultiple_config)
+endif
+
+test_savedialog: nfd
+ifneq (,$(test_savedialog_config))
+	@echo "==== Building test_savedialog ($(test_savedialog_config)) ===="
+	@${MAKE} --no-print-directory -C . -f test_savedialog.make config=$(test_savedialog_config)
+endif
+
+clean:
+	@${MAKE} --no-print-directory -C . -f nfd.make clean
+	@${MAKE} --no-print-directory -C . -f test_pickfolder.make clean
+	@${MAKE} --no-print-directory -C . -f test_opendialog.make clean
+	@${MAKE} --no-print-directory -C . -f test_opendialogmultiple.make clean
+	@${MAKE} --no-print-directory -C . -f test_savedialog.make clean
+
+help:
+	@echo "Usage: make [config=name] [target]"
+	@echo ""
+	@echo "CONFIGURATIONS:"
+	@echo "  release_x64"
+	@echo "  release_x86"
+	@echo "  debug_x64"
+	@echo "  debug_x86"
+	@echo ""
+	@echo "TARGETS:"
+	@echo "   all (default)"
+	@echo "   clean"
+	@echo "   nfd"
+	@echo "   test_pickfolder"
+	@echo "   test_opendialog"
+	@echo "   test_opendialogmultiple"
+	@echo "   test_savedialog"
+	@echo ""
+	@echo "For more information, see http://industriousone.com/premake/quick-start"

+ 191 - 0
3rdparty/nativefiledialog/build/gmake_linux/nfd.make

@@ -0,0 +1,191 @@
+# GNU Make project makefile autogenerated by Premake
+
+ifndef config
+  config=release_x64
+endif
+
+ifndef verbose
+  SILENT = @
+endif
+
+.PHONY: clean prebuild prelink
+
+ifeq ($(config),release_x64)
+  RESCOMP = windres
+  TARGETDIR = ../lib/Release/x64
+  TARGET = $(TARGETDIR)/libnfd.a
+  OBJDIR = ../obj/x64/Release/nfd
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -O2 -fno-exceptions `pkg-config --cflags gtk+-3.0`
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS +=
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -m64 -s
+  LINKCMD = $(AR) -rcs "$@" $(OBJECTS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),release_x86)
+  RESCOMP = windres
+  TARGETDIR = ../lib/Release/x86
+  TARGET = $(TARGETDIR)/libnfd.a
+  OBJDIR = ../obj/x86/Release/nfd
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -O2 -fno-exceptions `pkg-config --cflags gtk+-3.0`
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS +=
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -m32 -s
+  LINKCMD = $(AR) -rcs "$@" $(OBJECTS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x64)
+  RESCOMP = windres
+  TARGETDIR = ../lib/Debug/x64
+  TARGET = $(TARGETDIR)/libnfd_d.a
+  OBJDIR = ../obj/x64/Debug/nfd
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -g -fno-exceptions `pkg-config --cflags gtk+-3.0`
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS +=
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -m64
+  LINKCMD = $(AR) -rcs "$@" $(OBJECTS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x86)
+  RESCOMP = windres
+  TARGETDIR = ../lib/Debug/x86
+  TARGET = $(TARGETDIR)/libnfd_d.a
+  OBJDIR = ../obj/x86/Debug/nfd
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -g -fno-exceptions `pkg-config --cflags gtk+-3.0`
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS +=
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -m32
+  LINKCMD = $(AR) -rcs "$@" $(OBJECTS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+OBJECTS := \
+	$(OBJDIR)/nfd_common.o \
+	$(OBJDIR)/nfd_gtk.o \
+
+RESOURCES := \
+
+CUSTOMFILES := \
+
+SHELLTYPE := msdos
+ifeq (,$(ComSpec)$(COMSPEC))
+  SHELLTYPE := posix
+endif
+ifeq (/bin,$(findstring /bin,$(SHELL)))
+  SHELLTYPE := posix
+endif
+
+$(TARGET): $(GCH) ${CUSTOMFILES} $(OBJECTS) $(LDDEPS) $(RESOURCES)
+	@echo Linking nfd
+	$(SILENT) $(LINKCMD)
+	$(POSTBUILDCMDS)
+
+$(TARGETDIR):
+	@echo Creating $(TARGETDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(TARGETDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(TARGETDIR))
+endif
+
+$(OBJDIR):
+	@echo Creating $(OBJDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(OBJDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(OBJDIR))
+endif
+
+clean:
+	@echo Cleaning nfd
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) rm -f  $(TARGET)
+	$(SILENT) rm -rf $(OBJDIR)
+else
+	$(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET))
+	$(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR))
+endif
+
+prebuild:
+	$(PREBUILDCMDS)
+
+prelink:
+	$(PRELINKCMDS)
+
+ifneq (,$(PCH))
+$(OBJECTS): $(GCH) $(PCH)
+$(GCH): $(PCH)
+	@echo $(notdir $<)
+	$(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
+endif
+
+$(OBJDIR)/nfd_common.o: ../../src/nfd_common.c
+	@echo $(notdir $<)
+	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
+$(OBJDIR)/nfd_gtk.o: ../../src/nfd_gtk.c
+	@echo $(notdir $<)
+	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
+
+-include $(OBJECTS:%.o=%.d)
+ifneq (,$(PCH))
+  -include $(OBJDIR)/$(notdir $(PCH)).d
+endif

+ 187 - 0
3rdparty/nativefiledialog/build/gmake_linux/test_opendialog.make

@@ -0,0 +1,187 @@
+# GNU Make project makefile autogenerated by Premake
+
+ifndef config
+  config=release_x64
+endif
+
+ifndef verbose
+  SILENT = @
+endif
+
+.PHONY: clean prebuild prelink
+
+ifeq ($(config),release_x64)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_opendialog
+  OBJDIR = ../obj/x64/Release/test_opendialog
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -O2
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += ../lib/Release/x64/libnfd.a
+  LDDEPS += ../lib/Release/x64/libnfd.a
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../lib/Release/x64 -m64 -s -lnfd `pkg-config --libs gtk+-3.0`
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),release_x86)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_opendialog
+  OBJDIR = ../obj/x86/Release/test_opendialog
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -O2
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += ../lib/Release/x86/libnfd.a
+  LDDEPS += ../lib/Release/x86/libnfd.a
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../lib/Release/x86 -m32 -s -lnfd `pkg-config --libs gtk+-3.0`
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x64)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_opendialog_d
+  OBJDIR = ../obj/x64/Debug/test_opendialog
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -g
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += -lnfd_d
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../lib/Debug/x64 -m64 -lnfd_d `pkg-config --libs gtk+-3.0`
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x86)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_opendialog_d
+  OBJDIR = ../obj/x86/Debug/test_opendialog
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -g
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += -lnfd_d
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../lib/Debug/x86 -m32 -lnfd_d `pkg-config --libs gtk+-3.0`
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+OBJECTS := \
+	$(OBJDIR)/test_opendialog.o \
+
+RESOURCES := \
+
+CUSTOMFILES := \
+
+SHELLTYPE := msdos
+ifeq (,$(ComSpec)$(COMSPEC))
+  SHELLTYPE := posix
+endif
+ifeq (/bin,$(findstring /bin,$(SHELL)))
+  SHELLTYPE := posix
+endif
+
+$(TARGET): $(GCH) ${CUSTOMFILES} $(OBJECTS) $(LDDEPS) $(RESOURCES)
+	@echo Linking test_opendialog
+	$(SILENT) $(LINKCMD)
+	$(POSTBUILDCMDS)
+
+$(TARGETDIR):
+	@echo Creating $(TARGETDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(TARGETDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(TARGETDIR))
+endif
+
+$(OBJDIR):
+	@echo Creating $(OBJDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(OBJDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(OBJDIR))
+endif
+
+clean:
+	@echo Cleaning test_opendialog
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) rm -f  $(TARGET)
+	$(SILENT) rm -rf $(OBJDIR)
+else
+	$(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET))
+	$(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR))
+endif
+
+prebuild:
+	$(PREBUILDCMDS)
+
+prelink:
+	$(PRELINKCMDS)
+
+ifneq (,$(PCH))
+$(OBJECTS): $(GCH) $(PCH)
+$(GCH): $(PCH)
+	@echo $(notdir $<)
+	$(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
+endif
+
+$(OBJDIR)/test_opendialog.o: ../../test/test_opendialog.c
+	@echo $(notdir $<)
+	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
+
+-include $(OBJECTS:%.o=%.d)
+ifneq (,$(PCH))
+  -include $(OBJDIR)/$(notdir $(PCH)).d
+endif

+ 187 - 0
3rdparty/nativefiledialog/build/gmake_linux/test_opendialogmultiple.make

@@ -0,0 +1,187 @@
+# GNU Make project makefile autogenerated by Premake
+
+ifndef config
+  config=release_x64
+endif
+
+ifndef verbose
+  SILENT = @
+endif
+
+.PHONY: clean prebuild prelink
+
+ifeq ($(config),release_x64)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_opendialogmultiple
+  OBJDIR = ../obj/x64/Release/test_opendialogmultiple
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -O2
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += ../lib/Release/x64/libnfd.a
+  LDDEPS += ../lib/Release/x64/libnfd.a
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../lib/Release/x64 -m64 -s -lnfd `pkg-config --libs gtk+-3.0`
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),release_x86)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_opendialogmultiple
+  OBJDIR = ../obj/x86/Release/test_opendialogmultiple
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -O2
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += ../lib/Release/x86/libnfd.a
+  LDDEPS += ../lib/Release/x86/libnfd.a
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../lib/Release/x86 -m32 -s -lnfd `pkg-config --libs gtk+-3.0`
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x64)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_opendialogmultiple_d
+  OBJDIR = ../obj/x64/Debug/test_opendialogmultiple
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -g
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += -lnfd_d
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../lib/Debug/x64 -m64 -lnfd_d `pkg-config --libs gtk+-3.0`
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x86)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_opendialogmultiple_d
+  OBJDIR = ../obj/x86/Debug/test_opendialogmultiple
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -g
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += -lnfd_d
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../lib/Debug/x86 -m32 -lnfd_d `pkg-config --libs gtk+-3.0`
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+OBJECTS := \
+	$(OBJDIR)/test_opendialogmultiple.o \
+
+RESOURCES := \
+
+CUSTOMFILES := \
+
+SHELLTYPE := msdos
+ifeq (,$(ComSpec)$(COMSPEC))
+  SHELLTYPE := posix
+endif
+ifeq (/bin,$(findstring /bin,$(SHELL)))
+  SHELLTYPE := posix
+endif
+
+$(TARGET): $(GCH) ${CUSTOMFILES} $(OBJECTS) $(LDDEPS) $(RESOURCES)
+	@echo Linking test_opendialogmultiple
+	$(SILENT) $(LINKCMD)
+	$(POSTBUILDCMDS)
+
+$(TARGETDIR):
+	@echo Creating $(TARGETDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(TARGETDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(TARGETDIR))
+endif
+
+$(OBJDIR):
+	@echo Creating $(OBJDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(OBJDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(OBJDIR))
+endif
+
+clean:
+	@echo Cleaning test_opendialogmultiple
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) rm -f  $(TARGET)
+	$(SILENT) rm -rf $(OBJDIR)
+else
+	$(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET))
+	$(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR))
+endif
+
+prebuild:
+	$(PREBUILDCMDS)
+
+prelink:
+	$(PRELINKCMDS)
+
+ifneq (,$(PCH))
+$(OBJECTS): $(GCH) $(PCH)
+$(GCH): $(PCH)
+	@echo $(notdir $<)
+	$(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
+endif
+
+$(OBJDIR)/test_opendialogmultiple.o: ../../test/test_opendialogmultiple.c
+	@echo $(notdir $<)
+	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
+
+-include $(OBJECTS:%.o=%.d)
+ifneq (,$(PCH))
+  -include $(OBJDIR)/$(notdir $(PCH)).d
+endif

+ 187 - 0
3rdparty/nativefiledialog/build/gmake_linux/test_pickfolder.make

@@ -0,0 +1,187 @@
+# GNU Make project makefile autogenerated by Premake
+
+ifndef config
+  config=release_x64
+endif
+
+ifndef verbose
+  SILENT = @
+endif
+
+.PHONY: clean prebuild prelink
+
+ifeq ($(config),release_x64)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_pickfolder
+  OBJDIR = ../obj/x64/Release/test_pickfolder
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -O2
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += ../lib/Release/x64/libnfd.a
+  LDDEPS += ../lib/Release/x64/libnfd.a
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../lib/Release/x64 -m64 -s -lnfd `pkg-config --libs gtk+-3.0`
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),release_x86)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_pickfolder
+  OBJDIR = ../obj/x86/Release/test_pickfolder
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -O2
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += ../lib/Release/x86/libnfd.a
+  LDDEPS += ../lib/Release/x86/libnfd.a
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../lib/Release/x86 -m32 -s -lnfd `pkg-config --libs gtk+-3.0`
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x64)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_pickfolder_d
+  OBJDIR = ../obj/x64/Debug/test_pickfolder
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -g
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += -lnfd_d
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../lib/Debug/x64 -m64 -lnfd_d `pkg-config --libs gtk+-3.0`
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x86)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_pickfolder_d
+  OBJDIR = ../obj/x86/Debug/test_pickfolder
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -g
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += -lnfd_d
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../lib/Debug/x86 -m32 -lnfd_d `pkg-config --libs gtk+-3.0`
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+OBJECTS := \
+	$(OBJDIR)/test_pickfolder.o \
+
+RESOURCES := \
+
+CUSTOMFILES := \
+
+SHELLTYPE := msdos
+ifeq (,$(ComSpec)$(COMSPEC))
+  SHELLTYPE := posix
+endif
+ifeq (/bin,$(findstring /bin,$(SHELL)))
+  SHELLTYPE := posix
+endif
+
+$(TARGET): $(GCH) ${CUSTOMFILES} $(OBJECTS) $(LDDEPS) $(RESOURCES)
+	@echo Linking test_pickfolder
+	$(SILENT) $(LINKCMD)
+	$(POSTBUILDCMDS)
+
+$(TARGETDIR):
+	@echo Creating $(TARGETDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(TARGETDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(TARGETDIR))
+endif
+
+$(OBJDIR):
+	@echo Creating $(OBJDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(OBJDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(OBJDIR))
+endif
+
+clean:
+	@echo Cleaning test_pickfolder
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) rm -f  $(TARGET)
+	$(SILENT) rm -rf $(OBJDIR)
+else
+	$(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET))
+	$(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR))
+endif
+
+prebuild:
+	$(PREBUILDCMDS)
+
+prelink:
+	$(PRELINKCMDS)
+
+ifneq (,$(PCH))
+$(OBJECTS): $(GCH) $(PCH)
+$(GCH): $(PCH)
+	@echo $(notdir $<)
+	$(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
+endif
+
+$(OBJDIR)/test_pickfolder.o: ../../test/test_pickfolder.c
+	@echo $(notdir $<)
+	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
+
+-include $(OBJECTS:%.o=%.d)
+ifneq (,$(PCH))
+  -include $(OBJDIR)/$(notdir $(PCH)).d
+endif

+ 187 - 0
3rdparty/nativefiledialog/build/gmake_linux/test_savedialog.make

@@ -0,0 +1,187 @@
+# GNU Make project makefile autogenerated by Premake
+
+ifndef config
+  config=release_x64
+endif
+
+ifndef verbose
+  SILENT = @
+endif
+
+.PHONY: clean prebuild prelink
+
+ifeq ($(config),release_x64)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_savedialog
+  OBJDIR = ../obj/x64/Release/test_savedialog
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -O2
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += ../lib/Release/x64/libnfd.a
+  LDDEPS += ../lib/Release/x64/libnfd.a
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../lib/Release/x64 -m64 -s -lnfd `pkg-config --libs gtk+-3.0`
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),release_x86)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_savedialog
+  OBJDIR = ../obj/x86/Release/test_savedialog
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -O2
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += ../lib/Release/x86/libnfd.a
+  LDDEPS += ../lib/Release/x86/libnfd.a
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../lib/Release/x86 -m32 -s -lnfd `pkg-config --libs gtk+-3.0`
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x64)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_savedialog_d
+  OBJDIR = ../obj/x64/Debug/test_savedialog
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -g
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += -lnfd_d
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../lib/Debug/x64 -m64 -lnfd_d `pkg-config --libs gtk+-3.0`
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x86)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_savedialog_d
+  OBJDIR = ../obj/x86/Debug/test_savedialog
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -g
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += -lnfd_d
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../lib/Debug/x86 -m32 -lnfd_d `pkg-config --libs gtk+-3.0`
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+OBJECTS := \
+	$(OBJDIR)/test_savedialog.o \
+
+RESOURCES := \
+
+CUSTOMFILES := \
+
+SHELLTYPE := msdos
+ifeq (,$(ComSpec)$(COMSPEC))
+  SHELLTYPE := posix
+endif
+ifeq (/bin,$(findstring /bin,$(SHELL)))
+  SHELLTYPE := posix
+endif
+
+$(TARGET): $(GCH) ${CUSTOMFILES} $(OBJECTS) $(LDDEPS) $(RESOURCES)
+	@echo Linking test_savedialog
+	$(SILENT) $(LINKCMD)
+	$(POSTBUILDCMDS)
+
+$(TARGETDIR):
+	@echo Creating $(TARGETDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(TARGETDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(TARGETDIR))
+endif
+
+$(OBJDIR):
+	@echo Creating $(OBJDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(OBJDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(OBJDIR))
+endif
+
+clean:
+	@echo Cleaning test_savedialog
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) rm -f  $(TARGET)
+	$(SILENT) rm -rf $(OBJDIR)
+else
+	$(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET))
+	$(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR))
+endif
+
+prebuild:
+	$(PREBUILDCMDS)
+
+prelink:
+	$(PRELINKCMDS)
+
+ifneq (,$(PCH))
+$(OBJECTS): $(GCH) $(PCH)
+$(GCH): $(PCH)
+	@echo $(notdir $<)
+	$(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
+endif
+
+$(OBJDIR)/test_savedialog.o: ../../test/test_savedialog.c
+	@echo $(notdir $<)
+	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
+
+-include $(OBJECTS:%.o=%.d)
+ifneq (,$(PCH))
+  -include $(OBJDIR)/$(notdir $(PCH)).d
+endif

+ 103 - 0
3rdparty/nativefiledialog/build/gmake_macosx/Makefile

@@ -0,0 +1,103 @@
+# GNU Make workspace makefile autogenerated by Premake
+
+.NOTPARALLEL:
+
+ifndef config
+  config=release_x64
+endif
+
+ifndef verbose
+  SILENT = @
+endif
+
+ifeq ($(config),release_x64)
+  nfd_config = release_x64
+  test_pickfolder_config = release_x64
+  test_opendialog_config = release_x64
+  test_opendialogmultiple_config = release_x64
+  test_savedialog_config = release_x64
+endif
+ifeq ($(config),release_x86)
+  nfd_config = release_x86
+  test_pickfolder_config = release_x86
+  test_opendialog_config = release_x86
+  test_opendialogmultiple_config = release_x86
+  test_savedialog_config = release_x86
+endif
+ifeq ($(config),debug_x64)
+  nfd_config = debug_x64
+  test_pickfolder_config = debug_x64
+  test_opendialog_config = debug_x64
+  test_opendialogmultiple_config = debug_x64
+  test_savedialog_config = debug_x64
+endif
+ifeq ($(config),debug_x86)
+  nfd_config = debug_x86
+  test_pickfolder_config = debug_x86
+  test_opendialog_config = debug_x86
+  test_opendialogmultiple_config = debug_x86
+  test_savedialog_config = debug_x86
+endif
+
+PROJECTS := nfd test_pickfolder test_opendialog test_opendialogmultiple test_savedialog
+
+.PHONY: all clean help $(PROJECTS) 
+
+all: $(PROJECTS)
+
+nfd:
+ifneq (,$(nfd_config))
+	@echo "==== Building nfd ($(nfd_config)) ===="
+	@${MAKE} --no-print-directory -C . -f nfd.make config=$(nfd_config)
+endif
+
+test_pickfolder: nfd
+ifneq (,$(test_pickfolder_config))
+	@echo "==== Building test_pickfolder ($(test_pickfolder_config)) ===="
+	@${MAKE} --no-print-directory -C . -f test_pickfolder.make config=$(test_pickfolder_config)
+endif
+
+test_opendialog: nfd
+ifneq (,$(test_opendialog_config))
+	@echo "==== Building test_opendialog ($(test_opendialog_config)) ===="
+	@${MAKE} --no-print-directory -C . -f test_opendialog.make config=$(test_opendialog_config)
+endif
+
+test_opendialogmultiple: nfd
+ifneq (,$(test_opendialogmultiple_config))
+	@echo "==== Building test_opendialogmultiple ($(test_opendialogmultiple_config)) ===="
+	@${MAKE} --no-print-directory -C . -f test_opendialogmultiple.make config=$(test_opendialogmultiple_config)
+endif
+
+test_savedialog: nfd
+ifneq (,$(test_savedialog_config))
+	@echo "==== Building test_savedialog ($(test_savedialog_config)) ===="
+	@${MAKE} --no-print-directory -C . -f test_savedialog.make config=$(test_savedialog_config)
+endif
+
+clean:
+	@${MAKE} --no-print-directory -C . -f nfd.make clean
+	@${MAKE} --no-print-directory -C . -f test_pickfolder.make clean
+	@${MAKE} --no-print-directory -C . -f test_opendialog.make clean
+	@${MAKE} --no-print-directory -C . -f test_opendialogmultiple.make clean
+	@${MAKE} --no-print-directory -C . -f test_savedialog.make clean
+
+help:
+	@echo "Usage: make [config=name] [target]"
+	@echo ""
+	@echo "CONFIGURATIONS:"
+	@echo "  release_x64"
+	@echo "  release_x86"
+	@echo "  debug_x64"
+	@echo "  debug_x86"
+	@echo ""
+	@echo "TARGETS:"
+	@echo "   all (default)"
+	@echo "   clean"
+	@echo "   nfd"
+	@echo "   test_pickfolder"
+	@echo "   test_opendialog"
+	@echo "   test_opendialogmultiple"
+	@echo "   test_savedialog"
+	@echo ""
+	@echo "For more information, see http://industriousone.com/premake/quick-start"

+ 191 - 0
3rdparty/nativefiledialog/build/gmake_macosx/nfd.make

@@ -0,0 +1,191 @@
+# GNU Make project makefile autogenerated by Premake
+
+ifndef config
+  config=release_x64
+endif
+
+ifndef verbose
+  SILENT = @
+endif
+
+.PHONY: clean prebuild prelink
+
+ifeq ($(config),release_x64)
+  RESCOMP = windres
+  TARGETDIR = ../lib/Release/x64
+  TARGET = $(TARGETDIR)/libnfd.a
+  OBJDIR = ../obj/x64/Release/nfd
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -O2 -fno-exceptions
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS +=
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -m64 -Wl,-x
+  LINKCMD = $(AR) -rcs "$@" $(OBJECTS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),release_x86)
+  RESCOMP = windres
+  TARGETDIR = ../lib/Release/x86
+  TARGET = $(TARGETDIR)/libnfd.a
+  OBJDIR = ../obj/x86/Release/nfd
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -O2 -fno-exceptions
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS +=
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -m32 -Wl,-x
+  LINKCMD = $(AR) -rcs "$@" $(OBJECTS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x64)
+  RESCOMP = windres
+  TARGETDIR = ../lib/Debug/x64
+  TARGET = $(TARGETDIR)/libnfd_d.a
+  OBJDIR = ../obj/x64/Debug/nfd
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -g -fno-exceptions
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS +=
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -m64
+  LINKCMD = $(AR) -rcs "$@" $(OBJECTS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x86)
+  RESCOMP = windres
+  TARGETDIR = ../lib/Debug/x86
+  TARGET = $(TARGETDIR)/libnfd_d.a
+  OBJDIR = ../obj/x86/Debug/nfd
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -g -fno-exceptions
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS +=
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -m32
+  LINKCMD = $(AR) -rcs "$@" $(OBJECTS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+OBJECTS := \
+	$(OBJDIR)/nfd_cocoa.o \
+	$(OBJDIR)/nfd_common.o \
+
+RESOURCES := \
+
+CUSTOMFILES := \
+
+SHELLTYPE := msdos
+ifeq (,$(ComSpec)$(COMSPEC))
+  SHELLTYPE := posix
+endif
+ifeq (/bin,$(findstring /bin,$(SHELL)))
+  SHELLTYPE := posix
+endif
+
+$(TARGET): $(GCH) ${CUSTOMFILES} $(OBJECTS) $(LDDEPS) $(RESOURCES)
+	@echo Linking nfd
+	$(SILENT) $(LINKCMD)
+	$(POSTBUILDCMDS)
+
+$(TARGETDIR):
+	@echo Creating $(TARGETDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(TARGETDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(TARGETDIR))
+endif
+
+$(OBJDIR):
+	@echo Creating $(OBJDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(OBJDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(OBJDIR))
+endif
+
+clean:
+	@echo Cleaning nfd
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) rm -f  $(TARGET)
+	$(SILENT) rm -rf $(OBJDIR)
+else
+	$(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET))
+	$(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR))
+endif
+
+prebuild:
+	$(PREBUILDCMDS)
+
+prelink:
+	$(PRELINKCMDS)
+
+ifneq (,$(PCH))
+$(OBJECTS): $(GCH) $(PCH)
+$(GCH): $(PCH)
+	@echo $(notdir $<)
+	$(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
+endif
+
+$(OBJDIR)/nfd_cocoa.o: ../../src/nfd_cocoa.m
+	@echo $(notdir $<)
+	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
+$(OBJDIR)/nfd_common.o: ../../src/nfd_common.c
+	@echo $(notdir $<)
+	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
+
+-include $(OBJECTS:%.o=%.d)
+ifneq (,$(PCH))
+  -include $(OBJDIR)/$(notdir $(PCH)).d
+endif

+ 187 - 0
3rdparty/nativefiledialog/build/gmake_macosx/test_opendialog.make

@@ -0,0 +1,187 @@
+# GNU Make project makefile autogenerated by Premake
+
+ifndef config
+  config=release_x64
+endif
+
+ifndef verbose
+  SILENT = @
+endif
+
+.PHONY: clean prebuild prelink
+
+ifeq ($(config),release_x64)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_opendialog
+  OBJDIR = ../obj/x64/Release/test_opendialog
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -O2
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += ../lib/Release/x64/libnfd.a -framework Foundation -framework AppKit
+  LDDEPS += ../lib/Release/x64/libnfd.a
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../lib/Release/x64 -m64 -Wl,-x
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),release_x86)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_opendialog
+  OBJDIR = ../obj/x86/Release/test_opendialog
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -O2
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += ../lib/Release/x86/libnfd.a -framework Foundation -framework AppKit
+  LDDEPS += ../lib/Release/x86/libnfd.a
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../lib/Release/x86 -m32 -Wl,-x
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x64)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_opendialog_d
+  OBJDIR = ../obj/x64/Debug/test_opendialog
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -g
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += -lnfd_d -framework Foundation -framework AppKit
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../lib/Debug/x64 -m64
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x86)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_opendialog_d
+  OBJDIR = ../obj/x86/Debug/test_opendialog
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -g
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += -lnfd_d -framework Foundation -framework AppKit
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../lib/Debug/x86 -m32
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+OBJECTS := \
+	$(OBJDIR)/test_opendialog.o \
+
+RESOURCES := \
+
+CUSTOMFILES := \
+
+SHELLTYPE := msdos
+ifeq (,$(ComSpec)$(COMSPEC))
+  SHELLTYPE := posix
+endif
+ifeq (/bin,$(findstring /bin,$(SHELL)))
+  SHELLTYPE := posix
+endif
+
+$(TARGET): $(GCH) ${CUSTOMFILES} $(OBJECTS) $(LDDEPS) $(RESOURCES)
+	@echo Linking test_opendialog
+	$(SILENT) $(LINKCMD)
+	$(POSTBUILDCMDS)
+
+$(TARGETDIR):
+	@echo Creating $(TARGETDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(TARGETDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(TARGETDIR))
+endif
+
+$(OBJDIR):
+	@echo Creating $(OBJDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(OBJDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(OBJDIR))
+endif
+
+clean:
+	@echo Cleaning test_opendialog
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) rm -f  $(TARGET)
+	$(SILENT) rm -rf $(OBJDIR)
+else
+	$(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET))
+	$(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR))
+endif
+
+prebuild:
+	$(PREBUILDCMDS)
+
+prelink:
+	$(PRELINKCMDS)
+
+ifneq (,$(PCH))
+$(OBJECTS): $(GCH) $(PCH)
+$(GCH): $(PCH)
+	@echo $(notdir $<)
+	$(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
+endif
+
+$(OBJDIR)/test_opendialog.o: ../../test/test_opendialog.c
+	@echo $(notdir $<)
+	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
+
+-include $(OBJECTS:%.o=%.d)
+ifneq (,$(PCH))
+  -include $(OBJDIR)/$(notdir $(PCH)).d
+endif

+ 187 - 0
3rdparty/nativefiledialog/build/gmake_macosx/test_opendialogmultiple.make

@@ -0,0 +1,187 @@
+# GNU Make project makefile autogenerated by Premake
+
+ifndef config
+  config=release_x64
+endif
+
+ifndef verbose
+  SILENT = @
+endif
+
+.PHONY: clean prebuild prelink
+
+ifeq ($(config),release_x64)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_opendialogmultiple
+  OBJDIR = ../obj/x64/Release/test_opendialogmultiple
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -O2
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += ../lib/Release/x64/libnfd.a -framework Foundation -framework AppKit
+  LDDEPS += ../lib/Release/x64/libnfd.a
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../lib/Release/x64 -m64 -Wl,-x
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),release_x86)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_opendialogmultiple
+  OBJDIR = ../obj/x86/Release/test_opendialogmultiple
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -O2
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += ../lib/Release/x86/libnfd.a -framework Foundation -framework AppKit
+  LDDEPS += ../lib/Release/x86/libnfd.a
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../lib/Release/x86 -m32 -Wl,-x
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x64)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_opendialogmultiple_d
+  OBJDIR = ../obj/x64/Debug/test_opendialogmultiple
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -g
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += -lnfd_d -framework Foundation -framework AppKit
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../lib/Debug/x64 -m64
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x86)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_opendialogmultiple_d
+  OBJDIR = ../obj/x86/Debug/test_opendialogmultiple
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -g
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += -lnfd_d -framework Foundation -framework AppKit
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../lib/Debug/x86 -m32
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+OBJECTS := \
+	$(OBJDIR)/test_opendialogmultiple.o \
+
+RESOURCES := \
+
+CUSTOMFILES := \
+
+SHELLTYPE := msdos
+ifeq (,$(ComSpec)$(COMSPEC))
+  SHELLTYPE := posix
+endif
+ifeq (/bin,$(findstring /bin,$(SHELL)))
+  SHELLTYPE := posix
+endif
+
+$(TARGET): $(GCH) ${CUSTOMFILES} $(OBJECTS) $(LDDEPS) $(RESOURCES)
+	@echo Linking test_opendialogmultiple
+	$(SILENT) $(LINKCMD)
+	$(POSTBUILDCMDS)
+
+$(TARGETDIR):
+	@echo Creating $(TARGETDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(TARGETDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(TARGETDIR))
+endif
+
+$(OBJDIR):
+	@echo Creating $(OBJDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(OBJDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(OBJDIR))
+endif
+
+clean:
+	@echo Cleaning test_opendialogmultiple
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) rm -f  $(TARGET)
+	$(SILENT) rm -rf $(OBJDIR)
+else
+	$(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET))
+	$(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR))
+endif
+
+prebuild:
+	$(PREBUILDCMDS)
+
+prelink:
+	$(PRELINKCMDS)
+
+ifneq (,$(PCH))
+$(OBJECTS): $(GCH) $(PCH)
+$(GCH): $(PCH)
+	@echo $(notdir $<)
+	$(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
+endif
+
+$(OBJDIR)/test_opendialogmultiple.o: ../../test/test_opendialogmultiple.c
+	@echo $(notdir $<)
+	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
+
+-include $(OBJECTS:%.o=%.d)
+ifneq (,$(PCH))
+  -include $(OBJDIR)/$(notdir $(PCH)).d
+endif

+ 187 - 0
3rdparty/nativefiledialog/build/gmake_macosx/test_pickfolder.make

@@ -0,0 +1,187 @@
+# GNU Make project makefile autogenerated by Premake
+
+ifndef config
+  config=release_x64
+endif
+
+ifndef verbose
+  SILENT = @
+endif
+
+.PHONY: clean prebuild prelink
+
+ifeq ($(config),release_x64)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_pickfolder
+  OBJDIR = ../obj/x64/Release/test_pickfolder
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -O2
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += ../lib/Release/x64/libnfd.a -framework Foundation -framework AppKit
+  LDDEPS += ../lib/Release/x64/libnfd.a
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../lib/Release/x64 -m64 -Wl,-x
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),release_x86)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_pickfolder
+  OBJDIR = ../obj/x86/Release/test_pickfolder
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -O2
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += ../lib/Release/x86/libnfd.a -framework Foundation -framework AppKit
+  LDDEPS += ../lib/Release/x86/libnfd.a
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../lib/Release/x86 -m32 -Wl,-x
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x64)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_pickfolder_d
+  OBJDIR = ../obj/x64/Debug/test_pickfolder
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -g
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += -lnfd_d -framework Foundation -framework AppKit
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../lib/Debug/x64 -m64
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x86)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_pickfolder_d
+  OBJDIR = ../obj/x86/Debug/test_pickfolder
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -g
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += -lnfd_d -framework Foundation -framework AppKit
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../lib/Debug/x86 -m32
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+OBJECTS := \
+	$(OBJDIR)/test_pickfolder.o \
+
+RESOURCES := \
+
+CUSTOMFILES := \
+
+SHELLTYPE := msdos
+ifeq (,$(ComSpec)$(COMSPEC))
+  SHELLTYPE := posix
+endif
+ifeq (/bin,$(findstring /bin,$(SHELL)))
+  SHELLTYPE := posix
+endif
+
+$(TARGET): $(GCH) ${CUSTOMFILES} $(OBJECTS) $(LDDEPS) $(RESOURCES)
+	@echo Linking test_pickfolder
+	$(SILENT) $(LINKCMD)
+	$(POSTBUILDCMDS)
+
+$(TARGETDIR):
+	@echo Creating $(TARGETDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(TARGETDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(TARGETDIR))
+endif
+
+$(OBJDIR):
+	@echo Creating $(OBJDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(OBJDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(OBJDIR))
+endif
+
+clean:
+	@echo Cleaning test_pickfolder
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) rm -f  $(TARGET)
+	$(SILENT) rm -rf $(OBJDIR)
+else
+	$(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET))
+	$(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR))
+endif
+
+prebuild:
+	$(PREBUILDCMDS)
+
+prelink:
+	$(PRELINKCMDS)
+
+ifneq (,$(PCH))
+$(OBJECTS): $(GCH) $(PCH)
+$(GCH): $(PCH)
+	@echo $(notdir $<)
+	$(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
+endif
+
+$(OBJDIR)/test_pickfolder.o: ../../test/test_pickfolder.c
+	@echo $(notdir $<)
+	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
+
+-include $(OBJECTS:%.o=%.d)
+ifneq (,$(PCH))
+  -include $(OBJDIR)/$(notdir $(PCH)).d
+endif

+ 187 - 0
3rdparty/nativefiledialog/build/gmake_macosx/test_savedialog.make

@@ -0,0 +1,187 @@
+# GNU Make project makefile autogenerated by Premake
+
+ifndef config
+  config=release_x64
+endif
+
+ifndef verbose
+  SILENT = @
+endif
+
+.PHONY: clean prebuild prelink
+
+ifeq ($(config),release_x64)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_savedialog
+  OBJDIR = ../obj/x64/Release/test_savedialog
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -O2
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += ../lib/Release/x64/libnfd.a -framework Foundation -framework AppKit
+  LDDEPS += ../lib/Release/x64/libnfd.a
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../lib/Release/x64 -m64 -Wl,-x
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),release_x86)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_savedialog
+  OBJDIR = ../obj/x86/Release/test_savedialog
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -O2
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += ../lib/Release/x86/libnfd.a -framework Foundation -framework AppKit
+  LDDEPS += ../lib/Release/x86/libnfd.a
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../lib/Release/x86 -m32 -Wl,-x
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x64)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_savedialog_d
+  OBJDIR = ../obj/x64/Debug/test_savedialog
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -g
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += -lnfd_d -framework Foundation -framework AppKit
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../lib/Debug/x64 -m64
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x86)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_savedialog_d
+  OBJDIR = ../obj/x86/Debug/test_savedialog
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -g
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += -lnfd_d -framework Foundation -framework AppKit
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../lib/Debug/x86 -m32
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+OBJECTS := \
+	$(OBJDIR)/test_savedialog.o \
+
+RESOURCES := \
+
+CUSTOMFILES := \
+
+SHELLTYPE := msdos
+ifeq (,$(ComSpec)$(COMSPEC))
+  SHELLTYPE := posix
+endif
+ifeq (/bin,$(findstring /bin,$(SHELL)))
+  SHELLTYPE := posix
+endif
+
+$(TARGET): $(GCH) ${CUSTOMFILES} $(OBJECTS) $(LDDEPS) $(RESOURCES)
+	@echo Linking test_savedialog
+	$(SILENT) $(LINKCMD)
+	$(POSTBUILDCMDS)
+
+$(TARGETDIR):
+	@echo Creating $(TARGETDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(TARGETDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(TARGETDIR))
+endif
+
+$(OBJDIR):
+	@echo Creating $(OBJDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(OBJDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(OBJDIR))
+endif
+
+clean:
+	@echo Cleaning test_savedialog
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) rm -f  $(TARGET)
+	$(SILENT) rm -rf $(OBJDIR)
+else
+	$(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET))
+	$(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR))
+endif
+
+prebuild:
+	$(PREBUILDCMDS)
+
+prelink:
+	$(PRELINKCMDS)
+
+ifneq (,$(PCH))
+$(OBJECTS): $(GCH) $(PCH)
+$(GCH): $(PCH)
+	@echo $(notdir $<)
+	$(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
+endif
+
+$(OBJDIR)/test_savedialog.o: ../../test/test_savedialog.c
+	@echo $(notdir $<)
+	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
+
+-include $(OBJECTS:%.o=%.d)
+ifneq (,$(PCH))
+  -include $(OBJDIR)/$(notdir $(PCH)).d
+endif

+ 103 - 0
3rdparty/nativefiledialog/build/gmake_windows/Makefile

@@ -0,0 +1,103 @@
+# GNU Make workspace makefile autogenerated by Premake
+
+.NOTPARALLEL:
+
+ifndef config
+  config=release_x64
+endif
+
+ifndef verbose
+  SILENT = @
+endif
+
+ifeq ($(config),release_x64)
+  nfd_config = release_x64
+  test_pickfolder_config = release_x64
+  test_opendialog_config = release_x64
+  test_opendialogmultiple_config = release_x64
+  test_savedialog_config = release_x64
+endif
+ifeq ($(config),release_x86)
+  nfd_config = release_x86
+  test_pickfolder_config = release_x86
+  test_opendialog_config = release_x86
+  test_opendialogmultiple_config = release_x86
+  test_savedialog_config = release_x86
+endif
+ifeq ($(config),debug_x64)
+  nfd_config = debug_x64
+  test_pickfolder_config = debug_x64
+  test_opendialog_config = debug_x64
+  test_opendialogmultiple_config = debug_x64
+  test_savedialog_config = debug_x64
+endif
+ifeq ($(config),debug_x86)
+  nfd_config = debug_x86
+  test_pickfolder_config = debug_x86
+  test_opendialog_config = debug_x86
+  test_opendialogmultiple_config = debug_x86
+  test_savedialog_config = debug_x86
+endif
+
+PROJECTS := nfd test_pickfolder test_opendialog test_opendialogmultiple test_savedialog
+
+.PHONY: all clean help $(PROJECTS) 
+
+all: $(PROJECTS)
+
+nfd:
+ifneq (,$(nfd_config))
+	@echo "==== Building nfd ($(nfd_config)) ===="
+	@${MAKE} --no-print-directory -C . -f nfd.make config=$(nfd_config)
+endif
+
+test_pickfolder: nfd
+ifneq (,$(test_pickfolder_config))
+	@echo "==== Building test_pickfolder ($(test_pickfolder_config)) ===="
+	@${MAKE} --no-print-directory -C . -f test_pickfolder.make config=$(test_pickfolder_config)
+endif
+
+test_opendialog: nfd
+ifneq (,$(test_opendialog_config))
+	@echo "==== Building test_opendialog ($(test_opendialog_config)) ===="
+	@${MAKE} --no-print-directory -C . -f test_opendialog.make config=$(test_opendialog_config)
+endif
+
+test_opendialogmultiple: nfd
+ifneq (,$(test_opendialogmultiple_config))
+	@echo "==== Building test_opendialogmultiple ($(test_opendialogmultiple_config)) ===="
+	@${MAKE} --no-print-directory -C . -f test_opendialogmultiple.make config=$(test_opendialogmultiple_config)
+endif
+
+test_savedialog: nfd
+ifneq (,$(test_savedialog_config))
+	@echo "==== Building test_savedialog ($(test_savedialog_config)) ===="
+	@${MAKE} --no-print-directory -C . -f test_savedialog.make config=$(test_savedialog_config)
+endif
+
+clean:
+	@${MAKE} --no-print-directory -C . -f nfd.make clean
+	@${MAKE} --no-print-directory -C . -f test_pickfolder.make clean
+	@${MAKE} --no-print-directory -C . -f test_opendialog.make clean
+	@${MAKE} --no-print-directory -C . -f test_opendialogmultiple.make clean
+	@${MAKE} --no-print-directory -C . -f test_savedialog.make clean
+
+help:
+	@echo "Usage: make [config=name] [target]"
+	@echo ""
+	@echo "CONFIGURATIONS:"
+	@echo "  release_x64"
+	@echo "  release_x86"
+	@echo "  debug_x64"
+	@echo "  debug_x86"
+	@echo ""
+	@echo "TARGETS:"
+	@echo "   all (default)"
+	@echo "   clean"
+	@echo "   nfd"
+	@echo "   test_pickfolder"
+	@echo "   test_opendialog"
+	@echo "   test_opendialogmultiple"
+	@echo "   test_savedialog"
+	@echo ""
+	@echo "For more information, see http://industriousone.com/premake/quick-start"

+ 191 - 0
3rdparty/nativefiledialog/build/gmake_windows/nfd.make

@@ -0,0 +1,191 @@
+# GNU Make project makefile autogenerated by Premake
+
+ifndef config
+  config=release_x64
+endif
+
+ifndef verbose
+  SILENT = @
+endif
+
+.PHONY: clean prebuild prelink
+
+ifeq ($(config),release_x64)
+  RESCOMP = windres
+  TARGETDIR = ../lib/Release/x64
+  TARGET = $(TARGETDIR)/nfd.lib
+  OBJDIR = ../obj/x64/Release/nfd
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -O2 -fno-exceptions
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS +=
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -m64 -s
+  LINKCMD = $(AR) -rcs "$@" $(OBJECTS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),release_x86)
+  RESCOMP = windres
+  TARGETDIR = ../lib/Release/x86
+  TARGET = $(TARGETDIR)/nfd.lib
+  OBJDIR = ../obj/x86/Release/nfd
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -O2 -fno-exceptions
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS +=
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -m32 -s
+  LINKCMD = $(AR) -rcs "$@" $(OBJECTS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x64)
+  RESCOMP = windres
+  TARGETDIR = ../lib/Debug/x64
+  TARGET = $(TARGETDIR)/nfd_d.lib
+  OBJDIR = ../obj/x64/Debug/nfd
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -g -fno-exceptions
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS +=
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -m64
+  LINKCMD = $(AR) -rcs "$@" $(OBJECTS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x86)
+  RESCOMP = windres
+  TARGETDIR = ../lib/Debug/x86
+  TARGET = $(TARGETDIR)/nfd_d.lib
+  OBJDIR = ../obj/x86/Debug/nfd
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -g -fno-exceptions
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS +=
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -m32
+  LINKCMD = $(AR) -rcs "$@" $(OBJECTS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+OBJECTS := \
+	$(OBJDIR)/nfd_common.o \
+	$(OBJDIR)/nfd_win.o \
+
+RESOURCES := \
+
+CUSTOMFILES := \
+
+SHELLTYPE := msdos
+ifeq (,$(ComSpec)$(COMSPEC))
+  SHELLTYPE := posix
+endif
+ifeq (/bin,$(findstring /bin,$(SHELL)))
+  SHELLTYPE := posix
+endif
+
+$(TARGET): $(GCH) ${CUSTOMFILES} $(OBJECTS) $(LDDEPS) $(RESOURCES)
+	@echo Linking nfd
+	$(SILENT) $(LINKCMD)
+	$(POSTBUILDCMDS)
+
+$(TARGETDIR):
+	@echo Creating $(TARGETDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(TARGETDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(TARGETDIR))
+endif
+
+$(OBJDIR):
+	@echo Creating $(OBJDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(OBJDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(OBJDIR))
+endif
+
+clean:
+	@echo Cleaning nfd
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) rm -f  $(TARGET)
+	$(SILENT) rm -rf $(OBJDIR)
+else
+	$(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET))
+	$(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR))
+endif
+
+prebuild:
+	$(PREBUILDCMDS)
+
+prelink:
+	$(PRELINKCMDS)
+
+ifneq (,$(PCH))
+$(OBJECTS): $(GCH) $(PCH)
+$(GCH): $(PCH)
+	@echo $(notdir $<)
+	$(SILENT) $(CXX) -x c++-header $(ALL_CXXFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
+endif
+
+$(OBJDIR)/nfd_common.o: ../../src/nfd_common.c
+	@echo $(notdir $<)
+	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
+$(OBJDIR)/nfd_win.o: ../../src/nfd_win.cpp
+	@echo $(notdir $<)
+	$(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
+
+-include $(OBJECTS:%.o=%.d)
+ifneq (,$(PCH))
+  -include $(OBJDIR)/$(notdir $(PCH)).d
+endif

+ 187 - 0
3rdparty/nativefiledialog/build/gmake_windows/test_opendialog.make

@@ -0,0 +1,187 @@
+# GNU Make project makefile autogenerated by Premake
+
+ifndef config
+  config=release_x64
+endif
+
+ifndef verbose
+  SILENT = @
+endif
+
+.PHONY: clean prebuild prelink
+
+ifeq ($(config),release_x64)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_opendialog.exe
+  OBJDIR = ../obj/x64/Release/test_opendialog
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -O2
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += ../lib/Release/x64/nfd.lib -lole32 -luuid
+  LDDEPS += ../lib/Release/x64/nfd.lib
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../lib/Release/x64 -m64 -s
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),release_x86)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_opendialog.exe
+  OBJDIR = ../obj/x86/Release/test_opendialog
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -O2
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += ../lib/Release/x86/nfd.lib -lole32 -luuid
+  LDDEPS += ../lib/Release/x86/nfd.lib
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../lib/Release/x86 -m32 -s
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x64)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_opendialog_d.exe
+  OBJDIR = ../obj/x64/Debug/test_opendialog
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -g
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += -lnfd_d -lole32 -luuid
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../lib/Debug/x64 -m64
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x86)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_opendialog_d.exe
+  OBJDIR = ../obj/x86/Debug/test_opendialog
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -g
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += -lnfd_d -lole32 -luuid
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../lib/Debug/x86 -m32
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+OBJECTS := \
+	$(OBJDIR)/test_opendialog.o \
+
+RESOURCES := \
+
+CUSTOMFILES := \
+
+SHELLTYPE := msdos
+ifeq (,$(ComSpec)$(COMSPEC))
+  SHELLTYPE := posix
+endif
+ifeq (/bin,$(findstring /bin,$(SHELL)))
+  SHELLTYPE := posix
+endif
+
+$(TARGET): $(GCH) ${CUSTOMFILES} $(OBJECTS) $(LDDEPS) $(RESOURCES)
+	@echo Linking test_opendialog
+	$(SILENT) $(LINKCMD)
+	$(POSTBUILDCMDS)
+
+$(TARGETDIR):
+	@echo Creating $(TARGETDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(TARGETDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(TARGETDIR))
+endif
+
+$(OBJDIR):
+	@echo Creating $(OBJDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(OBJDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(OBJDIR))
+endif
+
+clean:
+	@echo Cleaning test_opendialog
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) rm -f  $(TARGET)
+	$(SILENT) rm -rf $(OBJDIR)
+else
+	$(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET))
+	$(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR))
+endif
+
+prebuild:
+	$(PREBUILDCMDS)
+
+prelink:
+	$(PRELINKCMDS)
+
+ifneq (,$(PCH))
+$(OBJECTS): $(GCH) $(PCH)
+$(GCH): $(PCH)
+	@echo $(notdir $<)
+	$(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
+endif
+
+$(OBJDIR)/test_opendialog.o: ../../test/test_opendialog.c
+	@echo $(notdir $<)
+	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
+
+-include $(OBJECTS:%.o=%.d)
+ifneq (,$(PCH))
+  -include $(OBJDIR)/$(notdir $(PCH)).d
+endif

+ 187 - 0
3rdparty/nativefiledialog/build/gmake_windows/test_opendialogmultiple.make

@@ -0,0 +1,187 @@
+# GNU Make project makefile autogenerated by Premake
+
+ifndef config
+  config=release_x64
+endif
+
+ifndef verbose
+  SILENT = @
+endif
+
+.PHONY: clean prebuild prelink
+
+ifeq ($(config),release_x64)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_opendialogmultiple.exe
+  OBJDIR = ../obj/x64/Release/test_opendialogmultiple
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -O2
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += ../lib/Release/x64/nfd.lib -lole32 -luuid
+  LDDEPS += ../lib/Release/x64/nfd.lib
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../lib/Release/x64 -m64 -s
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),release_x86)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_opendialogmultiple.exe
+  OBJDIR = ../obj/x86/Release/test_opendialogmultiple
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -O2
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += ../lib/Release/x86/nfd.lib -lole32 -luuid
+  LDDEPS += ../lib/Release/x86/nfd.lib
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../lib/Release/x86 -m32 -s
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x64)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_opendialogmultiple_d.exe
+  OBJDIR = ../obj/x64/Debug/test_opendialogmultiple
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -g
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += -lnfd_d -lole32 -luuid
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../lib/Debug/x64 -m64
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x86)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_opendialogmultiple_d.exe
+  OBJDIR = ../obj/x86/Debug/test_opendialogmultiple
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -g
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += -lnfd_d -lole32 -luuid
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../lib/Debug/x86 -m32
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+OBJECTS := \
+	$(OBJDIR)/test_opendialogmultiple.o \
+
+RESOURCES := \
+
+CUSTOMFILES := \
+
+SHELLTYPE := msdos
+ifeq (,$(ComSpec)$(COMSPEC))
+  SHELLTYPE := posix
+endif
+ifeq (/bin,$(findstring /bin,$(SHELL)))
+  SHELLTYPE := posix
+endif
+
+$(TARGET): $(GCH) ${CUSTOMFILES} $(OBJECTS) $(LDDEPS) $(RESOURCES)
+	@echo Linking test_opendialogmultiple
+	$(SILENT) $(LINKCMD)
+	$(POSTBUILDCMDS)
+
+$(TARGETDIR):
+	@echo Creating $(TARGETDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(TARGETDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(TARGETDIR))
+endif
+
+$(OBJDIR):
+	@echo Creating $(OBJDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(OBJDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(OBJDIR))
+endif
+
+clean:
+	@echo Cleaning test_opendialogmultiple
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) rm -f  $(TARGET)
+	$(SILENT) rm -rf $(OBJDIR)
+else
+	$(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET))
+	$(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR))
+endif
+
+prebuild:
+	$(PREBUILDCMDS)
+
+prelink:
+	$(PRELINKCMDS)
+
+ifneq (,$(PCH))
+$(OBJECTS): $(GCH) $(PCH)
+$(GCH): $(PCH)
+	@echo $(notdir $<)
+	$(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
+endif
+
+$(OBJDIR)/test_opendialogmultiple.o: ../../test/test_opendialogmultiple.c
+	@echo $(notdir $<)
+	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
+
+-include $(OBJECTS:%.o=%.d)
+ifneq (,$(PCH))
+  -include $(OBJDIR)/$(notdir $(PCH)).d
+endif

+ 187 - 0
3rdparty/nativefiledialog/build/gmake_windows/test_pickfolder.make

@@ -0,0 +1,187 @@
+# GNU Make project makefile autogenerated by Premake
+
+ifndef config
+  config=release_x64
+endif
+
+ifndef verbose
+  SILENT = @
+endif
+
+.PHONY: clean prebuild prelink
+
+ifeq ($(config),release_x64)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_pickfolder.exe
+  OBJDIR = ../obj/x64/Release/test_pickfolder
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -O2
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += ../lib/Release/x64/nfd.lib -lole32 -luuid
+  LDDEPS += ../lib/Release/x64/nfd.lib
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../lib/Release/x64 -m64 -s
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),release_x86)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_pickfolder.exe
+  OBJDIR = ../obj/x86/Release/test_pickfolder
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -O2
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += ../lib/Release/x86/nfd.lib -lole32 -luuid
+  LDDEPS += ../lib/Release/x86/nfd.lib
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../lib/Release/x86 -m32 -s
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x64)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_pickfolder_d.exe
+  OBJDIR = ../obj/x64/Debug/test_pickfolder
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -g
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += -lnfd_d -lole32 -luuid
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../lib/Debug/x64 -m64
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x86)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_pickfolder_d.exe
+  OBJDIR = ../obj/x86/Debug/test_pickfolder
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -g
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += -lnfd_d -lole32 -luuid
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../lib/Debug/x86 -m32
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+OBJECTS := \
+	$(OBJDIR)/test_pickfolder.o \
+
+RESOURCES := \
+
+CUSTOMFILES := \
+
+SHELLTYPE := msdos
+ifeq (,$(ComSpec)$(COMSPEC))
+  SHELLTYPE := posix
+endif
+ifeq (/bin,$(findstring /bin,$(SHELL)))
+  SHELLTYPE := posix
+endif
+
+$(TARGET): $(GCH) ${CUSTOMFILES} $(OBJECTS) $(LDDEPS) $(RESOURCES)
+	@echo Linking test_pickfolder
+	$(SILENT) $(LINKCMD)
+	$(POSTBUILDCMDS)
+
+$(TARGETDIR):
+	@echo Creating $(TARGETDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(TARGETDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(TARGETDIR))
+endif
+
+$(OBJDIR):
+	@echo Creating $(OBJDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(OBJDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(OBJDIR))
+endif
+
+clean:
+	@echo Cleaning test_pickfolder
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) rm -f  $(TARGET)
+	$(SILENT) rm -rf $(OBJDIR)
+else
+	$(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET))
+	$(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR))
+endif
+
+prebuild:
+	$(PREBUILDCMDS)
+
+prelink:
+	$(PRELINKCMDS)
+
+ifneq (,$(PCH))
+$(OBJECTS): $(GCH) $(PCH)
+$(GCH): $(PCH)
+	@echo $(notdir $<)
+	$(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
+endif
+
+$(OBJDIR)/test_pickfolder.o: ../../test/test_pickfolder.c
+	@echo $(notdir $<)
+	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
+
+-include $(OBJECTS:%.o=%.d)
+ifneq (,$(PCH))
+  -include $(OBJDIR)/$(notdir $(PCH)).d
+endif

+ 187 - 0
3rdparty/nativefiledialog/build/gmake_windows/test_savedialog.make

@@ -0,0 +1,187 @@
+# GNU Make project makefile autogenerated by Premake
+
+ifndef config
+  config=release_x64
+endif
+
+ifndef verbose
+  SILENT = @
+endif
+
+.PHONY: clean prebuild prelink
+
+ifeq ($(config),release_x64)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_savedialog.exe
+  OBJDIR = ../obj/x64/Release/test_savedialog
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -O2
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += ../lib/Release/x64/nfd.lib -lole32 -luuid
+  LDDEPS += ../lib/Release/x64/nfd.lib
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../lib/Release/x64 -m64 -s
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),release_x86)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_savedialog.exe
+  OBJDIR = ../obj/x86/Release/test_savedialog
+  DEFINES += -DNDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -O2
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += ../lib/Release/x86/nfd.lib -lole32 -luuid
+  LDDEPS += ../lib/Release/x86/nfd.lib
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../lib/Release/x86 -m32 -s
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x64)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_savedialog_d.exe
+  OBJDIR = ../obj/x64/Debug/test_savedialog
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -g
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += -lnfd_d -lole32 -luuid
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../lib/Debug/x64 -m64
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+ifeq ($(config),debug_x86)
+  RESCOMP = windres
+  TARGETDIR = ../bin
+  TARGET = $(TARGETDIR)/test_savedialog_d.exe
+  OBJDIR = ../obj/x86/Debug/test_savedialog
+  DEFINES += -DDEBUG
+  INCLUDES += -I../../src/include
+  FORCE_INCLUDE +=
+  ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
+  ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -g
+  ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
+  ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
+  LIBS += -lnfd_d -lole32 -luuid
+  LDDEPS +=
+  ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../lib/Debug/x86 -m32
+  LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
+  define PREBUILDCMDS
+  endef
+  define PRELINKCMDS
+  endef
+  define POSTBUILDCMDS
+  endef
+all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
+	@:
+
+endif
+
+OBJECTS := \
+	$(OBJDIR)/test_savedialog.o \
+
+RESOURCES := \
+
+CUSTOMFILES := \
+
+SHELLTYPE := msdos
+ifeq (,$(ComSpec)$(COMSPEC))
+  SHELLTYPE := posix
+endif
+ifeq (/bin,$(findstring /bin,$(SHELL)))
+  SHELLTYPE := posix
+endif
+
+$(TARGET): $(GCH) ${CUSTOMFILES} $(OBJECTS) $(LDDEPS) $(RESOURCES)
+	@echo Linking test_savedialog
+	$(SILENT) $(LINKCMD)
+	$(POSTBUILDCMDS)
+
+$(TARGETDIR):
+	@echo Creating $(TARGETDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(TARGETDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(TARGETDIR))
+endif
+
+$(OBJDIR):
+	@echo Creating $(OBJDIR)
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) mkdir -p $(OBJDIR)
+else
+	$(SILENT) mkdir $(subst /,\\,$(OBJDIR))
+endif
+
+clean:
+	@echo Cleaning test_savedialog
+ifeq (posix,$(SHELLTYPE))
+	$(SILENT) rm -f  $(TARGET)
+	$(SILENT) rm -rf $(OBJDIR)
+else
+	$(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET))
+	$(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR))
+endif
+
+prebuild:
+	$(PREBUILDCMDS)
+
+prelink:
+	$(PRELINKCMDS)
+
+ifneq (,$(PCH))
+$(OBJECTS): $(GCH) $(PCH)
+$(GCH): $(PCH)
+	@echo $(notdir $<)
+	$(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
+endif
+
+$(OBJDIR)/test_savedialog.o: ../../test/test_savedialog.c
+	@echo $(notdir $<)
+	$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
+
+-include $(OBJECTS:%.o=%.d)
+ifneq (,$(PCH))
+  -include $(OBJDIR)/$(notdir $(PCH)).d
+endif

+ 213 - 0
3rdparty/nativefiledialog/build/premake5.lua

@@ -0,0 +1,213 @@
+-- Native file dialog premake5 script
+--
+-- This can be ran directly, but commonly, it is only run
+-- by package maintainers.
+--
+-- IMPORTANT NOTE: premake5 alpha 9 does not handle this script
+-- properly.  Build premake5 from Github master, or, presumably,
+-- use alpha 10 in the future.
+
+workspace "NativeFileDialog"
+  -- these dir specifications assume the generated files have been moved
+  -- into a subdirectory.  ex: $root/build/makefile
+  local root_dir = path.join(path.getdirectory(_SCRIPT),"../../")
+  local build_dir = path.join(root_dir,"build/")
+  configurations { "Release", "Debug" }
+  platforms {"x64", "x86"}
+
+  objdir(path.join(build_dir, "obj/"))
+
+  -- architecture filters
+  filter "configurations:x86"
+    architecture "x86"
+  
+  filter "configurations:x64"
+    architecture "x86_64"
+
+  -- debug/release filters
+  filter "configurations:Debug"
+    defines {"DEBUG"}
+    symbols "On"
+    targetsuffix "_d"
+
+  filter "configurations:Release"
+    defines {"NDEBUG"}
+    optimize "On"
+
+  project "nfd"
+    kind "StaticLib"
+
+    -- common files
+    files {root_dir.."src/*.h",
+           root_dir.."src/include/*.h",
+           root_dir.."src/nfd_common.c",
+    }
+
+    includedirs {root_dir.."src/include/"}
+    targetdir(build_dir.."/lib/%{cfg.buildcfg}/%{cfg.platform}")
+
+    -- system build filters
+    filter "system:windows"
+      language "C++"
+      files {root_dir.."src/nfd_win.cpp"}
+
+    filter {"action:gmake or action:xcode4"}
+      buildoptions {"-fno-exceptions"}
+
+    filter "system:macosx"
+      language "C"
+      files {root_dir.."src/nfd_cocoa.m"}
+
+    filter "system:linux"
+      language "C"
+      files {root_dir.."src/nfd_gtk.c"}
+      buildoptions {"`pkg-config --cflags gtk+-3.0`"}
+
+    -- visual studio filters
+    filter "action:vs*"
+      defines { "_CRT_SECURE_NO_WARNINGS" }      
+
+local make_test = function(name)
+  project(name)
+    kind "ConsoleApp"
+    language "C"
+    dependson {"nfd"}
+    targetdir(build_dir.."/bin")
+    files {root_dir.."test/"..name..".c"}
+    includedirs {root_dir.."src/include/"}
+
+
+    filter {"configurations:Debug", "architecture:x86_64"}
+      links {"nfd_d"}
+      libdirs {build_dir.."/lib/Debug/x64"}
+
+    filter {"configurations:Debug", "architecture:x86"}
+      links {"nfd_d"}
+      libdirs {build_dir.."/lib/Debug/x86"}
+
+    filter {"configurations:Release", "architecture:x86_64"}
+      links {"nfd"}
+      libdirs {build_dir.."/lib/Release/x64"}
+
+    filter {"configurations:Release", "architecture:x86"}
+      links {"nfd"}
+      libdirs {build_dir.."/lib/Release/x86"}
+
+    filter {"configurations:Debug"}
+      targetsuffix "_d"
+
+    filter {"configurations:Release", "system:linux"}
+      linkoptions {"-lnfd `pkg-config --libs gtk+-3.0`"}
+
+    filter {"system:macosx"}
+      links {"Foundation.framework", "AppKit.framework"}
+      
+    filter {"configurations:Debug", "system:linux"}
+      linkoptions {"-lnfd_d `pkg-config --libs gtk+-3.0`"}
+
+    filter {"action:gmake", "system:windows"}
+      links {"ole32", "uuid"}
+
+end
+
+make_test("test_pickfolder")
+make_test("test_opendialog")
+make_test("test_opendialogmultiple")
+make_test("test_savedialog")
+
+newaction
+{
+   trigger = "dist",
+   description = "Create distributable premake dirs (maintainer only)",
+   execute = function()
+
+
+      local premake_do_action = function(action,os_str,special)
+         local premake_dir
+         if special then
+            premake_dir = "./"..action.."_"..os_str
+         else
+            premake_dir = "./"..action
+         end
+         local premake_path = premake_dir.."/premake5.lua"
+
+         os.execute("mkdir "..premake_dir)
+         os.execute("cp premake5.lua "..premake_dir)
+         os.execute("premake5 --os="..os_str.." --file="..premake_path.." "..action)
+         os.execute("rm "..premake_path)
+      end
+      
+      premake_do_action("vs2010", "windows", false)
+      premake_do_action("xcode4", "macosx", false)
+      premake_do_action("gmake", "linux", true)
+      premake_do_action("gmake", "macosx", true)
+      premake_do_action("gmake", "windows", true)
+   end
+}
+
+newaction
+{
+    trigger     = "clean",
+    description = "Clean all build files and output",
+    execute = function ()
+
+        files_to_delete = 
+        {
+            "Makefile",
+            "*.make",
+            "*.txt",
+            "*.7z",
+            "*.zip",
+            "*.tar.gz",
+            "*.db",
+            "*.opendb",
+            "*.vcproj",
+            "*.vcxproj",
+            "*.vcxproj.user",
+            "*.vcxproj.filters",
+            "*.sln",
+            "*~*"
+        }
+
+        directories_to_delete = 
+        {
+            "obj",
+            "ipch",
+            "bin",
+            ".vs",
+            "Debug",
+            "Release",
+            "release",
+            "lib",
+            "test",
+            "makefiles",
+            "gmake",
+            "vs2010",
+            "xcode4",
+            "gmake_linux",
+            "gmake_macosx",
+            "gmake_windows"
+        }
+
+        for i,v in ipairs( directories_to_delete ) do
+          os.rmdir( v )
+        end
+
+        if os.is "macosx" then
+           os.execute("rm -rf *.xcodeproj")
+           os.execute("rm -rf *.xcworkspace")
+        end
+
+        if not os.is "windows" then
+            os.execute "find . -name .DS_Store -delete"
+            for i,v in ipairs( files_to_delete ) do
+              os.execute( "rm -f " .. v )
+            end
+        else
+            for i,v in ipairs( files_to_delete ) do
+              os.execute( "del /F /Q  " .. v )
+            end
+        end
+
+    end
+}

+ 78 - 0
3rdparty/nativefiledialog/build/vs2010/NativeFileDialog.sln

@@ -0,0 +1,78 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nfd", "nfd.vcxproj", "{5D94880B-C99D-887C-5219-9F7CBE21947C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_pickfolder", "test_pickfolder.vcxproj", "{C7D1F254-335D-6019-3C6E-E30DA878BC19}"
+	ProjectSection(ProjectDependencies) = postProject
+		{5D94880B-C99D-887C-5219-9F7CBE21947C} = {5D94880B-C99D-887C-5219-9F7CBE21947C}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_opendialog", "test_opendialog.vcxproj", "{86EEA43A-F279-12FF-FB8A-95F367956EFF}"
+	ProjectSection(ProjectDependencies) = postProject
+		{5D94880B-C99D-887C-5219-9F7CBE21947C} = {5D94880B-C99D-887C-5219-9F7CBE21947C}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_opendialogmultiple", "test_opendialogmultiple.vcxproj", "{72399713-DE70-DFAA-E77A-43CE533106A4}"
+	ProjectSection(ProjectDependencies) = postProject
+		{5D94880B-C99D-887C-5219-9F7CBE21947C} = {5D94880B-C99D-887C-5219-9F7CBE21947C}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_savedialog", "test_savedialog.vcxproj", "{23941773-8F1F-8537-9830-082C043BE137}"
+	ProjectSection(ProjectDependencies) = postProject
+		{5D94880B-C99D-887C-5219-9F7CBE21947C} = {5D94880B-C99D-887C-5219-9F7CBE21947C}
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
+		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{5D94880B-C99D-887C-5219-9F7CBE21947C}.Debug|Win32.ActiveCfg = Debug|Win32
+		{5D94880B-C99D-887C-5219-9F7CBE21947C}.Debug|Win32.Build.0 = Debug|Win32
+		{5D94880B-C99D-887C-5219-9F7CBE21947C}.Debug|x64.ActiveCfg = Debug|x64
+		{5D94880B-C99D-887C-5219-9F7CBE21947C}.Debug|x64.Build.0 = Debug|x64
+		{5D94880B-C99D-887C-5219-9F7CBE21947C}.Release|Win32.ActiveCfg = Release|Win32
+		{5D94880B-C99D-887C-5219-9F7CBE21947C}.Release|Win32.Build.0 = Release|Win32
+		{5D94880B-C99D-887C-5219-9F7CBE21947C}.Release|x64.ActiveCfg = Release|x64
+		{5D94880B-C99D-887C-5219-9F7CBE21947C}.Release|x64.Build.0 = Release|x64
+		{C7D1F254-335D-6019-3C6E-E30DA878BC19}.Debug|Win32.ActiveCfg = Debug|Win32
+		{C7D1F254-335D-6019-3C6E-E30DA878BC19}.Debug|Win32.Build.0 = Debug|Win32
+		{C7D1F254-335D-6019-3C6E-E30DA878BC19}.Debug|x64.ActiveCfg = Debug|x64
+		{C7D1F254-335D-6019-3C6E-E30DA878BC19}.Debug|x64.Build.0 = Debug|x64
+		{C7D1F254-335D-6019-3C6E-E30DA878BC19}.Release|Win32.ActiveCfg = Release|Win32
+		{C7D1F254-335D-6019-3C6E-E30DA878BC19}.Release|Win32.Build.0 = Release|Win32
+		{C7D1F254-335D-6019-3C6E-E30DA878BC19}.Release|x64.ActiveCfg = Release|x64
+		{C7D1F254-335D-6019-3C6E-E30DA878BC19}.Release|x64.Build.0 = Release|x64
+		{86EEA43A-F279-12FF-FB8A-95F367956EFF}.Debug|Win32.ActiveCfg = Debug|Win32
+		{86EEA43A-F279-12FF-FB8A-95F367956EFF}.Debug|Win32.Build.0 = Debug|Win32
+		{86EEA43A-F279-12FF-FB8A-95F367956EFF}.Debug|x64.ActiveCfg = Debug|x64
+		{86EEA43A-F279-12FF-FB8A-95F367956EFF}.Debug|x64.Build.0 = Debug|x64
+		{86EEA43A-F279-12FF-FB8A-95F367956EFF}.Release|Win32.ActiveCfg = Release|Win32
+		{86EEA43A-F279-12FF-FB8A-95F367956EFF}.Release|Win32.Build.0 = Release|Win32
+		{86EEA43A-F279-12FF-FB8A-95F367956EFF}.Release|x64.ActiveCfg = Release|x64
+		{86EEA43A-F279-12FF-FB8A-95F367956EFF}.Release|x64.Build.0 = Release|x64
+		{72399713-DE70-DFAA-E77A-43CE533106A4}.Debug|Win32.ActiveCfg = Debug|Win32
+		{72399713-DE70-DFAA-E77A-43CE533106A4}.Debug|Win32.Build.0 = Debug|Win32
+		{72399713-DE70-DFAA-E77A-43CE533106A4}.Debug|x64.ActiveCfg = Debug|x64
+		{72399713-DE70-DFAA-E77A-43CE533106A4}.Debug|x64.Build.0 = Debug|x64
+		{72399713-DE70-DFAA-E77A-43CE533106A4}.Release|Win32.ActiveCfg = Release|Win32
+		{72399713-DE70-DFAA-E77A-43CE533106A4}.Release|Win32.Build.0 = Release|Win32
+		{72399713-DE70-DFAA-E77A-43CE533106A4}.Release|x64.ActiveCfg = Release|x64
+		{72399713-DE70-DFAA-E77A-43CE533106A4}.Release|x64.Build.0 = Release|x64
+		{23941773-8F1F-8537-9830-082C043BE137}.Debug|Win32.ActiveCfg = Debug|Win32
+		{23941773-8F1F-8537-9830-082C043BE137}.Debug|Win32.Build.0 = Debug|Win32
+		{23941773-8F1F-8537-9830-082C043BE137}.Debug|x64.ActiveCfg = Debug|x64
+		{23941773-8F1F-8537-9830-082C043BE137}.Debug|x64.Build.0 = Debug|x64
+		{23941773-8F1F-8537-9830-082C043BE137}.Release|Win32.ActiveCfg = Release|Win32
+		{23941773-8F1F-8537-9830-082C043BE137}.Release|Win32.Build.0 = Release|Win32
+		{23941773-8F1F-8537-9830-082C043BE137}.Release|x64.ActiveCfg = Release|x64
+		{23941773-8F1F-8537-9830-082C043BE137}.Release|x64.Build.0 = Release|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

+ 165 - 0
3rdparty/nativefiledialog/build/vs2010/nfd.vcxproj

@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{5D94880B-C99D-887C-5219-9F7CBE21947C}</ProjectGuid>
+    <Keyword>Win32Proj</Keyword>
+    <RootNamespace>nfd</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <OutDir>..\lib\Release\x64\</OutDir>
+    <IntDir>..\obj\x64\Release\nfd\</IntDir>
+    <TargetName>nfd</TargetName>
+    <TargetExt>.lib</TargetExt>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <OutDir>..\lib\Release\x86\</OutDir>
+    <IntDir>..\obj\x86\Release\nfd\</IntDir>
+    <TargetName>nfd</TargetName>
+    <TargetExt>.lib</TargetExt>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <OutDir>..\lib\Debug\x64\</OutDir>
+    <IntDir>..\obj\x64\Debug\nfd\</IntDir>
+    <TargetName>nfd_d</TargetName>
+    <TargetExt>.lib</TargetExt>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <OutDir>..\lib\Debug\x86\</OutDir>
+    <IntDir>..\obj\x86\Debug\nfd\</IntDir>
+    <TargetName>nfd_d</TargetName>
+    <TargetExt>.lib</TargetExt>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <PreprocessorDefinitions>NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..\..\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <Optimization>Full</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <StringPooling>true</StringPooling>
+    </ClCompile>
+    <Link>
+      <SubSystem>Windows</SubSystem>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <PreprocessorDefinitions>NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..\..\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <Optimization>Full</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <StringPooling>true</StringPooling>
+    </ClCompile>
+    <Link>
+      <SubSystem>Windows</SubSystem>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <PreprocessorDefinitions>DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..\..\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <Optimization>Disabled</Optimization>
+    </ClCompile>
+    <Link>
+      <SubSystem>Windows</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <PreprocessorDefinitions>DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..\..\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+      <Optimization>Disabled</Optimization>
+    </ClCompile>
+    <Link>
+      <SubSystem>Windows</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClInclude Include="..\..\src\common.h" />
+    <ClInclude Include="..\..\src\include\nfd.h" />
+    <ClInclude Include="..\..\src\nfd_common.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\nfd_common.c" />
+    <ClCompile Include="..\..\src\nfd_win.cpp" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>

+ 19 - 0
3rdparty/nativefiledialog/build/vs2010/nfd.vcxproj.filters

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="include">
+      <UniqueIdentifier>{89AF369E-F58E-B539-FEA6-40106A051C9B}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\..\src\common.h" />
+    <ClInclude Include="..\..\src\include\nfd.h">
+      <Filter>include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nfd_common.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\nfd_common.c" />
+    <ClCompile Include="..\..\src\nfd_win.cpp" />
+  </ItemGroup>
+</Project>

+ 188 - 0
3rdparty/nativefiledialog/build/vs2010/test_opendialog.vcxproj

@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{86EEA43A-F279-12FF-FB8A-95F367956EFF}</ProjectGuid>
+    <Keyword>Win32Proj</Keyword>
+    <RootNamespace>test_opendialog</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <LinkIncremental>false</LinkIncremental>
+    <OutDir>..\bin\</OutDir>
+    <IntDir>..\obj\x64\Release\test_opendialog\</IntDir>
+    <TargetName>test_opendialog</TargetName>
+    <TargetExt>.exe</TargetExt>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LinkIncremental>false</LinkIncremental>
+    <OutDir>..\bin\</OutDir>
+    <IntDir>..\obj\x86\Release\test_opendialog\</IntDir>
+    <TargetName>test_opendialog</TargetName>
+    <TargetExt>.exe</TargetExt>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <LinkIncremental>true</LinkIncremental>
+    <OutDir>..\bin\</OutDir>
+    <IntDir>..\obj\x64\Debug\test_opendialog\</IntDir>
+    <TargetName>test_opendialog_d</TargetName>
+    <TargetExt>.exe</TargetExt>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <LinkIncremental>true</LinkIncremental>
+    <OutDir>..\bin\</OutDir>
+    <IntDir>..\obj\x86\Debug\test_opendialog\</IntDir>
+    <TargetName>test_opendialog_d</TargetName>
+    <TargetExt>.exe</TargetExt>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..\..\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <Optimization>Full</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <StringPooling>true</StringPooling>
+      <CompileAs>CompileAsC</CompileAs>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalLibraryDirectories>..\lib\Release\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..\..\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <Optimization>Full</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <StringPooling>true</StringPooling>
+      <CompileAs>CompileAsC</CompileAs>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalLibraryDirectories>..\lib\Release\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <PreprocessorDefinitions>DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..\..\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <Optimization>Disabled</Optimization>
+      <CompileAs>CompileAsC</CompileAs>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>nfd_d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>..\lib\Debug\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
+    </Link>
+    <ProjectReference>
+      <LinkLibraryDependencies>false</LinkLibraryDependencies>
+    </ProjectReference>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <PreprocessorDefinitions>DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..\..\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+      <Optimization>Disabled</Optimization>
+      <CompileAs>CompileAsC</CompileAs>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>nfd_d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>..\lib\Debug\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
+    </Link>
+    <ProjectReference>
+      <LinkLibraryDependencies>false</LinkLibraryDependencies>
+    </ProjectReference>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\test\test_opendialog.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="nfd.vcxproj">
+      <Project>{5D94880B-C99D-887C-5219-9F7CBE21947C}</Project>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>

+ 188 - 0
3rdparty/nativefiledialog/build/vs2010/test_opendialogmultiple.vcxproj

@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{72399713-DE70-DFAA-E77A-43CE533106A4}</ProjectGuid>
+    <Keyword>Win32Proj</Keyword>
+    <RootNamespace>test_opendialogmultiple</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <LinkIncremental>false</LinkIncremental>
+    <OutDir>..\bin\</OutDir>
+    <IntDir>..\obj\x64\Release\test_opendialogmultiple\</IntDir>
+    <TargetName>test_opendialogmultiple</TargetName>
+    <TargetExt>.exe</TargetExt>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LinkIncremental>false</LinkIncremental>
+    <OutDir>..\bin\</OutDir>
+    <IntDir>..\obj\x86\Release\test_opendialogmultiple\</IntDir>
+    <TargetName>test_opendialogmultiple</TargetName>
+    <TargetExt>.exe</TargetExt>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <LinkIncremental>true</LinkIncremental>
+    <OutDir>..\bin\</OutDir>
+    <IntDir>..\obj\x64\Debug\test_opendialogmultiple\</IntDir>
+    <TargetName>test_opendialogmultiple_d</TargetName>
+    <TargetExt>.exe</TargetExt>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <LinkIncremental>true</LinkIncremental>
+    <OutDir>..\bin\</OutDir>
+    <IntDir>..\obj\x86\Debug\test_opendialogmultiple\</IntDir>
+    <TargetName>test_opendialogmultiple_d</TargetName>
+    <TargetExt>.exe</TargetExt>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..\..\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <Optimization>Full</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <StringPooling>true</StringPooling>
+      <CompileAs>CompileAsC</CompileAs>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalLibraryDirectories>..\lib\Release\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..\..\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <Optimization>Full</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <StringPooling>true</StringPooling>
+      <CompileAs>CompileAsC</CompileAs>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalLibraryDirectories>..\lib\Release\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <PreprocessorDefinitions>DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..\..\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <Optimization>Disabled</Optimization>
+      <CompileAs>CompileAsC</CompileAs>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>nfd_d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>..\lib\Debug\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
+    </Link>
+    <ProjectReference>
+      <LinkLibraryDependencies>false</LinkLibraryDependencies>
+    </ProjectReference>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <PreprocessorDefinitions>DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..\..\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+      <Optimization>Disabled</Optimization>
+      <CompileAs>CompileAsC</CompileAs>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>nfd_d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>..\lib\Debug\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
+    </Link>
+    <ProjectReference>
+      <LinkLibraryDependencies>false</LinkLibraryDependencies>
+    </ProjectReference>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\test\test_opendialogmultiple.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="nfd.vcxproj">
+      <Project>{5D94880B-C99D-887C-5219-9F7CBE21947C}</Project>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>

+ 188 - 0
3rdparty/nativefiledialog/build/vs2010/test_pickfolder.vcxproj

@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{C7D1F254-335D-6019-3C6E-E30DA878BC19}</ProjectGuid>
+    <Keyword>Win32Proj</Keyword>
+    <RootNamespace>test_pickfolder</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <LinkIncremental>false</LinkIncremental>
+    <OutDir>..\bin\</OutDir>
+    <IntDir>..\obj\x64\Release\test_pickfolder\</IntDir>
+    <TargetName>test_pickfolder</TargetName>
+    <TargetExt>.exe</TargetExt>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LinkIncremental>false</LinkIncremental>
+    <OutDir>..\bin\</OutDir>
+    <IntDir>..\obj\x86\Release\test_pickfolder\</IntDir>
+    <TargetName>test_pickfolder</TargetName>
+    <TargetExt>.exe</TargetExt>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <LinkIncremental>true</LinkIncremental>
+    <OutDir>..\bin\</OutDir>
+    <IntDir>..\obj\x64\Debug\test_pickfolder\</IntDir>
+    <TargetName>test_pickfolder_d</TargetName>
+    <TargetExt>.exe</TargetExt>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <LinkIncremental>true</LinkIncremental>
+    <OutDir>..\bin\</OutDir>
+    <IntDir>..\obj\x86\Debug\test_pickfolder\</IntDir>
+    <TargetName>test_pickfolder_d</TargetName>
+    <TargetExt>.exe</TargetExt>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..\..\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <Optimization>Full</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <StringPooling>true</StringPooling>
+      <CompileAs>CompileAsC</CompileAs>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalLibraryDirectories>..\lib\Release\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..\..\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <Optimization>Full</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <StringPooling>true</StringPooling>
+      <CompileAs>CompileAsC</CompileAs>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalLibraryDirectories>..\lib\Release\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <PreprocessorDefinitions>DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..\..\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <Optimization>Disabled</Optimization>
+      <CompileAs>CompileAsC</CompileAs>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>nfd_d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>..\lib\Debug\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
+    </Link>
+    <ProjectReference>
+      <LinkLibraryDependencies>false</LinkLibraryDependencies>
+    </ProjectReference>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <PreprocessorDefinitions>DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..\..\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+      <Optimization>Disabled</Optimization>
+      <CompileAs>CompileAsC</CompileAs>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>nfd_d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>..\lib\Debug\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
+    </Link>
+    <ProjectReference>
+      <LinkLibraryDependencies>false</LinkLibraryDependencies>
+    </ProjectReference>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\test\test_pickfolder.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="nfd.vcxproj">
+      <Project>{5D94880B-C99D-887C-5219-9F7CBE21947C}</Project>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>

+ 188 - 0
3rdparty/nativefiledialog/build/vs2010/test_savedialog.vcxproj

@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{23941773-8F1F-8537-9830-082C043BE137}</ProjectGuid>
+    <Keyword>Win32Proj</Keyword>
+    <RootNamespace>test_savedialog</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <LinkIncremental>false</LinkIncremental>
+    <OutDir>..\bin\</OutDir>
+    <IntDir>..\obj\x64\Release\test_savedialog\</IntDir>
+    <TargetName>test_savedialog</TargetName>
+    <TargetExt>.exe</TargetExt>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LinkIncremental>false</LinkIncremental>
+    <OutDir>..\bin\</OutDir>
+    <IntDir>..\obj\x86\Release\test_savedialog\</IntDir>
+    <TargetName>test_savedialog</TargetName>
+    <TargetExt>.exe</TargetExt>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <LinkIncremental>true</LinkIncremental>
+    <OutDir>..\bin\</OutDir>
+    <IntDir>..\obj\x64\Debug\test_savedialog\</IntDir>
+    <TargetName>test_savedialog_d</TargetName>
+    <TargetExt>.exe</TargetExt>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <LinkIncremental>true</LinkIncremental>
+    <OutDir>..\bin\</OutDir>
+    <IntDir>..\obj\x86\Debug\test_savedialog\</IntDir>
+    <TargetName>test_savedialog_d</TargetName>
+    <TargetExt>.exe</TargetExt>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..\..\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <Optimization>Full</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <StringPooling>true</StringPooling>
+      <CompileAs>CompileAsC</CompileAs>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalLibraryDirectories>..\lib\Release\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..\..\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <Optimization>Full</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <StringPooling>true</StringPooling>
+      <CompileAs>CompileAsC</CompileAs>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalLibraryDirectories>..\lib\Release\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <PreprocessorDefinitions>DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..\..\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <Optimization>Disabled</Optimization>
+      <CompileAs>CompileAsC</CompileAs>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>nfd_d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>..\lib\Debug\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
+    </Link>
+    <ProjectReference>
+      <LinkLibraryDependencies>false</LinkLibraryDependencies>
+    </ProjectReference>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <PreprocessorDefinitions>DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..\..\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+      <Optimization>Disabled</Optimization>
+      <CompileAs>CompileAsC</CompileAs>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>nfd_d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>..\lib\Debug\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
+    </Link>
+    <ProjectReference>
+      <LinkLibraryDependencies>false</LinkLibraryDependencies>
+    </ProjectReference>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\test\test_savedialog.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="nfd.vcxproj">
+      <Project>{5D94880B-C99D-887C-5219-9F7CBE21947C}</Project>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>

+ 19 - 0
3rdparty/nativefiledialog/build/xcode4/NativeFileDialog.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+	version = "1.0">
+	<FileRef
+		location = "group:nfd.xcodeproj">
+	</FileRef>
+	<FileRef
+		location = "group:test_pickfolder.xcodeproj">
+	</FileRef>
+	<FileRef
+		location = "group:test_opendialog.xcodeproj">
+	</FileRef>
+	<FileRef
+		location = "group:test_opendialogmultiple.xcodeproj">
+	</FileRef>
+	<FileRef
+		location = "group:test_savedialog.xcodeproj">
+	</FileRef>
+</Workspace>

+ 231 - 0
3rdparty/nativefiledialog/build/xcode4/nfd.xcodeproj/project.pbxproj

@@ -0,0 +1,231 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		0815210EBC5EF6DB4C114F4E /* nfd_cocoa.m in Sources */ = {isa = PBXBuildFile; fileRef = 906CCB56F599BE831D99F196 /* nfd_cocoa.m */; };
+		F946FD22E75D7A2F2D07BB62 /* nfd_common.c in Sources */ = {isa = PBXBuildFile; fileRef = 5A7B972ABEB20997E78B4D6A /* nfd_common.c */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+		4E280AA733A1E674D60FB8E7 /* libnfd.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libnfd.a; path = libnfd.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		5A7B972ABEB20997E78B4D6A /* nfd_common.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = nfd_common.c; path = ../../src/nfd_common.c; sourceTree = "<group>"; };
+		5E955E06F34AB373E372D446 /* common.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = common.h; path = ../../src/common.h; sourceTree = "<group>"; };
+		6832C617FF932AC49A46CC57 /* nfd.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = nfd.h; path = ../../src/include/nfd.h; sourceTree = "<group>"; };
+		906CCB56F599BE831D99F196 /* nfd_cocoa.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = nfd_cocoa.m; path = ../../src/nfd_cocoa.m; sourceTree = "<group>"; };
+		F016F634544D68A17D26AC74 /* nfd_common.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = nfd_common.h; path = ../../src/nfd_common.h; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		5AC8C497181AC1E47F9352D7 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		50F305D80450E7A5B5C63418 /* nfd */ = {
+			isa = PBXGroup;
+			children = (
+				5E955E06F34AB373E372D446 /* common.h */,
+				5E8C7250F123887D15175890 /* include */,
+				906CCB56F599BE831D99F196 /* nfd_cocoa.m */,
+				5A7B972ABEB20997E78B4D6A /* nfd_common.c */,
+				F016F634544D68A17D26AC74 /* nfd_common.h */,
+				A6C936B4B32D40A1EA134CF4 /* Products */,
+			);
+			name = nfd;
+			sourceTree = "<group>";
+		};
+		5E8C7250F123887D15175890 /* include */ = {
+			isa = PBXGroup;
+			children = (
+				6832C617FF932AC49A46CC57 /* nfd.h */,
+			);
+			name = include;
+			sourceTree = "<group>";
+		};
+		A6C936B4B32D40A1EA134CF4 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				4E280AA733A1E674D60FB8E7 /* libnfd.a */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		ED35A9AD7FCCBFDAA3C08FED /* nfd */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 49040CF606560A436DCE9B36 /* Build configuration list for PBXNativeTarget "nfd" */;
+			buildPhases = (
+				CAB0453788024284EF7AD377 /* Resources */,
+				345D5E8EF1AF5BDB5927ECCE /* Sources */,
+				5AC8C497181AC1E47F9352D7 /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = nfd;
+			productName = nfd;
+			productReference = 4E280AA733A1E674D60FB8E7 /* libnfd.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		08FB7793FE84155DC02AAC07 /* Project object */ = {
+			isa = PBXProject;
+			buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "nfd" */;
+			compatibilityVersion = "Xcode 3.2";
+			hasScannedForEncodings = 1;
+			mainGroup = 50F305D80450E7A5B5C63418 /* nfd */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				ED35A9AD7FCCBFDAA3C08FED /* libnfd.a */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		CAB0453788024284EF7AD377 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		345D5E8EF1AF5BDB5927ECCE /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				0815210EBC5EF6DB4C114F4E /* nfd_cocoa.m in Sources */,
+				F946FD22E75D7A2F2D07BB62 /* nfd_common.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		67308967B931C1D4D21BBFA7 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = i386;
+				CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
+				CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
+				COPY_PHASE_STRIP = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					DEBUG,
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				OBJROOT = ../obj/x86/Debug/nfd;
+				ONLY_ACTIVE_ARCH = YES;
+				OTHER_CFLAGS = (
+					"-fno-exceptions",
+				);
+				SYMROOT = ../lib/Debug/x86;
+				USER_HEADER_SEARCH_PATHS = (
+					../../src/include,
+				);
+			};
+			name = Debug;
+		};
+		8FABFCB67AB0BCC3BEB27AF6 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CONFIGURATION_BUILD_DIR = ../lib/Release/x86;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				GCC_DYNAMIC_NO_PIC = NO;
+				INSTALL_PATH = /usr/local/lib;
+				PRODUCT_NAME = nfd;
+			};
+			name = Release;
+		};
+		E9E05961C111610EBC721FA1 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = i386;
+				CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
+				CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_OPTIMIZATION_LEVEL = 3;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					NDEBUG,
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				OBJROOT = ../obj/x86/Release/nfd;
+				ONLY_ACTIVE_ARCH = NO;
+				OTHER_CFLAGS = (
+					"-fno-exceptions",
+				);
+				SYMROOT = ../lib/Release/x86;
+				USER_HEADER_SEARCH_PATHS = (
+					../../src/include,
+				);
+			};
+			name = Release;
+		};
+		F08D42BCFB589B89235F30FC /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CONFIGURATION_BUILD_DIR = ../lib/Debug/x86;
+				GCC_DYNAMIC_NO_PIC = NO;
+				INSTALL_PATH = /usr/local/lib;
+				PRODUCT_NAME = nfd_d;
+			};
+			name = Debug;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "nfd" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				E9E05961C111610EBC721FA1 /* Release */,
+				E9E05961C111610EBC721FA1 /* Release */,
+				67308967B931C1D4D21BBFA7 /* Debug */,
+				67308967B931C1D4D21BBFA7 /* Debug */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		49040CF606560A436DCE9B36 /* Build configuration list for PBXNativeTarget "libnfd.a" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				8FABFCB67AB0BCC3BEB27AF6 /* Release */,
+				8FABFCB67AB0BCC3BEB27AF6 /* Release */,
+				F08D42BCFB589B89235F30FC /* Debug */,
+				F08D42BCFB589B89235F30FC /* Debug */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+};
+rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
+}

+ 295 - 0
3rdparty/nativefiledialog/build/xcode4/test_opendialog.xcodeproj/project.pbxproj

@@ -0,0 +1,295 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		B762408A08F77A97261D3ECA /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 893A8412C6BF137F4CBC7A52 /* AppKit.framework */; };
+		BDAA66E6F02B5DF3DD9FA526 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B74DEAEE9148B1BB3A914EE /* Foundation.framework */; };
+		BDAFE749B7152E16153F5589 /* libnfd.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EC7F10B128DC54DEF09776F1 /* libnfd.a */; };
+		DA9A5B44E6664C91E40DE984 /* test_opendialog.c in Sources */ = {isa = PBXBuildFile; fileRef = 3014192CE0FA37D9DBEC9F6C /* test_opendialog.c */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+		57D02ABA6A64EC4744D188FA /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = EAA847CCB2AE119971CD760C /* nfd.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 4E280AA733A1E674D60FB8E7;
+			remoteInfo = libnfd.a;
+		};
+		AA0A9D53BC9F5EE0970BFB93 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = EAA847CCB2AE119971CD760C /* nfd.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = ED35A9AD7FCCBFDAA3C08FED;
+			remoteInfo = libnfd.a;
+		};
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+		3014192CE0FA37D9DBEC9F6C /* test_opendialog.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = test_opendialog.c; path = ../../test/test_opendialog.c; sourceTree = "<group>"; };
+		4B74DEAEE9148B1BB3A914EE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+		60AA47EAC5D73B17EDD76E2A /* test_opendialog */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = test_opendialog; path = test_opendialog; sourceTree = BUILT_PRODUCTS_DIR; };
+		893A8412C6BF137F4CBC7A52 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
+		EAA847CCB2AE119971CD760C /* libnfd.a */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "nfd.xcodeproj"; path = nfd.xcodeproj; sourceTree = SOURCE_ROOT; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		D3B0D85A6B113D0705C4DE9A /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				BDAA66E6F02B5DF3DD9FA526 /* Foundation.framework in Frameworks */,
+				B762408A08F77A97261D3ECA /* AppKit.framework in Frameworks */,
+				BDAFE749B7152E16153F5589 /* libnfd.a in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		5D4848BA4E548CA76476DEFA /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				EC7F10B128DC54DEF09776F1 /* libnfd.a */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		9D968EAAA9FA9897E0E0A4EA /* Projects */ = {
+			isa = PBXGroup;
+			children = (
+				EAA847CCB2AE119971CD760C /* nfd.xcodeproj */,
+			);
+			name = Projects;
+			sourceTree = "<group>";
+		};
+		A6C936B4B32D40A1EA134CF4 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				60AA47EAC5D73B17EDD76E2A /* test_opendialog */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		BBF767817185A0AEFA200DC1 /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				4B74DEAEE9148B1BB3A914EE /* Foundation.framework */,
+				893A8412C6BF137F4CBC7A52 /* AppKit.framework */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+		FDE62101BB381E4E22B0AF41 /* test_opendialog */ = {
+			isa = PBXGroup;
+			children = (
+				3014192CE0FA37D9DBEC9F6C /* test_opendialog.c */,
+				BBF767817185A0AEFA200DC1 /* Frameworks */,
+				A6C936B4B32D40A1EA134CF4 /* Products */,
+				9D968EAAA9FA9897E0E0A4EA /* Projects */,
+			);
+			name = test_opendialog;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		A7F3CA90BA888C1D94F528D0 /* test_opendialog */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = C1EC20B9594C8566F40026F9 /* Build configuration list for PBXNativeTarget "test_opendialog" */;
+			buildPhases = (
+				439858FADAF8BDA775AC5F3A /* Resources */,
+				AD45725144A5D6FEDF597891 /* Sources */,
+				D3B0D85A6B113D0705C4DE9A /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				4B0085C33C0CC9B0522F1C03 /* PBXTargetDependency */,
+			);
+			name = test_opendialog;
+			productInstallPath = "$(HOME)/bin";
+			productName = test_opendialog;
+			productReference = 60AA47EAC5D73B17EDD76E2A /* test_opendialog */;
+			productType = "com.apple.product-type.tool";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		08FB7793FE84155DC02AAC07 /* Project object */ = {
+			isa = PBXProject;
+			buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "test_opendialog" */;
+			compatibilityVersion = "Xcode 3.2";
+			hasScannedForEncodings = 1;
+			mainGroup = FDE62101BB381E4E22B0AF41 /* test_opendialog */;
+			projectDirPath = "";
+			projectReferences = (
+				{
+					ProductGroup = 5D4848BA4E548CA76476DEFA /* Products */;
+					ProjectRef = EAA847CCB2AE119971CD760C /* nfd.xcodeproj */;
+				},
+			);
+			projectRoot = "";
+			targets = (
+				A7F3CA90BA888C1D94F528D0 /* test_opendialog */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXReferenceProxy section */
+		EC7F10B128DC54DEF09776F1 /* libnfd.a */ = {
+			isa = PBXReferenceProxy;
+			fileType = archive.ar;
+			path = libnfd.a;
+			remoteRef = 57D02ABA6A64EC4744D188FA /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+/* End PBXReferenceProxy section */
+
+/* Begin PBXResourcesBuildPhase section */
+		439858FADAF8BDA775AC5F3A /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		AD45725144A5D6FEDF597891 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DA9A5B44E6664C91E40DE984 /* test_opendialog.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+		4B0085C33C0CC9B0522F1C03 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = libnfd.a;
+			targetProxy = AA0A9D53BC9F5EE0970BFB93 /* PBXContainerItemProxy */;
+		};
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		188342B0098F869D1FB1D8F0 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = i386;
+				CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
+				CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
+				COPY_PHASE_STRIP = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					DEBUG,
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				LIBRARY_SEARCH_PATHS = (
+					../lib/Debug/x86,
+				);
+				OBJROOT = ../obj/x86/Debug/test_opendialog;
+				ONLY_ACTIVE_ARCH = YES;
+				OTHER_LDFLAGS = (
+					"-lnfd_d",
+				);
+				SYMROOT = ../bin;
+				USER_HEADER_SEARCH_PATHS = (
+					../../src/include,
+				);
+			};
+			name = Debug;
+		};
+		2B21E9B968A67926EEA3DFF9 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CONFIGURATION_BUILD_DIR = ../bin;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				GCC_DYNAMIC_NO_PIC = NO;
+				INSTALL_PATH = /usr/local/bin;
+				PRODUCT_NAME = test_opendialog;
+			};
+			name = Release;
+		};
+		3AC688EA9FF37C17C7F3AF2A /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = i386;
+				CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
+				CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_OPTIMIZATION_LEVEL = 3;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					NDEBUG,
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				LIBRARY_SEARCH_PATHS = (
+					../lib/Release/x86,
+				);
+				OBJROOT = ../obj/x86/Release/test_opendialog;
+				ONLY_ACTIVE_ARCH = NO;
+				SYMROOT = ../bin;
+				USER_HEADER_SEARCH_PATHS = (
+					../../src/include,
+				);
+			};
+			name = Release;
+		};
+		888E12FFF2DDE32C8A9D793F /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CONFIGURATION_BUILD_DIR = ../bin;
+				GCC_DYNAMIC_NO_PIC = NO;
+				INSTALL_PATH = /usr/local/bin;
+				PRODUCT_NAME = test_opendialog_d;
+			};
+			name = Debug;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "test_opendialog" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				3AC688EA9FF37C17C7F3AF2A /* Release */,
+				3AC688EA9FF37C17C7F3AF2A /* Release */,
+				188342B0098F869D1FB1D8F0 /* Debug */,
+				188342B0098F869D1FB1D8F0 /* Debug */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		C1EC20B9594C8566F40026F9 /* Build configuration list for PBXNativeTarget "test_opendialog" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				2B21E9B968A67926EEA3DFF9 /* Release */,
+				2B21E9B968A67926EEA3DFF9 /* Release */,
+				888E12FFF2DDE32C8A9D793F /* Debug */,
+				888E12FFF2DDE32C8A9D793F /* Debug */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+};
+rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
+}

+ 295 - 0
3rdparty/nativefiledialog/build/xcode4/test_opendialogmultiple.xcodeproj/project.pbxproj

@@ -0,0 +1,295 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		B762408A08F77A97261D3ECA /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 893A8412C6BF137F4CBC7A52 /* AppKit.framework */; };
+		BDAA66E6F02B5DF3DD9FA526 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B74DEAEE9148B1BB3A914EE /* Foundation.framework */; };
+		BDAFE749B7152E16153F5589 /* libnfd.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EC7F10B128DC54DEF09776F1 /* libnfd.a */; };
+		FD8CFC1C88A3E7691ED50A5C /* test_opendialogmultiple.c in Sources */ = {isa = PBXBuildFile; fileRef = 0452288486F2013122EF2EC4 /* test_opendialogmultiple.c */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+		57D02ABA6A64EC4744D188FA /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = EAA847CCB2AE119971CD760C /* nfd.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 4E280AA733A1E674D60FB8E7;
+			remoteInfo = libnfd.a;
+		};
+		AA0A9D53BC9F5EE0970BFB93 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = EAA847CCB2AE119971CD760C /* nfd.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = ED35A9AD7FCCBFDAA3C08FED;
+			remoteInfo = libnfd.a;
+		};
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+		0452288486F2013122EF2EC4 /* test_opendialogmultiple.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = test_opendialogmultiple.c; path = ../../test/test_opendialogmultiple.c; sourceTree = "<group>"; };
+		4B74DEAEE9148B1BB3A914EE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+		5EEA0056C939D08360F96696 /* test_opendialogmultiple */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = test_opendialogmultiple; path = test_opendialogmultiple; sourceTree = BUILT_PRODUCTS_DIR; };
+		893A8412C6BF137F4CBC7A52 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
+		EAA847CCB2AE119971CD760C /* libnfd.a */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "nfd.xcodeproj"; path = nfd.xcodeproj; sourceTree = SOURCE_ROOT; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		9EED3AC6EA89FC73AEC38106 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				BDAA66E6F02B5DF3DD9FA526 /* Foundation.framework in Frameworks */,
+				B762408A08F77A97261D3ECA /* AppKit.framework in Frameworks */,
+				BDAFE749B7152E16153F5589 /* libnfd.a in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		3323A4EDB6909F3AA7B8732D /* test_opendialogmultiple */ = {
+			isa = PBXGroup;
+			children = (
+				0452288486F2013122EF2EC4 /* test_opendialogmultiple.c */,
+				BBF767817185A0AEFA200DC1 /* Frameworks */,
+				A6C936B4B32D40A1EA134CF4 /* Products */,
+				9D968EAAA9FA9897E0E0A4EA /* Projects */,
+			);
+			name = test_opendialogmultiple;
+			sourceTree = "<group>";
+		};
+		5D4848BA4E548CA76476DEFA /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				EC7F10B128DC54DEF09776F1 /* libnfd.a */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		9D968EAAA9FA9897E0E0A4EA /* Projects */ = {
+			isa = PBXGroup;
+			children = (
+				EAA847CCB2AE119971CD760C /* nfd.xcodeproj */,
+			);
+			name = Projects;
+			sourceTree = "<group>";
+		};
+		A6C936B4B32D40A1EA134CF4 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				5EEA0056C939D08360F96696 /* test_opendialogmultiple */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		BBF767817185A0AEFA200DC1 /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				4B74DEAEE9148B1BB3A914EE /* Foundation.framework */,
+				893A8412C6BF137F4CBC7A52 /* AppKit.framework */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		AFA8257C0FF82409DE43C3BC /* test_opendialogmultiple */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 8D288325D8C544D29CFEC965 /* Build configuration list for PBXNativeTarget "test_opendialogmultiple" */;
+			buildPhases = (
+				0ED4BB665A717D131EAB01A6 /* Resources */,
+				7881D4BDC41E966A88581AFD /* Sources */,
+				9EED3AC6EA89FC73AEC38106 /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				4B0085C33C0CC9B0522F1C03 /* PBXTargetDependency */,
+			);
+			name = test_opendialogmultiple;
+			productInstallPath = "$(HOME)/bin";
+			productName = test_opendialogmultiple;
+			productReference = 5EEA0056C939D08360F96696 /* test_opendialogmultiple */;
+			productType = "com.apple.product-type.tool";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		08FB7793FE84155DC02AAC07 /* Project object */ = {
+			isa = PBXProject;
+			buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "test_opendialogmultiple" */;
+			compatibilityVersion = "Xcode 3.2";
+			hasScannedForEncodings = 1;
+			mainGroup = 3323A4EDB6909F3AA7B8732D /* test_opendialogmultiple */;
+			projectDirPath = "";
+			projectReferences = (
+				{
+					ProductGroup = 5D4848BA4E548CA76476DEFA /* Products */;
+					ProjectRef = EAA847CCB2AE119971CD760C /* nfd.xcodeproj */;
+				},
+			);
+			projectRoot = "";
+			targets = (
+				AFA8257C0FF82409DE43C3BC /* test_opendialogmultiple */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXReferenceProxy section */
+		EC7F10B128DC54DEF09776F1 /* libnfd.a */ = {
+			isa = PBXReferenceProxy;
+			fileType = archive.ar;
+			path = libnfd.a;
+			remoteRef = 57D02ABA6A64EC4744D188FA /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+/* End PBXReferenceProxy section */
+
+/* Begin PBXResourcesBuildPhase section */
+		0ED4BB665A717D131EAB01A6 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		7881D4BDC41E966A88581AFD /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				FD8CFC1C88A3E7691ED50A5C /* test_opendialogmultiple.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+		4B0085C33C0CC9B0522F1C03 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = libnfd.a;
+			targetProxy = AA0A9D53BC9F5EE0970BFB93 /* PBXContainerItemProxy */;
+		};
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		29841925C723C59291B84F65 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CONFIGURATION_BUILD_DIR = ../bin;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				GCC_DYNAMIC_NO_PIC = NO;
+				INSTALL_PATH = /usr/local/bin;
+				PRODUCT_NAME = test_opendialogmultiple;
+			};
+			name = Release;
+		};
+		39064156A35611833B15A796 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = i386;
+				CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
+				CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_OPTIMIZATION_LEVEL = 3;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					NDEBUG,
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				LIBRARY_SEARCH_PATHS = (
+					../lib/Release/x86,
+				);
+				OBJROOT = ../obj/x86/Release/test_opendialogmultiple;
+				ONLY_ACTIVE_ARCH = NO;
+				SYMROOT = ../bin;
+				USER_HEADER_SEARCH_PATHS = (
+					../../src/include,
+				);
+			};
+			name = Release;
+		};
+		A461F01C4A35D10902E2C65C /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = i386;
+				CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
+				CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
+				COPY_PHASE_STRIP = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					DEBUG,
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				LIBRARY_SEARCH_PATHS = (
+					../lib/Debug/x86,
+				);
+				OBJROOT = ../obj/x86/Debug/test_opendialogmultiple;
+				ONLY_ACTIVE_ARCH = YES;
+				OTHER_LDFLAGS = (
+					"-lnfd_d",
+				);
+				SYMROOT = ../bin;
+				USER_HEADER_SEARCH_PATHS = (
+					../../src/include,
+				);
+			};
+			name = Debug;
+		};
+		EB85776BCA85249840B71DAB /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CONFIGURATION_BUILD_DIR = ../bin;
+				GCC_DYNAMIC_NO_PIC = NO;
+				INSTALL_PATH = /usr/local/bin;
+				PRODUCT_NAME = test_opendialogmultiple_d;
+			};
+			name = Debug;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "test_opendialogmultiple" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				39064156A35611833B15A796 /* Release */,
+				39064156A35611833B15A796 /* Release */,
+				A461F01C4A35D10902E2C65C /* Debug */,
+				A461F01C4A35D10902E2C65C /* Debug */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		8D288325D8C544D29CFEC965 /* Build configuration list for PBXNativeTarget "test_opendialogmultiple" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				29841925C723C59291B84F65 /* Release */,
+				29841925C723C59291B84F65 /* Release */,
+				EB85776BCA85249840B71DAB /* Debug */,
+				EB85776BCA85249840B71DAB /* Debug */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+};
+rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
+}

+ 295 - 0
3rdparty/nativefiledialog/build/xcode4/test_pickfolder.xcodeproj/project.pbxproj

@@ -0,0 +1,295 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		2DE64B0639B23C533759D946 /* test_pickfolder.c in Sources */ = {isa = PBXBuildFile; fileRef = A6C583CE57ABA27B529E0A0E /* test_pickfolder.c */; };
+		B762408A08F77A97261D3ECA /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 893A8412C6BF137F4CBC7A52 /* AppKit.framework */; };
+		BDAA66E6F02B5DF3DD9FA526 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B74DEAEE9148B1BB3A914EE /* Foundation.framework */; };
+		BDAFE749B7152E16153F5589 /* libnfd.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EC7F10B128DC54DEF09776F1 /* libnfd.a */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+		57D02ABA6A64EC4744D188FA /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = EAA847CCB2AE119971CD760C /* nfd.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 4E280AA733A1E674D60FB8E7;
+			remoteInfo = libnfd.a;
+		};
+		AA0A9D53BC9F5EE0970BFB93 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = EAA847CCB2AE119971CD760C /* nfd.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = ED35A9AD7FCCBFDAA3C08FED;
+			remoteInfo = libnfd.a;
+		};
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+		4B74DEAEE9148B1BB3A914EE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+		893A8412C6BF137F4CBC7A52 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
+		A6C583CE57ABA27B529E0A0E /* test_pickfolder.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = test_pickfolder.c; path = ../../test/test_pickfolder.c; sourceTree = "<group>"; };
+		D96C690B3E995C3866998F4B /* test_pickfolder */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = test_pickfolder; path = test_pickfolder; sourceTree = BUILT_PRODUCTS_DIR; };
+		EAA847CCB2AE119971CD760C /* libnfd.a */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "nfd.xcodeproj"; path = nfd.xcodeproj; sourceTree = SOURCE_ROOT; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		FD7590FB94D5F5A82F89973B /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				BDAA66E6F02B5DF3DD9FA526 /* Foundation.framework in Frameworks */,
+				B762408A08F77A97261D3ECA /* AppKit.framework in Frameworks */,
+				BDAFE749B7152E16153F5589 /* libnfd.a in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		5D4848BA4E548CA76476DEFA /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				EC7F10B128DC54DEF09776F1 /* libnfd.a */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		8705BCC24457BA0FABD04B02 /* test_pickfolder */ = {
+			isa = PBXGroup;
+			children = (
+				A6C583CE57ABA27B529E0A0E /* test_pickfolder.c */,
+				BBF767817185A0AEFA200DC1 /* Frameworks */,
+				A6C936B4B32D40A1EA134CF4 /* Products */,
+				9D968EAAA9FA9897E0E0A4EA /* Projects */,
+			);
+			name = test_pickfolder;
+			sourceTree = "<group>";
+		};
+		9D968EAAA9FA9897E0E0A4EA /* Projects */ = {
+			isa = PBXGroup;
+			children = (
+				EAA847CCB2AE119971CD760C /* nfd.xcodeproj */,
+			);
+			name = Projects;
+			sourceTree = "<group>";
+		};
+		A6C936B4B32D40A1EA134CF4 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				D96C690B3E995C3866998F4B /* test_pickfolder */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		BBF767817185A0AEFA200DC1 /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				4B74DEAEE9148B1BB3A914EE /* Foundation.framework */,
+				893A8412C6BF137F4CBC7A52 /* AppKit.framework */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		1075CB91230A8D1EFD7729D1 /* test_pickfolder */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = EBB0D95A83113E071DC4DF9A /* Build configuration list for PBXNativeTarget "test_pickfolder" */;
+			buildPhases = (
+				6D5D119B04BD76489F7117DB /* Resources */,
+				D70A2AF26E6A8F9F091E3132 /* Sources */,
+				FD7590FB94D5F5A82F89973B /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				4B0085C33C0CC9B0522F1C03 /* PBXTargetDependency */,
+			);
+			name = test_pickfolder;
+			productInstallPath = "$(HOME)/bin";
+			productName = test_pickfolder;
+			productReference = D96C690B3E995C3866998F4B /* test_pickfolder */;
+			productType = "com.apple.product-type.tool";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		08FB7793FE84155DC02AAC07 /* Project object */ = {
+			isa = PBXProject;
+			buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "test_pickfolder" */;
+			compatibilityVersion = "Xcode 3.2";
+			hasScannedForEncodings = 1;
+			mainGroup = 8705BCC24457BA0FABD04B02 /* test_pickfolder */;
+			projectDirPath = "";
+			projectReferences = (
+				{
+					ProductGroup = 5D4848BA4E548CA76476DEFA /* Products */;
+					ProjectRef = EAA847CCB2AE119971CD760C /* nfd.xcodeproj */;
+				},
+			);
+			projectRoot = "";
+			targets = (
+				1075CB91230A8D1EFD7729D1 /* test_pickfolder */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXReferenceProxy section */
+		EC7F10B128DC54DEF09776F1 /* libnfd.a */ = {
+			isa = PBXReferenceProxy;
+			fileType = archive.ar;
+			path = libnfd.a;
+			remoteRef = 57D02ABA6A64EC4744D188FA /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+/* End PBXReferenceProxy section */
+
+/* Begin PBXResourcesBuildPhase section */
+		6D5D119B04BD76489F7117DB /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		D70A2AF26E6A8F9F091E3132 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				2DE64B0639B23C533759D946 /* test_pickfolder.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+		4B0085C33C0CC9B0522F1C03 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = libnfd.a;
+			targetProxy = AA0A9D53BC9F5EE0970BFB93 /* PBXContainerItemProxy */;
+		};
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		22B4A81A60393787E6369E5A /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CONFIGURATION_BUILD_DIR = ../bin;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				GCC_DYNAMIC_NO_PIC = NO;
+				INSTALL_PATH = /usr/local/bin;
+				PRODUCT_NAME = test_pickfolder;
+			};
+			name = Release;
+		};
+		B1EBC5201C3B954DB3FB2B60 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CONFIGURATION_BUILD_DIR = ../bin;
+				GCC_DYNAMIC_NO_PIC = NO;
+				INSTALL_PATH = /usr/local/bin;
+				PRODUCT_NAME = test_pickfolder_d;
+			};
+			name = Debug;
+		};
+		B388AA0B18B59D3840B5D04B /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = i386;
+				CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
+				CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_OPTIMIZATION_LEVEL = 3;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					NDEBUG,
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				LIBRARY_SEARCH_PATHS = (
+					../lib/Release/x86,
+				);
+				OBJROOT = ../obj/x86/Release/test_pickfolder;
+				ONLY_ACTIVE_ARCH = NO;
+				SYMROOT = ../bin;
+				USER_HEADER_SEARCH_PATHS = (
+					../../src/include,
+				);
+			};
+			name = Release;
+		};
+		C658A791B764EB7ECD873DD1 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = i386;
+				CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
+				CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
+				COPY_PHASE_STRIP = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					DEBUG,
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				LIBRARY_SEARCH_PATHS = (
+					../lib/Debug/x86,
+				);
+				OBJROOT = ../obj/x86/Debug/test_pickfolder;
+				ONLY_ACTIVE_ARCH = YES;
+				OTHER_LDFLAGS = (
+					"-lnfd_d",
+				);
+				SYMROOT = ../bin;
+				USER_HEADER_SEARCH_PATHS = (
+					../../src/include,
+				);
+			};
+			name = Debug;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "test_pickfolder" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				B388AA0B18B59D3840B5D04B /* Release */,
+				B388AA0B18B59D3840B5D04B /* Release */,
+				C658A791B764EB7ECD873DD1 /* Debug */,
+				C658A791B764EB7ECD873DD1 /* Debug */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		EBB0D95A83113E071DC4DF9A /* Build configuration list for PBXNativeTarget "test_pickfolder" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				22B4A81A60393787E6369E5A /* Release */,
+				22B4A81A60393787E6369E5A /* Release */,
+				B1EBC5201C3B954DB3FB2B60 /* Debug */,
+				B1EBC5201C3B954DB3FB2B60 /* Debug */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+};
+rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
+}

+ 295 - 0
3rdparty/nativefiledialog/build/xcode4/test_savedialog.xcodeproj/project.pbxproj

@@ -0,0 +1,295 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		B762408A08F77A97261D3ECA /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 893A8412C6BF137F4CBC7A52 /* AppKit.framework */; };
+		BDAA66E6F02B5DF3DD9FA526 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B74DEAEE9148B1BB3A914EE /* Foundation.framework */; };
+		BDAFE749B7152E16153F5589 /* libnfd.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EC7F10B128DC54DEF09776F1 /* libnfd.a */; };
+		D68362BEE24F540BDFF6F0FE /* test_savedialog.c in Sources */ = {isa = PBXBuildFile; fileRef = 8B1CE4063C0302B336F56A46 /* test_savedialog.c */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+		57D02ABA6A64EC4744D188FA /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = EAA847CCB2AE119971CD760C /* nfd.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 4E280AA733A1E674D60FB8E7;
+			remoteInfo = libnfd.a;
+		};
+		AA0A9D53BC9F5EE0970BFB93 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = EAA847CCB2AE119971CD760C /* nfd.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = ED35A9AD7FCCBFDAA3C08FED;
+			remoteInfo = libnfd.a;
+		};
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+		34DE87E79A0B7B14C20BAE27 /* test_savedialog */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = test_savedialog; path = test_savedialog; sourceTree = BUILT_PRODUCTS_DIR; };
+		4B74DEAEE9148B1BB3A914EE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+		893A8412C6BF137F4CBC7A52 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
+		8B1CE4063C0302B336F56A46 /* test_savedialog.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = test_savedialog.c; path = ../../test/test_savedialog.c; sourceTree = "<group>"; };
+		EAA847CCB2AE119971CD760C /* libnfd.a */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "nfd.xcodeproj"; path = nfd.xcodeproj; sourceTree = SOURCE_ROOT; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		8152A1D718B30684B366A817 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				BDAA66E6F02B5DF3DD9FA526 /* Foundation.framework in Frameworks */,
+				B762408A08F77A97261D3ECA /* AppKit.framework in Frameworks */,
+				BDAFE749B7152E16153F5589 /* libnfd.a in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		5D4848BA4E548CA76476DEFA /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				EC7F10B128DC54DEF09776F1 /* libnfd.a */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		9D968EAAA9FA9897E0E0A4EA /* Projects */ = {
+			isa = PBXGroup;
+			children = (
+				EAA847CCB2AE119971CD760C /* nfd.xcodeproj */,
+			);
+			name = Projects;
+			sourceTree = "<group>";
+		};
+		A6C936B4B32D40A1EA134CF4 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				34DE87E79A0B7B14C20BAE27 /* test_savedialog */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		BBF767817185A0AEFA200DC1 /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				4B74DEAEE9148B1BB3A914EE /* Foundation.framework */,
+				893A8412C6BF137F4CBC7A52 /* AppKit.framework */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+		D43C4D1E918E4A6BF906DB5E /* test_savedialog */ = {
+			isa = PBXGroup;
+			children = (
+				8B1CE4063C0302B336F56A46 /* test_savedialog.c */,
+				BBF767817185A0AEFA200DC1 /* Frameworks */,
+				A6C936B4B32D40A1EA134CF4 /* Products */,
+				9D968EAAA9FA9897E0E0A4EA /* Projects */,
+			);
+			name = test_savedialog;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		EC717EEDFF06407AD972DD2D /* test_savedialog */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 6F8DEA3606EE4EE3A1A1F076 /* Build configuration list for PBXNativeTarget "test_savedialog" */;
+			buildPhases = (
+				F13A2277889A8724234E28B7 /* Resources */,
+				5AE73BCEF247A07B8CFB420E /* Sources */,
+				8152A1D718B30684B366A817 /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				4B0085C33C0CC9B0522F1C03 /* PBXTargetDependency */,
+			);
+			name = test_savedialog;
+			productInstallPath = "$(HOME)/bin";
+			productName = test_savedialog;
+			productReference = 34DE87E79A0B7B14C20BAE27 /* test_savedialog */;
+			productType = "com.apple.product-type.tool";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		08FB7793FE84155DC02AAC07 /* Project object */ = {
+			isa = PBXProject;
+			buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "test_savedialog" */;
+			compatibilityVersion = "Xcode 3.2";
+			hasScannedForEncodings = 1;
+			mainGroup = D43C4D1E918E4A6BF906DB5E /* test_savedialog */;
+			projectDirPath = "";
+			projectReferences = (
+				{
+					ProductGroup = 5D4848BA4E548CA76476DEFA /* Products */;
+					ProjectRef = EAA847CCB2AE119971CD760C /* nfd.xcodeproj */;
+				},
+			);
+			projectRoot = "";
+			targets = (
+				EC717EEDFF06407AD972DD2D /* test_savedialog */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXReferenceProxy section */
+		EC7F10B128DC54DEF09776F1 /* libnfd.a */ = {
+			isa = PBXReferenceProxy;
+			fileType = archive.ar;
+			path = libnfd.a;
+			remoteRef = 57D02ABA6A64EC4744D188FA /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+/* End PBXReferenceProxy section */
+
+/* Begin PBXResourcesBuildPhase section */
+		F13A2277889A8724234E28B7 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		5AE73BCEF247A07B8CFB420E /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				D68362BEE24F540BDFF6F0FE /* test_savedialog.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+		4B0085C33C0CC9B0522F1C03 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = libnfd.a;
+			targetProxy = AA0A9D53BC9F5EE0970BFB93 /* PBXContainerItemProxy */;
+		};
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		0EFAC8E77427BC149C27EF27 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = i386;
+				CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
+				CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_OPTIMIZATION_LEVEL = 3;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					NDEBUG,
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				LIBRARY_SEARCH_PATHS = (
+					../lib/Release/x86,
+				);
+				OBJROOT = ../obj/x86/Release/test_savedialog;
+				ONLY_ACTIVE_ARCH = NO;
+				SYMROOT = ../bin;
+				USER_HEADER_SEARCH_PATHS = (
+					../../src/include,
+				);
+			};
+			name = Release;
+		};
+		0F8CFFFC79DCD029119C663C /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CONFIGURATION_BUILD_DIR = ../bin;
+				GCC_DYNAMIC_NO_PIC = NO;
+				INSTALL_PATH = /usr/local/bin;
+				PRODUCT_NAME = test_savedialog_d;
+			};
+			name = Debug;
+		};
+		6D9009F6AB14996331120036 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CONFIGURATION_BUILD_DIR = ../bin;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				GCC_DYNAMIC_NO_PIC = NO;
+				INSTALL_PATH = /usr/local/bin;
+				PRODUCT_NAME = test_savedialog;
+			};
+			name = Release;
+		};
+		B5BD5F6DA6C9A35ABCEBF5AD /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = i386;
+				CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
+				CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
+				COPY_PHASE_STRIP = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					DEBUG,
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				LIBRARY_SEARCH_PATHS = (
+					../lib/Debug/x86,
+				);
+				OBJROOT = ../obj/x86/Debug/test_savedialog;
+				ONLY_ACTIVE_ARCH = YES;
+				OTHER_LDFLAGS = (
+					"-lnfd_d",
+				);
+				SYMROOT = ../bin;
+				USER_HEADER_SEARCH_PATHS = (
+					../../src/include,
+				);
+			};
+			name = Debug;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "test_savedialog" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				0EFAC8E77427BC149C27EF27 /* Release */,
+				0EFAC8E77427BC149C27EF27 /* Release */,
+				B5BD5F6DA6C9A35ABCEBF5AD /* Debug */,
+				B5BD5F6DA6C9A35ABCEBF5AD /* Debug */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		6F8DEA3606EE4EE3A1A1F076 /* Build configuration list for PBXNativeTarget "test_savedialog" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				6D9009F6AB14996331120036 /* Release */,
+				6D9009F6AB14996331120036 /* Release */,
+				0F8CFFFC79DCD029119C663C /* Debug */,
+				0F8CFFFC79DCD029119C663C /* Debug */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+};
+rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
+}

+ 31 - 0
3rdparty/nativefiledialog/docs/build.md

@@ -0,0 +1,31 @@
+# Building NFD #
+
+Most of the building instructions are included in [README.md](/README.md). This file just contains apocrypha.
+
+## Running Premake5 Directly ##
+
+*You shouldn't have to run Premake5 directly to build Native File Dialog.  This is for package maintainers or people with exotic demands only!*
+
+Premake5 is still in development.  The current version, as of this writing (Premake 5, alpha 9) is insufficient to build NFD.  This is due to a bug which has been fixed in the official repo's master branch and is expected to make its way into alpha 10.
+
+1. [Clone premake-core](https://github.com/premake/premake-core)
+2. [Follow instructions on how to build premake](https://github.com/premake/premake-core/wiki/Building-Premake)
+3. `cd` to `build`
+4. Type `premake5 <type>`, where <type> is the build you want to create.
+
+### Package Maintainer Only ###
+
+I support a custom Premake action: `premake5 dist`, which generates all of the checked in project types in subdirectories.  It is useful to run this command if you are submitting a pull request to test all of the supported premake configurations.  Do not check in the built projects; I will do so before accepting your pull request.
+
+## SCons build (deprecated) ##
+
+NFD used to use [SCons](http://www.scons.org) for cross-platform builds.  For the time being, the SCons scripts are still available.
+
+After installing SCons, build it with:
+
+    cd src
+    scons debug=[0,1]
+
+## Compiling with Mingw ##
+
+Use the Makefile in `build/gmake_windows` to build Native File Dialog with mingw.  This is tested against the [msys2 distribution](https://msys2.github.io/).

+ 25 - 0
3rdparty/nativefiledialog/docs/submitting_pull_requests.md

@@ -0,0 +1,25 @@
+# Pull Requests #
+
+I have had to turn away a number of pull requests due to avoidable circumstances.  Please read this file before submitting a pull request. Also look at existing, rejected pull requests which state the reason for rejection.
+
+Here are the rules:
+
+- **Submit pull requests to the devel branch**. The library must be tested on every compiler and OS, so there is no way I am going to just put your change in the master before it has been sync'd and tested on a number of machines. Master branch is depended upon by hundreds of projects.
+
+- **Test your changes on all platforms and compilers that you can.**  Also, state which platforms you have tested your code on.  32-bit or 64-bit.  Clang or GCC.  Visual Studio or Mingw.  I have to test all these to accept pull requests, so I prioritize changes that respect my time.
+
+- **Submit Premake build changes only**.  As of 1.1, SCons is deprecated.  Also, do not submit altered generated projects.  I will re-run Premake to re-generate them to ensure that I can still generate the project prior to admitting your pull request.
+
+- **Do not alter existing behavior to support your desired behavior**. For instance, rewriting file open dialogs to behave differently, while trading off functionality for compatibility, will get you rejected.  Consider creating an additional code path.  Instead of altering `nfd_win.cpp` to support Windows XP, create `nfd_win_legacy.cpp`, which exists alongside the newer file dialog.
+
+- **Do not submit anything I can't verify or maintain**.  If you add support for a compiler, include from-scratch install instructions  that you have tested yourself.  Accepting a pull request means I am now the maintainer of your code, so I must understand what it does and how to test it.
+
+- **Do not change the externally facing API**.  NFD needs to maintain ABI compatibility.
+
+## Submitting Cloud Autobuild systems ##
+
+I have received a few pull requests for Travis and AppVeyor-based autobuilding which I have not accepted.  NativeFileDialog is officially covered by my private BuildBot network which supports all three target OSes, both CPU architectures and four compilers.  I take the view that having a redundant, lesser autobuild system does not improve coverage: it gives a false positive when partial building succeeds.  Please do not invest time into cloud-based building with the hope of a pull request being accepted.
+
+## Contact Me ##
+
+Despite all of the "do nots" above, I am happy to recieve new pull requests!  If you have any questions about style, or what I would need to accept your specific request, please contact me ahead of submitting the pull request by opening an issue on Github with your question.  I will do my best to answer you.

BIN
3rdparty/nativefiledialog/screens/open_cocoa.png


BIN
3rdparty/nativefiledialog/screens/open_gtk3.png


BIN
3rdparty/nativefiledialog/screens/open_win8.png


+ 102 - 0
3rdparty/nativefiledialog/src/SConstruct

@@ -0,0 +1,102 @@
+# 
+# Native File Dialog
+#
+# Scons build script -- GCC, Clang, Visual Studio
+# Does not build test
+#
+# SCons builds are deprecated -- see README.md for details.
+
+import os
+        
+
+# target arch is build arch -- extend here for OS cross compiling
+target_os=str(Platform())
+
+# Corresponds to TARGET_ARCH set to environ.
+target_arch = ARGUMENTS.get('target_arch', None)
+
+# visual studio does not import from environment
+if target_os != 'win32':
+    IMPORT_FROM_ENV =['CC', 'CXX', 'CFLAGS', 'CXXFLAGS', 'ARFLAGS']
+else:
+    IMPORT_FROM_ENV =[]
+
+
+debug = int(ARGUMENTS.get( 'debug', 0 ))
+
+nfd_files = ['nfd_common.c']
+
+# Due to a Scons limitation, TARGET_ARCH cannot be appended to an existing environment.
+if target_arch != None:
+    nfd_env = Environment( TARGET_ARCH=target_arch )
+else:
+    nfd_env = Environment()
+
+# import specific environment variables from the command line, overriding
+# Scons environment defaults
+for env_key in IMPORT_FROM_ENV:
+    if env_key in os.environ:
+        print "Making %s => %s" % ( env_key, os.environ[env_key] )
+        nfd_env[env_key] = os.environ[env_key]
+
+# Windows runtime library types
+win_rtl = {'debug': '/MDd',     
+           'release': '/MD'}   
+
+def set_debug(env):
+    if target_os == 'win32':
+        env.Append( CCFLAGS=['/Z7',       # obj contains full symbols
+                            win_rtl['debug']
+                        ])
+    else:
+        env.Append( CFLAGS=['-g'] )
+
+
+def set_release(env):
+    if target_os == 'win32':
+        env.Append( CCFLAGS=[win_rtl['release'],  
+                            '/O2'] )
+    else:
+        env.Append( CFLAGS=['-O3'] )
+                    
+
+def set_warnings(env):
+    if target_os == 'win32':
+        env.Append( CCFLAGS=['/W3'],
+                    CPPDEFINES=['_CRT_SECURE_NO_WARNINGS'] )
+    else:
+        env.Append( CFLAGS=['-Wall', '-pedantic'] )
+
+
+def get_lib_name(base, is_debug):
+    if is_debug:
+        return base + '_d'
+    else:
+        return base
+
+
+# Cocoa OS X builds - clang
+if target_os == 'darwin':
+    nfd_files.append('nfd_cocoa.m')
+    nfd_env.CC='clang -fcolor-diagnostics'
+
+# Linux GTK+ 3 builds - GCC
+elif target_os == 'posix':
+    nfd_files.append('nfd_gtk.c')
+    nfd_env.ParseConfig( 'pkg-config --cflags gtk+-3.0' )
+
+# Windows builds - Visual Studio
+elif target_os == 'win32':
+    nfd_files.append('nfd_win.cpp')
+
+if debug:
+    set_debug(nfd_env)
+else:
+    set_release(nfd_env)
+
+set_warnings(nfd_env)
+
+nfd_env.Append( CPPPATH=['.','./include'] )
+nfd_env.StaticLibrary( get_lib_name('nfd', debug), nfd_files )
+
+print "*** Scons builds are deprecated!  See README.md for details."

+ 21 - 0
3rdparty/nativefiledialog/src/common.h

@@ -0,0 +1,21 @@
+/*
+  Native File Dialog
+
+  Internal, common across platforms
+
+  http://www.frogtoss.com/labs
+ */
+
+
+#ifndef _NFD_COMMON_H
+#define _NFD_COMMON_H
+
+#define NFD_MAX_STRLEN 256
+#define _NFD_UNUSED(x) ((void)x) 
+
+void *NFDi_Malloc( size_t bytes );
+void  NFDi_Free( void *ptr );
+void  NFDi_SetError( const char *msg );
+void  NFDi_SafeStrncpy( char *dst, const char *src, size_t maxCopy );
+
+#endif

+ 74 - 0
3rdparty/nativefiledialog/src/include/nfd.h

@@ -0,0 +1,74 @@
+/*
+  Native File Dialog
+
+  User API
+
+  http://www.frogtoss.com/labs
+ */
+
+
+#ifndef _NFD_H
+#define _NFD_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stddef.h>
+
+/* denotes UTF-8 char */
+typedef char nfdchar_t;
+
+/* opaque data structure -- see NFD_PathSet_* */
+typedef struct {
+    nfdchar_t *buf;
+    size_t *indices; /* byte offsets into buf */
+    size_t count;    /* number of indices into buf */
+}nfdpathset_t;
+
+typedef enum {
+    NFD_ERROR,       /* programmatic error */
+    NFD_OKAY,        /* user pressed okay, or successful return */
+    NFD_CANCEL       /* user pressed cancel */
+}nfdresult_t;
+    
+
+/* nfd_<targetplatform>.c */
+
+/* single file open dialog */    
+nfdresult_t NFD_OpenDialog( const nfdchar_t *filterList,
+                            const nfdchar_t *defaultPath,
+                            nfdchar_t **outPath );
+
+/* multiple file open dialog */    
+nfdresult_t NFD_OpenDialogMultiple( const nfdchar_t *filterList,
+                                    const nfdchar_t *defaultPath,
+                                    nfdpathset_t *outPaths );
+
+/* save dialog */
+nfdresult_t NFD_SaveDialog( const nfdchar_t *filterList,
+                            const nfdchar_t *defaultPath,
+                            nfdchar_t **outPath );
+
+
+/* select folder dialog */
+nfdresult_t NFD_PickFolder( const nfdchar_t *defaultPath,
+                            nfdchar_t **outPath);
+
+/* nfd_common.c */
+
+/* get last error -- set when nfdresult_t returns NFD_ERROR */
+const char *NFD_GetError( void );
+/* get the number of entries stored in pathSet */
+size_t      NFD_PathSet_GetCount( const nfdpathset_t *pathSet );
+/* Get the UTF-8 path at offset index */
+nfdchar_t  *NFD_PathSet_GetPath( const nfdpathset_t *pathSet, size_t index );
+/* Free the pathSet */    
+void        NFD_PathSet_Free( nfdpathset_t *pathSet );
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

+ 276 - 0
3rdparty/nativefiledialog/src/nfd_cocoa.m

@@ -0,0 +1,276 @@
+/*
+  Native File Dialog
+
+  http://www.frogtoss.com/labs
+ */
+
+#include <AppKit/AppKit.h>
+#include "nfd.h"
+#include "nfd_common.h"
+
+static NSArray *BuildAllowedFileTypes( const char *filterList )
+{
+    // Commas and semicolons are the same thing on this platform
+
+    NSMutableArray *buildFilterList = [[NSMutableArray alloc] init];
+
+    char typebuf[NFD_MAX_STRLEN] = {0};
+    
+    size_t filterListLen = strlen(filterList);
+    char *p_typebuf = typebuf;
+    for ( size_t i = 0; i < filterListLen+1; ++i )
+    {
+        if ( filterList[i] == ',' || filterList[i] == ';' || filterList[i] == '\0' )
+        {
+            ++p_typebuf;
+            *p_typebuf = '\0';
+            NSString *thisType = [NSString stringWithUTF8String: typebuf];
+            [buildFilterList addObject:thisType];
+            p_typebuf = typebuf;
+            *p_typebuf = '\0';
+        }
+        else
+        {
+            *p_typebuf = filterList[i];
+            ++p_typebuf;
+
+        }
+    }
+
+    NSArray *returnArray = [NSArray arrayWithArray:buildFilterList];
+
+    [buildFilterList release];
+    return returnArray;
+}
+
+static void AddFilterListToDialog( NSSavePanel *dialog, const char *filterList )
+{
+    if ( !filterList || strlen(filterList) == 0 )
+        return;
+
+    NSArray *allowedFileTypes = BuildAllowedFileTypes( filterList );
+    if ( [allowedFileTypes count] != 0 )
+    {
+        [dialog setAllowedFileTypes:allowedFileTypes];
+    }
+}
+
+static void SetDefaultPath( NSSavePanel *dialog, const nfdchar_t *defaultPath )
+{
+    if ( !defaultPath || strlen(defaultPath) == 0 )
+        return;
+
+    NSString *defaultPathString = [NSString stringWithUTF8String: defaultPath];
+    NSURL *url = [NSURL fileURLWithPath:defaultPathString isDirectory:YES];
+    [dialog setDirectoryURL:url];    
+}
+
+
+/* fixme: pathset should be pathSet */
+static nfdresult_t AllocPathSet( NSArray *urls, nfdpathset_t *pathset )
+{
+    assert(pathset);
+    assert([urls count]);
+
+    pathset->count = (size_t)[urls count];
+    pathset->indices = NFDi_Malloc( sizeof(size_t)*pathset->count );
+    if ( !pathset->indices ) 
+    {
+        return NFD_ERROR;
+    }
+
+    // count the total space needed for buf
+    size_t bufsize = 0;
+    for ( NSURL *url in urls )
+    {
+        NSString *path = [url path];
+        bufsize += [path lengthOfBytesUsingEncoding:NSUTF8StringEncoding] + 1;
+    }
+
+    pathset->buf = NFDi_Malloc( sizeof(nfdchar_t) * bufsize );
+    if ( !pathset->buf )
+    {
+        return NFD_ERROR;
+    }
+
+    // fill buf
+    nfdchar_t *p_buf = pathset->buf;
+    size_t count = 0;
+    for ( NSURL *url in urls )
+    {
+        NSString *path = [url path];
+        const nfdchar_t *utf8Path = [path UTF8String];
+        size_t byteLen = [path lengthOfBytesUsingEncoding:NSUTF8StringEncoding] + 1;
+        memcpy( p_buf, utf8Path, byteLen );
+
+        ptrdiff_t index = p_buf - pathset->buf;
+        assert( index >= 0 );
+        pathset->indices[count] = (size_t)index;
+
+        p_buf += byteLen;
+        ++count;
+    }
+
+    return NFD_OKAY;
+}
+
+/* public */
+
+
+nfdresult_t NFD_OpenDialog( const char *filterList,
+                            const nfdchar_t *defaultPath,
+                            nfdchar_t **outPath )
+{
+    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+    NSWindow *keyWindow = [[NSApplication sharedApplication] keyWindow];    
+    NSOpenPanel *dialog = [NSOpenPanel openPanel];
+    [dialog setAllowsMultipleSelection:NO];
+
+    // Build the filter list
+    AddFilterListToDialog(dialog, filterList);
+
+    // Set the starting directory
+    SetDefaultPath(dialog, defaultPath);
+
+    nfdresult_t nfdResult = NFD_CANCEL;
+    if ( [dialog runModal] == NSModalResponseOK )
+    {
+        NSURL *url = [dialog URL];
+        const char *utf8Path = [[url path] UTF8String];
+
+        // byte count, not char count
+        size_t len = strlen(utf8Path);//NFDi_UTF8_Strlen(utf8Path);
+
+        *outPath = NFDi_Malloc( len+1 );
+        if ( !*outPath )
+        {
+            [pool release];
+            return NFD_ERROR;
+        }
+        memcpy( *outPath, utf8Path, len+1 ); /* copy null term */
+        nfdResult = NFD_OKAY;
+    }
+    [pool release];
+
+    [keyWindow makeKeyAndOrderFront:nil];
+    return nfdResult;
+}
+
+
+nfdresult_t NFD_OpenDialogMultiple( const nfdchar_t *filterList,
+                                    const nfdchar_t *defaultPath,
+                                    nfdpathset_t *outPaths )
+{
+    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+    
+    NSOpenPanel *dialog = [NSOpenPanel openPanel];
+    [dialog setAllowsMultipleSelection:YES];
+
+    // Build the fiter list.
+    AddFilterListToDialog(dialog, filterList);
+
+    // Set the starting directory
+    SetDefaultPath(dialog, defaultPath);
+    
+    nfdresult_t nfdResult = NFD_CANCEL;
+    if ( [dialog runModal] == NSModalResponseOK )
+    {
+        NSArray *urls = [dialog URLs];
+
+        if ( [urls count] == 0 )
+        {
+            [pool release];
+            return NFD_CANCEL;
+        }
+
+        if ( AllocPathSet( urls, outPaths ) == NFD_ERROR )
+        {
+            [pool release];
+            return NFD_ERROR;
+        }
+
+        nfdResult = NFD_OKAY;
+    }
+    [pool release];
+
+    return nfdResult;
+}
+
+
+nfdresult_t NFD_SaveDialog( const nfdchar_t *filterList,
+                            const nfdchar_t *defaultPath,
+                            nfdchar_t **outPath )
+{
+    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+    NSSavePanel *dialog = [NSSavePanel savePanel];
+    [dialog setExtensionHidden:NO];
+    
+    // Build the filter list.
+    AddFilterListToDialog(dialog, filterList);
+
+    // Set the starting directory
+    SetDefaultPath(dialog, defaultPath);
+
+    nfdresult_t nfdResult = NFD_CANCEL;
+    if ( [dialog runModal] == NSModalResponseOK )
+    {
+        NSURL *url = [dialog URL];
+        const char *utf8Path = [[url path] UTF8String];
+
+        size_t byteLen = [url.path lengthOfBytesUsingEncoding:NSUTF8StringEncoding] + 1;
+        
+        *outPath = NFDi_Malloc( byteLen );
+        if ( !*outPath )
+        {
+            [pool release];
+            return NFD_ERROR;
+        }
+        memcpy( *outPath, utf8Path, byteLen );
+        nfdResult = NFD_OKAY;
+    }
+
+    [pool release];
+
+    return nfdResult;
+}
+
+nfdresult_t NFD_PickFolder(const nfdchar_t *defaultPath,
+    nfdchar_t **outPath)
+{
+    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+    NSWindow *keyWindow = [[NSApplication sharedApplication] keyWindow];    
+    NSOpenPanel *dialog = [NSOpenPanel openPanel];
+    [dialog setAllowsMultipleSelection:NO];
+    [dialog setCanChooseDirectories:YES];
+    [dialog setCanCreateDirectories:YES];
+    [dialog setCanChooseFiles:NO];
+
+    // Set the starting directory
+    SetDefaultPath(dialog, defaultPath);
+
+    nfdresult_t nfdResult = NFD_CANCEL;
+    if ( [dialog runModal] == NSModalResponseOK )
+    {
+        NSURL *url = [dialog URL];
+        const char *utf8Path = [[url path] UTF8String];
+
+        // byte count, not char count
+        size_t len = strlen(utf8Path);//NFDi_UTF8_Strlen(utf8Path);
+
+        *outPath = NFDi_Malloc( len+1 );
+        if ( !*outPath )
+        {
+            [pool release];
+            return NFD_ERROR;
+        }
+        memcpy( *outPath, utf8Path, len+1 ); /* copy null term */
+        nfdResult = NFD_OKAY;
+    }
+    [pool release];
+
+    [keyWindow makeKeyAndOrderFront:nil];
+    return nfdResult;
+}

+ 142 - 0
3rdparty/nativefiledialog/src/nfd_common.c

@@ -0,0 +1,142 @@
+/*
+  Native File Dialog
+
+  http://www.frogtoss.com/labs
+ */
+
+#include <stdlib.h>
+#include <assert.h>
+#include <string.h>
+#include "nfd_common.h"
+
+static char g_errorstr[NFD_MAX_STRLEN] = {0};
+
+/* public routines */
+
+const char *NFD_GetError( void )
+{
+    return g_errorstr;
+}
+
+size_t NFD_PathSet_GetCount( const nfdpathset_t *pathset )
+{
+    assert(pathset);
+    return pathset->count;
+}
+
+nfdchar_t *NFD_PathSet_GetPath( const nfdpathset_t *pathset, size_t num )
+{
+    assert(pathset);
+    assert(num < pathset->count);
+    
+    return pathset->buf + pathset->indices[num];
+}
+
+void NFD_PathSet_Free( nfdpathset_t *pathset )
+{
+    assert(pathset);
+    NFDi_Free( pathset->indices );
+    NFDi_Free( pathset->buf );
+}
+
+/* internal routines */
+
+void *NFDi_Malloc( size_t bytes )
+{
+    void *ptr = malloc(bytes);
+    if ( !ptr )
+        NFDi_SetError("NFDi_Malloc failed.");
+
+    return ptr;
+}
+
+void NFDi_Free( void *ptr )
+{
+    assert(ptr);
+    free(ptr);
+}
+
+void NFDi_SetError( const char *msg )
+{
+    int bTruncate = NFDi_SafeStrncpy( g_errorstr, msg, NFD_MAX_STRLEN );
+    assert( !bTruncate );  _NFD_UNUSED(bTruncate);
+}
+
+
+int NFDi_SafeStrncpy( char *dst, const char *src, size_t maxCopy )
+{
+    size_t n = maxCopy;
+    char *d = dst;
+
+    assert( src );
+    assert( dst );
+    
+    while ( n > 0 && *src != '\0' )    
+    {
+        *d++ = *src++;
+        --n;
+    }
+
+    /* Truncation case -
+       terminate string and return true */
+    if ( n == 0 )
+    {
+        dst[maxCopy-1] = '\0';
+        return 1;
+    }
+
+    /* No truncation.  Append a single NULL and return. */
+    *d = '\0';
+    return 0;
+}
+
+
+/* adapted from microutf8 */
+size_t NFDi_UTF8_Strlen( const nfdchar_t *str )
+{
+	/* This function doesn't properly check validity of UTF-8 character 
+	sequence, it is supposed to use only with valid UTF-8 strings. */
+    
+	size_t character_count = 0;
+	size_t i = 0; /* Counter used to iterate over string. */
+	nfdchar_t maybe_bom[4];
+	
+	/* If there is UTF-8 BOM ignore it. */
+	if (strlen(str) > 2)
+	{
+		strncpy(maybe_bom, str, 3);
+		maybe_bom[3] = 0;
+		if (strcmp(maybe_bom, (nfdchar_t*)NFD_UTF8_BOM) == 0)
+			i += 3;
+	}
+	
+	while(str[i])
+	{
+		if (str[i] >> 7 == 0)
+        {
+            /* If bit pattern begins with 0 we have ascii character. */ 
+			++character_count;
+        }
+		else if (str[i] >> 6 == 3)
+        {
+		/* If bit pattern begins with 11 it is beginning of UTF-8 byte sequence. */
+			++character_count;
+        }
+		else if (str[i] >> 6 == 2)
+			;		/* If bit pattern begins with 10 it is middle of utf-8 byte sequence. */
+		else
+        {
+            /* In any other case this is not valid UTF-8. */
+			return -1;
+        }
+		++i;
+	}
+
+	return character_count;	
+}
+
+int NFDi_IsFilterSegmentChar( char ch )
+{
+    return (ch==','||ch==';'||ch=='\0');
+}
+

+ 37 - 0
3rdparty/nativefiledialog/src/nfd_common.h

@@ -0,0 +1,37 @@
+/*
+  Native File Dialog
+
+  Internal, common across platforms
+
+  http://www.frogtoss.com/labs
+ */
+
+
+#ifndef _NFD_COMMON_H
+#define _NFD_COMMON_H
+
+#include "nfd.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define NFD_MAX_STRLEN 256
+#define _NFD_UNUSED(x) ((void)x)
+
+#define NFD_UTF8_BOM "\xEF\xBB\xBF"
+
+
+void  *NFDi_Malloc( size_t bytes );
+void   NFDi_Free( void *ptr );
+void   NFDi_SetError( const char *msg );
+int    NFDi_SafeStrncpy( char *dst, const char *src, size_t maxCopy );
+size_t NFDi_UTF8_Strlen( const nfdchar_t *str );
+int    NFDi_IsFilterSegmentChar( char ch );
+    
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif

+ 379 - 0
3rdparty/nativefiledialog/src/nfd_gtk.c

@@ -0,0 +1,379 @@
+/*
+  Native File Dialog
+
+  http://www.frogtoss.com/labs
+*/
+
+#include <stdio.h>
+#include <assert.h>
+#include <string.h>
+#include <gtk/gtk.h>
+#include "nfd.h"
+#include "nfd_common.h"
+
+
+const char INIT_FAIL_MSG[] = "gtk_init_check failed to initilaize GTK+";
+
+
+static void AddTypeToFilterName( const char *typebuf, char *filterName, size_t bufsize )
+{
+    const char SEP[] = ", ";
+
+    size_t len = strlen(filterName);
+    if ( len != 0 )
+    {
+        strncat( filterName, SEP, bufsize - len - 1 );
+        len += strlen(SEP);
+    }
+    
+    strncat( filterName, typebuf, bufsize - len - 1 );
+}
+
+static void AddFiltersToDialog( GtkWidget *dialog, const char *filterList )
+{
+    GtkFileFilter *filter;
+    char typebuf[NFD_MAX_STRLEN] = {0};
+    const char *p_filterList = filterList;
+    char *p_typebuf = typebuf;
+    char filterName[NFD_MAX_STRLEN] = {0};
+    
+    if ( !filterList || strlen(filterList) == 0 )
+        return;
+
+    filter = gtk_file_filter_new();
+    while ( 1 )
+    {
+        
+        if ( NFDi_IsFilterSegmentChar(*p_filterList) )
+        {
+            char typebufWildcard[NFD_MAX_STRLEN];
+            /* add another type to the filter */
+            assert( strlen(typebuf) > 0 );
+            assert( strlen(typebuf) < NFD_MAX_STRLEN-1 );
+            
+            snprintf( typebufWildcard, NFD_MAX_STRLEN, "*.%s", typebuf );
+            AddTypeToFilterName( typebuf, filterName, NFD_MAX_STRLEN );
+            
+            gtk_file_filter_add_pattern( filter, typebufWildcard );
+            
+            p_typebuf = typebuf;
+            memset( typebuf, 0, sizeof(char) * NFD_MAX_STRLEN );
+        }
+        
+        if ( *p_filterList == ';' || *p_filterList == '\0' )
+        {
+            /* end of filter -- add it to the dialog */
+            
+            gtk_file_filter_set_name( filter, filterName );
+            gtk_file_chooser_add_filter( GTK_FILE_CHOOSER(dialog), filter );
+
+            filterName[0] = '\0';
+
+            if ( *p_filterList == '\0' )
+                break;
+
+            filter = gtk_file_filter_new();            
+        }
+
+        if ( !NFDi_IsFilterSegmentChar( *p_filterList ) )
+        {
+            *p_typebuf = *p_filterList;
+            p_typebuf++;
+        }
+
+        p_filterList++;
+    }
+    
+    /* always append a wildcard option to the end*/
+
+    filter = gtk_file_filter_new();
+    gtk_file_filter_set_name( filter, "*.*" );
+    gtk_file_filter_add_pattern( filter, "*" );
+    gtk_file_chooser_add_filter( GTK_FILE_CHOOSER(dialog), filter );
+}
+
+static void SetDefaultPath( GtkWidget *dialog, const char *defaultPath )
+{
+    if ( !defaultPath || strlen(defaultPath) == 0 )
+        return;
+
+    /* GTK+ manual recommends not specifically setting the default path.
+       We do it anyway in order to be consistent across platforms.
+
+       If consistency with the native OS is preferred, this is the line
+       to comment out. -ml */
+    gtk_file_chooser_set_current_folder( GTK_FILE_CHOOSER(dialog), defaultPath );
+}
+
+static nfdresult_t AllocPathSet( GSList *fileList, nfdpathset_t *pathSet )
+{
+    size_t bufSize = 0;
+    GSList *node;
+    nfdchar_t *p_buf;
+    size_t count = 0;
+    
+    assert(fileList);
+    assert(pathSet);
+
+    pathSet->count = (size_t)g_slist_length( fileList );
+    assert( pathSet->count > 0 );
+
+    pathSet->indices = NFDi_Malloc( sizeof(size_t)*pathSet->count );
+    if ( !pathSet->indices )
+    {
+        return NFD_ERROR;
+    }
+
+    /* count the total space needed for buf */
+    for ( node = fileList; node; node = node->next )
+    {
+        assert(node->data);
+        bufSize += strlen( (const gchar*)node->data ) + 1;
+    }
+
+    pathSet->buf = NFDi_Malloc( sizeof(nfdchar_t) * bufSize );
+
+    /* fill buf */
+    p_buf = pathSet->buf;
+    for ( node = fileList; node; node = node->next )
+    {
+        nfdchar_t *path = (nfdchar_t*)(node->data);
+        size_t byteLen = strlen(path)+1;
+        ptrdiff_t index;
+        
+        memcpy( p_buf, path, byteLen );
+        g_free(node->data);
+
+        index = p_buf - pathSet->buf;
+        assert( index >= 0 );
+        pathSet->indices[count] = (size_t)index;
+
+        p_buf += byteLen;
+        ++count;
+    }
+
+    g_slist_free( fileList );
+    
+    return NFD_OKAY;
+}
+
+static void WaitForCleanup(void)
+{
+    while (gtk_events_pending())
+        gtk_main_iteration();
+}
+                                 
+/* public */
+
+nfdresult_t NFD_OpenDialog( const char *filterList,
+                            const nfdchar_t *defaultPath,
+                            nfdchar_t **outPath )
+{    
+    GtkWidget *dialog;
+    nfdresult_t result;
+
+    if ( !gtk_init_check( NULL, NULL ) )
+    {
+        NFDi_SetError(INIT_FAIL_MSG);
+        return NFD_ERROR;
+    }
+
+    dialog = gtk_file_chooser_dialog_new( "Open File",
+                                          NULL,
+                                          GTK_FILE_CHOOSER_ACTION_OPEN,
+                                          "_Cancel", GTK_RESPONSE_CANCEL,
+                                          "_Open", GTK_RESPONSE_ACCEPT,
+                                          NULL );
+
+    /* Build the filter list */
+    AddFiltersToDialog(dialog, filterList);
+
+    /* Set the default path */
+    SetDefaultPath(dialog, defaultPath);
+
+    result = NFD_CANCEL;
+    if ( gtk_dialog_run( GTK_DIALOG(dialog) ) == GTK_RESPONSE_ACCEPT )
+    {
+        char *filename;
+
+        filename = gtk_file_chooser_get_filename( GTK_FILE_CHOOSER(dialog) );
+
+        {
+            size_t len = strlen(filename);
+            *outPath = NFDi_Malloc( len + 1 );
+            memcpy( *outPath, filename, len + 1 );
+            if ( !*outPath )
+            {
+                g_free( filename );
+                gtk_widget_destroy(dialog);
+                return NFD_ERROR;
+            }
+        }
+        g_free( filename );
+
+        result = NFD_OKAY;
+    }
+
+    WaitForCleanup();
+    gtk_widget_destroy(dialog);
+    WaitForCleanup();
+
+    return result;
+}
+
+
+nfdresult_t NFD_OpenDialogMultiple( const nfdchar_t *filterList,
+                                    const nfdchar_t *defaultPath,
+                                    nfdpathset_t *outPaths )
+{
+    GtkWidget *dialog;
+    nfdresult_t result;
+
+    if ( !gtk_init_check( NULL, NULL ) )
+    {
+        NFDi_SetError(INIT_FAIL_MSG);
+        return NFD_ERROR;
+    }
+
+    dialog = gtk_file_chooser_dialog_new( "Open Files",
+                                          NULL,
+                                          GTK_FILE_CHOOSER_ACTION_OPEN,
+                                          "_Cancel", GTK_RESPONSE_CANCEL,
+                                          "_Open", GTK_RESPONSE_ACCEPT,
+                                          NULL );
+    gtk_file_chooser_set_select_multiple( GTK_FILE_CHOOSER(dialog), TRUE );
+
+    /* Build the filter list */
+    AddFiltersToDialog(dialog, filterList);
+
+    /* Set the default path */
+    SetDefaultPath(dialog, defaultPath);
+
+    result = NFD_CANCEL;
+    if ( gtk_dialog_run( GTK_DIALOG(dialog) ) == GTK_RESPONSE_ACCEPT )
+    {
+        GSList *fileList = gtk_file_chooser_get_filenames( GTK_FILE_CHOOSER(dialog) );
+        if ( AllocPathSet( fileList, outPaths ) == NFD_ERROR )
+        {
+            gtk_widget_destroy(dialog);
+            return NFD_ERROR;
+        }
+        
+        result = NFD_OKAY;
+    }
+
+    WaitForCleanup();
+    gtk_widget_destroy(dialog);
+    WaitForCleanup();
+
+    return result;
+}
+
+nfdresult_t NFD_SaveDialog( const nfdchar_t *filterList,
+                            const nfdchar_t *defaultPath,
+                            nfdchar_t **outPath )
+{
+    GtkWidget *dialog;
+    nfdresult_t result;
+
+    if ( !gtk_init_check( NULL, NULL ) )
+    {
+        NFDi_SetError(INIT_FAIL_MSG);
+        return NFD_ERROR;
+    }
+
+    dialog = gtk_file_chooser_dialog_new( "Save File",
+                                          NULL,
+                                          GTK_FILE_CHOOSER_ACTION_SAVE,
+                                          "_Cancel", GTK_RESPONSE_CANCEL,
+                                          "_Save", GTK_RESPONSE_ACCEPT,
+                                          NULL ); 
+    gtk_file_chooser_set_do_overwrite_confirmation( GTK_FILE_CHOOSER(dialog), TRUE );
+
+    /* Build the filter list */    
+    AddFiltersToDialog(dialog, filterList);
+
+    /* Set the default path */
+    SetDefaultPath(dialog, defaultPath);
+    
+    result = NFD_CANCEL;    
+    if ( gtk_dialog_run( GTK_DIALOG(dialog) ) == GTK_RESPONSE_ACCEPT )
+    {
+        char *filename;
+        filename = gtk_file_chooser_get_filename( GTK_FILE_CHOOSER(dialog) );
+        
+        {
+            size_t len = strlen(filename);
+            *outPath = NFDi_Malloc( len + 1 );
+            memcpy( *outPath, filename, len + 1 );
+            if ( !*outPath )
+            {
+                g_free( filename );
+                gtk_widget_destroy(dialog);
+                return NFD_ERROR;
+            }
+        }
+        g_free(filename);
+
+        result = NFD_OKAY;
+    }
+
+    WaitForCleanup();
+    gtk_widget_destroy(dialog);
+    WaitForCleanup();
+    
+    return result;
+}
+
+nfdresult_t NFD_PickFolder(const nfdchar_t *defaultPath,
+    nfdchar_t **outPath)
+{
+    GtkWidget *dialog;
+    nfdresult_t result;
+
+    if (!gtk_init_check(NULL, NULL))
+    {
+        NFDi_SetError(INIT_FAIL_MSG);
+        return NFD_ERROR;
+    }
+
+    dialog = gtk_file_chooser_dialog_new( "Select folder",
+                                          NULL,
+                                          GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
+                                          "_Cancel", GTK_RESPONSE_CANCEL,
+                                          "_Select", GTK_RESPONSE_ACCEPT,
+                                          NULL ); 
+    gtk_file_chooser_set_do_overwrite_confirmation( GTK_FILE_CHOOSER(dialog), TRUE );
+
+
+    /* Set the default path */
+    SetDefaultPath(dialog, defaultPath);
+    
+    result = NFD_CANCEL;    
+    if ( gtk_dialog_run( GTK_DIALOG(dialog) ) == GTK_RESPONSE_ACCEPT )
+    {
+        char *filename;
+        filename = gtk_file_chooser_get_filename( GTK_FILE_CHOOSER(dialog) );
+        
+        {
+            size_t len = strlen(filename);
+            *outPath = NFDi_Malloc( len + 1 );
+            memcpy( *outPath, filename, len + 1 );
+            if ( !*outPath )
+            {
+                g_free( filename );
+                gtk_widget_destroy(dialog);
+                return NFD_ERROR;
+            }
+        }
+        g_free(filename);
+
+        result = NFD_OKAY;
+    }
+
+    WaitForCleanup();
+    gtk_widget_destroy(dialog);
+    WaitForCleanup();
+    
+    return result;
+}

+ 753 - 0
3rdparty/nativefiledialog/src/nfd_win.cpp

@@ -0,0 +1,753 @@
+/*
+  Native File Dialog
+
+  http://www.frogtoss.com/labs
+ */
+
+/* only locally define UNICODE in this compilation unit */
+#ifndef UNICODE
+#define UNICODE
+#endif
+
+#ifdef __MINGW32__
+// Explicitly setting NTDDI version, this is necessary for the MinGW compiler
+#define NTDDI_VERSION NTDDI_VISTA
+#define _WIN32_WINNT _WIN32_WINNT_VISTA
+#endif
+
+#include <wchar.h>
+#include <stdio.h>
+#include <assert.h>
+#include <windows.h>
+#include <ShObjIdl.h>
+#include "nfd_common.h"
+
+
+// allocs the space in outPath -- call free()
+static void CopyWCharToNFDChar( const wchar_t *inStr, nfdchar_t **outStr )
+{
+    int inStrCharacterCount = static_cast<int>(wcslen(inStr)); 
+    int bytesNeeded = WideCharToMultiByte( CP_UTF8, 0,
+                                           inStr, inStrCharacterCount,
+                                           NULL, 0, NULL, NULL );    
+    assert( bytesNeeded );
+    bytesNeeded += 1;
+
+    *outStr = (nfdchar_t*)NFDi_Malloc( bytesNeeded );
+    if ( !*outStr )
+        return;
+
+    int bytesWritten = WideCharToMultiByte( CP_UTF8, 0,
+                                            inStr, -1,
+                                            *outStr, bytesNeeded,
+                                            NULL, NULL );
+    assert( bytesWritten ); _NFD_UNUSED( bytesWritten );
+}
+
+/* includes NULL terminator byte in return */
+static size_t GetUTF8ByteCountForWChar( const wchar_t *str )
+{
+    int bytesNeeded = WideCharToMultiByte( CP_UTF8, 0,
+                                           str, -1,
+                                           NULL, 0, NULL, NULL );
+    assert( bytesNeeded );
+    return bytesNeeded+1;
+}
+
+// write to outPtr -- no free() necessary.  No memory stomp tests are done -- they must be done
+// before entering this function.
+static int CopyWCharToExistingNFDCharBuffer( const wchar_t *inStr, nfdchar_t *outPtr )
+{
+    int inStrCharacterCount = static_cast<int>(wcslen(inStr));
+    int bytesNeeded = static_cast<int>(GetUTF8ByteCountForWChar( inStr ));
+
+    /* invocation copies null term */
+    int bytesWritten = WideCharToMultiByte( CP_UTF8, 0,
+                                            inStr, -1,
+                                            outPtr, bytesNeeded,
+                                            NULL, 0 );
+    assert( bytesWritten );
+
+    return bytesWritten;
+
+}
+
+
+// allocs the space in outStr -- call free()
+static void CopyNFDCharToWChar( const nfdchar_t *inStr, wchar_t **outStr )
+{
+    int inStrByteCount = static_cast<int>(strlen(inStr));
+    int charsNeeded = MultiByteToWideChar(CP_UTF8, 0,
+                                          inStr, inStrByteCount,
+                                          NULL, 0 );    
+    assert( charsNeeded );
+    assert( !*outStr );
+    charsNeeded += 1; // terminator
+    
+    *outStr = (wchar_t*)NFDi_Malloc( charsNeeded * sizeof(wchar_t) );    
+    if ( !*outStr )
+        return;        
+
+    int ret = MultiByteToWideChar(CP_UTF8, 0,
+                                  inStr, inStrByteCount,
+                                  *outStr, charsNeeded);
+    (*outStr)[charsNeeded-1] = '\0';
+
+#ifdef _DEBUG
+    int inStrCharacterCount = static_cast<int>(NFDi_UTF8_Strlen(inStr));
+    assert( ret == inStrCharacterCount );
+#else
+    _NFD_UNUSED(ret);
+#endif
+}
+
+
+/* ext is in format "jpg", no wildcards or separators */
+static int AppendExtensionToSpecBuf( const char *ext, char *specBuf, size_t specBufLen )
+{
+    const char SEP[] = ";";
+    assert( specBufLen > strlen(ext)+3 );
+    
+    if ( strlen(specBuf) > 0 )
+    {
+        strncat( specBuf, SEP, specBufLen - strlen(specBuf) - 1 );
+        specBufLen += strlen(SEP);
+    }
+
+    char extWildcard[NFD_MAX_STRLEN];
+    int bytesWritten = sprintf_s( extWildcard, NFD_MAX_STRLEN, "*.%s", ext );
+    assert( bytesWritten == strlen(ext)+2 );
+    
+    strncat( specBuf, extWildcard, specBufLen - strlen(specBuf) - 1 );
+
+    return NFD_OKAY;
+}
+
+static nfdresult_t AddFiltersToDialog( ::IFileDialog *fileOpenDialog, const char *filterList )
+{
+    const wchar_t EMPTY_WSTR[] = L"";
+    const wchar_t WILDCARD[] = L"*.*";
+
+    if ( !filterList || strlen(filterList) == 0 )
+        return NFD_OKAY;
+
+    // Count rows to alloc
+    UINT filterCount = 1; /* guaranteed to have one filter on a correct, non-empty parse */
+    const char *p_filterList;
+    for ( p_filterList = filterList; *p_filterList; ++p_filterList )
+    {
+        if ( *p_filterList == ';' )
+            ++filterCount;
+    }    
+
+    assert(filterCount);
+    if ( !filterCount )
+    {
+        NFDi_SetError("Error parsing filters.");
+        return NFD_ERROR;
+    }
+
+    /* filterCount plus 1 because we hardcode the *.* wildcard after the while loop */
+    COMDLG_FILTERSPEC *specList = (COMDLG_FILTERSPEC*)NFDi_Malloc( sizeof(COMDLG_FILTERSPEC) * (filterCount + 1) );
+    if ( !specList )
+    {
+        return NFD_ERROR;
+    }
+    for (size_t i = 0; i < filterCount+1; ++i )
+    {
+        specList[i].pszName = NULL;
+        specList[i].pszSpec = NULL;
+    }
+
+    size_t specIdx = 0;
+    p_filterList = filterList;
+    char typebuf[NFD_MAX_STRLEN] = {0};  /* one per comma or semicolon */
+    char *p_typebuf = typebuf;
+    char filterName[NFD_MAX_STRLEN] = {0};
+
+    char specbuf[NFD_MAX_STRLEN] = {0}; /* one per semicolon */
+
+    while ( 1 ) 
+    {
+        if ( NFDi_IsFilterSegmentChar(*p_filterList) )
+        {
+            /* append a type to the specbuf (pending filter) */
+            AppendExtensionToSpecBuf( typebuf, specbuf, NFD_MAX_STRLEN );            
+
+            p_typebuf = typebuf;
+            memset( typebuf, 0, sizeof(char)*NFD_MAX_STRLEN );
+        }
+
+        if ( *p_filterList == ';' || *p_filterList == '\0' )
+        {
+            /* end of filter -- add it to specList */
+
+            // Empty filter name -- Windows describes them by extension.            
+            specList[specIdx].pszName = EMPTY_WSTR;
+            CopyNFDCharToWChar( specbuf, (wchar_t**)&specList[specIdx].pszSpec );
+                        
+            memset( specbuf, 0, sizeof(char)*NFD_MAX_STRLEN );
+            ++specIdx;
+            if ( specIdx == filterCount )
+                break;
+        }
+
+        if ( !NFDi_IsFilterSegmentChar( *p_filterList ))
+        {
+            *p_typebuf = *p_filterList;
+            ++p_typebuf;
+        }
+
+        ++p_filterList;
+    }
+
+    /* Add wildcard */
+    specList[specIdx].pszSpec = WILDCARD;
+    specList[specIdx].pszName = EMPTY_WSTR;
+    
+    fileOpenDialog->SetFileTypes( filterCount+1, specList );
+
+    /* free speclist */
+    for ( size_t i = 0; i < filterCount; ++i )
+    {
+        NFDi_Free( (void*)specList[i].pszSpec );
+    }
+    NFDi_Free( specList );    
+
+    return NFD_OKAY;
+}
+
+static nfdresult_t AllocPathSet( IShellItemArray *shellItems, nfdpathset_t *pathSet )
+{
+    const char ERRORMSG[] = "Error allocating pathset.";
+
+    assert(shellItems);
+    assert(pathSet);
+    
+    // How many items in shellItems?
+    DWORD numShellItems;
+    HRESULT result = shellItems->GetCount(&numShellItems);
+    if ( !SUCCEEDED(result) )
+    {
+        NFDi_SetError(ERRORMSG);
+        return NFD_ERROR;
+    }
+
+    pathSet->count = static_cast<size_t>(numShellItems);
+    assert( pathSet->count > 0 );
+
+    pathSet->indices = (size_t*)NFDi_Malloc( sizeof(size_t)*pathSet->count );
+    if ( !pathSet->indices )
+    {
+        return NFD_ERROR;
+    }
+
+    /* count the total bytes needed for buf */
+    size_t bufSize = 0;
+    for ( DWORD i = 0; i < numShellItems; ++i )
+    {
+        ::IShellItem *shellItem;
+        result = shellItems->GetItemAt(i, &shellItem);
+        if ( !SUCCEEDED(result) )
+        {
+            NFDi_SetError(ERRORMSG);
+            return NFD_ERROR;
+        }
+
+        // Confirm SFGAO_FILESYSTEM is true for this shellitem, or ignore it.
+        SFGAOF attribs;
+        result = shellItem->GetAttributes( SFGAO_FILESYSTEM, &attribs );
+        if ( !SUCCEEDED(result) )
+        {
+            NFDi_SetError(ERRORMSG);
+            return NFD_ERROR;
+        }
+        if ( !(attribs & SFGAO_FILESYSTEM) )
+            continue;
+
+        LPWSTR name;
+        shellItem->GetDisplayName(SIGDN_FILESYSPATH, &name);
+
+        // Calculate length of name with UTF-8 encoding
+        bufSize += GetUTF8ByteCountForWChar( name );
+    }
+
+    assert(bufSize);
+
+    pathSet->buf = (nfdchar_t*)NFDi_Malloc( sizeof(nfdchar_t) * bufSize );
+    memset( pathSet->buf, 0, sizeof(nfdchar_t) * bufSize );
+
+    /* fill buf */
+    nfdchar_t *p_buf = pathSet->buf;
+    for (DWORD i = 0; i < numShellItems; ++i )
+    {
+        ::IShellItem *shellItem;
+        result = shellItems->GetItemAt(i, &shellItem);
+        if ( !SUCCEEDED(result) )
+        {
+            NFDi_SetError(ERRORMSG);
+            return NFD_ERROR;
+        }
+
+        // Confirm SFGAO_FILESYSTEM is true for this shellitem, or ignore it.
+        SFGAOF attribs;
+        result = shellItem->GetAttributes( SFGAO_FILESYSTEM, &attribs );
+        if ( !SUCCEEDED(result) )
+        {
+            NFDi_SetError(ERRORMSG);
+            return NFD_ERROR;
+        }
+        if ( !(attribs & SFGAO_FILESYSTEM) )
+            continue;
+
+        LPWSTR name;
+        shellItem->GetDisplayName(SIGDN_FILESYSPATH, &name);
+
+        int bytesWritten = CopyWCharToExistingNFDCharBuffer(name, p_buf);
+
+        ptrdiff_t index = p_buf - pathSet->buf;
+        assert( index >= 0 );
+        pathSet->indices[i] = static_cast<size_t>(index);
+        
+        p_buf += bytesWritten; 
+    }
+     
+    return NFD_OKAY;
+}
+
+
+static nfdresult_t SetDefaultPath( IFileDialog *dialog, const char *defaultPath )
+{
+    if ( !defaultPath || strlen(defaultPath) == 0 )
+        return NFD_OKAY;
+
+    wchar_t *defaultPathW = {0};
+    CopyNFDCharToWChar( defaultPath, &defaultPathW );
+
+    IShellItem *folder;
+    HRESULT result = SHCreateItemFromParsingName( defaultPathW, NULL, IID_PPV_ARGS(&folder) );
+
+    // Valid non results.
+    if ( result == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || result == HRESULT_FROM_WIN32(ERROR_INVALID_DRIVE) )
+    {
+        NFDi_Free( defaultPathW );
+        return NFD_OKAY;
+    }
+
+    if ( !SUCCEEDED(result) )
+    {
+        NFDi_SetError("Error creating ShellItem");
+        NFDi_Free( defaultPathW );
+        return NFD_ERROR;
+    }
+    
+    // Could also call SetDefaultFolder(), but this guarantees defaultPath -- more consistency across API.
+    dialog->SetFolder( folder );
+
+    NFDi_Free( defaultPathW );
+    folder->Release();
+    
+    return NFD_OKAY;
+}
+
+/* public */
+
+
+nfdresult_t NFD_OpenDialog( const char *filterList,
+                            const nfdchar_t *defaultPath,
+                            nfdchar_t **outPath )
+{
+    nfdresult_t nfdResult = NFD_ERROR;
+    
+    // Init COM library.
+    HRESULT result = ::CoInitializeEx(NULL,
+                                      ::COINIT_APARTMENTTHREADED |
+                                      ::COINIT_DISABLE_OLE1DDE );
+
+    ::IFileOpenDialog *fileOpenDialog(NULL);
+
+    if ( !SUCCEEDED(result))
+    {
+        NFDi_SetError("Could not initialize COM.");
+        goto end;
+    }
+
+    // Create dialog
+    result = ::CoCreateInstance(::CLSID_FileOpenDialog, NULL,
+                                CLSCTX_ALL, ::IID_IFileOpenDialog,
+                                reinterpret_cast<void**>(&fileOpenDialog) );
+                                
+    if ( !SUCCEEDED(result) )
+    {
+        NFDi_SetError("Could not create dialog.");
+        goto end;
+    }
+
+    // Build the filter list
+    if ( !AddFiltersToDialog( fileOpenDialog, filterList ) )
+    {
+        goto end;
+    }
+
+    // Set the default path
+    if ( !SetDefaultPath( fileOpenDialog, defaultPath ) )
+    {
+        goto end;
+    }    
+
+    // Show the dialog.
+    result = fileOpenDialog->Show(NULL);
+    if ( SUCCEEDED(result) )
+    {
+        // Get the file name
+        ::IShellItem *shellItem(NULL);
+        result = fileOpenDialog->GetResult(&shellItem);
+        if ( !SUCCEEDED(result) )
+        {
+            NFDi_SetError("Could not get shell item from dialog.");
+            goto end;
+        }
+        wchar_t *filePath(NULL);
+        result = shellItem->GetDisplayName(::SIGDN_FILESYSPATH, &filePath);
+        if ( !SUCCEEDED(result) )
+        {
+            NFDi_SetError("Could not get file path for selected.");
+            goto end;
+        }
+
+        CopyWCharToNFDChar( filePath, outPath );
+        CoTaskMemFree(filePath);
+        if ( !*outPath )
+        {
+            /* error is malloc-based, error message would be redundant */
+            goto end;
+        }
+
+        nfdResult = NFD_OKAY;
+        shellItem->Release();
+    }
+    else if (result == HRESULT_FROM_WIN32(ERROR_CANCELLED) )
+    {
+        nfdResult = NFD_CANCEL;
+    }
+    else
+    {
+        NFDi_SetError("File dialog box show failed.");
+        nfdResult = NFD_ERROR;
+    }
+
+ end:
+    ::CoUninitialize();
+    
+    return nfdResult;
+}
+
+nfdresult_t NFD_OpenDialogMultiple( const nfdchar_t *filterList,
+                                    const nfdchar_t *defaultPath,
+                                    nfdpathset_t *outPaths )
+{
+    nfdresult_t nfdResult = NFD_ERROR;
+    
+    // Init COM library.
+    HRESULT result = ::CoInitializeEx(NULL,
+                                      ::COINIT_APARTMENTTHREADED |
+                                      ::COINIT_DISABLE_OLE1DDE );
+    if ( !SUCCEEDED(result))
+    {
+        NFDi_SetError("Could not initialize COM.");
+        return NFD_ERROR;
+    }
+
+    ::IFileOpenDialog *fileOpenDialog(NULL);
+
+    // Create dialog
+    result = ::CoCreateInstance(::CLSID_FileOpenDialog, NULL,
+                                CLSCTX_ALL, ::IID_IFileOpenDialog,
+                                reinterpret_cast<void**>(&fileOpenDialog) );
+                                
+    if ( !SUCCEEDED(result) )
+    {
+        NFDi_SetError("Could not create dialog.");
+        goto end;
+    }
+
+    // Build the filter list
+    if ( !AddFiltersToDialog( fileOpenDialog, filterList ) )
+    {
+        goto end;
+    }
+
+    // Set the default path
+    if ( !SetDefaultPath( fileOpenDialog, defaultPath ) )
+    {
+        goto end;
+    }
+
+    // Set a flag for multiple options
+    DWORD dwFlags;
+    result = fileOpenDialog->GetOptions(&dwFlags);
+    if ( !SUCCEEDED(result) )
+    {
+        NFDi_SetError("Could not get options.");
+        goto end;
+    }
+    result = fileOpenDialog->SetOptions(dwFlags | FOS_ALLOWMULTISELECT);
+    if ( !SUCCEEDED(result) )
+    {
+        NFDi_SetError("Could not set options.");
+        goto end;
+    }
+ 
+    // Show the dialog.
+    result = fileOpenDialog->Show(NULL);
+    if ( SUCCEEDED(result) )
+    {
+        IShellItemArray *shellItems;
+        result = fileOpenDialog->GetResults( &shellItems );
+        if ( !SUCCEEDED(result) )
+        {
+            NFDi_SetError("Could not get shell items.");
+            goto end;
+        }
+        
+        if ( AllocPathSet( shellItems, outPaths ) == NFD_ERROR )
+        {
+            goto end;
+        }
+
+        shellItems->Release();
+        nfdResult = NFD_OKAY;
+    }
+    else if (result == HRESULT_FROM_WIN32(ERROR_CANCELLED) )
+    {
+        nfdResult = NFD_CANCEL;
+    }
+    else
+    {
+        NFDi_SetError("File dialog box show failed.");
+        nfdResult = NFD_ERROR;
+    }
+
+ end:
+    ::CoUninitialize();
+    
+    return nfdResult;
+}
+
+nfdresult_t NFD_SaveDialog( const nfdchar_t *filterList,
+                            const nfdchar_t *defaultPath,
+                            nfdchar_t **outPath )
+{
+    nfdresult_t nfdResult = NFD_ERROR;
+    
+    // Init COM library.
+    HRESULT result = ::CoInitializeEx(NULL,
+                                      ::COINIT_APARTMENTTHREADED |
+                                      ::COINIT_DISABLE_OLE1DDE );
+    if ( !SUCCEEDED(result))
+    {
+        NFDi_SetError("Could not initialize COM.");
+        return NFD_ERROR;
+    }
+
+    ::IFileSaveDialog *fileSaveDialog(NULL);
+
+    // Create dialog
+    result = ::CoCreateInstance(::CLSID_FileSaveDialog, NULL,
+                                CLSCTX_ALL, ::IID_IFileSaveDialog,
+                                reinterpret_cast<void**>(&fileSaveDialog) );
+
+    if ( !SUCCEEDED(result) )
+    {
+        NFDi_SetError("Could not create dialog.");
+        goto end;
+    }
+
+    // Build the filter list
+    if ( !AddFiltersToDialog( fileSaveDialog, filterList ) )
+    {
+        goto end;
+    }
+
+    // Set the default path
+    if ( !SetDefaultPath( fileSaveDialog, defaultPath ) )
+    {
+        goto end;
+    }
+
+    // Show the dialog.
+    result = fileSaveDialog->Show(NULL);
+    if ( SUCCEEDED(result) )
+    {
+        // Get the file name
+        ::IShellItem *shellItem;
+        result = fileSaveDialog->GetResult(&shellItem);
+        if ( !SUCCEEDED(result) )
+        {
+            NFDi_SetError("Could not get shell item from dialog.");
+            goto end;
+        }
+        wchar_t *filePath(NULL);
+        result = shellItem->GetDisplayName(::SIGDN_FILESYSPATH, &filePath);
+        if ( !SUCCEEDED(result) )
+        {
+            NFDi_SetError("Could not get file path for selected.");
+            goto end;
+        }
+
+        CopyWCharToNFDChar( filePath, outPath );
+        CoTaskMemFree(filePath);
+        if ( !*outPath )
+        {
+            /* error is malloc-based, error message would be redundant */
+            goto end;
+        }
+
+        nfdResult = NFD_OKAY;
+        shellItem->Release();
+    }
+    else if (result == HRESULT_FROM_WIN32(ERROR_CANCELLED) )
+    {
+        nfdResult = NFD_CANCEL;
+    }
+    else
+    {
+        NFDi_SetError("File dialog box show failed.");
+        nfdResult = NFD_ERROR;
+    }
+    
+ end:
+    ::CoUninitialize();
+        
+    return nfdResult;
+}
+
+class AutoCoInit
+{
+public:
+    AutoCoInit()
+    {
+        mResult = ::CoInitializeEx(NULL,
+            ::COINIT_APARTMENTTHREADED |
+            ::COINIT_DISABLE_OLE1DDE);
+    }
+
+    ~AutoCoInit()
+    {
+        if (SUCCEEDED(mResult))
+        {
+            ::CoUninitialize();
+        }
+    }
+
+    HRESULT Result() const { return mResult; }
+private:
+    HRESULT mResult;
+};
+
+// VS2010 hasn't got a copy of CComPtr - this was first added in the 2003 SDK, so we make our own small CComPtr instead
+template<class T>
+class ComPtr
+{
+public:
+    ComPtr() : mPtr(NULL) { }
+    ~ComPtr()
+    {
+        if (mPtr)
+        {
+            mPtr->Release();
+        }
+    }
+
+    T* Ptr() const { return mPtr; }
+    T** operator&() { return &mPtr; }
+    T* operator->() const { return mPtr; }
+private:
+    // Don't allow copy or assignment
+    ComPtr(const ComPtr&);
+    ComPtr& operator = (const ComPtr&) const;
+    T* mPtr;
+};
+
+nfdresult_t NFD_PickFolder(const nfdchar_t *defaultPath,
+    nfdchar_t **outPath)
+{
+    // Init COM
+    AutoCoInit autoCoInit;
+    if (!SUCCEEDED(autoCoInit.Result()))
+    {
+        NFDi_SetError("CoInitializeEx failed.");
+        return NFD_ERROR;
+    }
+
+    // Create the file dialog COM object
+    ComPtr<IFileDialog> pFileDialog;
+    if (!SUCCEEDED(CoCreateInstance(CLSID_FileOpenDialog,
+                                    NULL,
+                                    CLSCTX_ALL,
+                                    IID_PPV_ARGS(&pFileDialog))))
+    {
+        NFDi_SetError("CoCreateInstance for CLSID_FileOpenDialog failed.");
+        return NFD_ERROR;
+    }
+
+    // Set the default path
+    if (SetDefaultPath(pFileDialog.Ptr(), defaultPath) != NFD_OKAY)
+    {
+        NFDi_SetError("SetDefaultPath failed.");
+        return NFD_ERROR;
+    }
+
+    // Get the dialogs options
+    DWORD dwOptions = 0;
+    if (!SUCCEEDED(pFileDialog->GetOptions(&dwOptions)))
+    {
+        NFDi_SetError("GetOptions for IFileDialog failed.");
+        return NFD_ERROR;
+    }
+
+    // Add in FOS_PICKFOLDERS which hides files and only allows selection of folders
+    if (!SUCCEEDED(pFileDialog->SetOptions(dwOptions | FOS_PICKFOLDERS)))
+    {
+        NFDi_SetError("SetOptions for IFileDialog failed.");
+        return NFD_ERROR;
+    }
+
+    // Show the dialog to the user
+    const HRESULT result = pFileDialog->Show(NULL);
+    if (result == HRESULT_FROM_WIN32(ERROR_CANCELLED))
+    {
+        return NFD_CANCEL;
+    }
+    else if (!SUCCEEDED(result))
+    {
+        NFDi_SetError("Show for IFileDialog failed.");
+        return NFD_ERROR;
+    }
+
+    // Get the shell item result
+    ComPtr<IShellItem> pShellItem;
+    if (!SUCCEEDED(pFileDialog->GetResult(&pShellItem)))
+    {
+        return NFD_OKAY;
+    }
+
+    // Finally get the path
+    wchar_t *path = NULL;
+    if (!SUCCEEDED(pShellItem->GetDisplayName(SIGDN_DESKTOPABSOLUTEPARSING, &path)))
+    {
+        NFDi_SetError("GetDisplayName for IShellItem failed.");
+        return NFD_ERROR;
+    }
+
+    // Convert string
+    CopyWCharToNFDChar(path, outPath);
+    CoTaskMemFree(path);
+    if (!*outPath)
+    {
+        // error is malloc-based, error message would be redundant
+        return NFD_ERROR;
+    }
+
+    return NFD_OKAY;
+}

+ 74 - 0
3rdparty/nativefiledialog/test/SConstruct

@@ -0,0 +1,74 @@
+#
+# Native file dialog
+#
+# Build tests
+#
+# SCons builds are deprecated -- see README.md for details.
+
+target_arch=str(Platform())
+debug = int(ARGUMENTS.get( 'debug', 0 ))
+
+files = {'test_opendialog':         ['test_opendialog.c'],
+         'test_opendialogmultiple': ['test_opendialogmultiple.c'],
+         'test_savedialog':         ['test_savedialog.c']}
+
+test_env = Environment()
+
+
+# Windows runtime library types
+win_rtl = {'debug': '/MDd',     
+           'release': '/MD'}    
+
+
+def set_debug(env):
+    if target_arch == 'win32':
+        env.Append( CFLAGS=['/Z7',       # obj contains full symbols
+                            win_rtl['debug'] ] )
+    else:
+        env.Append( CFLAGS=['-g'] )
+
+
+def set_release(env):
+    if target_arch == 'win32':
+        env.Append( CFLAGS=[win_rtl['release'],
+                            '/O2', 
+                            ])
+    else:
+        env.Append( CFLAGS=['-O3'] )
+
+
+def get_lib_name(base, is_debug):
+    if is_debug:
+        return base + '_d'
+    else:
+        return base
+
+
+if debug:
+    set_debug(test_env)
+else:
+    set_release(test_env)
+
+test_env.Append( CPPPATH=['../src/include'], # API header path only, no internals allowed
+                 LIBPATH=['../src'],
+                 LIBS=get_lib_name('nfd', debug) )
+
+
+# Cocoa OS X builds
+if target_arch == 'darwin':
+    test_env.Append( FRAMEWORKS='AppKit' )
+    test_env.CC='clang -fcolor-diagnostics'
+
+# Linux GTK+ 3 builds
+elif target_arch == 'posix':
+    test_env.ParseConfig( 'pkg-config --cflags --libs gtk+-3.0' )
+
+elif target_arch == 'win32':
+    test_env.Append( 
+        LINKFLAGS=['/NODEFAULTLIB:LIBCMT'])
+
+for codebase in files:
+    output_name = get_lib_name(codebase, debug)
+    test_env.Program( output_name, files[codebase] )
+
+print "*** Scons builds are deprecated!  See README.md for details."

+ 29 - 0
3rdparty/nativefiledialog/test/test_opendialog.c

@@ -0,0 +1,29 @@
+#include "nfd.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+
+/* this test should compile on all supported platforms */
+
+int main( void )
+{
+    nfdchar_t *outPath = NULL;
+    nfdresult_t result = NFD_OpenDialog( "png,jpg;pdf", NULL, &outPath );
+    if ( result == NFD_OKAY )
+    {
+        puts("Success!");
+        puts(outPath);
+        free(outPath);
+    }
+    else if ( result == NFD_CANCEL )
+    {
+        puts("User pressed cancel.");
+    }
+    else 
+    {
+        printf("Error: %s\n", NFD_GetError() );
+    }
+
+    return 0;
+}

+ 34 - 0
3rdparty/nativefiledialog/test/test_opendialogmultiple.c

@@ -0,0 +1,34 @@
+#include "nfd.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+/* this test should compile on all supported platforms */
+
+int main( void )
+{
+    nfdchar_t *outPath = NULL;
+
+    nfdpathset_t pathSet;
+    nfdresult_t result = NFD_OpenDialogMultiple( "png,jpg;pdf", NULL, &pathSet );
+    if ( result == NFD_OKAY )
+    {
+        size_t i;
+        for ( i = 0; i < NFD_PathSet_GetCount(&pathSet); ++i )
+        {
+            nfdchar_t *path = NFD_PathSet_GetPath(&pathSet, i);
+            printf("Path %i: %s\n", (int)i, path );
+        }
+        NFD_PathSet_Free(&pathSet);
+    }
+    else if ( result == NFD_CANCEL )
+    {
+        puts("User pressed cancel.");
+    }
+    else 
+    {
+        printf("Error: %s\n", NFD_GetError() );
+    }
+
+    return 0;
+}

+ 29 - 0
3rdparty/nativefiledialog/test/test_pickfolder.c

@@ -0,0 +1,29 @@
+#include "nfd.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+
+/* this test should compile on all supported platforms */
+
+int main( void )
+{
+    nfdchar_t *outPath = NULL;
+    nfdresult_t result = NFD_PickFolder( NULL, &outPath );
+    if ( result == NFD_OKAY )
+    {
+        puts("Success!");
+        puts(outPath);
+        free(outPath);
+    }
+    else if ( result == NFD_CANCEL )
+    {
+        puts("User pressed cancel.");
+    }
+    else 
+    {
+        printf("Error: %s\n", NFD_GetError() );
+    }
+
+    return 0;
+}

+ 28 - 0
3rdparty/nativefiledialog/test/test_savedialog.c

@@ -0,0 +1,28 @@
+#include "nfd.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+/* this test should compile on all supported platforms */
+
+int main( void )
+{
+    nfdchar_t *savePath = NULL;
+    nfdresult_t result = NFD_SaveDialog( "png,jpg;pdf", NULL, &savePath );
+    if ( result == NFD_OKAY )
+    {
+        puts("Success!");
+        puts(savePath);
+        free(savePath);
+    }
+    else if ( result == NFD_CANCEL )
+    {
+        puts("User pressed cancel.");
+    }
+    else 
+    {
+        printf("Error: %s\n", NFD_GetError() );
+    }
+
+    return 0;
+}

+ 11 - 0
scripts/level-editor-imgui.lua

@@ -16,6 +16,7 @@ project "level-editor-imgui"
 		CROWN_DIR .. "3rdparty/stb",
 		CROWN_DIR .. "3rdparty/luajit/src",
 		CROWN_DIR .. "3rdparty/ocornut-imgui",
+		CROWN_DIR .. "3rdparty/nativefiledialog/src/include",
 	}
 
 	defines {
@@ -49,6 +50,11 @@ project "level-editor-imgui"
 			"GL",
 			"luajit",
 		}
+		linkoptions { "`pkg-config --libs gtk+-3.0`" }
+		buildoptions { "`pkg-config --cflags gtk+-3.0`" }
+		files {
+			CROWN_DIR .. "3rdparty/nativefiledialog/src/nfd_gtk.c",
+		}
 
 	configuration { "vs* or mingw*" }
 		links {
@@ -58,6 +64,10 @@ project "level-editor-imgui"
 			"ws2_32",
 			"ole32",
 			"gdi32",
+			"uuid",
+		}
+		files {
+			CROWN_DIR .. "3rdparty/nativefiledialog/src/nfd_win.cpp",
 		}
 	configuration { "not vs*" }
 		links {
@@ -85,6 +95,7 @@ project "level-editor-imgui"
 		CROWN_DIR .. "tools-imgui/**.cpp",
 		CROWN_DIR .. "3rdparty/ocornut-imgui/*.h",
 		CROWN_DIR .. "3rdparty/ocornut-imgui/*.cpp",
+		CROWN_DIR .. "3rdparty/nativefiledialog/src/nfd_common.c",
 	}
 
 	configuration {} -- reset configuration

+ 17 - 0
tools-imgui/level_editor.cpp

@@ -8,6 +8,7 @@
 #include <imgui.h>
 #include <iconfontheaders/icons_material_design.h>
 #include <time.h>
+#include <nfd.h>
 
 #include "core/containers/vector.h"
 #include "core/filesystem/filesystem_disk.h"
@@ -1103,7 +1104,23 @@ struct LevelEditor
 				}
 				if (ImGui::MenuItem("Open", "Ctrl+O"))
 				{
+					nfdchar_t *out_path = NULL;
+					nfdresult_t result = NFD_OpenDialog(NULL, NULL, &out_path);
 
+					if ( result == NFD_OKAY )
+					{
+						logi(LEVEL_EDITOR, "Success!");
+						logi(LEVEL_EDITOR, out_path);
+						free(out_path);
+					}
+					else if ( result == NFD_CANCEL )
+					{
+						logi(LEVEL_EDITOR, "User pressed cancel.");
+					}
+					else
+					{
+						loge(LEVEL_EDITOR, "Error: %s\n", NFD_GetError());
+					}
 				}
 				if (ImGui::MenuItem("Save", "Ctrl+S"))
 				{