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 cygwin 64bits, native Windows and IDE #2532

Closed
4 of 6 tasks
winlinvip opened this issue Aug 14, 2021 · 10 comments · Fixed by #2622, #2630 or #3246
Closed
4 of 6 tasks

Windows: Support cygwin 64bits, native Windows and IDE #2532

winlinvip opened this issue Aug 14, 2021 · 10 comments · Fixed by #2622, #2630 or #3246
Assignees
Labels
Feature It's a new feature. TransByAI Translated by AI/GPT.
Milestone

Comments

@winlinvip
Copy link
Member

winlinvip commented Aug 14, 2021

SRS for Windows

SRS 5.0.89+ supports Windows(Cygwin64).

Build from code

Please install Cygwin64.

Install packages gcc-g++ make automake patch pkg-config tcl cmake, please see packages.

Build SRS with cygwin terminal:

git checkout develop
./configure
make

If success, there should be a ./objs/srs.exe

Install from binary

For each release of SRS, from SRS 5.0.89, there is always a binary installer of SRS Windows, normally as the artifact of release, which allows you to install and run SRS very easy.

Bellow is some examples, note that you should always use the latest release, not the fixed one:

Note: SRS 5.0.89+ supports cygwin pipeline, to build and packge automatically by GitHub Actions.

image

Run SRS as administrator:

image

Publish to SRS Windows by FFmpeg:

ffmpeg -re -i ~/srs/doc/source.flv -c copy -f flv rtmp://win11/live/livestream

Play by VLC or srs-player

image

Most of SRS features are available in Windows, for example, RTMP, HTTP-FLV, HLS, WebRTC, HTTP-API, Prometheus Exporter, etc.

Package by NSIS

If want to package by NSIS, please run in cygwin terminal:

"/cygdrive/c/Program Files (x86)/NSIS/makensis.exe" \
    /DSRS_VERSION=$(./objs/srs -v 2>&1) \
    /DCYGWIN_DIR="C:\cygwin64" \
    packaging/nsis/srs.nsi

Known Issues

Links

ST supports windows: ossrs/state-threads#20

Commits about SRS Windows: ossrs/srs-windows#2

Windows docker also works for SRS, however, srs.exe is more popular for windows developers.

@chenjim
Copy link

chenjim commented Oct 21, 2021

My environment WSL + Ubuntu should be more efficient than cygwin.

TRANS_BY_GPT3

@290008282

This comment was marked as outdated.

@duliangheng

This comment was marked as outdated.

@290008282

This comment was marked as outdated.

@duliangheng

This comment was marked as outdated.

@duliangheng

This comment was marked as outdated.

@290008282

This comment was marked as outdated.

@duliangheng

This comment was marked as outdated.

@puttys

This comment was marked as outdated.

@winlinvip winlinvip linked a pull request Nov 18, 2022 that will close this issue
winlinvip added a commit to winlinvip/srs that referenced this issue Nov 18, 2022
1. Replase ln by cp for windows.
2. Refine OS and CPU arch detecting.
3. Support configure from any directory by `SRS_WORKDIR`.
4. Support output to any directory by `SRS_OUTPUT`.
5. Disable sanitizer for gperf.
6. Use parallels build for make.
7. Refine bash variable check.
winlinvip added a commit that referenced this issue Nov 18, 2022
1. Replase ln by cp for windows.
2. Refine OS and CPU arch detecting.
3. Support configure from any directory by `SRS_WORKDIR`.
4. Support output to any directory by `SRS_OUTPUT`.
5. Disable sanitizer for gperf.
6. Use parallels build for make.
7. Refine bash variable check.
@winlinvip winlinvip reopened this Nov 18, 2022
@winlinvip winlinvip reopened this Nov 18, 2022
@winlinvip winlinvip reopened this Nov 18, 2022
winlinvip pushed a commit that referenced this issue Nov 18, 2022
1. Replase ln by cp for windows.
2. Refine OS and CPU arch detecting.
3. Support configure from any directory by `SRS_WORKDIR`.
4. Support output to any directory by `SRS_OUTPUT`.
5. Disable sanitizer for gperf.
6. Use parallels build for make.
7. Refine bash variable check.
@winlinvip
Copy link
Member Author

Already merged commit:

commit e9503a9
Author: wenjie.zhao 740936897@qq.com
Date: Fri Nov 18 23:02:35 2022 +0800

For #2532: Windows: Replace ln by cp for windows. v5.0.87 (#3246)

1. Replase ln by cp for windows.
2. Refine OS and CPU arch detecting.
3. Support configure from any directory by `SRS_WORKDIR`.
4. Support output to any directory by `SRS_OUTPUT`.
5. Disable sanitizer for gperf.
6. Use parallels build for make.
7. Refine bash variable check.

winlinvip pushed a commit to winlinvip/srs that referenced this issue Nov 20, 2022
winlinvip pushed a commit to winlinvip/srs that referenced this issue Nov 20, 2022
1. Support cygwin by '--cygwin64=on'
2. Detect cygwin automatically.
3. Disalbe sanitizer, srt and srtp with openssl.
4. Disable multiple threads, use single threads.
5. Support utest for cygwin64.
6. Query features for windows by API.
7. Disable stat APIs for cygwin.
8. Use ST select event driver.
winlinvip added a commit that referenced this issue Nov 20, 2022
1. Support cygwin by '--cygwin64=on'
2. Detect cygwin automatically.
3. Disalbe sanitizer, srt and srtp with openssl.
4. Disable multiple threads, use single threads.
5. Support utest for cygwin64.
6. Query features for windows by API.
7. Disable stat APIs for cygwin.
8. Use ST select event driver.

Co-authored-by: wenjie.zhao <740936897@qq.com>
@winlinvip winlinvip pinned this issue Dec 17, 2022
@winlinvip winlinvip changed the title Windows: Support cygwin 64bits Windows: Support cygwin 64bits and native Windows build and debugging. Dec 17, 2022
@winlinvip winlinvip changed the title Windows: Support cygwin 64bits and native Windows build and debugging. Windows: Support cygwin 64bits, native Windows and IDE Dec 17, 2022
@winlinvip winlinvip unpinned this issue Jan 2, 2023
johzzy pushed a commit to johzzy/srs that referenced this issue Jun 26, 2023
…#3246)

1. Replase ln by cp for windows.
2. Refine OS and CPU arch detecting.
3. Support configure from any directory by `SRS_WORKDIR`.
4. Support output to any directory by `SRS_OUTPUT`.
5. Disable sanitizer for gperf.
6. Use parallels build for make.
7. Refine bash variable check.
johzzy added a commit to johzzy/srs that referenced this issue Jun 26, 2023
johzzy pushed a commit to johzzy/srs that referenced this issue Jun 26, 2023
1. Support cygwin by '--cygwin64=on'
2. Detect cygwin automatically.
3. Disalbe sanitizer, srt and srtp with openssl.
4. Disable multiple threads, use single threads.
5. Support utest for cygwin64.
6. Query features for windows by API.
7. Disable stat APIs for cygwin.
8. Use ST select event driver.

Co-authored-by: wenjie.zhao <740936897@qq.com>
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment