-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9674397
Showing
403 changed files
with
110,607 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
*~ | ||
.DS_Store | ||
/build/ | ||
/build32/ | ||
/build64/ | ||
/release/ | ||
/installer/Output/ | ||
|
||
.vscode | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
language: cpp | ||
|
||
env: | ||
global: | ||
# AWS key ID | ||
- secure: pAiNUGVbjP12BfnWPk0FFTkbnk4Tocvv88XiT3rzRqkQaD7/iyEogLBfHM4nOEgFiIMHbC41aE83w5JgRNPwn6mTgoQBOglzqq1tGuXfqPyV2VStk8beji1evubGoVjjPaoPTFyIdQc5GGxdHyogI/ed9Hb3ccyykYvjyolj9XoCiW42QHx60AHGwl+So+dEa8xydj9SLRPlZ/AitmI/cPVN3YotA7s37BLFiab54enxk7T4rwpR1nU0HVfoCpn5F4wZYxRq+LlSVFzC8vVE9cpDSLS5kjrZIZaT18tYG1/untCj+wqMIZbghaJXLtPSRW2YPHcJTz8q1YSXnJ19+0uiAIMAqaVv0kD5BAM97byYDBW+b9H6SYFkb/Pw/qcK9amMzMBjDPFpYFkl9Q2kzhsNs3HsZf/flSZjtrkQJiP3SOi/KvKzVK9X4Wym6hYZWHgmMTTYFrvr6BYnf2GkpfKNjm1d2kc0NNrq4d5H4NOEQB8MP+QH+o+BPeM6d9dthrUc1Pw+BXzOAr85CN4qtpPGoAl/Dbfgd6eu/88E2LpUufW2VFAOPWjykSOqzSN3orh7AaWuE34VFEnQ+2y3uIE8AKoyXzJv6zYkyNnNewKZeGe2kKYNwLn5UxQA9JEj7a+tvVevk4xBSkkjFAvjSG2z8/F1FXNbEfoLX1Hz/bU= | ||
# AWS key secret | ||
- secure: bGwljoP3E1OVBXLXox0O6p8kwQXLcNQ8YDKVa4H8u9Y+Ic7uqE4iV3rYS3ynNWSBMVRWY3ZbyClnhrCNwRhBAlcd8qWSJdpjVzs6HdQyzhuKa1P3V4FJPb7upGP/5R/DECGwex8Mun9dmXpYDak75LxfKIJUidPis5VDCYqul7k/xVVCou6Ctjpj7vQhWXDj2G/py+mdB8DERhymnQCtyK1Ziu8c4QlFKByZmnD72GFm/h3JPI1Pq1V2mz3x6x6GaYjb9Rdbd0UNwqjGQX4q2M/c3GEJa6B2JBCoTncawNZBNnPUF9qtv+zh0TNaNHMRWX13AJ/qYB+nVDub0C9b/6Mc48mt0Tv4ze15MproVrylZdV6qHYEG8yGPBqpTVbRP6gv6Y2TXIHWoTzqA+F/Gv2IDChyHXsld/MQQS2MSo5iaYktIrZKtX8Z0qAmTzPwIVBromaSI3vrE7UH0fRSQ6fAM8+Tn+MRthOBdqu23kS1dnG+X2CPbUhBfsJp0OSwVQD5jQtA51/sREVeGFiJvzQIkvwQDjb5MYilsRnwmoBXemkLmqaviXVY4rz1o5AIvz2pgZS2YggK1xHZCuI5tSjcNEkb77VwZTfsqrdDo9EJh6VgfdnGlHQhR2/A5hUJ4ANpJ/LgZlgfVp71Xg2GWQW6M4Znc5uj6A6xLBkO6FA= | ||
|
||
cache: | ||
directories: | ||
- node_modules | ||
|
||
matrix: | ||
include: | ||
- os: linux | ||
env: _generate_docs | ||
script: "./CI/generate-docs.sh" | ||
|
||
- os: linux | ||
env: _linux_build | ||
dist: trusty | ||
sudo: required | ||
services: | ||
- docker | ||
before_install: | ||
- docker run -d --name xenial -v $(dirname $(pwd)):/root -v /home/travis/package:/package | ||
-e TRAVIS_BRANCH="$TRAVIS_BRANCH" -e TRAVIS_TAG="$TRAVIS_TAG" -w /root nimmis/ubuntu:16.04 | ||
- docker exec -it xenial /root/obs-websocket/CI/install-dependencies-xenial.sh | ||
script: | ||
- docker exec -it xenial /root/obs-websocket/CI/build-xenial.sh | ||
after_success: | ||
- docker exec -it xenial /root/obs-websocket/CI/package-xenial.sh | ||
|
||
- os: osx | ||
env: _macos_build | ||
osx_image: xcode8.3 | ||
before_install: "./CI/install-dependencies-macos.sh" | ||
script: "./CI/build-macos.sh" | ||
after_success: | ||
- ./CI/package-macos.sh | ||
|
||
deploy: | ||
- provider: s3 | ||
region: eu-central-1 | ||
bucket: obs-websocket-linux-builds | ||
access_key_id: "$AWS_ID" | ||
secret_access_key: "$AWS_SECRET" | ||
local_dir: /home/travis/package | ||
skip_cleanup: true | ||
acl: public_read | ||
on: | ||
repo: Palakis/obs-websocket | ||
condition: | ||
- "$TRAVIS_OS_NAME = linux" | ||
- "-d /home/travis/package" | ||
all_branches: true | ||
- provider: s3 | ||
region: eu-central-1 | ||
bucket: obs-websocket-osx-builds | ||
access_key_id: "$AWS_ID" | ||
secret_access_key: "$AWS_SECRET" | ||
local_dir: release | ||
skip_cleanup: true | ||
acl: public_read | ||
on: | ||
repo: Palakis/obs-websocket | ||
condition: "$TRAVIS_OS_NAME = osx" | ||
all_branches: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Compiling obs-websocket | ||
## Prerequisites | ||
You'll need [QT 5.9.0](https://download.qt.io/official_releases/qt/5.7/5.7.0/), CMake, and a working development environment for OBS Studio installed on your computer. | ||
|
||
## Windows | ||
In cmake-gui, you'll have to set the following variables : | ||
- **QTDIR** (path) : location of the Qt environment suited for your compiler and architecture | ||
- **LIBOBS_INCLUDE_DIR** (path) : location of the libobs subfolder in the source code of OBS Studio | ||
- **LIBOBS_LIB** (filepath) : location of the obs.lib file | ||
- **OBS_FRONTEND_LIB** (filepath) : location of the obs-frontend-api.lib file | ||
|
||
## Linux | ||
On Debian/Ubuntu : | ||
``` | ||
sudo apt-get install libqt5websockets5-dev | ||
git clone --recursive https://github.com/Palakis/obs-websocket.git | ||
cd obs-websocket | ||
mkdir build && cd build | ||
cmake -DLIBOBS_INCLUDE_DIR="<path to the libobs sub-folder in obs-studio's source code>" -DCMAKE_INSTALL_PREFIX=/usr .. | ||
make -j4 | ||
sudo make install | ||
``` | ||
|
||
## OS X | ||
Use of the Travis macOS CI scripts is recommended. Please note that these scripts install new software and can change several settings on your system. An existing obs-studio development environment is not required, as `install-dependencies-macos.sh` will install it for you. | ||
Of course, you're encouraged to dig through the contents of these scripts to look for issues or specificities. | ||
``` | ||
git clone --recursive https://github.com/Palakis/obs-websocket.git | ||
cd obs-websocket | ||
./CI/install-dependencies-macos.sh | ||
./CI/build-macos.sh | ||
./CI/package-macos.sh | ||
``` | ||
This will result in a ready-to-use `obs-websocket.pkg` installer in the `release` subfolder. | ||
|
||
## Automated Builds | ||
- Windows : [![Automated Build status for Windows](https://ci.appveyor.com/api/projects/status/github/Palakis/obs-websocket)](https://ci.appveyor.com/project/Palakis/obs-websocket/history) | ||
- Linux & OS X : [![Automated Build status for Linux & OS X](https://travis-ci.org/Palakis/obs-websocket.svg?branch=master)](https://travis-ci.org/Palakis/obs-websocket) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
set -ex | ||
|
||
#export QT_PREFIX="$(find /usr/local/Cellar/qt5 -d 1 | tail -n 1)" | ||
|
||
mkdir build && cd build | ||
cmake .. \ | ||
-DQTDIR=/usr/local/opt/qt \ | ||
-DLIBOBS_INCLUDE_DIR=../../obs-studio/libobs \ | ||
-DLIBOBS_LIB=../../obs-studio/libobs \ | ||
-DOBS_FRONTEND_LIB="$(pwd)/../../obs-studio/build/UI/obs-frontend-api/libobs-frontend-api.dylib" \ | ||
-DCMAKE_INSTALL_PREFIX=/usr \ | ||
&& make -j4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh | ||
set -ex | ||
|
||
cd /root/obs-websocket | ||
|
||
mkdir build && cd build | ||
cmake -DLIBOBS_INCLUDE_DIR="../../obs-studio/libobs" -DCMAKE_INSTALL_PREFIX=/usr .. | ||
make -j4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
set -e | ||
echo "-- Generating documentation." | ||
echo "-- Node version: $(node -v)" | ||
echo "-- NPM version: $(npm -v)" | ||
|
||
cd docs | ||
npm install | ||
npm run build | ||
|
||
echo "-- Documentation successfully generated." | ||
|
||
if git diff --quiet; then | ||
echo "-- No documentation changes to commit." | ||
exit 0 | ||
fi | ||
|
||
if [ "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_BRANCH" != "master" ]; then | ||
echo "-- Skipping documentation deployment because this is either a pull request or a non-master branch." | ||
exit 0 | ||
fi | ||
|
||
REMOTE_URL="$(git config remote.origin.url)" | ||
TARGET_REPO=${REMOTE_URL/https:\/\/github.com\//github.com/} | ||
GITHUB_REPO=https://${GH_TOKEN:-git}@${TARGET_REPO} | ||
|
||
git config user.name "Travis CI" | ||
git config user.email "$COMMIT_AUTHOR_EMAIL" | ||
|
||
git add ./generated | ||
git pull | ||
git commit -m "docs(travis): Update protocol.md - $(git rev-parse --short HEAD) [skip ci]" | ||
git push -q $GITHUB_REPO HEAD:$TRAVIS_BRANCH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
@echo off | ||
SETLOCAL EnableDelayedExpansion | ||
|
||
REM Check if obs-studio build exists. | ||
REM If the obs-studio directory does exist, check if the last OBS tag built | ||
REM matches the latest OBS tag. | ||
REM If the tags match, do not build obs-studio. | ||
REM If the tags do not match, build obs-studio. | ||
REM If the obs-studio directory doesn't exist, build obs-studio. | ||
echo Checking for obs-studio build... | ||
|
||
set OBSLatestTagPrePull=0 | ||
set OBSLatestTagPostPull=0 | ||
echo Latest tag pre-pull: %OBSLatestTagPrePull% | ||
echo Latest tag post-pull: %OBSLatestTagPostPull% | ||
|
||
REM Set up the build flag as undefined. | ||
set "BuildOBS=" | ||
|
||
REM Check the last tag successfully built by CI. | ||
if exist C:\projects\obs-studio-last-tag-built.txt ( | ||
set /p OBSLastTagBuilt=<C:\projects\obs-studio-last-tag-built.txt | ||
) else ( | ||
set OBSLastTagBuilt=0 | ||
) | ||
|
||
REM If obs-studio directory exists, run git pull and get the latest tag number. | ||
if exist C:\projects\obs-studio\ ( | ||
echo obs-studio directory exists | ||
echo Updating tag info | ||
cd C:\projects\obs-studio\ | ||
git describe --tags --abbrev=0 > C:\projects\latest-obs-studio-tag-pre-pull.txt | ||
set /p OBSLatestTagPrePull=<C:\projects\latest-obs-studio-tag-pre-pull.txt | ||
git checkout master | ||
git pull | ||
git describe --tags --abbrev=0 > C:\projects\latest-obs-studio-tag-post-pull.txt | ||
set /p OBSLatestTagPostPull=<C:\projects\latest-obs-studio-tag-post-pull.txt | ||
set /p OBSLatestTag=<C:\projects\latest-obs-studio-tag-post-pull.txt | ||
echo %OBSLatestTagPostPull%> C:\projects\latest-obs-studio-tag.txt | ||
) | ||
|
||
REM Check the obs-studio tags for mismatches. | ||
REM If a new tag was pulled, set the build flag. | ||
if not %OBSLatestTagPrePull%==%OBSLatestTagPostPull% ( | ||
echo Latest tag pre-pull: %OBSLatestTagPrePull% | ||
echo Latest tag post-pull: %OBSLatestTagPostPull% | ||
echo Tags do not match. Need to rebuild OBS. | ||
set BuildOBS=true | ||
) | ||
|
||
REM If the latest git tag doesn't match the last built tag, set the build flag. | ||
if not %OBSLatestTagPostPull%==%OBSLastTagBuilt% ( | ||
echo Last built OBS tag: %OBSLastTagBuilt% | ||
echo Latest tag post-pull: %OBSLatestTagPostPull% | ||
echo Tags do not match. Need to rebuild OBS. | ||
set BuildOBS=true | ||
) | ||
|
||
REM If obs-studio directory does not exist, clone the git repo, get the latest | ||
REM tag number, and set the build flag. | ||
if not exist C:\projects\obs-studio ( | ||
echo obs-studio directory does not exist | ||
git clone https://github.com/obsproject/obs-studio | ||
cd C:\projects\obs-studio\ | ||
git describe --tags --abbrev=0 > C:\projects\obs-studio-latest-tag.txt | ||
set /p OBSLatestTag=<C:\projects\obs-studio-latest-tag.txt | ||
set BuildOBS=true | ||
) | ||
|
||
REM If the needed obs-studio libs for this build_config do not exist, | ||
REM set the build flag. | ||
if not exist C:\projects\obs-studio\build32\libobs\%build_config%\obs.lib ( | ||
echo obs-studio\build32\libobs\%build_config%\obs.lib does not exist | ||
set BuildOBS=true | ||
) | ||
if not exist C:\projects\obs-studio\build32\UI\obs-frontend-api\%build_config%\obs-frontend-api.lib ( | ||
echo obs-studio\build32\UI\obs-frontend-api\%build_config%\obs-frontend-api.lib does not exist | ||
set BuildOBS=true | ||
) | ||
|
||
REM Some debug info | ||
echo: | ||
echo Latest tag pre-pull: %OBSLatestTagPrePull% | ||
echo Latest tag post-pull: %OBSLatestTagPostPull% | ||
echo Latest tag: %OBSLatestTag% | ||
echo Last built OBS tag: %OBSLastTagBuilt% | ||
|
||
if defined BuildOBS ( | ||
echo BuildOBS: true | ||
) else ( | ||
echo BuildOBS: false | ||
) | ||
echo: | ||
|
||
REM If the build flag is set, build obs-studio. | ||
if defined BuildOBS ( | ||
echo Building obs-studio... | ||
echo git checkout %OBSLatestTag% | ||
git checkout %OBSLatestTag% | ||
echo: | ||
echo Removing previous build dirs... | ||
if exist build rmdir /s /q C:\projects\obs-studio\build | ||
if exist build32 rmdir /s /q C:\projects\obs-studio\build32 | ||
if exist build64 rmdir /s /q C:\projects\obs-studio\build64 | ||
echo Making new build dirs... | ||
mkdir build | ||
mkdir build32 | ||
mkdir build64 | ||
echo Running cmake for obs-studio %OBSLatestTag% 32-bit... | ||
cd ./build32 | ||
cmake -G "Visual Studio 15 2017" -DDISABLE_PLUGINS=true -DCOPIED_DEPENDENCIES=false -DCOPY_DEPENDENCIES=true .. | ||
echo: | ||
echo: | ||
echo Running cmake for obs-studio %OBSLatestTag% 64-bit... | ||
cd ../build64 | ||
cmake -G "Visual Studio 15 2017 Win64" -DDISABLE_PLUGINS=true -DCOPIED_DEPENDENCIES=false -DCOPY_DEPENDENCIES=true .. | ||
echo: | ||
echo: | ||
echo Building obs-studio %OBSLatestTag% 32-bit ^(Build Config: %build_config%^)... | ||
call msbuild /m /p:Configuration=%build_config% C:\projects\obs-studio\build32\obs-studio.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" | ||
echo Building obs-studio %OBSLatestTag% 64-bit ^(Build Config: %build_config%^)... | ||
call msbuild /m /p:Configuration=%build_config% C:\projects\obs-studio\build64\obs-studio.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" | ||
cd .. | ||
git describe --tags --abbrev=0 > C:\projects\obs-studio-last-tag-built.txt | ||
set /p OBSLastTagBuilt=<C:\projects\obs-studio-last-tag-built.txt | ||
) else ( | ||
echo Last OBS tag built is: %OBSLastTagBuilt% | ||
echo No need to rebuild OBS. | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/sh | ||
set -ex | ||
|
||
# OBS Studio deps | ||
brew update | ||
brew install ffmpeg | ||
brew install libav | ||
|
||
# qtwebsockets deps | ||
# qt latest | ||
#brew install qt5 | ||
|
||
# qt 5.9.2 | ||
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/2b121c9a96e58a5da14228630cb71d5bead7137e/Formula/qt.rb | ||
|
||
#echo "Qt path: $(find /usr/local/Cellar/qt5 -d 1 | tail -n 1)" | ||
|
||
# Build obs-studio | ||
cd .. | ||
git clone --recursive https://github.com/jp9000/obs-studio | ||
cd obs-studio | ||
git checkout 21.0.0 | ||
mkdir build && cd build | ||
cmake .. \ | ||
-DCMAKE_PREFIX_PATH=/usr/local/opt/qt/lib/cmake \ | ||
&& make -j4 | ||
|
||
# Packages app | ||
cd .. | ||
curl -L -O http:https://s.sudre.free.fr/Software/files/Packages.dmg -f --retry 5 -C - | ||
hdiutil attach ./Packages.dmg | ||
sudo installer -pkg /Volumes/Packages\ 1.2.2/packages/Packages.pkg -target / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/bin/sh | ||
set -ex | ||
|
||
# OBS Studio deps | ||
apt-get -qq update | ||
apt-get install -y \ | ||
libc-dev-bin libc6-dev \ | ||
git \ | ||
build-essential | ||
|
||
apt-get install -y \ | ||
build-essential \ | ||
checkinstall \ | ||
cmake \ | ||
libasound2-dev \ | ||
libavcodec-dev \ | ||
libavdevice-dev \ | ||
libavfilter-dev \ | ||
libavformat-dev \ | ||
libavutil-dev \ | ||
libcurl4-openssl-dev \ | ||
libfontconfig-dev \ | ||
libfreetype6-dev \ | ||
libgl1-mesa-dev \ | ||
libjack-jackd2-dev \ | ||
libjansson-dev \ | ||
libpulse-dev \ | ||
libqt5x11extras5-dev \ | ||
libspeexdsp-dev \ | ||
libswresample-dev \ | ||
libswscale-dev \ | ||
libudev-dev \ | ||
libv4l-dev \ | ||
libvlc-dev \ | ||
libx11-dev \ | ||
libx264-dev \ | ||
libxcb-shm0-dev \ | ||
libxcb-xinerama0-dev \ | ||
libxcomposite-dev \ | ||
libxinerama-dev \ | ||
pkg-config \ | ||
qtbase5-dev | ||
|
||
# obs-websocket deps | ||
apt-get install -y libqt5websockets5-dev | ||
|
||
# Build obs-studio | ||
cd /root | ||
git clone https://github.com/jp9000/obs-studio ./obs-studio | ||
cd obs-studio | ||
git checkout 21.0.0 | ||
mkdir build && cd build | ||
cmake -DUNIX_STRUCTURE=1 -DCMAKE_INSTALL_PREFIX=/usr .. | ||
make -j4 | ||
make install | ||
|
||
ldconfig |
Oops, something went wrong.