From f8a1187a87ab977ea75856c404e1a04b5dab8020 Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Sun, 23 Aug 2015 21:19:20 -0700 Subject: [PATCH 01/14] Fix compilation on older Visual Studio C++ copies "atlbase.h" is not included in older Visual Studio C++ Express versions, after removing it, things appear to work fine, both with new and old versions of Visual Studio Express, so it doesn't appear to be needed. Thanks! :smile: --- src/nfd_win.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/nfd_win.cpp b/src/nfd_win.cpp index b065d69cb..45878824a 100644 --- a/src/nfd_win.cpp +++ b/src/nfd_win.cpp @@ -13,7 +13,6 @@ #include #include #include -#include #include #include From 37582b8e1794040c4c99beec66856586e1289526 Mon Sep 17 00:00:00 2001 From: Michael Labbe Date: Fri, 5 Aug 2016 19:34:08 -0700 Subject: [PATCH 02/14] premake5 comment --- build/premake5.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/build/premake5.lua b/build/premake5.lua index 237856681..ab4cbed8c 100644 --- a/build/premake5.lua +++ b/build/premake5.lua @@ -1,8 +1,11 @@ -- Native file dialog premake5 script -- --- This can be ran directly, but commonly, it is not. --- The product of this script is checked in to source control, --- so you don't need to worry about the extra step when building. +-- 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 From eb0ec7fc547f4c98dadab4ba7de57812700c015f Mon Sep 17 00:00:00 2001 From: Michael Labbe Date: Sat, 6 Aug 2016 13:00:26 -0700 Subject: [PATCH 03/14] docs --- README.md | 30 +++++++++++++----------------- docs/build.md | 26 ++++++++++++++++++++++++++ docs/submitting_pull_requests.md | 22 ++++++++++++++++++++++ 3 files changed, 61 insertions(+), 17 deletions(-) create mode 100644 docs/build.md create mode 100644 docs/submitting_pull_requests.md diff --git a/README.md b/README.md index 70f61d650..9064884f7 100644 --- a/README.md +++ b/README.md @@ -54,10 +54,20 @@ See [NFD.h](src/include/nfd.h) for more options. ![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. + +release | what's new | date +--------|-----------------------------|--------- +1.0 | initial | oct 2014 +1.1 | premake5; scons deprecated | aug 2016 ## Building ## -NFD uses [Premake5](https://premake.github.io/download.html) to generate 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. +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. @@ -65,28 +75,13 @@ Previously, NFD used SCons to build. It still works, but is now deprecated; upd ### Makefiles ### -The makefile offers four options: +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 -### SCons build (deprecated) ### - -NFD uses [SCons](http://www.scons.org) for cross-platform builds. After installing SCons, build it with: - - cd src - scons debug=[0,1] - -Alternatively, you can avoid Scons by just including NFD files to your existing project: - - 1. Add all header files in `src/` and `src/include` to your project. - 2. Add `src/include` to your include search path or copy it into your existing search path. - 3. Add `src/nfd_common.c` to your project. - 4. Add `src/nfd_` to your project, where `` is the NFD backend for the platform you are fixing to build. - 5. On Visual Studio, define `_CRT_SECURE_NO_WARNINGS` to avoid warnings. - ### Compiling Your Programs ### 1. Add `src/include` to your include search path. @@ -136,6 +131,7 @@ I accept quality code patches, or will resolve these and other matters through s - No support for file filter names -- ex: "Image Files" (*.png, *.jpg). Nameless filters are supported, though. - No support for selecting folders instead of files. - 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. + - No support for mingw building. Open to pull requests that support the new Premake build system AND contain build instructions that include how to install the toolchain from scratch. # Copyright and Credit # diff --git a/docs/build.md b/docs/build.md new file mode 100644 index 000000000..1d0d12987 --- /dev/null +++ b/docs/build.md @@ -0,0 +1,26 @@ +# Building NFD # + +Most of the building instructions are included in [README.md](/README.md). This file just contains apocrypha. + +## Running Premake5 Directly ## + +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 `, where 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 deploying your change. + +## 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] + diff --git a/docs/submitting_pull_requests.md b/docs/submitting_pull_requests.md new file mode 100644 index 000000000..03ed2914e --- /dev/null +++ b/docs/submitting_pull_requests.md @@ -0,0 +1,22 @@ +# 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 do this to accept pull requests, so I prioritize changes that respect my time. + +- *Submit Premake changes only*. As of 1.1, SCons is now 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 install instructions from scratch that you have tested yourself and work. 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. + +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. + + + From 71aec83a4fd6f99c5091f0f6b2dd1e86a3348661 Mon Sep 17 00:00:00 2001 From: Michael Labbe Date: Sat, 6 Aug 2016 13:05:24 -0700 Subject: [PATCH 04/14] docs --- README.md | 6 +++--- docs/build.md | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9064884f7..1b5984520 100644 --- a/README.md +++ b/README.md @@ -85,8 +85,8 @@ The makefile offers four options, with `release_x64` as the default. ### Compiling Your Programs ### 1. Add `src/include` to your include search path. - 2. Add `nfd.lib` to the list of list of static libraries to link against. - 3. Add `src/` to the library 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//` to the library search path. On Linux, you must compile and link against GTK+. Recommend use of `pkg-config --cflags --libs gtk+-3.0`. @@ -125,7 +125,7 @@ See [test_opendialogmultiple.c](test/test_opendialogmultiple.c). # Known Limitations # -I accept quality code patches, or will resolve these and other matters through support. +I accept quality code patches, or will resolve these and other matters through support. See [submitting a pull request](docs/submitting_a_pull_request.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, though. diff --git a/docs/build.md b/docs/build.md index 1d0d12987..ec9b4425f 100644 --- a/docs/build.md +++ b/docs/build.md @@ -4,6 +4,8 @@ Most of the building instructions are included in [README.md](/README.md). This ## 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) @@ -13,7 +15,7 @@ Premake5 is still in development. The current version, as of this writing (Prem ### 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 deploying your change. +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) ## From e9425f456dacf48c4c079c5eacc2ead3e322f171 Mon Sep 17 00:00:00 2001 From: Michael Labbe Date: Sat, 6 Aug 2016 13:07:59 -0700 Subject: [PATCH 05/14] docsdocs --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1b5984520..abe49c6f3 100644 --- a/README.md +++ b/README.md @@ -98,11 +98,11 @@ On Windows, ensure you are building against `comctl32.lib`. See `NFD.h` for API calls. See `tests/*.c` for example code. -See `tests/SConstruct` for a working build script that compiles on all platforms. +After compiling, `build/bin` contains compiled test programs. ## File Filter Syntax ## -There is a form of file filtering in every file dialog, 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. +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. From 5619b52f94fb092383a6bf9799e2b4b7f3a4a2e9 Mon Sep 17 00:00:00 2001 From: Michael Labbe Date: Sat, 6 Aug 2016 13:09:25 -0700 Subject: [PATCH 06/14] docs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index abe49c6f3..92b9545d2 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,7 @@ 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 a pull request](docs/submitting_a_pull_request.md) for details. +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, though. From e801856d13984cc1a7ed22882c3be8fad1bfc425 Mon Sep 17 00:00:00 2001 From: Michael Labbe Date: Sat, 6 Aug 2016 13:12:10 -0700 Subject: [PATCH 07/14] docs --- docs/submitting_pull_requests.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/submitting_pull_requests.md b/docs/submitting_pull_requests.md index 03ed2914e..0159d542c 100644 --- a/docs/submitting_pull_requests.md +++ b/docs/submitting_pull_requests.md @@ -4,17 +4,19 @@ I have had to turn away a number of pull requests due to avoidable circumstances 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. +- **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 do this to accept pull requests, so I prioritize changes that respect my time. +- **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 changes only*. As of 1.1, SCons is now 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. +- **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 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 install instructions from scratch that you have tested yourself and work. 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 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. +- **Do not change the externally facing API**. NFD needs to maintain ABI compatibility. + +## 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. From 86e007d8d88802ffb2532a7a9d77d2b83ade5e38 Mon Sep 17 00:00:00 2001 From: Michael Labbe Date: Sat, 6 Aug 2016 13:16:26 -0700 Subject: [PATCH 08/14] don't run premake! --- build/dont_run_premake.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 build/dont_run_premake.txt diff --git a/build/dont_run_premake.txt b/build/dont_run_premake.txt new file mode 100644 index 000000000..9909dc6c8 --- /dev/null +++ b/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. From 73f6ba050b6cee903ddf3a74c5dfc3c94b4243a3 Mon Sep 17 00:00:00 2001 From: Denis Kolodin Date: Sun, 7 Aug 2016 09:21:16 +0300 Subject: [PATCH 09/14] Add mingw/msys support --- build/gmake_windows/test_opendialog.make | 8 ++++---- build/gmake_windows/test_opendialogmultiple.make | 8 ++++---- build/gmake_windows/test_savedialog.make | 8 ++++---- build/premake5.lua | 5 ++++- src/nfd_win.cpp | 11 ++++++++--- 5 files changed, 24 insertions(+), 16 deletions(-) diff --git a/build/gmake_windows/test_opendialog.make b/build/gmake_windows/test_opendialog.make index fa247dae2..3a8d4c624 100644 --- a/build/gmake_windows/test_opendialog.make +++ b/build/gmake_windows/test_opendialog.make @@ -22,7 +22,7 @@ ifeq ($(config),release_x64) ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -O2 ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS) ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) - LIBS += ../lib/Release/x64/nfd.lib + 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) @@ -49,7 +49,7 @@ ifeq ($(config),release_x86) ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -O2 ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS) ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) - LIBS += ../lib/Release/x86/nfd.lib + 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) @@ -76,7 +76,7 @@ ifeq ($(config),debug_x64) ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -g ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS) ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) - LIBS += -lnfd_d + 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) @@ -103,7 +103,7 @@ ifeq ($(config),debug_x86) ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -g ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS) ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) - LIBS += -lnfd_d + 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) diff --git a/build/gmake_windows/test_opendialogmultiple.make b/build/gmake_windows/test_opendialogmultiple.make index bc492031b..1c3b998f0 100644 --- a/build/gmake_windows/test_opendialogmultiple.make +++ b/build/gmake_windows/test_opendialogmultiple.make @@ -22,7 +22,7 @@ ifeq ($(config),release_x64) ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -O2 ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS) ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) - LIBS += ../lib/Release/x64/nfd.lib + 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) @@ -49,7 +49,7 @@ ifeq ($(config),release_x86) ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -O2 ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS) ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) - LIBS += ../lib/Release/x86/nfd.lib + 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) @@ -76,7 +76,7 @@ ifeq ($(config),debug_x64) ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -g ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS) ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) - LIBS += -lnfd_d + 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) @@ -103,7 +103,7 @@ ifeq ($(config),debug_x86) ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -g ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS) ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) - LIBS += -lnfd_d + 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) diff --git a/build/gmake_windows/test_savedialog.make b/build/gmake_windows/test_savedialog.make index 615ebc822..53df0b374 100644 --- a/build/gmake_windows/test_savedialog.make +++ b/build/gmake_windows/test_savedialog.make @@ -22,7 +22,7 @@ ifeq ($(config),release_x64) ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -O2 ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS) ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) - LIBS += ../lib/Release/x64/nfd.lib + 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) @@ -49,7 +49,7 @@ ifeq ($(config),release_x86) ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -O2 ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS) ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) - LIBS += ../lib/Release/x86/nfd.lib + 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) @@ -76,7 +76,7 @@ ifeq ($(config),debug_x64) ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -g ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS) ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) - LIBS += -lnfd_d + 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) @@ -103,7 +103,7 @@ ifeq ($(config),debug_x86) ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -g ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS) ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) - LIBS += -lnfd_d + 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) diff --git a/build/premake5.lua b/build/premake5.lua index ab4cbed8c..26c3afcff 100644 --- a/build/premake5.lua +++ b/build/premake5.lua @@ -101,7 +101,10 @@ local make_test = function(name) 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_opendialog") diff --git a/src/nfd_win.cpp b/src/nfd_win.cpp index b065d69cb..7bd95dfad 100644 --- a/src/nfd_win.cpp +++ b/src/nfd_win.cpp @@ -9,11 +9,15 @@ #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 #include #include -#include #include #include @@ -360,14 +364,15 @@ nfdresult_t NFD_OpenDialog( const char *filterList, HRESULT result = ::CoInitializeEx(NULL, ::COINIT_APARTMENTTHREADED | ::COINIT_DISABLE_OLE1DDE ); + + ::IFileOpenDialog *fileOpenDialog(NULL); + if ( !SUCCEEDED(result)) { NFDi_SetError("Could not initialize COM."); goto end; } - ::IFileOpenDialog *fileOpenDialog(NULL); - // Create dialog result = ::CoCreateInstance(::CLSID_FileOpenDialog, NULL, CLSCTX_ALL, ::IID_IFileOpenDialog, From 622d771a1ec1f9fe7f7da8adf08bd3d7c8abbbe3 Mon Sep 17 00:00:00 2001 From: Michael Labbe Date: Sun, 14 Aug 2016 20:19:22 -0700 Subject: [PATCH 10/14] fix rel paths --- build/gmake_windows/nfd.make | 16 +++++----- build/gmake_windows/test_opendialog.make | 32 +++++++++---------- .../test_opendialogmultiple.make | 32 +++++++++---------- build/gmake_windows/test_savedialog.make | 32 +++++++++---------- 4 files changed, 56 insertions(+), 56 deletions(-) diff --git a/build/gmake_windows/nfd.make b/build/gmake_windows/nfd.make index 87efa32c7..a19b6a9fe 100644 --- a/build/gmake_windows/nfd.make +++ b/build/gmake_windows/nfd.make @@ -12,9 +12,9 @@ endif ifeq ($(config),release_x64) RESCOMP = windres - TARGETDIR = ../lib/Release/x64 + TARGETDIR = ../../build/lib/Release/x64 TARGET = $(TARGETDIR)/nfd.lib - OBJDIR = ../obj/x64/Release/nfd + OBJDIR = ../../build/obj/x64/Release/nfd DEFINES += -DNDEBUG INCLUDES += -I../../src/include FORCE_INCLUDE += @@ -39,9 +39,9 @@ endif ifeq ($(config),release_x86) RESCOMP = windres - TARGETDIR = ../lib/Release/x86 + TARGETDIR = ../../build/lib/Release/x86 TARGET = $(TARGETDIR)/nfd.lib - OBJDIR = ../obj/x86/Release/nfd + OBJDIR = ../../build/obj/x86/Release/nfd DEFINES += -DNDEBUG INCLUDES += -I../../src/include FORCE_INCLUDE += @@ -66,9 +66,9 @@ endif ifeq ($(config),debug_x64) RESCOMP = windres - TARGETDIR = ../lib/Debug/x64 + TARGETDIR = ../../build/lib/Debug/x64 TARGET = $(TARGETDIR)/nfd_d.lib - OBJDIR = ../obj/x64/Debug/nfd + OBJDIR = ../../build/obj/x64/Debug/nfd DEFINES += -DDEBUG INCLUDES += -I../../src/include FORCE_INCLUDE += @@ -93,9 +93,9 @@ endif ifeq ($(config),debug_x86) RESCOMP = windres - TARGETDIR = ../lib/Debug/x86 + TARGETDIR = ../../build/lib/Debug/x86 TARGET = $(TARGETDIR)/nfd_d.lib - OBJDIR = ../obj/x86/Debug/nfd + OBJDIR = ../../build/obj/x86/Debug/nfd DEFINES += -DDEBUG INCLUDES += -I../../src/include FORCE_INCLUDE += diff --git a/build/gmake_windows/test_opendialog.make b/build/gmake_windows/test_opendialog.make index 3a8d4c624..91894eaec 100644 --- a/build/gmake_windows/test_opendialog.make +++ b/build/gmake_windows/test_opendialog.make @@ -12,9 +12,9 @@ endif ifeq ($(config),release_x64) RESCOMP = windres - TARGETDIR = ../bin + TARGETDIR = ../../build/bin TARGET = $(TARGETDIR)/test_opendialog.exe - OBJDIR = ../obj/x64/Release/test_opendialog + OBJDIR = ../../build/obj/x64/Release/test_opendialog DEFINES += -DNDEBUG INCLUDES += -I../../src/include FORCE_INCLUDE += @@ -22,9 +22,9 @@ ifeq ($(config),release_x64) 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 + LIBS += ../../build/lib/Release/x64/nfd.lib -lole32 -luuid + LDDEPS += ../../build/lib/Release/x64/nfd.lib + ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../../build/lib/Release/x64 -m64 -s LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) define PREBUILDCMDS endef @@ -39,9 +39,9 @@ endif ifeq ($(config),release_x86) RESCOMP = windres - TARGETDIR = ../bin + TARGETDIR = ../../build/bin TARGET = $(TARGETDIR)/test_opendialog.exe - OBJDIR = ../obj/x86/Release/test_opendialog + OBJDIR = ../../build/obj/x86/Release/test_opendialog DEFINES += -DNDEBUG INCLUDES += -I../../src/include FORCE_INCLUDE += @@ -49,9 +49,9 @@ ifeq ($(config),release_x86) 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 + LIBS += ../../build/lib/Release/x86/nfd.lib -lole32 -luuid + LDDEPS += ../../build/lib/Release/x86/nfd.lib + ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../../build/lib/Release/x86 -m32 -s LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) define PREBUILDCMDS endef @@ -66,9 +66,9 @@ endif ifeq ($(config),debug_x64) RESCOMP = windres - TARGETDIR = ../bin + TARGETDIR = ../../build/bin TARGET = $(TARGETDIR)/test_opendialog_d.exe - OBJDIR = ../obj/x64/Debug/test_opendialog + OBJDIR = ../../build/obj/x64/Debug/test_opendialog DEFINES += -DDEBUG INCLUDES += -I../../src/include FORCE_INCLUDE += @@ -78,7 +78,7 @@ ifeq ($(config),debug_x64) ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) LIBS += -lnfd_d -lole32 -luuid LDDEPS += - ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../lib/Debug/x64 -m64 + ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../../build/lib/Debug/x64 -m64 LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) define PREBUILDCMDS endef @@ -93,9 +93,9 @@ endif ifeq ($(config),debug_x86) RESCOMP = windres - TARGETDIR = ../bin + TARGETDIR = ../../build/bin TARGET = $(TARGETDIR)/test_opendialog_d.exe - OBJDIR = ../obj/x86/Debug/test_opendialog + OBJDIR = ../../build/obj/x86/Debug/test_opendialog DEFINES += -DDEBUG INCLUDES += -I../../src/include FORCE_INCLUDE += @@ -105,7 +105,7 @@ ifeq ($(config),debug_x86) ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) LIBS += -lnfd_d -lole32 -luuid LDDEPS += - ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../lib/Debug/x86 -m32 + ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../../build/lib/Debug/x86 -m32 LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) define PREBUILDCMDS endef diff --git a/build/gmake_windows/test_opendialogmultiple.make b/build/gmake_windows/test_opendialogmultiple.make index 1c3b998f0..0b19115c6 100644 --- a/build/gmake_windows/test_opendialogmultiple.make +++ b/build/gmake_windows/test_opendialogmultiple.make @@ -12,9 +12,9 @@ endif ifeq ($(config),release_x64) RESCOMP = windres - TARGETDIR = ../bin + TARGETDIR = ../../build/bin TARGET = $(TARGETDIR)/test_opendialogmultiple.exe - OBJDIR = ../obj/x64/Release/test_opendialogmultiple + OBJDIR = ../../build/obj/x64/Release/test_opendialogmultiple DEFINES += -DNDEBUG INCLUDES += -I../../src/include FORCE_INCLUDE += @@ -22,9 +22,9 @@ ifeq ($(config),release_x64) 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 + LIBS += ../../build/lib/Release/x64/nfd.lib -lole32 -luuid + LDDEPS += ../../build/lib/Release/x64/nfd.lib + ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../../build/lib/Release/x64 -m64 -s LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) define PREBUILDCMDS endef @@ -39,9 +39,9 @@ endif ifeq ($(config),release_x86) RESCOMP = windres - TARGETDIR = ../bin + TARGETDIR = ../../build/bin TARGET = $(TARGETDIR)/test_opendialogmultiple.exe - OBJDIR = ../obj/x86/Release/test_opendialogmultiple + OBJDIR = ../../build/obj/x86/Release/test_opendialogmultiple DEFINES += -DNDEBUG INCLUDES += -I../../src/include FORCE_INCLUDE += @@ -49,9 +49,9 @@ ifeq ($(config),release_x86) 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 + LIBS += ../../build/lib/Release/x86/nfd.lib -lole32 -luuid + LDDEPS += ../../build/lib/Release/x86/nfd.lib + ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../../build/lib/Release/x86 -m32 -s LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) define PREBUILDCMDS endef @@ -66,9 +66,9 @@ endif ifeq ($(config),debug_x64) RESCOMP = windres - TARGETDIR = ../bin + TARGETDIR = ../../build/bin TARGET = $(TARGETDIR)/test_opendialogmultiple_d.exe - OBJDIR = ../obj/x64/Debug/test_opendialogmultiple + OBJDIR = ../../build/obj/x64/Debug/test_opendialogmultiple DEFINES += -DDEBUG INCLUDES += -I../../src/include FORCE_INCLUDE += @@ -78,7 +78,7 @@ ifeq ($(config),debug_x64) ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) LIBS += -lnfd_d -lole32 -luuid LDDEPS += - ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../lib/Debug/x64 -m64 + ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../../build/lib/Debug/x64 -m64 LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) define PREBUILDCMDS endef @@ -93,9 +93,9 @@ endif ifeq ($(config),debug_x86) RESCOMP = windres - TARGETDIR = ../bin + TARGETDIR = ../../build/bin TARGET = $(TARGETDIR)/test_opendialogmultiple_d.exe - OBJDIR = ../obj/x86/Debug/test_opendialogmultiple + OBJDIR = ../../build/obj/x86/Debug/test_opendialogmultiple DEFINES += -DDEBUG INCLUDES += -I../../src/include FORCE_INCLUDE += @@ -105,7 +105,7 @@ ifeq ($(config),debug_x86) ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) LIBS += -lnfd_d -lole32 -luuid LDDEPS += - ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../lib/Debug/x86 -m32 + ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../../build/lib/Debug/x86 -m32 LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) define PREBUILDCMDS endef diff --git a/build/gmake_windows/test_savedialog.make b/build/gmake_windows/test_savedialog.make index 53df0b374..7f8dd32d8 100644 --- a/build/gmake_windows/test_savedialog.make +++ b/build/gmake_windows/test_savedialog.make @@ -12,9 +12,9 @@ endif ifeq ($(config),release_x64) RESCOMP = windres - TARGETDIR = ../bin + TARGETDIR = ../../build/bin TARGET = $(TARGETDIR)/test_savedialog.exe - OBJDIR = ../obj/x64/Release/test_savedialog + OBJDIR = ../../build/obj/x64/Release/test_savedialog DEFINES += -DNDEBUG INCLUDES += -I../../src/include FORCE_INCLUDE += @@ -22,9 +22,9 @@ ifeq ($(config),release_x64) 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 + LIBS += ../../build/lib/Release/x64/nfd.lib -lole32 -luuid + LDDEPS += ../../build/lib/Release/x64/nfd.lib + ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../../build/lib/Release/x64 -m64 -s LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) define PREBUILDCMDS endef @@ -39,9 +39,9 @@ endif ifeq ($(config),release_x86) RESCOMP = windres - TARGETDIR = ../bin + TARGETDIR = ../../build/bin TARGET = $(TARGETDIR)/test_savedialog.exe - OBJDIR = ../obj/x86/Release/test_savedialog + OBJDIR = ../../build/obj/x86/Release/test_savedialog DEFINES += -DNDEBUG INCLUDES += -I../../src/include FORCE_INCLUDE += @@ -49,9 +49,9 @@ ifeq ($(config),release_x86) 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 + LIBS += ../../build/lib/Release/x86/nfd.lib -lole32 -luuid + LDDEPS += ../../build/lib/Release/x86/nfd.lib + ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../../build/lib/Release/x86 -m32 -s LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) define PREBUILDCMDS endef @@ -66,9 +66,9 @@ endif ifeq ($(config),debug_x64) RESCOMP = windres - TARGETDIR = ../bin + TARGETDIR = ../../build/bin TARGET = $(TARGETDIR)/test_savedialog_d.exe - OBJDIR = ../obj/x64/Debug/test_savedialog + OBJDIR = ../../build/obj/x64/Debug/test_savedialog DEFINES += -DDEBUG INCLUDES += -I../../src/include FORCE_INCLUDE += @@ -78,7 +78,7 @@ ifeq ($(config),debug_x64) ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) LIBS += -lnfd_d -lole32 -luuid LDDEPS += - ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../lib/Debug/x64 -m64 + ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../../build/lib/Debug/x64 -m64 LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) define PREBUILDCMDS endef @@ -93,9 +93,9 @@ endif ifeq ($(config),debug_x86) RESCOMP = windres - TARGETDIR = ../bin + TARGETDIR = ../../build/bin TARGET = $(TARGETDIR)/test_savedialog_d.exe - OBJDIR = ../obj/x86/Debug/test_savedialog + OBJDIR = ../../build/obj/x86/Debug/test_savedialog DEFINES += -DDEBUG INCLUDES += -I../../src/include FORCE_INCLUDE += @@ -105,7 +105,7 @@ ifeq ($(config),debug_x86) ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) LIBS += -lnfd_d -lole32 -luuid LDDEPS += - ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../lib/Debug/x86 -m32 + ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../../build/lib/Debug/x86 -m32 LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) define PREBUILDCMDS endef From a8bd9d701859b657f001fd147e60f9e9015b1195 Mon Sep 17 00:00:00 2001 From: Michael Labbe Date: Sun, 14 Aug 2016 20:25:33 -0700 Subject: [PATCH 11/14] update docs re: mingw --- README.md | 4 +++- docs/build.md | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 92b9545d2..a0fd0ab33 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Features: - Paid support available. - Multiple file selection support. - 64-bit and 32-bit friendly. - - GCC, Clang and Visual Studio supported. + - GCC, Clang, Mingw and Visual Studio supported. - No third party dependencies. - Support for Vista's modern `IFileDialog` on Windows. - Support for non-deprecated Cocoa APIs on OS X. @@ -143,6 +143,8 @@ Native File Dialog by Michael Labbe 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. diff --git a/docs/build.md b/docs/build.md index ec9b4425f..7d69d8edf 100644 --- a/docs/build.md +++ b/docs/build.md @@ -26,3 +26,6 @@ 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/). From 4089a0bb78d995131520cf0860fc0cb7838388ab Mon Sep 17 00:00:00 2001 From: Michael Labbe Date: Mon, 15 Aug 2016 12:46:41 -0700 Subject: [PATCH 12/14] fix xcode build --- test/test_savedialog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_savedialog.c b/test/test_savedialog.c index 4e1f69efc..7ec37f089 100644 --- a/test/test_savedialog.c +++ b/test/test_savedialog.c @@ -1,4 +1,4 @@ -#include +#include "nfd.h" #include #include From 3bb52b4331c68a3184aa37effb6e6a779233d6f0 Mon Sep 17 00:00:00 2001 From: Michael Labbe Date: Mon, 15 Aug 2016 12:48:27 -0700 Subject: [PATCH 13/14] dummy change, test autobuild --- test/test_savedialog.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test_savedialog.c b/test/test_savedialog.c index 7ec37f089..06d3f1ee4 100644 --- a/test/test_savedialog.c +++ b/test/test_savedialog.c @@ -3,6 +3,8 @@ #include #include +//. + /* this test should compile on all supported platforms */ int main( void ) From 78013623b8c0d5879ef69d35a321f30f02b35cdd Mon Sep 17 00:00:00 2001 From: Michael Labbe Date: Mon, 15 Aug 2016 13:07:35 -0700 Subject: [PATCH 14/14] dummy change, test autobuild --- test/test_savedialog.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/test_savedialog.c b/test/test_savedialog.c index 06d3f1ee4..7ec37f089 100644 --- a/test/test_savedialog.c +++ b/test/test_savedialog.c @@ -3,8 +3,6 @@ #include #include -//. - /* this test should compile on all supported platforms */ int main( void )