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 windows support #597

Closed
wants to merge 25 commits into from
Closed

Conversation

marcin-sielski
Copy link
Contributor

This PR adds Windows support to Janus WebRTC Gateway. It supports
Linux and OS X as well. This version is based on v0.1.1 release.
This PR was created to discuss the changes introduced to the package.
It will be updated to the latest master if no major issues are found.

@lminiero
Copy link
Member

Thanks for working on this! A quick glance showed an overwhelming number of changes... I'll try to review when I get back to the office in a week or so.

@marcin-sielski
Copy link
Contributor Author

Thank, you...

@saghul
Copy link
Contributor

saghul commented Aug 22, 2016

@marcin-sielski what are you targeting, MinGW-w64?

Sofia-SIP (x86, x86_64):

mkdir mingw-w64-sofia-sip-git
cd mingw-w64-sofia-sip-git
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe just use git clone to simplify the steps?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,
Well, Yes, Actually this is the shortest and the most comfortable way to have it compiled. Once binary packages are avaialble in pacman repository it would need simply run "pacman -S --noconfirm mingw-w64-i686-sofia-sip-git"
Hope that helps.
Best Regards

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, but in the meantime adding git to the required packages, cloning the repo and running makepkg in there should do, right?

Copy link
Contributor Author

@marcin-sielski marcin-sielski Aug 22, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makepkg-mingw together with PKGBUILD does all the magic (it clones the repos, applies patches, compiles and installs binaries). Hope that helps.

@saghul
Copy link
Contributor

saghul commented Aug 22, 2016

I took the liberty of making a quick review :-) Awesome work @marcin-sielski!

@marcin-sielski
Copy link
Contributor Author

Thank you for the review

@@ -53,15 +59,21 @@ stream_DATA = $(NULL)
recordingsdir = $(datadir)/janus/recordings
recordings_DATA = $(NULL)

if WINDOWS_OS
INSTDIR = ../..
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this? Shouldn't this be decided by the prefix you pass when configuring? Or does this work differently with MingW on Windows?

Copy link
Contributor Author

@marcin-sielski marcin-sielski Aug 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Lorenzo, I hope you had great holidays. Thank you for your comment. This actually entire feature that enables to use relative paths within Janus code. It enables to create a package that is path independent so that sources can be compiled it in e.g. c:\msys64\mingw64 and binaries can be then installed in selected path by the user e.g. C:\Program Files\Janus WebRTC Gateway. I hope that helps.

Copy link
Contributor

@ploxiln ploxiln Aug 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That doesn't entirely make sense ...

I regularly compile janus in /home/scratch/janus-gateway and install to /opt/janus. You mean, the user can change the install dir after compile time? That's already sort of possible, by specifying the config file location on the janus command line (and then the config file specifies all the other paths). But this doesn't remove the need to do that, you only use INSTDIR for the location to install the sample config files ...

Presumably, what you would want to do for a "windows installer", is specify minimal --prefix, --confdir etc, and use the existing DESTDIR feature to install to a temporary "package root" folder, then the installer can put that anywhere, and the last necessary step is to customize the config file and launcher shortcut, from the installer, if that's what you really want to do. (You might also want to enable janus to use a relative path to the main config file, and relative paths within it, but this doesn't do that either.)

Copy link
Contributor Author

@marcin-sielski marcin-sielski Aug 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it does entirely make sense if you want to use 3rd party installer on Windows which is more common approach in that OS. I agree that paths could be changed after compilation but this make very limited use case on Windows. I also enabled relative path to the main config. Please refer to (https://github.com/marcin-sielski/janus-gateway/releases) binaries. Windows environment is by nature slightly diffrent then Linux. Hope that helps.

@lminiero
Copy link
Member

First quick review done, tremendous effort, thanks for this!

@marcin-sielski
Copy link
Contributor Author

Thanks Lorenzo!!!

@omichel
Copy link

omichel commented Sep 12, 2016

I am very interested by this work as I am trying to setup an open source cross-platform WebRTC server (Linux, Windows and Mac OS X) that broadcasts video from an application producing images (OpenGL rendering). So far, I investigated OpenWebRTC and Janus (both combined with gstreamer) to achieve this goal, but none of them seemed to be well supported on Windows. Thanks to this PR, it seems Janus should now work on Windows... 😄 @marcin-sielski: I saw you also tried to compile OpenWebRTC on Windows, so I was wondering why you did this effort for Janus. Is Janus a better horse for setting-up such a cross-platform server?

@marcin-sielski
Copy link
Contributor Author

marcin-sielski commented Sep 12, 2016

Janus Gateway is definetly server side software. You could write Janus plugin (e.g. based on Streaming Plugin) using GStreamer Mutimedia framework to create full multimedia Server that takes as an input anything supported by GStreamer and have WebRTC output. OpenWebRTC works better for client side. Hope that helps. Anyway you may try Windows version of Janus published at https://github.com/marcin-sielski/janus-gateway/releases. Be aware that OpenWebRTC uses different Congestion Control method then Google stack. Kurento might also fit your needs but Windows version is not currently officialy supported. Hope that helps.

@radioman
Copy link

excellent effort! I wonder if visual studio would work?

@marcin-sielski
Copy link
Contributor Author

marcin-sielski commented Oct 16, 2016

Hi,

This is the first round of bringing WebRTC server software to Windows world.
The dependencies are always problematic. Some of them can be already compiled using Visual
Studio compiler. I believe that this effort would significantly simplify second round - compile Janus with Visual Studio compiler.

I hope that helps

Best Regards

Marcin Sielski

@blackpan2
Copy link

@marcin-sielski I am using the tagged release v0.2.0 (b543884), however when doing janus.exe -v I get janus 0.1.1 as the response. Is this is a bug or are we still working from v0.1.1 in the windows version? .

Thank you for bringing this to windows.

@marcin-sielski
Copy link
Contributor Author

marcin-sielski commented Nov 15, 2016

@blackpan2 Thank you for catching that. I have rebuilt Gateway from scratch. Should be fine now. Issue was related to the built itself and not to the source code.

@blackpan2
Copy link

I just wanted to confirm, especially since it was saving v0.2.0 on startup. Thanks again for fixing it and integrating.

@abraiante
Copy link

It looks like this pull request is broken now. @marcin-sielski, any chance this will be worked on again so we can build janus in windows using master?

@marcin-sielski
Copy link
Contributor Author

marcin-sielski commented Mar 8, 2017

@abraiante Sure, I would do it but I would like to have confirmation first from @lminiero when these changes could to be merged to the main line.

@lminiero
Copy link
Member

lminiero commented Mar 8, 2017

As I said at the time, the main concern I have is maintaining all this. I don't have ways to compile the Windows code too (and I personally don't intend to set up a Windows environment), and I can't possibly ensure I don't break anything when I work on new features. Worrying about that could take me time I don't have and I'd rather dedicate to coding and fixing things.

If you can guarantee the changes will be manageable, no issue from me. You may want to wait a bit before taking on this effort, though, as in the next days I'll merge #784 which changes quite a bit in the SDP code and some plugins, and #799 will probably follow shortly after. Besides, it might be a good idea to base it on #403 instead of master, as that will be the next major merge after that (ideally by April, or May at the latest), and so you'd definitely be some steps ahead.

@lminiero
Copy link
Member

lminiero commented Apr 4, 2018

Closing as a long time passed and way too many things changed in the meanwhile. An updated contribution as a new PR would be of course welcome. Thanks for this huge effort!

@lminiero lminiero closed this Apr 4, 2018
@lminiero
Copy link
Member

For those still interested in Windows support, it looks like Janus works nicely in WSL: https://groups.google.com/forum/#!topic/meetecho-janus/6txdf8cyrns

@caiiiycuk
Copy link
Contributor

@marcin-sielski hi, thank you for great job. I trying to build latest version of Janus on windows. I successfully compiled it, and it starts without any visible error. However streaming plugin does not work properly. Did you tested streaming plugin with your changes, is it works for you?

My windows branch: https://github.com/caiiiycuk/janus-gateway/tree/windows

Can you give me any advice? More info:
https://groups.google.com/g/meetecho-janus/c/xPImgPDnxDI

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

Successfully merging this pull request may close these issues.

None yet

9 participants