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

Add support for Windows #79

Open
akash-akya opened this issue Dec 3, 2022 · 15 comments
Open

Add support for Windows #79

akash-akya opened this issue Dec 3, 2022 · 15 comments

Comments

@akash-akya
Copy link
Owner

https://elixirforum.com/t/nmake-fatal-error-u1052-file-makefile-win-not-found-vix-image/52208

@akash-akya
Copy link
Owner Author

Could be addressed together with support for pre-compiled binaries: #77 (comment)

@akash-akya
Copy link
Owner Author

akash-akya commented Mar 20, 2023

TODO

  • setup compilation for windows
  • update precompiler to build NIF for windows
  • configure libvips prebuilt pipeline for windows

@aiwaiwa
Copy link

aiwaiwa commented Mar 20, 2023

Seeing @release_tag "8.14.1.rc3" that is used for downloads from sharp-libvips doesn't look like available. The latest there is v8.14.0-rc1. That could lead to no pre-built downloaded at all, I'm only theorizing.

@akash-akya
Copy link
Owner Author

akash-akya commented Mar 20, 2023

I am not directly using the sharp-libvips binaries, I have a separate fork since the upstream does not work as is.

Fork repo we are using is this - https://github.com/akash-akya/sharp-libvips/releases/tag/v8.14.1.rc3

Also there 2 things here:

  • libvips libraray
  • NIF (bindings which connects beam VM to libvips)

So even if there is prebuilt libvips, we still need a way to compile NIF, currently our makefile only works for UNIX like systems.

@aiwaiwa
Copy link

aiwaiwa commented Mar 20, 2023

Oh got it. Misread the links! I've tried to see how argon2_elixir builds because it does build on a Windows machine, provided the mix deps.compile is initiated from Developer Command Prompt, and it apparently requires a Makefile.win which has a little different syntax than Makefile and somehow uses nmake.

@akash-akya
Copy link
Owner Author

akash-akya commented Mar 20, 2023

That's correct. I just have to create a Makefile for windows for nif to work. Unlike other nif, here we have lot of dependencies involved, so just want to test it properly before releasing.

@aiwaiwa
Copy link

aiwaiwa commented Mar 20, 2023

You are great! I can help with testing for sure! Although bringing a VirtualBox Windows might be much easier to deal with.

So far my setup was simply to get vs_BuildTools.exe and [x] Desktop Development With C++ Workflow

@mrdotb
Copy link

mrdotb commented May 24, 2023

Hello,

I make an attempt to compile Vix on windows.

I pulled the last windows release from the sharp-libvips fork and stick it in c_src for now.

The Makefile.win on my fork.

This makefile.win give this result
The missing pieces now it's to port the code that's unix like to windows.
The pipe, fcntl and read, write, close have different API on windows.

I don't have much experience in C and no experience at all in porting unix code to windows.

If someone want to dig in you can start with that :)

@akash-akya
Copy link
Owner Author

Hi @mrdotb,
That's great news! Creating Makefile is the correct first step. I have to take a closer look, but thanks for the trying it out and sharing! Been bit busy with current job, hopefully I'll get some time next month to do this.

@ramyma
Copy link

ramyma commented Jan 1, 2024

Any updates on this issue?
Is there a way to use Vix on Windows without using WSL?

@akash-akya
Copy link
Owner Author

Hey @ramyma,

Unfortunately there is no progress. I do want to provide support for windows but blocker for me is that I don't have a windows system at hand to experiment and test. The mac laptop I have does not have enough space left to run windows inside VM.

I'll try to make room and run windows vm in sometime but not sure about the timeline.

Thanks

@ramyma
Copy link

ramyma commented Jan 4, 2024

Thanks @akash-akya, I hope it's not too hard to get around; I'm trying to distribute an application on Windows, and I hit a wall due to this issue.

Please let me know if I can help you out somehow.

I appreciate your effort 🙏

@ramyma
Copy link

ramyma commented Mar 29, 2024

@akash-akya Is there a chance we can get native Windows support?

@akash-akya
Copy link
Owner Author

akash-akya commented Apr 4, 2024

Hey @ramyma, sorry for the late response.

As for the Windows support, unfortunately my situation is still same as #79 (comment). Even if I add support now, maintaining it will take some constant effort without device at hand. Especially so because libvips has a lot of libraries which gets updated frequently.

That said, I'll see if I can get a working version first, later we'll see about maintaining it.

@ramyma
Copy link

ramyma commented Apr 4, 2024

Thanks, appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants