فهرست منبع

CI: Add Zsh-based scripts for Linux

PatTheMav 3 سال پیش
والد
کامیت
f2a073db82

+ 13 - 0
.github/scripts/build-linux.sh

@@ -0,0 +1,13 @@
+#!/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}/build-linux.zsh ${@}

+ 1 - 0
.github/scripts/build-linux.zsh

@@ -0,0 +1 @@
+.build.zsh

+ 13 - 0
.github/scripts/package-linux.sh

@@ -0,0 +1,13 @@
+#!/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 - 0
.github/scripts/package-linux.zsh

@@ -0,0 +1 @@
+.package.zsh

+ 1 - 0
.github/scripts/utils.zsh/check_linux

@@ -0,0 +1 @@
+:

+ 44 - 0
.github/scripts/utils.zsh/setup_linux

@@ -0,0 +1,44 @@
+autoload -Uz log_error log_status log_info mkcd
+
+if (( ! ${+commands[apt-get]} )) {
+  log_error 'apt-get not found. Please ensure apt is available on the system.'
+  return 2
+}
+
+log_info 'Installing obs build dependencies...'
+sudo dpkg --add-architecture amd64
+sudo apt-get -qq update
+sudo apt-get install -y \
+    build-essential \
+    ninja-build \
+    clang \
+    clang-format \
+    git \
+    jq \
+    qtbase5-dev \
+    libqt5svg5-dev \
+    libqt5x11extras5-dev \
+    qtbase5-private-dev \
+    libwayland-dev \
+    libavcodec-dev \
+    libavdevice-dev \
+    libavfilter-dev \
+    libavformat-dev \
+    libavutil-dev \
+    libswresample-dev \
+    libswscale-dev \
+    libx264-dev \
+    libjansson-dev \
+    libpulse-dev \
+    libx11-dev \
+    libx11-xcb-dev \
+    libmbedtls-dev \
+    libgl1-mesa-dev \
+    pkg-config \
+    libcurl4-openssl-dev
+
+if ! type cmake &>/dev/null; then
+    sudo apt-get install -y cmake
+fi
+
+rehash

+ 0 - 103
CI/build-linux.sh

@@ -1,103 +0,0 @@
-#!/bin/bash
-
-##############################################################################
-# Linux plugin build script
-##############################################################################
-#
-# This script contains all steps necessary to:
-#
-#   * Build libobs and obs-frontend-api with all required dependencies
-#   * Build your plugin
-#   * Create debian package
-#
-# Parameters:
-#   -h, --help                      : Print usage help
-#   -q, --quiet                     : Suppress most build process output
-#   -v, --verbose                   : Enable more verbose build process output
-#   -p, --package                   : Create installer for plugin
-#   -b, --build-dir                 : Specify alternative build directory
-#                                     (default: build)
-#
-# Environment Variables (optional):
-#   OBS_VERSION         : OBS Version
-#
-##############################################################################
-
-# Halt on errors
-set -eE
-
-## SET UP ENVIRONMENT ##
-_RUN_OBS_BUILD_SCRIPT=TRUE
-
-CHECKOUT_DIR="$(git rev-parse --show-toplevel)"
-if [ -f "${CHECKOUT_DIR}/CI/include/build_environment.sh" ]; then
-    source "${CHECKOUT_DIR}/CI/include/build_environment.sh"
-fi
-PRODUCT_NAME="${PRODUCT_NAME:-obs-plugin}"
-DEPS_BUILD_DIR="${CHECKOUT_DIR}/../obs-build-dependencies"
-OBS_BUILD_DIR="${CHECKOUT_DIR}/../obs-studio"
-source "${CHECKOUT_DIR}/CI/include/build_support.sh"
-source "${CHECKOUT_DIR}/CI/include/build_support_linux.sh"
-
-## DEPENDENCY INSTALLATION ##
-source "${CHECKOUT_DIR}/CI/linux/01_install_dependencies.sh"
-
-## OBS LIBRARY BUILD ##
-source "${CHECKOUT_DIR}/CI/linux/02_build_obs_libs.sh"
-
-## PLUGIN BUILD ##
-source "${CHECKOUT_DIR}/CI/linux/03_build_plugin.sh"
-
-## PLUGIN PACKAGE AND NOTARIZE ##
-source "${CHECKOUT_DIR}/CI/linux/04_package_plugin.sh"
-
-## MAIN SCRIPT FUNCTIONS ##
-print_usage() {
-    echo -e "build_linux.sh - Build script for ${PRODUCT_NAME}\n"
-    echo -e "Usage: ${0}\n" \
-        "-h, --help                     : Print this help\n" \
-        "-q, --quiet                    : Suppress most build process output\n" \
-        "-v, --verbose                  : Enable more verbose build process output\n" \
-        "-d, --skip-dependency-checks   : Skip dependency checks\n" \
-        "-p, --package                  : Create installer for plugin\n" \
-        "-b, --build-dir                : Specify alternative build directory (default: build)\n"
-
-}
-
-obs-build-main() {
-    while true; do
-        case "${1}" in
-            -h | --help ) print_usage; exit 0 ;;
-            -d | --skip-dependency-checks ) SKIP_DEP_CHECKS=TRUE; shift ;;
-            -q | --quiet ) export QUIET=TRUE; shift ;;
-            -v | --verbose ) export VERBOSE=TRUE; shift ;;
-            -p | --package ) PACKAGE=TRUE; shift ;;
-            -b | --build-dir ) BUILD_DIR="${2}"; shift 2 ;;
-            -- ) shift; break ;;
-            * ) break ;;
-        esac
-    done
-
-    ensure_dir "${CHECKOUT_DIR}"
-    step "Fetching version tags..."
-    git fetch origin --tags
-    GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
-    GIT_HASH=$(git rev-parse --short HEAD)
-    GIT_TAG=$(git describe --tags --abbrev=0 2&>/dev/null || true)
-    FILE_NAME="${PRODUCT_NAME}-${GIT_TAG:-${PRODUCT_VERSION}}-${GIT_HASH}-linux"
-
-    if [ -z "${SKIP_DEP_CHECKS}" ]; then
-        install_dependencies
-    fi
-
-    build_obs_libs
-    build_obs_plugin
-
-    if [ -n "${PACKAGE}" ]; then
-        package_obs_plugin
-    fi
-
-    cleanup
-}
-
-obs-build-main $*

+ 0 - 3
CI/include/build_environment.sh.in

@@ -1,3 +0,0 @@
-PRODUCT_NAME="@CMAKE_PROJECT_NAME@"
-PRODUCT_VERSION="@CMAKE_PROJECT_VERSION@"
-LINUX_MAINTAINER_EMAIL="@LINUX_MAINTAINER_EMAIL@"

+ 0 - 229
CI/include/build_support.sh

@@ -1,229 +0,0 @@
-#!/bin/bash
-
-##############################################################################
-# Unix support functions
-##############################################################################
-#
-# This script file can be included in build scripts for UNIX-compatible
-# shells to compose build scripts.
-#
-##############################################################################
-
-## DEFINE UTILITIES ##
-
-if [ -z "${QUIET}" ]; then
-    status() {
-        echo -e "${COLOR_BLUE}[${PRODUCT_NAME}] ${1}${COLOR_RESET}"
-    }
-
-    step() {
-        echo -e "${COLOR_GREEN}  + ${1}${COLOR_RESET}"
-    }
-
-    info() {
-        echo -e "${COLOR_ORANGE}  + ${1}${COLOR_RESET}"
-    }
-
-    error() {
-        echo -e "${COLOR_RED}  + ${1}${COLOR_RESET}"
-    }
-else
-    status() {
-        :
-    }
-
-    step() {
-        :
-    }
-
-    info() {
-        :
-    }
-
-    error() {
-        echo -e "${COLOR_RED}  + ${1}${COLOR_RESET}"
-    }
-fi
-
-exists() {
-  /usr/bin/command -v "$1" >/dev/null 2>&1
-}
-
-ensure_dir() {
-    [[ -n "${1}" ]] && /bin/mkdir -p "${1}" && builtin cd "${1}"
-}
-
-cleanup() {
-    :
-}
-
-caught_error() {
-    error "ERROR during build step: ${1}"
-    cleanup
-    exit 1
-}
-
-# Setup build environment
-
-BUILD_DIR="${BUILD_DIR:-build}"
-BUILD_CONFIG="${BUILD_CONFIG:-RelWithDebInfo}"
-CI_WORKFLOW="${CHECKOUT_DIR}/.github/workflows/main.yml"
-CURRENT_ARCH=$(uname -m)
-CURRENT_DATE="$(date +"%Y-%m-%d")"
-
-## Utility functions ##
-
-check_ccache() {
-    if ccache -V >/dev/null 2>&1; then
-        info "CCache available"
-        CMAKE_CCACHE_OPTIONS="-DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache"
-
-        if [ "${CI}" ]; then
-            ccache --set-config=cache_dir=${GITHUB_WORKSPACE:-${HOME}}/.ccache
-            ccache --set-config=max_size=${CCACHE_SIZE:-500M}
-            ccache --set-config=compression=true
-            ccache -z
-        fi
-    else
-        info "CCache not available"
-    fi
-}
-
-_add_ccache_to_path() {
-    if [ "${CMAKE_CCACHE_OPTIONS}" ]; then
-        PATH="/usr/local/opt/ccache/libexec:${PATH}"
-        status "Compiler Info:"
-        local IFS=$'\n'
-        for COMPILER_INFO in $(type cc c++ gcc g++ clang clang++ || true); do
-            info "${COMPILER_INFO}"
-        done
-    fi
-}
-
-safe_fetch() {
-    if [ $# -lt 2 ]; then
-        error "Usage: safe_fetch URL HASH"
-        return 1
-    fi
-
-    while true; do
-        case "${1}" in
-            -n | --nocontinue ) NOCONTINUE=TRUE; shift ;;
-            -- ) shift; break ;;
-            * ) break ;;
-        esac
-    done
-
-    DOWNLOAD_URL="${1}"
-    DOWNLOAD_HASH="${2}"
-    DOWNLOAD_FILE="$(basename ${DOWNLOAD_URL})"
-    CURLCMD=${CURLCMD:-curl}
-
-
-    if [ "${NOCONTINUE}" ]; then
-        ${CURLCMD/--continue-at -/} "${DOWNLOAD_URL}"
-    else
-        ${CURLCMD} "${DOWNLOAD_URL}"
-    fi
-
-    if [ "${DOWNLOAD_HASH}" = "$(sha256sum "${DOWNLOAD_FILE}" | cut -d " " -f 1)" ]; then
-        info "${DOWNLOAD_FILE} downloaded successfully and passed hash check"
-        return 0
-    else
-        error "${DOWNLOAD_FILE} downloaded successfully and failed hash check"
-        return 1
-    fi
-}
-
-check_and_fetch() {
-    if [ $# -lt 2 ]; then
-        caught_error "Usage: check_and_fetch URL HASH"
-    fi
-
-    while true; do
-        case "${1}" in
-            -n | --nocontinue ) NOCONTINUE=TRUE; shift ;;
-            -- ) shift; break ;;
-            * ) break ;;
-        esac
-    done
-
-    DOWNLOAD_URL="${1}"
-    DOWNLOAD_HASH="${2}"
-    DOWNLOAD_FILE="$(basename "${DOWNLOAD_URL}")"
-
-    if [ -f "${DOWNLOAD_FILE}" ] && [ "${DOWNLOAD_HASH}" = "$(sha256sum "${DOWNLOAD_FILE}" | cut -d " " -f 1)" ]; then
-        info "${DOWNLOAD_FILE} exists and passed hash check"
-        return 0
-    else
-        safe_fetch "${DOWNLOAD_URL}" "${DOWNLOAD_HASH}"
-    fi
-}
-
-github_fetch() {
-    if [ $# -ne 3 ]; then
-        error "Usage: github_fetch GITHUB_USER GITHUB_REPOSITORY GITHUB_COMMIT_HASH"
-        return 1
-    fi
-
-    GH_USER="${1}"
-    GH_REPO="${2}"
-    GH_REF="${3}"
-
-    if [ -d "./.git" ]; then
-        info "Repository ${GH_USER}/${GH_REPO} already exists, updating..."
-        git config advice.detachedHead false
-        git config remote.origin.url "https://github.com/${GH_USER}/${GH_REPO}.git"
-        git config remote.origin.fetch "+refs/heads/master:refs/remotes/origin/master"
-        git config remote.origin.tapOpt --no-tags
-
-        if ! git rev-parse -q --verify "${GH_COMMIT}^{commit}"; then
-            git fetch origin
-        fi
-
-        git checkout -f "${GH_REF}" --
-        git reset --hard "${GH_REF}" --
-        if [ -d "./.gitmodules" ]; then
-            git submodule foreach --recursive git submodule sync
-            git submodule update --init --recursive
-        fi
-
-    else
-        git clone "https://github.com/${GH_USER}/${GH_REPO}.git" "$(pwd)"
-        git config advice.detachedHead false
-        info "Checking out commit ${GH_REF}.."
-        git checkout -f "${GH_REF}" --
-
-        if [ -d "./.gitmodules" ]; then
-            git submodule foreach --recursive git submodule sync
-            git submodule update --init --recursive
-        fi
-    fi
-}
-
-apply_patch() {
-    if [ $# -ne 2 ]; then
-        error "Usage: apply_patch PATCH_URL PATCH_HASH"
-        return 1
-    fi
-
-    COMMIT_URL="${1}"
-    COMMIT_HASH="${2}"
-    PATCH_FILE="$(basename ${COMMIT_URL})"
-
-    if [ "${COMMIT_URL:0:5}" = "https" ]; then
-        ${CURLCMD:-curl} "${COMMIT_URL}"
-        if [ "${COMMIT_HASH}" = "$(sha256sum ${PATCH_FILE} | cut -d " " -f 1)" ]; then
-            info "${PATCH_FILE} downloaded successfully and passed hash check"
-        else
-            error "${PATCH_FILE} downloaded successfully and failed hash check"
-            return 1
-        fi
-
-        info "Applying patch ${COMMIT_URL}"
-    else
-        PATCH_FILE="${COMMIT_URL}"
-    fi
-
-    patch -g 0 -f -p1 -i "${PATCH_FILE}"
-}

+ 0 - 33
CI/include/build_support_linux.sh

@@ -1,33 +0,0 @@
-#!/bin/bash
-
-##############################################################################
-# Linux support functions
-##############################################################################
-#
-# This script file can be included in build scripts for Linux.
-#
-##############################################################################
-
-# Setup build environment
-
-CI_OBS_VERSION=$(cat "${CI_WORKFLOW}" | sed -En "s/[ ]+OBS_VERSION: '([0-9\.]+)'/\1/p")
-
-if [ "${TERM-}" -a -z "${CI}" ]; then
-    COLOR_RED=$(tput setaf 1)
-    COLOR_GREEN=$(tput setaf 2)
-    COLOR_BLUE=$(tput setaf 4)
-    COLOR_ORANGE=$(tput setaf 3)
-    COLOR_RESET=$(tput sgr0)
-else
-    COLOR_RED=""
-    COLOR_GREEN=""
-    COLOR_BLUE=""
-    COLOR_ORANGE=""
-    COLOR_RESET=""
-fi
-
-if [ "${CI}" -o "${QUIET}" ]; then
-    export CURLCMD="curl --silent --show-error --location -O"
-else
-    export CURLCMD="curl --progress-bar --location --continue-at - -O"
-fi

+ 0 - 127
CI/linux/01_install_dependencies.sh

@@ -1,127 +0,0 @@
-#!/bin/bash
-
-##############################################################################
-# Linux dependency management function
-##############################################################################
-#
-# This script file can be included in build scripts for Linux or run directly
-#
-##############################################################################
-
-# Halt on errors
-set -eE
-
-install_obs-studio() {
-    if [ -n "${OBS_BRANCH}" ]; then
-        CHECKOUT_REF="${OBS_BRANCH}"
-    else
-        CHECKOUT_REF="tags/${OBS_VERSION:-${CI_OBS_VERSION}}"
-    fi
-
-    ensure_dir "${OBS_BUILD_DIR}"
-
-    if [ ! -d "${OBS_BUILD_DIR}/.git" ]; then
-        git clone --recursive https://github.com/obsproject/obs-studio "$(pwd)"
-        git fetch origin --tags
-        git checkout ${CHECKOUT_REF} -b obs-plugin-build
-    else
-        if ! git show-ref --verify --quiet refs/heads/obs-plugin-build; then
-            git checkout ${CHECKOUT_REF} -b obs-plugin-build
-        else
-            git checkout obs-plugin-build
-        fi
-    fi
-}
-
-install_linux_dependencies() {
-    sudo dpkg --add-architecture amd64
-    sudo apt-get -qq update
-    sudo apt-get install -y \
-        build-essential \
-        ninja-build \
-        clang \
-        clang-format \
-        qtbase5-dev \
-        libqt5svg5-dev \
-        libqt5x11extras5-dev \
-        qtbase5-private-dev \
-        libwayland-dev \
-        libavcodec-dev \
-        libavdevice-dev \
-        libavfilter-dev \
-        libavformat-dev \
-        libavutil-dev \
-        libswresample-dev \
-        libswscale-dev \
-        libx264-dev \
-        libjansson-dev \
-        libpulse-dev \
-        libx11-dev \
-        libx11-xcb-dev \
-        libmbedtls-dev \
-        libgl1-mesa-dev \
-        pkg-config \
-        libcurl4-openssl-dev
-
-    if ! type cmake &>/dev/null; then
-        sudo apt-get install -y cmake
-    fi
-}
-
-install_dependencies() {
-    status "Installing build dependencies"
-    trap "caught_error 'install_dependencies'" ERR
-
-    BUILD_DEPS=(
-        "obs-studio ${OBS_VERSION:-${CI_OBS_VERSION}}"
-    )
-
-    install_linux_dependencies
-
-    for DEPENDENCY in "${BUILD_DEPS[@]}"; do
-        set -- ${DEPENDENCY}
-        trap "caught_error ${DEPENDENCY}" ERR
-        FUNC_NAME="install_${1}"
-        ${FUNC_NAME} ${2} ${3}
-    done
-}
-
-install-dependencies-standalone() {
-    CHECKOUT_DIR="$(git rev-parse --show-toplevel)"
-    if [ -f "${CHECKOUT_DIR}/CI/include/build_environment.sh" ]; then
-        source "${CHECKOUT_DIR}/CI/include/build_environment.sh"
-    fi
-    PRODUCT_NAME="${PRODUCT_NAME:-obs-plugin}"
-    DEPS_BUILD_DIR="${CHECKOUT_DIR}/../obs-build-dependencies"
-    OBS_BUILD_DIR="${CHECKOUT_DIR}/../obs-studio"
-    source "${CHECKOUT_DIR}/CI/include/build_support.sh"
-    source "${CHECKOUT_DIR}/CI/include/build_support_linux.sh"
-
-    status "Setting up plugin build dependencies"
-    install_dependencies
-}
-
-print_usage() {
-    echo -e "Usage: ${0}\n" \
-            "-h, --help                     : Print this help\n" \
-            "-q, --quiet                    : Suppress most build process output\n" \
-            "-v, --verbose                  : Enable more verbose build process output\n"
-}
-
-install-dependencies-main() {
-    if [ -z "${_RUN_OBS_BUILD_SCRIPT}" ]; then
-        while true; do
-            case "${1}" in
-                -h | --help ) print_usage; exit 0 ;;
-                -q | --quiet ) export QUIET=TRUE; shift ;;
-                -v | --verbose ) export VERBOSE=TRUE; shift ;;
-                -- ) shift; break ;;
-                * ) break ;;
-            esac
-        done
-
-        install-dependencies-standalone
-    fi
-}
-
-install-dependencies-main $*

+ 0 - 73
CI/linux/02_build_obs_libs.sh

@@ -1,73 +0,0 @@
-#!/bin/bash
-
-##############################################################################
-# Linux libobs library build function
-##############################################################################
-#
-# This script file can be included in build scripts for Linux or run directly
-#
-##############################################################################
-
-# Halt on errors
-set -eE
-
-build_obs_libs() {
-    status "Build libobs and obs-frontend-api"
-    trap "caught_error 'build_obs_libs'" ERR
-    check_ccache
-
-    ensure_dir "${OBS_BUILD_DIR}"
-
-    step "Configuring OBS build system"
-    check_ccache
-    cmake -S . -B plugin_${BUILD_DIR} -G Ninja ${CMAKE_CCACHE_OPTIONS} \
-        -DCMAKE_BUILD_TYPE=${BUILD_CONFIG} \
-        -DENABLE_PLUGINS=OFF \
-        -DENABLE_UI=ON \
-        -DENABLE_SCRIPTING=OFF \
-        -DENABLE_PIPEWIRE=OFF \
-        ${QUIET:+-Wno-deprecated -Wno-dev --log-level=ERROR}
-
-    step "Building libobs and obs-frontend-api"
-    cmake --build plugin_${BUILD_DIR} -t obs-frontend-api
-}
-
-build-obs-libs-standalone() {
-    CHECKOUT_DIR="$(git rev-parse --show-toplevel)"
-    if [ -f "${CHECKOUT_DIR}/CI/include/build_environment.sh" ]; then
-        source "${CHECKOUT_DIR}/CI/include/build_environment.sh"
-    fi
-    PRODUCT_NAME="${PRODUCT_NAME:-obs-plugin}"
-    OBS_BUILD_DIR="${CHECKOUT_DIR}/../obs-studio"
-    source "${CHECKOUT_DIR}/CI/include/build_support.sh"
-    source "${CHECKOUT_DIR}/CI/include/build_support_linux.sh"
-
-    build_obs_libs
-}
-
-print_usage() {
-    echo -e "Usage: ${0}\n" \
-            "-h, --help                     : Print this help\n" \
-            "-q, --quiet                    : Suppress most build process output\n" \
-            "-v, --verbose                  : Enable more verbose build process output\n" \
-            "--build-dir                    : Specify alternative build directory (default: build)\n"
-}
-
-build-obs-libs-main() {
-    if [ -z "${_RUN_OBS_BUILD_SCRIPT}" ]; then
-        while true; do
-            case "${1}" in
-                -h | --help ) print_usage; exit 0 ;;
-                -q | --quiet ) export QUIET=TRUE; shift ;;
-                -v | --verbose ) export VERBOSE=TRUE; shift ;;
-                --build-dir ) BUILD_DIR="${2}"; shift 2 ;;
-                -- ) shift; break ;;
-                * ) break ;;
-            esac
-        done
-
-        build-obs-libs-standalone
-    fi
-}
-
-build-obs-libs-main $*

+ 0 - 66
CI/linux/03_build_plugin.sh

@@ -1,66 +0,0 @@
-#!/bin/bash
-
-##############################################################################
-# Linux libobs plugin build function
-##############################################################################
-#
-# This script file can be included in build scripts for Linux or run directly
-#
-##############################################################################
-
-# Halt on errors
-set -eE
-
-build_obs_plugin() {
-    status "Build plugin ${PRODUCT_NAME}"
-    trap "caught_error 'builds_obs_plugin'" ERR
-
-    ensure_dir "${CHECKOUT_DIR}"
-
-    step "Configuring OBS plugin build system"
-    check_ccache
-
-    cmake -S . -B ${BUILD_DIR} -G Ninja ${CMAKE_CCACHE_OPTIONS} ${QUIET:+-Wno-deprecated -Wno-dev --log-level=ERROR}
-
-    step "Building OBS plugin"
-    cmake --build ${BUILD_DIR}
-}
-
-build-plugin-standalone() {
-    CHECKOUT_DIR="$(git rev-parse --show-toplevel)"
-    if [ -f "${CHECKOUT_DIR}/CI/include/build_environment.sh" ]; then
-        source "${CHECKOUT_DIR}/CI/include/build_environment.sh"
-    fi
-    PRODUCT_NAME="${PRODUCT_NAME:-obs-plugin}"
-    source "${CHECKOUT_DIR}/CI/include/build_support.sh"
-    source "${CHECKOUT_DIR}/CI/include/build_support_linux.sh"
-
-    build_obs_plugin
-}
-
-print_usage() {
-    echo -e "Usage: ${0}\n" \
-            "-h, --help                     : Print this help\n" \
-            "-q, --quiet                    : Suppress most build process output\n" \
-            "-v, --verbose                  : Enable more verbose build process output\n" \
-            "--build-dir                    : Specify alternative build directory (default: build)\n"
-}
-
-build-plugin-main() {
-    if [ -z "${_RUN_OBS_BUILD_SCRIPT}" ]; then
-        while true; do
-            case "${1}" in
-                -h | --help ) print_usage; exit 0 ;;
-                -q | --quiet ) export QUIET=TRUE; shift ;;
-                -v | --verbose ) export VERBOSE=TRUE; shift ;;
-                --build-dir ) BUILD_DIR="${2}"; shift 2 ;;
-                -- ) shift; break ;;
-                * ) break ;;
-            esac
-        done
-
-        build-plugin-standalone
-    fi
-}
-
-build-plugin-main $*

+ 0 - 68
CI/linux/04_package_plugin.sh

@@ -1,68 +0,0 @@
-#!/bin/bash
-
-##############################################################################
-# Linux libobs plugin build function
-##############################################################################
-#
-# This script file can be included in build scripts for Linux or run directly
-#
-##############################################################################
-
-# Halt on errors
-set -eE
-
-package_obs_plugin() {
-    status "Package OBS plugin ${PRODUCT_NAME}"
-    trap "caught_error 'package_obs_plugin'" ERR
-
-    ensure_dir "${CHECKOUT_DIR}"
-
-    step "Package ${PRODUCT_NAME}..."
-
-    cmake --build ${BUILD_DIR} -t package
-
-}
-
-package-plugin-standalone() {
-    CHECKOUT_DIR="$(git rev-parse --show-toplevel)"
-    if [ -f "${CHECKOUT_DIR}/CI/include/build_environment.sh" ]; then
-        source "${CHECKOUT_DIR}/CI/include/build_environment.sh"
-    fi
-    PRODUCT_NAME="${PRODUCT_NAME:-obs-plugin}"
-    source "${CHECKOUT_DIR}/CI/include/build_support.sh"
-    source "${CHECKOUT_DIR}/CI/include/build_support_linux.sh"
-
-    GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
-    GIT_HASH=$(git rev-parse --short HEAD)
-    GIT_TAG=$(git describe --tags --abbrev=0 2&>/dev/null || true)
-    FILE_NAME="${PRODUCT_NAME}-${GIT_TAG:-0.0.1}-${GIT_HASH}.deb"
-
-    package_obs_plugin
-}
-
-print_usage() {
-    echo -e "Usage: ${0}\n" \
-            "-h, --help                     : Print this help\n" \
-            "-q, --quiet                    : Suppress most build process output\n" \
-            "-v, --verbose                  : Enable more verbose build process output\n" \
-            "--build-dir                    : Specify alternative build directory (default: build)\n"
-}
-
-package-plugin-main() {
-    if [ ! -n "${_RUN_OBS_BUILD_SCRIPT}" ]; then
-        while true; do
-            case "${1}" in
-                -h | --help ) print_usage; exit 0 ;;
-                -q | --quiet ) export QUIET=TRUE; shift ;;
-                -v | --verbose ) export VERBOSE=TRUE; shift ;;
-                --build-dir ) BUILD_DIR="${2}"; shift 2 ;;
-                -- ) shift; break ;;
-                * ) break ;;
-            esac
-        done
-
-        package-plugin-standalone
-    fi
-}
-
-package-plugin-main $*