-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add windows support #597
Conversation
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. |
Thank, you... |
@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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
I took the liberty of making a quick review :-) Awesome work @marcin-sielski! |
Thank you for the review |
@@ -53,15 +59,21 @@ stream_DATA = $(NULL) | |||
recordingsdir = $(datadir)/janus/recordings | |||
recordings_DATA = $(NULL) | |||
|
|||
if WINDOWS_OS | |||
INSTDIR = ../.. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.)
There was a problem hiding this comment.
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.
First quick review done, tremendous effort, thanks for this! |
Thanks Lorenzo!!! |
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? |
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. |
excellent effort! I wonder if visual studio would work? |
Hi, This is the first round of bringing WebRTC server software to Windows world. I hope that helps Best Regards Marcin Sielski |
@marcin-sielski I am using the tagged release v0.2.0 (b543884), however when doing Thank you for bringing this to windows. |
@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. |
I just wanted to confirm, especially since it was saving v0.2.0 on startup. Thanks again for fixing it and integrating. |
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? |
@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. |
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. |
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! |
For those still interested in Windows support, it looks like Janus works nicely in WSL: https://groups.google.com/forum/#!topic/meetecho-janus/6txdf8cyrns |
@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: |
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.