pax_global_header00006660000000000000000000000064147722316730014526gustar00rootroot0000000000000052 comment=aa87911b7175d92bd2447caa02e9f7404e547768 SceneSwitcher-1.29.2/000077500000000000000000000000001477223167300143675ustar00rootroot00000000000000SceneSwitcher-1.29.2/.clang-format000066400000000000000000000134151477223167300167460ustar00rootroot00000000000000# please use clang-format version 16 or later Standard: c++17 AccessModifierOffset: -8 AlignAfterOpenBracket: Align AlignConsecutiveAssignments: false AlignConsecutiveDeclarations: false AlignEscapedNewlines: Left AlignOperands: true AlignTrailingComments: true AllowAllArgumentsOnNextLine: false AllowAllConstructorInitializersOnNextLine: false AllowAllParametersOfDeclarationOnNextLine: false AllowShortBlocksOnASingleLine: false AllowShortCaseLabelsOnASingleLine: false AllowShortFunctionsOnASingleLine: Inline AllowShortIfStatementsOnASingleLine: false AllowShortLambdasOnASingleLine: Inline AllowShortLoopsOnASingleLine: false AlwaysBreakAfterDefinitionReturnType: None AlwaysBreakAfterReturnType: None AlwaysBreakBeforeMultilineStrings: false AlwaysBreakTemplateDeclarations: false BinPackArguments: true BinPackParameters: true BraceWrapping: AfterClass: false AfterControlStatement: false AfterEnum: false AfterFunction: true AfterNamespace: false AfterObjCDeclaration: false AfterStruct: false AfterUnion: false AfterExternBlock: false BeforeCatch: false BeforeElse: false IndentBraces: false SplitEmptyFunction: true SplitEmptyRecord: true SplitEmptyNamespace: true BreakBeforeBinaryOperators: None BreakBeforeBraces: Custom BreakBeforeTernaryOperators: true BreakConstructorInitializers: BeforeColon BreakStringLiterals: false # apparently unpredictable ColumnLimit: 80 CompactNamespaces: false ConstructorInitializerAllOnOneLineOrOnePerLine: true ConstructorInitializerIndentWidth: 8 ContinuationIndentWidth: 8 Cpp11BracedListStyle: true DerivePointerAlignment: false DisableFormat: false FixNamespaceComments: true ForEachMacros: - 'json_object_foreach' - 'json_object_foreach_safe' - 'json_array_foreach' - 'HASH_ITER' IncludeBlocks: Preserve IndentCaseLabels: false IndentPPDirectives: None IndentWidth: 8 IndentWrappedFunctionNames: false KeepEmptyLinesAtTheStartOfBlocks: true MaxEmptyLinesToKeep: 1 NamespaceIndentation: None ObjCBinPackProtocolList: Auto ObjCBlockIndentWidth: 8 ObjCSpaceAfterProperty: true ObjCSpaceBeforeProtocolList: true PenaltyBreakAssignment: 10 PenaltyBreakBeforeFirstCallParameter: 30 PenaltyBreakComment: 10 PenaltyBreakFirstLessLess: 0 PenaltyBreakString: 10 PenaltyExcessCharacter: 100 PenaltyReturnTypeOnItsOwnLine: 60 PointerAlignment: Right ReflowComments: false SortIncludes: false SortUsingDeclarations: false SpaceAfterCStyleCast: false SpaceAfterLogicalNot: false SpaceAfterTemplateKeyword: false SpaceBeforeAssignmentOperators: true SpaceBeforeCtorInitializerColon: true SpaceBeforeInheritanceColon: true SpaceBeforeParens: ControlStatements SpaceBeforeRangeBasedForLoopColon: true SpaceInEmptyParentheses: false SpacesBeforeTrailingComments: 1 SpacesInAngles: false SpacesInCStyleCastParentheses: false SpacesInContainerLiterals: false SpacesInParentheses: false SpacesInSquareBrackets: false StatementMacros: - 'Q_OBJECT' TabWidth: 8 TypenameMacros: - 'DARRAY' UseTab: ForContinuationAndIndentation --- Language: ObjC AccessModifierOffset: 2 AlignArrayOfStructures: Right AlignConsecutiveAssignments: None AlignConsecutiveBitFields: None AlignConsecutiveDeclarations: None AlignConsecutiveMacros: Enabled: true AcrossEmptyLines: false AcrossComments: true AllowShortBlocksOnASingleLine: Never AllowShortEnumsOnASingleLine: false AllowShortFunctionsOnASingleLine: Empty AllowShortIfStatementsOnASingleLine: Never AllowShortLambdasOnASingleLine: None AttributeMacros: ['__unused', '__autoreleasing', '_Nonnull', '__bridge'] BitFieldColonSpacing: Both #BreakBeforeBraces: Webkit BreakBeforeBraces: Custom BraceWrapping: AfterCaseLabel: false AfterClass: true AfterControlStatement: Never AfterEnum: false AfterFunction: true AfterNamespace: false AfterObjCDeclaration: false AfterStruct: false AfterUnion: false AfterExternBlock: false BeforeCatch: false BeforeElse: false BeforeLambdaBody: false BeforeWhile: false IndentBraces: false SplitEmptyFunction: false SplitEmptyRecord: false SplitEmptyNamespace: true BreakAfterAttributes: Never BreakArrays: false BreakBeforeConceptDeclarations: Allowed BreakBeforeInlineASMColon: OnlyMultiline BreakConstructorInitializers: AfterColon BreakInheritanceList: AfterComma ColumnLimit: 120 ConstructorInitializerIndentWidth: 4 ContinuationIndentWidth: 4 EmptyLineAfterAccessModifier: Never EmptyLineBeforeAccessModifier: LogicalBlock ExperimentalAutoDetectBinPacking: false FixNamespaceComments: true IndentAccessModifiers: false IndentCaseBlocks: false IndentCaseLabels: true IndentExternBlock: Indent IndentGotoLabels: false IndentRequiresClause: true IndentWidth: 4 IndentWrappedFunctionNames: true InsertBraces: false InsertNewlineAtEOF: true KeepEmptyLinesAtTheStartOfBlocks: false LambdaBodyIndentation: Signature NamespaceIndentation: All ObjCBinPackProtocolList: Auto ObjCBlockIndentWidth: 4 ObjCBreakBeforeNestedBlockParam: false ObjCSpaceAfterProperty: true ObjCSpaceBeforeProtocolList: true PPIndentWidth: -1 PackConstructorInitializers: NextLine QualifierAlignment: Leave ReferenceAlignment: Right RemoveSemicolon: false RequiresClausePosition: WithPreceding RequiresExpressionIndentation: OuterScope SeparateDefinitionBlocks: Always ShortNamespaceLines: 1 SortIncludes: false #SortUsingDeclarations: LexicographicNumeric SortUsingDeclarations: true SpaceAfterCStyleCast: true SpaceAfterLogicalNot: false SpaceAroundPointerQualifiers: Default SpaceBeforeCaseColon: false SpaceBeforeCpp11BracedList: true SpaceBeforeCtorInitializerColon: true SpaceBeforeInheritanceColon: true SpaceBeforeParens: ControlStatements SpaceBeforeRangeBasedForLoopColon: true SpaceBeforeSquareBrackets: false SpaceInEmptyBlock: false SpaceInEmptyParentheses: false SpacesBeforeTrailingComments: 2 SpacesInConditionalStatement: false SpacesInLineCommentPrefix: Minimum: 1 Maximum: -1 Standard: c++17 TabWidth: 4 UseTab: Never SceneSwitcher-1.29.2/.cmake-format.json000066400000000000000000000011611477223167300177050ustar00rootroot00000000000000{ "format": { "line_width": 80, "tab_size": 2, "enable_sort": true, "autosort": true }, "additional_commands": { "set_target_properties_obs": { "pargs": 1, "flags": [], "kwargs": { "PROPERTIES": { "kwargs": { "PREFIX": 1, "OUTPUT_NAME": 1, "FOLDER": 1, "VERSION": 1, "SOVERSION": 1, "AUTOMOC": 1, "AUTOUIC": 1, "AUTORCC": 1, "AUTOUIC_SEARCH_PATHS": 1, "BUILD_RPATH": 1, "INSTALL_RPATH": 1 } } } } } } SceneSwitcher-1.29.2/.gitattributes000066400000000000000000000000671477223167300172650ustar00rootroot00000000000000/build-aux/*.zsh eol=lf /build-aux/.functions/* eol=lf SceneSwitcher-1.29.2/.github/000077500000000000000000000000001477223167300157275ustar00rootroot00000000000000SceneSwitcher-1.29.2/.github/ISSUE_TEMPLATE/000077500000000000000000000000001477223167300201125ustar00rootroot00000000000000SceneSwitcher-1.29.2/.github/ISSUE_TEMPLATE/bug_report.yaml000066400000000000000000000060231477223167300231470ustar00rootroot00000000000000# Based on the OBS issue templates # https://github.com/obsproject/.github/tree/master/.github/ISSUE_TEMPLATE name: Bug Report description: Report a bug or crash body: - type: markdown id: md_welcome attributes: value: This form is for reporting bugs for Advanced Scene Switcher! - type: dropdown id: os_info attributes: label: Operating System Info description: What Operating System are you running? options: - Windows 11 - Windows 10 - macOS 14 - macOS 13 - macOS 12 - macOS 11 - Ubuntu 24.04 - Ubuntu 23.10 - Ubuntu 22.04 - Other validations: required: true - type: input id: os_info_other attributes: label: Other OS description: "If \"Other\" was selected above, what OS are you using?" placeholder: "e.g., Arch Linux, FreeBSD" validations: required: false - type: input id: obs_version attributes: label: OBS Studio Version description: What version of OBS Studio are you using? placeholder: 30.2.2 validations: required: true - type: input id: advss_version attributes: label: Advanced Scene Switcher Version description: What version of the Advanced Scene Switcher are you using? placeholder: 1.27.2 validations: required: true - type: input id: settings attributes: label: Plugin settings description: | Please provide the plugin settings used. Either only [export the macros](https://github.com/WarmUpTill/SceneSwitcher/wiki/Exporting-and-importing-individual-macros) relevant to this issue or [export all settings](https://github.com/WarmUpTill/SceneSwitcher/wiki/Saving-and-loading-settings#how-to-create-and-import-a-backup-of-your-settings) on the General tab of the plugin. validations: required: false - type: input id: obs_log_url attributes: label: OBS Studio Log URL description: Please provide the obsproject.com URL (from Help menu > Log Files > Upload Current/Previous Log File) to the OBS log file where this issue occurred. validations: required: false - type: input id: obs_crash_log_url attributes: label: OBS Studio Crash Log URL description: If this is a crash report, please provide the obsproject.com URL to the OBS crash log file where this issue occurred. validations: required: false - type: textarea id: expected_behavior attributes: label: Expected Behavior description: "What did you expect to happen?" validations: required: true - type: textarea id: current_behavior attributes: label: Current Behavior description: "What actually happened?" validations: required: true - type: textarea id: steps_to_reproduce attributes: label: Steps to Reproduce description: "How do you trigger this bug? Please walk us through it step by step." placeholder: | 1. 2. 3. ... value: | 1. 2. 3. ... validations: required: true - type: textarea id: additional_notes attributes: label: Anything else we should know? validations: required: falseSceneSwitcher-1.29.2/.github/ISSUE_TEMPLATE/config.yml000066400000000000000000000006771477223167300221140ustar00rootroot00000000000000blank_issues_enabled: true contact_links: - name: 📚 Wiki url: https://github.com/WarmUpTill/SceneSwitcher/wiki about: For explanations on how the plugin works or to see example guides, check out the wiki. - name: 💬 OBS Forum Thread url: https://obsproject.com/forum/threads/advanced-scene-switcher.48264 about: To discuss the plugin or get assistance, feel free to use the OBS forum thread or the GitHub discussions page.SceneSwitcher-1.29.2/.github/ISSUE_TEMPLATE/feature_request.yaml000066400000000000000000000017151477223167300242050ustar00rootroot00000000000000# Based on the OBS issue templates # https://github.com/obsproject/.github/tree/master/.github/ISSUE_TEMPLATE name: Feature request description: Suggest an idea for this projectReport a bug or crash body: - type: markdown id: md_welcome attributes: value: This form is for requesting new features for Advanced Scene Switcher! - type: textarea id: background attributes: label: Background description: "Is your feature request related to a problem? Please describe." validations: required: false - type: textarea id: solution attributes: label: Solution description: "Describe the solution you'd like." validations: required: true - type: textarea id: alternatives attributes: label: Alternatives description: "Describe alternatives you've considered." validations: required: false - type: textarea id: additional_notes attributes: label: Anything else we should know? validations: required: falseSceneSwitcher-1.29.2/.github/actions/000077500000000000000000000000001477223167300173675ustar00rootroot00000000000000SceneSwitcher-1.29.2/.github/actions/build-dependencies/000077500000000000000000000000001477223167300231125ustar00rootroot00000000000000SceneSwitcher-1.29.2/.github/actions/build-dependencies/action.yaml000066400000000000000000000044251477223167300252600ustar00rootroot00000000000000name: 'Setup plugin build dependencies' description: 'Builds the plugin build dependencies' inputs: target: description: 'Build target for dependencies' required: true config: description: 'Build configuration' required: false default: 'Release' 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: Setup cmake uses: jwlawson/actions-setup-cmake@v1.13 with: cmake-version: '3.24.x' - name: Restore cached dependencies id: restore-cache uses: actions/cache@v4 with: path: ${{ env.DEP_DIR }} key: ${{ env.DEP_DIR }}-${{ runner.os }}-${{ inputs.target }} - name: Run macOS Build if: ${{ runner.os == 'macOS' && steps.restore-cache.outputs.cache-hit != 'true' }} shell: zsh {0} run: | build_args=( -c ${{ inputs.config }} -t ${{ inputs.target }} -o ${{ env.DEP_DIR }} ) if (( ${+CI} && ${+RUNNER_DEBUG} )) build_args+=(--debug) .github/scripts/build-deps-macos.zsh -o ${{ env.DEP_DIR }} ${build_args} - name: Run Linux Build if: ${{ runner.os == 'Linux' && steps.restore-cache.outputs.cache-hit != 'true' }} shell: bash run: | build_args=( -c ${{ inputs.config }} -t linux-${{ inputs.target }} ) if [[ -n "${CI}" && -n "${RUNNER_DEBUG}" ]]; then build_args+=(--debug) fi .github/scripts/build-deps-linux.sh -o ${{ env.DEP_DIR }} "${build_args[@]}" - name: Run Windows Build if: ${{ runner.os == 'Windows' && steps.restore-cache.outputs.cache-hit != 'true' }} shell: pwsh run: | $BuildArgs = @{ Target = '${{ inputs.target }}' Configuration = '${{ inputs.config }}' OutDirName = '${{ env.DEP_DIR }}' } if ( ( Test-Path env:CI ) -and ( Test-Path env:RUNNER_DEBUG ) ) { $BuildArgs += @{ Debug = $true } } .github/scripts/Build-Deps-Windows.ps1 -OutDirName ${{ env.DEP_DIR }} @BuildArgs SceneSwitcher-1.29.2/.github/actions/build-plugin/000077500000000000000000000000001477223167300217625ustar00rootroot00000000000000SceneSwitcher-1.29.2/.github/actions/build-plugin/action.yaml000066400000000000000000000064331477223167300241310ustar00rootroot00000000000000name: 'Set up and build plugin' description: 'Builds the plugin for specified architecture and build config' inputs: target: description: 'Target architecture for dependencies' required: true config: description: 'Build configuration' required: false default: 'RelWithDebInfo' codesign: description: 'Enable codesigning (macOS only)' required: false default: 'false' codesignIdent: description: 'Developer ID for application codesigning (macOS only)' required: false default: '-' 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 --no-rcs --errexit --pipefail {0} working-directory: ${{ inputs.workingDirectory }} env: CODESIGN_IDENT: ${{ inputs.codesignIdent }} CODESIGN_TEAM: ${{ inputs.codesignTeam }} run: | : Run macOS Build local -a build_args=( --config ${{ inputs.config }} --dep ${{ env.DEP_DIR }} ) if (( ${+RUNNER_DEBUG} )) build_args+=(--debug) if [[ '${{ inputs.codesign }}' == 'true' ]] build_args+=(--codesign) .github/scripts/build-macos ${build_args} - name: Install Dependencies 🛍️ if: runner.os == 'Linux' shell: bash run: | : Install Dependencies 🛍️ echo ::group::Install Dependencies eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH brew install --quiet zsh echo ::endgroup:: - name: Run Ubuntu Build if: runner.os == 'Linux' shell: zsh --no-rcs --errexit --pipefail {0} working-directory: ${{ inputs.workingDirectory }} run: | : Run Ubuntu Build local -a build_args=( --target linux-${{ inputs.target }} --config ${{ inputs.config }} ) if (( ${+RUNNER_DEBUG} )) build_args+=(--debug) .github/scripts/build-linux ${build_args} - name: Run Windows Build if: runner.os == 'Windows' shell: pwsh run: | # Run Windows Build if ( $Env:RUNNER_DEBUG -ne $null ) { Set-PSDebug -Trace 1 } $BuildArgs = @{ Target = '${{ inputs.target }}' Configuration = '${{ inputs.config }}' ADVSSDepName = '${{ env.DEP_DIR }}' } .github/scripts/Build-Windows.ps1 @BuildArgs - name: Create Summary 📊 if: contains(fromJSON('["Linux", "macOS"]'),runner.os) shell: zsh --no-rcs --errexit --pipefail {0} env: CCACHE_CONFIGPATH: ${{ inputs.workingDirectory }}/.ccache.conf run: | : Create Summary 📊 local -a ccache_data if (( ${+RUNNER_DEBUG} )) { setopt XTRACE ccache_data=("${(fA)$(ccache -s -vv)}") } else { ccache_data=("${(fA)$(ccache -s)}") } print '### ${{ runner.os }} Ccache Stats (${{ inputs.target }})' >> $GITHUB_STEP_SUMMARY print '```' >> $GITHUB_STEP_SUMMARY for line (${ccache_data}) { print ${line} >> $GITHUB_STEP_SUMMARY } print '```' >> $GITHUB_STEP_SUMMARY SceneSwitcher-1.29.2/.github/actions/package-plugin/000077500000000000000000000000001477223167300222565ustar00rootroot00000000000000SceneSwitcher-1.29.2/.github/actions/package-plugin/action.yaml000066400000000000000000000072401477223167300244220ustar00rootroot00000000000000name: '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: 'RelWithDebInfo' 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: '' codesignTeam: description: 'Developer team for 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: '' package: description: 'Create Windows or macOS installation package' required: false default: 'true' 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 --no-rcs --errexit --pipefail {0} working-directory: ${{ inputs.workingDirectory }} env: CODESIGN_IDENT: ${{ inputs.codesignIdent }} CODESIGN_IDENT_INSTALLER: ${{ inputs.installerIdent }} CODESIGN_TEAM: ${{ inputs.codesignTeam }} CODESIGN_IDENT_USER: ${{ inputs.codesignUser }} CODESIGN_IDENT_PASS: ${{ inputs.codesignPass }} run: | : Run macOS Packaging local -a package_args=(--config ${{ inputs.config }}) if (( ${+RUNNER_DEBUG} )) package_args+=(--debug) if [[ '${{ inputs.codesign }}' == 'true' ]] package_args+=(--codesign) if [[ '${{ inputs.notarize }}' == 'true' ]] package_args+=(--notarize) if [[ '${{ inputs.package }}' == 'true' ]] package_args+=(--package) .github/scripts/package-macos ${package_args} - name: Install Dependencies 🛍️ if: runner.os == 'Linux' shell: bash run: | : Install Dependencies 🛍️ echo ::group::Install Dependencies eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH brew install --quiet zsh echo ::endgroup:: - name: Run Ubuntu Packaging if: runner.os == 'Linux' shell: zsh --no-rcs --errexit --pipefail {0} working-directory: ${{ inputs.workingDirectory }} run: | : Run Ubuntu Packaging package_args=( --target linux-${{ inputs.target }} --config ${{ inputs.config }} ) if (( ${+RUNNER_DEBUG} )) build_args+=(--debug) if [[ '${{ inputs.package }}' == 'true' ]] package_args+=(--package) .github/scripts/package-linux ${package_args} - name: Run Windows Packaging if: runner.os == 'Windows' shell: pwsh run: | # Run Windows Packaging if ( $Env:RUNNER_DEBUG -ne $null ) { Set-PSDebug -Trace 1 } $PackageArgs = @{ Target = '${{ inputs.target }}' Configuration = '${{ inputs.config }}' } if ( '${{ inputs.package }}' -eq 'true' ) { $PackageArgs += @{BuildInstaller = $true} } .github/scripts/Package-Windows.ps1 @PackageArgs SceneSwitcher-1.29.2/.github/actions/run-clang-format/000077500000000000000000000000001477223167300225435ustar00rootroot00000000000000SceneSwitcher-1.29.2/.github/actions/run-clang-format/action.yaml000066400000000000000000000043051477223167300247060ustar00rootroot00000000000000name: Run clang-format description: Runs clang-format and checks for any changes introduced by it inputs: failCondition: description: Controls whether failed checks also fail the workflow run required: false default: 'never' workingDirectory: description: Working directory for checks required: false default: ${{ github.workspace }} runs: using: composite steps: - name: Check Runner Operating System 🏃‍♂️ if: runner.os == 'Windows' shell: bash run: | : Check Runner Operating System 🏃‍♂️ echo "::notice::run-clang-format action requires a macOS-based or Linux-based runner." exit 2 - name: Install Dependencies 🛍️ if: runner.os == 'Linux' shell: bash run: | : Install Dependencies 🛍️ echo ::group::Install Dependencies eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH echo "/home/linuxbrew/.linuxbrew/opt/clang-format@16/bin" >> $GITHUB_PATH brew install --quiet zsh echo ::endgroup:: - name: Run clang-format 🐉 id: result shell: zsh --no-rcs --errexit --pipefail {0} working-directory: ${{ inputs.workingDirectory }} env: GITHUB_EVENT_FORCED: ${{ github.event.forced }} GITHUB_REF_BEFORE: ${{ github.event.before }} run: | : Run clang-format 🐉 if (( ${+RUNNER_DEBUG} )) setopt XTRACE local -a changes=($(git diff --name-only HEAD~1 HEAD)) case ${GITHUB_EVENT_NAME} { pull_request) changes=($(git diff --name-only origin/${GITHUB_BASE_REF} HEAD)) ;; push) if [[ ${GITHUB_EVENT_FORCED} != true ]] changes=($(git diff --name-only ${GITHUB_REF_BEFORE} HEAD)) ;; *) ;; } if (( ${changes[(I)(*.c|*.h|*.cpp|*.hpp|*.m|*.mm)]} )) { echo ::group::Install clang-format-16 brew install --quiet obsproject/tools/clang-format@16 echo ::endgroup:: echo ::group::Run clang-format-16 ./build-aux/run-clang-format --fail-${{ inputs.failCondition }} --check echo ::endgroup:: } SceneSwitcher-1.29.2/.github/actions/run-cmake-format/000077500000000000000000000000001477223167300225375ustar00rootroot00000000000000SceneSwitcher-1.29.2/.github/actions/run-cmake-format/action.yaml000066400000000000000000000041021477223167300246750ustar00rootroot00000000000000name: Run cmake-format description: Runs cmake-format and checks for any changes introduced by it inputs: failCondition: description: Controls whether failed checks also fail the workflow run required: false default: 'never' workingDirectory: description: Working directory for checks required: false default: ${{ github.workspace }} runs: using: composite steps: - name: Check Runner Operating System 🏃‍♂️ if: runner.os == 'Windows' shell: bash run: | : Check Runner Operating System 🏃‍♂️ echo "::notice::run-cmake-format action requires a macOS-based or Linux-based runner." exit 2 - name: Install Dependencies 🛍️ if: runner.os == 'Linux' shell: bash run: | : Install Dependencies 🛍️ echo ::group::Install Dependencies eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH brew install --quiet zsh echo ::endgroup:: - name: Run cmake-format 🎛️ id: result shell: zsh --no-rcs --errexit --pipefail {0} working-directory: ${{ github.workspace }} env: GITHUB_EVENT_FORCED: ${{ github.event.forced }} GITHUB_REF_BEFORE: ${{ github.event.before }} run: | : Run cmake-format 🎛️ if (( ${+RUNNER_DEBUG} )) setopt XTRACE local -a changes=($(git diff --name-only HEAD~1 HEAD)) case ${GITHUB_EVENT_NAME} { pull_request) changes=($(git diff --name-only origin/${GITHUB_BASE_REF} HEAD)) ;; push) if [[ ${GITHUB_EVENT_FORCED} != true ]] changes=($(git diff --name-only ${GITHUB_REF_BEFORE} HEAD)) ;; *) ;; } if (( ${changes[(I)*.cmake|*CMakeLists.txt]} )) { echo ::group::Install cmakelang pip3 install cmakelang echo ::endgroup:: echo ::group::Run cmake-format ./build-aux/run-cmake-format --fail-${{ inputs.failCondition }} --check echo ::endgroup:: } SceneSwitcher-1.29.2/.github/actions/run-tests/000077500000000000000000000000001477223167300213335ustar00rootroot00000000000000SceneSwitcher-1.29.2/.github/actions/run-tests/action.yaml000066400000000000000000000022161477223167300234750ustar00rootroot00000000000000name: "Run tests" description: "Run tests." inputs: target: description: "Build target" required: true workingDirectory: description: "Working directory" required: false default: ${{ github.workspace }} config: description: "Build config" required: false default: "" runs: using: "composite" steps: - name: Run macOS tests if: ${{ runner.os == 'macOS' }} shell: zsh {0} run: | if [[ '${{ inputs.target }}' != 'macos-universal' ]]; then echo tests skipped! exit 0 fi ${{ inputs.workingDirectory }}/build_macos/tests/${{ inputs.config }}/advanced-scene-switcher-tests - name: Run Linux packaging if: ${{ runner.os == 'Linux' }} shell: bash run: | if [[ '${{ inputs.target }}' != 'x86_64' ]]; then exit 0 fi ${{ inputs.workingDirectory }}/build_x86_64/tests/advanced-scene-switcher-tests - name: Run Windows packaging if: ${{ runner.os == 'Windows' }} shell: pwsh run: | ${{ inputs.workingDirectory }}/build_x64/tests/${{ inputs.config }}/advanced-scene-switcher-tests.exe SceneSwitcher-1.29.2/.github/actions/setup-macos-codesigning/000077500000000000000000000000001477223167300241165ustar00rootroot00000000000000SceneSwitcher-1.29.2/.github/actions/setup-macos-codesigning/action.yaml000066400000000000000000000146021477223167300262620ustar00rootroot00000000000000name: Set up macOS codesigning description: Sets up code signing certificates, provisioning profiles, and notarization information inputs: codesignIdentity: description: Codesigning identity required: true installerIdentity: description: Codesigning identity for package installer required: false codesignCertificate: description: PKCS12 certificate in base64 format required: true certificatePassword: description: Password required to install PKCS12 certificate required: true keychainPassword: description: Password to use for temporary keychain required: false notarizationUser: description: Apple ID to use for notarization required: false notarizationPassword: description: Application password for notarization provisioningProfile: description: Provisioning profile in base64 format required: false outputs: haveCodesignIdent: description: True if necessary codesigning credentials were found value: ${{ steps.codesign.outputs.haveCodesignIdent }} haveProvisioningProfile: description: True if necessary provisioning profile credentials were found value: ${{ steps.provisioning.outputs.haveProvisioningProfile }} haveNotarizationUser: description: True if necessary notarization credentials were found value: ${{ steps.notarization.outputs.haveNotarizationUser }} codesignIdent: description: Codesigning identity value: ${{ steps.codesign.outputs.codesignIdent }} installerIdent: description: Codesigning identity for package installer value: ${{ steps.codesign.outputs.installerIdent }} codesignTeam: description: Codesigning team value: ${{ steps.codesign.outputs.codesignTeam }} runs: using: composite steps: - name: Check Runner Operating System 🏃‍♂️ if: runner.os != 'macOS' shell: bash run: | : Check Runner Operating System 🏃‍♂️ echo "setup-macos-codesigning action requires a macOS-based runner." exit 2 - name: macOS Codesigning ✍️ shell: zsh --no-rcs --errexit --pipefail {0} id: codesign env: MACOS_SIGNING_IDENTITY: ${{ inputs.codesignIdentity }} MACOS_SIGNING_IDENTITY_INSTALLER: ${{ inputs.installerIdentity}} MACOS_SIGNING_CERT: ${{ inputs.codesignCertificate }} MAOCS_SIGNING_CERT_PASSWORD: ${{ inputs.certificatePassword }} MACOS_KEYCHAIN_PASSWORD: ${{ inputs.keychainPassword }} run: | : macOS Codesigning ✍️ if (( ${+RUNNER_DEBUG} )) setopt XTRACE if [[ ${MACOS_SIGNING_IDENTITY} && ${MACOS_SIGNING_IDENTITY_INSTALLER} && ${MACOS_SIGNING_CERT} ]] { print 'haveCodesignIdent=true' >> $GITHUB_OUTPUT local -r certificate_path="${RUNNER_TEMP}/build_certificate.p12" local -r keychain_path="${RUNNER_TEMP}/app-signing.keychain-db" print -n "${MACOS_SIGNING_CERT}" | base64 --decode --output="${certificate_path}" : "${MACOS_KEYCHAIN_PASSWORD:="$(print ${RANDOM} | shasum | head -c 32)"}" print '::group::Keychain setup' security create-keychain -p "${MACOS_KEYCHAIN_PASSWORD}" ${keychain_path} security set-keychain-settings -lut 21600 ${keychain_path} security unlock-keychain -p "${MACOS_KEYCHAIN_PASSWORD}" ${keychain_path} security import "${certificate_path}" -P "${MAOCS_SIGNING_CERT_PASSWORD}" -A \ -t cert -f pkcs12 -k ${keychain_path} \ -T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/xcrun security set-key-partition-list -S 'apple-tool:,apple:' -k "${MACOS_KEYCHAIN_PASSWORD}" \ ${keychain_path} &> /dev/null security list-keychain -d user -s ${keychain_path} 'login-keychain' print '::endgroup::' local -r team_id="${${MACOS_SIGNING_IDENTITY##* }//(\(|\))/}" print "codesignIdent=${MACOS_SIGNING_IDENTITY}" >> $GITHUB_OUTPUT print "installerIdent=${MACOS_SIGNING_IDENTITY_INSTALLER}" >> $GITHUB_OUTPUT print "MACOS_KEYCHAIN_PASSWORD=${MACOS_KEYCHAIN_PASSWORD}" >> $GITHUB_ENV print "codesignTeam=${team_id}" >> $GITHUB_OUTPUT } else { print 'haveCodesignIdent=false' >> $GITHUB_OUTPUT } - name: Provisioning Profile 👤 shell: zsh --no-rcs --errexit --pipefail {0} id: provisioning if: ${{ fromJSON(steps.codesign.outputs.haveCodesignIdent) }} env: MACOS_SIGNING_PROVISIONING_PROFILE: ${{ inputs.provisioningProfile }} run: | : Provisioning Profile 👤 if (( ${+RUNNER_DEBUG} )) setopt XTRACE if [[ ${MACOS_SIGNING_PROVISIONING_PROFILE} ]] { print 'haveProvisioningProfile=true' >> $GITHUB_OUTPUT local -r profile_path="${RUNNER_TEMP}/build_profile.provisionprofile" print -n "${MACOS_SIGNING_PROVISIONING_PROFILE}" \ | base64 --decode --output ${profile_path} print '::group::Provisioning Profile Setup' mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles security cms -D -i ${profile_path} -o ${RUNNER_TEMP}/build_profile.plist local -r uuid="$(plutil -extract UUID raw ${RUNNER_TEMP}/build_profile.plist)" local -r team_id="$(plutil -extract TeamIdentifier.0 raw -expect string ${RUNNER_TEMP}/build_profile.plist)" if [[ ${team_id} != '${{ steps.codesign.codesignTeam }}' ]] { print '::notice::Code Signing team in provisioning profile does not match certificate.' } cp ${profile_path} ~/Library/MobileDevice/Provisioning\ Profiles/${uuid}.provisionprofile print "provisioningProfileUUID=${uuid}" >> $GITHUB_OUTPUT print '::endgroup::' } else { print 'haveProvisioningProfile=false' >> $GITHUB_OUTPUT } - name: Notarization 🧑‍💼 shell: zsh --no-rcs --errexit --pipefail {0} id: notarization if: ${{ fromJSON(steps.codesign.outputs.haveCodesignIdent) }} env: MACOS_NOTARIZATION_USERNAME: ${{ inputs.notarizationUser }} MACOS_NOTARIZATION_PASSWORD: ${{ inputs.notarizationPassword }} run: | : Notarization 🧑‍💼 if (( ${+RUNNER_DEBUG} )) setopt XTRACE if [[ ${MACOS_NOTARIZATION_USERNAME} && ${MACOS_NOTARIZATION_PASSWORD} ]] { print 'haveNotarizationUser=true' >> $GITHUB_OUTPUT } else { print 'haveNotarizationUser=false' >> $GITHUB_OUTPUT } SceneSwitcher-1.29.2/.github/scripts/000077500000000000000000000000001477223167300174165ustar00rootroot00000000000000SceneSwitcher-1.29.2/.github/scripts/.Aptfile000066400000000000000000000004431477223167300210040ustar00rootroot00000000000000package 'cmake' package 'ccache' package 'git' package 'jq' package 'ninja-build', bin: 'ninja' package 'pkg-config' package 'libcurl4-openssl-dev' package 'libxtst-dev' package 'libxss-dev' package 'libopencv-dev' package 'libtesseract-dev' package 'libproc2-dev' package 'libusb-1.0-0-dev'SceneSwitcher-1.29.2/.github/scripts/.Brewfile000066400000000000000000000001471477223167300211600ustar00rootroot00000000000000brew "ccache" brew "coreutils" brew "cmake" brew "jq" brew "xcbeautify" brew "automake" brew "libtool" SceneSwitcher-1.29.2/.github/scripts/.Wingetfile000066400000000000000000000003441477223167300215150ustar00rootroot00000000000000package 'cmake', path: 'Cmake\bin', bin: 'cmake' package 'innosetup', path: 'Inno Setup 6', bin: 'iscc' package 'OpenSSL', path: 'OpenSSL', bin: 'openssl' package 'Microsoft.VisualStudio.Locator', path: 'vswhere', bin: 'vswhere'SceneSwitcher-1.29.2/.github/scripts/.build-deps.zsh000077500000000000000000000411251477223167300222600ustar00rootroot00000000000000#!/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}[3]} 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-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') local generator="${${CI:+Ninja}:-Xcode}" } else { local -r -a _valid_generators=(Ninja 'Unix Makefiles') local generator='Ninja' } local -r _usage=" Usage: %B${functrace[1]%:*}%b