-
Notifications
You must be signed in to change notification settings - Fork 331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows support? #88
Comments
Hi @blaggacao, I'm acquainted with that Windows API. Creating a monitor for it wouldn't be difficult, but I'm essentially lacking time for doing that. I'm following up on the referenced issue. |
Hey @emcrisostomo, I'm interested in this feature as well and noticed some progress being made in a feature branch. Is there any help you might need with it? |
Hi @v3n, yes, you're right. The code in the branch The Windows API let us watch directories, not files. Currently, the Windows monitor is subject to this limitation: Finally, you need CygWin to be able to compile this program and the command line arguments are parsed as if they were UNIX file paths. This dependency might be removed in the future. Let me know if you try it. |
That's great news. Currently my dependency stack doesn't include cygwin, and I'd like to avoid including it. I'm going to attempt to build it without it (I'm using bkaradzic/genie for our pre-build system). I'll report on the progress. Would there be any interest in a PR for the build script if I'm successful? Also, files are ignored, is this a Thanks! |
Hi @v3n, Yes, thanks, send a PR if you please. CygWin is used to convert UNIX paths to Windows paths. It should be very easy to remove it. However, since CygWin is widely used and All the functionality is contained into Watching the parent directory of a file is trivial: it's not in the code, though. There are some nuances to consider. Here is the first that come into my mind: we should detect whether the user specifies a file that gets watched because it belongs in a subtree rooted at another watched file's parent. The Windows API would report the same event multiple times in this case. |
great news! 👍 |
@emcrisostomo, it's my understanding that Windows API calls understand Unix paths natively, so that shouldn't be a huge issue. However, I'm sure my testing will reveal whether that's the case or not. I'll start the integration in the next couple of days. |
Hi @v3n, No, that's not true. Many Windows APIs understand paths that use the slash ( Furthermore, UNIX paths don't know anything about what a drive is. The current version of Now, I'm thinking about making the CygWin dependency optional and adding an option to activate the interpretation of Windows paths, both as arguments and as output. |
@emcrisostomo Ah, I see. I've never dealt with UNC paths, that would explain why I didn't know the difference. The strategy you mentioned seems like a good one. |
I've checked in an initial version of the GENie file over here while I'm working on the FSWatch integration: https://github.com/v3n/altertum/blob/feature/fswatch/genie/fswatch.lua So far it compiles with fine with GENie under OS X. Haven't tested Windows yet, will try to get to that when I get home today. I'm sure I've probably missed a few flags while converting the autotools files. Also haven't tested the run-time, gettext is the only thing I'm concerned about, but it seems like you guarded it with preprocessor macros nicely. Some things I noticed:
|
Cool. A couple of things:
Just out of curiosity, which is the advantage of building |
re: GENie;
As for CMake vs. GENie, that's just a personal preference. I'm more than happy to offer my build files for GENie if you want them, but won't be offended if you want to go another route (or even just stay with auto tools) as I do recognize that CMake seems to be the defacto standard. My only real concern is being able to build natively on all platforms without a ton of Cygwin/MinGW workarounds. 👍 Thanks for the pointers on the build file...my brain definitely wasn't work when I wrote some of that. re: Exceptions; clean compile with |
Thanks for your explanation about GENie, @v3n. I'll definitely have a look at your build files: it's always nice to learn new things. You're welcome, I guess it's normal you haven't tried your build files yet on all those platforms. About exceptions: yes, I understand your concerns. I'll quickly review the C API tomorrow. I use the C++ one and wrote the C wrapper as a courtesy: but I know that it requires at least a review (that's why those comments you mentioned exist in the first place). I'll try to do that tomorrow. By the way, exceptions are not used for flow control, though, and you should not get any of them during normal usage. |
Solved in 1.6.0. |
Are there any plans to support Windos's FileSystemWatch API?
I found a reasonably advanced mapper to the inotify command here:
https://github.com/thekid/inotify-win/
however, it lacks still some fundamental support for more complex operations, such as moving:
thekid/inotify-win#7
The text was updated successfully, but these errors were encountered: