mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
Merge branch 'master' of https://github.com/Palakis/obs-websocket
This commit is contained in:
commit
85fa41962d
62
.github/workflows/main.yml
vendored
62
.github/workflows/main.yml
vendored
@ -6,6 +6,8 @@ on:
|
||||
- 'docs/**'
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- '[45].[0-9]+.[0-9]+*'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
@ -44,7 +46,6 @@ jobs:
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
run: |
|
||||
git fetch --prune --unshallow
|
||||
echo "OBS_GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
|
||||
echo "OBS_GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||
echo "OBS_GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
||||
- name: 'Checkout last OBS-Studio release (${{ env.OBS_GIT_TAG }})'
|
||||
@ -58,9 +59,16 @@ jobs:
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
run: |
|
||||
git fetch --prune --unshallow
|
||||
echo "GIT_BRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV
|
||||
echo "GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||
echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
||||
GIT_HASH=$(git rev-parse --short HEAD)
|
||||
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
||||
GIT_TAG=$(git describe --tags --abbrev=0)
|
||||
echo "GIT_TAG=$GIT_TAG" >> $GITHUB_ENV
|
||||
if [ "$GIT_TAG" ] ; then \
|
||||
VERSION="$GIT_TAG" ; \
|
||||
else \
|
||||
VERSION="$GIT_HASH-git" ; \
|
||||
fi
|
||||
echo "PACKAGE_VERSION=$VERSION" >> $GITHUB_ENV
|
||||
- name: 'Restore Cached Qt'
|
||||
id: qtcache
|
||||
uses: actions/cache@v2
|
||||
@ -156,7 +164,11 @@ jobs:
|
||||
- name: 'Set PR Artifact Filename'
|
||||
shell: bash
|
||||
run: |
|
||||
FILENAME="obs-websocket-${{ env.GIT_HASH }}-Windows"
|
||||
if [ "${{ env.GIT_TAG }}" ] ; then \
|
||||
FILENAME="obs-websocket-${{ env.GIT_TAG }}-Windows" ; \
|
||||
else \
|
||||
FILENAME="obs-websocket-${{ env.GIT_HASH }}-git-Windows" ; \
|
||||
fi
|
||||
echo "WIN_FILENAME=$FILENAME" >> $GITHUB_ENV
|
||||
- name: 'Package obs-websocket'
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
@ -169,13 +181,13 @@ jobs:
|
||||
if: success()
|
||||
uses: actions/upload-artifact@v2-preview
|
||||
with:
|
||||
name: '${{ env.GIT_HASH }}-Windows'
|
||||
name: 'obs-websocket-${{ env.PACKAGE_VERSION }}-Windows'
|
||||
path: ${{ github.workspace }}/obs-websocket/package/*.zip
|
||||
- name: 'Publish ${{ env.WIN_FILENAME }}-Installer.exe'
|
||||
if: success()
|
||||
uses: actions/upload-artifact@v2-preview
|
||||
with:
|
||||
name: '${{ env.GIT_HASH }}-Windows-Installer'
|
||||
name: 'obs-websocket-${{ env.PACKAGE_VERSION }}-Windows-Installer'
|
||||
path: ${{ github.workspace }}/obs-websocket/package/*.exe
|
||||
ubuntu64:
|
||||
name: "Linux/Ubuntu 64-bit"
|
||||
@ -198,7 +210,6 @@ jobs:
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
run: |
|
||||
git fetch --prune --unshallow
|
||||
echo "OBS_GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
|
||||
echo "OBS_GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||
echo "OBS_GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
||||
- name: 'Checkout last OBS-Studio release (${{ env.OBS_GIT_TAG }})'
|
||||
@ -211,9 +222,16 @@ jobs:
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
run: |
|
||||
git fetch --prune --unshallow
|
||||
echo "GIT_BRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV
|
||||
echo "GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||
echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
||||
GIT_HASH=$(git rev-parse --short HEAD)
|
||||
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
||||
GIT_TAG=$(git describe --tags --abbrev=0)
|
||||
echo "GIT_TAG=$GIT_TAG" >> $GITHUB_ENV
|
||||
if [ "$GIT_TAG" ] ; then \
|
||||
VERSION="$GIT_TAG" ; \
|
||||
else \
|
||||
VERSION="$GIT_HASH-git" ; \
|
||||
fi
|
||||
echo "PACKAGE_VERSION=$VERSION" >> $GITHUB_ENV
|
||||
- name: 'Install prerequisites (Apt)'
|
||||
shell: bash
|
||||
run: |
|
||||
@ -294,7 +312,11 @@ jobs:
|
||||
run: |
|
||||
mkdir ./build
|
||||
cd ./build
|
||||
cmake -DLIBOBS_INCLUDE_DIR=${{ github.workspace }}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr -DUSE_UBUNTU_FIX=TRUE ..
|
||||
if [ "${{ env.GIT_TAG }}" ] ; then \
|
||||
cmake -DLIBOBS_INCLUDE_DIR=${{ github.workspace }}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr -DUSE_UBUNTU_FIX=TRUE -DCMAKE_BUILD_TYPE=Release .. ; \
|
||||
else \
|
||||
cmake -DLIBOBS_INCLUDE_DIR=${{ github.workspace }}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr -DUSE_UBUNTU_FIX=TRUE .. ; \
|
||||
fi
|
||||
- name: 'Build obs-websocket'
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
shell: bash
|
||||
@ -305,26 +327,30 @@ jobs:
|
||||
- name: 'Set PR Artifact Filename'
|
||||
shell: bash
|
||||
run: |
|
||||
FILENAME="obs-websocket-1-${{ env.GIT_HASH }}-1_amd64.deb"
|
||||
if [ "${{ env.GIT_TAG }}" ] ; then \
|
||||
FILENAME="obs-websocket-${{ env.GIT_TAG }}-Ubuntu64.deb" ; \
|
||||
else \
|
||||
FILENAME="obs-websocket-${{ env.GIT_HASH }}-git-Ubuntu64.deb" ; \
|
||||
fi
|
||||
echo "FILENAME=$FILENAME" >> $GITHUB_ENV
|
||||
- name: 'Package ${{ env.FILENAME }}'
|
||||
if: success()
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
shell: bash
|
||||
run: |
|
||||
VERSION="1-${{ env.GIT_HASH }}-git"
|
||||
cd ./build
|
||||
sudo checkinstall -y --type=debian --fstrans=no -nodoc \
|
||||
--backup=no --deldoc=yes --install=no --pkgname=obs-websocket --pkgversion=$VERSION \
|
||||
--backup=no --deldoc=yes --install=no --pkgname=obs-websocket --pkgversion=${{ env.PACKAGE_VERSION }} \
|
||||
--pkglicense="GPLv2.0" --maintainer="${{ github.event.pusher.email }}" --pkggroup="video" \
|
||||
--pkgsource="${{ github.event.repository.html_url }}" \
|
||||
--requires="obs-studio,libqt5core5a,libqt5widgets5,libqt5network5,libqt5concurrent5,qt5-image-formats-plugins" \
|
||||
--requires="obs-studio,libqt5network5,libqt5concurrent5,qt5-image-formats-plugins" \
|
||||
--pakdir="../package"
|
||||
sudo chmod ao+r ../package/*
|
||||
sudo mv ../package/* ../package/${{ env.FILENAME }}
|
||||
cd -
|
||||
- name: 'Publish ${{ env.FILENAME }}'
|
||||
if: success()
|
||||
uses: actions/upload-artifact@v2-preview
|
||||
with:
|
||||
name: '${{ env.GIT_HASH }}-Ubuntu64'
|
||||
path: '${{ github.workspace }}/obs-websocket/package/*.deb'
|
||||
name: 'obs-websocket-${{ env.PACKAGE_VERSION }}-Ubuntu64'
|
||||
path: '${{ github.workspace }}/obs-websocket/package/*.deb'
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
WebSockets API for OBS Studio.
|
||||
|
||||
[![Twitter](https://img.shields.io/twitter/url/https/twitter.com/fold_left.svg?style=social&label=Follow%20%40LePalakis)](https://twitter.com/LePalakis)
|
||||
[![CI Multiplatform Build](https://github.com/Palakis/obs-websocket/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/Palakis/obs-websocket/actions/workflows/main.yml)
|
||||
[![Discord](https://img.shields.io/discord/715691013825364120.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/WBaSQ3A)
|
||||
[![Financial Contributors on Open Collective](https://opencollective.com/obs-websocket/all/badge.svg?label=financial+contributors)](https://opencollective.com/obs-websocket)
|
||||
|
||||
|
@ -133,7 +133,7 @@ void WebSocketProtocol::ProcessMessage(SessionPtr session, WebSocketProtocol::Pr
|
||||
Utils::Platform::SendTrayNotification(QSystemTrayIcon::Information, title, body);
|
||||
}
|
||||
|
||||
ret.result["op"] = 3;
|
||||
ret.result["op"] = 2;
|
||||
ret.result["d"]["negotiatedRpcVersion"] = session->RpcVersion();
|
||||
} return;
|
||||
case 3: { // Reidentify
|
||||
@ -144,7 +144,7 @@ void WebSocketProtocol::ProcessMessage(SessionPtr session, WebSocketProtocol::Pr
|
||||
return;
|
||||
}
|
||||
|
||||
ret.result["op"] = 3;
|
||||
ret.result["op"] = 2;
|
||||
ret.result["d"]["negotiatedRpcVersion"] = session->RpcVersion();
|
||||
} return;
|
||||
case 6: { // Request
|
||||
|
Loading…
Reference in New Issue
Block a user