diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3a075ef80..7271f8d9a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -64,6 +64,165 @@ jobs: run: | docker run --rm srs:test bash -c 'make && ./objs/srs -c conf/regression-test.conf && \ cd 3rdparty/srs-bench && make && ./objs/srs_test -test.v' + outputs: + SRS_TEST_DONE: ok + + draft: + name: draft + runs-on: ubuntu-20.04 + needs: + - envs + steps: + - name: Create release draft + id: create_draft + uses: ncipollo/release-action@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + allowUpdates: true + tag: ${{ github.ref }} + draft: true + prerelease: true + outputs: + SRS_RELEASE_ID: ${{ steps.create_draft.outputs.id }} + + cygwin64: + name: cygwin64 + runs-on: windows-latest + needs: + - envs + - draft + steps: + # See https://github.com/cygwin/cygwin-install-action#parameters + # Note that https://github.com/egor-tensin/setup-cygwin fails to install packages. + - name: Setup Cygwin + uses: cygwin/cygwin-install-action@master + with: + platform: x86_64 + packages: bash make gcc-g++ cmake automake patch pkg-config tcl + install-dir: C:\cygwin64 + ################################################################################################################## + - name: Checkout repository + uses: actions/checkout@v2 + ################################################################################################################## + - name: Covert output to env + env: + SHELLOPTS: igncr + shell: C:\cygwin64\bin\bash.exe --login '{0}' + run: | + echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV + echo "SRS_VERSION=${{ needs.envs.outputs.SRS_VERSION }}" >> $GITHUB_ENV + echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_MAJOR }}" >> $GITHUB_ENV + echo "SRS_RELEASE_ID=${{ needs.draft.outputs.SRS_RELEASE_ID }}" >> $GITHUB_ENV + ################################################################################################################## + - name: Build SRS + env: + SHELLOPTS: igncr + SRS_WORKSPACE: ${{ github.workspace }} + shell: C:\cygwin64\bin\bash.exe --login '{0}' + run: | + export PATH=/usr/bin:/usr/local/bin && + which make gcc g++ patch cmake pkg-config uname grep sed && + (make --version; gcc --version; patch --version; cmake --version; pkg-config --version) && + (aclocal --version; autoconf --version; automake --version; uname -a) && + cd $(cygpath -u $SRS_WORKSPACE)/trunk && ./configure && make + ################################################################################################################## + - name: Package SRS + env: + SHELLOPTS: igncr + SRS_WORKSPACE: ${{ github.workspace }} + shell: C:\cygwin64\bin\bash.exe --login '{0}' + run: | + cd $(cygpath -u $SRS_WORKSPACE) && + if [[ $(echo $SRS_TAG |grep -qE '^v' && echo YES) != YES ]]; then + SRS_VERSION=$(./trunk/objs/srs -v 2>&1); echo "Change version to ${SRS_VERSION}"; + fi && + "/cygdrive/c/Program Files (x86)/NSIS/makensis.exe" /DSRS_VERSION=${SRS_VERSION} \ + /DCYGWIN_DIR="C:\cygwin64" trunk/packaging/nsis/srs.nsi && + mv trunk/packaging/nsis/SRS-Windows-x86_64-${SRS_VERSION}-setup.exe . && ls -lh *.exe && + echo "SRS_CYGWIN_TAR=SRS-Windows-x86_64-${SRS_VERSION}-setup.exe" >> $GITHUB_ENV && + echo "SRS_CYGWIN_MD5=$(md5sum SRS-Windows-x86_64-${SRS_VERSION}-setup.exe| awk '{print $1}')" >> $GITHUB_ENV + ################################################################################################################## + - name: Upload Release Assets Cygwin + id: upload-release-assets-cygwin + uses: dwenegar/upload-release-assets@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + release_id: ${{ env.SRS_RELEASE_ID }} + assets_path: ${{ env.SRS_CYGWIN_TAR }} + outputs: + SRS_CYGWIN_TAR: ${{ env.SRS_CYGWIN_TAR }} + SRS_CYGWIN_MD5: ${{ env.SRS_CYGWIN_MD5 }} + + linux: + name: linux + runs-on: ubuntu-20.04 + needs: + - envs + - draft + steps: + ################################################################################################################## + - name: Covert output to env + run: | + echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV + echo "SRS_VERSION=${{ needs.envs.outputs.SRS_VERSION }}" >> $GITHUB_ENV + echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_MAJOR }}" >> $GITHUB_ENV + echo "SRS_RELEASE_ID=${{ needs.draft.outputs.SRS_RELEASE_ID }}" >> $GITHUB_ENV + ################################################################################################################## + # Git checkout + - name: Checkout repository + uses: actions/checkout@v2 + ################################################################################################################## + # Create source tar for release. Note that it's for OpenWRT package srs-server, so the filename MUST be + # srs-server-xxx.tar.gz, because the package is named srs-server. + # Generate variables like: + # SRS_SOURCE_TAR=srs-server-5.0.145.tar.gz + # SRS_SOURCE_MD5=83e38700a80a26e30b2df054e69956e5 + - name: Create source tar.gz + run: | + DEST_DIR=srs-server-$SRS_VERSION && mkdir -p $DEST_DIR && + cp README.md $DEST_DIR && cp LICENSE $DEST_DIR && cp -R trunk $DEST_DIR/trunk && + (cd $DEST_DIR/trunk/3rdparty && rm -rf *.zip openssl-*.gz srs-bench) && + tar zcf ${DEST_DIR}.tar.gz ${DEST_DIR} && du -sh ${DEST_DIR}* && rm -rf ${DEST_DIR} && + echo "SRS_SOURCE_TAR=${DEST_DIR}.tar.gz" >> $GITHUB_ENV && + echo "SRS_SOURCE_MD5=$(md5sum ${DEST_DIR}.tar.gz| awk '{print $1}')" >> $GITHUB_ENV + # Create package tar for release + # Generate variables like: + # SRS_PACKAGE_ZIP=SRS-CentOS7-x86_64-5.0.145.zip + # SRS_PACKAGE_MD5=3880a26e30b283edf05700a4e69956e5 + - name: Create package zip + env: + PACKAGER: ${{ secrets.SRS_PACKAGER_BINARY }} + run: | + docker build --tag srs:pkg --build-arg version=$SRS_VERSION --build-arg SRS_AUTO_PACKAGER=$PACKAGER -f trunk/Dockerfile.pkg . && + SRS_PACKAGE_ZIP=SRS-CentOS7-x86_64-$SRS_VERSION.zip && + docker run --rm -v $(pwd):/output srs:pkg cp objs/$SRS_PACKAGE_ZIP /output/ && + du -sh $SRS_PACKAGE_ZIP && + echo "SRS_PACKAGE_ZIP=$SRS_PACKAGE_ZIP" >> $GITHUB_ENV && + echo "SRS_PACKAGE_MD5=$(md5sum $SRS_PACKAGE_ZIP| awk '{print $1}')" >> $GITHUB_ENV + ################################################################################################################## + - name: Upload Release Assets Packager + id: upload-release-assets-packager + uses: dwenegar/upload-release-assets@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + release_id: ${{ env.SRS_RELEASE_ID }} + assets_path: ${{ env.SRS_PACKAGE_ZIP }} + - name: Upload Release Assets Source + id: upload-release-assets-source + uses: dwenegar/upload-release-assets@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + release_id: ${{ env.SRS_RELEASE_ID }} + assets_path: ${{ env.SRS_SOURCE_TAR }} + outputs: + SRS_PACKAGE_ZIP: ${{ env.SRS_PACKAGE_ZIP }} + SRS_PACKAGE_MD5: ${{ env.SRS_PACKAGE_MD5 }} + SRS_SOURCE_TAR: ${{ env.SRS_SOURCE_TAR }} + SRS_SOURCE_MD5: ${{ env.SRS_SOURCE_MD5 }} docker-srs: name: docker-srs @@ -113,6 +272,8 @@ jobs: ossrs/srs:${{ env.SRS_VERSION }} ossrs/srs:${{ env.SRS_MAJOR }} ossrs/srs:v${{ env.SRS_MAJOR }} + outputs: + SRS_DOCKER_DONE: ok aliyun-srs: name: aliyun-srs @@ -144,6 +305,8 @@ jobs: registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_VERSION }} registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_MAJOR }} registry.cn-hangzhou.aliyuncs.com/ossrs/srs:v${{ env.SRS_MAJOR }} + outputs: + SRS_ALIYUN_DONE: ok update: name: update @@ -209,13 +372,18 @@ jobs: docker rmi -f $image echo "Remove image $image, r0=$?" done + outputs: + SRS_UPDATE_DONE: ok release: name: release runs-on: ubuntu-20.04 needs: - - update + #- update - envs + - draft + - cygwin64 + - linux steps: ################################################################################################################## - name: Covert output to env @@ -223,54 +391,37 @@ jobs: echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV echo "SRS_VERSION=${{ needs.envs.outputs.SRS_VERSION }}" >> $GITHUB_ENV echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_MAJOR }}" >> $GITHUB_ENV + echo "SRS_RELEASE_ID=${{ needs.draft.outputs.SRS_RELEASE_ID }}" >> $GITHUB_ENV + echo "SRS_PACKAGE_ZIP=${{ needs.linux.outputs.SRS_PACKAGE_ZIP }}" >> $GITHUB_ENV + echo "SRS_PACKAGE_MD5=${{ needs.linux.outputs.SRS_PACKAGE_MD5 }}" >> $GITHUB_ENV + echo "SRS_SOURCE_TAR=${{ needs.linux.outputs.SRS_SOURCE_TAR }}" >> $GITHUB_ENV + echo "SRS_SOURCE_MD5=${{ needs.linux.outputs.SRS_SOURCE_MD5 }}" >> $GITHUB_ENV + echo "SRS_CYGWIN_TAR=${{ needs.cygwin64.outputs.SRS_CYGWIN_TAR }}" >> $GITHUB_ENV + echo "SRS_CYGWIN_MD5=${{ needs.cygwin64.outputs.SRS_CYGWIN_MD5 }}" >> $GITHUB_ENV ################################################################################################################## # Git checkout - name: Checkout repository uses: actions/checkout@v2 - ################################################################################################################## - # Create source tar for release. Note that it's for OpenWRT package srs-server, so the filename MUST be - # srs-server-xxx.tar.gz, because the package is named srs-server. - # Generate variables like: - # SRS_SOURCE_TAR=srs-server-5.0.145.tar.gz - # SRS_SOURCE_MD5=83e38700a80a26e30b2df054e69956e5 - - name: Create source tar.gz - run: | - DEST_DIR=srs-server-$SRS_VERSION && mkdir -p $DEST_DIR && - cp README.md $DEST_DIR && cp LICENSE $DEST_DIR && cp -R trunk $DEST_DIR/trunk && - (cd $DEST_DIR/trunk/3rdparty && rm -rf *.zip openssl-*.gz srs-bench) && - tar zcf ${DEST_DIR}.tar.gz ${DEST_DIR} && du -sh ${DEST_DIR}* && rm -rf ${DEST_DIR} && - echo "SRS_SOURCE_TAR=${DEST_DIR}.tar.gz" >> $GITHUB_ENV && - echo "SRS_SOURCE_MD5=$(md5sum ${DEST_DIR}.tar.gz| awk '{print $1}')" >> $GITHUB_ENV - # Create package tar for release - # Generate variables like: - # SRS_PACKAGE_ZIP=SRS-CentOS7-x86_64-5.0.145.zip - # SRS_PACKAGE_MD5=3880a26e30b283edf05700a4e69956e5 - - name: Create package zip - env: - PACKAGER: ${{ secrets.SRS_PACKAGER_BINARY }} - run: | - docker build --tag srs:pkg --build-arg version=$SRS_VERSION --build-arg SRS_AUTO_PACKAGER=$PACKAGER -f trunk/Dockerfile.pkg . && - SRS_PACKAGE_ZIP=SRS-CentOS7-x86_64-$SRS_VERSION.zip && - docker run --rm -v $(pwd):/output srs:pkg cp objs/$SRS_PACKAGE_ZIP /output/ && - du -sh $SRS_PACKAGE_ZIP && - echo "SRS_PACKAGE_ZIP=$SRS_PACKAGE_ZIP" >> $GITHUB_ENV && - echo "SRS_PACKAGE_MD5=$(md5sum $SRS_PACKAGE_ZIP| awk '{print $1}')" >> $GITHUB_ENV # Create release. # TODO: FIXME: Refine the release when 5.0 released # TODO: FIXME: Change prerelease to false when 5.0 released - - name: Create release - id: create_release - uses: actions/create-release@v1 + - name: Update release + id: update_release + uses: ncipollo/release-action@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} + allowUpdates: true + tag: ${{ github.ref }} + name: Release ${{ env.SRS_TAG }} body: | - [${{ github.event.head_commit.message }}](https://github.com/ossrs/srs/commit/${{ github.sha }}) + [${{ github.sha }}](https://github.com/ossrs/srs/commit/${{ github.sha }}) + ${{ github.event.head_commit.message }} + ## Resource * Source: ${{ env.SRS_SOURCE_MD5 }} [${{ env.SRS_SOURCE_TAR }}](https://github.com/ossrs/srs/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_SOURCE_TAR }}) * Binary: ${{ env.SRS_PACKAGE_MD5 }} [${{ env.SRS_PACKAGE_ZIP }}](https://github.com/ossrs/srs/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_PACKAGE_ZIP }}) + * Binary: ${{ env.SRS_CYGWIN_MD5 }} [${{ env.SRS_CYGWIN_TAR }}](https://github.com/ossrs/srs/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_CYGWIN_TAR }}) ## Docker * China: [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_MAJOR }}](https://ossrs.net/lts/zh-cn/docs/v5/doc/getting-started) * China: [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_TAG }}](https://ossrs.net/lts/zh-cn/docs/v5/doc/getting-started) @@ -282,29 +433,12 @@ jobs: * [中文FAQ](https://ossrs.net/lts/zh-cn/faq) or [FAQ](https://ossrs.io/lts/en-us/faq), [Features](https://github.com/ossrs/srs/blob/${{ github.sha }}/trunk/doc/Features.md#features) or [ChangeLogs](https://github.com/ossrs/srs/blob/${{ github.sha }}/trunk/doc/CHANGELOG.md#changelog) draft: false prerelease: true - # Upload release source files - - name: Upload Release Assets Source - id: upload-release-assets-source - uses: dwenegar/upload-release-assets@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - release_id: ${{ steps.create_release.outputs.id }} - assets_path: ${{ env.SRS_SOURCE_TAR }} - # Upload release package files - - name: Upload Release Assets Package - id: upload-release-assets-package - uses: dwenegar/upload-release-assets@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - release_id: ${{ steps.create_release.outputs.id }} - assets_path: ${{ env.SRS_PACKAGE_ZIP }} done: name: done runs-on: ubuntu-20.04 needs: + - update - release steps: - run: echo 'All done' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 182d72726..ebcfdb256 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,6 +4,34 @@ name: "Test" on: [push, pull_request] jobs: + cygwin64: + name: cygwin64 + runs-on: windows-latest + steps: + # See https://github.com/cygwin/cygwin-install-action#parameters + # Note that https://github.com/egor-tensin/setup-cygwin fails to install packages. + - name: Setup Cygwin + uses: cygwin/cygwin-install-action@master + with: + platform: x86_64 + packages: bash make gcc-g++ cmake automake patch pkg-config tcl + install-dir: C:\cygwin64 + ################################################################################################################## + - name: Checkout repository + uses: actions/checkout@v2 + ################################################################################################################## + - name: Build and test SRS + env: + SHELLOPTS: igncr + SRS_WORKSPACE: ${{ github.workspace }} + shell: C:\cygwin64\bin\bash.exe --login '{0}' + run: | + export PATH=/usr/bin:/usr/local/bin && + cd $(cygpath -u $SRS_WORKSPACE)/trunk && ./configure --utest=on && make utest && + ./objs/srs_utest + outputs: + SRS_CYGWIN_DONE: ok + build-centos7: name: build-centos7 runs-on: ubuntu-20.04 @@ -23,6 +51,8 @@ jobs: run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target centos7-no-asm . - name: Build on CentOS7, C++98, no FFmpeg run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target centos7-ansi-no-ffmpeg . + outputs: + SRS_BUILD_CENTOS7_DONE: ok build-centos6: name: build-centos6 @@ -37,6 +67,8 @@ jobs: run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target centos6-baseline . - name: Build on CentOS6, with all features run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target centos6-all . + outputs: + SRS_BUILD_CENTOS6_DONE: ok build-ubuntu16: name: build-ubuntu16 @@ -51,6 +83,8 @@ jobs: run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu16-baseline . - name: Build on Ubuntu16, with all features run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu16-all . + outputs: + SRS_BUILD_UBUNTU16_DONE: ok build-ubuntu18: name: build-ubuntu18 @@ -65,6 +99,8 @@ jobs: run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu18-baseline . - name: Build on Ubuntu18, with all features run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu18-all . + outputs: + SRS_BUILD_UBUNTU18_DONE: ok build-ubuntu20: name: build-ubuntu20 @@ -79,6 +115,8 @@ jobs: run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu20-baseline . - name: Build on Ubuntu20, with all features run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu20-all . + outputs: + SRS_BUILD_UBUNTU20_DONE: ok build-cross-arm: name: build-cross-arm @@ -92,6 +130,8 @@ jobs: run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu16-cross-armv7 . - name: Cross Build for ARMv7 on Ubuntu20 run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu20-cross-armv7 . + outputs: + SRS_BUILD_CROSS_ARM_DONE: ok build-cross-aarch64: name: build-cross-aarch64 @@ -105,6 +145,8 @@ jobs: run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu16-cross-aarch64 . - name: Cross Build for AARCH64 on Ubuntu20 run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu20-cross-aarch64 . + outputs: + SRS_BUILD_CROSS_AARCH64_DONE: ok build: name: build @@ -119,6 +161,8 @@ jobs: runs-on: ubuntu-20.04 steps: - run: echo 'Build done' + outputs: + SRS_BUILD_DONE: ok utest: name: utest @@ -135,10 +179,14 @@ jobs: # For regression-test - name: Run SRS regression-test run: docker run --rm srs:test bash -c 'make && (./objs/srs -c conf/regression-test.conf; ./etc/init.d/srs status) && cd 3rdparty/srs-bench && make && ./objs/srs_test -test.v' + outputs: + SRS_UTEST_DONE: ok coverage: name: coverage runs-on: ubuntu-20.04 + needs: + - utest steps: - name: Checkout repository uses: actions/checkout@v2 @@ -166,6 +214,8 @@ jobs: --env SRS_BRANCH=$SRS_BRANCH --env SRS_PR=$SRS_PR --env SRS_SHA=$SRS_SHA --env SRS_PROJECT=$SRS_PROJECT \ srs:cov bash -c 'make utest && ./objs/srs_utest && bash auto/codecov.sh' # + outputs: + SRS_COVERAGE_DONE: ok multile-arch-armv7: name: multile-arch-armv7 @@ -186,6 +236,8 @@ jobs: --output "type=image,push=false" \ --build-arg IMAGE=ossrs/srs:ubuntu20-cache \ -f trunk/Dockerfile . + outputs: + SRS_MULTIPLE_ARCH_ARMV7_DONE: ok multile-arch-aarch64: name: multile-arch-aarch64 @@ -206,10 +258,14 @@ jobs: --output "type=image,push=false" \ --build-arg IMAGE=ossrs/srs:ubuntu20-cache \ -f trunk/Dockerfile . + outputs: + SRS_MULTIPLE_ARCH_AARCH64_DONE: ok multile-arch-amd64: name: multile-arch-amd64 runs-on: ubuntu-20.04 + needs: + - utest steps: - name: Checkout repository uses: actions/checkout@v2 @@ -226,10 +282,13 @@ jobs: --output "type=image,push=false" \ --build-arg IMAGE=ossrs/srs:ubuntu20-cache \ -f trunk/Dockerfile . + outputs: + SRS_MULTIPLE_ARCH_AMD64_DONE: ok done: name: done needs: + - cygwin64 - build - coverage - multile-arch-armv7 diff --git a/.gitignore b/.gitignore index 066cff572..63880f228 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,7 @@ .idea .DS_Store *.heap +*.exe cmake-build-debug /trunk/ide/srs_clion/CMakeCache.txt diff --git a/trunk/3rdparty/patches/srtp/cygwin-crypto-include-config.h b/trunk/3rdparty/patches/srtp/cygwin-crypto-include-config.h new file mode 100644 index 000000000..c7764b3d0 --- /dev/null +++ b/trunk/3rdparty/patches/srtp/cygwin-crypto-include-config.h @@ -0,0 +1,194 @@ +/* crypto/include/config.h. Generated from config_in.h by configure. */ +/* config_in.h. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Define if building for a CISC machine (e.g. Intel). */ +#define CPU_CISC 1 + +/* Define if building for a RISC machine (assume slow byte access). */ +/* #undef CPU_RISC */ + +/* Define to enabled debug logging for all mudules. */ +/* #undef ENABLE_DEBUG_LOGGING */ + +/* Logging statments will be writen to this file. */ +/* #undef ERR_REPORTING_FILE */ + +/* Define to redirect logging to stdout. */ +/* #undef ERR_REPORTING_STDOUT */ + +/* Define this to use AES-GCM. */ +/* #undef GCM */ + +/* Define to 1 if you have the header file. */ +#define HAVE_ARPA_INET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_BYTESWAP_H 1 + +/* Define to 1 if you have the `inet_aton' function. */ +#define HAVE_INET_ATON 1 + +/* Define to 1 if the system has the type `int16_t'. */ +#define HAVE_INT16_T 1 + +/* Define to 1 if the system has the type `int32_t'. */ +#define HAVE_INT32_T 1 + +/* Define to 1 if the system has the type `int8_t'. */ +#define HAVE_INT8_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `dl' library (-ldl). */ +/* #undef HAVE_LIBDL */ + +/* Define to 1 if you have the `nspr4' library (-lnspr4). */ +/* #undef HAVE_LIBNSPR4 */ + +/* Define to 1 if you have the `nss3' library (-lnss3). */ +/* #undef HAVE_LIBNSS3 */ + +/* Define to 1 if you have the `socket' library (-lsocket). */ +/* #undef HAVE_LIBSOCKET */ + +/* Define to 1 if you have the `z' library (-lz). */ +/* #undef HAVE_LIBZ */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MACHINE_TYPES_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IN_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NSS_H */ + +/* Define to 1 if you have the `winpcap' library (-lwpcap) */ +/* #undef HAVE_PCAP */ + +/* Define to 1 if you have the `sigaction' function. */ +#define HAVE_SIGACTION 1 + +/* Define to 1 if you have the `socket' function. */ +#define HAVE_SOCKET 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_INT_TYPES_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_UIO_H 1 + +/* Define to 1 if the system has the type `uint16_t'. */ +#define HAVE_UINT16_T 1 + +/* Define to 1 if the system has the type `uint32_t'. */ +#define HAVE_UINT32_T 1 + +/* Define to 1 if the system has the type `uint64_t'. */ +#define HAVE_UINT64_T 1 + +/* Define to 1 if the system has the type `uint8_t'. */ +#define HAVE_UINT8_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `usleep' function. */ +#define HAVE_USLEEP 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WINDOWS_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINSOCK2_H */ + +/* Define to use X86 inlined assembly code */ +#define HAVE_X86 1 + +/* Define this to use NSS crypto. */ +/* #undef NSS */ + +/* Define this to use OpenSSL crypto. */ +/* #undef OPENSSL */ + +/* Define this to use OpenSSL KDF for SRTP. */ +/* #undef OPENSSL_KDF */ + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "https://github.com/cisco/libsrtp/issues" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libsrtp2" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libsrtp2 2.3.0" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libsrtp2" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "2.3.0" + +/* The size of `unsigned long', as computed by sizeof. */ +#define SIZEOF_UNSIGNED_LONG 8 + +/* The size of `unsigned long long', as computed by sizeof. */ +#define SIZEOF_UNSIGNED_LONG_LONG 8 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/trunk/3rdparty/patches/srtp/cygwin-gcm-crypto-include-config.h b/trunk/3rdparty/patches/srtp/cygwin-gcm-crypto-include-config.h new file mode 100644 index 000000000..916b6ba79 --- /dev/null +++ b/trunk/3rdparty/patches/srtp/cygwin-gcm-crypto-include-config.h @@ -0,0 +1,194 @@ +/* crypto/include/config.h. Generated from config_in.h by configure. */ +/* config_in.h. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Define if building for a CISC machine (e.g. Intel). */ +#define CPU_CISC 1 + +/* Define if building for a RISC machine (assume slow byte access). */ +/* #undef CPU_RISC */ + +/* Define to enabled debug logging for all mudules. */ +/* #undef ENABLE_DEBUG_LOGGING */ + +/* Logging statments will be writen to this file. */ +/* #undef ERR_REPORTING_FILE */ + +/* Define to redirect logging to stdout. */ +/* #undef ERR_REPORTING_STDOUT */ + +/* Define this to use AES-GCM. */ +#define GCM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ARPA_INET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_BYTESWAP_H 1 + +/* Define to 1 if you have the `inet_aton' function. */ +#define HAVE_INET_ATON 1 + +/* Define to 1 if the system has the type `int16_t'. */ +#define HAVE_INT16_T 1 + +/* Define to 1 if the system has the type `int32_t'. */ +#define HAVE_INT32_T 1 + +/* Define to 1 if the system has the type `int8_t'. */ +#define HAVE_INT8_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `dl' library (-ldl). */ +/* #undef HAVE_LIBDL */ + +/* Define to 1 if you have the `nspr4' library (-lnspr4). */ +/* #undef HAVE_LIBNSPR4 */ + +/* Define to 1 if you have the `nss3' library (-lnss3). */ +/* #undef HAVE_LIBNSS3 */ + +/* Define to 1 if you have the `socket' library (-lsocket). */ +/* #undef HAVE_LIBSOCKET */ + +/* Define to 1 if you have the `z' library (-lz). */ +/* #undef HAVE_LIBZ */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MACHINE_TYPES_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IN_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NSS_H */ + +/* Define to 1 if you have the `winpcap' library (-lwpcap) */ +/* #undef HAVE_PCAP */ + +/* Define to 1 if you have the `sigaction' function. */ +#define HAVE_SIGACTION 1 + +/* Define to 1 if you have the `socket' function. */ +#define HAVE_SOCKET 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_INT_TYPES_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_UIO_H 1 + +/* Define to 1 if the system has the type `uint16_t'. */ +#define HAVE_UINT16_T 1 + +/* Define to 1 if the system has the type `uint32_t'. */ +#define HAVE_UINT32_T 1 + +/* Define to 1 if the system has the type `uint64_t'. */ +#define HAVE_UINT64_T 1 + +/* Define to 1 if the system has the type `uint8_t'. */ +#define HAVE_UINT8_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `usleep' function. */ +#define HAVE_USLEEP 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WINDOWS_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINSOCK2_H */ + +/* Define to use X86 inlined assembly code */ +#define HAVE_X86 1 + +/* Define this to use NSS crypto. */ +/* #undef NSS */ + +/* Define this to use OpenSSL crypto. */ +#define OPENSSL 1 + +/* Define this to use OpenSSL KDF for SRTP. */ +/* #undef OPENSSL_KDF */ + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "https://github.com/cisco/libsrtp/issues" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libsrtp2" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libsrtp2 2.3.0" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libsrtp2" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "2.3.0" + +/* The size of `unsigned long', as computed by sizeof. */ +#define SIZEOF_UNSIGNED_LONG 8 + +/* The size of `unsigned long long', as computed by sizeof. */ +#define SIZEOF_UNSIGNED_LONG_LONG 8 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/trunk/auto/depends.sh b/trunk/auto/depends.sh index 8f886a7ad..763b0254e 100755 --- a/trunk/auto/depends.sh +++ b/trunk/auto/depends.sh @@ -616,6 +616,15 @@ if [[ $SRS_RTC == YES ]]; then cd ${SRS_OBJS}/${SRS_PLATFORM}/libsrtp-2-fit && $SRTP_CONFIGURE ${SRTP_OPTIONS} --prefix=${SRS_DEPENDS_LIBS}/${SRS_PLATFORM}/3rdpatry/srtp2 ) && + # Sometimes it might fail because autoconf failed to generate crypto/include.config.h + if [[ $SRS_CYGWIN64 == YES ]]; then + SRS_PATCH_SOURCE=${SRS_WORKDIR}/3rdparty/patches/srtp/cygwin-crypto-include-config.h + if [[ $SRS_SRTP_ASM == YES ]]; then + SRS_PATCH_SOURCE=${SRS_WORKDIR}/3rdparty/patches/srtp/cygwin-gcm-crypto-include-config.h + fi + grep -q 'HAVE_UINT64_T 1' ${SRS_OBJS}/${SRS_PLATFORM}/libsrtp-2-fit/crypto/include/config.h || + cp -f $SRS_PATCH_SOURCE ${SRS_OBJS}/${SRS_PLATFORM}/libsrtp-2-fit/crypto/include/config.h + fi && make -C ${SRS_OBJS}/${SRS_PLATFORM}/libsrtp-2-fit ${SRS_JOBS} && make -C ${SRS_OBJS}/${SRS_PLATFORM}/libsrtp-2-fit install && cp -rf ${SRS_OBJS}/${SRS_PLATFORM}/3rdpatry/srtp2 ${SRS_OBJS}/ && diff --git a/trunk/auto/options.sh b/trunk/auto/options.sh index acd8464bf..acdb240e5 100755 --- a/trunk/auto/options.sh +++ b/trunk/auto/options.sh @@ -528,12 +528,6 @@ function apply_auto_options() { echo "Force single thread for cygwin64" SRS_SINGLE_THREAD=YES fi - # TODO: FIXME: Cygwin: Build srtp with openssl fail for no srtp_aes_icm_ctx_t - # See https://github.com/ossrs/srs/issues/3254 - if [[ $SRS_CYGWIN64 == YES && $SRS_SRTP_ASM == YES ]]; then - echo "Disable SRTP with openssl for cygwin64" - SRS_SRTP_ASM=NO - fi # parse the jobs for make if [[ ! -z SRS_JOBS ]]; then diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index 83e2f4318..85b189f20 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -8,6 +8,7 @@ The changelog for SRS. ## SRS 5.0 Changelog +* v5.0, 2022-11-20, For [#2532](https://github.com/ossrs/srs/issues/2532): Windows: Support cygwin pipline and packager. v5.0.89 * v5.0, 2022-11-18, Fix [#3215](https://github.com/ossrs/srs/issues/3215): Callback: Fix bug for response string 0. v5.0.88 * v5.0, 2022-11-18, For [#2532](https://github.com/ossrs/srs/issues/2532): Windows: Replace ln by cp for windows. v5.0.87 * v5.0, 2022-10-31, For [#2899](https://github.com/ossrs/srs/issues/2899): Exporter: Add metrics cpu, memory and uname. v5.0.86 diff --git a/trunk/doc/Features.md b/trunk/doc/Features.md index 2e2468cad..a6ce1421f 100644 --- a/trunk/doc/Features.md +++ b/trunk/doc/Features.md @@ -23,6 +23,7 @@ The features of SRS. - [x] System: [Experimental] Support distributed tracing by Tencent Cloud APM. v5.0.64+ - [x] System: [Experimental] Support grab backtrace stack when assert fail. v5.0.80+ - [x] System: [Experimental] Support Google Address Sanitizer, [#3216](https://github.com/ossrs/srs/issues/3216). v5.0.81+ +- [x] System: [Experimental] Windows: Support cygwin pipline and packager, [#2532](https://github.com/ossrs/srs/issues/2532). v5.0.89+ - [x] API: Support HTTP API([CN](https://ossrs.net/lts/zh-cn/docs/v4/doc/http-api), [EN](https://ossrs.io/lts/en-us/docs/v4/doc/http-api)) for system management. - [x] API: Support HTTP callback([CN](https://ossrs.net/lts/zh-cn/docs/v4/doc/http-callback), [EN](https://ossrs.io/lts/en-us/docs/v4/doc/http-callback)) for authentication and integration. - [x] API: Support reuse HTTP Stream port for HTTP API, [#2881](https://github.com/ossrs/srs/issues/2881). diff --git a/trunk/doc/srs-logo.ico b/trunk/doc/srs-logo.ico new file mode 100644 index 000000000..d45b92ef8 Binary files /dev/null and b/trunk/doc/srs-logo.ico differ diff --git a/trunk/packaging/nsis/srs-cli.bat b/trunk/packaging/nsis/srs-cli.bat new file mode 100644 index 000000000..7d2a59b38 --- /dev/null +++ b/trunk/packaging/nsis/srs-cli.bat @@ -0,0 +1,11 @@ +for /f "tokens=2*" %%i in ('REG QUERY "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\srs\ins_dir"') do set srs_home=%%j + +echo %srs_home% + +for %%I in ("%srs_home%") do set srs_disk=%%~dI + +cd %srs_home% +@%srs_disk% + +objs\srs.exe -c conf\console.conf +cmd \ No newline at end of file diff --git a/trunk/packaging/nsis/srs-live.bat b/trunk/packaging/nsis/srs-live.bat new file mode 100644 index 000000000..f4f2e0e34 --- /dev/null +++ b/trunk/packaging/nsis/srs-live.bat @@ -0,0 +1,11 @@ +for /f "tokens=2*" %%i in ('REG QUERY "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\srs\ins_dir"') do set srs_home=%%j + +echo %srs_home% + +for %%I in ("%srs_home%") do set srs_disk=%%~dI + +cd %srs_home% +@%srs_disk% + +objs\srs.exe -c conf\live.conf +cmd diff --git a/trunk/packaging/nsis/srs-rtc.bat b/trunk/packaging/nsis/srs-rtc.bat new file mode 100644 index 000000000..478b32f38 --- /dev/null +++ b/trunk/packaging/nsis/srs-rtc.bat @@ -0,0 +1,11 @@ +for /f "tokens=2*" %%i in ('REG QUERY "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\srs\ins_dir"') do set srs_home=%%j + +echo %srs_home% + +for %%I in ("%srs_home%") do set srs_disk=%%~dI + +cd %srs_home% +@%srs_disk% + +objs\srs.exe -c conf\rtc.conf +cmd diff --git a/trunk/packaging/nsis/srs.nsi b/trunk/packaging/nsis/srs.nsi new file mode 100644 index 000000000..681ab017f --- /dev/null +++ b/trunk/packaging/nsis/srs.nsi @@ -0,0 +1,154 @@ +; Script generated by the HM NIS Edit Script Wizard. +; See https://nsis.sourceforge.io/Download +; "C:\Program Files (x86)\NSIS\makensis.exe" /DSRS_VERSION=5.0.89 /DCYGWIN_DIR="C:\tools\cygwin" srs.nsi +; "/cygdrive/c/Program Files (x86)/NSIS/makensis.exe" /DSRS_VERSION=5.0.89 /DCYGWIN_DIR="C:\cygwin64" srs.nsi +; "/cygdrive/c/Program Files (x86)/NSIS/makensis.exe" /DSRS_VERSION=$(../../objs/srs -v 2>&1) /DCYGWIN_DIR="C:\cygwin64" srs.nsi +; "/cygdrive/c/Program Files (x86)/NSIS/makensis.exe" /DSRS_VERSION=$(./objs/srs -v 2>&1) /DCYGWIN_DIR="C:\cygwin64" packaging/nsis/srs.nsi + +; HM NIS Edit Wizard helper defines +!define PRODUCT_NAME "SRS" +!define PRODUCT_VERSION "${SRS_VERSION}" +!define PRODUCT_PUBLISHER "ossrs" +!define PRODUCT_WEB_SITE "https://ossrs.io" +!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\srs.exe" +!define PRODUCT_INSTALL_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\srs\ins_dir" +!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" +!define PRODUCT_UNINST_ROOT_KEY "HKLM" + +; MUI 1.67 compatible ------ +!include "MUI.nsh" + +; MUI Settings +!define MUI_ABORTWARNING +!define MUI_ICON "..\..\doc\srs-logo.ico" +!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico" + +; Welcome page +!insertmacro MUI_PAGE_WELCOME +; License page +!insertmacro MUI_PAGE_LICENSE "..\..\..\LICENSE" +; Directory page +!insertmacro MUI_PAGE_DIRECTORY +; Instfiles page +!insertmacro MUI_PAGE_INSTFILES +; Finish page +;!define MUI_FINISHPAGE_RUN "$INSTDIR\srs-cli.bat" +!insertmacro MUI_PAGE_FINISH + +; Uninstaller pages +!insertmacro MUI_UNPAGE_INSTFILES + +; Language files +!insertmacro MUI_LANGUAGE "English" + +; MUI end ------ + +Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" +OutFile "SRS-Windows-x86_64-${PRODUCT_VERSION}-setup.exe" +InstallDir "$PROGRAMFILES\SRS" +InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" "" +ShowInstDetails show +ShowUnInstDetails show + +Section "MainSection" SEC01 + SetOutPath "$INSTDIR" + SetOverwrite ifnewer + File "..\..\..\LICENSE" + File ".\*.bat" + SetOutPath "$INSTDIR\conf" + SetOverwrite try + File "..\..\conf\*.conf" + SetOutPath "$INSTDIR\logo" + File "..\..\doc\srs-logo.ico" + SetOutPath "$INSTDIR\objs" + File "${CYGWIN_DIR}\bin\cyggcc_s-seh-1.dll" + File "${CYGWIN_DIR}\bin\cygstdc++-6.dll" + File "${CYGWIN_DIR}\bin\cygwin1.dll" + SetOutPath "$INSTDIR\objs\nginx\html" + File "..\..\objs\nginx\html\nginx.html" + File "..\..\objs\nginx\html\favicon.ico" + File "..\..\objs\nginx\html\index.html" + SetOutPath "$INSTDIR\objs\nginx\html\live" + File "..\..\objs\nginx\html\live\livestream.html" + SetOutPath "$INSTDIR\objs\nginx\html\console" + File /r "..\..\objs\nginx\html\console\" + SetOutPath "$INSTDIR\objs\nginx\html\demos" + File /r "..\..\objs\nginx\html\demos\" + SetOutPath "$INSTDIR\objs\nginx\html\players" + File /r "..\..\objs\nginx\html\players\" + SetOutPath "$INSTDIR\objs" + File "..\..\objs\srs.exe" + File ".\srs.pid" + SetOutPath "$INSTDIR" + CreateDirectory "$SMPROGRAMS\SRS" + CreateShortCut "$SMPROGRAMS\SRS\SRS.lnk" "$INSTDIR\srs-cli.bat" "" "$INSTDIR\logo\srs-logo.ico" + CreateShortCut "$DESKTOP\SRS.lnk" "$INSTDIR\srs-cli.bat" "" "$INSTDIR\logo\srs-logo.ico" +SectionEnd + +Section -AdditionalIcons + SetOutPath $INSTDIR + CreateShortCut "$SMPROGRAMS\SRS\Uninstall.lnk" "$INSTDIR\uninst.exe" +SectionEnd + +Section -Post + WriteUninstaller "$INSTDIR\uninst.exe" + WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\objs\srs.exe" + WriteRegStr HKLM "${PRODUCT_INSTALL_REGKEY}" "" "$INSTDIR" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\objs\srs.exe" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}" +SectionEnd + + +Function un.onUninstSuccess + HideWindow + MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) is removed from your computer." +FunctionEnd + +Function un.onInit + MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Uninstall $(^Name) from your computer?" IDYES +2 + Abort +FunctionEnd + +Section Uninstall + Delete "$INSTDIR\uninst.exe" + Delete "$INSTDIR\objs\srs.pid" + Delete "$INSTDIR\objs\srs.exe" + Delete "$INSTDIR\objs\nginx\html\nginx.html" + Delete "$INSTDIR\objs\nginx\html\live\livestream.html" + Delete "$INSTDIR\objs\nginx\html\index.html" + Delete "$INSTDIR\objs\nginx\html\favicon.ico" + Delete "$INSTDIR\objs\cygwin1.dll" + Delete "$INSTDIR\objs\cygstdc++-6.dll" + Delete "$INSTDIR\objs\cyggcc_s-seh-1.dll" + Delete "$INSTDIR\logo\srs-logo.ico" + Delete "$INSTDIR\conf\*.conf" + Delete "$INSTDIR\LICENSE" + Delete "$INSTDIR\srs-cli.bat" + Delete "$INSTDIR\srs-live.bat" + Delete "$INSTDIR\srs-rtc.bat" + + Delete "$SMPROGRAMS\SRS\Uninstall.lnk" + Delete "$DESKTOP\SRS.lnk" + Delete "$SMPROGRAMS\SRS\SRS.lnk" + + RMDir "$SMPROGRAMS\SRS" + RMDir /r "$INSTDIR\objs\nginx\html\players" + RMDir /r "$INSTDIR\objs\nginx\html\demos" + RMDir /r "$INSTDIR\objs\nginx\html\console" + RMDir "$INSTDIR\objs\nginx\html\live" + RMDir "$INSTDIR\objs\nginx\html" + RMDir "$INSTDIR\objs\nginx" + RMDir "$INSTDIR\objs" + RMDir "$INSTDIR\logo" + RMDir "$INSTDIR\conf" + RMDir "$INSTDIR" + + DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" + DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}" + DeleteRegKey HKLM "${PRODUCT_INSTALL_REGKEY}" + SetAutoClose true +SectionEnd \ No newline at end of file diff --git a/trunk/packaging/nsis/srs.pid b/trunk/packaging/nsis/srs.pid new file mode 100644 index 000000000..e69de29bb diff --git a/trunk/src/core/srs_core_version5.hpp b/trunk/src/core/srs_core_version5.hpp index 578e57b69..2ac588ea4 100644 --- a/trunk/src/core/srs_core_version5.hpp +++ b/trunk/src/core/srs_core_version5.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 5 #define VERSION_MINOR 0 -#define VERSION_REVISION 88 +#define VERSION_REVISION 89 #endif