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
60
.github/workflows/main.yml
vendored
60
.github/workflows/main.yml
vendored
@ -6,6 +6,8 @@ on:
|
|||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
tags:
|
||||||
|
- '[45].[0-9]+.[0-9]+*'
|
||||||
pull_request:
|
pull_request:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
@ -44,7 +46,6 @@ jobs:
|
|||||||
working-directory: ${{ github.workspace }}/obs-studio
|
working-directory: ${{ github.workspace }}/obs-studio
|
||||||
run: |
|
run: |
|
||||||
git fetch --prune --unshallow
|
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_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||||
echo "OBS_GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
echo "OBS_GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
||||||
- name: 'Checkout last OBS-Studio release (${{ env.OBS_GIT_TAG }})'
|
- name: 'Checkout last OBS-Studio release (${{ env.OBS_GIT_TAG }})'
|
||||||
@ -58,9 +59,16 @@ jobs:
|
|||||||
working-directory: ${{ github.workspace }}/obs-websocket
|
working-directory: ${{ github.workspace }}/obs-websocket
|
||||||
run: |
|
run: |
|
||||||
git fetch --prune --unshallow
|
git fetch --prune --unshallow
|
||||||
echo "GIT_BRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV
|
GIT_HASH=$(git rev-parse --short HEAD)
|
||||||
echo "GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
||||||
echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $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'
|
- name: 'Restore Cached Qt'
|
||||||
id: qtcache
|
id: qtcache
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@ -156,7 +164,11 @@ jobs:
|
|||||||
- name: 'Set PR Artifact Filename'
|
- name: 'Set PR Artifact Filename'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
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
|
echo "WIN_FILENAME=$FILENAME" >> $GITHUB_ENV
|
||||||
- name: 'Package obs-websocket'
|
- name: 'Package obs-websocket'
|
||||||
working-directory: ${{ github.workspace }}/obs-websocket
|
working-directory: ${{ github.workspace }}/obs-websocket
|
||||||
@ -169,13 +181,13 @@ jobs:
|
|||||||
if: success()
|
if: success()
|
||||||
uses: actions/upload-artifact@v2-preview
|
uses: actions/upload-artifact@v2-preview
|
||||||
with:
|
with:
|
||||||
name: '${{ env.GIT_HASH }}-Windows'
|
name: 'obs-websocket-${{ env.PACKAGE_VERSION }}-Windows'
|
||||||
path: ${{ github.workspace }}/obs-websocket/package/*.zip
|
path: ${{ github.workspace }}/obs-websocket/package/*.zip
|
||||||
- name: 'Publish ${{ env.WIN_FILENAME }}-Installer.exe'
|
- name: 'Publish ${{ env.WIN_FILENAME }}-Installer.exe'
|
||||||
if: success()
|
if: success()
|
||||||
uses: actions/upload-artifact@v2-preview
|
uses: actions/upload-artifact@v2-preview
|
||||||
with:
|
with:
|
||||||
name: '${{ env.GIT_HASH }}-Windows-Installer'
|
name: 'obs-websocket-${{ env.PACKAGE_VERSION }}-Windows-Installer'
|
||||||
path: ${{ github.workspace }}/obs-websocket/package/*.exe
|
path: ${{ github.workspace }}/obs-websocket/package/*.exe
|
||||||
ubuntu64:
|
ubuntu64:
|
||||||
name: "Linux/Ubuntu 64-bit"
|
name: "Linux/Ubuntu 64-bit"
|
||||||
@ -198,7 +210,6 @@ jobs:
|
|||||||
working-directory: ${{ github.workspace }}/obs-studio
|
working-directory: ${{ github.workspace }}/obs-studio
|
||||||
run: |
|
run: |
|
||||||
git fetch --prune --unshallow
|
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_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||||
echo "OBS_GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
echo "OBS_GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
||||||
- name: 'Checkout last OBS-Studio release (${{ env.OBS_GIT_TAG }})'
|
- name: 'Checkout last OBS-Studio release (${{ env.OBS_GIT_TAG }})'
|
||||||
@ -211,9 +222,16 @@ jobs:
|
|||||||
working-directory: ${{ github.workspace }}/obs-websocket
|
working-directory: ${{ github.workspace }}/obs-websocket
|
||||||
run: |
|
run: |
|
||||||
git fetch --prune --unshallow
|
git fetch --prune --unshallow
|
||||||
echo "GIT_BRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV
|
GIT_HASH=$(git rev-parse --short HEAD)
|
||||||
echo "GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
||||||
echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $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)'
|
- name: 'Install prerequisites (Apt)'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@ -294,7 +312,11 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir ./build
|
mkdir ./build
|
||||||
cd ./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'
|
- name: 'Build obs-websocket'
|
||||||
working-directory: ${{ github.workspace }}/obs-websocket
|
working-directory: ${{ github.workspace }}/obs-websocket
|
||||||
shell: bash
|
shell: bash
|
||||||
@ -305,26 +327,30 @@ jobs:
|
|||||||
- name: 'Set PR Artifact Filename'
|
- name: 'Set PR Artifact Filename'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
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
|
echo "FILENAME=$FILENAME" >> $GITHUB_ENV
|
||||||
- name: 'Package ${{ env.FILENAME }}'
|
- name: 'Package ${{ env.FILENAME }}'
|
||||||
if: success()
|
if: success()
|
||||||
working-directory: ${{ github.workspace }}/obs-websocket
|
working-directory: ${{ github.workspace }}/obs-websocket
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
VERSION="1-${{ env.GIT_HASH }}-git"
|
|
||||||
cd ./build
|
cd ./build
|
||||||
sudo checkinstall -y --type=debian --fstrans=no -nodoc \
|
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" \
|
--pkglicense="GPLv2.0" --maintainer="${{ github.event.pusher.email }}" --pkggroup="video" \
|
||||||
--pkgsource="${{ github.event.repository.html_url }}" \
|
--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"
|
--pakdir="../package"
|
||||||
sudo chmod ao+r ../package/*
|
sudo chmod ao+r ../package/*
|
||||||
|
sudo mv ../package/* ../package/${{ env.FILENAME }}
|
||||||
cd -
|
cd -
|
||||||
- name: 'Publish ${{ env.FILENAME }}'
|
- name: 'Publish ${{ env.FILENAME }}'
|
||||||
if: success()
|
if: success()
|
||||||
uses: actions/upload-artifact@v2-preview
|
uses: actions/upload-artifact@v2-preview
|
||||||
with:
|
with:
|
||||||
name: '${{ env.GIT_HASH }}-Ubuntu64'
|
name: 'obs-websocket-${{ env.PACKAGE_VERSION }}-Ubuntu64'
|
||||||
path: '${{ github.workspace }}/obs-websocket/package/*.deb'
|
path: '${{ github.workspace }}/obs-websocket/package/*.deb'
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
WebSockets API for OBS Studio.
|
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)
|
[![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)
|
[![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);
|
Utils::Platform::SendTrayNotification(QSystemTrayIcon::Information, title, body);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret.result["op"] = 3;
|
ret.result["op"] = 2;
|
||||||
ret.result["d"]["negotiatedRpcVersion"] = session->RpcVersion();
|
ret.result["d"]["negotiatedRpcVersion"] = session->RpcVersion();
|
||||||
} return;
|
} return;
|
||||||
case 3: { // Reidentify
|
case 3: { // Reidentify
|
||||||
@ -144,7 +144,7 @@ void WebSocketProtocol::ProcessMessage(SessionPtr session, WebSocketProtocol::Pr
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret.result["op"] = 3;
|
ret.result["op"] = 2;
|
||||||
ret.result["d"]["negotiatedRpcVersion"] = session->RpcVersion();
|
ret.result["d"]["negotiatedRpcVersion"] = session->RpcVersion();
|
||||||
} return;
|
} return;
|
||||||
case 6: { // Request
|
case 6: { // Request
|
||||||
|
Loading…
Reference in New Issue
Block a user