Skip to content
This repository has been archived by the owner on Jul 5, 2018. It is now read-only.

Linux and Mac Support #23

Open
devloop0 opened this issue May 22, 2016 · 11 comments
Open

Linux and Mac Support #23

devloop0 opened this issue May 22, 2016 · 11 comments
Assignees

Comments

@devloop0
Copy link
Collaborator

Currently, our machine supports Windows (only platform I could test on as of now), but porting everything to Linux and Mac should be easy. I would definitely appreciate some community support on this. Basically, the only platform-dependent line of code is in MainPage.java with the System.loadLibrary.

@agavgavi
Copy link

This website shows how cross OS works with openCV, it should be proably be the same even though you guys are using JavaCV. For an example the LoadLibrary class in my github shows how the cross-os would work. Also in that github are the Linux and Mac opencv files that are necessary for the program to work in the other operating systems (I have not had a chance to test them in their said operating system but I believe that they should work well). By the way if using this method for cross-os, you'll need to replace the System.loadLibrary with a call to LoadLibrary.loadOpenCV() in a static block before you initialize anything. Hopefully this works!

@devloop0
Copy link
Collaborator Author

Thanks, I will check it out and close this issue as soon as I get a prototype working and test it.

@xnart
Copy link
Contributor

xnart commented May 24, 2016

There is should be more easier way.

System.loadLibrary( Core.NATIVE_LIBRARY_NAME );

I believe this code sees what is your platform, and produces right file name for that. If you put all platform native libraries in your libraries path, it should grab for you.

I didn't try but it has to be something like that. (I am not able to try at the moment, maybe 10 days later i can take care of it)

@xnart
Copy link
Contributor

xnart commented May 25, 2016

I built native library on my Linux x64. Here is the library file :

opencv_java310.so.zip

@devloop0
Copy link
Collaborator Author

What architectures does it support? Also, I will try to integrate these for a Linux build as soon as possible. Thank you for doing this.

@xnart
Copy link
Contributor

xnart commented May 25, 2016

Since i built it on x64 architecture, i think it supports only x64s. But not sure.

I tried this library file with The Machine and it works on my Arch Linux x64.

@devloop0
Copy link
Collaborator Author

Okay, I have an x64 installation as well so I will test it on my local machine.
Also, did you hardcode the opencv_java310.so path in MainPage.java?

@xnart
Copy link
Contributor

xnart commented May 25, 2016

Yeah, i couldn't run it with System.loadLibrary(). It runs with : System.load(ABSOLUTE PATH .so).

Got to search out how Maven deals with native libraries.

@8bitgentleman
Copy link

If a mac is needed to compile an OSX version I can lend a hand. Just tell me what to do.

@devloop0
Copy link
Collaborator Author

If you manage to compile everything from source on the latest master branch with the correct OpenCV dependency and modify the UserPlatform.java file to load that file on a Mac, that should be enough.

@roccodev
Copy link

Can you post the UserPlatform.java for Macs please? I have a huge Thunderbolt Display and it can only be attached with Macs.

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

No branches or pull requests

6 participants