mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
Compare commits
1 Commits
4.x-compat
...
4.9.0
Author | SHA1 | Date | |
---|---|---|---|
2f252f67ba |
79
.github/actions/build-plugin/action.yml
vendored
79
.github/actions/build-plugin/action.yml
vendored
@ -1,79 +0,0 @@
|
||||
name: 'Setup and build plugin'
|
||||
description: 'Builds the plugin for specified architecture and build config.'
|
||||
inputs:
|
||||
target:
|
||||
description: 'Build target for dependencies'
|
||||
required: true
|
||||
config:
|
||||
description: 'Build configuration'
|
||||
required: false
|
||||
default: 'Release'
|
||||
codesign:
|
||||
description: 'Enable codesigning (macOS only)'
|
||||
required: false
|
||||
default: 'false'
|
||||
codesignIdent:
|
||||
description: 'Developer ID for application codesigning (macOS only)'
|
||||
required: false
|
||||
default: '-'
|
||||
visualStudio:
|
||||
description: 'Visual Studio version (Windows only)'
|
||||
required: false
|
||||
default: 'Visual Studio 16 2019'
|
||||
workingDirectory:
|
||||
description: 'Working directory for packaging'
|
||||
required: false
|
||||
default: ${{ github.workspace }}
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Run macOS Build
|
||||
if: ${{ runner.os == 'macOS' }}
|
||||
shell: zsh {0}
|
||||
env:
|
||||
CODESIGN_IDENT: ${{ inputs.codesignIdent }}
|
||||
run: |
|
||||
echo "CODESIGN_IDENT=$(echo $CODESIGN_IDENT)" >> $GITHUB_ENV
|
||||
|
||||
build_args=(
|
||||
-c ${{ inputs.config }}
|
||||
-t macos-${{ inputs.target }}
|
||||
)
|
||||
|
||||
if [[ '${{ inputs.codesign }}' == 'true' ]] build_args+=(-s)
|
||||
if (( ${+CI} && ${+RUNNER_DEBUG} )) build_args+=(--debug)
|
||||
|
||||
${{ inputs.workingDirectory }}/.github/scripts/build-macos.zsh ${build_args}
|
||||
|
||||
- name: Run Linux Build
|
||||
if: ${{ runner.os == 'Linux' }}
|
||||
shell: bash
|
||||
run: |
|
||||
build_args=(
|
||||
-c ${{ inputs.config }}
|
||||
-t linux-${{ inputs.target }}
|
||||
)
|
||||
|
||||
if [[ -n "${CI}" && -n "${RUNNER_DEBUG}" ]]; then
|
||||
build_args+=(--debug)
|
||||
fi
|
||||
|
||||
${{ inputs.workingDirectory }}/.github/scripts/build-linux.sh "${build_args[@]}"
|
||||
|
||||
- name: Run Windows Build
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
$BuildArgs = @{
|
||||
Target = '${{ inputs.target }}'
|
||||
Configuration = '${{ inputs.config }}'
|
||||
CMakeGenerator = '${{ inputs.visualStudio }}'
|
||||
}
|
||||
|
||||
if ( ( Test-Path env:CI ) -and ( Test-Path env:RUNNER_DEBUG ) ) {
|
||||
$BuildArgs += @{
|
||||
Debug = $true
|
||||
}
|
||||
}
|
||||
|
||||
${{ inputs.workingDirectory }}/.github/scripts/Build-Windows.ps1 @BuildArgs
|
99
.github/actions/package-plugin/action.yml
vendored
99
.github/actions/package-plugin/action.yml
vendored
@ -1,99 +0,0 @@
|
||||
name: 'Package plugin'
|
||||
description: 'Packages the plugin for specified architecture and build config.'
|
||||
inputs:
|
||||
target:
|
||||
description: 'Build target for dependencies'
|
||||
required: true
|
||||
config:
|
||||
description: 'Build configuration'
|
||||
required: false
|
||||
default: 'Release'
|
||||
codesign:
|
||||
description: 'Enable codesigning (macOS only)'
|
||||
required: false
|
||||
default: 'false'
|
||||
notarize:
|
||||
description: 'Enable notarization (macOS only)'
|
||||
required: false
|
||||
default: 'false'
|
||||
codesignIdent:
|
||||
description: 'Developer ID for application codesigning (macOS only)'
|
||||
required: false
|
||||
default: '-'
|
||||
installerIdent:
|
||||
description: 'Developer ID for installer package codesigning (macOS only)'
|
||||
required: false
|
||||
default: ''
|
||||
codesignUser:
|
||||
description: 'Apple ID username for notarization (macOS only)'
|
||||
required: false
|
||||
default: ''
|
||||
codesignPass:
|
||||
description: 'Apple ID password for notarization (macOS only)'
|
||||
required: false
|
||||
default: ''
|
||||
createInstaller:
|
||||
description: 'Create InnoSetup installer (Windows only)'
|
||||
required: false
|
||||
default: 'false'
|
||||
workingDirectory:
|
||||
description: 'Working directory for packaging'
|
||||
required: false
|
||||
default: ${{ github.workspace }}
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Run macOS packaging
|
||||
if: ${{ runner.os == 'macOS' }}
|
||||
shell: zsh {0}
|
||||
env:
|
||||
CODESIGN_IDENT: ${{ inputs.codesignIdent }}
|
||||
CODESIGN_IDENT_INSTALLER: ${{ inputs.installerIdent }}
|
||||
CODESIGN_IDENT_USER: ${{ inputs.codesignUser }}
|
||||
CODESIGN_IDENT_PASS: ${{ inputs.codesignPass }}
|
||||
run: |
|
||||
package_args=(
|
||||
-c ${{ inputs.config }}
|
||||
-t macos-${{ inputs.target }}
|
||||
)
|
||||
|
||||
if [[ '${{ inputs.codesign }}' == 'true' ]] package_args+=(-s)
|
||||
if [[ '${{ inputs.notarize }}' == 'true' ]] package_args+=(-n)
|
||||
if (( ${+CI} && ${+RUNNER_DEBUG} )) build_args+=(--debug)
|
||||
|
||||
${{ inputs.workingDirectory }}/.github/scripts/package-macos.zsh ${package_args}
|
||||
|
||||
- name: Run Linux packaging
|
||||
if: ${{ runner.os == 'Linux' }}
|
||||
shell: bash
|
||||
run: |
|
||||
package_args=(
|
||||
-c ${{ inputs.config }}
|
||||
-t linux-${{ inputs.target }}
|
||||
)
|
||||
if [[ -n "${CI}" && -n "${RUNNER_DEBUG}" ]]; then
|
||||
build_args+=(--debug)
|
||||
fi
|
||||
|
||||
${{ inputs.workingDirectory }}/.github/scripts/package-linux.sh "${package_args[@]}"
|
||||
|
||||
- name: Run Windows packaging
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
$PackageArgs = @{
|
||||
Target = '${{ inputs.target }}'
|
||||
Configuration = '${{ inputs.config }}'
|
||||
}
|
||||
|
||||
if ( '${{ inputs.createInstaller }}' -eq 'true' ) {
|
||||
$PackageArgs += @{BuildInstaller = $true}
|
||||
}
|
||||
|
||||
if ( ( Test-Path env:CI ) -and ( Test-Path env:RUNNER_DEBUG ) ) {
|
||||
$BuildArgs += @{
|
||||
Debug = $true
|
||||
}
|
||||
}
|
||||
|
||||
${{ inputs.workingDirectory }}/.github/scripts/Package-Windows.ps1 @PackageArgs
|
BIN
.github/images/obsws_logo.png
vendored
Normal file
BIN
.github/images/obsws_logo.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 57 KiB |
9
.github/scripts/.Aptfile
vendored
9
.github/scripts/.Aptfile
vendored
@ -1,9 +0,0 @@
|
||||
package 'cmake'
|
||||
package 'ccache'
|
||||
package 'curl'
|
||||
package 'git'
|
||||
package 'jq'
|
||||
package 'ninja-build', bin: 'ninja'
|
||||
package 'pkg-config'
|
||||
package 'clang'
|
||||
package 'clang-format-13'
|
6
.github/scripts/.Brewfile
vendored
6
.github/scripts/.Brewfile
vendored
@ -1,6 +0,0 @@
|
||||
brew "ccache"
|
||||
brew "coreutils"
|
||||
brew "cmake"
|
||||
brew "git"
|
||||
brew "jq"
|
||||
brew "ninja"
|
3
.github/scripts/.Wingetfile
vendored
3
.github/scripts/.Wingetfile
vendored
@ -1,3 +0,0 @@
|
||||
package '7zip.7zip', path: '7-zip', bin: '7z'
|
||||
package 'cmake', path: 'Cmake\bin', bin: 'cmake'
|
||||
package 'innosetup', path: 'Inno Setup 6', bin: 'iscc'
|
245
.github/scripts/.build.zsh
vendored
245
.github/scripts/.build.zsh
vendored
@ -1,245 +0,0 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
builtin emulate -L zsh
|
||||
setopt EXTENDED_GLOB
|
||||
setopt PUSHD_SILENT
|
||||
setopt ERR_EXIT
|
||||
setopt ERR_RETURN
|
||||
setopt NO_UNSET
|
||||
setopt PIPE_FAIL
|
||||
setopt NO_AUTO_PUSHD
|
||||
setopt NO_PUSHD_IGNORE_DUPS
|
||||
setopt FUNCTION_ARGZERO
|
||||
|
||||
## Enable for script debugging
|
||||
# setopt WARN_CREATE_GLOBAL
|
||||
# setopt WARN_NESTED_VAR
|
||||
# setopt XTRACE
|
||||
|
||||
autoload -Uz is-at-least && if ! is-at-least 5.2; then
|
||||
print -u2 -PR "%F{1}${funcstack[1]##*/}:%f Running on Zsh version %B${ZSH_VERSION}%b, but Zsh %B5.2%b is the minimum supported version. Upgrade Zsh to fix this issue."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
_trap_error() {
|
||||
print -u2 -PR '%F{1} ✖︎ script execution error%f'
|
||||
print -PR -e "
|
||||
Callstack:
|
||||
${(j:\n :)funcfiletrace}
|
||||
"
|
||||
exit 2
|
||||
}
|
||||
|
||||
build() {
|
||||
if (( ! ${+SCRIPT_HOME} )) typeset -g SCRIPT_HOME=${ZSH_ARGZERO:A:h}
|
||||
local host_os=${${(s:-:)ZSH_ARGZERO:t:r}[2]}
|
||||
local target="${host_os}-${CPUTYPE}"
|
||||
local project_root=${SCRIPT_HOME:A:h:h}
|
||||
local buildspec_file="${project_root}/buildspec.json"
|
||||
|
||||
trap '_trap_error' ZERR
|
||||
|
||||
fpath=("${SCRIPT_HOME}/utils.zsh" ${fpath})
|
||||
autoload -Uz log_info log_error log_output set_loglevel check_${host_os} setup_${host_os} setup_obs setup_ccache
|
||||
|
||||
if [[ ! -r ${buildspec_file} ]] {
|
||||
log_error \
|
||||
'No buildspec.json found. Please create a build specification for your project.' \
|
||||
'A buildspec.json.template file is provided in the repository to get you started.'
|
||||
return 2
|
||||
}
|
||||
|
||||
typeset -g -a skips=()
|
||||
local -i _verbosity=1
|
||||
local -r _version='1.0.0'
|
||||
local -r -a _valid_targets=(
|
||||
macos-x86_64
|
||||
macos-arm64
|
||||
macos-universal
|
||||
linux-x86_64
|
||||
)
|
||||
local -r -a _valid_configs=(Debug RelWithDebInfo Release MinSizeRel)
|
||||
if [[ ${host_os} == 'macos' ]] {
|
||||
local -r -a _valid_generators=(Xcode Ninja 'Unix Makefiles')
|
||||
} else {
|
||||
local -r -a _valid_generators=(Ninja 'Unix Makefiles')
|
||||
}
|
||||
local generator='Ninja'
|
||||
local -r _usage="
|
||||
Usage: %B${functrace[1]%:*}%b <option> [<options>]
|
||||
|
||||
%BOptions%b:
|
||||
|
||||
%F{yellow} Build configuration options%f
|
||||
-----------------------------------------------------------------------------
|
||||
%B-t | --target%b Specify target - default: %B%F{green}${host_os}-${CPUTYPE}%f%b
|
||||
%B-c | --config%b Build configuration - default: %B%F{green}RelWithDebInfo%f%b
|
||||
%B-s | --codesign%b Enable codesigning (macOS only)
|
||||
%B--generator%b Specify build system to generate - default: %B%F{green}Ninja%f%b
|
||||
Available generators:
|
||||
- Ninja
|
||||
- Unix Makefiles
|
||||
- Xcode (macOS only)
|
||||
|
||||
%F{yellow} Output options%f
|
||||
-----------------------------------------------------------------------------
|
||||
%B-q | --quiet%b Quiet (error output only)
|
||||
%B-v | --verbose%b Verbose (more detailed output)
|
||||
%B--skip-[all|build|deps|unpack]%b Skip all|building OBS|checking for dependencies|unpacking dependencies
|
||||
%B--debug%b Debug (very detailed and added output)
|
||||
|
||||
%F{yellow} General options%f
|
||||
-----------------------------------------------------------------------------
|
||||
%B-h | --help%b Print this usage help
|
||||
%B-V | --version%b Print script version information"
|
||||
|
||||
local -a args
|
||||
while (( # )) {
|
||||
case ${1} {
|
||||
-t|--target|-c|--config|--generator)
|
||||
if (( # == 1 )) || [[ ${2:0:1} == '-' ]] {
|
||||
log_error "Missing value for option %B${1}%b"
|
||||
log_output ${_usage}
|
||||
exit 2
|
||||
}
|
||||
;;
|
||||
}
|
||||
case ${1} {
|
||||
--)
|
||||
shift
|
||||
args+=($@)
|
||||
break
|
||||
;;
|
||||
-t|--target)
|
||||
if (( ! ${_valid_targets[(Ie)${2}]} )) {
|
||||
log_error "Invalid value %B${2}%b for option %B${1}%b"
|
||||
log_output ${_usage}
|
||||
exit 2
|
||||
}
|
||||
target=${2}
|
||||
shift 2
|
||||
;;
|
||||
-c|--config)
|
||||
if (( ! ${_valid_configs[(Ie)${2}]} )) {
|
||||
log_error "Invalid value %B${2}%b for option %B${1}%b"
|
||||
log_output ${_usage}
|
||||
exit 2
|
||||
}
|
||||
BUILD_CONFIG=${2}
|
||||
shift 2
|
||||
;;
|
||||
-s|--codesign) CODESIGN=1; shift ;;
|
||||
-q|--quiet) (( _verbosity -= 1 )) || true; shift ;;
|
||||
-v|--verbose) (( _verbosity += 1 )); shift ;;
|
||||
-h|--help) log_output ${_usage}; exit 0 ;;
|
||||
-V|--version) print -Pr "${_version}"; exit 0 ;;
|
||||
--debug) _verbosity=3; shift ;;
|
||||
--generator)
|
||||
if (( ! ${_valid_generators[(Ie)${2}]} )) {
|
||||
log_error "Invalid value %B${2}%b for option %B${1}%b"
|
||||
log_output ${_usage}
|
||||
exit 2
|
||||
}
|
||||
generator=${2}
|
||||
shift 2
|
||||
;;
|
||||
--skip-*)
|
||||
local _skip="${${(s:-:)1}[-1]}"
|
||||
local _check=(all deps unpack build)
|
||||
(( ${_check[(Ie)${_skip}]} )) || log_warning "Invalid skip mode %B${_skip}%b supplied"
|
||||
typeset -g -a skips=(${skips} ${_skip})
|
||||
shift
|
||||
;;
|
||||
*) log_error "Unknown option: %B${1}%b"; log_output ${_usage}; exit 2 ;;
|
||||
}
|
||||
}
|
||||
|
||||
set -- ${(@)args}
|
||||
set_loglevel ${_verbosity}
|
||||
|
||||
check_${host_os}
|
||||
setup_ccache
|
||||
|
||||
typeset -g QT_VERSION
|
||||
typeset -g DEPLOYMENT_TARGET
|
||||
typeset -g OBS_DEPS_VERSION
|
||||
setup_${host_os}
|
||||
|
||||
local product_name
|
||||
local product_version
|
||||
read -r product_name product_version <<< \
|
||||
"$(jq -r '. | {name, version} | join(" ")' ${buildspec_file})"
|
||||
|
||||
case ${host_os} {
|
||||
macos)
|
||||
sed -i '' \
|
||||
"s/project(\(.*\) VERSION \(.*\))/project(${product_name} VERSION ${product_version})/" \
|
||||
"${project_root}/CMakeLists.txt"
|
||||
;;
|
||||
linux)
|
||||
sed -i'' \
|
||||
"s/project(\(.*\) VERSION \(.*\))/project(${product_name} VERSION ${product_version})/"\
|
||||
"${project_root}/CMakeLists.txt"
|
||||
;;
|
||||
}
|
||||
|
||||
setup_obs
|
||||
|
||||
pushd ${project_root}
|
||||
if (( ! (${skips[(Ie)all]} + ${skips[(Ie)build]}) )) {
|
||||
log_info "Configuring ${product_name}..."
|
||||
|
||||
local _plugin_deps="${project_root:h}/obs-build-dependencies/plugin-deps-${OBS_DEPS_VERSION}-qt${QT_VERSION}-${target##*-}"
|
||||
local -a cmake_args=(
|
||||
-DCMAKE_BUILD_TYPE=${BUILD_CONFIG:-RelWithDebInfo}
|
||||
-DQT_VERSION=${QT_VERSION}
|
||||
-DCMAKE_PREFIX_PATH="${_plugin_deps}"
|
||||
)
|
||||
|
||||
if (( _loglevel == 0 )) cmake_args+=(-Wno_deprecated -Wno-dev --log-level=ERROR)
|
||||
if (( _logLevel > 2 )) cmake_args+=(--debug-output)
|
||||
|
||||
local num_procs
|
||||
|
||||
case ${target} {
|
||||
macos-*)
|
||||
autoload -Uz read_codesign
|
||||
if (( ${+CODESIGN} )) {
|
||||
read_codesign
|
||||
}
|
||||
|
||||
cmake_args+=(
|
||||
-DCMAKE_FRAMEWORK_PATH="${_plugin_deps}/Frameworks"
|
||||
-DCMAKE_OSX_ARCHITECTURES=${${target##*-}//universal/x86_64;arm64}
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=${DEPLOYMENT_TARGET:-10.15}
|
||||
-DOBS_CODESIGN_LINKER=ON
|
||||
-DOBS_BUNDLE_CODESIGN_IDENTITY="${CODESIGN_IDENT:--}"
|
||||
)
|
||||
num_procs=$(( $(sysctl -n hw.ncpu) + 1 ))
|
||||
;;
|
||||
linux-*)
|
||||
if (( ${+CI} )) {
|
||||
cmake_args+=(-DCMAKE_INSTALL_PREFIX=/usr)
|
||||
}
|
||||
num_procs=$(( $(nproc) + 1 ))
|
||||
;;
|
||||
}
|
||||
|
||||
log_debug "Attempting to configure ${product_name} with CMake arguments: ${cmake_args}"
|
||||
cmake -S . -B build_${target##*-} -G ${generator} ${cmake_args}
|
||||
|
||||
log_info "Building ${product_name}..."
|
||||
local -a cmake_args=()
|
||||
if (( _loglevel > 1 )) cmake_args+=(--verbose)
|
||||
if [[ ${generator} == 'Unix Makefiles' ]] cmake_args+=(--parallel ${num_procs})
|
||||
cmake --build build_${target##*-} --config ${BUILD_CONFIG:-RelWithDebInfo} ${cmake_args}
|
||||
}
|
||||
|
||||
log_info "Installing ${product_name}..."
|
||||
local -a cmake_args=()
|
||||
if (( _loglevel > 1 )) cmake_args+=(--verbose)
|
||||
cmake --install build_${target##*-} --config ${BUILD_CONFIG:-RelWithDebInfo} --prefix "${project_root}/release" ${cmake_args}
|
||||
popd
|
||||
}
|
||||
|
||||
build ${@}
|
192
.github/scripts/.package.zsh
vendored
192
.github/scripts/.package.zsh
vendored
@ -1,192 +0,0 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
builtin emulate -L zsh
|
||||
setopt EXTENDED_GLOB
|
||||
setopt PUSHD_SILENT
|
||||
setopt ERR_EXIT
|
||||
setopt ERR_RETURN
|
||||
setopt NO_UNSET
|
||||
setopt PIPE_FAIL
|
||||
setopt NO_AUTO_PUSHD
|
||||
setopt NO_PUSHD_IGNORE_DUPS
|
||||
setopt FUNCTION_ARGZERO
|
||||
|
||||
## Enable for script debugging
|
||||
# setopt WARN_CREATE_GLOBAL
|
||||
# setopt WARN_NESTED_VAR
|
||||
# setopt XTRACE
|
||||
|
||||
autoload -Uz is-at-least && if ! is-at-least 5.2; then
|
||||
print -u2 -PR "%F{1}${funcstack[1]##*/}:%f Running on Zsh version %B${ZSH_VERSION}%b, but Zsh %B5.2%b is the minimum supported version. Upgrade Zsh to fix this issue."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
_trap_error() {
|
||||
print -u2 -PR '%F{1} ✖︎ script execution error%f'
|
||||
print -PR -e "
|
||||
Callstack:
|
||||
${(j:\n :)funcfiletrace}
|
||||
"
|
||||
exit 2
|
||||
}
|
||||
|
||||
package() {
|
||||
if (( ! ${+SCRIPT_HOME} )) typeset -g SCRIPT_HOME=${ZSH_ARGZERO:A:h}
|
||||
local host_os=${${(s:-:)ZSH_ARGZERO:t:r}[2]}
|
||||
local target="${host_os}-${CPUTYPE}"
|
||||
local project_root=${SCRIPT_HOME:A:h:h}
|
||||
local buildspec_file="${project_root}/buildspec.json"
|
||||
trap '_trap_error' ZERR
|
||||
|
||||
fpath=("${SCRIPT_HOME}/utils.zsh" ${fpath})
|
||||
autoload -Uz set_loglevel log_info log_error log_output check_${host_os}
|
||||
|
||||
local -i _verbosity=1
|
||||
local -r _version='1.0.0'
|
||||
local -r -a _valid_targets=(
|
||||
macos-x86_64
|
||||
macos-arm64
|
||||
macos-universal
|
||||
linux-x86_64
|
||||
)
|
||||
local -r -a _valid_configs=(Debug RelWithDebInfo Release MinSizeRel)
|
||||
local -r _usage="
|
||||
Usage: %B${functrace[1]%:*}%b <option> [<options>]
|
||||
|
||||
%BOptions%b:
|
||||
|
||||
%F{yellow} Package configuration options%f
|
||||
-----------------------------------------------------------------------------
|
||||
%B-t | --target%b Specify target - default: %B%F{green}${host_os}-${CPUTYPE}%f%b
|
||||
%B-c | --config%b Build configuration - default: %B%F{green}RelWithDebInfo%f%b
|
||||
%B-s | --codesign%b Enable codesigning (macOS only)
|
||||
%B-n | --notarize%b Enable notarization (macOS only)
|
||||
|
||||
%F{yellow} Output options%f
|
||||
-----------------------------------------------------------------------------
|
||||
%B-q | --quiet%b Quiet (error output only)
|
||||
%B-v | --verbose%b Verbose (more detailed output)
|
||||
%B--debug%b Debug (very detailed and added output)
|
||||
|
||||
%F{yellow} General options%f
|
||||
-----------------------------------------------------------------------------
|
||||
%B-h | --help%b Print this usage help
|
||||
%B-V | --version%b Print script version information"
|
||||
|
||||
local -a args
|
||||
while (( # )) {
|
||||
case ${1} {
|
||||
-t|--target|-c|--config)
|
||||
if (( # == 1 )) || [[ ${2:0:1} == '-' ]] {
|
||||
log_error "Missing value for option %B${1}%b"
|
||||
log_output ${_usage}
|
||||
exit 2
|
||||
}
|
||||
;;
|
||||
}
|
||||
case ${1} {
|
||||
--)
|
||||
shift
|
||||
args+=($@)
|
||||
break
|
||||
;;
|
||||
-t|--target)
|
||||
if (( ! ${_valid_targets[(Ie)${2}]} )) {
|
||||
log_error "Invalid value %B${2}%b for option %B${1}%b"
|
||||
log_output ${_usage}
|
||||
exit 2
|
||||
}
|
||||
target=${2}
|
||||
shift 2
|
||||
;;
|
||||
-c|--config)
|
||||
if (( ! ${_valid_configs[(Ie)${2}]} )) {
|
||||
log_error "Invalid value %B${2}%b for option %B${1}%b"
|
||||
log_output ${_usage}
|
||||
exit 2
|
||||
}
|
||||
BUILD_CONFIG=${2}
|
||||
shift 2
|
||||
;;
|
||||
-s|--codesign) typeset -g CODESIGN=1; shift ;;
|
||||
-n|--notarize) typeset -g NOTARIZE=1; typeset -g CODESIGN=1; shift ;;
|
||||
-q|--quiet) (( _verbosity -= 1 )) || true; shift ;;
|
||||
-v|--verbose) (( _verbosity += 1 )); shift ;;
|
||||
-h|--help) log_output ${_usage}; exit 0 ;;
|
||||
-V|--version) print -Pr "${_version}"; exit 0 ;;
|
||||
--debug) _verbosity=3; shift ;;
|
||||
*) log_error "Unknown option: %B${1}%b"; log_output ${_usage}; exit 2 ;;
|
||||
}
|
||||
}
|
||||
|
||||
set -- ${(@)args}
|
||||
set_loglevel ${_verbosity}
|
||||
|
||||
check_${host_os}
|
||||
|
||||
local product_name
|
||||
local product_version
|
||||
read -r product_name product_version <<< \
|
||||
"$(jq -r '. | {name, version} | join(" ")' ${project_root}/buildspec.json)"
|
||||
|
||||
if [[ ${host_os} == 'macos' ]] {
|
||||
autoload -Uz check_packages read_codesign read_codesign_installer read_codesign_pass
|
||||
|
||||
local output_name="${product_name}-${product_version}-${host_os}-${target##*-}.pkg"
|
||||
|
||||
if [[ ! -d ${project_root}/release/${product_name}.plugin ]] {
|
||||
log_error 'No release artifact found. Run the build script or the CMake install procedure first.'
|
||||
return 2
|
||||
}
|
||||
|
||||
if [[ ! -f ${project_root}/build_${target##*-}/installer-macos.generated.pkgproj ]] {
|
||||
log_error 'Packages project file not found. Run the build script or the CMake build and install procedures first.'
|
||||
return 2
|
||||
}
|
||||
|
||||
check_packages
|
||||
|
||||
log_info "Packaging ${product_name}..."
|
||||
pushd ${project_root}
|
||||
packagesbuild \
|
||||
--build-folder ${project_root}/release \
|
||||
${project_root}/build_${target##*-}/installer-macos.generated.pkgproj
|
||||
|
||||
if (( ${+CODESIGN} )) {
|
||||
read_codesign_installer
|
||||
productsign \
|
||||
--sign "${CODESIGN_IDENT_INSTALLER}" \
|
||||
"${project_root}/release/${product_name}.pkg" \
|
||||
"${project_root}/release/${output_name}"
|
||||
|
||||
rm "${project_root}/release/${product_name}.pkg"
|
||||
} else {
|
||||
mv "${project_root}/release/${product_name}.pkg" \
|
||||
"${project_root}/release/${output_name}"
|
||||
}
|
||||
|
||||
if (( ${+CODESIGN} && ${+NOTARIZE} )) {
|
||||
if [[ ! -f "${project_root}/release/${output_name}" ]] {
|
||||
log_error "No package for notarization found."
|
||||
return 2
|
||||
}
|
||||
|
||||
read_codesign_installer
|
||||
read_codesign_pass
|
||||
|
||||
xcrun notarytool submit "${project_root}/release/${output_name}" \
|
||||
--keychain-profile "OBS-Codesign-Password" --wait
|
||||
xcrun stapler staple "${project_root}/release/${output_name}"
|
||||
}
|
||||
popd
|
||||
} elif [[ ${host_os} == 'linux' ]] {
|
||||
local -a cmake_args=()
|
||||
if (( _loglevel > 1 )) cmake_args+=(--verbose)
|
||||
|
||||
pushd ${project_root}
|
||||
cmake --build build_${target##*-} --config ${BUILD_CONFIG:-RelWithDebInfo} -t package ${cmake_args}
|
||||
popd
|
||||
}
|
||||
}
|
||||
|
||||
package ${@}
|
101
.github/scripts/Build-Windows.ps1
vendored
101
.github/scripts/Build-Windows.ps1
vendored
@ -1,101 +0,0 @@
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[ValidateSet('Debug', 'RelWithDebInfo', 'Release', 'MinSizeRel')]
|
||||
[string] $Configuration = 'RelWithDebInfo',
|
||||
[ValidateSet('x86', 'x64')]
|
||||
[string] $Target,
|
||||
[ValidateSet('Visual Studio 17 2022', 'Visual Studio 16 2019')]
|
||||
[string] $CMakeGenerator,
|
||||
[switch] $SkipAll,
|
||||
[switch] $SkipBuild,
|
||||
[switch] $SkipDeps,
|
||||
[switch] $SkipUnpack
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
if ( $DebugPreference -eq 'Continue' ) {
|
||||
$VerbosePreference = 'Continue'
|
||||
$InformationPreference = 'Continue'
|
||||
}
|
||||
|
||||
if ( $PSVersionTable.PSVersion -lt '7.0.0' ) {
|
||||
Write-Warning 'The obs-deps PowerShell build script requires PowerShell Core 7. Install or upgrade your PowerShell version: https://aka.ms/pscore6'
|
||||
exit 2
|
||||
}
|
||||
|
||||
function Build {
|
||||
trap {
|
||||
Pop-Location -Stack BuildTemp
|
||||
Write-Error $_
|
||||
exit 2
|
||||
}
|
||||
|
||||
$ScriptHome = $PSScriptRoot
|
||||
$ProjectRoot = Resolve-Path -Path "$PSScriptRoot/../.."
|
||||
$BuildSpecFile = "${ProjectRoot}/buildspec.json"
|
||||
|
||||
$UtilityFunctions = Get-ChildItem -Path $PSScriptRoot/utils.pwsh/*.ps1 -Recurse
|
||||
|
||||
foreach($Utility in $UtilityFunctions) {
|
||||
Write-Debug "Loading $($Utility.FullName)"
|
||||
. $Utility.FullName
|
||||
}
|
||||
|
||||
$BuildSpec = Get-Content -Path ${BuildSpecFile} -Raw | ConvertFrom-Json
|
||||
$ProductName = $BuildSpec.name
|
||||
$ProductVersion = $BuildSpec.version
|
||||
|
||||
$script:DepsVersion = ''
|
||||
$script:QtVersion = '5'
|
||||
$script:VisualStudioVersion = ''
|
||||
$script:PlatformSDK = '10.0.18363.657'
|
||||
|
||||
Setup-Host
|
||||
|
||||
if ( $CmakeGenerator -eq '' ) {
|
||||
$CmakeGenerator = $VisualStudioVersion
|
||||
}
|
||||
|
||||
(Get-Content -Path ${ProjectRoot}/CMakeLists.txt -Raw) `
|
||||
-replace "project\((.*) VERSION (.*)\)", "project(${ProductName} VERSION ${ProductVersion})" `
|
||||
| Out-File -Path ${ProjectRoot}/CMakeLists.txt
|
||||
|
||||
Setup-Obs
|
||||
|
||||
Push-Location -Stack BuildTemp
|
||||
if ( ! ( ( $SkipAll ) -or ( $SkipBuild ) ) ) {
|
||||
Ensure-Location $ProjectRoot
|
||||
|
||||
$DepsPath = "plugin-deps-${script:DepsVersion}-qt${script:QtVersion}-${script:Target}"
|
||||
$CmakeArgs = @(
|
||||
'-G', $CmakeGenerator
|
||||
"-DCMAKE_SYSTEM_VERSION=${script:PlatformSDK}"
|
||||
"-DCMAKE_GENERATOR_PLATFORM=$(if (${script:Target} -eq "x86") { "Win32" } else { "x64" })"
|
||||
"-DCMAKE_BUILD_TYPE=${Configuration}"
|
||||
"-DCMAKE_PREFIX_PATH:PATH=$(Resolve-Path -Path "${ProjectRoot}/../obs-build-dependencies/${DepsPath}")"
|
||||
"-DQT_VERSION=${script:QtVersion}"
|
||||
)
|
||||
|
||||
Log-Debug "Attempting to configure OBS with CMake arguments: $($CmakeArgs | Out-String)"
|
||||
Log-Information "Configuring ${ProductName}..."
|
||||
Invoke-External cmake -S . -B build_${script:Target} @CmakeArgs
|
||||
|
||||
$CmakeArgs = @(
|
||||
'--config', "${Configuration}"
|
||||
)
|
||||
|
||||
if ( $VerbosePreference -eq 'Continue' ) {
|
||||
$CmakeArgs+=('--verbose')
|
||||
}
|
||||
|
||||
Log-Information "Building ${ProductName}..."
|
||||
Invoke-External cmake --build "build_${script:Target}" @CmakeArgs
|
||||
}
|
||||
Log-Information "Install ${ProductName}..."
|
||||
Invoke-External cmake --install "build_${script:Target}" --prefix "${ProjectRoot}/release" @CmakeArgs
|
||||
|
||||
Pop-Location -Stack BuildTemp
|
||||
}
|
||||
|
||||
Build
|
92
.github/scripts/Package-Windows.ps1
vendored
92
.github/scripts/Package-Windows.ps1
vendored
@ -1,92 +0,0 @@
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[ValidateSet('Debug', 'RelWithDebInfo', 'Release', 'MinSizeRel')]
|
||||
[string] $Configuration = 'RelWithDebInfo',
|
||||
[ValidateSet('x86', 'x64', 'x86+x64')]
|
||||
[string] $Target,
|
||||
[switch] $BuildInstaller = $false
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
if ( $DebugPreference -eq 'Continue' ) {
|
||||
$VerbosePreference = 'Continue'
|
||||
$InformationPreference = 'Continue'
|
||||
}
|
||||
|
||||
if ( $PSVersionTable.PSVersion -lt '7.0.0' ) {
|
||||
Write-Warning 'The obs-deps PowerShell build script requires PowerShell Core 7. Install or upgrade your PowerShell version: https://aka.ms/pscore6'
|
||||
exit 2
|
||||
}
|
||||
|
||||
function Package {
|
||||
trap {
|
||||
Write-Error $_
|
||||
exit 2
|
||||
}
|
||||
|
||||
$ScriptHome = $PSScriptRoot
|
||||
$ProjectRoot = Resolve-Path -Path "$PSScriptRoot/../.."
|
||||
$BuildSpecFile = "${ProjectRoot}/buildspec.json"
|
||||
|
||||
$UtilityFunctions = Get-ChildItem -Path $PSScriptRoot/utils.pwsh/*.ps1 -Recurse
|
||||
|
||||
foreach( $Utility in $UtilityFunctions ) {
|
||||
Write-Debug "Loading $($Utility.FullName)"
|
||||
. $Utility.FullName
|
||||
}
|
||||
|
||||
$BuildSpec = Get-Content -Path ${BuildSpecFile} -Raw | ConvertFrom-Json
|
||||
$ProductName = $BuildSpec.name
|
||||
$ProductVersion = $BuildSpec.version
|
||||
|
||||
$OutputName = "${ProductName}-${ProductVersion}-windows-${Target}"
|
||||
|
||||
Install-BuildDependencies -WingetFile "${ScriptHome}/.Wingetfile"
|
||||
|
||||
Log-Information "Packaging ${ProductName}..."
|
||||
|
||||
$RemoveArgs = @{
|
||||
ErrorAction = 'SilentlyContinue'
|
||||
Path = @(
|
||||
"${ProjectRoot}/release/${ProductName}-*-windows-*.zip"
|
||||
"${ProjectRoot}/release/${ProductName}-*-windows-*.exe"
|
||||
)
|
||||
}
|
||||
|
||||
Remove-Item @RemoveArgs
|
||||
|
||||
if ( ( $BuildInstaller ) ) {
|
||||
if ( $Target -eq 'x86+x64' ) {
|
||||
$IsccCandidates = Get-ChildItem -Recurse -Path '*.iss'
|
||||
|
||||
if ( $IsccCandidates.length -gt 0 ) {
|
||||
$IsccFile = $IsccCandidates[0].FullName
|
||||
} else {
|
||||
$IsccFile = ''
|
||||
}
|
||||
} else {
|
||||
$IsccFile = "${ProjectRoot}/build_${Target}/installer-Windows.generated.iss"
|
||||
}
|
||||
|
||||
if ( ! ( Test-Path -Path $IsccFile ) ) {
|
||||
throw 'InnoSetup install script not found. Run the build script or the CMake build and install procedures first.'
|
||||
}
|
||||
|
||||
Log-Information 'Creating InnoSetup installer...'
|
||||
Push-Location -Stack BuildTemp
|
||||
Ensure-Location -Path "${ProjectRoot}/release"
|
||||
Invoke-External iscc ${IsccFile} /O. /F"${OutputName}-Installer"
|
||||
Pop-Location -Stack BuildTemp
|
||||
}
|
||||
|
||||
$CompressArgs = @{
|
||||
Path = (Get-ChildItem -Path "${ProjectRoot}/release" -Exclude "${OutputName}*.*")
|
||||
CompressionLevel = 'Optimal'
|
||||
DestinationPath = "${ProjectRoot}/release/${OutputName}.zip"
|
||||
}
|
||||
|
||||
Compress-Archive -Force @CompressArgs
|
||||
}
|
||||
|
||||
Package
|
13
.github/scripts/build-linux.sh
vendored
13
.github/scripts/build-linux.sh
vendored
@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if ! type zsh > /dev/null 2>&1; then
|
||||
echo ' => Installing script dependency Zsh.'
|
||||
|
||||
sudo apt-get -y update
|
||||
sudo apt-get -y install zsh
|
||||
fi
|
||||
|
||||
SCRIPT=$(readlink -f "${0}")
|
||||
SCRIPT_DIR=$(dirname "${SCRIPT}")
|
||||
|
||||
zsh ${SCRIPT_DIR}/build-linux.zsh "${@}"
|
1
.github/scripts/build-linux.zsh
vendored
1
.github/scripts/build-linux.zsh
vendored
@ -1 +0,0 @@
|
||||
.build.zsh
|
1
.github/scripts/build-macos.zsh
vendored
1
.github/scripts/build-macos.zsh
vendored
@ -1 +0,0 @@
|
||||
.build.zsh
|
11
.github/scripts/check-changes.sh
vendored
11
.github/scripts/check-changes.sh
vendored
@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
dirty=$(git ls-files --modified)
|
||||
|
||||
set +x
|
||||
if [[ $dirty ]]; then
|
||||
echo "================================="
|
||||
echo "Files were not formatted properly"
|
||||
echo "$dirty"
|
||||
echo "================================="
|
||||
exit 1
|
||||
fi
|
45
.github/scripts/check-cmake.sh
vendored
45
.github/scripts/check-cmake.sh
vendored
@ -1,45 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
|
||||
if [ ${#} -eq 1 -a "${1}" = "VERBOSE" ]; then
|
||||
VERBOSITY="-l debug"
|
||||
else
|
||||
VERBOSITY=""
|
||||
fi
|
||||
|
||||
if [ "${CI}" ]; then
|
||||
MODE="--check"
|
||||
else
|
||||
MODE="-i"
|
||||
fi
|
||||
|
||||
# Runs the formatter in parallel on the code base.
|
||||
# Return codes:
|
||||
# - 1 there are files to be formatted
|
||||
# - 0 everything looks fine
|
||||
|
||||
# Get CPU count
|
||||
OS=$(uname)
|
||||
NPROC=1
|
||||
if [[ ${OS} = "Linux" ]] ; then
|
||||
NPROC=$(nproc)
|
||||
elif [[ ${OS} = "Darwin" ]] ; then
|
||||
NPROC=$(sysctl -n hw.physicalcpu)
|
||||
fi
|
||||
|
||||
# Discover clang-format
|
||||
if ! type cmake-format 2> /dev/null ; then
|
||||
echo "Required cmake-format not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
find . -type d \( \
|
||||
-path ./\*build -o \
|
||||
-path ./release -o \
|
||||
-path ./deps \
|
||||
\) -prune -false -type f -o \
|
||||
-name 'CMakeLists.txt' -or \
|
||||
-name '*.cmake' \
|
||||
| xargs -L10 -P ${NPROC} cmake-format ${MODE} ${VERBOSITY}
|
56
.github/scripts/check-format.sh
vendored
56
.github/scripts/check-format.sh
vendored
@ -1,56 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Original source https://github.com/Project-OSRM/osrm-backend/blob/master/scripts/format.sh
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
set -o nounset
|
||||
|
||||
if [ ${#} -eq 1 ]; then
|
||||
VERBOSITY="--verbose"
|
||||
else
|
||||
VERBOSITY=""
|
||||
fi
|
||||
|
||||
# Runs the Clang Formatter in parallel on the code base.
|
||||
# Return codes:
|
||||
# - 1 there are files to be formatted
|
||||
# - 0 everything looks fine
|
||||
|
||||
# Get CPU count
|
||||
OS=$(uname)
|
||||
NPROC=1
|
||||
if [[ ${OS} = "Linux" ]] ; then
|
||||
NPROC=$(nproc)
|
||||
elif [[ ${OS} = "Darwin" ]] ; then
|
||||
NPROC=$(sysctl -n hw.physicalcpu)
|
||||
fi
|
||||
|
||||
# Discover clang-format
|
||||
if type clang-format-13 2> /dev/null ; then
|
||||
CLANG_FORMAT=clang-format-13
|
||||
elif type clang-format 2> /dev/null ; then
|
||||
# Clang format found, but need to check version
|
||||
CLANG_FORMAT=clang-format
|
||||
V=$(clang-format --version)
|
||||
if [[ $V != *"version 13.0"* ]]; then
|
||||
echo "clang-format is not 13.0 (returned ${V})"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "No appropriate clang-format found (expected clang-format-13.0.0, or clang-format)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
find . -type d \( \
|
||||
-path ./\*build -o \
|
||||
-path ./release -o \
|
||||
-path ./cmake -o \
|
||||
-path ./deps \
|
||||
\) -prune -false -type f -o \
|
||||
-name '*.h' -or \
|
||||
-name '*.hpp' -or \
|
||||
-name '*.m' -or \
|
||||
-name '*.mm' -or \
|
||||
-name '*.c' -or \
|
||||
-name '*.cpp' \
|
||||
| xargs -L100 -P ${NPROC} "${CLANG_FORMAT}" ${VERBOSITY} -i -style=file -fallback-style=none
|
13
.github/scripts/package-linux.sh
vendored
13
.github/scripts/package-linux.sh
vendored
@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if ! type zsh > /dev/null 2>&1; then
|
||||
echo ' => Installing script dependency Zsh.'
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install zsh
|
||||
fi
|
||||
|
||||
SCRIPT=$(readlink -f "${0}")
|
||||
SCRIPT_DIR=$(dirname "${SCRIPT}")
|
||||
|
||||
zsh ${SCRIPT_DIR}/package-linux.zsh "${@}"
|
1
.github/scripts/package-linux.zsh
vendored
1
.github/scripts/package-linux.zsh
vendored
@ -1 +0,0 @@
|
||||
.package.zsh
|
1
.github/scripts/package-macos.zsh
vendored
1
.github/scripts/package-macos.zsh
vendored
@ -1 +0,0 @@
|
||||
.package.zsh
|
25
.github/scripts/utils.pwsh/Check-Git.ps1
vendored
25
.github/scripts/utils.pwsh/Check-Git.ps1
vendored
@ -1,25 +0,0 @@
|
||||
function Check-Git {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Ensures available git executable on host system.
|
||||
.DESCRIPTION
|
||||
Checks whether a git command is available on the host system. If none is found,
|
||||
Git is installed via winget.
|
||||
.EXAMPLE
|
||||
Check-Git
|
||||
#>
|
||||
|
||||
if ( ! ( Test-Path function:Log-Info ) ) {
|
||||
. $PSScriptRoot/Logger.ps1
|
||||
}
|
||||
|
||||
Log-Information 'Checking for Git executable...'
|
||||
|
||||
if ( ! ( Get-Command git ) ) {
|
||||
Log-Warning 'No Git executable found. Will try to install via winget.'
|
||||
winget install git
|
||||
} else {
|
||||
Log-Debug "Git found at $(Get-Command git)."
|
||||
Log-Status "Git found."
|
||||
}
|
||||
}
|
29
.github/scripts/utils.pwsh/Ensure-Location.ps1
vendored
29
.github/scripts/utils.pwsh/Ensure-Location.ps1
vendored
@ -1,29 +0,0 @@
|
||||
function Ensure-Location {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Ensures current location to be set to specified directory.
|
||||
.DESCRIPTION
|
||||
If specified directory exists, switch to it. Otherwise create it,
|
||||
then switch.
|
||||
.EXAMPLE
|
||||
Ensure-Location "My-Directory"
|
||||
Ensure-Location -Path "Path-To-My-Directory"
|
||||
#>
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory)]
|
||||
[string] $Path
|
||||
)
|
||||
|
||||
if ( ! ( Test-Path $Path ) ) {
|
||||
$_Params = @{
|
||||
ItemType = "Directory"
|
||||
Path = ${Path}
|
||||
ErrorAction = "SilentlyContinue"
|
||||
}
|
||||
|
||||
New-Item @_Params | Set-Location
|
||||
} else {
|
||||
Set-Location -Path ${Path}
|
||||
}
|
||||
}
|
70
.github/scripts/utils.pwsh/Expand-ArchiveExt.ps1
vendored
70
.github/scripts/utils.pwsh/Expand-ArchiveExt.ps1
vendored
@ -1,70 +0,0 @@
|
||||
function Expand-ArchiveExt {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Expands archive files.
|
||||
.DESCRIPTION
|
||||
Allows extraction of zip, 7z, gz, and xz archives.
|
||||
Requires tar and 7-zip to be available on the system.
|
||||
Archives ending with .zip but created using LZMA compression are
|
||||
expanded using 7-zip as a fallback.
|
||||
.EXAMPLE
|
||||
Expand-ArchiveExt -Path <Path-To-Your-Archive>
|
||||
Expand-ArchiveExt -Path <Path-To-Your-Archive> -DestinationPath <Expansion-Path>
|
||||
#>
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory)]
|
||||
[string] $Path,
|
||||
[string] $DestinationPath = [System.IO.Path]::GetFileNameWithoutExtension($Path),
|
||||
[switch] $Force
|
||||
)
|
||||
|
||||
switch ( [System.IO.Path]::GetExtension($Path) ) {
|
||||
.zip {
|
||||
try {
|
||||
Expand-Archive -Path $Path -DestinationPath $DestinationPath -Force:$Force
|
||||
} catch {
|
||||
if ( Get-Command 7z ) {
|
||||
Invoke-External 7z x -y $Path "-o${DestinationPath}"
|
||||
} else {
|
||||
throw "Fallback utility 7-zip not found. Please install 7-zip first."
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
{ ( $_ -eq ".7z" ) -or ( $_ -eq ".exe" ) } {
|
||||
if ( Get-Command 7z ) {
|
||||
Invoke-External 7z x -y $Path "-o${DestinationPath}"
|
||||
} else {
|
||||
throw "Extraction utility 7-zip not found. Please install 7-zip first."
|
||||
}
|
||||
break
|
||||
}
|
||||
.gz {
|
||||
try {
|
||||
Invoke-External tar -x -o $DestinationPath -f $Path
|
||||
} catch {
|
||||
if ( Get-Command 7z ) {
|
||||
Invoke-External 7z x -y $Path "-o${DestinationPath}"
|
||||
} else {
|
||||
throw "Fallback utility 7-zip not found. Please install 7-zip first."
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
.xz {
|
||||
try {
|
||||
Invoke-External tar -x -o $DestinationPath -f $Path
|
||||
} catch {
|
||||
if ( Get-Command 7z ) {
|
||||
Invoke-External 7z x -y $Path "-o${DestinationPath}"
|
||||
} else {
|
||||
throw "Fallback utility 7-zip not found. Please install 7-zip first."
|
||||
}
|
||||
}
|
||||
}
|
||||
default {
|
||||
throw "Unsupported archive extension provided."
|
||||
}
|
||||
}
|
||||
}
|
@ -1,60 +0,0 @@
|
||||
function Install-BuildDependencies {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Installs required build dependencies.
|
||||
.DESCRIPTION
|
||||
Additional packages might be needed for successful builds. This module contains additional
|
||||
dependencies available for installation via winget and, if possible, adds their locations
|
||||
to the environment path for future invocation.
|
||||
.EXAMPLE
|
||||
Install-BuildDependencies
|
||||
#>
|
||||
|
||||
param(
|
||||
[string] $WingetFile = "$PSScriptRoot/.Wingetfile"
|
||||
)
|
||||
|
||||
if ( ! ( Test-Path function:Log-Warning ) ) {
|
||||
. $PSScriptRoot/Logger.ps1
|
||||
}
|
||||
|
||||
$Host64Bit = [System.Environment]::Is64BitOperatingSystem
|
||||
|
||||
$Paths = $Env:Path -split [System.IO.Path]::PathSeparator
|
||||
|
||||
$WingetOptions = @('install', '--accept-package-agreements', '--accept-source-agreements')
|
||||
|
||||
if ( $script:Quiet ) {
|
||||
$WingetOptions += '--silent'
|
||||
}
|
||||
|
||||
Get-Content $WingetFile | ForEach-Object {
|
||||
$_, $Package, $_, $Path, $_, $Binary = ([regex]::Split($_, " (?=(?:[^']|'[^']*')*$)")) -replace ',', '' -replace "'",''
|
||||
|
||||
(${Env:ProgramFiles(x86)}, $Env:ProgramFiles) | ForEach-Object {
|
||||
$Prefix = $_
|
||||
$FullPath = "${Prefix}\${Path}"
|
||||
if ( ( Test-Path $FullPath ) -and ! ( $Paths -contains $FullPath ) ) {
|
||||
$Paths += $FullPath
|
||||
$Env:Path = $Paths -join [System.IO.Path]::PathSeparator
|
||||
}
|
||||
}
|
||||
|
||||
Log-Debug "Checking for command ${Binary}"
|
||||
$Found = Get-Command -ErrorAction SilentlyContinue $Binary
|
||||
|
||||
if ( $Found ) {
|
||||
Log-Status "Found dependency ${Binary} as $($Found.Source)"
|
||||
} else {
|
||||
Log-Status "Installing package ${Package}"
|
||||
|
||||
try {
|
||||
$Params = $WingetOptions + $Package
|
||||
|
||||
winget @Params
|
||||
} catch {
|
||||
throw "Error while installing winget package ${Package}: $_"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
40
.github/scripts/utils.pwsh/Invoke-External.ps1
vendored
40
.github/scripts/utils.pwsh/Invoke-External.ps1
vendored
@ -1,40 +0,0 @@
|
||||
function Invoke-External {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Invokes a non-PowerShell command.
|
||||
.DESCRIPTION
|
||||
Runs a non-PowerShell command, and captures its return code.
|
||||
Throws an exception if the command returns non-zero.
|
||||
.EXAMPLE
|
||||
Invoke-External 7z x $MyArchive
|
||||
#>
|
||||
|
||||
if ( $args.Count -eq 0 ) {
|
||||
throw 'Invoke-External called without arguments.'
|
||||
}
|
||||
|
||||
if ( ! ( Test-Path function:Log-Information ) ) {
|
||||
. $PSScriptRoot/Logger.ps1
|
||||
}
|
||||
|
||||
$Command = $args[0]
|
||||
$CommandArgs = @()
|
||||
|
||||
if ( $args.Count -gt 1) {
|
||||
$CommandArgs = $args[1..($args.Count - 1)]
|
||||
}
|
||||
|
||||
$_EAP = $ErrorActionPreference
|
||||
$ErrorActionPreference = "Continue"
|
||||
|
||||
Log-Debug "Invoke-External: ${Command} ${CommandArgs}"
|
||||
|
||||
& $command $commandArgs
|
||||
$Result = $LASTEXITCODE
|
||||
|
||||
$ErrorActionPreference = $_EAP
|
||||
|
||||
if ( $Result -ne 0 ) {
|
||||
throw "${Command} ${CommandArgs} exited with non-zero code ${Result}."
|
||||
}
|
||||
}
|
117
.github/scripts/utils.pwsh/Invoke-GitCheckout.ps1
vendored
117
.github/scripts/utils.pwsh/Invoke-GitCheckout.ps1
vendored
@ -1,117 +0,0 @@
|
||||
function Set-GitConfig {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Sets a git config value.
|
||||
.DESCRIPTION
|
||||
Allows setting single or multiple config values in a PowerShell-friendly fashion.
|
||||
.EXAMPLE
|
||||
Set-GitConfig advice.detachedHead false
|
||||
#>
|
||||
|
||||
if ( $args.Count -lt 2 ) {
|
||||
throw 'Set-GitConfig called without required arguments <OPTION> <VALUE>.'
|
||||
}
|
||||
|
||||
Invoke-External git config @args
|
||||
}
|
||||
|
||||
function Invoke-GitCheckout {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Checks out a specified git repository.
|
||||
.DESCRIPTION
|
||||
Wraps the git executable with PowerShell syntax to check out
|
||||
a specified Git repository with a given commit hash and branch,
|
||||
or a GitHub pull request ID.
|
||||
.EXAMPLE
|
||||
Invoke-GitCheckout -Uri "My-Repo-Uri" -Commit "My-Commit-Hash"
|
||||
Invoke-GitCheckout -Uri "My-Repo-Uri" -Commit "My-Commit-Hash" -Branch "main"
|
||||
Invoke-GitCheckout -Uri "My-Repo-Uri" -Commit "My-Commit-Hash" -PullRequest 250
|
||||
#>
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory)]
|
||||
[string] $Uri,
|
||||
[Parameter(Mandatory)]
|
||||
[string] $Commit,
|
||||
[string] $Path,
|
||||
[string] $Branch = "master",
|
||||
[string] $PullRequest
|
||||
)
|
||||
|
||||
if ( ! ( $Uri -like "*github.com*" ) -and ( $PullRequest -ne "" ) ) {
|
||||
throw 'Fetching pull requests is only supported with GitHub-based repositories.'
|
||||
}
|
||||
|
||||
if ( ! ( Test-Path function:Log-Information ) ) {
|
||||
. $PSScriptRoot/Logger.ps1
|
||||
}
|
||||
|
||||
if ( ! ( Test-Path function:Invoke-External ) ) {
|
||||
. $PSScriptRoot/Invoke-External.ps1
|
||||
}
|
||||
|
||||
$RepositoryName = [System.IO.Path]::GetFileNameWithoutExtension($Uri)
|
||||
|
||||
if ( $Path -eq "" ) {
|
||||
$Path = "$(Get-Location | Convert-Path)\${RepositoryName}"
|
||||
}
|
||||
|
||||
Push-Location -Stack GitCheckoutTemp
|
||||
|
||||
if ( Test-Path $Path/.git ) {
|
||||
Write-Information "Repository ${RepositoryName} found in ${Path}"
|
||||
|
||||
Set-Location $Path
|
||||
|
||||
Set-GitConfig advice.detachedHead false
|
||||
Set-GitConfig remote.origin.url $Uri
|
||||
Set-GitConfig remote.origin.tapOpt --no-tags
|
||||
|
||||
$Ref = "+refs/heads/{0}:refs/remotes/origin/{0}" -f $Branch
|
||||
|
||||
Set-GitConfig --replace-all remote.origin.fetch $Ref
|
||||
|
||||
if ( $PullRequest -ne "" ) {
|
||||
try {
|
||||
Invoke-External git show-ref --quiet --verify refs/heads/pr-$PullRequest
|
||||
} catch {
|
||||
Invoke-External git fetch origin $("pull/{0}/head:pull-{0}" -f $PullRequest)
|
||||
} finally {
|
||||
Invoke-External git checkout -f "pull-${PullRequest}"
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
$null = Invoke-External git rev-parse -q --verify "${Commit}^{commit}"
|
||||
} catch {
|
||||
Invoke-External git fetch origin
|
||||
}
|
||||
|
||||
Invoke-External git checkout -f $Commit -- | Log-Information
|
||||
} else {
|
||||
Invoke-External git clone $Uri $Path
|
||||
|
||||
Set-Location $Path
|
||||
|
||||
Set-GitConfig advice.detachedHead false
|
||||
|
||||
if ( $PullRequest -ne "" ) {
|
||||
$Ref = "pull/{0}/head:pull-{0}" -f $PullRequest
|
||||
$Branch = "pull-${PullRequest}"
|
||||
Invoke-External git fetch origin $Ref
|
||||
Invoke-External git checkout $Branch
|
||||
}
|
||||
|
||||
Invoke-External git checkout -f $Commit
|
||||
}
|
||||
|
||||
Log-Information "Checked out commit ${Commit} on branch ${Branch}"
|
||||
|
||||
if ( Test-Path ${Path}/.gitmodules ) {
|
||||
Invoke-External git submodule foreach --recursive git submodule sync
|
||||
Invoke-External git submodule update --init --recursive
|
||||
}
|
||||
|
||||
Pop-Location -Stack GitCheckoutTemp
|
||||
}
|
123
.github/scripts/utils.pwsh/Logger.ps1
vendored
123
.github/scripts/utils.pwsh/Logger.ps1
vendored
@ -1,123 +0,0 @@
|
||||
function Log-Debug {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory,ValueFromPipeline)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string[]] $Message
|
||||
)
|
||||
|
||||
Process {
|
||||
foreach($m in $Message) {
|
||||
Write-Debug $m
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Log-Verbose {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory,ValueFromPipeline)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string[]] $Message
|
||||
)
|
||||
|
||||
Process {
|
||||
foreach($m in $Message) {
|
||||
Write-Verbose $m
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Log-Warning {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory,ValueFromPipeline)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string[]] $Message
|
||||
)
|
||||
|
||||
Process {
|
||||
foreach($m in $Message) {
|
||||
Write-Warning $m
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Log-Error {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory,ValueFromPipeline)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string[]] $Message
|
||||
)
|
||||
|
||||
Process {
|
||||
foreach($m in $Message) {
|
||||
Write-Error $m
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Log-Information {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory,ValueFromPipeline)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string[]] $Message
|
||||
)
|
||||
|
||||
Process {
|
||||
if ( ! ( $script:Quiet ) ) {
|
||||
$StageName = $( if ( $script:StageName -ne $null ) { $script:StageName } else { '' })
|
||||
$Icon = ' =>'
|
||||
|
||||
foreach($m in $Message) {
|
||||
Write-Host -NoNewLine -ForegroundColor Blue " ${StageName} $($Icon.PadRight(5)) "
|
||||
Write-Host "${m}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Log-Status {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory,ValueFromPipeline)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string[]] $Message
|
||||
)
|
||||
|
||||
Process {
|
||||
if ( ! ( $script:Quiet ) ) {
|
||||
$StageName = $( if ( $StageName -ne $null ) { $StageName } else { '' })
|
||||
$Icon = ' >'
|
||||
|
||||
foreach($m in $Message) {
|
||||
Write-Host -NoNewLine -ForegroundColor Green " ${StageName} $($Icon.PadRight(5)) "
|
||||
Write-Host "${m}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Log-Output {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory,ValueFromPipeline)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string[]] $Message
|
||||
)
|
||||
|
||||
Process {
|
||||
if ( ! ( $script:Quiet ) ) {
|
||||
$StageName = $( if ( $script:StageName -ne $null ) { $script:StageName } else { '' })
|
||||
$Icon = ''
|
||||
|
||||
foreach($m in $Message) {
|
||||
Write-Output " ${StageName} $($Icon.PadRight(5)) ${m}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$Columns = (Get-Host).UI.RawUI.WindowSize.Width - 5
|
103
.github/scripts/utils.pwsh/Setup-Host.ps1
vendored
103
.github/scripts/utils.pwsh/Setup-Host.ps1
vendored
@ -1,103 +0,0 @@
|
||||
function Setup-Host {
|
||||
if ( ! ( Test-Path function:Log-Output ) ) {
|
||||
. $PSScriptRoot/Logger.ps1
|
||||
}
|
||||
|
||||
if ( ! ( Test-Path function:Ensure-Location ) ) {
|
||||
. $PSScriptRoot/Ensure-Location.ps1
|
||||
}
|
||||
|
||||
if ( ! ( Test-Path function:Install-BuildDependencies ) ) {
|
||||
. $PSScriptRoot/Install-BuildDependencies.ps1
|
||||
}
|
||||
|
||||
if ( ! ( Test-Path function:Expand-ArchiveExt ) ) {
|
||||
. $PSScriptRoot/Expand-ArchiveExt.ps1
|
||||
}
|
||||
|
||||
Install-BuildDependencies -WingetFile "${ScriptHome}/.Wingetfile"
|
||||
|
||||
if ( $script:Target -eq '' ) { $script:Target = $script:HostArchitecture }
|
||||
|
||||
$script:QtVersion = $BuildSpec.platformConfig."windows-${script:Target}".qtVersion
|
||||
$script:VisualStudioVersion = $BuildSpec.platformConfig."windows-${script:Target}".visualStudio
|
||||
$script:PlatformSDK = $BuildSpec.platformConfig."windows-${script:Target}".platformSDK
|
||||
|
||||
if ( ! ( ( $script:SkipAll ) -or ( $script:SkipDeps ) ) ) {
|
||||
('prebuilt', "qt${script:QtVersion}") | ForEach-Object {
|
||||
$_Dependency = $_
|
||||
$_Version = $BuildSpec.dependencies."${_Dependency}".version
|
||||
$_BaseUrl = $BuildSpec.dependencies."${_Dependency}".baseUrl
|
||||
$_Label = $BuildSpec.dependencies."${_Dependency}".label
|
||||
$_Hash = $BuildSpec.dependencies."${_Dependency}".hashes."windows-${script:Target}"
|
||||
|
||||
if ( $BuildSpec.dependencies."${_Dependency}".PSobject.Properties.Name -contains "pdb-hashes" ) {
|
||||
$_PdbHash = $BuildSpec.dependencies."${_Dependency}".'pdb-hashes'."$windows-${script:Target}"
|
||||
}
|
||||
|
||||
if ( $_Version -eq '' ) {
|
||||
throw "No ${_Dependency} spec found in ${script:BuildSpecFile}."
|
||||
}
|
||||
|
||||
Log-Information "Setting up ${_Label}..."
|
||||
|
||||
Push-Location -Stack BuildTemp
|
||||
Ensure-Location -Path "$(Resolve-Path -Path "${ProjectRoot}/..")/obs-build-dependencies"
|
||||
|
||||
switch -wildcard ( $_Dependency ) {
|
||||
prebuilt {
|
||||
$_Filename = "windows-deps-${_Version}-${script:Target}.zip"
|
||||
$_Uri = "${_BaseUrl}/${_Version}/${_Filename}"
|
||||
$_Target = "plugin-deps-${_Version}-qt${script:QtVersion}-${script:Target}"
|
||||
$script:DepsVersion = ${_Version}
|
||||
}
|
||||
"qt*" {
|
||||
$_Filename = "windows-deps-qt${script:QtVersion}-${_Version}-${script:Target}.zip"
|
||||
$_Uri = "${_BaseUrl}/${_Version}/${_Filename}"
|
||||
$_Target = "plugin-deps-${_Version}-qt${script:QtVersion}-${script:Target}"
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! ( Test-Path -Path $_Filename ) ) {
|
||||
$Params = @{
|
||||
UserAgent = 'NativeHost'
|
||||
Uri = $_Uri
|
||||
OutFile = $_Filename
|
||||
UseBasicParsing = $true
|
||||
ErrorAction = 'Stop'
|
||||
}
|
||||
|
||||
Invoke-WebRequest @Params
|
||||
Log-Status "Downloaded ${_Label} for ${script:Target}."
|
||||
} else {
|
||||
Log-Status "Found downloaded ${_Label}."
|
||||
}
|
||||
|
||||
$_FileHash = Get-FileHash -Path $_Filename -Algorithm SHA256
|
||||
|
||||
if ( $_FileHash.Hash.ToLower() -ne $_Hash ) {
|
||||
throw "Checksum of downloaded ${_Label} does not match specification. Expected '${_Hash}', 'found $(${_FileHash}.Hash.ToLower())'"
|
||||
}
|
||||
Log-Status "Checksum of downloaded ${_Label} matches."
|
||||
|
||||
if ( ! ( ( $script:SkipAll ) -or ( $script:SkipUnpack ) ) ) {
|
||||
Push-Location -Stack BuildTemp
|
||||
Ensure-Location -Path $_Target
|
||||
|
||||
Expand-ArchiveExt -Path "../${_Filename}" -DestinationPath . -Force
|
||||
|
||||
Pop-Location -Stack BuildTemp
|
||||
}
|
||||
Pop-Location -Stack BuildTemp
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Get-HostArchitecture {
|
||||
$Host64Bit = [System.Environment]::Is64BitOperatingSystem
|
||||
$HostArchitecture = ('x86', 'x64')[$Host64Bit]
|
||||
|
||||
return $HostArchitecture
|
||||
}
|
||||
|
||||
$script:HostArchitecture = Get-HostArchitecture
|
84
.github/scripts/utils.pwsh/Setup-Obs.ps1
vendored
84
.github/scripts/utils.pwsh/Setup-Obs.ps1
vendored
@ -1,84 +0,0 @@
|
||||
function Setup-Obs {
|
||||
if ( ! ( Test-Path function:Log-Output ) ) {
|
||||
. $PSScriptRoot/Logger.ps1
|
||||
}
|
||||
|
||||
if ( ! ( Test-Path function:Check-Git ) ) {
|
||||
. $PSScriptRoot/Check-Git.ps1
|
||||
}
|
||||
|
||||
Check-Git
|
||||
|
||||
if ( ! ( Test-Path function:Ensure-Location ) ) {
|
||||
. $PSScriptRoot/Ensure-Location.ps1
|
||||
}
|
||||
|
||||
if ( ! ( Test-Path function:Invoke-GitCheckout ) ) {
|
||||
. $PSScriptRoot/Invoke-GitCheckout.ps1
|
||||
}
|
||||
|
||||
if ( ! ( Test-Path function:Invoke-External ) ) {
|
||||
. $PSScriptRoot/Invoke-External.ps1
|
||||
}
|
||||
|
||||
Log-Information 'Setting up OBS Studio...'
|
||||
|
||||
$ObsVersion = $BuildSpec.dependencies.'obs-studio'.version
|
||||
$ObsRepository = $BuildSpec.dependencies.'obs-studio'.repository
|
||||
$ObsBranch = $BuildSpec.dependencies.'obs-studio'.branch
|
||||
$ObsHash = $BuildSpec.dependencies.'obs-studio'.hash
|
||||
|
||||
if ( $ObsVersion -eq '' ) {
|
||||
throw 'No obs-studio version found in buildspec.json.'
|
||||
}
|
||||
|
||||
Push-Location -Stack BuildTemp
|
||||
Ensure-Location -Path "$(Resolve-Path -Path "${ProjectRoot}/../")/obs-studio"
|
||||
|
||||
if ( ! ( ( $script:SkipAll ) -or ( $script:SkipUnpack ) ) ) {
|
||||
Invoke-GitCheckout -Uri $ObsRepository -Commit $ObsHash -Path . -Branch $ObsBranch
|
||||
}
|
||||
|
||||
if ( ! ( ( $script:SkipAll ) -or ( $script:SkipBuild ) ) ) {
|
||||
Log-Information 'Configuring OBS Studio...'
|
||||
|
||||
$NumProcessors = (Get-CimInstance Win32_ComputerSystem).NumberOfLogicalProcessors
|
||||
|
||||
if ( $NumProcessors -gt 1 ) {
|
||||
$env:UseMultiToolTask = $true
|
||||
$env:EnforceProcessCountAcrossBuilds = $true
|
||||
}
|
||||
|
||||
$DepsPath = "plugin-deps-${script:DepsVersion}-qt${script:QtVersion}-${script:Target}"
|
||||
|
||||
$CmakeArgs = @(
|
||||
'-G', $script:CmakeGenerator
|
||||
"-DCMAKE_SYSTEM_VERSION=${script:PlatformSDK}"
|
||||
"-DCMAKE_GENERATOR_PLATFORM=$(if (${script:Target} -eq "x86") { "Win32" } else { "x64" })"
|
||||
"-DCMAKE_BUILD_TYPE=${script:Configuration}"
|
||||
"-DQT_VERSION=${script:QtVersion}"
|
||||
'-DENABLE_PLUGINS=OFF'
|
||||
'-DENABLE_UI=OFF'
|
||||
'-DENABLE_SCRIPTING=OFF'
|
||||
"-DCMAKE_INSTALL_PREFIX:PATH=$(Resolve-Path -Path "${ProjectRoot}/../obs-build-dependencies/${DepsPath}")"
|
||||
"-DCMAKE_PREFIX_PATH:PATH=$(Resolve-Path -Path "${ProjectRoot}/../obs-build-dependencies/${DepsPath}")"
|
||||
)
|
||||
|
||||
Log-Debug "Attempting to configure OBS with CMake arguments: $($CmakeArgs | Out-String)"
|
||||
Log-Information "Configuring OBS..."
|
||||
Invoke-External cmake -S . -B plugin_build_${script:Target} @CmakeArgs
|
||||
|
||||
Log-Information 'Building libobs and obs-frontend-api...'
|
||||
$CmakeArgs = @(
|
||||
'--config', "$( if ( $script:Configuration -eq '' ) { 'RelWithDebInfo' } else { $script:Configuration })"
|
||||
)
|
||||
|
||||
if ( $VerbosePreference -eq 'Continue' ) {
|
||||
$CmakeArgs+=('--verbose')
|
||||
}
|
||||
|
||||
Invoke-External cmake --build plugin_build_${script:Target} @CmakeArgs -t obs-frontend-api
|
||||
Invoke-External cmake --install plugin_build_${script:Target} @CmakeArgs --component obs_libraries
|
||||
}
|
||||
Pop-Location -Stack BuildTemp
|
||||
}
|
36
.github/scripts/utils.zsh/check_linux
vendored
36
.github/scripts/utils.zsh/check_linux
vendored
@ -1,36 +0,0 @@
|
||||
autoload -Uz log_info log_status log_error log_debug log_warning
|
||||
|
||||
log_debug 'Checking for apt-get...'
|
||||
if (( ! ${+commands[apt-get]} )) {
|
||||
log_error 'No apt-get command found. Please install apt'
|
||||
return 2
|
||||
} else {
|
||||
log_debug "Apt-get located at ${commands[apt-get]}"
|
||||
}
|
||||
|
||||
local -a dependencies=("${(f)$(<${SCRIPT_HOME}/.Aptfile)}")
|
||||
local -a install_list
|
||||
local binary
|
||||
|
||||
for dependency (${dependencies}) {
|
||||
local -a tokens=(${(s: :)dependency//(,|:|\')/})
|
||||
|
||||
if [[ ! ${tokens[1]} == 'package' ]] continue
|
||||
|
||||
if [[ ${#tokens} -gt 2 && ${tokens[3]} == 'bin' ]] {
|
||||
binary=${tokens[4]}
|
||||
} else {
|
||||
binary=${tokens[2]}
|
||||
}
|
||||
|
||||
if (( ! ${+commands[${binary}]} )) install_list+=(${tokens[2]})
|
||||
}
|
||||
|
||||
local -a _quiet=('' '--quiet')
|
||||
|
||||
log_debug "List of dependencies to install: ${install_list}"
|
||||
if (( ${#install_list} )) {
|
||||
if (( ! ${+CI} )) log_warning 'Dependency installation via apt may require elevated privileges'
|
||||
|
||||
sudo apt-get -y install ${install_list} ${_quiet[(( (_loglevel == 0) + 1 ))]}
|
||||
}
|
20
.github/scripts/utils.zsh/check_macos
vendored
20
.github/scripts/utils.zsh/check_macos
vendored
@ -1,20 +0,0 @@
|
||||
autoload -Uz is-at-least log_info log_error log_status read_codesign
|
||||
|
||||
local macos_version=$(sw_vers -productVersion)
|
||||
|
||||
log_info 'Checking macOS version...'
|
||||
if ! is-at-least 11.0 "${macos_version}"; then
|
||||
log_error "Minimum required macOS version is 11.0, but running on macOS ${macos_version}"
|
||||
return 2
|
||||
else
|
||||
log_status "macOS ${macos_version} is recent"
|
||||
fi
|
||||
|
||||
log_info 'Checking for Homebrew...'
|
||||
if (( ! ${+commands[brew]} )) {
|
||||
log_error 'No Homebrew command found. Please install Homebrew (https://brew.sh)'
|
||||
return 2
|
||||
}
|
||||
|
||||
brew bundle --file "${SCRIPT_HOME}/.Brewfile"
|
||||
rehash
|
52
.github/scripts/utils.zsh/check_packages
vendored
52
.github/scripts/utils.zsh/check_packages
vendored
@ -1,52 +0,0 @@
|
||||
if (( ! ${+commands[packagesbuild]} )) {
|
||||
autoload -Uz log_info log_status mkcd
|
||||
|
||||
if (( ! ${+commands[curl]} )) {
|
||||
log_error 'curl not found. Please install curl.'
|
||||
return 2
|
||||
}
|
||||
|
||||
if (( ! ${+project_root} )) {
|
||||
log_error "'project_root' not set. Please set before running ${0}."
|
||||
return 2
|
||||
}
|
||||
|
||||
local -a curl_opts=()
|
||||
if (( ! ${+CI} )) {
|
||||
curl_opts+=(--progress-bar)
|
||||
} else {
|
||||
curl_opts+=(--show-error --silent)
|
||||
}
|
||||
curl_opts+=(--location -O ${@})
|
||||
|
||||
log_info 'Installing Packages.app...'
|
||||
|
||||
pushd
|
||||
mkcd ${project_root:h}/obs-build-dependencies
|
||||
|
||||
local packages_url='http://s.sudre.free.fr/Software/files/Packages.dmg'
|
||||
local packages_hash='6afdd25386295974dad8f078b8f1e41cabebd08e72d970bf92f707c7e48b16c9'
|
||||
|
||||
if [[ ! -f Packages.dmg ]] {
|
||||
log_status 'Download Packages.app'
|
||||
curl ${curl_opts} ${packages_url}
|
||||
}
|
||||
|
||||
local image_checksum
|
||||
read -r image_checksum _ <<< "$(sha256sum Packages.dmg)"
|
||||
|
||||
if [[ ${packages_hash} != ${image_checksum} ]] {
|
||||
log_error "Checksum mismatch of Packages.app download.
|
||||
Expected : ${packages_hash}
|
||||
Actual : ${image_checksum}"
|
||||
return 2
|
||||
}
|
||||
|
||||
hdiutil attach -noverify Packages.dmg &> /dev/null && log_status 'Packages.dmg image mounted.'
|
||||
|
||||
log_info 'Installing Packages.app...'
|
||||
packages_volume=$(hdiutil info -plist | grep '<string>/Volumes/Packages' | sed 's/.*<string>\(\/Volumes\/[^<]*\)<\/string>/\1/')
|
||||
|
||||
sudo installer -pkg "${packages_volume}/packages/Packages.pkg" -target / && rehash
|
||||
hdiutil detach ${packages_volume} &> /dev/null && log_status 'Packages.dmg image unmounted.'
|
||||
}
|
9
.github/scripts/utils.zsh/check_xcnotary
vendored
9
.github/scripts/utils.zsh/check_xcnotary
vendored
@ -1,9 +0,0 @@
|
||||
autoload -Uz log_info log_error
|
||||
|
||||
log_info 'Checking for Homebrew...'
|
||||
if (( ! ${+commands[brew]} )) {
|
||||
log_error 'No Homebrew command found. Please install Homebrew (https://brew.sh)'
|
||||
return 2
|
||||
}
|
||||
|
||||
if (( ! ${+commands[xcnotary]} )) brew install akeru-inc/tap/xcnotary
|
3
.github/scripts/utils.zsh/log_debug
vendored
3
.github/scripts/utils.zsh/log_debug
vendored
@ -1,3 +0,0 @@
|
||||
if (( ! ${+_loglevel} )) typeset -g _loglevel=1
|
||||
|
||||
if (( _loglevel > 2 )) print -PR -e -- "%F{220}DEBUG: ${@}%f"
|
3
.github/scripts/utils.zsh/log_error
vendored
3
.github/scripts/utils.zsh/log_error
vendored
@ -1,3 +0,0 @@
|
||||
local icon=' ✖︎ '
|
||||
|
||||
print -u2 -PR "%F{1} ${icon} %f ${@}"
|
7
.github/scripts/utils.zsh/log_info
vendored
7
.github/scripts/utils.zsh/log_info
vendored
@ -1,7 +0,0 @@
|
||||
if (( ! ${+_loglevel} )) typeset -g _loglevel=1
|
||||
|
||||
if (( _loglevel > 0 )) {
|
||||
local icon=' =>'
|
||||
|
||||
print -PR "%F{4} ${(r:5:)icon}%f %B${@}%b"
|
||||
}
|
7
.github/scripts/utils.zsh/log_output
vendored
7
.github/scripts/utils.zsh/log_output
vendored
@ -1,7 +0,0 @@
|
||||
if (( ! ${+_loglevel} )) typeset -g _loglevel=1
|
||||
|
||||
if (( _loglevel > 0 )) {
|
||||
local icon=''
|
||||
|
||||
print -PR " ${(r:5:)icon} ${@}"
|
||||
}
|
7
.github/scripts/utils.zsh/log_status
vendored
7
.github/scripts/utils.zsh/log_status
vendored
@ -1,7 +0,0 @@
|
||||
if (( ! ${+_loglevel} )) typeset -g _loglevel=1
|
||||
|
||||
if (( _loglevel > 0 )) {
|
||||
local icon=' >'
|
||||
|
||||
print -PR "%F{2} ${(r:5:)icon}%f ${@}"
|
||||
}
|
5
.github/scripts/utils.zsh/log_warning
vendored
5
.github/scripts/utils.zsh/log_warning
vendored
@ -1,5 +0,0 @@
|
||||
if (( _loglevel > 0 )) {
|
||||
local icon=' =>'
|
||||
|
||||
print -PR "%F{3} ${(r:5:)icon} ${@}%f"
|
||||
}
|
1
.github/scripts/utils.zsh/mkcd
vendored
1
.github/scripts/utils.zsh/mkcd
vendored
@ -1 +0,0 @@
|
||||
[[ -n ${1} ]] && mkdir -p ${1} && builtin cd ${1}
|
7
.github/scripts/utils.zsh/read_codesign
vendored
7
.github/scripts/utils.zsh/read_codesign
vendored
@ -1,7 +0,0 @@
|
||||
autoload -Uz log_info
|
||||
|
||||
if (( ! ${+CODESIGN_IDENT} )) {
|
||||
typeset -g CODESIGN_IDENT
|
||||
log_info 'Setting up identity for application codesigning...'
|
||||
read CODESIGN_IDENT'?Apple Developer Application ID: '
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
autoload -Uz log_info
|
||||
|
||||
if (( ! ${+CODESIGN_IDENT_INSTALLER} )) {
|
||||
typeset -g CODESIGN_IDENT_INSTALLER
|
||||
log_info 'Setting up identity for installer package codesigning...'
|
||||
read CODESIGN_IDENT_INSTALLER'?Apple Developer Installer ID: '
|
||||
}
|
33
.github/scripts/utils.zsh/read_codesign_pass
vendored
33
.github/scripts/utils.zsh/read_codesign_pass
vendored
@ -1,33 +0,0 @@
|
||||
##############################################################################
|
||||
# Apple Developer credentials necessary:
|
||||
#
|
||||
# + Signing for distribution and notarization require an active Apple
|
||||
# Developer membership
|
||||
# + An Apple Development identity is needed for code signing
|
||||
# (i.e. 'Apple Development: YOUR APPLE ID (PROVIDER)')
|
||||
# + Your Apple developer ID is needed for notarization
|
||||
# + An app-specific password is necessary for notarization from CLI
|
||||
# + This password will be stored in your macOS keychain under the identifier
|
||||
# 'OBS-Codesign-Password'with access Apple's 'altool' only.
|
||||
##############################################################################
|
||||
|
||||
autoload -Uz read_codesign read_codesign_user log_info
|
||||
|
||||
if (( ! ${+CODESIGN_IDENT} )) {
|
||||
read_codesign
|
||||
}
|
||||
|
||||
local codesign_ident_short=$(print "${CODESIGN_IDENT}" | /usr/bin/sed -En 's/.+\((.+)\)/\1/p')
|
||||
|
||||
if (( ! ${+CODESIGN_IDENT_USER} )) {
|
||||
read_codesign_user
|
||||
}
|
||||
|
||||
log_info 'Setting up password for notarization keychain...'
|
||||
if (( ! ${+CODESIGN_IDENT_PASS} )) {
|
||||
read -s CODESIGN_IDENT_PASS'?Apple Developer ID password: '
|
||||
}
|
||||
|
||||
print ''
|
||||
log_info 'Setting up notarization keychain...'
|
||||
xcrun notarytool store-credentials 'OBS-Codesign-Password' --apple-id "${CODESIGN_IDENT_USER}" --team-id "${codesign_ident_short}" --password "${CODESIGN_IDENT_PASS}"
|
7
.github/scripts/utils.zsh/read_codesign_user
vendored
7
.github/scripts/utils.zsh/read_codesign_user
vendored
@ -1,7 +0,0 @@
|
||||
autoload -Uz log_info
|
||||
|
||||
if (( ! ${+CODESIGN_IDENT_USER} )) {
|
||||
typeset -g CODESIGN_IDENT_USER
|
||||
log_info 'Setting up developer id for codesigning...'
|
||||
read CODESIGN_IDENT_USER'?Apple Developer ID: '
|
||||
}
|
17
.github/scripts/utils.zsh/set_loglevel
vendored
17
.github/scripts/utils.zsh/set_loglevel
vendored
@ -1,17 +0,0 @@
|
||||
autoload -Uz log_debug log_error
|
||||
|
||||
local -r _usage="Usage: %B${0}%b <loglevel>
|
||||
|
||||
Set log level, following levels are supported: 0 (quiet), 1 (normal), 2 (verbose), 3 (debug)"
|
||||
|
||||
if (( ! # )); then
|
||||
log_error 'Called without arguments.'
|
||||
log_output ${_usage}
|
||||
return 2
|
||||
elif (( ${1} >= 4 )); then
|
||||
log_error 'Called with loglevel > 3.'
|
||||
log_output ${_usage}
|
||||
fi
|
||||
|
||||
typeset -g -i -r _loglevel=${1}
|
||||
log_debug "Log level set to '${1}'"
|
14
.github/scripts/utils.zsh/setup_ccache
vendored
14
.github/scripts/utils.zsh/setup_ccache
vendored
@ -1,14 +0,0 @@
|
||||
autoload -Uz log_debug log_warning
|
||||
|
||||
if (( ${+commands[ccache]} )) {
|
||||
log_debug "Found ccache at ${commands[ccache]}"
|
||||
|
||||
if (( ${+CI} )) {
|
||||
ccache --set-config=cache_dir="${GITHUB_WORKSPACE:-${HOME}}/.ccache"
|
||||
ccache --set-config=max_size="${CCACHE_SIZE:-500M}"
|
||||
ccache --set-config=compression=true
|
||||
ccache -z > /dev/null
|
||||
}
|
||||
} else {
|
||||
log_warning "No ccache found on the system"
|
||||
}
|
62
.github/scripts/utils.zsh/setup_linux
vendored
62
.github/scripts/utils.zsh/setup_linux
vendored
@ -1,62 +0,0 @@
|
||||
autoload -Uz log_error log_status log_info mkcd
|
||||
|
||||
if (( ! ${+project_root} )) {
|
||||
log_error "'project_root' not set. Please set before running ${0}."
|
||||
return 2
|
||||
}
|
||||
|
||||
if (( ! ${+target} )) {
|
||||
log_error "'target' not set. Please set before running ${0}."
|
||||
return 2
|
||||
}
|
||||
|
||||
pushd ${project_root}
|
||||
|
||||
typeset -g QT_VERSION
|
||||
read -r QT_VERSION <<< \
|
||||
"$(jq -r --arg target "${target}" \
|
||||
'.platformConfig[$target] | { qtVersion } | join(" ")' \
|
||||
${project_root}/buildspec.json)"
|
||||
|
||||
if (( ! (${skips[(Ie)all]} + ${skips[(Ie)deps]}) )) {
|
||||
log_info 'Installing obs build dependencies...'
|
||||
|
||||
sudo apt-get install -y \
|
||||
build-essential \
|
||||
libcurl4-openssl-dev \
|
||||
libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev \
|
||||
libswresample-dev libswscale-dev \
|
||||
libjansson-dev \
|
||||
libx11-xcb-dev \
|
||||
libgles2-mesa-dev \
|
||||
libwayland-dev \
|
||||
libpulse-dev
|
||||
|
||||
local -a _qt_packages=()
|
||||
|
||||
if (( QT_VERSION == 5 )) {
|
||||
_qt_packages+=(
|
||||
qtbase5-dev
|
||||
libqt5svg5-dev
|
||||
qtbase5-private-dev
|
||||
libqt5x11extras5-dev
|
||||
)
|
||||
} elif (( QT_VERSION == 6 )) {
|
||||
_qt_packages+=(
|
||||
qt6-base-dev
|
||||
libqt6svg6-dev
|
||||
qt6-base-private-dev
|
||||
)
|
||||
} else {
|
||||
log_error "Unsupported Qt version '${QT_VERSION}' specified."
|
||||
return 2
|
||||
}
|
||||
|
||||
sudo apt-get install -y ${_qt_packages}
|
||||
}
|
||||
|
||||
local deps_version
|
||||
read -r deps_version <<< \
|
||||
"$(jq -r '.dependencies.prebuilt.version' ${buildspec_file})"
|
||||
|
||||
typeset -g OBS_DEPS_VERSION=${deps_version}
|
127
.github/scripts/utils.zsh/setup_macos
vendored
127
.github/scripts/utils.zsh/setup_macos
vendored
@ -1,127 +0,0 @@
|
||||
autoload -Uz log_error log_status log_info mkcd
|
||||
|
||||
if (( ! ${+commands[curl]} )) {
|
||||
log_error 'curl not found. Please install curl.'
|
||||
return 2
|
||||
}
|
||||
|
||||
if (( ! ${+commands[jq]} )) {
|
||||
log_error 'jq not found. Please install jq.'
|
||||
return 2
|
||||
}
|
||||
|
||||
if (( ! ${+project_root} )) {
|
||||
log_error "'project_root' not set. Please set before running ${0}."
|
||||
return 2
|
||||
}
|
||||
|
||||
if (( ! ${+target} )) {
|
||||
log_error "'target' not set. Please set before running ${0}."
|
||||
return 2
|
||||
}
|
||||
|
||||
local -a curl_opts=()
|
||||
if (( ! ${+CI} )) {
|
||||
curl_opts+=(--progress-bar)
|
||||
} else {
|
||||
curl_opts+=(--show-error --silent)
|
||||
}
|
||||
curl_opts+=(--location -O ${@})
|
||||
|
||||
pushd ${project_root}
|
||||
|
||||
local _qt_version
|
||||
local _deployment_target
|
||||
read -r _qt_version _deployment_target <<< \
|
||||
"$(jq -r --arg target "${target}" \
|
||||
'.platformConfig[$target] | { qtVersion, deploymentTarget } | join (" ")' \
|
||||
${buildspec_file})"
|
||||
|
||||
typeset -g QT_VERSION=${_qt_version}
|
||||
typeset -g DEPLOYMENT_TARGET=${_deployment_target}
|
||||
|
||||
if (( ! (${skips[(Ie)all]} + ${skips[(Ie)deps]}) )) {
|
||||
mkdir -p ${project_root:h}/obs-build-dependencies
|
||||
|
||||
local dependency
|
||||
local deps_version
|
||||
local deps_baseurl
|
||||
local deps_label
|
||||
local deps_hash
|
||||
local _filename
|
||||
local _url
|
||||
local _target
|
||||
local artifact_checksum
|
||||
|
||||
for dependency ('prebuilt' "qt${QT_VERSION}") {
|
||||
IFS=';' read -r deps_version deps_baseurl deps_label deps_hash <<< \
|
||||
"$(jq -r --arg dependency "${dependency}" --arg target "${target}" \
|
||||
'.dependencies[$dependency] | {version, baseUrl, "label", "hash": .hashes[$target]} | join(";")' \
|
||||
${buildspec_file})"
|
||||
|
||||
if [[ -z "${deps_version}" ]] {
|
||||
log_error "No ${dependency} spec found in ${buildspec_file}."
|
||||
return 2
|
||||
}
|
||||
log_info "Setting up ${deps_label}..."
|
||||
|
||||
pushd ${project_root:h}/obs-build-dependencies
|
||||
|
||||
case ${dependency} {
|
||||
prebuilt)
|
||||
_filename="macos-deps-${deps_version}-${target##*-}.tar.xz"
|
||||
_url="${deps_baseurl}/${deps_version}/${_filename}"
|
||||
_target="plugin-deps-${deps_version}-qt${QT_VERSION}-${target##*-}"
|
||||
typeset -g OBS_DEPS_VERSION=${deps_version}
|
||||
;;
|
||||
qt*)
|
||||
if (( ${+CI} )) {
|
||||
_filename="macos-deps-qt${QT_VERSION}-${deps_version}-universal.tar.xz"
|
||||
deps_hash="$(jq -r --arg dependency "${dependency}" \
|
||||
'.dependencies[$dependency].hashes["macos-universal"]' \
|
||||
${buildspec_file})"
|
||||
} else {
|
||||
_filename="macos-deps-qt${QT_VERSION}-${deps_version}-${target##*-}.tar.xz"
|
||||
}
|
||||
_url="${deps_baseurl}/${deps_version}/${_filename}"
|
||||
_target="plugin-deps-${deps_version}-qt${QT_VERSION}-${target##*-}"
|
||||
;;
|
||||
}
|
||||
|
||||
if [[ ! -f ${_filename} ]] {
|
||||
log_debug "Running curl ${curl_opts} ${_url}"
|
||||
curl ${curl_opts} ${_url} && \
|
||||
log_status "Downloaded ${deps_label} for ${target}."
|
||||
} else {
|
||||
log_status "Found downloaded ${deps_label}"
|
||||
}
|
||||
|
||||
read -r artifact_checksum _ <<< "$(sha256sum ${_filename})"
|
||||
if [[ ${deps_hash} != ${artifact_checksum} ]] {
|
||||
log_error "Checksum of downloaded ${deps_label} does not match specification.
|
||||
Expected : ${deps_hash}
|
||||
Actual : ${artifact_checksum}"
|
||||
return 2
|
||||
}
|
||||
log_status "Checksum of downloaded ${deps_label} matches."
|
||||
|
||||
if (( ! (${skips[(Ie)all]} + ${skips[(Ie)unpack]}) )) {
|
||||
mkdir -p ${_target} && pushd ${_target}
|
||||
|
||||
XZ_OPT=-T0 tar -xzf ../${_filename} && log_status "${deps_label} extracted."
|
||||
popd
|
||||
}
|
||||
}
|
||||
|
||||
popd
|
||||
pushd ${project_root:h}/obs-build-dependencies
|
||||
xattr -r -d com.apple.quarantine *
|
||||
log_status 'Removed quarantine flag from downloaded dependencies...'
|
||||
popd
|
||||
} else {
|
||||
local deps_version
|
||||
read -r deps_version <<< \
|
||||
"$(jq -r '.dependencies.prebuilt.version' ${buildspec_file})"
|
||||
|
||||
typeset -g OBS_DEPS_VERSION=${deps_version}
|
||||
}
|
122
.github/scripts/utils.zsh/setup_obs
vendored
122
.github/scripts/utils.zsh/setup_obs
vendored
@ -1,122 +0,0 @@
|
||||
autoload -Uz log_error log_info log_status
|
||||
|
||||
if (( ! ${+buildspec_file} )) {
|
||||
log_error "'buildspec_file' not set. Please set before running ${0}."
|
||||
return 2
|
||||
}
|
||||
|
||||
if (( ! ${+commands[git]} )) {
|
||||
log_error 'git not found. Please install git.'
|
||||
return 2
|
||||
}
|
||||
|
||||
if (( ! ${+commands[jq]} )) {
|
||||
log_error 'jq not found. Please install jq.'
|
||||
return 2
|
||||
}
|
||||
|
||||
if (( ! ${+project_root} )) {
|
||||
log_error "'project_root' not set. Please set before running ${0}."
|
||||
return 2
|
||||
}
|
||||
|
||||
if (( ! ${+target} )) {
|
||||
log_error "'target' not set. Please set before running ${0}."
|
||||
return 2
|
||||
}
|
||||
|
||||
log_info 'Setting up OBS-Studio...'
|
||||
|
||||
local obs_version
|
||||
local obs_repo
|
||||
local obs_branch
|
||||
local obs_hash
|
||||
|
||||
read -r obs_version obs_repo obs_branch obs_hash <<< \
|
||||
"$(jq -r --arg key "obs-studio" \
|
||||
'.dependencies[$key] | {version, repository, branch, hash} | join(" ")' \
|
||||
${buildspec_file})"
|
||||
|
||||
if [[ -z ${obs_version} ]] {
|
||||
log_error "No obs-studio version found in buildspec.json"
|
||||
return 2
|
||||
}
|
||||
|
||||
pushd
|
||||
mkcd ${project_root:h}/obs-studio
|
||||
|
||||
if (( ! (${skips[(Ie)all]} + ${skips[(Ie)unpack]}) )) {
|
||||
if [[ -d .git ]] {
|
||||
git config advice.detachedHead false
|
||||
git config remote.pluginbuild.url "${obs_repo:-https://github.com/obsproject/obs-studio.git}"
|
||||
git config remote.pluginbuild.fetch "+refs/heads/${obs_branch:-master}:refs/remotes/origin/${obs_branch:-master}"
|
||||
|
||||
git rev-parse -q --verify "${obs_hash}^{commit}" > /dev/null || git fetch pluginbuild
|
||||
git checkout ${obs_branch:-master} -B ${product_name}
|
||||
git reset --hard "${obs_hash}"
|
||||
log_status 'Found existing obs-studio repository.'
|
||||
} else {
|
||||
git clone "${obs_repo:-https://github.com/obsproject/obs-studio.git}" "${PWD}"
|
||||
git config advice.detachedHead false
|
||||
git checkout -f "${obs_hash}" --
|
||||
git checkout ${obs_branch:-master} -b ${product_name}
|
||||
log_status 'obs-studio checked out.'
|
||||
}
|
||||
|
||||
git submodule foreach --recursive git submodule sync
|
||||
git submodule update --init --recursive
|
||||
}
|
||||
|
||||
if (( ! (${skips[(Ie)all]} + ${skips[(Ie)build]}) )) {
|
||||
log_info 'Configuring obs-studio...'
|
||||
|
||||
local -a cmake_args=(
|
||||
-DCMAKE_BUILD_TYPE=${BUILD_CONFIG:-Release}
|
||||
-DQT_VERSION=${QT_VERSION}
|
||||
-DENABLE_PLUGINS=OFF
|
||||
-DENABLE_UI=OFF
|
||||
-DENABLE_SCRIPTING=OFF
|
||||
-DCMAKE_INSTALL_PREFIX="${project_root:h}/obs-build-dependencies/plugin-deps-${OBS_DEPS_VERSION}-qt${QT_VERSION}-${target##*-}"
|
||||
-DCMAKE_PREFIX_PATH="${project_root:h}/obs-build-dependencies/plugin-deps-${OBS_DEPS_VERSION}-qt${QT_VERSION}-${target##*-}"
|
||||
)
|
||||
|
||||
if (( _loglevel == 0 )) cmake_args+=(-Wno_deprecated -Wno-dev --log-level=ERROR)
|
||||
if (( _loglevel > 2 )) cmake_args+=(--debug-output)
|
||||
|
||||
local num_procs
|
||||
|
||||
case ${target} {
|
||||
macos-*)
|
||||
autoload -Uz read_codesign
|
||||
if (( ${+CODESIGN} )) {
|
||||
read_codesign
|
||||
}
|
||||
|
||||
cmake_args+=(
|
||||
-DCMAKE_OSX_ARCHITECTURES=${${target##*-}//universal/x86_64;arm64}
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=${DEPLOYMENT_TARGET:-10.15}
|
||||
-DOBS_CODESIGN_LINKER=ON
|
||||
-DOBS_BUNDLE_CODESIGN_IDENTITY="${CODESIGN_IDENT:--}"
|
||||
)
|
||||
num_procs=$(( $(sysctl -n hw.ncpu) + 1 ))
|
||||
;;
|
||||
linux-*)
|
||||
cmake_args+=(
|
||||
-DENABLE_PIPEWIRE=OFF
|
||||
)
|
||||
num_procs=$(( $(nproc) + 1 ))
|
||||
;;
|
||||
}
|
||||
|
||||
log_debug "Attempting to configure OBS with CMake arguments: ${cmake_args}"
|
||||
cmake -S . -B plugin_build_${target##*-} -G ${generator} ${cmake_args}
|
||||
|
||||
log_info 'Building libobs and obs-frontend-api...'
|
||||
local -a cmake_args=()
|
||||
if (( _loglevel > 1 )) cmake_args+=(--verbose)
|
||||
if [[ ${generator} == 'Unix Makefiles' ]] cmake_args+=(--parallel ${num_procs})
|
||||
cmake --build plugin_build_${target##*-} --config ${BUILD_CONFIG:-Release} ${cmake_args} -t obs-frontend-api
|
||||
cmake --install plugin_build_${target##*-} --config ${BUILD_CONFIG:-Release} --component obs_libraries ${cmake_args}
|
||||
}
|
||||
|
||||
popd
|
386
.github/workflows/main.yml
vendored
386
.github/workflows/main.yml
vendored
@ -1,386 +0,0 @@
|
||||
name: Plugin Build
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
branches:
|
||||
- 4.x-compat-new-cmake
|
||||
tags:
|
||||
- '*'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
branches:
|
||||
- 4.x-compat-new-cmake
|
||||
|
||||
env:
|
||||
PLUGIN_NAME: 'obs-websocket-compat'
|
||||
|
||||
jobs:
|
||||
clang_check:
|
||||
name: 01 - Code Format Check
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install clang-format
|
||||
run: sudo apt-get install -y clang-format-13
|
||||
|
||||
- name: Run clang-format
|
||||
run: ./.github/scripts/check-format.sh && ./.github/scripts/check-changes.sh
|
||||
|
||||
- name: Install cmake-format
|
||||
run: sudo pip install cmakelang
|
||||
|
||||
- name: Run cmake-format
|
||||
run: ./.github/scripts/check-cmake.sh
|
||||
|
||||
macos_build:
|
||||
name: 02 - macOS
|
||||
runs-on: macos-12
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
arch: [x86_64, arm64, universal]
|
||||
if: always()
|
||||
needs: [clang_check]
|
||||
outputs:
|
||||
commitHash: ${{ steps.setup.outputs.commitHash }}
|
||||
env:
|
||||
CODESIGN_IDENT: '-'
|
||||
CODESIGN_IDENT_INSTALLER: ''
|
||||
MACOSX_DEPLOYMENT_TARGET: '10.15'
|
||||
defaults:
|
||||
run:
|
||||
shell: zsh {0}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: plugin
|
||||
submodules: recursive
|
||||
|
||||
- name: Checkout obs-studio
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: 'obsproject/obs-studio'
|
||||
path: obs-studio
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup Environment
|
||||
id: setup
|
||||
working-directory: ${{ github.workspace }}/plugin
|
||||
run: |
|
||||
## SETUP ENVIRONMENT SCRIPT
|
||||
print '::group::Clean Homebrew Environment'
|
||||
typeset -a to_remove=()
|
||||
|
||||
for formula (speexdsp curl php) {
|
||||
if [[ -d ${HOMEBREW_PREFIX}/opt/${formula} ]] to_remove+=(${formula})
|
||||
}
|
||||
|
||||
if (( #to_remove > 0 )) brew uninstall --ignore-dependencies ${to_remove}
|
||||
print '::endgroup::'
|
||||
|
||||
print '::group::Set up code signing'
|
||||
if [[ '${{ secrets.MACOS_SIGNING_APPLICATION_IDENTITY }}' != '' && \
|
||||
'${{ secrets.MACOS_INSTALLER_IDENTITY }}' != '' && \
|
||||
'${{ secrets.MACOS_SIGNING_CERT }}' != '' ]] {
|
||||
print '::set-output name=haveCodesignIdent::true'
|
||||
} else {
|
||||
print '::set-output name=haveCodesignIdent::false'
|
||||
}
|
||||
|
||||
if [[ '${{ secrets.MACOS_NOTARIZATION_USERNAME }}' != '' && \
|
||||
'${{ secrets.MACOS_NOTARIZATION_PASSWORD }}' != '' ]] {
|
||||
print '::set-output name=haveNotarizationUser::true'
|
||||
} else {
|
||||
print '::set-output name=haveNotarizationUser::false'
|
||||
}
|
||||
print '::endgroup::'
|
||||
|
||||
print "::set-output name=ccacheDate::$(date +"%Y-%m-%d")"
|
||||
print "::set-output name=commitHash::${"$(git rev-parse HEAD)"[0,9]}"
|
||||
|
||||
- name: Restore Compilation Cache
|
||||
id: ccache-cache
|
||||
uses: actions/cache@v2.1.7
|
||||
with:
|
||||
path: ${{ github.workspace }}/.ccache
|
||||
key: macos-${{ matrix.arch }}-ccache-plugin-${{ steps.setup.outputs.ccacheDate }}
|
||||
restore-keys: |
|
||||
macos-${{ matrix.arch }}-ccache-plugin-
|
||||
|
||||
- name: Check for GitHub Labels
|
||||
id: seekingTesters
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
run: |
|
||||
if [[ -n "$(curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -s "${{ github.event.pull_request.url }}" | jq -e '.labels[] | select(.name == "Seeking Testers")')" ]] {
|
||||
print '::set-output name=found::true'
|
||||
} else {
|
||||
print '::set-output name=found::false'
|
||||
}
|
||||
|
||||
- name: Install Apple Developer Certificate
|
||||
if: ${{ github.event_name != 'pull_request' && steps.setup.outputs.haveCodesignIdent == 'true' }}
|
||||
uses: apple-actions/import-codesign-certs@253ddeeac23f2bdad1646faac5c8c2832e800071
|
||||
with:
|
||||
keychain-password: ${{ github.run_id }}
|
||||
p12-file-base64: ${{ secrets.MACOS_SIGNING_CERT }}
|
||||
p12-password: ${{ secrets.MACOS_SIGNING_CERT_PASSWORD }}
|
||||
|
||||
- name: Set Signing Identity
|
||||
if: ${{ github.event_name != 'pull_request' && steps.setup.outputs.haveCodesignIdent == 'true' }}
|
||||
run: |
|
||||
print "CODESIGN_IDENT=${{ secrets.MACOS_SIGNING_APPLICATION_IDENTITY }}" >> $GITHUB_ENV
|
||||
print "CODESIGN_IDENT_INSTALLER=${{ secrets.MACOS_INSTALLER_IDENTITY }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Build Plugin
|
||||
uses: ./plugin/.github/actions/build-plugin
|
||||
with:
|
||||
workingDirectory: ${{ github.workspace }}/plugin
|
||||
target: ${{ matrix.arch }}
|
||||
config: RelWithDebInfo
|
||||
codesign: 'true'
|
||||
codesignIdent: ${{ env.CODESIGN_IDENT }}
|
||||
|
||||
- name: Package Plugin
|
||||
uses: ./plugin/.github/actions/package-plugin
|
||||
with:
|
||||
workingDirectory: ${{ github.workspace }}/plugin
|
||||
target: ${{ matrix.arch }}
|
||||
config: RelWithDebInfo
|
||||
codesign: ${{ github.event_name != 'pull_request' && steps.setup.outputs.haveCodesignIdent == 'true' }}
|
||||
notarize: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' && steps.setup.outputs.haveNotarizationUser == 'true' }}
|
||||
codesignIdent: ${{ env.CODESIGN_IDENT }}
|
||||
installerIdent: ${{ env.CODESIGN_IDENT_INSTALLER }}
|
||||
codesignUser: ${{ secrets.MACOS_NOTARIZATION_USERNAME }}
|
||||
codesignPass: ${{ secrets.MACOS_NOTARIZATION_PASSWORD }}
|
||||
|
||||
- name: Upload Build Artifact
|
||||
if: ${{ success() && (github.event_name != 'pull_request' || steps.seekingTesters.outputs.found == 'true') }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ env.PLUGIN_NAME }}-macos-${{ matrix.arch }}-${{ steps.setup.outputs.commitHash }}
|
||||
path: ${{ github.workspace }}/plugin/release/${{ env.PLUGIN_NAME }}-*-macos-${{ matrix.arch }}.pkg
|
||||
|
||||
linux_build:
|
||||
name: 02 - Linux
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
arch: [x86_64]
|
||||
if: always()
|
||||
needs: [clang_check]
|
||||
outputs:
|
||||
commitHash: ${{ steps.setup.outputs.commitHash }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: plugin
|
||||
submodules: recursive
|
||||
|
||||
- name: Checkout obs-studio
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: 'obsproject/obs-studio'
|
||||
path: obs-studio
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup Environment
|
||||
working-directory: ${{ github.workspace }}/plugin
|
||||
id: setup
|
||||
run: |
|
||||
## SETUP ENVIRONMENT SCRIPT
|
||||
echo "::set-output name=ccacheDate::$(date +"%Y-%m-%d")"
|
||||
echo "::set-output name=commitHash::$(git rev-parse HEAD | cut -c1-9)"
|
||||
|
||||
- name: Restore Compilation Cache
|
||||
id: ccache-cache
|
||||
uses: actions/cache@v2.1.7
|
||||
with:
|
||||
path: ${{ github.workspace }}/.ccache
|
||||
key: linux-${{ matrix.arch }}-ccache-plugin-${{ steps.setup.outputs.ccacheDate }}
|
||||
restore-keys: |
|
||||
linux-${{ matrix.arch }}-ccache-plugin-
|
||||
|
||||
- name: Check for GitHub Labels
|
||||
id: seekingTesters
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
run: |
|
||||
## GITHUB LABEL SCRIPT
|
||||
if [[ -n "$(curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -s "${{ github.event.pull_request.url }}" | jq -e '.labels[] | select(.name == "Seeking Testers")')" ]]; then
|
||||
echo '::set-output name=found::true'
|
||||
else
|
||||
echo '::set-output name=found::false'
|
||||
fi
|
||||
|
||||
- name: Build Plugin
|
||||
uses: ./plugin/.github/actions/build-plugin
|
||||
with:
|
||||
workingDirectory: ${{ github.workspace }}/plugin
|
||||
target: ${{ matrix.arch }}
|
||||
config: RelWithDebInfo
|
||||
|
||||
- name: Package Plugin
|
||||
uses: ./plugin/.github/actions/package-plugin
|
||||
with:
|
||||
workingDirectory: ${{ github.workspace }}/plugin
|
||||
target: ${{ matrix.arch }}
|
||||
config: RelWithDebInfo
|
||||
|
||||
- name: Upload Build Artifact
|
||||
if: ${{ success() && (github.event_name != 'pull_request' || steps.seekingTesters.outputs.found == 'true') }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ env.PLUGIN_NAME }}-linux-${{ matrix.arch }}-${{ steps.setup.outputs.commitHash }}
|
||||
path: ${{ github.workspace }}/plugin/release/${{ env.PLUGIN_NAME }}-*-linux-${{ matrix.arch }}.*
|
||||
|
||||
windows_build:
|
||||
name: 02 - Windows
|
||||
runs-on: windows-2022
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
arch: [x86, x64]
|
||||
if: always()
|
||||
needs: [clang_check]
|
||||
outputs:
|
||||
commitHash: ${{ steps.setup.outputs.commitHash }}
|
||||
defaults:
|
||||
run:
|
||||
shell: pwsh
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: plugin
|
||||
submodules: recursive
|
||||
|
||||
- name: Checkout obs-studio
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: 'obsproject/obs-studio'
|
||||
path: obs-studio
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup Environment
|
||||
working-directory: ${{ github.workspace }}/plugin
|
||||
id: setup
|
||||
run: |
|
||||
## SETUP ENVIRONMENT SCRIPT
|
||||
$CommitHash = (git rev-parse HEAD)[0..8] -join ''
|
||||
Write-Output "::set-output name=commitHash::${CommitHash}"
|
||||
|
||||
- name: Check for GitHub Labels
|
||||
id: seekingTesters
|
||||
working-directory: ${{ github.workspace }}/plugin
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
run: |
|
||||
## GITHUB LABEL SCRIPT
|
||||
$LabelFound = try {
|
||||
$Params = @{
|
||||
Authentication = 'Bearer'
|
||||
Token = (ConvertTo-SecureString '${{ secrets.GITHUB_TOKEN }}' -AsPlainText)
|
||||
Uri = '${{ github.event.pull_request.url }}'
|
||||
UseBasicParsing = $true
|
||||
}
|
||||
|
||||
(Invoke-RestMethod @Params).labels.name.contains('Seeking Testers')
|
||||
} catch {
|
||||
$false
|
||||
}
|
||||
|
||||
Write-Output "::set-output name=found::$(([string]${LabelFound}).ToLower())"
|
||||
|
||||
- name: Build Plugin
|
||||
uses: ./plugin/.github/actions/build-plugin
|
||||
with:
|
||||
workingDirectory: ${{ github.workspace }}/plugin
|
||||
target: ${{ matrix.arch }}
|
||||
config: RelWithDebInfo
|
||||
visualStudio: 'Visual Studio 17 2022'
|
||||
|
||||
- name: Package Plugin
|
||||
uses: ./plugin/.github/actions/package-plugin
|
||||
with:
|
||||
workingDirectory: ${{ github.workspace }}/plugin
|
||||
target: ${{ matrix.arch }}
|
||||
config: RelWithDebInfo
|
||||
|
||||
- name: Upload Build Artifact
|
||||
if: ${{ success() && (github.event_name != 'pull_request' || steps.seekingTesters.outputs.found == 'true') }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ env.PLUGIN_NAME }}-windows-${{ matrix.arch }}-${{ steps.setup.outputs.commitHash }}
|
||||
path: ${{ github.workspace }}/plugin/release/${{ env.PLUGIN_NAME }}-*.zip
|
||||
|
||||
- name: Package Plugin Installer
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' }}
|
||||
uses: ./plugin/.github/actions/package-plugin
|
||||
with:
|
||||
workingDirectory: ${{ github.workspace }}/plugin
|
||||
target: ${{ matrix.arch }}
|
||||
config: RelWithDebInfo
|
||||
createInstaller: true
|
||||
|
||||
- name: Upload Installer Artifact
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ env.PLUGIN_NAME }}-windows-${{ matrix.arch }}-${{ steps.setup.outputs.commitHash }}-installer
|
||||
path: ${{ github.workspace }}/plugin/release/${{ env.PLUGIN_NAME }}-*.exe
|
||||
|
||||
make-release:
|
||||
name: 03 - Create and upload release
|
||||
runs-on: ubuntu-22.04
|
||||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
|
||||
needs: [macos_build, linux_build, windows_build]
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
steps:
|
||||
- name: Get Metadata
|
||||
id: metadata
|
||||
run: |
|
||||
## METADATA SCRIPT
|
||||
echo "::set-output name=version::${GITHUB_REF/refs\/tags\//}"
|
||||
|
||||
- name: Download build artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
|
||||
- name: Generate Checksums
|
||||
run: |
|
||||
## CHECKSUM GENERATION SCRIPT
|
||||
shopt -s extglob
|
||||
echo "### Checksums" > ${{ github.workspace }}/CHECKSUMS.txt
|
||||
for file in ${{ github.workspace }}/**/@(*.pkg|*.exe|*.deb|*.zip); do
|
||||
echo " ${file##*/}: $(sha256sum "${file}" | cut -d " " -f 1)" >> ${{ github.workspace }}/CHECKSUMS.txt
|
||||
done
|
||||
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5
|
||||
with:
|
||||
draft: true
|
||||
prerelease: ${{ contains(steps.metadata.outputs.version, 'rc') || contains(steps.metadata.outputs.version, 'beta') }}
|
||||
tag_name: ${{ steps.metadata.outputs.version }}
|
||||
name: "${{ env.PLUGIN_NAME }} ${{ steps.metadata.outputs.version }}"
|
||||
body_path: ${{ github.workspace }}/CHECKSUMS.txt
|
||||
files: |
|
||||
${{ github.workspace }}/**/*.zip
|
||||
${{ github.workspace }}/**/*.exe
|
||||
${{ github.workspace }}/**/*.deb
|
||||
${{ github.workspace }}/**/*.pkg
|
412
.github/workflows/pr_push.yml
vendored
Normal file
412
.github/workflows/pr_push.yml
vendored
Normal file
@ -0,0 +1,412 @@
|
||||
name: 'CI Multiplatform Build'
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
branches:
|
||||
- 4.x-current
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
branches:
|
||||
- 4.x-current
|
||||
|
||||
jobs:
|
||||
windows:
|
||||
name: 'Windows 32+64bit'
|
||||
runs-on: [windows-latest]
|
||||
if: contains(github.event.head_commit.message, '[skip ci]') != true
|
||||
env:
|
||||
QT_VERSION: '5.10.1'
|
||||
WINDOWS_DEPS_VERSION: '2017'
|
||||
CMAKE_GENERATOR: "Visual Studio 16 2019"
|
||||
CMAKE_SYSTEM_VERSION: "10.0"
|
||||
steps:
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1.0.0
|
||||
- name: 'Checkout'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: ${{ github.workspace }}/obs-websocket
|
||||
submodules: 'recursive'
|
||||
- name: 'Checkout OBS'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: obsproject/obs-studio
|
||||
path: ${{ github.workspace }}/obs-studio
|
||||
submodules: 'recursive'
|
||||
- name: 'Get OBS-Studio git info'
|
||||
shell: bash
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
run: |
|
||||
git fetch --prune --unshallow
|
||||
echo ::set-env name=OBS_GIT_BRANCH::$(git rev-parse --abbrev-ref HEAD)
|
||||
echo ::set-env name=OBS_GIT_HASH::$(git rev-parse --short HEAD)
|
||||
echo ::set-env name=OBS_GIT_TAG::$(git describe --tags --abbrev=0)
|
||||
- name: 'Checkout last OBS-Studio release (${{ env.OBS_GIT_TAG }})'
|
||||
shell: bash
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
run: |
|
||||
git checkout ${{ env.OBS_GIT_TAG }}
|
||||
git submodule update
|
||||
- name: 'Get obs-websocket git info'
|
||||
shell: bash
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
run: |
|
||||
git fetch --prune --unshallow
|
||||
echo ::set-env name=GIT_BRANCH::${{ github.event.pull_request.head.ref }}
|
||||
echo ::set-env name=GIT_HASH::$(git rev-parse --short HEAD)
|
||||
echo ::set-env name=GIT_TAG::$(git describe --tags --abbrev=0)
|
||||
- name: 'Install prerequisite: QT'
|
||||
run: |
|
||||
curl -kLO https://cdn-fastly.obsproject.com/downloads/Qt_${{ env.QT_VERSION }}.7z -f --retry 5 -C -
|
||||
7z x Qt_${{ env.QT_VERSION }}.7z -o"${{ github.workspace }}\cmbuild\QT"
|
||||
- name: 'Install prerequisite: Pre-built OBS dependencies'
|
||||
run: |
|
||||
curl -kLO https://cdn-fastly.obsproject.com/downloads/dependencies${{ env.WINDOWS_DEPS_VERSION }}.zip -f --retry 5 -C -
|
||||
7z x dependencies${{ env.WINDOWS_DEPS_VERSION }}.zip -o"${{ github.workspace }}\cmbuild\deps"
|
||||
- name: 'Restore OBS 32-bit build v${{ env.OBS_GIT_TAG }} from cache'
|
||||
id: build-cache-obs-32
|
||||
uses: actions/cache@v1
|
||||
env:
|
||||
CACHE_NAME: 'build-cache-obs-32'
|
||||
with:
|
||||
path: ${{ github.workspace }}/obs-studio/build32
|
||||
key: ${{ runner.os }}-${{ env.CACHE_NAME }}-${{ env.OBS_GIT_TAG }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ env.CACHE_NAME }}-
|
||||
- name: 'Configure OBS 32-bit'
|
||||
if: steps.build-cache-obs-32.outputs.cache-hit != 'true'
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
run: |
|
||||
mkdir .\build32
|
||||
cd .\build32
|
||||
cmake -G "${{ env.CMAKE_GENERATOR }}" -A Win32 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2017" -DDepsPath="${{ github.workspace }}\cmbuild\deps\win32" -DCOPIED_DEPENDENCIES=NO -DCOPY_DEPENDENCIES=YES ..
|
||||
- name: 'Build OBS-Studio 32-bit'
|
||||
if: steps.build-cache-obs-32.outputs.cache-hit != 'true'
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
run: |
|
||||
msbuild /m /p:Configuration=RelWithDebInfo .\build32\libobs\libobs.vcxproj
|
||||
msbuild /m /p:Configuration=RelWithDebInfo .\build32\UI\obs-frontend-api\obs-frontend-api.vcxproj
|
||||
- name: 'Restore OBS 64-bit build v${{ env.OBS_GIT_TAG }} from cache'
|
||||
id: build-cache-obs-64
|
||||
uses: actions/cache@v1
|
||||
env:
|
||||
CACHE_NAME: 'build-cache-obs-64'
|
||||
with:
|
||||
path: ${{ github.workspace }}/obs-studio/build64
|
||||
key: ${{ runner.os }}-${{ env.CACHE_NAME }}-${{ env.OBS_GIT_TAG }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ env.CACHE_NAME }}-
|
||||
- name: 'Configure OBS 64-bit'
|
||||
if: steps.build-cache-obs-64.outputs.cache-hit != 'true'
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
run: |
|
||||
mkdir .\build64
|
||||
cd .\build64
|
||||
cmake -G "${{ env.CMAKE_GENERATOR }}" -A x64 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2017_64" -DDepsPath="${{ github.workspace }}\cmbuild\deps\win64" -DCOPIED_DEPENDENCIES=NO -DCOPY_DEPENDENCIES=YES ..
|
||||
- name: 'Build OBS-Studio 64-bit'
|
||||
if: steps.build-cache-obs-64.outputs.cache-hit != 'true'
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
run: |
|
||||
msbuild /m /p:Configuration=RelWithDebInfo .\build64\libobs\libobs.vcxproj
|
||||
msbuild /m /p:Configuration=RelWithDebInfo .\build64\UI\obs-frontend-api\obs-frontend-api.vcxproj
|
||||
- name: 'Configure obs-websocket 64-bit'
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
run: |
|
||||
mkdir .\build64
|
||||
cd .\build64
|
||||
cmake -G "${{ env.CMAKE_GENERATOR }}" -A x64 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2017_64" -DLibObs_DIR="${{ github.workspace }}\obs-studio\build64\libobs" -DLIBOBS_INCLUDE_DIR="${{ github.workspace }}\obs-studio\libobs" -DLIBOBS_LIB="${{ github.workspace }}\obs-studio\build64\libobs\RelWithDebInfo\obs.lib" -DOBS_FRONTEND_LIB="${{ github.workspace }}\obs-studio\build64\UI\obs-frontend-api\RelWithDebInfo\obs-frontend-api.lib" ..
|
||||
- name: 'Configure obs-websocket 32-bit'
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
run: |
|
||||
mkdir .\build32
|
||||
cd .\build32
|
||||
cmake -G "${{ env.CMAKE_GENERATOR }}" -A Win32 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2017" -DLibObs_DIR="${{ github.workspace }}\obs-studio\build32\libobs" -DLIBOBS_INCLUDE_DIR="${{ github.workspace }}\obs-studio\libobs" -DLIBOBS_LIB="${{ github.workspace }}\obs-studio\build32\libobs\RelWithDebInfo\obs.lib" -DOBS_FRONTEND_LIB="${{ github.workspace }}\obs-studio\build32\UI\obs-frontend-api\RelWithDebInfo\obs-frontend-api.lib" ..
|
||||
- name: 'Build obs-websocket 64-bit'
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
run: msbuild /m /p:Configuration=RelWithDebInfo .\build64\obs-websocket.sln
|
||||
- name: 'Build obs-websocket 32-bit'
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
run: msbuild /m /p:Configuration=RelWithDebInfo .\build32\obs-websocket.sln
|
||||
- name: 'Set PR artifact filename'
|
||||
shell: bash
|
||||
run: |
|
||||
FILENAME="obs-websocket-${{ env.GIT_HASH }}-Windows"
|
||||
echo "::set-env name=FILENAME::$FILENAME"
|
||||
- name: 'Package obs-websocket'
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
run: |
|
||||
mkdir package
|
||||
cd package
|
||||
7z a "${{ env.WIN_FILENAME }}.zip" "..\release\*"
|
||||
iscc ..\installer\installer.iss /O. /F"${{ env.WIN_FILENAME }}-Installer"
|
||||
- name: 'Publish ${{ env.WIN_FILENAME }}.zip'
|
||||
if: success()
|
||||
uses: actions/upload-artifact@v2-preview
|
||||
with:
|
||||
name: '${{ env.GIT_HASH }}-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'
|
||||
path: ${{ github.workspace }}/obs-websocket/package/*.exe
|
||||
ubuntu64:
|
||||
name: "Linux/Ubuntu 64-bit"
|
||||
runs-on: [ubuntu-latest]
|
||||
if: contains(github.event.head_commit.message, '[skip ci]') != true
|
||||
steps:
|
||||
- name: 'Checkout'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: ${{ github.workspace }}/obs-websocket
|
||||
submodules: 'recursive'
|
||||
- name: 'Checkout OBS'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: obsproject/obs-studio
|
||||
path: ${{ github.workspace }}/obs-studio
|
||||
submodules: 'recursive'
|
||||
- name: 'Get OBS-Studio git info'
|
||||
shell: bash
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
run: |
|
||||
git fetch --prune --unshallow
|
||||
echo ::set-env name=OBS_GIT_BRANCH::$(git rev-parse --abbrev-ref HEAD)
|
||||
echo ::set-env name=OBS_GIT_HASH::$(git rev-parse --short HEAD)
|
||||
echo ::set-env name=OBS_GIT_TAG::$(git describe --tags --abbrev=0)
|
||||
- name: 'Checkout last OBS-Studio release (${{ env.OBS_GIT_TAG }})'
|
||||
shell: bash
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
run: |
|
||||
git checkout ${{ env.OBS_GIT_TAG }}
|
||||
git submodule update
|
||||
- name: 'Get obs-websocket git info'
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
run: |
|
||||
git fetch --prune --unshallow
|
||||
echo ::set-env name=GIT_BRANCH::${{ github.event.pull_request.head.ref }}
|
||||
echo ::set-env name=GIT_HASH::$(git rev-parse --short HEAD)
|
||||
echo ::set-env name=GIT_TAG::$(git describe --tags --abbrev=0)
|
||||
- name: 'Install prerequisites (Apt)'
|
||||
shell: bash
|
||||
run: |
|
||||
sudo dpkg --add-architecture amd64
|
||||
sudo apt-get -qq update
|
||||
sudo apt-get install -y \
|
||||
build-essential \
|
||||
checkinstall \
|
||||
cmake \
|
||||
libasound2-dev \
|
||||
libavcodec-dev \
|
||||
libavdevice-dev \
|
||||
libavfilter-dev \
|
||||
libavformat-dev \
|
||||
libavutil-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libfdk-aac-dev \
|
||||
libfontconfig-dev \
|
||||
libfreetype6-dev \
|
||||
libgl1-mesa-dev \
|
||||
libjack-jackd2-dev \
|
||||
libjansson-dev \
|
||||
libluajit-5.1-dev \
|
||||
libpulse-dev \
|
||||
libqt5x11extras5-dev \
|
||||
libspeexdsp-dev \
|
||||
libswresample-dev \
|
||||
libswscale-dev \
|
||||
libudev-dev \
|
||||
libv4l-dev \
|
||||
libva-dev \
|
||||
libvlc-dev \
|
||||
libx11-dev \
|
||||
libx264-dev \
|
||||
libxcb-randr0-dev \
|
||||
libxcb-shm0-dev \
|
||||
libxcb-xinerama0-dev \
|
||||
libxcomposite-dev \
|
||||
libxinerama-dev \
|
||||
libmbedtls-dev \
|
||||
pkg-config \
|
||||
python3-dev \
|
||||
qtbase5-dev \
|
||||
libqt5svg5-dev \
|
||||
swig
|
||||
- name: 'Configure OBS-Studio'
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir ./build
|
||||
cd ./build
|
||||
cmake -DDISABLE_PLUGINS=YES -DENABLE_SCRIPTING=NO -DUNIX_STRUCTURE=YES -DCMAKE_INSTALL_PREFIX=/usr ..
|
||||
- name: 'Build OBS-Studio'
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
cd ./build
|
||||
make -j4 libobs obs-frontend-api
|
||||
- name: 'Install OBS-Studio'
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
shell: bash
|
||||
run: |
|
||||
cd ./build
|
||||
sudo cp ./libobs/libobs.so /usr/lib
|
||||
sudo cp ./UI/obs-frontend-api/libobs-frontend-api.so /usr/lib
|
||||
sudo mkdir -p /usr/include/obs
|
||||
sudo cp ../UI/obs-frontend-api/obs-frontend-api.h /usr/include/obs/obs-frontend-api.h
|
||||
- name: 'Configure obs-websocket'
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir ./build
|
||||
cd ./build
|
||||
cmake -DLIBOBS_INCLUDE_DIR=${{ github.workspace }}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr ..
|
||||
- name: 'Build obs-websocket'
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
cd ./build
|
||||
make -j4
|
||||
- name: 'Set PR artifact filename'
|
||||
shell: bash
|
||||
run: |
|
||||
FILENAME="obs-websocket-1-${{ env.GIT_HASH }}-1_amd64.deb"
|
||||
echo "::set-env name=FILENAME::$FILENAME"
|
||||
- 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 \
|
||||
--pkglicense="GPLv2.0" --maintainer="${{ github.event.pusher.email }}" --pkggroup="video" \
|
||||
--pkgsource="${{ github.event.repository.html_url }}" \
|
||||
--requires="obs-studio,libqt5core5a,libqt5widgets5,qt5-image-formats-plugins" \
|
||||
--pakdir="../package"
|
||||
sudo chmod ao+r ../package/*
|
||||
cd -
|
||||
- name: 'Publish ${{ env.FILENAME }}'
|
||||
if: success()
|
||||
uses: actions/upload-artifact@v2-preview
|
||||
with:
|
||||
name: '${{ env.GIT_HASH }}-linux'
|
||||
path: '${{ github.workspace }}/obs-websocket/package/*.deb'
|
||||
macos64:
|
||||
name: "macOS 64-bit"
|
||||
runs-on: [macos-latest]
|
||||
if: contains(github.event.head_commit.message, '[skip ci]') != true
|
||||
env:
|
||||
MACOS_DEPS_VERSION: '2020-04-18'
|
||||
QT_VERSION: '5.14.1'
|
||||
steps:
|
||||
- name: 'Checkout'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: ${{ github.workspace }}/obs-websocket
|
||||
submodules: 'recursive'
|
||||
- name: 'Checkout OBS'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: obsproject/obs-studio
|
||||
path: ${{ github.workspace }}/obs-studio
|
||||
submodules: 'recursive'
|
||||
- name: 'Get OBS-Studio git info'
|
||||
shell: bash
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
run: |
|
||||
git fetch --prune --unshallow
|
||||
echo ::set-env name=OBS_GIT_BRANCH::$(git rev-parse --abbrev-ref HEAD)
|
||||
echo ::set-env name=OBS_GIT_HASH::$(git rev-parse --short HEAD)
|
||||
echo ::set-env name=OBS_GIT_TAG::$(git describe --tags --abbrev=0)
|
||||
- name: 'Checkout last OBS-Studio release (${{ env.OBS_GIT_TAG }})'
|
||||
shell: bash
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
run: |
|
||||
git checkout ${{ env.OBS_GIT_TAG }}
|
||||
git submodule update
|
||||
- name: 'Get obs-websocket git info'
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
run: |
|
||||
git fetch --prune --unshallow
|
||||
echo ::set-env name=GIT_BRANCH::${{ github.event.pull_request.head.ref }}
|
||||
echo ::set-env name=GIT_HASH::$(git rev-parse --short HEAD)
|
||||
echo ::set-env name=GIT_TAG::$(git describe --tags --abbrev=0)
|
||||
- name: 'Install prerequisites (Homebrew)'
|
||||
shell: bash
|
||||
run: |
|
||||
brew bundle --file ${{ github.workspace }}/obs-websocket/CI/macos/Brewfile
|
||||
- name: 'Install prerequisite: Pre-built OBS dependencies'
|
||||
shell: bash
|
||||
run: |
|
||||
curl -L -O https://github.com/obsproject/obs-deps/releases/download/${{ env.MACOS_DEPS_VERSION }}/osx-deps-${{ env.MACOS_DEPS_VERSION }}.tar.gz
|
||||
tar -xf ${{ github.workspace }}/osx-deps-${{ env.MACOS_DEPS_VERSION }}.tar.gz -C "/tmp"
|
||||
- name: 'Configure OBS Studio'
|
||||
shell: bash
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.11 -DENABLE_SCRIPTING=NO -DDepsPath=/tmp/obsdeps -DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt/${{ env.QT_VERSION }}/lib/cmake ..
|
||||
- name: 'Build OBS Studio libraries'
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
cd ./build
|
||||
make -j4 libobs obs-frontend-api
|
||||
- name: 'Configure obs-websocket'
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DQTDIR=/usr/local/Cellar/qt/${{ env.QT_VERSION }} -DLIBOBS_INCLUDE_DIR=${{ github.workspace }}/obs-studio/libobs -DLIBOBS_LIB=${{ github.workspace }}/obs-studio/libobs -DOBS_FRONTEND_LIB="${{ github.workspace }}/obs-studio/build/UI/obs-frontend-api/libobs-frontend-api.dylib" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr ..
|
||||
- name: 'Build obs-websocket'
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
cd ./build
|
||||
make -j4
|
||||
- name: 'Install prerequisite: Packages app'
|
||||
if: success()
|
||||
shell: bash
|
||||
run: |
|
||||
curl -L -O https://s3-us-west-2.amazonaws.com/obs-nightly/Packages.pkg
|
||||
sudo installer -pkg ${{ github.workspace }}/Packages.pkg -target /
|
||||
- name: 'Set PR artifact filename'
|
||||
shell: bash
|
||||
run: |
|
||||
FILENAME_UNSIGNED="obs-websocket-${{ env.GIT_HASH }}-macOS-Unsigned.pkg"
|
||||
echo "::set-env name=FILENAME_UNSIGNED::$FILENAME_UNSIGNED"
|
||||
- name: 'Fix linked dynamic library paths'
|
||||
if: success()
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
shell: bash
|
||||
run: |
|
||||
install_name_tool -change /usr/local/opt/qt/lib/QtWidgets.framework/Versions/5/QtWidgets @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets ./build/obs-websocket.so
|
||||
install_name_tool -change /usr/local/opt/qt/lib/QtGui.framework/Versions/5/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui ./build/obs-websocket.so
|
||||
install_name_tool -change /usr/local/opt/qt/lib/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore ./build/obs-websocket.so
|
||||
echo "Dependencies for obs-websocket"
|
||||
otool -L ./build/obs-websocket.so
|
||||
- name: 'Package ${{ env.FILENAME }}'
|
||||
if: success()
|
||||
working-directory: ./obs-websocket
|
||||
shell: bash
|
||||
run: |
|
||||
packagesbuild ./CI/macos/obs-websocket.pkgproj
|
||||
mv ./release/obs-websocket.pkg ./release/${{ env.FILENAME_UNSIGNED }}
|
||||
- name: 'Publish ${{ env.FILENAME_UNSIGNED }} artifact'
|
||||
if: success()
|
||||
uses: actions/upload-artifact@v2-preview
|
||||
with:
|
||||
name: '${{ env.GIT_HASH }}-macOS'
|
||||
path: ${{ github.workspace }}/obs-websocket/release/*.pkg
|
484
.github/workflows/tag_release.yml
vendored
Normal file
484
.github/workflows/tag_release.yml
vendored
Normal file
@ -0,0 +1,484 @@
|
||||
name: 'CI Multiplatform Release'
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
tags:
|
||||
- '[45].[0-9]+.[0-9]+'
|
||||
|
||||
jobs:
|
||||
windows:
|
||||
name: 'Windows 32+64bit'
|
||||
runs-on: [windows-latest]
|
||||
env:
|
||||
QT_VERSION: '5.10.1'
|
||||
WINDOWS_DEPS_VERSION: '2017'
|
||||
CMAKE_GENERATOR: "Visual Studio 16 2019"
|
||||
CMAKE_SYSTEM_VERSION: "10.0"
|
||||
steps:
|
||||
- name: 'Add msbuild to PATH'
|
||||
uses: microsoft/setup-msbuild@v1.0.0
|
||||
- name: 'Checkout'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: ${{ github.workspace }}/obs-websocket
|
||||
submodules: 'recursive'
|
||||
- name: 'Checkout OBS'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: obsproject/obs-studio
|
||||
path: ${{ github.workspace }}/obs-studio
|
||||
submodules: 'recursive'
|
||||
- name: 'Get OBS-Studio git info'
|
||||
shell: bash
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
run: |
|
||||
git fetch --prune --unshallow
|
||||
echo ::set-env name=OBS_GIT_BRANCH::$(git rev-parse --abbrev-ref HEAD)
|
||||
echo ::set-env name=OBS_GIT_HASH::$(git rev-parse --short HEAD)
|
||||
echo ::set-env name=OBS_GIT_TAG::$(git describe --tags --abbrev=0)
|
||||
- name: 'Checkout last OBS-Studio release (${{ env.OBS_GIT_TAG }})'
|
||||
shell: bash
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
run: |
|
||||
git checkout ${{ env.OBS_GIT_TAG }}
|
||||
git submodule update
|
||||
- name: 'Get obs-websocket git info'
|
||||
shell: bash
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
run: |
|
||||
git fetch --prune --unshallow
|
||||
echo ::set-env name=GIT_BRANCH::${{ github.event.pull_request.head.ref }}
|
||||
echo ::set-env name=GIT_HASH::$(git rev-parse --short HEAD)
|
||||
echo ::set-env name=GIT_TAG::$(git describe --tags --abbrev=0)
|
||||
- name: 'Install prerequisite: QT'
|
||||
run: |
|
||||
curl -kLO https://cdn-fastly.obsproject.com/downloads/Qt_${{ env.QT_VERSION }}.7z -f --retry 5 -C -
|
||||
7z x Qt_${{ env.QT_VERSION }}.7z -o"${{ github.workspace }}\cmbuild\QT"
|
||||
- name: 'Install prerequisite: Pre-built OBS dependencies'
|
||||
run: |
|
||||
curl -kLO https://cdn-fastly.obsproject.com/downloads/dependencies${{ env.WINDOWS_DEPS_VERSION }}.zip -f --retry 5 -C -
|
||||
7z x dependencies${{ env.WINDOWS_DEPS_VERSION }}.zip -o"${{ github.workspace }}\cmbuild\deps"
|
||||
- name: 'Restore OBS 32-bit build v${{ env.OBS_GIT_TAG }} from cache'
|
||||
id: build-cache-obs-32
|
||||
uses: actions/cache@v1
|
||||
env:
|
||||
CACHE_NAME: 'build-cache-obs-32'
|
||||
with:
|
||||
path: ${{ github.workspace }}/obs-studio/build32
|
||||
key: ${{ runner.os }}-${{ env.CACHE_NAME }}-${{ env.OBS_GIT_TAG }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ env.CACHE_NAME }}-
|
||||
- name: 'Configure OBS 32-bit'
|
||||
if: steps.build-cache-obs-32.outputs.cache-hit != 'true'
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
run: |
|
||||
mkdir .\build32
|
||||
cd .\build32
|
||||
cmake -G "${{ env.CMAKE_GENERATOR }}" -A Win32 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2017" -DDepsPath="${{ github.workspace }}\cmbuild\deps\win32" -DCOPIED_DEPENDENCIES=NO -DCOPY_DEPENDENCIES=YES ..
|
||||
- name: 'Build OBS-Studio 32-bit'
|
||||
if: steps.build-cache-obs-32.outputs.cache-hit != 'true'
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
run: |
|
||||
msbuild /m /p:Configuration=RelWithDebInfo .\build32\libobs\libobs.vcxproj
|
||||
msbuild /m /p:Configuration=RelWithDebInfo .\build32\UI\obs-frontend-api\obs-frontend-api.vcxproj
|
||||
- name: 'Restore OBS 64-bit build v${{ env.OBS_GIT_TAG }} from cache'
|
||||
id: build-cache-obs-64
|
||||
uses: actions/cache@v1
|
||||
env:
|
||||
CACHE_NAME: 'build-cache-obs-64'
|
||||
with:
|
||||
path: ${{ github.workspace }}/obs-studio/build64
|
||||
key: ${{ runner.os }}-${{ env.CACHE_NAME }}-${{ env.OBS_GIT_TAG }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ env.CACHE_NAME }}-
|
||||
- name: 'Configure OBS 64-bit'
|
||||
if: steps.build-cache-obs-64.outputs.cache-hit != 'true'
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
run: |
|
||||
mkdir .\build64
|
||||
cd .\build64
|
||||
cmake -G "${{ env.CMAKE_GENERATOR }}" -A x64 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2017_64" -DDepsPath="${{ github.workspace }}\cmbuild\deps\win64" -DCOPIED_DEPENDENCIES=NO -DCOPY_DEPENDENCIES=YES ..
|
||||
- name: 'Build OBS-Studio 64-bit'
|
||||
if: steps.build-cache-obs-64.outputs.cache-hit != 'true'
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
run: |
|
||||
msbuild /m /p:Configuration=RelWithDebInfo .\build64\libobs\libobs.vcxproj
|
||||
msbuild /m /p:Configuration=RelWithDebInfo .\build64\UI\obs-frontend-api\obs-frontend-api.vcxproj
|
||||
- name: 'Configure obs-websocket 64-bit'
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
run: |
|
||||
mkdir .\build64
|
||||
cd .\build64
|
||||
cmake -G "${{ env.CMAKE_GENERATOR }}" -A x64 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2017_64" -DLibObs_DIR="${{ github.workspace }}\obs-studio\build64\libobs" -DLIBOBS_INCLUDE_DIR="${{ github.workspace }}\obs-studio\libobs" -DLIBOBS_LIB="${{ github.workspace }}\obs-studio\build64\libobs\RelWithDebInfo\obs.lib" -DOBS_FRONTEND_LIB="${{ github.workspace }}\obs-studio\build64\UI\obs-frontend-api\RelWithDebInfo\obs-frontend-api.lib" ..
|
||||
- name: 'Configure obs-websocket 32-bit'
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
run: |
|
||||
mkdir .\build32
|
||||
cd .\build32
|
||||
cmake -G "${{ env.CMAKE_GENERATOR }}" -A Win32 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2017" -DLibObs_DIR="${{ github.workspace }}\obs-studio\build32\libobs" -DLIBOBS_INCLUDE_DIR="${{ github.workspace }}\obs-studio\libobs" -DLIBOBS_LIB="${{ github.workspace }}\obs-studio\build32\libobs\RelWithDebInfo\obs.lib" -DOBS_FRONTEND_LIB="${{ github.workspace }}\obs-studio\build32\UI\obs-frontend-api\RelWithDebInfo\obs-frontend-api.lib" ..
|
||||
- name: 'Build obs-websocket 64-bit'
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
run: msbuild /m /p:Configuration=RelWithDebInfo .\build64\obs-websocket.sln
|
||||
- name: 'Build obs-websocket 32-bit'
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
run: msbuild /m /p:Configuration=RelWithDebInfo .\build32\obs-websocket.sln
|
||||
- name: 'Set release filename'
|
||||
shell: bash
|
||||
run: |
|
||||
FILENAME="obs-websocket-${{ env.GIT_TAG }}-Windows"
|
||||
echo "::set-env name=WIN_FILENAME::$FILENAME"
|
||||
- name: 'Package obs-websocket'
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
run: |
|
||||
mkdir package
|
||||
cd package
|
||||
7z a "${{ env.WIN_FILENAME }}.zip" "..\release\*"
|
||||
iscc ..\installer\installer.iss /O. /F"${{ env.WIN_FILENAME }}-Installer"
|
||||
- name: 'Publish ${{ env.WIN_FILENAME }}.zip'
|
||||
if: success()
|
||||
uses: actions/upload-artifact@v2-preview
|
||||
with:
|
||||
name: '${{ env.GIT_TAG }}-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_TAG }}-Windows-Installer'
|
||||
path: ${{ github.workspace }}/obs-websocket/package/*.exe
|
||||
ubuntu64:
|
||||
name: "Linux/Ubuntu 64-bit"
|
||||
runs-on: [ubuntu-latest]
|
||||
steps:
|
||||
- name: 'Checkout'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: ${{ github.workspace }}/obs-websocket
|
||||
submodules: 'recursive'
|
||||
- name: 'Checkout OBS'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: obsproject/obs-studio
|
||||
path: ${{ github.workspace }}/obs-studio
|
||||
submodules: 'recursive'
|
||||
- name: 'Get OBS-Studio git info'
|
||||
shell: bash
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
run: |
|
||||
git fetch --prune --unshallow
|
||||
echo ::set-env name=OBS_GIT_BRANCH::$(git rev-parse --abbrev-ref HEAD)
|
||||
echo ::set-env name=OBS_GIT_HASH::$(git rev-parse --short HEAD)
|
||||
echo ::set-env name=OBS_GIT_TAG::$(git describe --tags --abbrev=0)
|
||||
- name: 'Checkout last OBS-Studio release (${{ env.OBS_GIT_TAG }})'
|
||||
shell: bash
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
run: |
|
||||
git checkout ${{ env.OBS_GIT_TAG }}
|
||||
git submodule update
|
||||
- name: 'Get obs-websocket git info'
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
run: |
|
||||
git fetch --prune --unshallow
|
||||
echo ::set-env name=GIT_BRANCH::${{ github.event.pull_request.head.ref }}
|
||||
echo ::set-env name=GIT_HASH::$(git rev-parse --short HEAD)
|
||||
echo ::set-env name=GIT_TAG::$(git describe --tags --abbrev=0)
|
||||
- name: 'Install prerequisites (Apt)'
|
||||
shell: bash
|
||||
run: |
|
||||
sudo dpkg --add-architecture amd64
|
||||
sudo apt-get -qq update
|
||||
sudo apt-get install -y \
|
||||
build-essential \
|
||||
checkinstall \
|
||||
cmake \
|
||||
libasound2-dev \
|
||||
libavcodec-dev \
|
||||
libavdevice-dev \
|
||||
libavfilter-dev \
|
||||
libavformat-dev \
|
||||
libavutil-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libfdk-aac-dev \
|
||||
libfontconfig-dev \
|
||||
libfreetype6-dev \
|
||||
libgl1-mesa-dev \
|
||||
libjack-jackd2-dev \
|
||||
libjansson-dev \
|
||||
libluajit-5.1-dev \
|
||||
libpulse-dev \
|
||||
libqt5x11extras5-dev \
|
||||
libspeexdsp-dev \
|
||||
libswresample-dev \
|
||||
libswscale-dev \
|
||||
libudev-dev \
|
||||
libv4l-dev \
|
||||
libva-dev \
|
||||
libvlc-dev \
|
||||
libx11-dev \
|
||||
libx264-dev \
|
||||
libxcb-randr0-dev \
|
||||
libxcb-shm0-dev \
|
||||
libxcb-xinerama0-dev \
|
||||
libxcomposite-dev \
|
||||
libxinerama-dev \
|
||||
libmbedtls-dev \
|
||||
pkg-config \
|
||||
python3-dev \
|
||||
qtbase5-dev \
|
||||
libqt5svg5-dev \
|
||||
swig
|
||||
- name: 'Configure OBS-Studio'
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir ./build
|
||||
cd ./build
|
||||
cmake -DDISABLE_PLUGINS=YES -DENABLE_SCRIPTING=NO -DUNIX_STRUCTURE=YES -DCMAKE_INSTALL_PREFIX=/usr ..
|
||||
- name: 'Build OBS-Studio'
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
cd ./build
|
||||
make -j4 libobs obs-frontend-api
|
||||
- name: 'Install OBS-Studio'
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
shell: bash
|
||||
run: |
|
||||
cd ./build
|
||||
sudo cp ./libobs/libobs.so /usr/lib
|
||||
sudo cp ./UI/obs-frontend-api/libobs-frontend-api.so /usr/lib
|
||||
sudo mkdir -p /usr/include/obs
|
||||
sudo cp ../UI/obs-frontend-api/obs-frontend-api.h /usr/include/obs/obs-frontend-api.h
|
||||
- name: 'Configure obs-websocket'
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir ./build
|
||||
cd ./build
|
||||
cmake -DLIBOBS_INCLUDE_DIR=${{ github.workspace }}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr ..
|
||||
- name: 'Build obs-websocket'
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
cd ./build
|
||||
make -j4
|
||||
- name: 'Set release filename'
|
||||
shell: bash
|
||||
run: |
|
||||
FILENAME="obs-websocket-${{ env.GIT_TAG }}-1_amd64.deb"
|
||||
echo "::set-env name=LINUX_FILENAME::$FILENAME"
|
||||
- name: 'Package ${{ env.LINUX_FILENAME }}'
|
||||
if: success()
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
shell: bash
|
||||
run: |
|
||||
VERSION="${{ env.GIT_TAG }}"
|
||||
cd ./build
|
||||
sudo checkinstall -y --type=debian --fstrans=no -nodoc \
|
||||
--backup=no --deldoc=yes --install=no --pkgname=obs-websocket --pkgversion=$VERSION \
|
||||
--pkglicense="GPLv2.0" --maintainer="${{ github.event.pusher.email }}" --pkggroup="video" \
|
||||
--pkgsource="${{ github.event.repository.html_url }}" \
|
||||
--requires="obs-studio,libqt5core5a,libqt5widgets5,qt5-image-formats-plugins" \
|
||||
--pakdir="../package"
|
||||
sudo chmod ao+r ../package/*
|
||||
cd -
|
||||
- name: 'Publish ${{ env.LINUX_FILENAME }}'
|
||||
if: success()
|
||||
uses: actions/upload-artifact@v2-preview
|
||||
with:
|
||||
name: '${{ env.GIT_TAG }}-linux'
|
||||
path: '${{ github.workspace }}/obs-websocket/package/*.deb'
|
||||
macos64:
|
||||
name: "macOS 64-bit"
|
||||
runs-on: [macos-latest]
|
||||
env:
|
||||
MACOS_DEPS_VERSION: '2020-04-18'
|
||||
QT_VERSION: '5.14.1'
|
||||
steps:
|
||||
- name: 'Checkout'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: ${{ github.workspace }}/obs-websocket
|
||||
submodules: 'recursive'
|
||||
- name: 'Checkout OBS'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: obsproject/obs-studio
|
||||
path: ${{ github.workspace }}/obs-studio
|
||||
submodules: 'recursive'
|
||||
- name: 'Get OBS-Studio git info'
|
||||
shell: bash
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
run: |
|
||||
git fetch --prune --unshallow
|
||||
echo ::set-env name=OBS_GIT_BRANCH::$(git rev-parse --abbrev-ref HEAD)
|
||||
echo ::set-env name=OBS_GIT_HASH::$(git rev-parse --short HEAD)
|
||||
echo ::set-env name=OBS_GIT_TAG::$(git describe --tags --abbrev=0)
|
||||
- name: 'Checkout last OBS-Studio release (${{ env.OBS_GIT_TAG }})'
|
||||
shell: bash
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
run: |
|
||||
git checkout ${{ env.OBS_GIT_TAG }}
|
||||
git submodule update
|
||||
- name: 'Get obs-websocket git info'
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
run: |
|
||||
git fetch --prune --unshallow
|
||||
echo ::set-env name=GIT_BRANCH::${{ github.event.pull_request.head.ref }}
|
||||
echo ::set-env name=GIT_HASH::$(git rev-parse --short HEAD)
|
||||
echo ::set-env name=GIT_TAG::$(git describe --tags --abbrev=0)
|
||||
- name: 'Install prerequisites (Homebrew)'
|
||||
shell: bash
|
||||
run: |
|
||||
brew bundle --file ${{ github.workspace }}/obs-websocket/CI/macos/Brewfile
|
||||
- name: 'Install prerequisite: Pre-built OBS dependencies'
|
||||
shell: bash
|
||||
run: |
|
||||
curl -L -O https://github.com/obsproject/obs-deps/releases/download/${{ env.MACOS_DEPS_VERSION }}/osx-deps-${{ env.MACOS_DEPS_VERSION }}.tar.gz
|
||||
tar -xf ${{ github.workspace }}/osx-deps-${{ env.MACOS_DEPS_VERSION }}.tar.gz -C "/tmp"
|
||||
- name: 'Configure OBS Studio'
|
||||
shell: bash
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.11 -DENABLE_SCRIPTING=NO -DDepsPath=/tmp/obsdeps -DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt/${{ env.QT_VERSION }}/lib/cmake ..
|
||||
- name: 'Build OBS Studio libraries'
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
cd ./build
|
||||
make -j4 libobs obs-frontend-api
|
||||
- name: 'Configure obs-websocket'
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DQTDIR=/usr/local/Cellar/qt/${{ env.QT_VERSION }} -DLIBOBS_INCLUDE_DIR=${{ github.workspace }}/obs-studio/libobs -DLIBOBS_LIB=${{ github.workspace }}/obs-studio/libobs -DOBS_FRONTEND_LIB="${{ github.workspace }}/obs-studio/build/UI/obs-frontend-api/libobs-frontend-api.dylib" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr ..
|
||||
- name: 'Build obs-websocket'
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
cd ./build
|
||||
make -j4
|
||||
- name: 'Install prerequisite: Packages app'
|
||||
if: success()
|
||||
shell: bash
|
||||
run: |
|
||||
curl -L -O https://s3-us-west-2.amazonaws.com/obs-nightly/Packages.pkg
|
||||
sudo installer -pkg ${{ github.workspace }}/Packages.pkg -target /
|
||||
- name: 'Set release filename'
|
||||
if: success() && startsWith(github.ref, 'refs/tags')
|
||||
shell: bash
|
||||
run: |
|
||||
FILENAME_UNSIGNED="obs-websocket-${{ env.GIT_TAG }}-macOS-Unsigned.pkg"
|
||||
FILENAME="obs-websocket-${{ env.GIT_TAG }}-macOS.pkg"
|
||||
echo "::set-env name=MAC_FILENAME_UNSIGNED::$FILENAME_UNSIGNED"
|
||||
echo "::set-env name=MAC_FILENAME::$FILENAME"
|
||||
- name: 'Fix linked dynamic library paths'
|
||||
if: success()
|
||||
working-directory: ${{ github.workspace }}/obs-websocket
|
||||
shell: bash
|
||||
run: |
|
||||
install_name_tool -change /usr/local/opt/qt/lib/QtWidgets.framework/Versions/5/QtWidgets @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets ./build/obs-websocket.so
|
||||
install_name_tool -change /usr/local/opt/qt/lib/QtGui.framework/Versions/5/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui ./build/obs-websocket.so
|
||||
install_name_tool -change /usr/local/opt/qt/lib/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore ./build/obs-websocket.so
|
||||
echo "Dependencies for obs-websocket"
|
||||
otool -L ./build/obs-websocket.so
|
||||
- name: 'Install Apple Developer Certificate'
|
||||
if: success()
|
||||
uses: apple-actions/import-codesign-certs@253ddeeac23f2bdad1646faac5c8c2832e800071
|
||||
with:
|
||||
p12-file-base64: ${{ secrets.MACOS_CERT_CODESIGN }}
|
||||
p12-password: ${{ secrets.MACOS_CERT_PASS }}
|
||||
- name: 'Code signing'
|
||||
if: success()
|
||||
working-directory: ./obs-websocket
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
codesign --sign "${{ secrets.MACOS_IDENT_CODESIGN }}" ./build/obs-websocket.so
|
||||
packagesbuild ./CI/macos/obs-websocket.pkgproj
|
||||
mv ./release/obs-websocket.pkg ./release/${{ env.MAC_FILENAME_UNSIGNED }}
|
||||
productsign --sign "${{ secrets.MACOS_IDENT_INSTALLER }}" ./release/${{ env.MAC_FILENAME_UNSIGNED }} ./release/${{ env.MAC_FILENAME }}
|
||||
rm ./release/${{ env.MAC_FILENAME_UNSIGNED }}
|
||||
- name: 'Notarization'
|
||||
if: success()
|
||||
working-directory: ./obs-websocket
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
xcrun altool --store-password-in-keychain-item "AC_PASSWORD" -u "${{ secrets.MACOS_IDENT_USER }}" -p "${{ secrets.MACOS_IDENT_PASS }}"
|
||||
xcnotary precheck ./release/${{ env.MAC_FILENAME }}
|
||||
if [ "$?" -eq 0 ]; then xcnotary notarize ./release/${{ env.MAC_FILENAME }} --developer-account "${{ secrets.MACOS_IDENT_USER }}" --developer-password-keychain-item "AC_PASSWORD" --provider "${{ secrets.MACOS_IDENT_PROVIDER }}"; fi
|
||||
- name: 'Publish ${{ env.MAC_FILENAME }} artifact'
|
||||
if: success() && startsWith(github.ref, 'refs/tags')
|
||||
uses: actions/upload-artifact@v2-preview
|
||||
with:
|
||||
name: '${{ env.GIT_TAG }}-macOS'
|
||||
path: ${{ github.workspace }}/obs-websocket/release/*.pkg
|
||||
make-release:
|
||||
name: 'Create and upload release'
|
||||
runs-on: [ubuntu-latest]
|
||||
needs: [windows, ubuntu64, macos64]
|
||||
steps:
|
||||
- name: 'Get the version'
|
||||
shell: bash
|
||||
id: get_version
|
||||
run: |
|
||||
echo ::set-env name=TAG_VERSION::${GITHUB_REF/refs\/tags\//}
|
||||
- name: 'Create Release'
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ env.TAG_VERSION }}
|
||||
release_name: obs-websocket ${{ env.TAG_VERSION }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
- name: 'Download release artifacts'
|
||||
uses: actions/download-artifact@v2-preview
|
||||
- name: 'Upload Windows .zip artifact to release'
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/${{ env.TAG_VERSION }}-Windows/obs-websocket-${{ env.TAG_VERSION }}-Windows.zip
|
||||
asset_name: obs-websocket-${{ env.TAG_VERSION }}-Windows.zip
|
||||
asset_content_type: application/zip
|
||||
- name: 'Upload Windows .exe artifact to release'
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/${{ env.TAG_VERSION }}-Windows-Installer/obs-websocket-${{ env.TAG_VERSION }}-Windows-Installer.exe
|
||||
asset_name: obs-websocket-${{ env.TAG_VERSION }}-Windows-Installer.exe
|
||||
asset_content_type: application/zip
|
||||
- name: 'Upload Linux artifact to release'
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/${{ env.TAG_VERSION }}-linux/obs-websocket_${{ env.TAG_VERSION }}-1_amd64.deb
|
||||
asset_name: obs-websocket-${{ env.TAG_VERSION }}-1_amd64.deb
|
||||
asset_content_type: application/octet-stream
|
||||
- name: 'Upload macOS artifact to release'
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/${{ env.TAG_VERSION }}-macOS/obs-websocket-${{ env.TAG_VERSION }}-macOS.pkg
|
||||
asset_name: obs-websocket-${{ env.TAG_VERSION }}-macOS.pkg
|
||||
asset_content_type: application/octet-stream
|
10
BUILDING.md
10
BUILDING.md
@ -2,7 +2,7 @@
|
||||
|
||||
## Prerequisites
|
||||
|
||||
You'll need [Qt 5.15.2](https://download.qt.io/official_releases/qt/5.15/5.15.2/),
|
||||
You'll need [Qt 5.10.x](https://download.qt.io/official_releases/qt/5.10/),
|
||||
[CMake](https://cmake.org/download/) and a working [OBS Studio development environment](https://obsproject.com/wiki/install-instructions) installed on your
|
||||
computer.
|
||||
|
||||
@ -53,10 +53,10 @@ look for issues or specificities.
|
||||
```shell
|
||||
git clone --recursive https://github.com/Palakis/obs-websocket.git
|
||||
cd obs-websocket
|
||||
./CI/macos/install-dependencies-macos.sh
|
||||
./CI/macos/install-build-obs-macos.sh
|
||||
./CI/macos/build-plugin-macos.sh
|
||||
./CI/macos/package-plugin-macos.sh
|
||||
./CI/install-dependencies-macos.sh
|
||||
./CI/install-build-obs-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.
|
||||
|
28
CI/build-macos.sh
Executable file
28
CI/build-macos.sh
Executable file
@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
OSTYPE=$(uname)
|
||||
|
||||
if [ "${OSTYPE}" != "Darwin" ]; then
|
||||
echo "[obs-websocket - Error] macOS build script can be run on Darwin-type OS only."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
HAS_CMAKE=$(type cmake 2>/dev/null)
|
||||
|
||||
if [ "${HAS_CMAKE}" = "" ]; then
|
||||
echo "[obs-websocket - Error] CMake not installed - please run 'install-dependencies-macos.sh' first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#export QT_PREFIX="$(find /usr/local/Cellar/qt5 -d 1 | tail -n 1)"
|
||||
|
||||
echo "[obs-websocket] Building 'obs-websocket' for macOS."
|
||||
mkdir -p 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_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
&& make -j4
|
6
CI/build-ubuntu.sh
Executable file
6
CI/build-ubuntu.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
mkdir build && cd build
|
||||
cmake -DCMAKE_INSTALL_PREFIX=/usr -DUSE_UBUNTU_FIX=true ..
|
||||
make -j4
|
6
CI/download-obs-deps.cmd
Normal file
6
CI/download-obs-deps.cmd
Normal file
@ -0,0 +1,6 @@
|
||||
if not exist %DepsBasePath% (
|
||||
curl -o %DepsBasePath%.zip -kLO https://obsproject.com/downloads/dependencies2017.zip -f --retry 5 -C -
|
||||
7z x %DepsBasePath%.zip -o%DepsBasePath%
|
||||
) else (
|
||||
echo "OBS dependencies are already there. Download skipped."
|
||||
)
|
31
CI/generate-docs.sh
Executable file
31
CI/generate-docs.sh
Executable file
@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
echo "-- Generating documentation."
|
||||
echo "-- Node version: $(node -v)"
|
||||
echo "-- NPM version: $(npm -v)"
|
||||
|
||||
git fetch origin
|
||||
git checkout ${CHECKOUT_REF/refs\/heads\//}
|
||||
|
||||
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
|
||||
|
||||
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 "Azure CI"
|
||||
git config user.email "$COMMIT_AUTHOR_EMAIL"
|
||||
|
||||
git add ./generated
|
||||
git pull
|
||||
git commit -m "docs(ci): Update protocol.md - $(git rev-parse --short HEAD) [skip ci]"
|
||||
git push -q $GITHUB_REPO
|
42
CI/install-build-obs-macos.sh
Executable file
42
CI/install-build-obs-macos.sh
Executable file
@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
|
||||
OSTYPE=$(uname)
|
||||
|
||||
if [ "${OSTYPE}" != "Darwin" ]; then
|
||||
echo "[obs-websocket - Error] macOS obs-studio build script can be run on Darwin-type OS only."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
HAS_CMAKE=$(type cmake 2>/dev/null)
|
||||
HAS_GIT=$(type git 2>/dev/null)
|
||||
|
||||
if [ "${HAS_CMAKE}" = "" ]; then
|
||||
echo "[obs-websocket - Error] CMake not installed - please run 'install-dependencies-macos.sh' first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "${HAS_GIT}" = "" ]; then
|
||||
echo "[obs-websocket - Error] Git not installed - please install Xcode developer tools or via Homebrew."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "[obs-websocket] Downloading and unpacking OBS dependencies"
|
||||
wget --quiet --retry-connrefused --waitretry=1 https://obs-nightly.s3.amazonaws.com/osx-deps-2018-08-09.tar.gz
|
||||
tar -xf ./osx-deps-2018-08-09.tar.gz -C /tmp
|
||||
|
||||
# Build obs-studio
|
||||
cd ..
|
||||
echo "[obs-websocket] Cloning obs-studio from GitHub.."
|
||||
git clone https://github.com/obsproject/obs-studio
|
||||
cd obs-studio
|
||||
OBSLatestTag=$(git describe --tags --abbrev=0)
|
||||
git checkout $OBSLatestTag
|
||||
mkdir build && cd build
|
||||
echo "[obs-websocket] Building obs-studio.."
|
||||
cmake .. \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.11 \
|
||||
-DDISABLE_PLUGINS=true \
|
||||
-DENABLE_SCRIPTING=0 \
|
||||
-DDepsPath=/tmp/obsdeps \
|
||||
-DCMAKE_PREFIX_PATH=/usr/local/opt/qt/lib/cmake \
|
||||
&& make -j4
|
56
CI/install-dependencies-macos.sh
Executable file
56
CI/install-dependencies-macos.sh
Executable file
@ -0,0 +1,56 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
|
||||
OSTYPE=$(uname)
|
||||
|
||||
if [ "${OSTYPE}" != "Darwin" ]; then
|
||||
echo "[obs-websocket - Error] macOS install dependencies script can be run on Darwin-type OS only."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
HAS_BREW=$(type brew 2>/dev/null)
|
||||
|
||||
if [ "${HAS_BREW}" = "" ]; then
|
||||
echo "[obs-websocket - Error] Please install Homebrew (https://www.brew.sh/) to build obs-websocket on macOS."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# OBS Studio deps
|
||||
echo "[obs-websocket] Updating Homebrew.."
|
||||
brew update >/dev/null
|
||||
echo "[obs-websocket] Checking installed Homebrew formulas.."
|
||||
BREW_PACKAGES=$(brew list)
|
||||
BREW_DEPENDENCIES="jack speexdsp ccache swig mbedtls"
|
||||
|
||||
for DEPENDENCY in ${BREW_DEPENDENCIES}; do
|
||||
if echo "${BREW_PACKAGES}" | grep -q "^${DEPENDENCY}\$"; then
|
||||
echo "[obs-websocket] Upgrading OBS-Studio dependency '${DEPENDENCY}'.."
|
||||
brew upgrade ${DEPENDENCY} 2>/dev/null
|
||||
else
|
||||
echo "[obs-websocket] Installing OBS-Studio dependency '${DEPENDENCY}'.."
|
||||
brew install ${DEPENDENCY} 2>/dev/null
|
||||
fi
|
||||
done
|
||||
|
||||
# qtwebsockets deps
|
||||
echo "[obs-websocket] Installing obs-websocket dependency 'QT 5.10.1'.."
|
||||
|
||||
brew install ./CI/macos/qt.rb
|
||||
|
||||
# Pin this version of QT5 to avoid `brew upgrade`
|
||||
# upgrading it to incompatible version
|
||||
brew pin qt
|
||||
|
||||
# Fetch and install Packages app
|
||||
# =!= NOTICE =!=
|
||||
# Installs a LaunchDaemon under /Library/LaunchDaemons/fr.whitebox.packages.build.dispatcher.plist
|
||||
# =!= NOTICE =!=
|
||||
|
||||
HAS_PACKAGES=$(type packagesbuild 2>/dev/null)
|
||||
|
||||
if [ "${HAS_PACKAGES}" = "" ]; then
|
||||
echo "[obs-websocket] Installing Packaging app (might require password due to 'sudo').."
|
||||
curl -o './Packages.pkg' --retry-connrefused -s --retry-delay 1 'https://s3-us-west-2.amazonaws.com/obs-nightly/Packages.pkg'
|
||||
sudo installer -pkg ./Packages.pkg -target /
|
||||
fi
|
19
CI/install-dependencies-ubuntu.sh
Executable file
19
CI/install-dependencies-ubuntu.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
sudo add-apt-repository -y ppa:obsproject/obs-studio
|
||||
sudo apt-get -qq update
|
||||
|
||||
sudo apt-get install -y \
|
||||
libc-dev-bin \
|
||||
libc6-dev git \
|
||||
build-essential \
|
||||
checkinstall \
|
||||
cmake \
|
||||
obs-studio \
|
||||
qtbase5-dev
|
||||
|
||||
# Dirty hack
|
||||
sudo wget -O /usr/include/obs/obs-frontend-api.h https://raw.githubusercontent.com/obsproject/obs-studio/26.0.0/UI/obs-frontend-api/obs-frontend-api.h
|
||||
|
||||
sudo ldconfig
|
8
CI/install-qt-win.cmd
Normal file
8
CI/install-qt-win.cmd
Normal file
@ -0,0 +1,8 @@
|
||||
if not exist %QtBaseDir% (
|
||||
curl -kLO https://cdn-fastly.obsproject.com/downloads/Qt_5.10.1.7z -f --retry 5 -z Qt_5.10.1.7z
|
||||
7z x Qt_5.10.1.7z -o%QtBaseDir%
|
||||
) else (
|
||||
echo "Qt is already installed. Download skipped."
|
||||
)
|
||||
|
||||
dir %QtBaseDir%
|
10
CI/macos/Brewfile
Normal file
10
CI/macos/Brewfile
Normal file
@ -0,0 +1,10 @@
|
||||
tap "akeru-inc/tap"
|
||||
brew "jack"
|
||||
brew "speexdsp"
|
||||
brew "cmake"
|
||||
brew "freetype"
|
||||
brew "fdk-aac"
|
||||
brew "https://gist.githubusercontent.com/DDRBoxman/9c7a2b08933166f4b61ed9a44b242609/raw/ef4de6c587c6bd7f50210eccd5bd51ff08e6de13/qt.rb"
|
||||
brew "swig", link: false
|
||||
brew "https://gist.githubusercontent.com/DDRBoxman/4cada55c51803a2f963fa40ce55c9d3e/raw/572c67e908bfbc1bcb8c476ea77ea3935133f5b5/swig.rb"
|
||||
brew "akeru-inc/tap/xcnotary"
|
726
CI/macos/obs-websocket.pkgproj
Normal file
726
CI/macos/obs-websocket.pkgproj
Normal file
@ -0,0 +1,726 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PROJECT</key>
|
||||
<dict>
|
||||
<key>PACKAGE_FILES</key>
|
||||
<dict>
|
||||
<key>DEFAULT_INSTALL_LOCATION</key>
|
||||
<string>/</string>
|
||||
<key>HIERARCHY</key>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>80</integer>
|
||||
<key>PATH</key>
|
||||
<string>../../build/obs-websocket.so</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>3</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>GID</key>
|
||||
<integer>80</integer>
|
||||
<key>PATH</key>
|
||||
<string>bin</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>2</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>80</integer>
|
||||
<key>PATH</key>
|
||||
<string>../../data</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>3</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>GID</key>
|
||||
<integer>80</integer>
|
||||
<key>PATH</key>
|
||||
<string>obs-websocket</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>2</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>GID</key>
|
||||
<integer>80</integer>
|
||||
<key>PATH</key>
|
||||
<string>plugins</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>2</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>GID</key>
|
||||
<integer>80</integer>
|
||||
<key>PATH</key>
|
||||
<string>obs-studio</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>2</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>GID</key>
|
||||
<integer>80</integer>
|
||||
<key>PATH</key>
|
||||
<string>Application Support</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Automator</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Documentation</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Extensions</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Filesystems</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Frameworks</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Input Methods</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Internet Plug-Ins</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>LaunchAgents</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>LaunchDaemons</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>PreferencePanes</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Preferences</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>80</integer>
|
||||
<key>PATH</key>
|
||||
<string>Printers</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>PrivilegedHelperTools</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>QuickLook</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>QuickTime</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Screen Savers</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Scripts</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Services</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Widgets</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Library</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Shared</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>1023</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>GID</key>
|
||||
<integer>80</integer>
|
||||
<key>PATH</key>
|
||||
<string>Users</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>/</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>PAYLOAD_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>VERSION</key>
|
||||
<integer>4</integer>
|
||||
</dict>
|
||||
<key>PACKAGE_SCRIPTS</key>
|
||||
<dict>
|
||||
<key>RESOURCES</key>
|
||||
<array/>
|
||||
</dict>
|
||||
<key>PACKAGE_SETTINGS</key>
|
||||
<dict>
|
||||
<key>AUTHENTICATION</key>
|
||||
<integer>1</integer>
|
||||
<key>CONCLUSION_ACTION</key>
|
||||
<integer>0</integer>
|
||||
<key>IDENTIFIER</key>
|
||||
<string>fr.palakis.obs-websocket</string>
|
||||
<key>OVERWRITE_PERMISSIONS</key>
|
||||
<false/>
|
||||
<key>VERSION</key>
|
||||
<string>4.9.0</string>
|
||||
</dict>
|
||||
<key>PROJECT_COMMENTS</key>
|
||||
<dict>
|
||||
<key>NOTES</key>
|
||||
<data>
|
||||
PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1M
|
||||
IDQuMDEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvVFIvaHRtbDQv
|
||||
c3RyaWN0LmR0ZCI+CjxodG1sPgo8aGVhZD4KPG1ldGEgaHR0cC1l
|
||||
cXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7
|
||||
IGNoYXJzZXQ9VVRGLTgiPgo8bWV0YSBodHRwLWVxdWl2PSJDb250
|
||||
ZW50LVN0eWxlLVR5cGUiIGNvbnRlbnQ9InRleHQvY3NzIj4KPHRp
|
||||
dGxlPjwvdGl0bGU+CjxtZXRhIG5hbWU9IkdlbmVyYXRvciIgY29u
|
||||
dGVudD0iQ29jb2EgSFRNTCBXcml0ZXIiPgo8bWV0YSBuYW1lPSJD
|
||||
b2NvYVZlcnNpb24iIGNvbnRlbnQ9IjE0MDQuMTMiPgo8c3R5bGUg
|
||||
dHlwZT0idGV4dC9jc3MiPgo8L3N0eWxlPgo8L2hlYWQ+Cjxib2R5
|
||||
Pgo8L2JvZHk+CjwvaHRtbD4K
|
||||
</data>
|
||||
</dict>
|
||||
<key>PROJECT_SETTINGS</key>
|
||||
<dict>
|
||||
<key>BUILD_PATH</key>
|
||||
<dict>
|
||||
<key>PATH</key>
|
||||
<string>../../release</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<key>EXCLUDED_FILES</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>PATTERNS_ARRAY</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>REGULAR_EXPRESSION</key>
|
||||
<false/>
|
||||
<key>STRING</key>
|
||||
<string>.DS_Store</string>
|
||||
<key>TYPE</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>PROTECTED</key>
|
||||
<true/>
|
||||
<key>PROXY_NAME</key>
|
||||
<string>Remove .DS_Store files</string>
|
||||
<key>PROXY_TOOLTIP</key>
|
||||
<string>Remove ".DS_Store" files created by the Finder.</string>
|
||||
<key>STATE</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>PATTERNS_ARRAY</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>REGULAR_EXPRESSION</key>
|
||||
<false/>
|
||||
<key>STRING</key>
|
||||
<string>.pbdevelopment</string>
|
||||
<key>TYPE</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>PROTECTED</key>
|
||||
<true/>
|
||||
<key>PROXY_NAME</key>
|
||||
<string>Remove .pbdevelopment files</string>
|
||||
<key>PROXY_TOOLTIP</key>
|
||||
<string>Remove ".pbdevelopment" files created by ProjectBuilder or Xcode.</string>
|
||||
<key>STATE</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>PATTERNS_ARRAY</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>REGULAR_EXPRESSION</key>
|
||||
<false/>
|
||||
<key>STRING</key>
|
||||
<string>CVS</string>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>REGULAR_EXPRESSION</key>
|
||||
<false/>
|
||||
<key>STRING</key>
|
||||
<string>.cvsignore</string>
|
||||
<key>TYPE</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>REGULAR_EXPRESSION</key>
|
||||
<false/>
|
||||
<key>STRING</key>
|
||||
<string>.cvspass</string>
|
||||
<key>TYPE</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>REGULAR_EXPRESSION</key>
|
||||
<false/>
|
||||
<key>STRING</key>
|
||||
<string>.svn</string>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>REGULAR_EXPRESSION</key>
|
||||
<false/>
|
||||
<key>STRING</key>
|
||||
<string>.git</string>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>REGULAR_EXPRESSION</key>
|
||||
<false/>
|
||||
<key>STRING</key>
|
||||
<string>.gitignore</string>
|
||||
<key>TYPE</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>PROTECTED</key>
|
||||
<true/>
|
||||
<key>PROXY_NAME</key>
|
||||
<string>Remove SCM metadata</string>
|
||||
<key>PROXY_TOOLTIP</key>
|
||||
<string>Remove helper files and folders used by the CVS, SVN or Git Source Code Management systems.</string>
|
||||
<key>STATE</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>PATTERNS_ARRAY</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>REGULAR_EXPRESSION</key>
|
||||
<false/>
|
||||
<key>STRING</key>
|
||||
<string>classes.nib</string>
|
||||
<key>TYPE</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>REGULAR_EXPRESSION</key>
|
||||
<false/>
|
||||
<key>STRING</key>
|
||||
<string>designable.db</string>
|
||||
<key>TYPE</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>REGULAR_EXPRESSION</key>
|
||||
<false/>
|
||||
<key>STRING</key>
|
||||
<string>info.nib</string>
|
||||
<key>TYPE</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>PROTECTED</key>
|
||||
<true/>
|
||||
<key>PROXY_NAME</key>
|
||||
<string>Optimize nib files</string>
|
||||
<key>PROXY_TOOLTIP</key>
|
||||
<string>Remove "classes.nib", "info.nib" and "designable.nib" files within .nib bundles.</string>
|
||||
<key>STATE</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>PATTERNS_ARRAY</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>REGULAR_EXPRESSION</key>
|
||||
<false/>
|
||||
<key>STRING</key>
|
||||
<string>Resources Disabled</string>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>PROTECTED</key>
|
||||
<true/>
|
||||
<key>PROXY_NAME</key>
|
||||
<string>Remove Resources Disabled folders</string>
|
||||
<key>PROXY_TOOLTIP</key>
|
||||
<string>Remove "Resources Disabled" folders.</string>
|
||||
<key>STATE</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SEPARATOR</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</array>
|
||||
<key>NAME</key>
|
||||
<string>obs-websocket</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>VERSION</key>
|
||||
<integer>2</integer>
|
||||
</dict>
|
||||
</plist>
|
145
CI/macos/qt.rb
Normal file
145
CI/macos/qt.rb
Normal file
@ -0,0 +1,145 @@
|
||||
# Patches for Qt must be at the very least submitted to Qt's Gerrit codereview
|
||||
# rather than their bug-report Jira. The latter is rarely reviewed by Qt.
|
||||
class Qt < Formula
|
||||
desc "Cross-platform application and UI framework"
|
||||
homepage "https://www.qt.io/"
|
||||
url "https://download.qt.io/official_releases/qt/5.10/5.10.1/single/qt-everywhere-src-5.10.1.tar.xz"
|
||||
mirror "https://www.mirrorservice.org/sites/download.qt-project.org/official_releases/qt/5.10/5.10.1/single/qt-everywhere-src-5.10.1.tar.xz"
|
||||
sha256 "05ffba7b811b854ed558abf2be2ddbd3bb6ddd0b60ea4b5da75d277ac15e740a"
|
||||
head "https://code.qt.io/qt/qt5.git", :branch => "5.10", :shallow => false
|
||||
|
||||
bottle do
|
||||
sha256 "8b4bad005596a5f8790150fe455db998ac2406f4e0f04140d6656205d844d266" => :high_sierra
|
||||
sha256 "9c488554935fb573554a4e36d36d3c81e47245b7fefc4b61edef894e67ba1740" => :sierra
|
||||
sha256 "c0407afba5951df6cc4c6f6c1c315972bd41c99cecb4e029919c4c15ab6f7bdc" => :el_capitan
|
||||
end
|
||||
|
||||
keg_only "Qt 5 has CMake issues when linked"
|
||||
|
||||
option "with-docs", "Build documentation"
|
||||
option "with-examples", "Build examples"
|
||||
option "without-proprietary-codecs", "Don't build with proprietary codecs (e.g. mp3)"
|
||||
|
||||
# OS X 10.7 Lion is still supported in Qt 5.5, but is no longer a reference
|
||||
# configuration and thus untested in practice. Builds on OS X 10.7 have been
|
||||
# reported to fail: <https://github.com/Homebrew/homebrew/issues/45284>.
|
||||
# depends_on :macos => :mountain_lion
|
||||
|
||||
depends_on "pkg-config" => :build
|
||||
depends_on :xcode => :build
|
||||
depends_on "mysql" => :optional
|
||||
depends_on "postgresql" => :optional
|
||||
|
||||
# Restore `.pc` files for framework-based build of Qt 5 on OS X. This
|
||||
# partially reverts <https://codereview.qt-project.org/#/c/140954/> merged
|
||||
# between the 5.5.1 and 5.6.0 releases. (Remove this as soon as feasible!)
|
||||
#
|
||||
# Core formulae known to fail without this patch (as of 2016-10-15):
|
||||
# * gnuplot (with `--with-qt` option)
|
||||
# * mkvtoolnix (with `--with-qt` option, silent build failure)
|
||||
# * poppler (with `--with-qt` option)
|
||||
patch do
|
||||
url "https://raw.githubusercontent.com/Homebrew/formula-patches/e8fe6567/qt5/restore-pc-files.patch"
|
||||
sha256 "48ff18be2f4050de7288bddbae7f47e949512ac4bcd126c2f504be2ac701158b"
|
||||
end
|
||||
|
||||
def install
|
||||
args = %W[
|
||||
-verbose
|
||||
-prefix #{prefix}
|
||||
-release
|
||||
-opensource -confirm-license
|
||||
-system-zlib
|
||||
-qt-libpng
|
||||
-qt-libjpeg
|
||||
-qt-freetype
|
||||
-qt-pcre
|
||||
-nomake tests
|
||||
-no-rpath
|
||||
-pkg-config
|
||||
-dbus-runtime
|
||||
]
|
||||
|
||||
args << "-nomake" << "examples" if build.without? "examples"
|
||||
|
||||
if build.with? "mysql"
|
||||
args << "-plugin-sql-mysql"
|
||||
(buildpath/"brew_shim/mysql_config").write <<~EOS
|
||||
#!/bin/sh
|
||||
if [ x"$1" = x"--libs" ]; then
|
||||
mysql_config --libs | sed "s/-lssl -lcrypto//"
|
||||
else
|
||||
exec mysql_config "$@"
|
||||
fi
|
||||
EOS
|
||||
chmod 0755, "brew_shim/mysql_config"
|
||||
args << "-mysql_config" << buildpath/"brew_shim/mysql_config"
|
||||
end
|
||||
|
||||
args << "-plugin-sql-psql" if build.with? "postgresql"
|
||||
args << "-proprietary-codecs" if build.with? "proprietary-codecs"
|
||||
|
||||
system "./configure", *args
|
||||
system "make"
|
||||
ENV.deparallelize
|
||||
system "make", "install"
|
||||
|
||||
if build.with? "docs"
|
||||
system "make", "docs"
|
||||
system "make", "install_docs"
|
||||
end
|
||||
|
||||
# Some config scripts will only find Qt in a "Frameworks" folder
|
||||
frameworks.install_symlink Dir["#{lib}/*.framework"]
|
||||
|
||||
# The pkg-config files installed suggest that headers can be found in the
|
||||
# `include` directory. Make this so by creating symlinks from `include` to
|
||||
# the Frameworks' Headers folders.
|
||||
Pathname.glob("#{lib}/*.framework/Headers") do |path|
|
||||
include.install_symlink path => path.parent.basename(".framework")
|
||||
end
|
||||
|
||||
# Move `*.app` bundles into `libexec` to expose them to `brew linkapps` and
|
||||
# because we don't like having them in `bin`.
|
||||
# (Note: This move breaks invocation of Assistant via the Help menu
|
||||
# of both Designer and Linguist as that relies on Assistant being in `bin`.)
|
||||
libexec.mkpath
|
||||
Pathname.glob("#{bin}/*.app") { |app| mv app, libexec }
|
||||
end
|
||||
|
||||
def caveats; <<~EOS
|
||||
We agreed to the Qt opensource license for you.
|
||||
If this is unacceptable you should uninstall.
|
||||
EOS
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/"hello.pro").write <<~EOS
|
||||
QT += core
|
||||
QT -= gui
|
||||
TARGET = hello
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
TEMPLATE = app
|
||||
SOURCES += main.cpp
|
||||
EOS
|
||||
|
||||
(testpath/"main.cpp").write <<~EOS
|
||||
#include <QCoreApplication>
|
||||
#include <QDebug>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication a(argc, argv);
|
||||
qDebug() << "Hello World!";
|
||||
return 0;
|
||||
}
|
||||
EOS
|
||||
|
||||
system bin/"qmake", testpath/"hello.pro"
|
||||
system "make"
|
||||
assert_predicate testpath/"hello", :exist?
|
||||
assert_predicate testpath/"main.o", :exist?
|
||||
system "./hello"
|
||||
end
|
||||
end
|
90
CI/package-macos.sh
Executable file
90
CI/package-macos.sh
Executable file
@ -0,0 +1,90 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
OSTYPE=$(uname)
|
||||
|
||||
if [ "${OSTYPE}" != "Darwin" ]; then
|
||||
echo "[obs-websocket - Error] macOS package script can be run on Darwin-type OS only."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "[obs-websocket] Preparing package build"
|
||||
export QT_CELLAR_PREFIX="$(/usr/bin/find /usr/local/Cellar/qt -d 1 | sort -t '.' -k 1,1n -k 2,2n -k 3,3n | tail -n 1)"
|
||||
|
||||
GIT_HASH=$(git rev-parse --short HEAD)
|
||||
GIT_BRANCH_OR_TAG=$(git name-rev --name-only HEAD | awk -F/ '{print $NF}')
|
||||
|
||||
VERSION="$GIT_HASH-$GIT_BRANCH_OR_TAG"
|
||||
|
||||
FILENAME_UNSIGNED="obs-websocket-$VERSION-Unsigned.pkg"
|
||||
FILENAME="obs-websocket-$VERSION.pkg"
|
||||
|
||||
echo "[obs-websocket] Modifying obs-websocket.so"
|
||||
install_name_tool \
|
||||
-change /usr/local/opt/qt/lib/QtWidgets.framework/Versions/5/QtWidgets \
|
||||
@executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets \
|
||||
-change /usr/local/opt/qt/lib/QtGui.framework/Versions/5/QtGui \
|
||||
@executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui \
|
||||
-change /usr/local/opt/qt/lib/QtCore.framework/Versions/5/QtCore \
|
||||
@executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore \
|
||||
./build/obs-websocket.so
|
||||
|
||||
# Check if replacement worked
|
||||
echo "[obs-websocket] Dependencies for obs-websocket"
|
||||
otool -L ./build/obs-websocket.so
|
||||
|
||||
if [[ "$RELEASE_MODE" == "True" ]]; then
|
||||
echo "[obs-websocket] Signing plugin binary: obs-websocket.so"
|
||||
codesign --sign "$CODE_SIGNING_IDENTITY" ./build/obs-websocket.so
|
||||
else
|
||||
echo "[obs-websocket] Skipped plugin codesigning"
|
||||
fi
|
||||
|
||||
echo "[obs-websocket] Actual package build"
|
||||
packagesbuild ./CI/macos/obs-websocket.pkgproj
|
||||
|
||||
echo "[obs-websocket] Renaming obs-websocket.pkg to $FILENAME"
|
||||
mv ./release/obs-websocket.pkg ./release/$FILENAME_UNSIGNED
|
||||
|
||||
if [[ "$RELEASE_MODE" == "True" ]]; then
|
||||
echo "[obs-websocket] Signing installer: $FILENAME"
|
||||
productsign \
|
||||
--sign "$INSTALLER_SIGNING_IDENTITY" \
|
||||
./release/$FILENAME_UNSIGNED \
|
||||
./release/$FILENAME
|
||||
rm ./release/$FILENAME_UNSIGNED
|
||||
|
||||
echo "[obs-websocket] Submitting installer $FILENAME for notarization"
|
||||
zip -r ./release/$FILENAME.zip ./release/$FILENAME
|
||||
UPLOAD_RESULT=$(xcrun altool \
|
||||
--notarize-app \
|
||||
--primary-bundle-id "fr.palakis.obs-websocket" \
|
||||
--username "$AC_USERNAME" \
|
||||
--password "$AC_PASSWORD" \
|
||||
--asc-provider "$AC_PROVIDER_SHORTNAME" \
|
||||
--file "./release/$FILENAME.zip")
|
||||
rm ./release/$FILENAME.zip
|
||||
|
||||
REQUEST_UUID=$(echo $UPLOAD_RESULT | awk -F ' = ' '/RequestUUID/ {print $2}')
|
||||
echo "Request UUID: $REQUEST_UUID"
|
||||
|
||||
echo "[obs-websocket] Wait for notarization result"
|
||||
# Pieces of code borrowed from rednoah/notarized-app
|
||||
while sleep 30 && date; do
|
||||
CHECK_RESULT=$(xcrun altool \
|
||||
--notarization-info "$REQUEST_UUID" \
|
||||
--username "$AC_USERNAME" \
|
||||
--password "$AC_PASSWORD" \
|
||||
--asc-provider "$AC_PROVIDER_SHORTNAME")
|
||||
echo $CHECK_RESULT
|
||||
|
||||
if ! grep -q "Status: in progress" <<< "$CHECK_RESULT"; then
|
||||
echo "[obs-websocket] Staple ticket to installer: $FILENAME"
|
||||
xcrun stapler staple ./release/$FILENAME
|
||||
break
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "[obs-websocket] Skipped installer codesigning and notarization"
|
||||
fi
|
24
CI/package-ubuntu.sh
Executable file
24
CI/package-ubuntu.sh
Executable file
@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
export GIT_HASH=$(git rev-parse --short HEAD)
|
||||
export PKG_VERSION="1-$GIT_HASH-$BRANCH_SHORT_NAME-git"
|
||||
|
||||
if [[ $BRANCH_FULL_NAME =~ ^refs/tags/ ]]; then
|
||||
export PKG_VERSION="$BRANCH_SHORT_NAME"
|
||||
echo "[obs-websocket] Branch is a tag. Setting version to `$PKG_VERSION`."
|
||||
fi
|
||||
|
||||
cd ./build
|
||||
|
||||
PAGER="cat" sudo checkinstall -y --type=debian --fstrans=no --nodoc \
|
||||
--backup=no --deldoc=yes --install=no \
|
||||
--pkgname=obs-websocket --pkgversion="$PKG_VERSION" \
|
||||
--pkglicense="GPLv2.0" --maintainer="stephane.lepin@gmail.com" \
|
||||
--pkggroup="video" \
|
||||
--pkgsource="https://github.com/Palakis/obs-websocket" \
|
||||
--requires="obs-studio \(\>= 25.0.7\), libqt5core5a, libqt5widgets5, qt5-image-formats-plugins" \
|
||||
--pakdir="../package"
|
||||
|
||||
sudo chmod ao+r ../package/*
|
12
CI/package-windows.cmd
Normal file
12
CI/package-windows.cmd
Normal file
@ -0,0 +1,12 @@
|
||||
mkdir package
|
||||
cd package
|
||||
|
||||
git rev-parse --short HEAD > package-version.txt
|
||||
set /p PackageVersion=<package-version.txt
|
||||
del package-version.txt
|
||||
|
||||
REM Package ZIP archive
|
||||
7z a "obs-websocket-%PackageVersion%-Windows.zip" "..\release\*"
|
||||
|
||||
REM Build installer
|
||||
iscc ..\installer\installer.iss /O. /F"obs-websocket-%PackageVersion%-Windows-Installer"
|
37
CI/prepare-obs-windows.cmd
Normal file
37
CI/prepare-obs-windows.cmd
Normal file
@ -0,0 +1,37 @@
|
||||
|
||||
@echo off
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
|
||||
REM If obs-studio directory does not exist, clone the git repo
|
||||
if not exist %OBSPath% (
|
||||
echo obs-studio directory does not exist
|
||||
git clone https://github.com/obsproject/obs-studio %OBSPath%
|
||||
cd /D %OBSPath%\
|
||||
git describe --tags --abbrev=0 --exclude="*-rc*" > "%OBSPath%\obs-studio-latest-tag.txt"
|
||||
set /p OBSLatestTag=<"%OBSPath%\obs-studio-latest-tag.txt"
|
||||
)
|
||||
|
||||
REM Prepare OBS Studio builds
|
||||
|
||||
echo Running CMake...
|
||||
cd /D %OBSPath%
|
||||
echo git checkout %OBSLatestTag%
|
||||
git checkout %OBSLatestTag%
|
||||
echo:
|
||||
|
||||
if not exist build32 mkdir build32
|
||||
if not exist build64 mkdir build64
|
||||
|
||||
echo Running cmake for obs-studio %OBSLatestTag% 32-bit...
|
||||
cd build32
|
||||
cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_SYSTEM_VERSION=10.0 -DQTDIR="%QTDIR32%" -DDepsPath="%DepsPath32%" -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 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0 -DQTDIR="%QTDIR64%" -DDepsPath="%DepsPath64%" -DDISABLE_PLUGINS=true -DCOPIED_DEPENDENCIES=false -DCOPY_DEPENDENCIES=true ..
|
||||
echo:
|
||||
echo:
|
||||
|
||||
dir "%OBSPath%\libobs"
|
7
CI/prepare-windows.cmd
Normal file
7
CI/prepare-windows.cmd
Normal file
@ -0,0 +1,7 @@
|
||||
mkdir build32
|
||||
mkdir build64
|
||||
|
||||
cd build32
|
||||
cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_SYSTEM_VERSION=10.0 -DQTDIR="%QTDIR32%" -DLibObs_DIR="%OBSPath%\build32\libobs" -DLIBOBS_INCLUDE_DIR="%OBSPath%\libobs" -DLIBOBS_LIB="%OBSPath%\build32\libobs\%build_config%\obs.lib" -DOBS_FRONTEND_LIB="%OBSPath%\build32\UI\obs-frontend-api\%build_config%\obs-frontend-api.lib" ..
|
||||
cd ..\build64
|
||||
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0 -DQTDIR="%QTDIR64%" -DLibObs_DIR="%OBSPath%\build64\libobs" -DLIBOBS_INCLUDE_DIR="%OBSPath%\libobs" -DLIBOBS_LIB="%OBSPath%\build64\libobs\%build_config%\obs.lib" -DOBS_FRONTEND_LIB="%OBSPath%\build64\UI\obs-frontend-api\%build_config%\obs-frontend-api.lib" ..
|
217
CMakeLists.txt
217
CMakeLists.txt
@ -1,19 +1,29 @@
|
||||
cmake_minimum_required(VERSION 3.16...3.21)
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
project(obs-websocket VERSION 4.9.0)
|
||||
|
||||
project(obs-websocket-compat VERSION 4.9.1)
|
||||
add_library(${CMAKE_PROJECT_NAME} MODULE)
|
||||
set(CMAKE_PREFIX_PATH "${QTDIR}")
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
set(PLUGIN_AUTHOR "OBS Project")
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
set(MACOS_BUNDLEID "com.obsproject.${CMAKE_PROJECT_NAME}")
|
||||
add_definitions(-DASIO_STANDALONE)
|
||||
|
||||
set(LINUX_MAINTAINER_EMAIL "tt2468@irltoolkit.com")
|
||||
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
|
||||
set(CMAKE_CXX_FLAGS "-mfpu=neon")
|
||||
endif()
|
||||
|
||||
target_compile_definitions(obs-websocket-compat PRIVATE ASIO_STANDALONE)
|
||||
if (WIN32 OR APPLE)
|
||||
include(external/FindLibObs.cmake)
|
||||
endif()
|
||||
|
||||
target_sources(
|
||||
${CMAKE_PROJECT_NAME}
|
||||
PRIVATE src/obs-websocket.cpp
|
||||
find_package(LibObs REQUIRED)
|
||||
find_package(Qt5 REQUIRED COMPONENTS Core Widgets)
|
||||
|
||||
set(obs-websocket_SOURCES
|
||||
src/obs-websocket.cpp
|
||||
src/WSServer.cpp
|
||||
src/ConnectionProperties.cpp
|
||||
src/WSRequestHandler.cpp
|
||||
@ -26,7 +36,6 @@ target_sources(
|
||||
src/WSRequestHandler_SceneItems.cpp
|
||||
src/WSRequestHandler_Sources.cpp
|
||||
src/WSRequestHandler_Streaming.cpp
|
||||
src/WSRequestHandler_VirtualCam.cpp
|
||||
src/WSRequestHandler_StudioMode.cpp
|
||||
src/WSRequestHandler_Transitions.cpp
|
||||
src/WSRequestHandler_Outputs.cpp
|
||||
@ -38,7 +47,9 @@ target_sources(
|
||||
src/rpc/RpcResponse.cpp
|
||||
src/rpc/RpcEvent.cpp
|
||||
src/protocol/OBSRemoteProtocol.cpp
|
||||
src/forms/settings-dialog.cpp
|
||||
src/forms/settings-dialog.cpp)
|
||||
|
||||
set(obs-websocket_HEADERS
|
||||
src/obs-websocket.h
|
||||
src/WSServer.h
|
||||
src/ConnectionProperties.h
|
||||
@ -52,66 +63,158 @@ target_sources(
|
||||
src/protocol/OBSRemoteProtocol.h
|
||||
src/forms/settings-dialog.h)
|
||||
|
||||
target_include_directories(
|
||||
obs-websocket-compat PRIVATE ${CMAKE_SOURCE_DIR}/deps/asio/asio/include
|
||||
${CMAKE_SOURCE_DIR}/deps/websocketpp)
|
||||
|
||||
# /!\ TAKE NOTE: No need to edit things past this point /!\
|
||||
|
||||
find_package(libobs REQUIRED)
|
||||
find_package(obs-frontend-api REQUIRED)
|
||||
include(cmake/ObsPluginHelpers.cmake)
|
||||
find_qt(COMPONENTS Widgets Core)
|
||||
|
||||
# --- Platform-independent build settings ---
|
||||
add_library(obs-websocket MODULE
|
||||
${obs-websocket_SOURCES}
|
||||
${obs-websocket_HEADERS})
|
||||
|
||||
target_include_directories(${CMAKE_PROJECT_NAME}
|
||||
PRIVATE ${CMAKE_SOURCE_DIR}/src)
|
||||
include_directories(
|
||||
"${LIBOBS_INCLUDE_DIR}/../UI/obs-frontend-api"
|
||||
${Qt5Core_INCLUDES}
|
||||
${Qt5Widgets_INCLUDES}
|
||||
"${CMAKE_SOURCE_DIR}/deps/asio/asio/include"
|
||||
"${CMAKE_SOURCE_DIR}/deps/websocketpp")
|
||||
|
||||
target_link_libraries(
|
||||
${CMAKE_PROJECT_NAME} PRIVATE OBS::libobs OBS::obs-frontend-api Qt::Core
|
||||
Qt::Widgets)
|
||||
|
||||
set_target_properties(
|
||||
${CMAKE_PROJECT_NAME}
|
||||
PROPERTIES AUTOMOC ON
|
||||
AUTOUIC ON
|
||||
AUTORCC ON)
|
||||
|
||||
target_compile_features(${CMAKE_PROJECT_NAME} PRIVATE cxx_std_17)
|
||||
target_link_libraries(obs-websocket
|
||||
libobs
|
||||
Qt5::Core
|
||||
Qt5::Widgets)
|
||||
|
||||
# --- End of section ---
|
||||
|
||||
# --- Windows-specific build settings and tasks ---
|
||||
if(OS_WINDOWS)
|
||||
configure_file(cmake/bundle/windows/installer-Windows.iss.in
|
||||
${CMAKE_BINARY_DIR}/installer-Windows.generated.iss)
|
||||
if(WIN32)
|
||||
if(NOT DEFINED OBS_FRONTEND_LIB)
|
||||
set(OBS_FRONTEND_LIB "OBS_FRONTEND_LIB-NOTFOUND" CACHE FILEPATH "OBS frontend library")
|
||||
message(FATAL_ERROR "Could not find OBS Frontend API's library !")
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE /MP /d2FH4-)
|
||||
# Enable Multicore Builds and disable FH4 (to not depend on VCRUNTIME140_1.DLL)
|
||||
add_definitions(/MP /d2FH4-)
|
||||
endif()
|
||||
# --- End of section ---
|
||||
|
||||
# -- macOS specific build settings and tasks --
|
||||
elseif(OS_MACOS)
|
||||
configure_file(cmake/bundle/macos/installer-macos.pkgproj.in
|
||||
${CMAKE_BINARY_DIR}/installer-macos.generated.pkgproj)
|
||||
add_definitions(-D_WEBSOCKETPP_CPP11_STL_)
|
||||
|
||||
set(MACOSX_PLUGIN_GUI_IDENTIFIER "${MACOS_BUNDLEID}")
|
||||
set(MACOSX_PLUGIN_BUNDLE_VERSION "${CMAKE_PROJECT_VERSION}")
|
||||
set(MACOSX_PLUGIN_SHORT_VERSION_STRING "1")
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(ARCH_NAME "64bit")
|
||||
set(OBS_BUILDDIR_ARCH "build64")
|
||||
else()
|
||||
set(ARCH_NAME "32bit")
|
||||
set(OBS_BUILDDIR_ARCH "build32")
|
||||
endif()
|
||||
|
||||
target_compile_options(
|
||||
${CMAKE_PROJECT_NAME} PRIVATE -Werror-implicit-function-declaration
|
||||
-stdlib=libc++ -fvisibility=default)
|
||||
include_directories(
|
||||
"${LIBOBS_INCLUDE_DIR}/../${OBS_BUILDDIR_ARCH}/UI"
|
||||
)
|
||||
|
||||
set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES PREFIX "")
|
||||
# --- End of section ---
|
||||
target_link_libraries(obs-websocket
|
||||
"${OBS_FRONTEND_LIB}")
|
||||
|
||||
# --- Release package helper ---
|
||||
# The "release" folder has a structure similar OBS' one on Windows
|
||||
set(RELEASE_DIR "${PROJECT_SOURCE_DIR}/release")
|
||||
|
||||
add_custom_command(TARGET obs-websocket POST_BUILD
|
||||
# If config is Release, package release files
|
||||
COMMAND if $<CONFIG:Release>==1 (
|
||||
"${CMAKE_COMMAND}" -E make_directory
|
||||
"${RELEASE_DIR}/data/obs-plugins/obs-websocket"
|
||||
"${RELEASE_DIR}/obs-plugins/${ARCH_NAME}")
|
||||
|
||||
COMMAND if $<CONFIG:Release>==1 ("${CMAKE_COMMAND}" -E copy_directory
|
||||
"${PROJECT_SOURCE_DIR}/data"
|
||||
"${RELEASE_DIR}/data/obs-plugins/obs-websocket")
|
||||
|
||||
COMMAND if $<CONFIG:Release>==1 ("${CMAKE_COMMAND}" -E copy
|
||||
"$<TARGET_FILE:obs-websocket>"
|
||||
"${RELEASE_DIR}/obs-plugins/${ARCH_NAME}")
|
||||
|
||||
# In Release mode, copy Qt image format plugins
|
||||
COMMAND if $<CONFIG:Release>==1 (
|
||||
"${CMAKE_COMMAND}" -E copy
|
||||
"${QTDIR}/plugins/imageformats/qjpeg.dll"
|
||||
"${RELEASE_DIR}/bin/${ARCH_NAME}/imageformats/qjpeg.dll")
|
||||
COMMAND if $<CONFIG:RelWithDebInfo>==1 (
|
||||
"${CMAKE_COMMAND}" -E copy
|
||||
"${QTDIR}/plugins/imageformats/qjpeg.dll"
|
||||
"${RELEASE_DIR}/bin/${ARCH_NAME}/imageformats/qjpeg.dll")
|
||||
|
||||
# If config is RelWithDebInfo, package release files
|
||||
COMMAND if $<CONFIG:RelWithDebInfo>==1 (
|
||||
"${CMAKE_COMMAND}" -E make_directory
|
||||
"${RELEASE_DIR}/data/obs-plugins/obs-websocket"
|
||||
"${RELEASE_DIR}/obs-plugins/${ARCH_NAME}")
|
||||
|
||||
COMMAND if $<CONFIG:RelWithDebInfo>==1 ("${CMAKE_COMMAND}" -E copy_directory
|
||||
"${PROJECT_SOURCE_DIR}/data"
|
||||
"${RELEASE_DIR}/data/obs-plugins/obs-websocket")
|
||||
|
||||
COMMAND if $<CONFIG:RelWithDebInfo>==1 ("${CMAKE_COMMAND}" -E copy
|
||||
"$<TARGET_FILE:obs-websocket>"
|
||||
"${RELEASE_DIR}/obs-plugins/${ARCH_NAME}")
|
||||
|
||||
COMMAND if $<CONFIG:RelWithDebInfo>==1 ("${CMAKE_COMMAND}" -E copy
|
||||
"$<TARGET_PDB_FILE:obs-websocket>"
|
||||
"${RELEASE_DIR}/obs-plugins/${ARCH_NAME}")
|
||||
|
||||
# Copy to obs-studio dev environment for immediate testing
|
||||
COMMAND if $<CONFIG:Debug>==1 (
|
||||
"${CMAKE_COMMAND}" -E copy
|
||||
"$<TARGET_FILE:obs-websocket>"
|
||||
"${LIBOBS_INCLUDE_DIR}/../${OBS_BUILDDIR_ARCH}/rundir/$<CONFIG>/obs-plugins/${ARCH_NAME}")
|
||||
|
||||
COMMAND if $<CONFIG:Debug>==1 (
|
||||
"${CMAKE_COMMAND}" -E copy
|
||||
"$<TARGET_PDB_FILE:obs-websocket>"
|
||||
"${LIBOBS_INCLUDE_DIR}/../${OBS_BUILDDIR_ARCH}/rundir/$<CONFIG>/obs-plugins/${ARCH_NAME}")
|
||||
|
||||
COMMAND if $<CONFIG:Debug>==1 (
|
||||
"${CMAKE_COMMAND}" -E make_directory
|
||||
"${LIBOBS_INCLUDE_DIR}/../${OBS_BUILDDIR_ARCH}/rundir/$<CONFIG>/data/obs-plugins/obs-websocket")
|
||||
|
||||
COMMAND if $<CONFIG:Debug>==1 (
|
||||
"${CMAKE_COMMAND}" -E copy_directory
|
||||
"${PROJECT_SOURCE_DIR}/data"
|
||||
"${LIBOBS_INCLUDE_DIR}/../${OBS_BUILDDIR_ARCH}/rundir/$<CONFIG>/data/obs-plugins/obs-websocket")
|
||||
)
|
||||
# --- End of sub-section ---
|
||||
|
||||
# --- Linux-specific build settings and tasks ---
|
||||
else()
|
||||
set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES PREFIX "")
|
||||
endif()
|
||||
# --- End of section ---
|
||||
|
||||
setup_plugin_target(${CMAKE_PROJECT_NAME})
|
||||
# --- Linux-specific build settings and tasks ---
|
||||
if(UNIX AND NOT APPLE)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
set_target_properties(obs-websocket PROPERTIES PREFIX "")
|
||||
target_link_libraries(obs-websocket obs-frontend-api)
|
||||
|
||||
file(GLOB locale_files data/locale/*.ini)
|
||||
|
||||
set(CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
|
||||
OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
|
||||
if(${USE_UBUNTU_FIX})
|
||||
install(TARGETS obs-websocket LIBRARY
|
||||
DESTINATION "/usr/lib/obs-plugins"
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
|
||||
endif()
|
||||
install(TARGETS obs-websocket LIBRARY
|
||||
DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/obs-plugins"
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
|
||||
|
||||
install(FILES ${locale_files}
|
||||
DESTINATION "${CMAKE_INSTALL_FULL_DATAROOTDIR}/obs/obs-plugins/obs-websocket/locale")
|
||||
endif()
|
||||
# --- End of section ---
|
||||
|
||||
# -- OS X specific build settings and tasks --
|
||||
if(APPLE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -fvisibility=default")
|
||||
|
||||
set(CMAKE_SKIP_RPATH TRUE)
|
||||
set_target_properties(obs-websocket PROPERTIES PREFIX "")
|
||||
target_link_libraries(obs-websocket "${OBS_FRONTEND_LIB}")
|
||||
endif()
|
||||
# -- End of section --
|
||||
|
@ -1,5 +1,9 @@
|
||||
# obs-websocket
|
||||
|
||||
<p align="center">
|
||||
<img src="/.github/images/obsws_logo.png" width=150 align="center">
|
||||
</p>
|
||||
|
||||
WebSockets API for OBS Studio.
|
||||
|
||||
[](https://dev.azure.com/Palakis/obs-websocket/_build/latest?definitionId=2&branchName=4.x-current)
|
||||
@ -48,13 +52,10 @@ Here's a list of available language APIs for obs-websocket :
|
||||
- Python 3.6+ with asyncio: [simpleobsws](https://github.com/IRLToolkit/simpleobsws) by tt2468
|
||||
- Java 8+: [obs-websocket-java](https://github.com/Twasi/websocket-obs-java) by TwasiNET
|
||||
- Java 11+: [obs-java-client](https://github.com/harm27/obs-java-client) by harm27
|
||||
- Go: [go-obs-websocket](https://github.com/christopher-dG/go-obs-websocket) by Chris de Graaf
|
||||
- Go: [goobs](https://github.com/andreykaipov/goobs) by Andrey Kaipov
|
||||
- Golang: [go-obs-websocket](https://github.com/christopher-dG/go-obs-websocket) by Chris de Graaf
|
||||
- Rust: [obws](https://github.com/dnaka91/obws) by dnaka91
|
||||
- Dart: [obs_websocket](https://pub.dev/packages/obs_websocket) by faithoflifedev
|
||||
- HTTP API: [obs-websocket-http](https://github.com/IRLToolkit/obs-websocket-http) by tt2468
|
||||
- CLI: [obs-cli](https://github.com/leafac/obs-cli) by leafac
|
||||
- Godot: [obs-websocket-gd](https://github.com/you-win/obs-websocket-gd) by you-win
|
||||
|
||||
I'd like to know what you're building with or for obs-websocket. If you do something in this fashion, feel free to drop a message in `#project-showoff` in the [discord server!](https://discord.gg/WBaSQ3A)
|
||||
|
||||
|
183
azure-pipelines.yml
Normal file
183
azure-pipelines.yml
Normal file
@ -0,0 +1,183 @@
|
||||
variables:
|
||||
isReleaseMode: ${{ startsWith(variables['Build.SourceBranch'], 'refs/tags/') }}
|
||||
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- '4.x-current'
|
||||
tags:
|
||||
include:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
- job: 'GenerateDocs'
|
||||
condition: |
|
||||
or(
|
||||
eq(variables['Build.SourceBranch'], 'refs/heads/4.x-current'),
|
||||
eq(variables['Build.SourceBranch'], 'refs/heads/master')
|
||||
)
|
||||
pool:
|
||||
vmImage: 'ubuntu-18.04'
|
||||
steps:
|
||||
- checkout: self
|
||||
submodules: false
|
||||
|
||||
- script: ./CI/generate-docs.sh
|
||||
displayName: 'Generate docs'
|
||||
env:
|
||||
CHECKOUT_REF: $(Build.SourceBranch)
|
||||
GH_TOKEN: $(GithubToken)
|
||||
|
||||
- job: 'Build_Windows'
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
variables:
|
||||
build_config: RelWithDebInfo
|
||||
DepsBasePath: 'D:\obsdependencies'
|
||||
DepsPath32: '$(DepsBasePath)\win32'
|
||||
DepsPath64: '$(DepsBasePath)\win64'
|
||||
QtBaseDir: 'D:\QtDep'
|
||||
QTDIR32: '$(QtBaseDir)\5.10.1\msvc2017'
|
||||
QTDIR64: '$(QtBaseDir)\5.10.1\msvc2017_64'
|
||||
OBSPath: 'D:\obs-studio'
|
||||
steps:
|
||||
- checkout: self
|
||||
submodules: true
|
||||
|
||||
- script: ./CI/install-qt-win.cmd
|
||||
displayName: 'Install Qt'
|
||||
env:
|
||||
QtBaseDir: $(QtBaseDir)
|
||||
|
||||
- task: Cache@2
|
||||
displayName: Restore cached OBS Studio dependencies
|
||||
inputs:
|
||||
key: 'obsdeps | "$(Agent.OS)"'
|
||||
restoreKeys: |
|
||||
obsdeps | "$(Agent.OS)"
|
||||
path: $(DepsBasePath)
|
||||
|
||||
- script: ./CI/download-obs-deps.cmd
|
||||
displayName: 'Download OBS Studio dependencies'
|
||||
|
||||
- task: Cache@2
|
||||
displayName: Restore cached OBS Studio builds
|
||||
inputs:
|
||||
key: 'obs | "$(Agent.OS)"'
|
||||
restoreKeys: |
|
||||
obs | "$(Agent.OS)"
|
||||
path: $(OBSPath)
|
||||
|
||||
- script: ./CI/prepare-obs-windows.cmd
|
||||
displayName: 'Checkout & CMake OBS Studio'
|
||||
env:
|
||||
build_config: $(build_config)
|
||||
DepsPath32: $(DepsPath32)
|
||||
DepsPath64: $(DepsPath64)
|
||||
QTDIR32: $(QTDIR32)
|
||||
QTDIR64: $(QTDIR64)
|
||||
OBSPath: $(OBSPath)
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build OBS Studio 32-bit'
|
||||
inputs:
|
||||
msbuildArguments: '/m /p:Configuration=$(build_config)'
|
||||
solution: '$(OBSPath)\build32\obs-studio.sln'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build OBS Studio 64-bit'
|
||||
inputs:
|
||||
msbuildArguments: '/m /p:Configuration=$(build_config)'
|
||||
solution: '$(OBSPath)\build64\obs-studio.sln'
|
||||
|
||||
- script: ./CI/prepare-windows.cmd
|
||||
displayName: 'CMake obs-websocket'
|
||||
env:
|
||||
build_config: $(build_config)
|
||||
QTDIR32: $(QTDIR32)
|
||||
QTDIR64: $(QTDIR64)
|
||||
OBSPath: $(OBSPath)
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build obs-websocket 32-bit'
|
||||
inputs:
|
||||
msbuildArguments: '/m /p:Configuration=$(build_config)'
|
||||
solution: '.\build32\obs-websocket.sln'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build obs-websocket 64-bit'
|
||||
inputs:
|
||||
msbuildArguments: '/m /p:Configuration=$(build_config)'
|
||||
solution: '.\build64\obs-websocket.sln'
|
||||
|
||||
- script: ./CI/package-windows.cmd
|
||||
displayName: 'Package obs-websocket'
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Upload package artifacts'
|
||||
inputs:
|
||||
pathtoPublish: './package'
|
||||
artifactName: 'windows_build'
|
||||
|
||||
- job: 'Build_Linux'
|
||||
pool:
|
||||
vmImage: 'ubuntu-18.04'
|
||||
variables:
|
||||
BUILD_REASON: $(Build.Reason)
|
||||
BRANCH_SHORT_NAME: $(Build.SourceBranchName)
|
||||
BRANCH_FULL_NAME: $(Build.SourceBranch)
|
||||
steps:
|
||||
- checkout: self
|
||||
submodules: true
|
||||
|
||||
- script: ./CI/install-dependencies-ubuntu.sh
|
||||
displayName: 'Install dependencies'
|
||||
|
||||
- script: ./CI/build-ubuntu.sh
|
||||
displayName: 'Build obs-websocket'
|
||||
|
||||
- script: ./CI/package-ubuntu.sh
|
||||
displayName: 'Package obs-websocket'
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathtoPublish: './package'
|
||||
artifactName: 'deb_build'
|
||||
|
||||
- job: 'Build_macOS'
|
||||
pool:
|
||||
vmImage: 'macos-10.14'
|
||||
steps:
|
||||
- checkout: self
|
||||
submodules: true
|
||||
|
||||
- script: ./CI/install-dependencies-macos.sh
|
||||
displayName: 'Install dependencies'
|
||||
|
||||
- script: ./CI/install-build-obs-macos.sh
|
||||
displayName: 'Build OBS'
|
||||
|
||||
- script: ./CI/build-macos.sh
|
||||
displayName: 'Build obs-websocket'
|
||||
|
||||
- task: InstallAppleCertificate@2
|
||||
displayName: 'Install release signing certificates'
|
||||
condition: eq(variables['isReleaseMode'], true)
|
||||
inputs:
|
||||
certSecureFile: 'Certificates.p12'
|
||||
certPwd: $(secrets.macOS.certificatesImportPassword)
|
||||
|
||||
- script: ./CI/package-macos.sh
|
||||
displayName: 'Package obs-websocket'
|
||||
env:
|
||||
RELEASE_MODE: $(isReleaseMode)
|
||||
CODE_SIGNING_IDENTITY: $(secrets.macOS.codeSigningIdentity)
|
||||
INSTALLER_SIGNING_IDENTITY: $(secrets.macOS.installerSigningIdentity)
|
||||
AC_USERNAME: $(secrets.macOS.notarization.username)
|
||||
AC_PASSWORD: $(secrets.macOS.notarization.password)
|
||||
AC_PROVIDER_SHORTNAME: $(secrets.macOS.notarization.providerShortName)
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathtoPublish: './release'
|
||||
artifactName: 'macos_build'
|
@ -1,83 +0,0 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"obs-studio": {
|
||||
"version": "28.0.0-beta2",
|
||||
"repository": "https://github.com/obsproject/obs-studio.git",
|
||||
"branch": "master",
|
||||
"hash": "6c2860a4ecd69f95f6573b8917d77bbcea203669"
|
||||
},
|
||||
"prebuilt": {
|
||||
"version": "2022-08-02",
|
||||
"baseUrl": "https://github.com/obsproject/obs-deps/releases/download",
|
||||
"label": "Pre-built obs-deps",
|
||||
"hashes": {
|
||||
"macos-x86_64": "7637e52305e6fc53014b5aabd583f1a4490b1d97450420e977cae9a336a29525",
|
||||
"macos-arm64": "755e0fa69b17a3ae444e1befa9d91d77e3cafe628fbd1c6333686091826595cd",
|
||||
"macos-universal": "de057e73e6fe0825664c258ca2dd6798c41ae580bf4d896e1647676a4941934a",
|
||||
"windows-x64": "2192d8ce780c4281b807cd457994963669e5202659ecd92f19b54c3e7d0c1915",
|
||||
"windows-x86": "9f8582ab5891b000869d6484ea591add9fbac9f1c91b56c7b85fdfd56a261c1b"
|
||||
}
|
||||
},
|
||||
"qt5": {
|
||||
"version": "2022-08-02",
|
||||
"baseUrl": "https://github.com/obsproject/obs-deps/releases/download",
|
||||
"label": "Pre-built Qt5",
|
||||
"hashes": {
|
||||
"macos-x86_64": "3d0381a52b0e4d49967936c4357f79ac711f43564329304a6db5c90edadd2697",
|
||||
"macos-arm64": "f4b32548c0530f121956bf0a9a70c36ecbbfca81073d39c396a1759baf2a05c3",
|
||||
"macos-universal": "9a6cf3b9a6c9efee6ba10df649202e8075e99f3c54ae88dc9a36dbc9d7471c1e",
|
||||
"windows-x64": "6488a33a474f750d5a4a268a5e20c78bb40799d99136a1b7ce3365a843cb2fd7",
|
||||
"windows-x86": "a916e09b0a874036801deab2c8a7ec14fdf5d268aa5511eac5bf40727e0c4e33"
|
||||
},
|
||||
"pdb-hashes": {
|
||||
"windows-x64": "e0e5070143fcad9311a68ce5685d8ba8f34f581ed6942b7a92d360f94ca1ba11",
|
||||
"windows-x86": "36642d1052aa461964f46c17610477b0d9b9defbe2d745ccaacb85f805c1bec2"
|
||||
}
|
||||
},
|
||||
"qt6": {
|
||||
"version": "2022-08-02",
|
||||
"baseUrl": "https://github.com/obsproject/obs-deps/releases/download",
|
||||
"label": "Pre-built Qt6",
|
||||
"hashes": {
|
||||
"macos-x86_64": "a83f72a11023b03b6cb2dc365f0a66ad9df31163bbb4fe2df32d601856a9fad3",
|
||||
"macos-arm64": "2f30af90c049670a5660656adbb440668aa1b0567f75a5f29e1def9108928403",
|
||||
"macos-universal": "252e6684f43ab9c6f262c73af739e2296ce391b998da2c4ee04c254aaa07db18",
|
||||
"windows-x64": "e5509b54196a3f935250cc4b9c54160c8e588fd0f92bc078a2a64f9d9e2e4e93",
|
||||
"windows-x86": "24fc03bef153a0e027c1479e42eb08097a4ea1d70a4710825be0783d0626cb0d"
|
||||
},
|
||||
"pdb-hashes": {
|
||||
"windows-x64": "60e5b1d2bc4d7c431bc05f14e3b1e85e088788c372fa85f58717cd6c49555a46",
|
||||
"windows-x86": "f34d1a89fc85d92913bd6c7f75ec5c28471d74db708c98161100bc8b75f8fc63"
|
||||
}
|
||||
}
|
||||
},
|
||||
"platformConfig": {
|
||||
"macos-x86_64": {
|
||||
"qtVersion": 6,
|
||||
"deploymentTarget": "10.15"
|
||||
},
|
||||
"macos-arm64": {
|
||||
"qtVersion": 6,
|
||||
"deploymentTarget": "11.0"
|
||||
},
|
||||
"macos-universal": {
|
||||
"qtVersion": 6,
|
||||
"deploymentTarget": "10.15"
|
||||
},
|
||||
"windows-x64": {
|
||||
"qtVersion": 6,
|
||||
"visualStudio": "Visual Studio 17 2022",
|
||||
"platformSDK": "10.0.20348.0"
|
||||
},
|
||||
"windows-x86": {
|
||||
"qtVersion": 6,
|
||||
"visualStudio": "Visual Studio 17 2022",
|
||||
"platformSDK": "10.0.20348.0"
|
||||
},
|
||||
"linux-x86_64": {
|
||||
"qtVersion": 6
|
||||
}
|
||||
},
|
||||
"name": "obs-websocket-compat",
|
||||
"version": "4.9.1"
|
||||
}
|
@ -1,506 +0,0 @@
|
||||
if(POLICY CMP0087)
|
||||
cmake_policy(SET CMP0087 NEW)
|
||||
endif()
|
||||
|
||||
set(OBS_STANDALONE_PLUGIN_DIR ${CMAKE_SOURCE_DIR}/release)
|
||||
set(INCLUDED_LIBOBS_CMAKE_MODULES ON)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
|
||||
set(OS_MACOS ON)
|
||||
set(OS_POSIX ON)
|
||||
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux|FreeBSD|OpenBSD")
|
||||
set(OS_POSIX ON)
|
||||
string(TOUPPER "${CMAKE_SYSTEM_NAME}" _SYSTEM_NAME_U)
|
||||
set(OS_${_SYSTEM_NAME_U} ON)
|
||||
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
set(OS_WINDOWS ON)
|
||||
set(OS_POSIX OFF)
|
||||
endif()
|
||||
|
||||
# Old-Style plugin detected, find "modern" libobs variant instead and set global
|
||||
# include directories to fix "bad" plugin behaviour
|
||||
if(DEFINED LIBOBS_INCLUDE_DIR AND NOT TARGET OBS::libobs)
|
||||
message(
|
||||
DEPRECATION
|
||||
"You are using an outdated method of adding 'libobs' to your project. Refer to the updated wiki on how to build and export 'libobs' and use it in your plugin projects."
|
||||
)
|
||||
find_package(libobs REQUIRED)
|
||||
if(TARGET OBS::libobs)
|
||||
set_target_properties(OBS::libobs PROPERTIES IMPORTED_GLOBAL TRUE)
|
||||
message(STATUS "OBS: Using modern libobs target")
|
||||
|
||||
add_library(libobs ALIAS OBS::libobs)
|
||||
if(OS_WINDOWS)
|
||||
add_library(w32-pthreads ALIAS OBS::w32-pthreads)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND (OS_WINDOWS OR OS_MACOS))
|
||||
set(CMAKE_INSTALL_PREFIX
|
||||
${OBS_STANDALONE_PLUGIN_DIR}
|
||||
CACHE STRING "Directory to install OBS plugin after building" FORCE)
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE
|
||||
"RelWithDebInfo"
|
||||
CACHE STRING
|
||||
"OBS build type [Release, RelWithDebInfo, Debug, MinSizeRel]" FORCE)
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS Release RelWithDebInfo
|
||||
Debug MinSizeRel)
|
||||
endif()
|
||||
|
||||
if(NOT QT_VERSION)
|
||||
set(QT_VERSION
|
||||
AUTO
|
||||
CACHE STRING "OBS Qt version [AUTO, 5, 6]" FORCE)
|
||||
set_property(CACHE QT_VERSION PROPERTY STRINGS AUTO 5 6)
|
||||
endif()
|
||||
|
||||
macro(find_qt)
|
||||
set(multiValueArgs COMPONENTS COMPONENTS_WIN COMPONENTS_MAC COMPONENTS_LINUX)
|
||||
cmake_parse_arguments(FIND_QT "" "${oneValueArgs}" "${multiValueArgs}"
|
||||
${ARGN})
|
||||
set(QT_NO_CREATE_VERSIONLESS_TARGETS ON)
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS Core
|
||||
QUIET)
|
||||
find_package(
|
||||
Qt6
|
||||
COMPONENTS Core
|
||||
QUIET)
|
||||
|
||||
if(NOT _QT_VERSION AND QT_VERSION STREQUAL AUTO)
|
||||
if(TARGET Qt6::Core)
|
||||
set(_QT_VERSION
|
||||
6
|
||||
CACHE INTERNAL "")
|
||||
elseif(TARGET Qt5::Core)
|
||||
set(_QT_VERSION
|
||||
5
|
||||
CACHE INTERNAL "")
|
||||
endif()
|
||||
message(STATUS "Qt version: ${_QT_VERSION}")
|
||||
elseif(NOT _QT_VERSION)
|
||||
if(TARGET Qt${QT_VERSION}::Core)
|
||||
set(_QT_VERSION
|
||||
${QT_VERSION}
|
||||
CACHE INTERNAL "")
|
||||
else()
|
||||
if(QT_VERSION EQUAL 6)
|
||||
set(FALLBACK_QT_VERSION 5)
|
||||
else()
|
||||
set(FALLBACK_QT_VERSION 6)
|
||||
endif()
|
||||
message(
|
||||
WARNING
|
||||
"Qt${QT_VERSION} was not found, falling back to Qt${FALLBACK_QT_VERSION}"
|
||||
)
|
||||
|
||||
if(TARGET Qt${FALLBACK_QT_VERSION}::Core)
|
||||
set(_QT_VERSION
|
||||
${FALLBACK_QT_VERSION}
|
||||
CACHE INTERNAL "")
|
||||
endif()
|
||||
endif()
|
||||
message(STATUS "Qt version: ${_QT_VERSION}")
|
||||
endif()
|
||||
|
||||
set(QT_NO_CREATE_VERSIONLESS_TARGETS OFF)
|
||||
|
||||
if(NOT _QT_VERSION)
|
||||
message(FATAL_ERROR "Neither Qt5 or Qt6 were found")
|
||||
endif()
|
||||
|
||||
if(OS_WINDOWS)
|
||||
find_package(
|
||||
Qt${_QT_VERSION}
|
||||
COMPONENTS ${FIND_QT_COMPONENTS} ${FIND_QT_COMPONENTS_WIN}
|
||||
REQUIRED)
|
||||
elseif(OS_MACOS)
|
||||
find_package(
|
||||
Qt${_QT_VERSION}
|
||||
COMPONENTS ${FIND_QT_COMPONENTS} ${FIND_QT_COMPONENTS_MAC}
|
||||
REQUIRED)
|
||||
else()
|
||||
find_package(
|
||||
Qt${_QT_VERSION}
|
||||
COMPONENTS ${FIND_QT_COMPONENTS} ${FIND_QT_COMPONENTS_LINUX}
|
||||
REQUIRED)
|
||||
endif()
|
||||
|
||||
list(APPEND FIND_QT_COMPONENTS "Core")
|
||||
|
||||
if("Gui" IN_LIST FIND_QT_COMPONENTS_LINUX)
|
||||
list(APPEND FIND_QT_COMPONENTS_LINUX "GuiPrivate")
|
||||
endif()
|
||||
|
||||
foreach(_COMPONENT IN LISTS FIND_QT_COMPONENTS FIND_QT_COMPONENTS_WIN
|
||||
FIND_QT_COMPONENTS_MAC FIND_QT_COMPONENTS_LINUX)
|
||||
if(NOT TARGET Qt::${_COMPONENT} AND TARGET Qt${_QT_VERSION}::${_COMPONENT})
|
||||
|
||||
add_library(Qt::${_COMPONENT} INTERFACE IMPORTED)
|
||||
set_target_properties(
|
||||
Qt::${_COMPONENT} PROPERTIES INTERFACE_LINK_LIBRARIES
|
||||
"Qt${_QT_VERSION}::${_COMPONENT}")
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
file(RELATIVE_PATH RELATIVE_INSTALL_PATH ${CMAKE_SOURCE_DIR}
|
||||
${CMAKE_INSTALL_PREFIX})
|
||||
file(RELATIVE_PATH RELATIVE_BUILD_PATH ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
|
||||
|
||||
# Set up OS-specific environment and helper functions
|
||||
if(OS_POSIX)
|
||||
find_program(CCACHE_PROGRAM "ccache")
|
||||
set(CCACHE_SUPPORT
|
||||
ON
|
||||
CACHE BOOL "Enable ccache support")
|
||||
mark_as_advanced(CCACHE_PROGRAM)
|
||||
if(CCACHE_PROGRAM AND CCACHE_SUPPORT)
|
||||
set(CMAKE_CXX_COMPILER_LAUNCHER
|
||||
${CCACHE_PROGRAM}
|
||||
CACHE INTERNAL "")
|
||||
set(CMAKE_C_COMPILER_LAUNCHER
|
||||
${CCACHE_PROGRAM}
|
||||
CACHE INTERNAL "")
|
||||
set(CMAKE_OBJC_COMPILER_LAUNCHER
|
||||
${CCACHE_PROGRAM}
|
||||
CACHE INTERNAL "")
|
||||
set(CMAKE_OBJCXX_COMPILER_LAUNCHER
|
||||
${CCACHE_PROGRAM}
|
||||
CACHE INTERNAL "")
|
||||
set(CMAKE_CUDA_COMPILER_LAUNCHER
|
||||
${CCACHE_PROGRAM}
|
||||
CACHE INTERNAL "") # CMake 3.9+
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(OS_MACOS)
|
||||
set(CMAKE_OSX_ARCHITECTURES
|
||||
"x86_64"
|
||||
CACHE STRING
|
||||
"OBS build architecture for macOS - x86_64 required at least")
|
||||
set_property(CACHE CMAKE_OSX_ARCHITECTURES PROPERTY STRINGS x86_64 arm64
|
||||
"x86_64;arm64")
|
||||
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET
|
||||
"10.15"
|
||||
CACHE STRING "OBS deployment target for macOS - 10.15+ required")
|
||||
set_property(CACHE CMAKE_OSX_DEPLOYMENT_TARGET PROPERTY STRINGS 10.15 11.0
|
||||
12.0 13.0)
|
||||
|
||||
set(OBS_BUNDLE_CODESIGN_IDENTITY
|
||||
"-"
|
||||
CACHE STRING "OBS code signing identity for macOS")
|
||||
set(OBS_CODESIGN_ENTITLEMENTS
|
||||
${CMAKE_SOURCE_DIR}/cmake/bundle/macos/entitlements.plist
|
||||
CACHE INTERNAL "Path to codesign entitlements plist")
|
||||
set(OBS_CODESIGN_LINKER
|
||||
ON
|
||||
CACHE BOOL "Enable linker code-signing on macOS (macOS 11+ required)")
|
||||
|
||||
# Xcode configuration
|
||||
if(XCODE)
|
||||
# Tell Xcode to pretend the linker signed binaries so that editing with
|
||||
# install_name_tool preserves ad-hoc signatures. This option is supported by
|
||||
# codesign on macOS 11 or higher. See CMake Issue 21854:
|
||||
# https://gitlab.kitware.com/cmake/cmake/-/issues/21854
|
||||
|
||||
set(CMAKE_XCODE_GENERATE_SCHEME ON)
|
||||
if(OBS_CODESIGN_LINKER)
|
||||
set(CMAKE_XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS "-o linker-signed")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Set default options for bundling on macOS
|
||||
set(CMAKE_MACOSX_RPATH ON)
|
||||
set(CMAKE_SKIP_BUILD_RPATH OFF)
|
||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH OFF)
|
||||
set(CMAKE_INSTALL_RPATH "@executable_path/../Frameworks/")
|
||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH OFF)
|
||||
|
||||
function(setup_plugin_target target)
|
||||
if(NOT DEFINED MACOSX_PLUGIN_GUI_IDENTIFIER)
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"No 'MACOSX_PLUGIN_GUI_IDENTIFIER' set, but is required to build plugin bundles on macOS - example: 'com.yourname.pluginname'"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED MACOSX_PLUGIN_BUNDLE_VERSION)
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"No 'MACOSX_PLUGIN_BUNDLE_VERSION' set, but is required to build plugin bundles on macOS - example: '25'"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED MACOSX_PLUGIN_SHORT_VERSION_STRING)
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"No 'MACOSX_PLUGIN_SHORT_VERSION_STRING' set, but is required to build plugin bundles on macOS - example: '1.0.2'"
|
||||
)
|
||||
endif()
|
||||
|
||||
set(MACOSX_PLUGIN_BUNDLE_NAME
|
||||
"${target}"
|
||||
PARENT_SCOPE)
|
||||
set(MACOSX_PLUGIN_BUNDLE_VERSION
|
||||
"${MACOSX_BUNDLE_BUNDLE_VERSION}"
|
||||
PARENT_SCOPE)
|
||||
set(MACOSX_PLUGIN_SHORT_VERSION_STRING
|
||||
"${MACOSX_BUNDLE_SHORT_VERSION_STRING}"
|
||||
PARENT_SCOPE)
|
||||
set(MACOSX_PLUGIN_EXECUTABLE_NAME
|
||||
"${target}"
|
||||
PARENT_SCOPE)
|
||||
set(MACOSX_PLUGIN_BUNDLE_TYPE
|
||||
"BNDL"
|
||||
PARENT_SCOPE)
|
||||
|
||||
install(
|
||||
TARGETS ${target}
|
||||
LIBRARY DESTINATION "."
|
||||
COMPONENT obs_plugins
|
||||
NAMELINK_COMPONENT ${target}_Development)
|
||||
|
||||
if(${QT_VERSION} EQUAL 5)
|
||||
set(_QT_FW_VERSION "${QT_VERSION}")
|
||||
else()
|
||||
set(_QT_FW_VERSION "A")
|
||||
endif()
|
||||
|
||||
set(_COMMAND
|
||||
"${CMAKE_INSTALL_NAME_TOOL} \\
|
||||
-change ${CMAKE_PREFIX_PATH}/lib/QtWidgets.framework/Versions/${QT_VERSION}/QtWidgets @rpath/QtWidgets.framework/Versions/${_QT_FW_VERSION}/QtWidgets \\
|
||||
-change ${CMAKE_PREFIX_PATH}/lib/QtCore.framework/Versions/${QT_VERSION}/QtCore @rpath/QtCore.framework/Versions/${_QT_FW_VERSION}/QtCore \\
|
||||
-change ${CMAKE_PREFIX_PATH}/lib/QtGui.framework/Versions/${QT_VERSION}/QtGui @rpath/QtGui.framework/Versions/${_QT_FW_VERSION}/QtGui \\
|
||||
\\\"\${CMAKE_INSTALL_PREFIX}/${target}.plugin/Contents/MacOS/${target}\\\""
|
||||
)
|
||||
install(CODE "execute_process(COMMAND /bin/sh -c \"${_COMMAND}\")"
|
||||
COMPONENT obs_plugins)
|
||||
unset(_QT_FW_VERSION)
|
||||
|
||||
if(NOT XCODE)
|
||||
set(_COMMAND
|
||||
"/usr/bin/codesign --force \\
|
||||
--sign \\\"${OBS_BUNDLE_CODESIGN_IDENTITY}\\\" \\
|
||||
--options runtime \\
|
||||
--entitlements \\\"${CMAKE_CURRENT_FUNCTION_LIST_DIR}/bundle/macOS/entitlements.plist\\\" \\
|
||||
\\\"\${CMAKE_INSTALL_PREFIX}/${target}.plugin\\\"")
|
||||
install(CODE "execute_process(COMMAND /bin/sh -c \"${_COMMAND}\")"
|
||||
COMPONENT obs_plugins)
|
||||
endif()
|
||||
|
||||
set_target_properties(
|
||||
${target}
|
||||
PROPERTIES
|
||||
BUNDLE ON
|
||||
BUNDLE_EXTENSION "plugin"
|
||||
OUTPUT_NAME ${target}
|
||||
MACOSX_BUNDLE_INFO_PLIST
|
||||
"${CMAKE_CURRENT_FUNCTION_LIST_DIR}/bundle/macOS/Plugin-Info.plist.in"
|
||||
XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER
|
||||
"${MACOSX_PLUGIN_GUI_IDENTIFIER}"
|
||||
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "${OBS_BUNDLE_CODESIGN_IDENTITY}"
|
||||
XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS
|
||||
"${CMAKE_CURRENT_FUNCTION_LIST_DIR}/bundle/macOS/entitlements.plist")
|
||||
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND
|
||||
/bin/sh -c
|
||||
"codesign --force --sign \"-\" $<$<BOOL:${OBS_CODESIGN_LINKER}>:--options linker-signed >\"$<TARGET_BUNDLE_DIR:${target}>\""
|
||||
COMMENT "Codesigning ${target}"
|
||||
VERBATIM)
|
||||
|
||||
install_bundle_resources(${target})
|
||||
endfunction()
|
||||
|
||||
function(install_bundle_resources target)
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/data)
|
||||
file(GLOB_RECURSE _DATA_FILES "${CMAKE_CURRENT_SOURCE_DIR}/data/*")
|
||||
foreach(_DATA_FILE IN LISTS _DATA_FILES)
|
||||
file(RELATIVE_PATH _RELATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/data/
|
||||
${_DATA_FILE})
|
||||
get_filename_component(_RELATIVE_PATH ${_RELATIVE_PATH} PATH)
|
||||
target_sources(${target} PRIVATE ${_DATA_FILE})
|
||||
set_source_files_properties(
|
||||
${_DATA_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION
|
||||
Resources/${_RELATIVE_PATH})
|
||||
string(REPLACE "\\" "\\\\" _GROUP_NAME ${_RELATIVE_PATH})
|
||||
source_group("Resources\\${_GROUP_NAME}" FILES ${_DATA_FILE})
|
||||
endforeach()
|
||||
endif()
|
||||
endfunction()
|
||||
else()
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_ARCH_SUFFIX 64)
|
||||
else()
|
||||
set(_ARCH_SUFFIX 32)
|
||||
endif()
|
||||
set(OBS_OUTPUT_DIR ${CMAKE_BINARY_DIR}/rundir)
|
||||
|
||||
if(OS_POSIX)
|
||||
option(LINUX_PORTABLE "Build portable version (Linux)" ON)
|
||||
if(NOT LINUX_PORTABLE)
|
||||
set(OBS_LIBRARY_DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
set(OBS_PLUGIN_DESTINATION ${OBS_LIBRARY_DESTINATION}/obs-plugins)
|
||||
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
|
||||
set(OBS_DATA_DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/obs)
|
||||
else()
|
||||
set(OBS_LIBRARY_DESTINATION bin/${_ARCH_SUFFIX}bit)
|
||||
set(OBS_PLUGIN_DESTINATION obs-plugins/${_ARCH_SUFFIX}bit)
|
||||
set(CMAKE_INSTALL_RPATH
|
||||
"$ORIGIN/" "${CMAKE_INSTALL_PREFIX}/${OBS_LIBRARY_DESTINATION}")
|
||||
set(OBS_DATA_DESTINATION "data")
|
||||
endif()
|
||||
|
||||
if(OS_LINUX)
|
||||
set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
|
||||
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "${LINUX_MAINTAINER_EMAIL}")
|
||||
set(CPACK_PACKAGE_VERSION "${CMAKE_PROJECT_VERSION}")
|
||||
set(CPACK_PACKAGE_FILE_NAME
|
||||
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-linux-x86_64")
|
||||
|
||||
set(CPACK_GENERATOR "DEB")
|
||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS
|
||||
"obs-studio (>= 27.0.0), libqt5core5a (>= 5.9.0~beta), libqt5gui5 (>= 5.3.0), libqt5widgets5 (>= 5.7.0)"
|
||||
)
|
||||
|
||||
set(CPACK_OUTPUT_FILE_PREFIX ${CMAKE_SOURCE_DIR}/release)
|
||||
|
||||
if(NOT LINUX_PORTABLE)
|
||||
set(CPACK_SET_DESTDIR ON)
|
||||
endif()
|
||||
include(CPack)
|
||||
endif()
|
||||
else()
|
||||
set(OBS_LIBRARY_DESTINATION "bin/${_ARCH_SUFFIX}bit")
|
||||
set(OBS_LIBRARY32_DESTINATION "bin/32bit")
|
||||
set(OBS_LIBRARY64_DESTINATION "bin/64bit")
|
||||
set(OBS_PLUGIN_DESTINATION "obs-plugins/${_ARCH_SUFFIX}bit")
|
||||
set(OBS_PLUGIN32_DESTINATION "obs-plugins/32bit")
|
||||
set(OBS_PLUGIN64_DESTINATION "obs-plugins/64bit")
|
||||
|
||||
set(OBS_DATA_DESTINATION "data")
|
||||
endif()
|
||||
|
||||
function(setup_plugin_target target)
|
||||
set_target_properties(${target} PROPERTIES PREFIX "")
|
||||
|
||||
install(
|
||||
TARGETS ${target}
|
||||
RUNTIME DESTINATION "${OBS_PLUGIN_DESTINATION}"
|
||||
COMPONENT ${target}_Runtime
|
||||
LIBRARY DESTINATION "${OBS_PLUGIN_DESTINATION}"
|
||||
COMPONENT ${target}_Runtime
|
||||
NAMELINK_COMPONENT ${target}_Development)
|
||||
|
||||
install(
|
||||
FILES $<TARGET_FILE:${target}>
|
||||
DESTINATION $<CONFIG>/${OBS_PLUGIN_DESTINATION}
|
||||
COMPONENT obs_rundir
|
||||
EXCLUDE_FROM_ALL)
|
||||
|
||||
if(OS_WINDOWS)
|
||||
install(
|
||||
FILES $<TARGET_PDB_FILE:${target}>
|
||||
CONFIGURATIONS "RelWithDebInfo" "Debug"
|
||||
DESTINATION ${OBS_PLUGIN_DESTINATION}
|
||||
COMPONENT ${target}_Runtime
|
||||
OPTIONAL)
|
||||
|
||||
install(
|
||||
FILES $<TARGET_PDB_FILE:${target}>
|
||||
CONFIGURATIONS "RelWithDebInfo" "Debug"
|
||||
DESTINATION $<CONFIG>/${OBS_PLUGIN_DESTINATION}
|
||||
COMPONENT obs_rundir
|
||||
OPTIONAL EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
target_link_options(
|
||||
${target}
|
||||
PRIVATE
|
||||
"LINKER:/OPT:REF"
|
||||
"$<$<NOT:$<EQUAL:${CMAKE_SIZEOF_VOID_P},8>>:LINKER\:/SAFESEH\:NO>"
|
||||
"$<$<CONFIG:DEBUG>:LINKER\:/INCREMENTAL:NO>"
|
||||
"$<$<CONFIG:RELWITHDEBINFO>:LINKER\:/INCREMENTAL:NO>")
|
||||
endif()
|
||||
|
||||
setup_target_resources(${target} obs-plugins/${target})
|
||||
|
||||
if(OS_WINDOWS AND DEFINED OBS_BUILD_DIR)
|
||||
setup_target_for_testing(${target} obs-plugins/${target})
|
||||
endif()
|
||||
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" -DCMAKE_INSTALL_PREFIX=${OBS_OUTPUT_DIR}
|
||||
-DCMAKE_INSTALL_COMPONENT=obs_rundir
|
||||
-DCMAKE_INSTALL_CONFIG_NAME=$<CONFIG> -P
|
||||
${CMAKE_CURRENT_BINARY_DIR}/cmake_install.cmake
|
||||
COMMENT "Installing to plugin rundir"
|
||||
VERBATIM)
|
||||
endfunction()
|
||||
|
||||
function(setup_target_resources target destination)
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/data)
|
||||
install(
|
||||
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/
|
||||
DESTINATION ${OBS_DATA_DESTINATION}/${destination}
|
||||
USE_SOURCE_PERMISSIONS
|
||||
COMPONENT obs_plugins)
|
||||
|
||||
install(
|
||||
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data
|
||||
DESTINATION $<CONFIG>/${OBS_DATA_DESTINATION}/${destination}
|
||||
USE_SOURCE_PERMISSIONS
|
||||
COMPONENT obs_rundir
|
||||
EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
if(OS_WINDOWS)
|
||||
function(setup_target_for_testing target destination)
|
||||
install(
|
||||
FILES $<TARGET_FILE:${target}>
|
||||
DESTINATION $<CONFIG>/${OBS_PLUGIN_DESTINATION}
|
||||
COMPONENT obs_testing
|
||||
EXCLUDE_FROM_ALL)
|
||||
|
||||
install(
|
||||
FILES $<TARGET_PDB_FILE:${target}>
|
||||
CONFIGURATIONS "RelWithDebInfo" "Debug"
|
||||
DESTINATION $<CONFIG>/${OBS_PLUGIN_DESTINATION}
|
||||
COMPONENT obs_testing
|
||||
OPTIONAL EXCLUDE_FROM_ALL)
|
||||
|
||||
install(
|
||||
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/
|
||||
DESTINATION $<CONFIG>/${OBS_DATA_DESTINATION}/${destination}
|
||||
USE_SOURCE_PERMISSIONS
|
||||
COMPONENT obs_testing
|
||||
EXCLUDE_FROM_ALL)
|
||||
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" -DCMAKE_INSTALL_PREFIX=${OBS_BUILD_DIR}/rundir
|
||||
-DCMAKE_INSTALL_COMPONENT=obs_testing
|
||||
-DCMAKE_INSTALL_CONFIG_NAME=$<CONFIG> -P
|
||||
${CMAKE_CURRENT_BINARY_DIR}/cmake_install.cmake
|
||||
COMMENT "Installing to OBS test directory"
|
||||
VERBATIM)
|
||||
endfunction()
|
||||
endif()
|
||||
endif()
|
@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleName</key>
|
||||
<string>${MACOSX_PLUGIN_BUNDLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>${MACOSX_PLUGIN_GUI_IDENTIFIER}</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${MACOSX_PLUGIN_BUNDLE_VERSION}</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>${MACOSX_PLUGIN_SHORT_VERSION_STRING}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${MACOSX_PLUGIN_EXECUTABLE_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>${MACOSX_PLUGIN_BUNDLE_TYPE}</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>MacOSX</string>
|
||||
</array>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.13</string>
|
||||
</dict>
|
||||
</plist>
|
@ -1,17 +0,0 @@
|
||||
<!--?xml version="1.0" encoding="UTF-8"?-->
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||
<true/>
|
||||
<key>com.apple.security.device.camera</key>
|
||||
<true/>
|
||||
<key>com.apple.security.device.audio-input</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-library-validation</key>
|
||||
<true/>
|
||||
<!-- Allows @executable_path to load libaries from within the .app bundle. -->
|
||||
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
@ -1,920 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PACKAGES</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>MUST-CLOSE-APPLICATION-ITEMS</key>
|
||||
<array/>
|
||||
<key>MUST-CLOSE-APPLICATIONS</key>
|
||||
<false/>
|
||||
<key>PACKAGE_FILES</key>
|
||||
<dict>
|
||||
<key>DEFAULT_INSTALL_LOCATION</key>
|
||||
<string>/</string>
|
||||
<key>HIERARCHY</key>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>80</integer>
|
||||
<key>PATH</key>
|
||||
<string>Applications</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>509</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>BUNDLE_CAN_DOWNGRADE</key>
|
||||
<false/>
|
||||
<key>BUNDLE_POSTINSTALL_PATH</key>
|
||||
<dict>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>BUNDLE_PREINSTALL_PATH</key>
|
||||
<dict>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>80</integer>
|
||||
<key>PATH</key>
|
||||
<string>../@RELATIVE_INSTALL_PATH@/@CMAKE_PROJECT_NAME@.plugin</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>3</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>GID</key>
|
||||
<integer>80</integer>
|
||||
<key>PATH</key>
|
||||
<string>plugins</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>2</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>509</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>2</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>GID</key>
|
||||
<integer>80</integer>
|
||||
<key>PATH</key>
|
||||
<string>obs-studio</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>2</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>509</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>2</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>GID</key>
|
||||
<integer>80</integer>
|
||||
<key>PATH</key>
|
||||
<string>Application Support</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Automator</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Documentation</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Extensions</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Filesystems</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Frameworks</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Input Methods</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Internet Plug-Ins</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>LaunchAgents</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>LaunchDaemons</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>PreferencePanes</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Preferences</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>80</integer>
|
||||
<key>PATH</key>
|
||||
<string>Printers</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>PrivilegedHelperTools</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>1005</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>QuickLook</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>QuickTime</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Screen Savers</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Scripts</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Services</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Widgets</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Library</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Shared</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>1023</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>GID</key>
|
||||
<integer>80</integer>
|
||||
<key>PATH</key>
|
||||
<string>Users</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>/</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>PAYLOAD_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PRESERVE_EXTENDED_ATTRIBUTES</key>
|
||||
<false/>
|
||||
<key>SHOW_INVISIBLE</key>
|
||||
<false/>
|
||||
<key>SPLIT_FORKS</key>
|
||||
<true/>
|
||||
<key>TREAT_MISSING_FILES_AS_WARNING</key>
|
||||
<false/>
|
||||
<key>VERSION</key>
|
||||
<integer>5</integer>
|
||||
</dict>
|
||||
<key>PACKAGE_SCRIPTS</key>
|
||||
<dict>
|
||||
<key>POSTINSTALL_PATH</key>
|
||||
<dict>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>PREINSTALL_PATH</key>
|
||||
<dict>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>RESOURCES</key>
|
||||
<array/>
|
||||
</dict>
|
||||
<key>PACKAGE_SETTINGS</key>
|
||||
<dict>
|
||||
<key>AUTHENTICATION</key>
|
||||
<integer>0</integer>
|
||||
<key>CONCLUSION_ACTION</key>
|
||||
<integer>0</integer>
|
||||
<key>FOLLOW_SYMBOLIC_LINKS</key>
|
||||
<false/>
|
||||
<key>IDENTIFIER</key>
|
||||
<string>@MACOS_BUNDLEID@</string>
|
||||
<key>LOCATION</key>
|
||||
<integer>0</integer>
|
||||
<key>NAME</key>
|
||||
<string>@CMAKE_PROJECT_NAME@</string>
|
||||
<key>OVERWRITE_PERMISSIONS</key>
|
||||
<false/>
|
||||
<key>PAYLOAD_SIZE</key>
|
||||
<integer>-1</integer>
|
||||
<key>REFERENCE_PATH</key>
|
||||
<string></string>
|
||||
<key>RELOCATABLE</key>
|
||||
<false/>
|
||||
<key>USE_HFS+_COMPRESSION</key>
|
||||
<false/>
|
||||
<key>VERSION</key>
|
||||
<string>@CMAKE_PROJECT_VERSION@</string>
|
||||
</dict>
|
||||
<key>TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>UUID</key>
|
||||
<string>0B7A74BC-65CF-4FF1-AC34-5C743E8A48F5</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>PROJECT</key>
|
||||
<dict>
|
||||
<key>PROJECT_COMMENTS</key>
|
||||
<dict>
|
||||
<key>NOTES</key>
|
||||
<data>
|
||||
</data>
|
||||
</dict>
|
||||
<key>PROJECT_PRESENTATION</key>
|
||||
<dict>
|
||||
<key>BACKGROUND</key>
|
||||
<dict>
|
||||
<key>APPAREANCES</key>
|
||||
<dict>
|
||||
<key>DARK_AQUA</key>
|
||||
<dict/>
|
||||
<key>LIGHT_AQUA</key>
|
||||
<dict/>
|
||||
</dict>
|
||||
<key>SHARED_SETTINGS_FOR_ALL_APPAREANCES</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>INSTALLATION TYPE</key>
|
||||
<dict>
|
||||
<key>HIERARCHIES</key>
|
||||
<dict>
|
||||
<key>INSTALLER</key>
|
||||
<dict>
|
||||
<key>LIST</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>DESCRIPTION</key>
|
||||
<array/>
|
||||
<key>OPTIONS</key>
|
||||
<dict>
|
||||
<key>HIDDEN</key>
|
||||
<false/>
|
||||
<key>STATE</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<key>PACKAGE_UUID</key>
|
||||
<string>0B7A74BC-65CF-4FF1-AC34-5C743E8A48F5</string>
|
||||
<key>TITLE</key>
|
||||
<array/>
|
||||
<key>TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>UUID</key>
|
||||
<string>52B6084A-F58D-45C3-BE37-76AD45F16072</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>REMOVED</key>
|
||||
<dict/>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>MODE</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>INSTALLATION_STEPS</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key>
|
||||
<string>ICPresentationViewIntroductionController</string>
|
||||
<key>INSTALLER_PLUGIN</key>
|
||||
<string>Introduction</string>
|
||||
<key>LIST_TITLE_KEY</key>
|
||||
<string>InstallerSectionTitle</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key>
|
||||
<string>ICPresentationViewReadMeController</string>
|
||||
<key>INSTALLER_PLUGIN</key>
|
||||
<string>ReadMe</string>
|
||||
<key>LIST_TITLE_KEY</key>
|
||||
<string>InstallerSectionTitle</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key>
|
||||
<string>ICPresentationViewLicenseController</string>
|
||||
<key>INSTALLER_PLUGIN</key>
|
||||
<string>License</string>
|
||||
<key>LIST_TITLE_KEY</key>
|
||||
<string>InstallerSectionTitle</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key>
|
||||
<string>ICPresentationViewDestinationSelectController</string>
|
||||
<key>INSTALLER_PLUGIN</key>
|
||||
<string>TargetSelect</string>
|
||||
<key>LIST_TITLE_KEY</key>
|
||||
<string>InstallerSectionTitle</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key>
|
||||
<string>ICPresentationViewInstallationTypeController</string>
|
||||
<key>INSTALLER_PLUGIN</key>
|
||||
<string>PackageSelection</string>
|
||||
<key>LIST_TITLE_KEY</key>
|
||||
<string>InstallerSectionTitle</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key>
|
||||
<string>ICPresentationViewInstallationController</string>
|
||||
<key>INSTALLER_PLUGIN</key>
|
||||
<string>Install</string>
|
||||
<key>LIST_TITLE_KEY</key>
|
||||
<string>InstallerSectionTitle</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key>
|
||||
<string>ICPresentationViewSummaryController</string>
|
||||
<key>INSTALLER_PLUGIN</key>
|
||||
<string>Summary</string>
|
||||
<key>LIST_TITLE_KEY</key>
|
||||
<string>InstallerSectionTitle</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>INTRODUCTION</key>
|
||||
<dict>
|
||||
<key>LOCALIZATIONS</key>
|
||||
<array/>
|
||||
</dict>
|
||||
<key>LICENSE</key>
|
||||
<dict>
|
||||
<key>LOCALIZATIONS</key>
|
||||
<array/>
|
||||
<key>MODE</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>README</key>
|
||||
<dict>
|
||||
<key>LOCALIZATIONS</key>
|
||||
<array/>
|
||||
</dict>
|
||||
<key>SUMMARY</key>
|
||||
<dict>
|
||||
<key>LOCALIZATIONS</key>
|
||||
<array/>
|
||||
</dict>
|
||||
<key>TITLE</key>
|
||||
<dict>
|
||||
<key>LOCALIZATIONS</key>
|
||||
<array/>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>PROJECT_REQUIREMENTS</key>
|
||||
<dict>
|
||||
<key>LIST</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>BEHAVIOR</key>
|
||||
<integer>3</integer>
|
||||
<key>DICTIONARY</key>
|
||||
<dict>
|
||||
<key>IC_REQUIREMENT_OS_DISK_TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>IC_REQUIREMENT_OS_DISTRIBUTION_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>IC_REQUIREMENT_OS_MINIMUM_VERSION</key>
|
||||
<integer>101300</integer>
|
||||
</dict>
|
||||
<key>IC_REQUIREMENT_CHECK_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>IDENTIFIER</key>
|
||||
<string>fr.whitebox.Packages.requirement.os</string>
|
||||
<key>MESSAGE</key>
|
||||
<array/>
|
||||
<key>NAME</key>
|
||||
<string>Operating System</string>
|
||||
<key>STATE</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</array>
|
||||
<key>RESOURCES</key>
|
||||
<array/>
|
||||
<key>ROOT_VOLUME_ONLY</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>PROJECT_SETTINGS</key>
|
||||
<dict>
|
||||
<key>ADVANCED_OPTIONS</key>
|
||||
<dict>
|
||||
<key>installer-script.domains:enable_currentUserHome</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<key>BUILD_FORMAT</key>
|
||||
<integer>0</integer>
|
||||
<key>BUILD_PATH</key>
|
||||
<dict>
|
||||
<key>PATH</key>
|
||||
<string>../@RELATIVE_BUILD_PATH@</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<key>EXCLUDED_FILES</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>PATTERNS_ARRAY</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>REGULAR_EXPRESSION</key>
|
||||
<false/>
|
||||
<key>STRING</key>
|
||||
<string>.DS_Store</string>
|
||||
<key>TYPE</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>PROTECTED</key>
|
||||
<true/>
|
||||
<key>PROXY_NAME</key>
|
||||
<string>Remove .DS_Store files</string>
|
||||
<key>PROXY_TOOLTIP</key>
|
||||
<string>Remove ".DS_Store" files created by the Finder.</string>
|
||||
<key>STATE</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>PATTERNS_ARRAY</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>REGULAR_EXPRESSION</key>
|
||||
<false/>
|
||||
<key>STRING</key>
|
||||
<string>.pbdevelopment</string>
|
||||
<key>TYPE</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>PROTECTED</key>
|
||||
<true/>
|
||||
<key>PROXY_NAME</key>
|
||||
<string>Remove .pbdevelopment files</string>
|
||||
<key>PROXY_TOOLTIP</key>
|
||||
<string>Remove ".pbdevelopment" files created by ProjectBuilder or Xcode.</string>
|
||||
<key>STATE</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>PATTERNS_ARRAY</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>REGULAR_EXPRESSION</key>
|
||||
<false/>
|
||||
<key>STRING</key>
|
||||
<string>CVS</string>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>REGULAR_EXPRESSION</key>
|
||||
<false/>
|
||||
<key>STRING</key>
|
||||
<string>.cvsignore</string>
|
||||
<key>TYPE</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>REGULAR_EXPRESSION</key>
|
||||
<false/>
|
||||
<key>STRING</key>
|
||||
<string>.cvspass</string>
|
||||
<key>TYPE</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>REGULAR_EXPRESSION</key>
|
||||
<false/>
|
||||
<key>STRING</key>
|
||||
<string>.svn</string>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>REGULAR_EXPRESSION</key>
|
||||
<false/>
|
||||
<key>STRING</key>
|
||||
<string>.git</string>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>REGULAR_EXPRESSION</key>
|
||||
<false/>
|
||||
<key>STRING</key>
|
||||
<string>.gitignore</string>
|
||||
<key>TYPE</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>PROTECTED</key>
|
||||
<true/>
|
||||
<key>PROXY_NAME</key>
|
||||
<string>Remove SCM metadata</string>
|
||||
<key>PROXY_TOOLTIP</key>
|
||||
<string>Remove helper files and folders used by the CVS, SVN or Git Source Code Management systems.</string>
|
||||
<key>STATE</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>PATTERNS_ARRAY</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>REGULAR_EXPRESSION</key>
|
||||
<false/>
|
||||
<key>STRING</key>
|
||||
<string>classes.nib</string>
|
||||
<key>TYPE</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>REGULAR_EXPRESSION</key>
|
||||
<false/>
|
||||
<key>STRING</key>
|
||||
<string>designable.db</string>
|
||||
<key>TYPE</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>REGULAR_EXPRESSION</key>
|
||||
<false/>
|
||||
<key>STRING</key>
|
||||
<string>info.nib</string>
|
||||
<key>TYPE</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>PROTECTED</key>
|
||||
<true/>
|
||||
<key>PROXY_NAME</key>
|
||||
<string>Optimize nib files</string>
|
||||
<key>PROXY_TOOLTIP</key>
|
||||
<string>Remove "classes.nib", "info.nib" and "designable.nib" files within .nib bundles.</string>
|
||||
<key>STATE</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>PATTERNS_ARRAY</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>REGULAR_EXPRESSION</key>
|
||||
<false/>
|
||||
<key>STRING</key>
|
||||
<string>Resources Disabled</string>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>PROTECTED</key>
|
||||
<true/>
|
||||
<key>PROXY_NAME</key>
|
||||
<string>Remove Resources Disabled folders</string>
|
||||
<key>PROXY_TOOLTIP</key>
|
||||
<string>Remove "Resources Disabled" folders.</string>
|
||||
<key>STATE</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SEPARATOR</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</array>
|
||||
<key>NAME</key>
|
||||
<string>@CMAKE_PROJECT_NAME@</string>
|
||||
<key>PAYLOAD_ONLY</key>
|
||||
<false/>
|
||||
<key>TREAT_MISSING_PRESENTATION_DOCUMENTS_AS_WARNING</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>VERSION</key>
|
||||
<integer>2</integer>
|
||||
</dict>
|
||||
</plist>
|
@ -1,63 +0,0 @@
|
||||
#define MyAppName "@CMAKE_PROJECT_NAME@"
|
||||
#define MyAppVersion "@CMAKE_PROJECT_VERSION@"
|
||||
#define MyAppPublisher "@PLUGIN_AUTHOR@"
|
||||
#define MyAppURL "https://obsproject.com"
|
||||
|
||||
[Setup]
|
||||
; NOTE: The value of AppId uniquely identifies this application.
|
||||
; Do not use the same AppId value in installers for other applications.
|
||||
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
|
||||
AppId={{CD703FE5-1F2C-4837-BD3D-DD840D83C3E3}
|
||||
AppName={#MyAppName}
|
||||
AppVersion={#MyAppVersion}
|
||||
AppPublisher={#MyAppPublisher}
|
||||
AppPublisherURL={#MyAppURL}
|
||||
AppSupportURL={#MyAppURL}
|
||||
AppUpdatesURL={#MyAppURL}
|
||||
DefaultDirName={code:GetDirName}
|
||||
DefaultGroupName={#MyAppName}
|
||||
OutputBaseFilename={#MyAppName}-{#MyAppVersion}-Windows-Installer
|
||||
Compression=lzma
|
||||
SolidCompression=yes
|
||||
|
||||
[Languages]
|
||||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||
|
||||
[Files]
|
||||
Source: "..\release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
Source: "..\LICENSE"; Flags: dontcopy
|
||||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||
|
||||
[Icons]
|
||||
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
|
||||
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
|
||||
|
||||
[Code]
|
||||
procedure InitializeWizard();
|
||||
var
|
||||
GPLText: AnsiString;
|
||||
Page: TOutputMsgMemoWizardPage;
|
||||
begin
|
||||
ExtractTemporaryFile('LICENSE');
|
||||
LoadStringFromFile(ExpandConstant('{tmp}\LICENSE'), GPLText);
|
||||
Page := CreateOutputMsgMemoPage(wpWelcome,
|
||||
'License Information', 'Please review the license terms before installing {#MyAppName}',
|
||||
'Press Page Down to see the rest of the agreement. Once you are aware of your rights, click Next to continue.',
|
||||
String(GPLText)
|
||||
);
|
||||
end;
|
||||
|
||||
// credit where it's due :
|
||||
// following function come from https://github.com/Xaymar/obs-studio_amf-encoder-plugin/blob/master/%23Resources/Installer.in.iss#L45
|
||||
function GetDirName(Value: string): string;
|
||||
var
|
||||
InstallPath: string;
|
||||
begin
|
||||
// initialize default path, which will be returned when the following registry
|
||||
// key queries fail due to missing keys or for some different reason
|
||||
Result := '{autopf}\obs-studio';
|
||||
// query the first registry value; if this succeeds, return the obtained value
|
||||
if RegQueryStringValue(HKLM32, 'SOFTWARE\OBS Studio', '', InstallPath) then
|
||||
Result := InstallPath
|
||||
end;
|
||||
|
1
data/locale/ar-SA.ini
Normal file
1
data/locale/ar-SA.ini
Normal file
@ -0,0 +1 @@
|
||||
|
18
data/locale/de-DE.ini
Normal file
18
data/locale/de-DE.ini
Normal file
@ -0,0 +1,18 @@
|
||||
OBSWebsocket.Settings.DialogTitle="WebSockets-Servereinstellungen"
|
||||
OBSWebsocket.Settings.ServerEnable="WebSockets-Server aktivieren"
|
||||
OBSWebsocket.Settings.ServerPort="Server-Port"
|
||||
OBSWebsocket.Settings.AuthRequired="Authentifizierung aktivieren"
|
||||
OBSWebsocket.Settings.Password="Passwort"
|
||||
OBSWebsocket.Settings.LockToIPv4="Nur IPv4 verwenden (deaktiviert IPv6)"
|
||||
OBSWebsocket.Settings.DebugEnable="Debug-Protokollierung aktivieren"
|
||||
OBSWebsocket.Settings.AlertsEnable="Infobereichbenachrichtigungen aktivieren"
|
||||
OBSWebsocket.NotifyConnect.Title="Neue Websocket-Verbindung"
|
||||
OBSWebsocket.NotifyConnect.Message="Client %1 verbunden"
|
||||
OBSWebsocket.NotifyDisconnect.Title="Websocket-Client getrennt"
|
||||
OBSWebsocket.NotifyDisconnect.Message="Client %1 getrennt"
|
||||
OBSWebsocket.Server.StartFailed.Title="Websocket-Serverfehler"
|
||||
OBSWebsocket.Server.StartFailed.Message="Der WebSocket-Server konnte nicht gestartet werden, mögliche Gründe:\n - Der TCP-Port %1 wird möglicherweise gerade von einem anderen Programm verwendet. Versuchen Sie einen anderen Port in den Websocket-Servereinstellungen zu setzen oder alle Programme zu beenden, die den Port möglicherweise verwenden.\n - Fehler: %2"
|
||||
OBSWebsocket.ProfileChanged.Started="WebSockets-Server in diesem Profil aktiviert. Server gestartet."
|
||||
OBSWebsocket.ProfileChanged.Stopped="WebSockets-Server in diesem Profil deaktiviert. Server gestoppt."
|
||||
OBSWebsocket.ProfileChanged.Restarted="WebSockets-Server in diesem Profil geändert. Server startet neu."
|
||||
|
@ -1,21 +1,21 @@
|
||||
OBSWebsocketCompat.Settings.DialogTitle="WebSockets Server Settings (4.x Compat)"
|
||||
OBSWebsocketCompat.Settings.ServerEnable="Enable WebSockets server"
|
||||
OBSWebsocketCompat.Settings.ServerPort="Server Port"
|
||||
OBSWebsocketCompat.Settings.AuthRequired="Enable authentication"
|
||||
OBSWebsocketCompat.Settings.Password="Password"
|
||||
OBSWebsocketCompat.Settings.LockToIPv4="Lock server to only using IPv4"
|
||||
OBSWebsocketCompat.Settings.DebugEnable="Enable debug logging"
|
||||
OBSWebsocketCompat.Settings.AlertsEnable="Enable System Tray Alerts"
|
||||
OBSWebsocketCompat.Settings.AuthDisabledWarning="Running obs-websocket with authentication disabled is not recommended, as it allows attackers to easily collect sensetive data. Are you sure you want to proceed?"
|
||||
OBSWebsocketCompat.NotifyConnect.Title="New WebSocket connection"
|
||||
OBSWebsocketCompat.NotifyConnect.Message="Client %1 connected"
|
||||
OBSWebsocketCompat.NotifyDisconnect.Title="WebSocket client disconnected"
|
||||
OBSWebsocketCompat.NotifyDisconnect.Message="Client %1 disconnected"
|
||||
OBSWebsocketCompat.Server.StartFailed.Title="WebSockets Server failure"
|
||||
OBSWebsocketCompat.Server.StartFailed.Message="The WebSockets compat server failed to start, maybe because:\n - TCP port %1 may currently be in use by the main obs-websocket plugin. Try setting a different TCP port in the obs-websocket Server Settings, or stop any application that could be using this port.\n - Error message: %2"
|
||||
OBSWebsocketCompat.ProfileChanged.Started="WebSockets server enabled in this profile. Server started."
|
||||
OBSWebsocketCompat.ProfileChanged.Stopped="WebSockets server disabled in this profile. Server stopped."
|
||||
OBSWebsocketCompat.ProfileChanged.Restarted="WebSockets server port changed in this profile. Server restarted."
|
||||
OBSWebsocketCompat.InitialPasswordSetup.Title="obs-websocket - Server Password Configuration"
|
||||
OBSWebsocketCompat.InitialPasswordSetup.Text="It looks like you are running obs-websocket for the first time. Do you want to configure a password now for the WebSockets server? Setting a password is highly recommended."
|
||||
OBSWebsocketCompat.InitialPasswordSetup.DismissedText="You can configure a server password later in the WebSockets Server Settings. (Under the Tools menu of OBS Studio)"
|
||||
OBSWebsocket.Settings.DialogTitle="WebSockets Server Settings"
|
||||
OBSWebsocket.Settings.ServerEnable="Enable WebSockets server"
|
||||
OBSWebsocket.Settings.ServerPort="Server Port"
|
||||
OBSWebsocket.Settings.AuthRequired="Enable authentication"
|
||||
OBSWebsocket.Settings.Password="Password"
|
||||
OBSWebsocket.Settings.LockToIPv4="Lock server to only using IPv4"
|
||||
OBSWebsocket.Settings.DebugEnable="Enable debug logging"
|
||||
OBSWebsocket.Settings.AlertsEnable="Enable System Tray Alerts"
|
||||
OBSWebsocket.Settings.AuthDisabledWarning="Running obs-websocket with authentication disabled is not recommended, as it allows attackers to easily collect sensetive data. Are you sure you want to proceed?"
|
||||
OBSWebsocket.NotifyConnect.Title="New WebSocket connection"
|
||||
OBSWebsocket.NotifyConnect.Message="Client %1 connected"
|
||||
OBSWebsocket.NotifyDisconnect.Title="WebSocket client disconnected"
|
||||
OBSWebsocket.NotifyDisconnect.Message="Client %1 disconnected"
|
||||
OBSWebsocket.Server.StartFailed.Title="WebSockets Server failure"
|
||||
OBSWebsocket.Server.StartFailed.Message="The WebSockets server failed to start, maybe because:\n - TCP port %1 may currently be in use elsewhere on this system, possibly by another application. Try setting a different TCP port in the WebSocket server settings, or stop any application that could be using this port.\n - Error message: %2"
|
||||
OBSWebsocket.ProfileChanged.Started="WebSockets server enabled in this profile. Server started."
|
||||
OBSWebsocket.ProfileChanged.Stopped="WebSockets server disabled in this profile. Server stopped."
|
||||
OBSWebsocket.ProfileChanged.Restarted="WebSockets server port changed in this profile. Server restarted."
|
||||
OBSWebsocket.InitialPasswordSetup.Title="obs-websocket - Server Password Configuration"
|
||||
OBSWebsocket.InitialPasswordSetup.Text="It looks like you are running obs-websocket for the first time. Do you want to configure a password now for the WebSockets server? Setting a password is highly recommended."
|
||||
OBSWebsocket.InitialPasswordSetup.DismissedText="You can configure a server password later in the WebSockets Server Settings. (Under the Tools menu of OBS Studio)"
|
||||
|
16
data/locale/es-ES.ini
Normal file
16
data/locale/es-ES.ini
Normal file
@ -0,0 +1,16 @@
|
||||
OBSWebsocket.Settings.DialogTitle="Configuración del servidor WebSocket"
|
||||
OBSWebsocket.Settings.ServerEnable="Habilitar el servidor WebSockets"
|
||||
OBSWebsocket.Settings.ServerPort="Puerto del Servidor"
|
||||
OBSWebsocket.Settings.AuthRequired="Habilitar autenticación"
|
||||
OBSWebsocket.Settings.Password="Contraseña"
|
||||
OBSWebsocket.Settings.DebugEnable="Habilitar registro de depuración"
|
||||
OBSWebsocket.Settings.AlertsEnable="Habilitar alertas en la bandeja de sistema"
|
||||
OBSWebsocket.NotifyConnect.Title="Nueva conexión WebSocket"
|
||||
OBSWebsocket.NotifyConnect.Message="Cliente %1 conectado"
|
||||
OBSWebsocket.NotifyDisconnect.Title="Cliente WebSocket desconectado"
|
||||
OBSWebsocket.NotifyDisconnect.Message="Cliente %1 desconectado"
|
||||
OBSWebsocket.Server.StartFailed.Title="Falla en el servidor WebSockets"
|
||||
OBSWebsocket.ProfileChanged.Started="El servidor WebSocket esta habilitado en este perfil. El servidor ha iniciado."
|
||||
OBSWebsocket.ProfileChanged.Stopped="Servidor WebSockets deshabilitado en este perfil. Servidor detenido."
|
||||
OBSWebsocket.ProfileChanged.Restarted="Puerto del servidor WebSockets cambiado en este perfil. Servidor reiniciado."
|
||||
|
16
data/locale/fr-FR.ini
Normal file
16
data/locale/fr-FR.ini
Normal file
@ -0,0 +1,16 @@
|
||||
OBSWebsocket.Settings.DialogTitle="Paramètres du serveur WebSockets"
|
||||
OBSWebsocket.Settings.ServerEnable="Activer le serveur WebSocket"
|
||||
OBSWebsocket.Settings.ServerPort="Port du serveur"
|
||||
OBSWebsocket.Settings.AuthRequired="Activer l'authentification"
|
||||
OBSWebsocket.Settings.Password="Mot de passe"
|
||||
OBSWebsocket.Settings.DebugEnable="Débogage dans le fichier journal"
|
||||
OBSWebsocket.Settings.AlertsEnable="Notifications de connexion/déconnexion"
|
||||
OBSWebsocket.NotifyConnect.Title="Nouvelle connexion WebSocket"
|
||||
OBSWebsocket.NotifyConnect.Message="Le client %1 s'est connecté"
|
||||
OBSWebsocket.NotifyDisconnect.Title="Déconnexion WebSocket"
|
||||
OBSWebsocket.NotifyDisconnect.Message="Le client %1 s'est déconnecté"
|
||||
OBSWebsocket.Server.StartFailed.Title="Impossible de démarrer le serveur WebSockets"
|
||||
OBSWebsocket.ProfileChanged.Started="Serveur WebSockets actif dans ce profil."
|
||||
OBSWebsocket.ProfileChanged.Stopped="Serveur WebSockets désactivé dans ce profil."
|
||||
OBSWebsocket.ProfileChanged.Restarted="Le port actuel diffère du port configuré dans ce profil. Serveur WebSockets redémarré."
|
||||
|
1
data/locale/hi-IN.ini
Normal file
1
data/locale/hi-IN.ini
Normal file
@ -0,0 +1 @@
|
||||
|
18
data/locale/it-IT.ini
Normal file
18
data/locale/it-IT.ini
Normal file
@ -0,0 +1,18 @@
|
||||
OBSWebsocket.Settings.DialogTitle="Impostazioni del server di WebSocket"
|
||||
OBSWebsocket.Settings.ServerEnable="Abilitare il server WebSockets"
|
||||
OBSWebsocket.Settings.ServerPort="Porta del server"
|
||||
OBSWebsocket.Settings.AuthRequired="Abilitare l'autenticazione"
|
||||
OBSWebsocket.Settings.Password="Password"
|
||||
OBSWebsocket.Settings.LockToIPv4="Blocca il server per usare solo IPv4"
|
||||
OBSWebsocket.Settings.DebugEnable="Attivare la registrazione di debug"
|
||||
OBSWebsocket.Settings.AlertsEnable="Attivare gli avvisi di vassoio di sistema"
|
||||
OBSWebsocket.NotifyConnect.Title="Nuova connessione WebSocket"
|
||||
OBSWebsocket.NotifyConnect.Message="%1 cliente collegato"
|
||||
OBSWebsocket.NotifyDisconnect.Title="WebSocket cliente disconnesso"
|
||||
OBSWebsocket.NotifyDisconnect.Message="%1 cliente disconnesso"
|
||||
OBSWebsocket.Server.StartFailed.Title="Errore del WebSocket Server"
|
||||
OBSWebsocket.Server.StartFailed.Message="L'avvio del server WebSockets è fallito, forse perché:\n - La porta TCP %1 può attualmente essere in uso altrove su questo sistema, forse da un'altra applicazione. Provare a impostare una porta TCP diversa nelle impostazioni del server WebSocket o interrompere qualsiasi applicazione che potrebbe utilizzare questa porta.\n - Messaggio di errore: %2"
|
||||
OBSWebsocket.ProfileChanged.Started="Server WebSockets abilitato in questo profilo. Il server è avviato."
|
||||
OBSWebsocket.ProfileChanged.Stopped="Server WebSocket disabilitato in questo profilo. Server interrotto."
|
||||
OBSWebsocket.ProfileChanged.Restarted="La porta del server WebSocket è stata modificata in questo profilo. Il server è stato riavviato."
|
||||
|
16
data/locale/ja-JP.ini
Normal file
16
data/locale/ja-JP.ini
Normal file
@ -0,0 +1,16 @@
|
||||
OBSWebsocket.Settings.DialogTitle="Websocket サーバー設定"
|
||||
OBSWebsocket.Settings.ServerEnable="WebSockets サーバーを有効にする"
|
||||
OBSWebsocket.Settings.ServerPort="サーバーポート"
|
||||
OBSWebsocket.Settings.AuthRequired="認証を有効にする"
|
||||
OBSWebsocket.Settings.Password="パスワード"
|
||||
OBSWebsocket.Settings.DebugEnable="デバッグログを有効にする"
|
||||
OBSWebsocket.Settings.AlertsEnable="システムトレイ通知を有効にする"
|
||||
OBSWebsocket.NotifyConnect.Title="新しい WebSocket 接続"
|
||||
OBSWebsocket.NotifyConnect.Message="接続されているクライアント %1"
|
||||
OBSWebsocket.NotifyDisconnect.Title="WebSocket クライアントが切断されました"
|
||||
OBSWebsocket.NotifyDisconnect.Message="切断されたクライアント %1"
|
||||
OBSWebsocket.Server.StartFailed.Title="WebSockets サーバー障害"
|
||||
OBSWebsocket.ProfileChanged.Started="このプロファイルでWebSocketサーバが有効になりました。サーバを起動しました。"
|
||||
OBSWebsocket.ProfileChanged.Stopped="このプロファイルでWebSocketサーバが無効になりました。サーバを停止しました。"
|
||||
OBSWebsocket.ProfileChanged.Restarted="このプロファイルでWebSocketサーバの通信ポートが変更されました。サーバを再起動しました。"
|
||||
|
18
data/locale/ko-KR.ini
Normal file
18
data/locale/ko-KR.ini
Normal file
@ -0,0 +1,18 @@
|
||||
OBSWebsocket.Settings.DialogTitle="웹소켓 서버 설정"
|
||||
OBSWebsocket.Settings.ServerEnable="웹소켓 서버 활성화"
|
||||
OBSWebsocket.Settings.ServerPort="서버 포트"
|
||||
OBSWebsocket.Settings.AuthRequired="인증 활성화"
|
||||
OBSWebsocket.Settings.Password="비밀번호"
|
||||
OBSWebsocket.Settings.LockToIPv4="IPv4만 이용하여 서버를 연결"
|
||||
OBSWebsocket.Settings.DebugEnable="디버그 로깅 활성화"
|
||||
OBSWebsocket.Settings.AlertsEnable="시스템 트레이 알림 활성화"
|
||||
OBSWebsocket.NotifyConnect.Title="새로운 웹소켓 연결"
|
||||
OBSWebsocket.NotifyConnect.Message="클라이언트 %1 가 연결되었습니다"
|
||||
OBSWebsocket.NotifyDisconnect.Title="웹소켓 클라이언트가 연결 해제되었습니다"
|
||||
OBSWebsocket.NotifyDisconnect.Message="클라이언트 %1 가 연결이 해제되었습니다"
|
||||
OBSWebsocket.Server.StartFailed.Title="웹소켓 서버 시작이 실패하였습니다"
|
||||
OBSWebsocket.Server.StartFailed.Message="웹소켓 서버가 시작되지 못했습니다. \n 시스템 상의 다른 프로그램이 TCP 포트 %1을 사용 중인 것으로 보입니다. 다른 TCP 포트를 사용하거나, 해당 포트를 사용 중인 프로그램을 종료하고 다시 시도해주세요. \n 에러 메시지: %2"
|
||||
OBSWebsocket.ProfileChanged.Started="프로파일 설정에 따라 웹소켓 서버가 활성화되었습니다. 서버가 시작되었습니다."
|
||||
OBSWebsocket.ProfileChanged.Stopped="프로파일 설정에 따라 웹소켓 서버가 비활성화되었습니다. 서버가 중지되었습니다."
|
||||
OBSWebsocket.ProfileChanged.Restarted="프로파일 설정에 따라 웹소켓 포트가 변경되었습니다. 서버가 재시작되었습니다."
|
||||
|
18
data/locale/nl-NL.ini
Normal file
18
data/locale/nl-NL.ini
Normal file
@ -0,0 +1,18 @@
|
||||
OBSWebsocket.Settings.DialogTitle="WebSockets Server Instellingen"
|
||||
OBSWebsocket.Settings.ServerEnable="WebSockets server inschakelen"
|
||||
OBSWebsocket.Settings.ServerPort="Serverpoort"
|
||||
OBSWebsocket.Settings.AuthRequired="Verificatie inschakelen"
|
||||
OBSWebsocket.Settings.Password="Wachtwoord"
|
||||
OBSWebsocket.Settings.LockToIPv4="Server vergrendelen om alleen IPv4 te gebruiken"
|
||||
OBSWebsocket.Settings.DebugEnable="Activeer debug logs"
|
||||
OBSWebsocket.Settings.AlertsEnable="Systemvak waarschuwingen inschakelen"
|
||||
OBSWebsocket.NotifyConnect.Title="Nieuwe WebSocket verbinding"
|
||||
OBSWebsocket.NotifyConnect.Message="Client %1 verbonden"
|
||||
OBSWebsocket.NotifyDisconnect.Title="WebSocket client connectie verbroken"
|
||||
OBSWebsocket.NotifyDisconnect.Message="Client %1 losgekoppeld"
|
||||
OBSWebsocket.Server.StartFailed.Title="Fout in WebSocket server"
|
||||
OBSWebsocket.Server.StartFailed.Message="De obs-websocket server kan niet worden gestart, misschien omdat: \n - TCP-poort %1 momenteel elders wordt gebruikt op dit systeem, eventueel door een andere toepassing. Probeer een andere TCP-poort in te stellen in de WebSocket Server-instellingen of stop elke toepassing die deze poort zou kunnen gebruiken.\n Een onbekende Netwerkfout op uw systeem. Probeer het opnieuw door de instellingen te wijzigen, OBS te herstarten of uw systeem te herstarten."
|
||||
OBSWebsocket.ProfileChanged.Started="WebSockets server ingeschakeld in dit profiel. Server gestart."
|
||||
OBSWebsocket.ProfileChanged.Stopped="WebSockets server uitgeschakeld in dit profiel. Server is gestopt."
|
||||
OBSWebsocket.ProfileChanged.Restarted="WebSockets server poort is veranderd in dit profiel. Server is herstart."
|
||||
|
15
data/locale/pl-PL.ini
Normal file
15
data/locale/pl-PL.ini
Normal file
@ -0,0 +1,15 @@
|
||||
OBSWebsocket.Settings.DialogTitle="Ustawienia serwera WebSockets"
|
||||
OBSWebsocket.Settings.ServerEnable="Włącz serwer WebSockets"
|
||||
OBSWebsocket.Settings.ServerPort="Port serwera"
|
||||
OBSWebsocket.Settings.AuthRequired="Wymagaj uwierzytelniania"
|
||||
OBSWebsocket.Settings.Password="Hasło"
|
||||
OBSWebsocket.Settings.LockToIPv4="Zablokuj serwer tylko za pomocą IPv4"
|
||||
OBSWebsocket.Settings.DebugEnable="Włącz rejestrowanie debugowania"
|
||||
OBSWebsocket.Settings.AlertsEnable="Włącz powiadomienia w zasobniku systemowym"
|
||||
OBSWebsocket.NotifyConnect.Title="Nowe połączenie WebSocket"
|
||||
OBSWebsocket.NotifyConnect.Message="Klient %1 połączony"
|
||||
OBSWebsocket.NotifyDisconnect.Title="Klient WebSocket odłączony"
|
||||
OBSWebsocket.NotifyDisconnect.Message="Klient %1 rozłączony"
|
||||
OBSWebsocket.Server.StartFailed.Title="Awaria serwera WebSockets"
|
||||
OBSWebsocket.ProfileChanged.Started="Serwer WebSockets włączony w tym profilu. Serwer uruchomiony."
|
||||
|
18
data/locale/pt-PT.ini
Normal file
18
data/locale/pt-PT.ini
Normal file
@ -0,0 +1,18 @@
|
||||
OBSWebsocket.Settings.DialogTitle="Configurações do servidor de WebSockets"
|
||||
OBSWebsocket.Settings.ServerEnable="Habilitar servidor de WebSockets"
|
||||
OBSWebsocket.Settings.ServerPort="Porta do Servidor"
|
||||
OBSWebsocket.Settings.AuthRequired="Activar autenticação"
|
||||
OBSWebsocket.Settings.Password="Palavra passe"
|
||||
OBSWebsocket.Settings.LockToIPv4="Forçar apenas o uso de IPv4 (desabilitar IPv6)"
|
||||
OBSWebsocket.Settings.DebugEnable="Habilitar registro de debug"
|
||||
OBSWebsocket.Settings.AlertsEnable="Ativar Alertas da bandeja do sistema"
|
||||
OBSWebsocket.NotifyConnect.Title="Nova conexão WebSocket"
|
||||
OBSWebsocket.NotifyConnect.Message="Cliente %1 conectado"
|
||||
OBSWebsocket.NotifyDisconnect.Title="WebSocket cliente desconectado"
|
||||
OBSWebsocket.NotifyDisconnect.Message="Cliente %1 desconectado"
|
||||
OBSWebsocket.Server.StartFailed.Title="Falha do servidor de WebSocket"
|
||||
OBSWebsocket.Server.StartFailed.Message="O servidor de WebSockets falhou ao iniciar, possivelmente porque:\n - A porta TCP %1 pode já estar em uso em algum outro lugar neste sistema, possivelmente por outro aplicativo. Tente definir uma porta TCP diferente nas configurações do servidor de WebSockets, ou pare qualquer aplicativo que possa estar usando essa porta.\n - Mensagem de erro: %2"
|
||||
OBSWebsocket.ProfileChanged.Started="Servidor de WebSockets habilitado nesse perfil. Servidor iniciado."
|
||||
OBSWebsocket.ProfileChanged.Stopped="Servidor de WebSockets desabilitado nesse perfil. Servidor parado."
|
||||
OBSWebsocket.ProfileChanged.Restarted="Porta do servidor de WebSockets foi alterada neste perfil. Servidor reiniciado."
|
||||
|
18
data/locale/ru-RU.ini
Normal file
18
data/locale/ru-RU.ini
Normal file
@ -0,0 +1,18 @@
|
||||
OBSWebsocket.Settings.DialogTitle="Настройки сервера WebSockets"
|
||||
OBSWebsocket.Settings.ServerEnable="Включить сервер WebSockets"
|
||||
OBSWebsocket.Settings.ServerPort="Порт сервера"
|
||||
OBSWebsocket.Settings.AuthRequired="Включить авторизацию"
|
||||
OBSWebsocket.Settings.Password="Пароль"
|
||||
OBSWebsocket.Settings.LockToIPv4="Блокировка сервера только с использованием IPv4"
|
||||
OBSWebsocket.Settings.DebugEnable="Включить ведение журнала отладки"
|
||||
OBSWebsocket.Settings.AlertsEnable="Включить оповещения в системном трее"
|
||||
OBSWebsocket.NotifyConnect.Title="Новое соединение WebSocket"
|
||||
OBSWebsocket.NotifyConnect.Message="Клиент %1 подключен"
|
||||
OBSWebsocket.NotifyDisconnect.Title="Клиент WebSocket отключён"
|
||||
OBSWebsocket.NotifyDisconnect.Message="Клиент %1 отключен"
|
||||
OBSWebsocket.Server.StartFailed.Title="Сбой сервера WebSockets"
|
||||
OBSWebsocket.Server.StartFailed.Message="Сервер WebSockets не запустился, возможно, потому, что:\n-TCP-порт %1 в настоящее время может использоваться в другом месте этой системы, возможно, другим приложением. Попробуйте установить другой TCP-порт в настройках сервера WebSocket или остановить любое приложение, которое может использовать этот порт.\n-сообщение об ошибке: %2"
|
||||
OBSWebsocket.ProfileChanged.Started="Сервер WebSockets включен в этом профиле. Сервер запущен."
|
||||
OBSWebsocket.ProfileChanged.Stopped="Сервер WebSockets отключен в этом профиле. Сервер остановлен."
|
||||
OBSWebsocket.ProfileChanged.Restarted="Порт сервера WebSockets изменен в этом профиле. Сервер перезапущен."
|
||||
|
16
data/locale/zh-CN.ini
Normal file
16
data/locale/zh-CN.ini
Normal file
@ -0,0 +1,16 @@
|
||||
OBSWebsocket.Settings.DialogTitle="WebSockets 服务器设置"
|
||||
OBSWebsocket.Settings.ServerEnable="启用 WebSockets 服务器"
|
||||
OBSWebsocket.Settings.ServerPort="服务器端口"
|
||||
OBSWebsocket.Settings.AuthRequired="启用身份验证"
|
||||
OBSWebsocket.Settings.Password="密码"
|
||||
OBSWebsocket.Settings.DebugEnable="启用调试日志"
|
||||
OBSWebsocket.Settings.AlertsEnable="启用系统托盘通知"
|
||||
OBSWebsocket.NotifyConnect.Title="新 WebSocket 连接"
|
||||
OBSWebsocket.NotifyConnect.Message="客户端 %1 已连接"
|
||||
OBSWebsocket.NotifyDisconnect.Title="WebSocket 客户端已断开"
|
||||
OBSWebsocket.NotifyDisconnect.Message="客户端 %1 已断开连接"
|
||||
OBSWebsocket.Server.StartFailed.Title="WebSockets 服务器错误"
|
||||
OBSWebsocket.ProfileChanged.Started="此配置文件中启用了 WebSockets 服务器。服务器已启动。"
|
||||
OBSWebsocket.ProfileChanged.Stopped="此配置文件中禁用了 WebSockets 服务器。服务器已停止。"
|
||||
OBSWebsocket.ProfileChanged.Restarted="此配置文件中的 WebSockets 服务器端口已更改。服务器已重新启动。"
|
||||
|
9
data/locale/zh-TW.ini
Normal file
9
data/locale/zh-TW.ini
Normal file
@ -0,0 +1,9 @@
|
||||
OBSWebsocket.Settings.ServerPort="伺服器連接埠"
|
||||
OBSWebsocket.Settings.DebugEnable="啟用除錯日誌"
|
||||
OBSWebsocket.Settings.AlertsEnable="啟用系統列通知"
|
||||
OBSWebsocket.NotifyConnect.Title="新的 WebSocket 連線"
|
||||
OBSWebsocket.NotifyConnect.Message="客戶端 %1 已連線"
|
||||
OBSWebsocket.NotifyDisconnect.Title="WebSocket 客戶端已離線"
|
||||
OBSWebsocket.NotifyDisconnect.Message="客戶端 %1 已離線"
|
||||
OBSWebsocket.Server.StartFailed.Title="WebSocket 伺服器錯誤"
|
||||
|
2
deps/websocketpp
vendored
2
deps/websocketpp
vendored
Submodule deps/websocketpp updated: 56123c8759...c6d7e295bf
@ -127,7 +127,6 @@
|
||||
"{double} `rotation` The clockwise rotation of the scene item in degrees around the point of alignment.",
|
||||
"{double} `scale.x` The x-scale factor of the scene item.",
|
||||
"{double} `scale.y` The y-scale factor of the scene item.",
|
||||
"{String} `scale.filter` The scale filter of the source. Can be \"OBS_SCALE_DISABLE\", \"OBS_SCALE_POINT\", \"OBS_SCALE_BICUBIC\", \"OBS_SCALE_BILINEAR\", \"OBS_SCALE_LANCZOS\" or \"OBS_SCALE_AREA\".",
|
||||
"{int} `crop.top` The number of pixels cropped off the top of the scene item before scaling.",
|
||||
"{int} `crop.right` The number of pixels cropped off the right of the scene item before scaling.",
|
||||
"{int} `crop.bottom` The number of pixels cropped off the bottom of the scene item before scaling.",
|
||||
@ -176,11 +175,6 @@
|
||||
"name": "scale.y",
|
||||
"description": "The y-scale factor of the scene item."
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"name": "scale.filter",
|
||||
"description": "The scale filter of the source. Can be \"OBS_SCALE_DISABLE\", \"OBS_SCALE_POINT\", \"OBS_SCALE_BICUBIC\", \"OBS_SCALE_BILINEAR\", \"OBS_SCALE_LANCZOS\" or \"OBS_SCALE_AREA\"."
|
||||
},
|
||||
{
|
||||
"type": "int",
|
||||
"name": "crop.top",
|
||||
@ -366,7 +360,7 @@
|
||||
"{boolean} `flags.encoded` Output is encoded",
|
||||
"{boolean} `flags.multiTrack` Output uses several audio tracks",
|
||||
"{boolean} `flags.service` Output uses a service",
|
||||
"{Object} `settings` Output settings",
|
||||
"{Object} `settings` Output name",
|
||||
"{boolean} `active` Output status (active or not)",
|
||||
"{boolean} `reconnecting` Output reconnection status (reconnecting or not)",
|
||||
"{double} `congestion` Output congestion",
|
||||
@ -433,7 +427,7 @@
|
||||
{
|
||||
"type": "Object",
|
||||
"name": "settings",
|
||||
"description": "Output settings"
|
||||
"description": "Output name"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
@ -861,7 +855,7 @@
|
||||
"{String} `name` Transition name.",
|
||||
"{String} `type` Transition type.",
|
||||
"{int} `duration` Transition duration (in milliseconds). Will be -1 for any transition with a fixed duration, such as a Stinger, due to limitations of the OBS API.",
|
||||
"{String (optional)} `from-scene` Source scene of the transition",
|
||||
"{String} `from-scene` Source scene of the transition",
|
||||
"{String} `to-scene` Destination scene of the transition"
|
||||
],
|
||||
"api": "events",
|
||||
@ -885,7 +879,7 @@
|
||||
"description": "Transition duration (in milliseconds). Will be -1 for any transition with a fixed duration, such as a Stinger, due to limitations of the OBS API."
|
||||
},
|
||||
{
|
||||
"type": "String (optional)",
|
||||
"type": "String",
|
||||
"name": "from-scene",
|
||||
"description": "Source scene of the transition"
|
||||
},
|
||||
@ -989,7 +983,7 @@
|
||||
"{String} `name` Transition name.",
|
||||
"{String} `type` Transition type.",
|
||||
"{int} `duration` Transition duration (in milliseconds).",
|
||||
"{String (optional)} `from-scene` Source scene of the transition",
|
||||
"{String} `from-scene` Source scene of the transition",
|
||||
"{String} `to-scene` Destination scene of the transition"
|
||||
],
|
||||
"api": "events",
|
||||
@ -1013,7 +1007,7 @@
|
||||
"description": "Transition duration (in milliseconds)."
|
||||
},
|
||||
{
|
||||
"type": "String (optional)",
|
||||
"type": "String",
|
||||
"name": "from-scene",
|
||||
"description": "Source scene of the transition"
|
||||
},
|
||||
@ -1667,74 +1661,6 @@
|
||||
"examples": []
|
||||
}
|
||||
],
|
||||
"virtual cam": [
|
||||
{
|
||||
"subheads": [],
|
||||
"description": "Virtual cam started successfully.",
|
||||
"api": "events",
|
||||
"name": "VirtualCamStarted",
|
||||
"category": "virtual cam",
|
||||
"since": "4.9.1",
|
||||
"names": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "VirtualCamStarted"
|
||||
}
|
||||
],
|
||||
"categories": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "virtual cam"
|
||||
}
|
||||
],
|
||||
"sinces": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "4.9.1"
|
||||
}
|
||||
],
|
||||
"heading": {
|
||||
"level": 2,
|
||||
"text": "VirtualCamStarted"
|
||||
},
|
||||
"lead": "",
|
||||
"type": "class",
|
||||
"examples": []
|
||||
},
|
||||
{
|
||||
"subheads": [],
|
||||
"description": "Virtual cam stopped successfully.",
|
||||
"api": "events",
|
||||
"name": "VirtualCamStopped",
|
||||
"category": "virtual cam",
|
||||
"since": "4.9.1",
|
||||
"names": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "VirtualCamStopped"
|
||||
}
|
||||
],
|
||||
"categories": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "virtual cam"
|
||||
}
|
||||
],
|
||||
"sinces": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "4.9.1"
|
||||
}
|
||||
],
|
||||
"heading": {
|
||||
"level": 2,
|
||||
"text": "VirtualCamStopped"
|
||||
},
|
||||
"lead": "",
|
||||
"type": "class",
|
||||
"examples": []
|
||||
}
|
||||
],
|
||||
"replay buffer": [
|
||||
{
|
||||
"subheads": [],
|
||||
@ -2186,8 +2112,7 @@
|
||||
"description": "The volume of a source has changed.",
|
||||
"return": [
|
||||
"{String} `sourceName` Source name",
|
||||
"{float} `volume` Source volume",
|
||||
"{float} `volumeDb` Source volume in Decibel"
|
||||
"{float} `volume` Source volume"
|
||||
],
|
||||
"api": "events",
|
||||
"name": "SourceVolumeChanged",
|
||||
@ -2203,11 +2128,6 @@
|
||||
"type": "float",
|
||||
"name": "volume",
|
||||
"description": "Source volume"
|
||||
},
|
||||
{
|
||||
"type": "float",
|
||||
"name": "volumeDb",
|
||||
"description": "Source volume in Decibel"
|
||||
}
|
||||
],
|
||||
"names": [
|
||||
@ -4469,56 +4389,15 @@
|
||||
"lead": "",
|
||||
"type": "class",
|
||||
"examples": []
|
||||
},
|
||||
{
|
||||
"subheads": [],
|
||||
"description": "Waits for the specified duration. Designed to be used in `ExecuteBatch` operations.",
|
||||
"param": "{int} `sleepMillis` Delay in milliseconds to wait before continuing.",
|
||||
"api": "requests",
|
||||
"name": "Sleep",
|
||||
"category": "general",
|
||||
"since": "4.9.1",
|
||||
"params": [
|
||||
{
|
||||
"type": "int",
|
||||
"name": "sleepMillis",
|
||||
"description": "Delay in milliseconds to wait before continuing."
|
||||
}
|
||||
],
|
||||
"names": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "Sleep"
|
||||
}
|
||||
],
|
||||
"categories": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "general"
|
||||
}
|
||||
],
|
||||
"sinces": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "4.9.1"
|
||||
}
|
||||
],
|
||||
"heading": {
|
||||
"level": 2,
|
||||
"text": "Sleep"
|
||||
},
|
||||
"lead": "",
|
||||
"type": "class",
|
||||
"examples": []
|
||||
}
|
||||
],
|
||||
"media control": [
|
||||
{
|
||||
"subheads": [],
|
||||
"description": "Pause or play a media source. Supports ffmpeg and vlc media sources (as of OBS v25.0.8)\nNote :Leaving out `playPause` toggles the current pause state",
|
||||
"description": "Pause or play a media source. Supports ffmpeg and vlc media sources (as of OBS v25.0.8)",
|
||||
"param": [
|
||||
"{String} `sourceName` Source name.",
|
||||
"{boolean} `playPause` (optional) Whether to pause or play the source. `false` for play, `true` for pause."
|
||||
"{boolean} `playPause` Whether to pause or play the source. `false` for play, `true` for pause."
|
||||
],
|
||||
"api": "requests",
|
||||
"name": "PlayPauseMedia",
|
||||
@ -4533,7 +4412,7 @@
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "playPause",
|
||||
"description": "(optional) Whether to pause or play the source. `false` for play, `true` for pause."
|
||||
"description": "Whether to pause or play the source. `false` for play, `true` for pause."
|
||||
}
|
||||
],
|
||||
"names": [
|
||||
@ -5411,142 +5290,6 @@
|
||||
"type": "class",
|
||||
"examples": []
|
||||
},
|
||||
{
|
||||
"subheads": [],
|
||||
"description": "Changes whether an audio track is active for a source.",
|
||||
"param": [
|
||||
"{String} `sourceName` Source name.",
|
||||
"{int} `track` Audio tracks 1-6.",
|
||||
"{boolean} `active` Whether audio track is active or not."
|
||||
],
|
||||
"api": "requests",
|
||||
"name": "SetAudioTracks",
|
||||
"category": "sources",
|
||||
"since": "4.9.1",
|
||||
"params": [
|
||||
{
|
||||
"type": "String",
|
||||
"name": "sourceName",
|
||||
"description": "Source name."
|
||||
},
|
||||
{
|
||||
"type": "int",
|
||||
"name": "track",
|
||||
"description": "Audio tracks 1-6."
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "active",
|
||||
"description": "Whether audio track is active or not."
|
||||
}
|
||||
],
|
||||
"names": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "SetAudioTracks"
|
||||
}
|
||||
],
|
||||
"categories": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "sources"
|
||||
}
|
||||
],
|
||||
"sinces": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "4.9.1"
|
||||
}
|
||||
],
|
||||
"heading": {
|
||||
"level": 2,
|
||||
"text": "SetAudioTracks"
|
||||
},
|
||||
"lead": "",
|
||||
"type": "class",
|
||||
"examples": []
|
||||
},
|
||||
{
|
||||
"subheads": [],
|
||||
"description": "Gets whether an audio track is active for a source.",
|
||||
"param": "{String} `sourceName` Source name.",
|
||||
"return": [
|
||||
"{boolean} `track1`",
|
||||
"{boolean} `track2`",
|
||||
"{boolean} `track3`",
|
||||
"{boolean} `track4`",
|
||||
"{boolean} `track5`",
|
||||
"{boolean} `track6`"
|
||||
],
|
||||
"api": "requests",
|
||||
"name": "GetAudioTracks",
|
||||
"category": "sources",
|
||||
"since": "4.9.1",
|
||||
"returns": [
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "track1",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "track2",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "track3",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "track4",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "track5",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "track6",
|
||||
"description": ""
|
||||
}
|
||||
],
|
||||
"params": [
|
||||
{
|
||||
"type": "String",
|
||||
"name": "sourceName",
|
||||
"description": "Source name."
|
||||
}
|
||||
],
|
||||
"names": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "GetAudioTracks"
|
||||
}
|
||||
],
|
||||
"categories": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "sources"
|
||||
}
|
||||
],
|
||||
"sinces": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "4.9.1"
|
||||
}
|
||||
],
|
||||
"heading": {
|
||||
"level": 2,
|
||||
"text": "GetAudioTracks"
|
||||
},
|
||||
"lead": "",
|
||||
"type": "class",
|
||||
"examples": []
|
||||
},
|
||||
{
|
||||
"subheads": [],
|
||||
"description": "Get the mute status of a specified source.",
|
||||
@ -5694,55 +5437,6 @@
|
||||
"type": "class",
|
||||
"examples": []
|
||||
},
|
||||
{
|
||||
"subheads": [],
|
||||
"description": "Get the source's active status of a specified source (if it is showing in the final mix).",
|
||||
"param": "{String} `sourceName` Source name.",
|
||||
"return": "{boolean} `sourceActive` Source active status of the source.",
|
||||
"api": "requests",
|
||||
"name": "GetSourceActive",
|
||||
"category": "sources",
|
||||
"since": "4.9.1",
|
||||
"returns": [
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "sourceActive",
|
||||
"description": "Source active status of the source."
|
||||
}
|
||||
],
|
||||
"params": [
|
||||
{
|
||||
"type": "String",
|
||||
"name": "sourceName",
|
||||
"description": "Source name."
|
||||
}
|
||||
],
|
||||
"names": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "GetSourceActive"
|
||||
}
|
||||
],
|
||||
"categories": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "sources"
|
||||
}
|
||||
],
|
||||
"sinces": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "4.9.1"
|
||||
}
|
||||
],
|
||||
"heading": {
|
||||
"level": 2,
|
||||
"text": "GetSourceActive"
|
||||
},
|
||||
"lead": "",
|
||||
"type": "class",
|
||||
"examples": []
|
||||
},
|
||||
{
|
||||
"subheads": [],
|
||||
"description": "Get the audio's active status of a specified source.",
|
||||
@ -8875,7 +8569,6 @@
|
||||
"{double} `rotation` The clockwise rotation of the item in degrees around the point of alignment.",
|
||||
"{double} `scale.x` The x-scale factor of the source.",
|
||||
"{double} `scale.y` The y-scale factor of the source.",
|
||||
"{String} `scale.filter` The scale filter of the source. Can be \"OBS_SCALE_DISABLE\", \"OBS_SCALE_POINT\", \"OBS_SCALE_BICUBIC\", \"OBS_SCALE_BILINEAR\", \"OBS_SCALE_LANCZOS\" or \"OBS_SCALE_AREA\".",
|
||||
"{int} `crop.top` The number of pixels cropped off the top of the source before scaling.",
|
||||
"{int} `crop.right` The number of pixels cropped off the right of the source before scaling.",
|
||||
"{int} `crop.bottom` The number of pixels cropped off the bottom of the source before scaling.",
|
||||
@ -8939,11 +8632,6 @@
|
||||
"name": "scale.y",
|
||||
"description": "The y-scale factor of the source."
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"name": "scale.filter",
|
||||
"description": "The scale filter of the source. Can be \"OBS_SCALE_DISABLE\", \"OBS_SCALE_POINT\", \"OBS_SCALE_BICUBIC\", \"OBS_SCALE_BILINEAR\", \"OBS_SCALE_LANCZOS\" or \"OBS_SCALE_AREA\"."
|
||||
},
|
||||
{
|
||||
"type": "int",
|
||||
"name": "crop.top",
|
||||
@ -9092,7 +8780,6 @@
|
||||
"{double (optional)} `rotation` The new clockwise rotation of the item in degrees.",
|
||||
"{double (optional)} `scale.x` The new x scale of the item.",
|
||||
"{double (optional)} `scale.y` The new y scale of the item.",
|
||||
"{String (optional)} `scale.filter` The new scale filter of the source. Can be \"OBS_SCALE_DISABLE\", \"OBS_SCALE_POINT\", \"OBS_SCALE_BICUBIC\", \"OBS_SCALE_BILINEAR\", \"OBS_SCALE_LANCZOS\" or \"OBS_SCALE_AREA\".",
|
||||
"{int (optional)} `crop.top` The new amount of pixels cropped off the top of the source before scaling.",
|
||||
"{int (optional)} `crop.bottom` The new amount of pixels cropped off the bottom of the source before scaling.",
|
||||
"{int (optional)} `crop.left` The new amount of pixels cropped off the left of the source before scaling.",
|
||||
@ -9159,11 +8846,6 @@
|
||||
"name": "scale.y",
|
||||
"description": "The new y scale of the item."
|
||||
},
|
||||
{
|
||||
"type": "String (optional)",
|
||||
"name": "scale.filter",
|
||||
"description": "The new scale filter of the source. Can be \"OBS_SCALE_DISABLE\", \"OBS_SCALE_POINT\", \"OBS_SCALE_BICUBIC\", \"OBS_SCALE_BILINEAR\", \"OBS_SCALE_LANCZOS\" or \"OBS_SCALE_AREA\"."
|
||||
},
|
||||
{
|
||||
"type": "int (optional)",
|
||||
"name": "crop.top",
|
||||
@ -9652,7 +9334,7 @@
|
||||
"param": [
|
||||
"{String} `sceneName` Name of the scene to create the scene item in",
|
||||
"{String} `sourceName` Name of the source to be added",
|
||||
"{boolean (optional)} `setVisible` Whether to make the sceneitem visible on creation or not. Default `true`"
|
||||
"{boolean} `setVisible` Whether to make the sceneitem visible on creation or not. Default `true`"
|
||||
],
|
||||
"return": "{int} `itemId` Numerical ID of the created scene item",
|
||||
"api": "requests",
|
||||
@ -9678,7 +9360,7 @@
|
||||
"description": "Name of the source to be added"
|
||||
},
|
||||
{
|
||||
"type": "boolean (optional)",
|
||||
"type": "boolean",
|
||||
"name": "setVisible",
|
||||
"description": "Whether to make the sceneitem visible on creation or not. Default `true`"
|
||||
}
|
||||
@ -9991,7 +9673,7 @@
|
||||
"description": "Changes the order of scene items in the requested scene.",
|
||||
"param": [
|
||||
"{String (optional)} `scene` Name of the scene to reorder (defaults to current).",
|
||||
"{Array<Object>} `items` Ordered list of objects with name and/or id specified. Id preferred due to uniqueness per scene",
|
||||
"{Array<Scene>} `items` Ordered list of objects with name and/or id specified. Id preferred due to uniqueness per scene",
|
||||
"{int (optional)} `items.*.id` Id of a specific scene item. Unique on a scene by scene basis.",
|
||||
"{String (optional)} `items.*.name` Name of a scene item. Sufficiently unique if no scene items share sources within the scene."
|
||||
],
|
||||
@ -10006,7 +9688,7 @@
|
||||
"description": "Name of the scene to reorder (defaults to current)."
|
||||
},
|
||||
{
|
||||
"type": "Array<Object>",
|
||||
"type": "Array<Scene>",
|
||||
"name": "items",
|
||||
"description": "Ordered list of objects with name and/or id specified. Id preferred due to uniqueness per scene"
|
||||
},
|
||||
@ -10209,11 +9891,9 @@
|
||||
"{boolean} `streaming` Current streaming status.",
|
||||
"{boolean} `recording` Current recording status.",
|
||||
"{boolean} `recording-paused` If recording is paused.",
|
||||
"{boolean} `virtualcam` Current virtual cam status.",
|
||||
"{boolean} `preview-only` Always false. Retrocompatibility with OBSRemote.",
|
||||
"{String (optional)} `stream-timecode` Time elapsed since streaming started (only present if currently streaming).",
|
||||
"{String (optional)} `rec-timecode` Time elapsed since recording started (only present if currently recording).",
|
||||
"{String (optional)} `virtualcam-timecode` Time elapsed since virtual cam started (only present if virtual cam currently active)."
|
||||
"{String (optional)} `rec-timecode` Time elapsed since recording started (only present if currently recording)."
|
||||
],
|
||||
"api": "requests",
|
||||
"name": "GetStreamingStatus",
|
||||
@ -10235,11 +9915,6 @@
|
||||
"name": "recording-paused",
|
||||
"description": "If recording is paused."
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "virtualcam",
|
||||
"description": "Current virtual cam status."
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "preview-only",
|
||||
@ -10254,11 +9929,6 @@
|
||||
"type": "String (optional)",
|
||||
"name": "rec-timecode",
|
||||
"description": "Time elapsed since recording started (only present if currently recording)."
|
||||
},
|
||||
{
|
||||
"type": "String (optional)",
|
||||
"name": "virtualcam-timecode",
|
||||
"description": "Time elapsed since virtual cam started (only present if virtual cam currently active)."
|
||||
}
|
||||
],
|
||||
"names": [
|
||||
@ -11427,156 +11097,6 @@
|
||||
"type": "class",
|
||||
"examples": []
|
||||
}
|
||||
],
|
||||
"virtual cam": [
|
||||
{
|
||||
"subheads": [],
|
||||
"description": "Get current virtual cam status.",
|
||||
"return": [
|
||||
"{boolean} `isVirtualCam` Current virtual camera status.",
|
||||
"{String (optional)} `virtualCamTimecode` Time elapsed since virtual cam started (only present if virtual cam currently active)."
|
||||
],
|
||||
"api": "requests",
|
||||
"name": "GetVirtualCamStatus",
|
||||
"category": "virtual cam",
|
||||
"since": "4.9.1",
|
||||
"returns": [
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "isVirtualCam",
|
||||
"description": "Current virtual camera status."
|
||||
},
|
||||
{
|
||||
"type": "String (optional)",
|
||||
"name": "virtualCamTimecode",
|
||||
"description": "Time elapsed since virtual cam started (only present if virtual cam currently active)."
|
||||
}
|
||||
],
|
||||
"names": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "GetVirtualCamStatus"
|
||||
}
|
||||
],
|
||||
"categories": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "virtual cam"
|
||||
}
|
||||
],
|
||||
"sinces": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "4.9.1"
|
||||
}
|
||||
],
|
||||
"heading": {
|
||||
"level": 2,
|
||||
"text": "GetVirtualCamStatus"
|
||||
},
|
||||
"lead": "",
|
||||
"type": "class",
|
||||
"examples": []
|
||||
},
|
||||
{
|
||||
"subheads": [],
|
||||
"description": "Toggle virtual cam on or off (depending on the current virtual cam state).",
|
||||
"api": "requests",
|
||||
"name": "StartStopVirtualCam",
|
||||
"category": "virtual cam",
|
||||
"since": "4.9.1",
|
||||
"names": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "StartStopVirtualCam"
|
||||
}
|
||||
],
|
||||
"categories": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "virtual cam"
|
||||
}
|
||||
],
|
||||
"sinces": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "4.9.1"
|
||||
}
|
||||
],
|
||||
"heading": {
|
||||
"level": 2,
|
||||
"text": "StartStopVirtualCam"
|
||||
},
|
||||
"lead": "",
|
||||
"type": "class",
|
||||
"examples": []
|
||||
},
|
||||
{
|
||||
"subheads": [],
|
||||
"description": "Start virtual cam.\nWill return an `error` if virtual cam is already active.",
|
||||
"api": "requests",
|
||||
"name": "StartVirtualCam",
|
||||
"category": "virtual cam",
|
||||
"since": "4.9.1",
|
||||
"names": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "StartVirtualCam"
|
||||
}
|
||||
],
|
||||
"categories": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "virtual cam"
|
||||
}
|
||||
],
|
||||
"sinces": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "4.9.1"
|
||||
}
|
||||
],
|
||||
"heading": {
|
||||
"level": 2,
|
||||
"text": "StartVirtualCam"
|
||||
},
|
||||
"lead": "",
|
||||
"type": "class",
|
||||
"examples": []
|
||||
},
|
||||
{
|
||||
"subheads": [],
|
||||
"description": "Stop virtual cam.\nWill return an `error` if virtual cam is not active.",
|
||||
"api": "requests",
|
||||
"name": "StopVirtualCam",
|
||||
"category": "virtual cam",
|
||||
"since": "4.9.1",
|
||||
"names": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "StopVirtualCam"
|
||||
}
|
||||
],
|
||||
"categories": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "virtual cam"
|
||||
}
|
||||
],
|
||||
"sinces": [
|
||||
{
|
||||
"name": "",
|
||||
"description": "4.9.1"
|
||||
}
|
||||
],
|
||||
"heading": {
|
||||
"level": 2,
|
||||
"text": "StopVirtualCam"
|
||||
},
|
||||
"lead": "",
|
||||
"type": "class",
|
||||
"examples": []
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
<!-- This file was generated based on handlebars templates. Do not edit directly! -->
|
||||
|
||||
# obs-websocket 4.9.1 protocol reference
|
||||
# obs-websocket 4.9.0 protocol reference
|
||||
|
||||
# General Introduction
|
||||
Messages are exchanged between the client and the server as JSON objects.
|
||||
@ -37,7 +37,7 @@ auth_response_hash = binary_sha256(auth_response_string)
|
||||
auth_response = base64_encode(auth_response_hash)
|
||||
```
|
||||
|
||||
You can also refer to any of the [client libraries](https://github.com/Palakis/obs-websocket#for-developers) listed on the README for examples of how to authenticate.
|
||||
You can also refer to any of the client libraries listed on the [README](README.md) for examples of how to authenticate.
|
||||
|
||||
|
||||
|
||||
@ -82,9 +82,6 @@ You can also refer to any of the [client libraries](https://github.com/Palakis/o
|
||||
+ [RecordingStopped](#recordingstopped)
|
||||
+ [RecordingPaused](#recordingpaused)
|
||||
+ [RecordingResumed](#recordingresumed)
|
||||
* [Virtual Cam](#virtual-cam)
|
||||
+ [VirtualCamStarted](#virtualcamstarted)
|
||||
+ [VirtualCamStopped](#virtualcamstopped)
|
||||
* [Replay Buffer](#replay-buffer)
|
||||
+ [ReplayStarting](#replaystarting)
|
||||
+ [ReplayStarted](#replaystarted)
|
||||
@ -145,7 +142,6 @@ You can also refer to any of the [client libraries](https://github.com/Palakis/o
|
||||
+ [TriggerHotkeyByName](#triggerhotkeybyname)
|
||||
+ [TriggerHotkeyBySequence](#triggerhotkeybysequence)
|
||||
+ [ExecuteBatch](#executebatch)
|
||||
+ [Sleep](#sleep)
|
||||
* [Media Control](#media-control)
|
||||
+ [PlayPauseMedia](#playpausemedia)
|
||||
+ [RestartMedia](#restartmedia)
|
||||
@ -164,12 +160,9 @@ You can also refer to any of the [client libraries](https://github.com/Palakis/o
|
||||
+ [GetSourceTypesList](#getsourcetypeslist)
|
||||
+ [GetVolume](#getvolume)
|
||||
+ [SetVolume](#setvolume)
|
||||
+ [SetAudioTracks](#setaudiotracks)
|
||||
+ [GetAudioTracks](#getaudiotracks)
|
||||
+ [GetMute](#getmute)
|
||||
+ [SetMute](#setmute)
|
||||
+ [ToggleMute](#togglemute)
|
||||
+ [GetSourceActive](#getsourceactive)
|
||||
+ [GetAudioActive](#getaudioactive)
|
||||
+ [SetSourceName](#setsourcename)
|
||||
+ [SetSyncOffset](#setsyncoffset)
|
||||
@ -273,11 +266,6 @@ You can also refer to any of the [client libraries](https://github.com/Palakis/o
|
||||
+ [SetTransitionSettings](#settransitionsettings)
|
||||
+ [ReleaseTBar](#releasetbar)
|
||||
+ [SetTBarPosition](#settbarposition)
|
||||
* [Virtual Cam](#virtual-cam-1)
|
||||
+ [GetVirtualCamStatus](#getvirtualcamstatus)
|
||||
+ [StartStopVirtualCam](#startstopvirtualcam)
|
||||
+ [StartVirtualCam](#startvirtualcam)
|
||||
+ [StopVirtualCam](#stopvirtualcam)
|
||||
|
||||
<!-- tocstop -->
|
||||
|
||||
@ -313,7 +301,6 @@ These are complex types, such as `Source` and `Scene`, which are used as argumen
|
||||
| `rotation` | _double_ | The clockwise rotation of the scene item in degrees around the point of alignment. |
|
||||
| `scale.x` | _double_ | The x-scale factor of the scene item. |
|
||||
| `scale.y` | _double_ | The y-scale factor of the scene item. |
|
||||
| `scale.filter` | _String_ | The scale filter of the source. Can be "OBS_SCALE_DISABLE", "OBS_SCALE_POINT", "OBS_SCALE_BICUBIC", "OBS_SCALE_BILINEAR", "OBS_SCALE_LANCZOS" or "OBS_SCALE_AREA". |
|
||||
| `crop.top` | _int_ | The number of pixels cropped off the top of the scene item before scaling. |
|
||||
| `crop.right` | _int_ | The number of pixels cropped off the right of the scene item before scaling. |
|
||||
| `crop.bottom` | _int_ | The number of pixels cropped off the bottom of the scene item before scaling. |
|
||||
@ -356,7 +343,7 @@ These are complex types, such as `Source` and `Scene`, which are used as argumen
|
||||
| `flags.encoded` | _boolean_ | Output is encoded |
|
||||
| `flags.multiTrack` | _boolean_ | Output uses several audio tracks |
|
||||
| `flags.service` | _boolean_ | Output uses a service |
|
||||
| `settings` | _Object_ | Output settings |
|
||||
| `settings` | _Object_ | Output name |
|
||||
| `active` | _boolean_ | Output status (active or not) |
|
||||
| `reconnecting` | _boolean_ | Output reconnection status (reconnecting or not) |
|
||||
| `congestion` | _double_ | Output congestion |
|
||||
@ -524,7 +511,7 @@ A transition (other than "cut") has begun.
|
||||
| `name` | _String_ | Transition name. |
|
||||
| `type` | _String_ | Transition type. |
|
||||
| `duration` | _int_ | Transition duration (in milliseconds). Will be -1 for any transition with a fixed duration, such as a Stinger, due to limitations of the OBS API. |
|
||||
| `from-scene` | _String (optional)_ | Source scene of the transition |
|
||||
| `from-scene` | _String_ | Source scene of the transition |
|
||||
| `to-scene` | _String_ | Destination scene of the transition |
|
||||
|
||||
|
||||
@ -564,7 +551,7 @@ A stinger transition has finished playing its video.
|
||||
| `name` | _String_ | Transition name. |
|
||||
| `type` | _String_ | Transition type. |
|
||||
| `duration` | _int_ | Transition duration (in milliseconds). |
|
||||
| `from-scene` | _String (optional)_ | Source scene of the transition |
|
||||
| `from-scene` | _String_ | Source scene of the transition |
|
||||
| `to-scene` | _String_ | Destination scene of the transition |
|
||||
|
||||
|
||||
@ -791,34 +778,6 @@ _No additional response items._
|
||||
|
||||
---
|
||||
|
||||
## Virtual Cam
|
||||
|
||||
### VirtualCamStarted
|
||||
|
||||
|
||||
- Added in v4.9.1
|
||||
|
||||
Virtual cam started successfully.
|
||||
|
||||
**Response Items:**
|
||||
|
||||
_No additional response items._
|
||||
|
||||
---
|
||||
|
||||
### VirtualCamStopped
|
||||
|
||||
|
||||
- Added in v4.9.1
|
||||
|
||||
Virtual cam stopped successfully.
|
||||
|
||||
**Response Items:**
|
||||
|
||||
_No additional response items._
|
||||
|
||||
---
|
||||
|
||||
## Replay Buffer
|
||||
|
||||
### ReplayStarting
|
||||
@ -986,7 +945,6 @@ The volume of a source has changed.
|
||||
| ---- | :---: | ------------|
|
||||
| `sourceName` | _String_ | Source name |
|
||||
| `volume` | _float_ | Source volume |
|
||||
| `volumeDb` | _float_ | Source volume in Decibel |
|
||||
|
||||
|
||||
---
|
||||
@ -1819,26 +1777,6 @@ Executes a list of requests sequentially (one-by-one on the same thread).
|
||||
| `results.*.error` | _String (Optional)_ | Error message accompanying an `error` status. |
|
||||
|
||||
|
||||
---
|
||||
|
||||
### Sleep
|
||||
|
||||
|
||||
- Added in v4.9.1
|
||||
|
||||
Waits for the specified duration. Designed to be used in `ExecuteBatch` operations.
|
||||
|
||||
**Request Fields:**
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | :---: | ------------|
|
||||
| `sleepMillis` | _int_ | Delay in milliseconds to wait before continuing. |
|
||||
|
||||
|
||||
**Response Items:**
|
||||
|
||||
_No additional response items._
|
||||
|
||||
---
|
||||
|
||||
## Media Control
|
||||
@ -1849,14 +1787,13 @@ _No additional response items._
|
||||
- Added in v4.9.0
|
||||
|
||||
Pause or play a media source. Supports ffmpeg and vlc media sources (as of OBS v25.0.8)
|
||||
Note :Leaving out `playPause` toggles the current pause state
|
||||
|
||||
**Request Fields:**
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | :---: | ------------|
|
||||
| `sourceName` | _String_ | Source name. |
|
||||
| `playPause` | _boolean_ | (optional) Whether to pause or play the source. `false` for play, `true` for pause. |
|
||||
| `playPause` | _boolean_ | Whether to pause or play the source. `false` for play, `true` for pause. |
|
||||
|
||||
|
||||
**Response Items:**
|
||||
@ -2211,56 +2148,6 @@ Set the volume of the specified source. Default request format uses mul, NOT SLI
|
||||
|
||||
_No additional response items._
|
||||
|
||||
---
|
||||
|
||||
### SetAudioTracks
|
||||
|
||||
|
||||
- Added in v4.9.1
|
||||
|
||||
Changes whether an audio track is active for a source.
|
||||
|
||||
**Request Fields:**
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | :---: | ------------|
|
||||
| `sourceName` | _String_ | Source name. |
|
||||
| `track` | _int_ | Audio tracks 1-6. |
|
||||
| `active` | _boolean_ | Whether audio track is active or not. |
|
||||
|
||||
|
||||
**Response Items:**
|
||||
|
||||
_No additional response items._
|
||||
|
||||
---
|
||||
|
||||
### GetAudioTracks
|
||||
|
||||
|
||||
- Added in v4.9.1
|
||||
|
||||
Gets whether an audio track is active for a source.
|
||||
|
||||
**Request Fields:**
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | :---: | ------------|
|
||||
| `sourceName` | _String_ | Source name. |
|
||||
|
||||
|
||||
**Response Items:**
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | :---: | ------------|
|
||||
| `track1` | _boolean_ | |
|
||||
| `track2` | _boolean_ | |
|
||||
| `track3` | _boolean_ | |
|
||||
| `track4` | _boolean_ | |
|
||||
| `track5` | _boolean_ | |
|
||||
| `track6` | _boolean_ | |
|
||||
|
||||
|
||||
---
|
||||
|
||||
### GetMute
|
||||
@ -2326,29 +2213,6 @@ Inverts the mute status of a specified source.
|
||||
|
||||
_No additional response items._
|
||||
|
||||
---
|
||||
|
||||
### GetSourceActive
|
||||
|
||||
|
||||
- Added in v4.9.1
|
||||
|
||||
Get the source's active status of a specified source (if it is showing in the final mix).
|
||||
|
||||
**Request Fields:**
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | :---: | ------------|
|
||||
| `sourceName` | _String_ | Source name. |
|
||||
|
||||
|
||||
**Response Items:**
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | :---: | ------------|
|
||||
| `sourceActive` | _boolean_ | Source active status of the source. |
|
||||
|
||||
|
||||
---
|
||||
|
||||
### GetAudioActive
|
||||
@ -3592,7 +3456,6 @@ Coordinates are relative to the item's parent (the scene or group it belongs to)
|
||||
| `rotation` | _double_ | The clockwise rotation of the item in degrees around the point of alignment. |
|
||||
| `scale.x` | _double_ | The x-scale factor of the source. |
|
||||
| `scale.y` | _double_ | The y-scale factor of the source. |
|
||||
| `scale.filter` | _String_ | The scale filter of the source. Can be "OBS_SCALE_DISABLE", "OBS_SCALE_POINT", "OBS_SCALE_BICUBIC", "OBS_SCALE_BILINEAR", "OBS_SCALE_LANCZOS" or "OBS_SCALE_AREA". |
|
||||
| `crop.top` | _int_ | The number of pixels cropped off the top of the source before scaling. |
|
||||
| `crop.right` | _int_ | The number of pixels cropped off the right of the source before scaling. |
|
||||
| `crop.bottom` | _int_ | The number of pixels cropped off the bottom of the source before scaling. |
|
||||
@ -3636,7 +3499,6 @@ Coordinates are relative to the item's parent (the scene or group it belongs to)
|
||||
| `rotation` | _double (optional)_ | The new clockwise rotation of the item in degrees. |
|
||||
| `scale.x` | _double (optional)_ | The new x scale of the item. |
|
||||
| `scale.y` | _double (optional)_ | The new y scale of the item. |
|
||||
| `scale.filter` | _String (optional)_ | The new scale filter of the source. Can be "OBS_SCALE_DISABLE", "OBS_SCALE_POINT", "OBS_SCALE_BICUBIC", "OBS_SCALE_BILINEAR", "OBS_SCALE_LANCZOS" or "OBS_SCALE_AREA". |
|
||||
| `crop.top` | _int (optional)_ | The new amount of pixels cropped off the top of the source before scaling. |
|
||||
| `crop.bottom` | _int (optional)_ | The new amount of pixels cropped off the bottom of the source before scaling. |
|
||||
| `crop.left` | _int (optional)_ | The new amount of pixels cropped off the left of the source before scaling. |
|
||||
@ -3812,7 +3674,7 @@ Creates a scene item in a scene. In other words, this is how you add a source in
|
||||
| ---- | :---: | ------------|
|
||||
| `sceneName` | _String_ | Name of the scene to create the scene item in |
|
||||
| `sourceName` | _String_ | Name of the source to be added |
|
||||
| `setVisible` | _boolean (optional)_ | Whether to make the sceneitem visible on creation or not. Default `true` |
|
||||
| `setVisible` | _boolean_ | Whether to make the sceneitem visible on creation or not. Default `true` |
|
||||
|
||||
|
||||
**Response Items:**
|
||||
@ -3950,7 +3812,7 @@ Changes the order of scene items in the requested scene.
|
||||
| Name | Type | Description |
|
||||
| ---- | :---: | ------------|
|
||||
| `scene` | _String (optional)_ | Name of the scene to reorder (defaults to current). |
|
||||
| `items` | _Array<Object>_ | Ordered list of objects with name and/or id specified. Id preferred due to uniqueness per scene |
|
||||
| `items` | _Array<Scene>_ | Ordered list of objects with name and/or id specified. Id preferred due to uniqueness per scene |
|
||||
| `items.*.id` | _int (optional)_ | Id of a specific scene item. Unique on a scene by scene basis. |
|
||||
| `items.*.name` | _String (optional)_ | Name of a scene item. Sufficiently unique if no scene items share sources within the scene. |
|
||||
|
||||
@ -4047,11 +3909,9 @@ _No specified parameters._
|
||||
| `streaming` | _boolean_ | Current streaming status. |
|
||||
| `recording` | _boolean_ | Current recording status. |
|
||||
| `recording-paused` | _boolean_ | If recording is paused. |
|
||||
| `virtualcam` | _boolean_ | Current virtual cam status. |
|
||||
| `preview-only` | _boolean_ | Always false. Retrocompatibility with OBSRemote. |
|
||||
| `stream-timecode` | _String (optional)_ | Time elapsed since streaming started (only present if currently streaming). |
|
||||
| `rec-timecode` | _String (optional)_ | Time elapsed since recording started (only present if currently recording). |
|
||||
| `virtualcam-timecode` | _String (optional)_ | Time elapsed since virtual cam started (only present if virtual cam currently active). |
|
||||
|
||||
|
||||
---
|
||||
@ -4562,79 +4422,3 @@ _No additional response items._
|
||||
|
||||
---
|
||||
|
||||
## Virtual Cam
|
||||
|
||||
### GetVirtualCamStatus
|
||||
|
||||
|
||||
- Added in v4.9.1
|
||||
|
||||
Get current virtual cam status.
|
||||
|
||||
**Request Fields:**
|
||||
|
||||
_No specified parameters._
|
||||
|
||||
**Response Items:**
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | :---: | ------------|
|
||||
| `isVirtualCam` | _boolean_ | Current virtual camera status. |
|
||||
| `virtualCamTimecode` | _String (optional)_ | Time elapsed since virtual cam started (only present if virtual cam currently active). |
|
||||
|
||||
|
||||
---
|
||||
|
||||
### StartStopVirtualCam
|
||||
|
||||
|
||||
- Added in v4.9.1
|
||||
|
||||
Toggle virtual cam on or off (depending on the current virtual cam state).
|
||||
|
||||
**Request Fields:**
|
||||
|
||||
_No specified parameters._
|
||||
|
||||
**Response Items:**
|
||||
|
||||
_No additional response items._
|
||||
|
||||
---
|
||||
|
||||
### StartVirtualCam
|
||||
|
||||
|
||||
- Added in v4.9.1
|
||||
|
||||
Start virtual cam.
|
||||
Will return an `error` if virtual cam is already active.
|
||||
|
||||
**Request Fields:**
|
||||
|
||||
_No specified parameters._
|
||||
|
||||
**Response Items:**
|
||||
|
||||
_No additional response items._
|
||||
|
||||
---
|
||||
|
||||
### StopVirtualCam
|
||||
|
||||
|
||||
- Added in v4.9.1
|
||||
|
||||
Stop virtual cam.
|
||||
Will return an `error` if virtual cam is not active.
|
||||
|
||||
**Request Fields:**
|
||||
|
||||
_No specified parameters._
|
||||
|
||||
**Response Items:**
|
||||
|
||||
_No additional response items._
|
||||
|
||||
---
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# obs-websocket 4.9.1 protocol reference
|
||||
# obs-websocket 4.9.0 protocol reference
|
||||
|
||||
# General Introduction
|
||||
Messages are exchanged between the client and the server as JSON objects.
|
||||
@ -35,4 +35,4 @@ auth_response_hash = binary_sha256(auth_response_string)
|
||||
auth_response = base64_encode(auth_response_hash)
|
||||
```
|
||||
|
||||
You can also refer to any of the [client libraries](https://github.com/Palakis/obs-websocket#for-developers) listed on the README for examples of how to authenticate.
|
||||
You can also refer to any of the client libraries listed on the [README](README.md) for examples of how to authenticate.
|
||||
|
107
external/FindLibObs.cmake
vendored
Normal file
107
external/FindLibObs.cmake
vendored
Normal file
@ -0,0 +1,107 @@
|
||||
# This module can be copied and used by external plugins for OBS
|
||||
#
|
||||
# Once done these will be defined:
|
||||
#
|
||||
# LIBOBS_FOUND
|
||||
# LIBOBS_INCLUDE_DIRS
|
||||
# LIBOBS_LIBRARIES
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_OBS QUIET obs libobs)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_lib_suffix 64)
|
||||
else()
|
||||
set(_lib_suffix 32)
|
||||
endif()
|
||||
|
||||
if(DEFINED CMAKE_BUILD_TYPE)
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
set(_build_type_base "debug")
|
||||
else()
|
||||
set(_build_type_base "release")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_path(LIBOBS_INCLUDE_DIR
|
||||
NAMES obs.h
|
||||
HINTS
|
||||
ENV obsPath${_lib_suffix}
|
||||
ENV obsPath
|
||||
${obsPath}
|
||||
PATHS
|
||||
/usr/include /usr/local/include /opt/local/include /sw/include
|
||||
PATH_SUFFIXES
|
||||
libobs
|
||||
)
|
||||
|
||||
function(find_obs_lib base_name repo_build_path lib_name)
|
||||
string(TOUPPER "${base_name}" base_name_u)
|
||||
|
||||
if(DEFINED _build_type_base)
|
||||
set(_build_type_${repo_build_path} "${_build_type_base}/${repo_build_path}")
|
||||
set(_build_type_${repo_build_path}${_lib_suffix} "${_build_type_base}${_lib_suffix}/${repo_build_path}")
|
||||
endif()
|
||||
|
||||
find_library(${base_name_u}_LIB
|
||||
NAMES ${_${base_name_u}_LIBRARIES} ${lib_name} lib${lib_name}
|
||||
HINTS
|
||||
ENV obsPath${_lib_suffix}
|
||||
ENV obsPath
|
||||
${obsPath}
|
||||
${_${base_name_u}_LIBRARY_DIRS}
|
||||
PATHS
|
||||
/usr/lib /usr/local/lib /opt/local/lib /sw/lib
|
||||
PATH_SUFFIXES
|
||||
lib${_lib_suffix} lib
|
||||
libs${_lib_suffix} libs
|
||||
bin${_lib_suffix} bin
|
||||
../lib${_lib_suffix} ../lib
|
||||
../libs${_lib_suffix} ../libs
|
||||
../bin${_lib_suffix} ../bin
|
||||
# base repo non-msvc-specific search paths
|
||||
${_build_type_${repo_build_path}}
|
||||
${_build_type_${repo_build_path}${_lib_suffix}}
|
||||
build/${repo_build_path}
|
||||
build${_lib_suffix}/${repo_build_path}
|
||||
# base repo msvc-specific search paths on windows
|
||||
build${_lib_suffix}/${repo_build_path}/Debug
|
||||
build${_lib_suffix}/${repo_build_path}/RelWithDebInfo
|
||||
build/${repo_build_path}/Debug
|
||||
build/${repo_build_path}/RelWithDebInfo
|
||||
)
|
||||
endfunction()
|
||||
|
||||
find_obs_lib(LIBOBS libobs obs)
|
||||
|
||||
if(MSVC)
|
||||
find_obs_lib(W32_PTHREADS deps/w32-pthreads w32-pthreads)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Libobs DEFAULT_MSG LIBOBS_LIB LIBOBS_INCLUDE_DIR)
|
||||
mark_as_advanced(LIBOBS_INCLUDE_DIR LIBOBS_LIB)
|
||||
|
||||
if(LIBOBS_FOUND)
|
||||
if(MSVC)
|
||||
if (NOT DEFINED W32_PTHREADS_LIB)
|
||||
message(FATAL_ERROR "Could not find the w32-pthreads library" )
|
||||
endif()
|
||||
|
||||
set(W32_PTHREADS_INCLUDE_DIR ${LIBOBS_INCLUDE_DIR}/../deps/w32-pthreads)
|
||||
endif()
|
||||
|
||||
set(LIBOBS_INCLUDE_DIRS ${LIBOBS_INCLUDE_DIR} ${W32_PTHREADS_INCLUDE_DIR})
|
||||
set(LIBOBS_LIBRARIES ${LIBOBS_LIB} ${W32_PTHREADS_LIB})
|
||||
include(${LIBOBS_INCLUDE_DIR}/../cmake/external/ObsPluginHelpers.cmake)
|
||||
|
||||
# allows external plugins to easily use/share common dependencies that are often included with libobs (such as FFmpeg)
|
||||
if(NOT DEFINED INCLUDED_LIBOBS_CMAKE_MODULES)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${LIBOBS_INCLUDE_DIR}/../cmake/Modules/")
|
||||
set(INCLUDED_LIBOBS_CMAKE_MODULES true)
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "Could not find the libobs library" )
|
||||
endif()
|
@ -1,74 +0,0 @@
|
||||
#define MyAppName "obs-websocket"
|
||||
#define MyAppVersion "5.0.0"
|
||||
#define MyAppPublisher "obs-websocket"
|
||||
#define MyAppURL "http://github.com/obsproject/obs-websocket"
|
||||
|
||||
[Setup]
|
||||
; NOTE: The value of AppId uniquely identifies this application.
|
||||
; Do not use the same AppId value in installers for other applications.
|
||||
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
|
||||
AppId={{117EE44F-48E1-49E5-A381-CC8D9195CF35}
|
||||
AppName={#MyAppName}
|
||||
AppVersion={#MyAppVersion}
|
||||
AppPublisher={#MyAppPublisher}
|
||||
AppPublisherURL={#MyAppURL}
|
||||
AppSupportURL={#MyAppURL}
|
||||
AppUpdatesURL={#MyAppURL}
|
||||
DefaultDirName={code:GetDirName}
|
||||
DefaultGroupName={#MyAppName}
|
||||
OutputBaseFilename=obs-websocket-{#MyAppVersion}-Windows-Installer
|
||||
Compression=lzma
|
||||
SolidCompression=yes
|
||||
DirExistsWarning=no
|
||||
|
||||
[Languages]
|
||||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||
|
||||
[Files]
|
||||
Source: "..\release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
Source: "..\LICENSE"; Flags: dontcopy
|
||||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||
|
||||
[Icons]
|
||||
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
|
||||
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
|
||||
|
||||
[Code]
|
||||
procedure InitializeWizard();
|
||||
var
|
||||
GPLText: AnsiString;
|
||||
Page: TOutputMsgMemoWizardPage;
|
||||
begin
|
||||
ExtractTemporaryFile('LICENSE');
|
||||
LoadStringFromFile(ExpandConstant('{tmp}\LICENSE'), GPLText);
|
||||
Page := CreateOutputMsgMemoPage(wpWelcome,
|
||||
'License Information', 'Please review the license terms before installing obs-websocket',
|
||||
'Press Page Down to see the rest of the agreement. Once you are aware of your rights, click Next to continue.',
|
||||
String(GPLText)
|
||||
);
|
||||
end;
|
||||
|
||||
// Validate that obs-studio is installed before installing the plugin
|
||||
function PrepareToInstall(var NeedsRestart: Boolean): String;
|
||||
begin
|
||||
Result := '';
|
||||
|
||||
if not DirExists(ExpandConstant('{app}\obs-plugins')) then
|
||||
begin
|
||||
Result := 'The selected install directory does not appear to be valid. Please install OBS Studio before installing {#MyAppName} or correct your install path.';
|
||||
end;
|
||||
end;
|
||||
|
||||
// credit where it's due :
|
||||
// following function come from https://github.com/Xaymar/obs-studio_amf-encoder-plugin/blob/master/%23Resources/Installer.in.iss#L45
|
||||
function GetDirName(Value: string): string;
|
||||
var
|
||||
InstallPath: string;
|
||||
begin
|
||||
// initialize default path, which will be returned when the following registry
|
||||
// key queries fail due to missing keys or for some different reason
|
||||
Result := '{commonpf}\obs-studio';
|
||||
// query the first registry value; if this succeeds, return the obtained value
|
||||
if RegQueryStringValue(HKLM32, 'SOFTWARE\OBS Studio', '', InstallPath) then
|
||||
Result := InstallPath
|
||||
end;
|
@ -2,7 +2,7 @@
|
||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||
|
||||
#define MyAppName "obs-websocket"
|
||||
#define MyAppVersion "4.9.1-compat"
|
||||
#define MyAppVersion "4.9.0"
|
||||
#define MyAppPublisher "Stephane Lepin"
|
||||
#define MyAppURL "http://github.com/Palakis/obs-websocket"
|
||||
|
||||
|
@ -18,14 +18,13 @@ with this program. If not, see <https://www.gnu.org/licenses/>
|
||||
|
||||
#include <obs-frontend-api.h>
|
||||
|
||||
#include <QObject>
|
||||
#include <QCryptographicHash>
|
||||
#include <QRandomGenerator>
|
||||
#include <QTime>
|
||||
#include <QSystemTrayIcon>
|
||||
#include <QMainWindow>
|
||||
#include <QInputDialog>
|
||||
#include <QMessageBox>
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QCryptographicHash>
|
||||
#include <QtCore/QTime>
|
||||
#include <QtWidgets/QSystemTrayIcon>
|
||||
#include <QtWidgets/QMainWindow>
|
||||
#include <QtWidgets/QInputDialog>
|
||||
#include <QtWidgets/QMessageBox>
|
||||
|
||||
#define SECTION_NAME "WebsocketAPI"
|
||||
#define PARAM_ENABLE "ServerEnabled"
|
||||
@ -57,6 +56,8 @@ Config::Config() :
|
||||
Salt(""),
|
||||
SettingsLoaded(false)
|
||||
{
|
||||
qsrand(QTime::currentTime().msec());
|
||||
|
||||
SetDefaults();
|
||||
SessionChallenge = GenerateSalt();
|
||||
|
||||
@ -201,30 +202,36 @@ void Config::MigrateFromGlobalSettings()
|
||||
|
||||
QString Config::GenerateSalt()
|
||||
{
|
||||
// Get OS seeded random number generator
|
||||
QRandomGenerator *rng = QRandomGenerator::global();
|
||||
|
||||
// Generate 32 random chars
|
||||
const size_t randomCount = 32;
|
||||
QByteArray randomChars;
|
||||
for (size_t i = 0; i < randomCount; i++)
|
||||
randomChars.append((char)rng->bounded(255));
|
||||
for (size_t i = 0; i < randomCount; i++) {
|
||||
randomChars.append((char)qrand());
|
||||
}
|
||||
|
||||
// Convert the 32 random chars to a base64 string
|
||||
return randomChars.toBase64();
|
||||
QString salt = randomChars.toBase64();
|
||||
|
||||
return salt;
|
||||
}
|
||||
|
||||
QString Config::GenerateSecret(QString password, QString salt)
|
||||
{
|
||||
// Create challenge hash
|
||||
auto challengeHash = QCryptographicHash(QCryptographicHash::Algorithm::Sha256);
|
||||
// Add password bytes to hash
|
||||
challengeHash.addData(password.toUtf8());
|
||||
// Add salt bytes to hash
|
||||
challengeHash.addData(salt.toUtf8());
|
||||
// Concatenate the password and the salt
|
||||
QString passAndSalt = "";
|
||||
passAndSalt += password;
|
||||
passAndSalt += salt;
|
||||
|
||||
// Generate SHA256 hash then encode to Base64
|
||||
return challengeHash.result().toBase64();
|
||||
// Generate a SHA256 hash of the password and salt
|
||||
auto challengeHash = QCryptographicHash::hash(
|
||||
passAndSalt.toUtf8(),
|
||||
QCryptographicHash::Algorithm::Sha256
|
||||
);
|
||||
|
||||
// Encode SHA256 hash to Base64
|
||||
QString challenge = challengeHash.toBase64();
|
||||
|
||||
return challenge;
|
||||
}
|
||||
|
||||
void Config::SetPassword(QString password)
|
||||
@ -267,9 +274,9 @@ void Config::OnFrontendEvent(enum obs_frontend_event event, void* param)
|
||||
|
||||
if (event == OBS_FRONTEND_EVENT_PROFILE_CHANGED) {
|
||||
obs_frontend_push_ui_translation(obs_module_get_string);
|
||||
QString startMessage = QObject::tr("OBSWebsocketCompat.ProfileChanged.Started");
|
||||
QString stopMessage = QObject::tr("OBSWebsocketCompat.ProfileChanged.Stopped");
|
||||
QString restartMessage = QObject::tr("OBSWebsocketCompat.ProfileChanged.Restarted");
|
||||
QString startMessage = QObject::tr("OBSWebsocket.ProfileChanged.Started");
|
||||
QString stopMessage = QObject::tr("OBSWebsocket.ProfileChanged.Stopped");
|
||||
QString restartMessage = QObject::tr("OBSWebsocket.ProfileChanged.Restarted");
|
||||
obs_frontend_pop_ui_translation();
|
||||
|
||||
bool previousEnabled = config->ServerEnabled;
|
||||
@ -316,18 +323,14 @@ void Config::FirstRunPasswordSetup()
|
||||
|
||||
// check if the password is already set
|
||||
auto config = GetConfig();
|
||||
if (!config) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(config->Secret.isEmpty()) && !(config->Salt.isEmpty())) {
|
||||
return;
|
||||
}
|
||||
|
||||
obs_frontend_push_ui_translation(obs_module_get_string);
|
||||
QString dialogTitle = QObject::tr("OBSWebsocketCompat.InitialPasswordSetup.Title");
|
||||
QString dialogText = QObject::tr("OBSWebsocketCompat.InitialPasswordSetup.Text");
|
||||
QString dismissedText = QObject::tr("OBSWebsocketCompat.InitialPasswordSetup.DismissedText");
|
||||
QString dialogTitle = QObject::tr("OBSWebsocket.InitialPasswordSetup.Title");
|
||||
QString dialogText = QObject::tr("OBSWebsocket.InitialPasswordSetup.Text");
|
||||
QString dismissedText = QObject::tr("OBSWebsocket.InitialPasswordSetup.DismissedText");
|
||||
obs_frontend_pop_ui_translation();
|
||||
|
||||
auto mainWindow = reinterpret_cast<QMainWindow*>(
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user