Skip to content
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 #2

Open
indutny opened this issue Mar 19, 2017 · 7 comments
Open

Windows support #2

indutny opened this issue Mar 19, 2017 · 7 comments

Comments

@indutny
Copy link
Owner

indutny commented Mar 19, 2017

n/t

cc @refack? ;)

@indutny indutny mentioned this issue Mar 19, 2017
4 tasks
@indutny
Copy link
Owner Author

indutny commented Apr 3, 2017

@refack since you asked 😉

I have no idea how file IO, child processes work on Windows. I suppose one will need CreateProcess to do execSync, but I hope that file IO may be done with some POSIX-like APIs.

All in all, it comes down to splitting dukgyp.c into dukgyp.c,dukgyp-unix.c,dukgyp-win.c, and dukgyp-platform.h (which will contain declarations of -unix and -win stuff).

@refack
Copy link

refack commented Apr 3, 2017

Sounds like a hoot 🤠

@refack
Copy link

refack commented Apr 3, 2017

After commenting out the broken stuff I got it down to this:

Severity	Code	Description	Project	File	Line	Suppression State
Error	LNK1120	3 unresolved externals	dukgyp	D:\code\3party\dukgyp\Default\dukgyp.exe	1	
Error	LNK2019	unresolved external symbol _realpath referenced in function _dukgyp_native_fs_realpath	dukgyp	D:\code\3party\dukgyp\dukgyp-platform.obj	1	
Error	LNK2019	unresolved external symbol _lstat referenced in function _dukgyp_native_fs_exists	dukgyp	D:\code\3party\dukgyp\dukgyp-platform.obj	1	
Error	LNK2019	unresolved external symbol _dukgyp_exec_cmd referenced in function _dukgyp_native_cp_exec	dukgyp	D:\code\3party\dukgyp\dukgyp-platform.obj	1	

Piece of 🍰

@refack
Copy link

refack commented Apr 3, 2017

Seems you're right, only need to re-implement dukgyp_exec_cmd. Everything else works.
We can do IO with streams, very similar to POSIX, so it's not a huge change.
Do you think we can add libuv as a dependency? Or is that a too big a hammer?

@indutny
Copy link
Owner Author

indutny commented Apr 3, 2017

It is too big for this case, and would be hard to compile to a single .c file.

@indutny
Copy link
Owner Author

indutny commented Apr 3, 2017

@refack I just got an access to Windows machine. Let me know if you need any help on this!

@refack
Copy link

refack commented Apr 3, 2017

Almost there...

refack added a commit to refack/dukgyp that referenced this issue Apr 4, 2017
refack added a commit to refack/dukgyp that referenced this issue Apr 4, 2017
refack added a commit to refack/dukgyp that referenced this issue Apr 4, 2017
refack added a commit to refack/dukgyp that referenced this issue Apr 4, 2017
WIP on indutny#2
Currently 18/21 tests pass
refack added a commit to refack/dukgyp that referenced this issue Apr 4, 2017
WIP on indutny#2
Currently 18/21 tests pass
refack added a commit to refack/dukgyp that referenced this issue Apr 4, 2017
WIP on indutny#2
Currently 18/21 tests pass
- Added AppVeyor for `windows` CI
refack added a commit to refack/dukgyp that referenced this issue Apr 4, 2017
WIP on indutny#2 (Currently 18/21 tests pass)
- Added AppVeyor for `windows` CI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants