Skip to content

Commit

Permalink
Merge branch 'release/2022.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
voluntas committed Mar 8, 2022
2 parents bd91f45 + 223c85a commit 6384bdc
Show file tree
Hide file tree
Showing 52 changed files with 331 additions and 234 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
34 changes: 19 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@ on:
- 'THANKS'
- 'LICENSE'
- 'NOTICE'
pull_request:

jobs:
build-windows:
name: Build momo for Windows
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
arch:
- x86_64
name: Build momo for Windows_${{ matrix.arch }}
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Get Versions
run: |
Get-Content "VERSION" | Foreach-Object {
Expand Down Expand Up @@ -44,9 +48,9 @@ jobs:
}
$WINVER_MAJOR = [System.Environment]::OSVersion.Version.Major
$RELEASE_ID = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ReleaseId).ReleaseID
echo "PACKAGE_NAME=momo-${MOMO_VERSION}_windows-${WINVER_MAJOR}.${RELEASE_ID}.zip" >> windows.env
echo "CONTENT_TYPE=application/zip" >> windows.env
echo "::set-output name=name::momo-${MOMO_VERSION}_windows-${WINVER_MAJOR}.${RELEASE_ID}.zip"
echo "PACKAGE_NAME=momo-${MOMO_VERSION}_windows-${WINVER_MAJOR}.${RELEASE_ID}_${{ matrix.arch }}.zip" >> windows_${{ matrix.arch }}.env
echo "CONTENT_TYPE=application/zip" >> windows_${{ matrix.arch }}.env
echo "::set-output name=name::momo-${MOMO_VERSION}_windows-${WINVER_MAJOR}.${RELEASE_ID}_${{ matrix.arch }}.zip"
id: package_name
- name: Upload Artifact
uses: actions/upload-artifact@v2
Expand All @@ -56,8 +60,8 @@ jobs:
- name: Upload Environment
uses: actions/upload-artifact@v2
with:
name: windows.env
path: windows.env
name: windows_${{ matrix.arch }}.env
path: windows_${{ matrix.arch }}.env
build-macos:
strategy:
fail-fast: false
Expand All @@ -68,7 +72,7 @@ jobs:
name: Build momo for macOS_${{ matrix.arch }}
runs-on: macos-11.0
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Get Versions
run: |
source VERSION
Expand Down Expand Up @@ -117,7 +121,7 @@ jobs:
name: Build momo for ${{ matrix.name }}
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Get Versions
run: |
source VERSION
Expand Down Expand Up @@ -161,7 +165,7 @@ jobs:
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1.0.0
uses: actions/create-release@v1.1.4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -186,7 +190,7 @@ jobs:
fail-fast: true
matrix:
name:
- windows
- windows_x86_64
- macos_arm64
- macos_x86_64
- raspberry-pi-os_armv6
Expand Down Expand Up @@ -219,7 +223,7 @@ jobs:
name: ${{ steps.env.outputs.package_name }}
path: ${{ steps.env.outputs.package_name }}
- name: Upload ${{ matrix.name }} Release Asset
uses: actions/[email protected].1
uses: actions/[email protected].2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -238,7 +242,7 @@ jobs:
- upload-assets
if: always()
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: rtCamp/action-slack-notify@v2
if: |
needs.build-windows.result == 'failure' ||
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/daily_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ on:

jobs:
build-windows:
name: Build momo for Windows
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
arch:
- x86_64
name: Build momo for Windows_${{ matrix.arch }}
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Get Versions
run: |
Get-Content "VERSION" | Foreach-Object {
Expand Down Expand Up @@ -40,7 +45,7 @@ jobs:
name: Build momo for macOS_${{ matrix.arch }}
runs-on: macos-11.0
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Get Versions
run: |
source VERSION
Expand Down Expand Up @@ -70,7 +75,7 @@ jobs:
name: Build momo for ${{ matrix.name }}
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Get Versions
run: |
source VERSION
Expand All @@ -94,7 +99,7 @@ jobs:
- build-linux
if: always()
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: rtCamp/action-slack-notify@v2
if: |
needs.build-windows.result == 'failure' ||
Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ webrtc_logs_0

/_build
/_package
/build/windows/_source
/build/windows/_build
/build/windows/_install
/build/windows_*/_source
/build/windows_*/_build
/build/windows_*/_install
/build/macos_*/_source
/build/macos_*/_build
/build/macos_*/_install
Expand Down
19 changes: 19 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,25 @@

## develop

## 2022.1.0

- [UPDATE] Raspberry Pi OS bullseye に対応
- @tnoho
- [UPDATE] JetPack 4.6 に上げる
- @tnoho
- [UPDATE] `libwebrtc``99.4844.1.0` に上げる
- @tnoho
- [UPDATE] sdl2 を 2.0.20 に上げる
- @voluntas
- [UPDATE] cmake を 3.22.3 に上げる
- @voluntas
- [ADD] DataChannel を使うことになっていて Offer を行う際には DataChannel を作るように変更
- @tnoho
- [FIX] Jetson のハードウェアデコーダーが出力時に出力サイズでフレームを切り抜いていなかったため修正
- @tnoho
- [FIX] スクリーンキャプチャが Linux で落ちるのを修正
- @tnoho

## 2021.6.0

- [UPDATE] Boost 1.78.0 に上げる
Expand Down
29 changes: 20 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ set(WEBRTC_BUILD_VERSION "unspecified" CACHE STRING "webrtc-build のバージ
set(WEBRTC_READABLE_VERSION "unspecified" CACHE STRING "WebRTC の読みやすいバージョン")
set(WEBRTC_COMMIT "<commit>" CACHE STRING "WebRTC のコミットハッシュ")

if(MOMO_PACKAGE_NAME STREQUAL "windows")
set(_INSTALL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/build/windows/_install)
if(MOMO_PACKAGE_NAME STREQUAL "windows_x86_64")
set(_INSTALL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/build/windows_x86_64/_install)

set(TARGET_OS "windows")
set(TARGET_ARCH "x86_64")
Expand Down Expand Up @@ -350,7 +350,7 @@ target_sources(momo

target_include_directories(momo PRIVATE src)

set_target_properties(momo PROPERTIES CXX_STANDARD 14 C_STANDARD 99)
set_target_properties(momo PROPERTIES CXX_STANDARD 17 C_STANDARD 99)

target_link_libraries(momo
PRIVATE
Expand All @@ -362,6 +362,9 @@ target_link_libraries(momo

target_compile_definitions(momo
PRIVATE
# CLI11 は C++17 でのビルドにおいて std::filesystem を利用するが、これを clang で解決するには c++fs のリンクが必要になる。
# しかし、 libwebrtc の libc++ では std::filesystem が提供されていないため下記のオプションを追加して利用しないようにする。
CLI11_HAS_FILESYSTEM=0
OPENSSL_IS_BORINGSSL
USE_NVCODEC_ENCODER=$<BOOL:${USE_NVCODEC_ENCODER}>
USE_MMAL_ENCODER=$<BOOL:${USE_MMAL_ENCODER}>
Expand All @@ -382,16 +385,24 @@ if (USE_SDL2)
_THREAD_SAFE
)

if (TARGET SDL2::SDL2-static)

if ("${TARGET_OS}" STREQUAL "windows" OR "${TARGET_OS}" STREQUAL "macos")
target_link_libraries(momo
PRIVATE
SDL2::SDL2-static
SDL2::SDL2main
)
else()
target_link_directories(momo PRIVATE ${SDL2_LIBDIR})
target_link_libraries(momo PRIVATE SDL2)
target_include_directories(momo PRIVATE "${SYSROOT}${SDL2_INCLUDE_DIRS}")
if (TARGET SDL2::SDL2Config)
target_link_libraries(momo
PRIVATE
SDL2::SDL2Config
)
else()
target_link_directories(momo PRIVATE ${SDL2_LIBDIR})
target_link_libraries(momo PRIVATE SDL2)
target_include_directories(momo PRIVATE "${SYSROOT}${SDL2_INCLUDE_DIRS}")
endif()
endif()

if ("${TARGET_OS}" STREQUAL "macos")
Expand Down Expand Up @@ -703,8 +714,8 @@ elseif (TARGET_OS STREQUAL "linux")
target_link_directories(momo PRIVATE ${_VC_PATH}/lib)
target_link_libraries(momo
PRIVATE
brcmGLESv2
brcmEGL
GLESv2
EGL
bcm_host
containers
vcos
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# WebRTC Native Client Momo

[![libwebrtc](https://img.shields.io/badge/libwebrtc-m9.4692-blue.svg)](https://chromium.googlesource.com/external/webrtc/+/branch-heads/4692)
[![libwebrtc](https://img.shields.io/badge/libwebrtc-m99.4844-blue.svg)](https://chromium.googlesource.com/external/webrtc/+/branch-heads/4844)
[![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/shiguredo/momo.svg)](https://github.com/shiguredo/momo)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Actions Status](https://github.com/shiguredo/momo/workflows/daily-build-workflow/badge.svg)](https://github.com/shiguredo/momo/actions)
Expand Down
8 changes: 4 additions & 4 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MOMO_VERSION=2021.6.0
WEBRTC_BUILD_VERSION=97.4692.0.4
MOMO_VERSION=2022.1.0
WEBRTC_BUILD_VERSION=99.4844.1.0
BOOST_VERSION=1.78.0
CLI11_VERSION=2.1.2
SDL2_VERSION=2.0.18
CMAKE_VERSION=3.22.1
SDL2_VERSION=2.0.20
CMAKE_VERSION=3.22.3
CUDA_VERSION=11.0.2-1
50 changes: 26 additions & 24 deletions build/build.ps1
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
Param([switch]$clean, [switch]$package)

$WINDOWS_ARCH = "x86_64"

$ErrorActionPreference = 'Stop'

if ($clean) {
if (Test-Path "windows\_source") {
Remove-Item "windows\_source" -Force -Recurse
if (Test-Path "windows_${WINDOWS_ARCH}\_source") {
Remove-Item "windows_${WINDOWS_ARCH}\_source" -Force -Recurse
}
if (Test-Path "windows\_build") {
Remove-Item "windows\_build" -Force -Recurse
if (Test-Path "windows_${WINDOWS_ARCH}\_build") {
Remove-Item "windows_${WINDOWS_ARCH}\_build" -Force -Recurse
}
if (Test-Path "windows\_install") {
Remove-Item "windows\_install" -Force -Recurse
if (Test-Path "windows_${WINDOWS_ARCH}\_install") {
Remove-Item "windows_${WINDOWS_ARCH}\_install" -Force -Recurse
}
if (Test-Path "..\_build\windows") {
Remove-Item "..\_build\windows" -Force -Recurse
if (Test-Path "..\_build\windows_${WINDOWS_ARCH}") {
Remove-Item "..\_build\windows_${WINDOWS_ARCH}" -Force -Recurse
}
exit 0
}

Push-Location windows
Push-Location "windows_${WINDOWS_ARCH}"
.\install_deps.ps1
Pop-Location

$WEBRTC_VERSION_FILE = Join-Path (Resolve-Path ".").Path "windows\_install\webrtc\VERSIONS"
$WEBRTC_VERSION_FILE = Join-Path (Resolve-Path ".").Path "windows_${WINDOWS_ARCH}\_install\webrtc\VERSIONS"
Get-Content $WEBRTC_VERSION_FILE | Foreach-Object {
if (!$_) {
continue
Expand All @@ -41,10 +43,10 @@ Get-Content $MOMO_VERSION_FILE | Foreach-Object {

$MOMO_COMMIT = "$(git rev-parse HEAD)"

mkdir ..\_build\windows -Force -ErrorAction Ignore
Push-Location ..\_build\windows
mkdir "..\_build\windows_${WINDOWS_ARCH}" -Force -ErrorAction Ignore
Push-Location "..\_build\windows_${WINDOWS_ARCH}"
cmake ..\.. -G "Visual Studio 16 2019" `
-DMOMO_PACKAGE_NAME="windows" `
-DMOMO_PACKAGE_NAME="windows_${WINDOWS_ARCH}" `
-DMOMO_VERSION="$MOMO_VERSION" `
-DMOMO_COMMIT="$MOMO_COMMIT" `
-DWEBRTC_BUILD_VERSION="$WEBRTC_BUILD_VERSION" `
Expand All @@ -58,20 +60,20 @@ if ($package) {
Push-Location ..
$WINVER_MAJOR = [System.Environment]::OSVersion.Version.Major
$RELEASE_ID = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ReleaseId).ReleaseID
if (Test-Path "_package\momo-${MOMO_VERSION}_windows-${WINVER_MAJOR}.${RELEASE_ID}.zip") {
Remove-Item "_package\momo-${MOMO_VERSION}_windows-${WINVER_MAJOR}.${RELEASE_ID}.zip" -Force
if (Test-Path "_package\momo-${MOMO_VERSION}_windows-${WINVER_MAJOR}.${RELEASE_ID}_${WINDOWS_ARCH}.zip") {
Remove-Item "_package\momo-${MOMO_VERSION}_windows-${WINVER_MAJOR}.${RELEASE_ID}_${WINDOWS_ARCH}.zip" -Force
}
if (Test-Path "_package\momo-${MOMO_VERSION}_windows-${WINVER_MAJOR}.${RELEASE_ID}") {
Remove-Item "_package\momo-${MOMO_VERSION}_windows-${WINVER_MAJOR}.${RELEASE_ID}" -Force -Recurse
if (Test-Path "_package\momo-${MOMO_VERSION}_windows-${WINVER_MAJOR}.${RELEASE_ID}_${WINDOWS_ARCH}") {
Remove-Item "_package\momo-${MOMO_VERSION}_windows-${WINVER_MAJOR}.${RELEASE_ID}_${WINDOWS_ARCH}" -Force -Recurse
}
mkdir -Force "_package\momo-${MOMO_VERSION}_windows-${WINVER_MAJOR}.${RELEASE_ID}"
Copy-Item _build\windows\Release\momo.exe _package\momo-${MOMO_VERSION}_windows-${WINVER_MAJOR}.${RELEASE_ID}\
Copy-Item LICENSE _package\momo-${MOMO_VERSION}_windows-${WINVER_MAJOR}.${RELEASE_ID}\
Copy-Item NOTICE _package\momo-${MOMO_VERSION}_windows-${WINVER_MAJOR}.${RELEASE_ID}\
Copy-Item html _package\momo-${MOMO_VERSION}_windows-${WINVER_MAJOR}.${RELEASE_ID}\html\ -Recurse
mkdir -Force "_package\momo-${MOMO_VERSION}_windows-${WINVER_MAJOR}.${RELEASE_ID}_${WINDOWS_ARCH}"
Copy-Item _build\windows_${WINDOWS_ARCH}\Release\momo.exe _package\momo-${MOMO_VERSION}_windows-${WINVER_MAJOR}.${RELEASE_ID}_${WINDOWS_ARCH}\
Copy-Item LICENSE _package\momo-${MOMO_VERSION}_windows-${WINVER_MAJOR}.${RELEASE_ID}_${WINDOWS_ARCH}\
Copy-Item NOTICE _package\momo-${MOMO_VERSION}_windows-${WINVER_MAJOR}.${RELEASE_ID}_${WINDOWS_ARCH}\
Copy-Item html _package\momo-${MOMO_VERSION}_windows-${WINVER_MAJOR}.${RELEASE_ID}_${WINDOWS_ARCH}\html\ -Recurse
Push-Location _package
Compress-Archive -Path "momo-${MOMO_VERSION}_windows-${WINVER_MAJOR}.${RELEASE_ID}" -DestinationPath "momo-${MOMO_VERSION}_windows-${WINVER_MAJOR}.${RELEASE_ID}.zip"
Compress-Archive -Path "momo-${MOMO_VERSION}_windows-${WINVER_MAJOR}.${RELEASE_ID}_${WINDOWS_ARCH}" -DestinationPath "momo-${MOMO_VERSION}_windows-${WINVER_MAJOR}.${RELEASE_ID}_${WINDOWS_ARCH}.zip"
Pop-Location
Remove-Item "_package\momo-${MOMO_VERSION}_windows-${WINVER_MAJOR}.${RELEASE_ID}" -Force -Recurse
Remove-Item "_package\momo-${MOMO_VERSION}_windows-${WINVER_MAJOR}.${RELEASE_ID}_${WINDOWS_ARCH}" -Force -Recurse
Pop-Location
}
2 changes: 1 addition & 1 deletion build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ popd
source ../VERSION

case "$PACKAGE" in
"windows" )
"windows_x86_64" )
echo "Windows では build.bat を利用してください。"
exit 1
;;
Expand Down
1 change: 1 addition & 0 deletions build/macos_arm64/install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ if [ $BOOST_CHANGED -eq 1 -o ! -e $INSTALL_DIR/boost/lib/libboost_filesystem.a ]
echo "using clang : : $INSTALL_DIR/llvm/clang/bin/clang++ : ;" > project-config.jam
SYSROOT="`xcrun --sdk macosx --show-sdk-path`"
./b2 \
cxxstd=17 \
cflags=" \
-target $ARCH_NAME \
-mmacosx-version-min=11.0 \
Expand Down
Loading

0 comments on commit 6384bdc

Please sign in to comment.