diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..c2a936d0 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,33 @@ + +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: windows-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + - name: build + run: githubci\build.bat + + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2.2.0 + with: + name: obs-multi-rtmp + path: dist diff --git a/appveyor.yml b/appveyor.yml index 263765a2..ef75a5e7 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,25 +1,12 @@ environment: matrix: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - OBS_VER: "25.0.8" + OBS_VER: "26.1.2" - APPVEYOR_BUILD_WORKER_IMAGE: macos - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004 for: -- matrix: - only: - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - - install: - - pwsh: ci/install.ps1 -OBS_VER "$Env:OBS_VER" - - build_script: - - pwsh: ./build.ps1 -OBS_BIN_DIR32 "../OBS-Studio-${Env:OBS_VER}-Full-x86" -OBS_BIN_DIR64 "../OBS-Studio-${Env:OBS_VER}-Full-x64" -OBS_SRC_DIR "../obs-studio-${Env:OBS_VER}" - - artifacts: - - path: "*.zip" - - matrix: only: - APPVEYOR_BUILD_WORKER_IMAGE: macos diff --git a/build.ps1 b/build.ps1 deleted file mode 100644 index a8ec1f40..00000000 --- a/build.ps1 +++ /dev/null @@ -1,31 +0,0 @@ -param( - [string]$OBS_BIN_DIR32 = "../OBS-Studio-25.0.8-Full-x86", - [string]$OBS_BIN_DIR64 = "../OBS-Studio-25.0.8-Full-x64", - [string]$OBS_SRC_DIR = "../obs-studio-25.0.8", - [string]$QTROOT = "C:/QtDep" -) - -$ErrorActionPreference = "Stop" -Set-PSDebug -Trace 1 - -# find qt directory -$QTDIR32 = [System.IO.Directory]::GetDirectories("c:/QtDep/", "msvc2017", 1)[0].Replace("\", "/") -$QTDIR64 = [System.IO.Directory]::GetDirectories("c:/QtDep/", "msvc2017_64", 1)[0].Replace("\", "/") - -$ver = (Select-String -Pattern "obs-multi-rtmp VERSION" -Path CMakeLists.txt -Raw) -$ver = $ver.Split(" ")[2] -$ver = $ver.Remove($ver.Length - 1) - -Remove-Item -Path build_x86, build_x64, dist, *.zip -Recurse -ErrorAction Ignore - -cmake -DQTDIR="$QTDIR32" -DOBS_BIN_DIR="$OBS_BIN_DIR32" -DOBS_SRC_DIR="$OBS_SRC_DIR" -G "Visual Studio 16 2019" -A Win32 -B build_x86 -DCMAKE_INSTALL_PREFIX=dist . -cmake --build build_x86 --config Release -cmake --install build_x86 --config Release - -cmake -DQTDIR="$QTDIR64" -DOBS_BIN_DIR="$OBS_BIN_DIR64" -DOBS_SRC_DIR="$OBS_SRC_DIR" -G "Visual Studio 16 2019" -A x64 -B build_x64 -DCMAKE_INSTALL_PREFIX=dist . -cmake --build build_x64 --config Release -cmake --install build_x64 --config Release - -cd dist -cmake -E tar cf "../obs-multi-rtmp_Windows_$ver.zip" --format=zip . -cd .. diff --git a/ci/install.ps1 b/ci/install.ps1 deleted file mode 100644 index 9cfdd0f4..00000000 --- a/ci/install.ps1 +++ /dev/null @@ -1,37 +0,0 @@ -param( - [string]$OBS_VER = "25.0.8", - [string]$OBS_BIN_URL = "https://github.com/obsproject/obs-studio/releases/download/#OBS_VER#/OBS-Studio-#OBS_VER#-Full-#ARCH#.zip", - [string]$OBS_SRC_URL = "https://github.com/obsproject/obs-studio/archive/#OBS_VER#.zip" -) - -$ErrorActionPreference = "Stop" -Set-PSDebug -Trace 1 - -$obs_bin_url = $OBS_BIN_URL.Replace("#OBS_VER#", "$OBS_VER") - -$obs_bin_url_x86 = $obs_bin_url.Replace("#ARCH#", "x86") -$obs_bin_filename_x86 = $obs_bin_url_x86.Split("/")[-1] -$obs_bin_dirname_x86 = $obs_bin_filename_x86 -replace "\.[^.]+$", "" - -$obs_bin_url_x64 = $obs_bin_url.Replace("#ARCH#", "x64") -$obs_bin_filename_x64 = $obs_bin_url_x64.Split("/")[-1] -$obs_bin_dirname_x64 = $obs_bin_filename_x64 -replace "\.[^.]+$", "" - -$obs_src_url = $OBS_SRC_URL.Replace("#OBS_VER#", "$OBS_VER") -$obs_src_filename = "obs-studio-$($obs_src_url.Split("/")[-1])" - -If ($Env:APPVEYOR -ne "True") { - function Start-FileDownload { - param([string]$URL, [string]$FileName) - Invoke-WebRequest -OutFile $FileName -TimeoutSec 300000 -Uri $URL - } -} - -Start-FileDownload $obs_bin_url_x86 -FileName ../$obs_bin_filename_x86 -Start-FileDownload $obs_bin_url_x64 -FileName ../$obs_bin_filename_x64 -Start-FileDownload $obs_src_url -FileName ../$obs_src_filename - -unzip -oqd ../$obs_bin_dirname_x86 ../$obs_bin_filename_x86 -unzip -oqd ../$obs_bin_dirname_x64 ../$obs_bin_filename_x64 -unzip -oqd .. ../$obs_src_filename -& "../obs-studio-$OBS_VER/CI/install-qt-win.cmd" diff --git a/docs/Readme.md b/docs/Readme.md index 9d3eca24..f0a8feaf 100644 --- a/docs/Readme.md +++ b/docs/Readme.md @@ -34,11 +34,11 @@ zipファイルを OBS のフォルダーに解凍してインストール完了 # 要求環境 -OBS-Studio バージョン 25.0.0 以降 -また、OBS-Studio 本体は QT 5.10.1 と共にビルドしたバージョン +OBS-Studio バージョン 26.1.1 以降 +また、OBS-Studio 本体は QT 5.15.2 と共にビルドしたバージョン 確認済: -obs-studio 25.0.1 ~ obs-studio 25.0.3 +obs-studio 26.1.1 # よくあるご質問 @@ -60,12 +60,12 @@ A: このプラグインは OBS 本体のエンコーダーと共有している # How to Build 1. Prepare environment - 1. Put official release OBS 25.0 into obs-bin directory. + 1. Put official release OBS 26.1.2 into obs-bin directory. 2. Extract OBS source code of same version as binary to obs-src 3. Download Qt that obs-bin uses. Which can be found in CI\install-qt-win.cmd 2. Configure - Use cmake to configure this project. must use VS2017 or higher. + Use cmake to configure this project. must use VS2019 or higher. cmake's QTDIR variable is set to the path of QT in the same version as obs uses. Set CMAKE_BUILD_TYPE to Release. diff --git a/githubci/build.bat b/githubci/build.bat new file mode 100644 index 00000000..bb0eaaee --- /dev/null +++ b/githubci/build.bat @@ -0,0 +1,28 @@ +set OBSBIN_VER=26.1.1 +set OBSSRC_VER=26.1.2 + +curl -o obs-bin-x86.zip "https://cdn-fastly.obsproject.com/downloads/OBS-Studio-%OBSBIN_VER%-Full-x86.zip" +curl -o obs-bin-x64.zip "https://cdn-fastly.obsproject.com/downloads/OBS-Studio-%OBSBIN_VER%-Full-x64.zip" +git clone --depth=1 -b %OBSSRC_VER% "https://github.com/obsproject/obs-studio.git" obs-src +call obs-src\CI\install-qt-win.cmd +cmake -E make_directory obs-bin +pushd obs-bin +cmake -E tar zxf ..\obs-bin-x86.zip +cmake -E tar zxf ..\obs-bin-x64.zip +popd + +set QTDIR32=-DQTDIR="C:/QtDep/5.15.2/msvc2019" +set QTDIR64=-DQTDIR="C:/QtDep/5.15.2/msvc2019_64" + +cmake %QTDIR32% -G "Visual Studio 16 2019" -A Win32 -B build_x86 -S . -DCMAKE_INSTALL_PREFIX=dist +cmake --build build_x86 --config Release +cmake --install build_x86 --config Release + +cmake %QTDIR64% -G "Visual Studio 16 2019" -A x64 -B build_x64 -S . -DCMAKE_INSTALL_PREFIX=dist +cmake --build build_x64 --config Release +cmake --install build_x64 --config Release + +if not exist dist\nul exit /b +pushd dist +cmake -E tar cf ..\release.zip --format=zip . +popd