Compare commits

..

3 Commits

Author SHA1 Message Date
WarmUpTill
2c55775423 draft windows arm support 2026-07-14 20:10:40 +02:00
WarmUpTill
46bf6c666f Cleanup includes
Some checks failed
debian-build / build (push) Has been cancelled
Push to master / Check Formatting 🔍 (push) Has been cancelled
Push to master / Build Project 🧱 (push) Has been cancelled
Push to master / Create Release 🛫 (push) Has been cancelled
2026-07-11 19:50:58 +02:00
WarmUpTill
902be7759d Speed up build times by using pre-compiled headers 2026-07-11 19:50:58 +02:00
42 changed files with 309 additions and 86 deletions

View File

@@ -38,4 +38,4 @@ runs:
if: ${{ runner.os == 'Windows' }} if: ${{ runner.os == 'Windows' }}
shell: pwsh shell: pwsh
run: | run: |
${{ inputs.workingDirectory }}/build_x64/tests/${{ inputs.config }}/advanced-scene-switcher-tests.exe ${{ inputs.workingDirectory }}/build_${{ inputs.target }}/tests/${{ inputs.config }}/advanced-scene-switcher-tests.exe

View File

@@ -2,7 +2,7 @@
param( param(
[ValidateSet('Debug', 'RelWithDebInfo', 'Release', 'MinSizeRel')] [ValidateSet('Debug', 'RelWithDebInfo', 'Release', 'MinSizeRel')]
[string] $Configuration = 'RelWithDebInfo', [string] $Configuration = 'RelWithDebInfo',
[ValidateSet('x86', 'x64')] [ValidateSet('x86', 'x64', 'arm64')]
[string] $Target, [string] $Target,
[ValidateSet('Visual Studio 17 2022', 'Visual Studio 16 2019')] [ValidateSet('Visual Studio 17 2022', 'Visual Studio 16 2019')]
[string] $CMakeGenerator, [string] $CMakeGenerator,
@@ -69,7 +69,7 @@ function Build {
$CmakeArgs += ('--debug-output') $CmakeArgs += ('--debug-output')
} }
$Preset = "windows-$(if ( $Env:CI -ne $null ) { 'ci-' })${Target}" $Preset = "windows-$(if ( $null -ne $Env:CI ) { 'ci-' })${Target}"
$CmakeArgs += @( $CmakeArgs += @(
'--preset', $Preset '--preset', $Preset
@@ -209,13 +209,14 @@ function Build {
$msbuildExe = vswhere -latest -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe | select-object -first 1 $msbuildExe = vswhere -latest -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe | select-object -first 1
if ($msbuildExe) { if ($msbuildExe) {
$LibusbPlatform = if ($Target -eq 'arm64') { 'arm64' } else { 'x64' }
$env:CL="/wd5287" $env:CL="/wd5287"
Invoke-External $msbuildExe "${LibusbPath}/msvc/libusb.sln" /property:Configuration=Release /property:Platform=x64 Invoke-External $msbuildExe "${LibusbPath}/msvc/libusb.sln" /property:Configuration=Release /property:Platform=$LibusbPlatform
Remove-Item Env:CL Remove-Item Env:CL
$libusbBuildResultDirectory = "${LibusbPath}/build/v143/x64/Release" $libusbBuildResultDirectory = "${LibusbPath}/build/v143/${LibusbPlatform}/Release"
if (-not (Test-Path -Path $libusbBuildResultDirectory)) { if (-not (Test-Path -Path $libusbBuildResultDirectory)) {
$libusbBuildResultDirectory = "${LibusbPath}/x64/Release/dll" $libusbBuildResultDirectory = "${LibusbPath}/${LibusbPlatform}/Release/dll"
} }
Copy-Item -Path "${libusbBuildResultDirectory}/*" -Destination ${ADVSSDepPath} -Recurse -Force Copy-Item -Path "${libusbBuildResultDirectory}/*" -Destination ${ADVSSDepPath} -Recurse -Force
} else { } else {
@@ -245,9 +246,10 @@ function Build {
if ($opensslDir) { if ($opensslDir) {
Write-Host "Detected OpenSSL at: $opensslDir" Write-Host "Detected OpenSSL at: $opensslDir"
$OpenSSLArch = if ($Target -eq 'arm64') { 'arm64' } else { 'x64' }
$MqttCmakeArgs += "-DOPENSSL_ROOT_DIR=$opensslDir" $MqttCmakeArgs += "-DOPENSSL_ROOT_DIR=$opensslDir"
$MqttCmakeArgs += "-DOPENSSL_CRYPTO_LIBRARY=$opensslDir\lib\VC\x64\MD\libcrypto.lib" $MqttCmakeArgs += "-DOPENSSL_CRYPTO_LIBRARY=$opensslDir\lib\VC\$OpenSSLArch\MD\libcrypto.lib"
$MqttCmakeArgs += "-DOPENSSL_SSL_LIBRARY=$opensslDir\lib\VC\x64\MD\libssl.lib" $MqttCmakeArgs += "-DOPENSSL_SSL_LIBRARY=$opensslDir\lib\VC\$OpenSSLArch\MD\libssl.lib"
} else { } else {
Write-Warning "OpenSSL not found - maybe cmake will find it ..." Write-Warning "OpenSSL not found - maybe cmake will find it ..."
} }

View File

@@ -1,6 +1,6 @@
[CmdletBinding()] [CmdletBinding()]
param( param(
[ValidateSet('x64')] [ValidateSet('x64', 'arm64')]
[string] $Target = 'x64', [string] $Target = 'x64',
[ValidateSet('Debug', 'RelWithDebInfo', 'Release', 'MinSizeRel')] [ValidateSet('Debug', 'RelWithDebInfo', 'Release', 'MinSizeRel')]
[string] $Configuration = 'RelWithDebInfo', [string] $Configuration = 'RelWithDebInfo',
@@ -93,7 +93,7 @@ function Build {
$CmakeArgs += ('--debug-output') $CmakeArgs += ('--debug-output')
} }
$Preset = "windows-$(if ( $Env:CI -ne $null ) { 'ci-' })${Target}" $Preset = "windows-$(if ( $null -ne $Env:CI ) { 'ci-' })${Target}"
$CmakeArgs += @( $CmakeArgs += @(
'--preset', $Preset '--preset', $Preset

View File

@@ -1,6 +1,6 @@
[CmdletBinding()] [CmdletBinding()]
param( param(
[ValidateSet('x64')] [ValidateSet('x64', 'arm64')]
[string] $Target = 'x64', [string] $Target = 'x64',
[ValidateSet('Debug', 'RelWithDebInfo', 'Release', 'MinSizeRel')] [ValidateSet('Debug', 'RelWithDebInfo', 'Release', 'MinSizeRel')]
[string] $Configuration = 'RelWithDebInfo', [string] $Configuration = 'RelWithDebInfo',
@@ -69,7 +69,8 @@ function Package {
Remove-Item @RemoveArgs Remove-Item @RemoveArgs
$ReleasePath = "${ProjectRoot}/release/${Configuration}" $ReleasePath = "${ProjectRoot}/release/${Configuration}"
$NewBinPath = "${ReleasePath}/${ProductName}/bin/64bit" $BinDirName = if ($Target -eq 'arm64') { 'arm64' } else { '64bit' }
$NewBinPath = "${ReleasePath}/${ProductName}/bin/${BinDirName}"
$NewDataPath = "${ReleasePath}/${ProductName}/data" $NewDataPath = "${ReleasePath}/${ProductName}/data"
$CIWindowsDir = "${ProjectRoot}/build-aux/CI/windows" $CIWindowsDir = "${ProjectRoot}/build-aux/CI/windows"
@@ -80,7 +81,7 @@ function Package {
New-Item -ItemType Directory -Force -Path $RecStaging | Out-Null New-Item -ItemType Directory -Force -Path $RecStaging | Out-Null
Copy-Item -Path "${CIWindowsDir}/README.txt" -Destination "${RecStaging}/README.txt" Copy-Item -Path "${CIWindowsDir}/README.txt" -Destination "${RecStaging}/README.txt"
if ( Test-Path -Path $NewBinPath ) { if ( Test-Path -Path $NewBinPath ) {
$RecBinPath = "${RecStaging}/${ProductName}/bin/64bit" $RecBinPath = "${RecStaging}/${ProductName}/bin/${BinDirName}"
New-Item -ItemType Directory -Force -Path $RecBinPath | Out-Null New-Item -ItemType Directory -Force -Path $RecBinPath | Out-Null
Copy-Item -Path "${NewBinPath}/*" -Destination $RecBinPath -Recurse -Force Copy-Item -Path "${NewBinPath}/*" -Destination $RecBinPath -Recurse -Force
} }
@@ -102,7 +103,7 @@ function Package {
New-Item -ItemType Directory -Force -Path $PortableStaging | Out-Null New-Item -ItemType Directory -Force -Path $PortableStaging | Out-Null
Copy-Item -Path "${CIWindowsDir}/README-portable.txt" -Destination "${PortableStaging}/README.txt" Copy-Item -Path "${CIWindowsDir}/README-portable.txt" -Destination "${PortableStaging}/README.txt"
if ( Test-Path -Path $NewBinPath ) { if ( Test-Path -Path $NewBinPath ) {
$PortableBinPath = "${PortableStaging}/obs-plugins/64bit" $PortableBinPath = "${PortableStaging}/obs-plugins/${BinDirName}"
New-Item -ItemType Directory -Force -Path $PortableBinPath | Out-Null New-Item -ItemType Directory -Force -Path $PortableBinPath | Out-Null
Copy-Item -Path "${NewBinPath}/*" -Destination $PortableBinPath -Recurse -Force Copy-Item -Path "${NewBinPath}/*" -Destination $PortableBinPath -Recurse -Force
} }
@@ -136,10 +137,10 @@ function Package {
Copy-Item -Path "${Configuration}/*" -Destination $PkgRec -Recurse -Force Copy-Item -Path "${Configuration}/*" -Destination $PkgRec -Recurse -Force
# Legacy layout (for OBS installation directory) # Legacy layout (for OBS installation directory)
if ( Test-Path "${Configuration}/${ProductName}/bin/64bit" ) { if ( Test-Path "${Configuration}/${ProductName}/bin/${BinDirName}" ) {
$PkgLegBin = "Package/portable/obs-plugins/64bit" $PkgLegBin = "Package/portable/obs-plugins/${BinDirName}"
New-Item -ItemType Directory -Force -Path $PkgLegBin | Out-Null New-Item -ItemType Directory -Force -Path $PkgLegBin | Out-Null
Copy-Item -Path "${Configuration}/${ProductName}/bin/64bit/*" -Destination $PkgLegBin -Recurse -Force Copy-Item -Path "${Configuration}/${ProductName}/bin/${BinDirName}/*" -Destination $PkgLegBin -Recurse -Force
} }
if ( Test-Path "${Configuration}/${ProductName}/data" ) { if ( Test-Path "${Configuration}/${ProductName}/data" ) {
$PkgLegData = "Package/portable/data/obs-plugins/${ProductName}" $PkgLegData = "Package/portable/data/obs-plugins/${ProductName}"

View File

@@ -311,3 +311,63 @@ jobs:
with: with:
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-windows-x64-${{ needs.check-event.outputs.commitHash }} name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-windows-x64-${{ needs.check-event.outputs.commitHash }}
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-*-windows-x64*.* path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-*-windows-x64*.*
windows-arm64-build:
name: Build for Windows ARM64 🪟
runs-on: windows-11-arm
needs: check-event
defaults:
run:
shell: pwsh
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
- name: Set Up Environment 🔧
id: setup
run: |
# Set Up Environment 🔧
if ( $Env:RUNNER_DEBUG -ne $null ) {
Set-PSDebug -Trace 1
}
$BuildSpec = Get-Content -Path buildspec.json -Raw | ConvertFrom-Json
$ProductName = $BuildSpec.name
$GitOutput = git describe --tags
"pluginName=${ProductName}" >> $env:GITHUB_OUTPUT
"pluginVersion=${GitOutput}" >> $env:GITHUB_OUTPUT
- name: Build Dependencies 🏗️
uses: ./.github/actions/build-dependencies
with:
workingDirectory: ${{ github.workspace }}/plugin
target: arm64
config: ${{ needs.check-event.outputs.config }}
- name: Build Plugin 🧱
uses: ./.github/actions/build-plugin
with:
target: arm64
config: ${{ needs.check-event.outputs.config }}
- name: Run tests
uses: ./.github/actions/run-tests
with:
target: arm64
config: ${{ needs.check-event.outputs.config }}
- name: Package Plugin 📀
uses: ./.github/actions/package-plugin
with:
target: arm64
config: ${{ needs.check-event.outputs.config }}
package: ${{ fromJSON(needs.check-event.outputs.package) }}
- name: Upload Artifacts 📡
uses: actions/upload-artifact@v7
with:
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-windows-arm64-${{ needs.check-event.outputs.commitHash }}
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-*-windows-arm64*.*

View File

@@ -374,6 +374,9 @@ set_target_properties(${LIB_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden)
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_17) target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_17)
target_compile_features(${LIB_NAME} PUBLIC cxx_std_17) target_compile_features(${LIB_NAME} PUBLIC cxx_std_17)
target_precompile_headers(${LIB_NAME} PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/lib/pch.hpp")
target_include_directories( target_include_directories(
${LIB_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/deps/obs-websocket/lib" ${LIB_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/deps/obs-websocket/lib"
"${CMAKE_CURRENT_SOURCE_DIR}/deps/exprtk") "${CMAKE_CURRENT_SOURCE_DIR}/deps/exprtk")

View File

@@ -74,6 +74,35 @@
"ADVSS_ENABLE_TESTS": true "ADVSS_ENABLE_TESTS": true
} }
}, },
{
"name": "windows-arm64",
"displayName": "Windows ARM64",
"description": "Build for Windows ARM64",
"inherits": ["template"],
"binaryDir": "${sourceDir}/build_arm64",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
},
"generator": "Visual Studio 17 2022",
"architecture": "ARM64",
"warnings": {"dev": true, "deprecated": true},
"cacheVariables": {
"QT_VERSION": "6",
"CMAKE_SYSTEM_VERSION": "10.0.18363.657"
}
},
{
"name": "windows-ci-arm64",
"inherits": ["windows-arm64"],
"displayName": "Windows ARM64 CI build",
"description": "Build for Windows ARM64 on CI",
"cacheVariables": {
"CMAKE_COMPILE_WARNING_AS_ERROR": true,
"ADVSS_ENABLE_TESTS": true
}
},
{ {
"name": "linux-x86_64", "name": "linux-x86_64",
"displayName": "Linux x86_64", "displayName": "Linux x86_64",
@@ -162,6 +191,20 @@
"description": "Windows CI build for x64 (RelWithDebInfo configuration)", "description": "Windows CI build for x64 (RelWithDebInfo configuration)",
"configuration": "RelWithDebInfo" "configuration": "RelWithDebInfo"
}, },
{
"name": "windows-arm64",
"configurePreset": "windows-arm64",
"displayName": "Windows ARM64",
"description": "Windows build for ARM64",
"configuration": "RelWithDebInfo"
},
{
"name": "windows-ci-arm64",
"configurePreset": "windows-ci-arm64",
"displayName": "Windows ARM64 CI",
"description": "Windows CI build for ARM64 (RelWithDebInfo configuration)",
"configuration": "RelWithDebInfo"
},
{ {
"name": "linux-x86_64", "name": "linux-x86_64",
"configurePreset": "linux-x86_64", "configurePreset": "linux-x86_64",

View File

@@ -6,7 +6,8 @@
"label": "OBS sources", "label": "OBS sources",
"hashes": { "hashes": {
"macos": "39751f067bacc13d44b116c5138491b5f1391f91516d3d590d874edd21292291", "macos": "39751f067bacc13d44b116c5138491b5f1391f91516d3d590d874edd21292291",
"windows-x64": "2c8427c10b55ac6d68008df2e9a3e82f4647aaad18f105e30d4713c2de678ccf" "windows-x64": "2c8427c10b55ac6d68008df2e9a3e82f4647aaad18f105e30d4713c2de678ccf",
"windows-ARM64": "2c8427c10b55ac6d68008df2e9a3e82f4647aaad18f105e30d4713c2de678ccf"
} }
}, },
"prebuilt": { "prebuilt": {
@@ -15,7 +16,8 @@
"label": "Pre-Built obs-deps", "label": "Pre-Built obs-deps",
"hashes": { "hashes": {
"macos": "495687e63383d1a287684b6e2e9bfe246bb8f156fe265926afb1a325af1edd2a", "macos": "495687e63383d1a287684b6e2e9bfe246bb8f156fe265926afb1a325af1edd2a",
"windows-x64": "c8c642c1070dc31ce9a0f1e4cef5bb992f4bff4882255788b5da12129e85caa7" "windows-x64": "c8c642c1070dc31ce9a0f1e4cef5bb992f4bff4882255788b5da12129e85caa7",
"windows-ARM64": "f581cc61e8f734a8b12d485fc8662a408ca59d222814e4b37bce115bd442fb04"
} }
}, },
"qt6": { "qt6": {
@@ -24,10 +26,12 @@
"label": "Pre-Built Qt6", "label": "Pre-Built Qt6",
"hashes": { "hashes": {
"macos": "d3f5f04b6ea486e032530bdf0187cbda9a54e0a49621a4c8ba984c5023998867", "macos": "d3f5f04b6ea486e032530bdf0187cbda9a54e0a49621a4c8ba984c5023998867",
"windows-x64": "0e76bf0555dd5382838850b748d3dcfab44a1e1058441309ab54e1a65b156d0a" "windows-x64": "0e76bf0555dd5382838850b748d3dcfab44a1e1058441309ab54e1a65b156d0a",
"windows-ARM64": "7aab240504931f32ea8e8d208a912a0d6ddbd78c16858f2e559c7c9b29ab9326"
}, },
"debugSymbols": { "debugSymbols": {
"windows-x64": "11b7be92cf66a273299b8f3515c07a5cfb61614b59a4e67f7fc5ecba5e2bdf21" "windows-x64": "11b7be92cf66a273299b8f3515c07a5cfb61614b59a4e67f7fc5ecba5e2bdf21",
"windows-ARM64": "884ae08291b5c87d83a7b0004ea8db356530c1f4ff9bdc814b5d599a8d28a152"
} }
} }
}, },

View File

@@ -333,6 +333,8 @@ function(setup_advss_plugin target)
PRIVATE "${ADVSS_SOURCE_DIR}/lib" "${ADVSS_SOURCE_DIR}/lib/legacy" PRIVATE "${ADVSS_SOURCE_DIR}/lib" "${ADVSS_SOURCE_DIR}/lib/legacy"
"${ADVSS_SOURCE_DIR}/lib/macro" "${ADVSS_SOURCE_DIR}/lib/utils" "${ADVSS_SOURCE_DIR}/lib/macro" "${ADVSS_SOURCE_DIR}/lib/utils"
"${ADVSS_SOURCE_DIR}/lib/variables" "${ADVSS_SOURCE_DIR}/forms") "${ADVSS_SOURCE_DIR}/lib/variables" "${ADVSS_SOURCE_DIR}/forms")
target_precompile_headers(${target} PRIVATE "${ADVSS_SOURCE_DIR}/lib/pch.hpp")
endfunction() endfunction()
function(install_advss_plugin_dependency) function(install_advss_plugin_dependency)

View File

@@ -1,7 +1,4 @@
#pragma once #pragma once
#include "macro-segment-list.hpp"
#include "condition-logic.hpp"
#include "log-helper.hpp"
#include <ui_advanced-scene-switcher.h> #include <ui_advanced-scene-switcher.h>

View File

@@ -4,9 +4,10 @@
#include "filter-combo-box.hpp" #include "filter-combo-box.hpp"
#include "first-run-wizard.hpp" #include "first-run-wizard.hpp"
#include "layout-helpers.hpp" #include "layout-helpers.hpp"
#include "macro.hpp" #include "macro-helpers.hpp"
#include "macro-search.hpp" #include "macro-search.hpp"
#include "macro-settings.hpp" #include "macro-settings.hpp"
#include "macro.hpp"
#include "path-helpers.hpp" #include "path-helpers.hpp"
#include "source-helpers.hpp" #include "source-helpers.hpp"
#include "splitter-helpers.hpp" #include "splitter-helpers.hpp"
@@ -18,6 +19,7 @@
#include "version.h" #include "version.h"
#include <obs-frontend-api.h> #include <obs-frontend-api.h>
#include <QFileDialog> #include <QFileDialog>
#include <QInputDialog> #include <QInputDialog>
#include <QMessageBox> #include <QMessageBox>

View File

@@ -1,8 +1,11 @@
#include "macro-action-macro.hpp" #include "macro-action-macro.hpp"
#include "condition-logic.hpp"
#include "help-icon.hpp" #include "help-icon.hpp"
#include "layout-helpers.hpp" #include "layout-helpers.hpp"
#include "macro.hpp"
#include "macro-action-factory.hpp" #include "macro-action-factory.hpp"
#include "macro-helpers.hpp"
#include "macro.hpp"
#include <chrono> #include <chrono>

View File

@@ -1,7 +1,9 @@
#include "macro-condition-edit.hpp" #include "macro-condition-edit.hpp"
#include "advanced-scene-switcher.hpp" #include "advanced-scene-switcher.hpp"
#include "macro-signals.hpp" #include "condition-logic.hpp"
#include "macro-settings.hpp" #include "macro-settings.hpp"
#include "macro-signals.hpp"
#include "macro.hpp" #include "macro.hpp"
#include "path-helpers.hpp" #include "path-helpers.hpp"
#include "plugin-state-helpers.hpp" #include "plugin-state-helpers.hpp"

View File

@@ -1,6 +1,9 @@
#include "macro-condition-macro.hpp" #include "macro-condition-macro.hpp"
#include "layout-helpers.hpp" #include "layout-helpers.hpp"
#include "macro-action-edit.hpp" #include "macro-action-edit.hpp"
#include "macro-helpers.hpp"
#include "macro-ref.hpp"
#include "macro-signals.hpp" #include "macro-signals.hpp"
#include "macro.hpp" #include "macro.hpp"

View File

@@ -1,5 +1,7 @@
#include "macro-condition.hpp" #include "macro-condition.hpp"
#include "condition-logic.hpp"
namespace advss { namespace advss {
MacroCondition::MacroCondition(Macro *m, bool supportsVariableValue) MacroCondition::MacroCondition(Macro *m, bool supportsVariableValue)

View File

@@ -1,8 +1,11 @@
#include "macro-dock-settings.hpp" #include "macro-dock-settings.hpp"
#include "macro-dock.hpp"
#include "macro-dock-window.hpp" #include "macro-dock-window.hpp"
#include "macro-dock.hpp"
#include "macro-helpers.hpp"
#include "macro.hpp" #include "macro.hpp"
#include "plugin-state-helpers.hpp" #include "plugin-state-helpers.hpp"
#include "variable-string.hpp"
#include <obs-frontend-api.h> #include <obs-frontend-api.h>
#include <util/platform.h> #include <util/platform.h>

View File

@@ -1,17 +1,20 @@
#include "macro-edit.hpp" #include "macro-edit.hpp"
#include "condition-logic.hpp"
#include "cursor-shape-changer.hpp" #include "cursor-shape-changer.hpp"
#include "macro.hpp"
#include "macro-action-edit.hpp" #include "macro-action-edit.hpp"
#include "macro-action-macro.hpp" #include "macro-action-macro.hpp"
#include "macro-condition-edit.hpp" #include "macro-condition-edit.hpp"
#include "macro-helpers.hpp"
#include "macro-segment-copy-paste.hpp" #include "macro-segment-copy-paste.hpp"
#include "macro-segment-list.hpp" #include "macro-segment-list.hpp"
#include "macro-settings.hpp" #include "macro-settings.hpp"
#include "macro-signals.hpp" #include "macro-signals.hpp"
#include "macro.hpp"
#include "math-helpers.hpp" #include "math-helpers.hpp"
#include "name-dialog.hpp" #include "name-dialog.hpp"
#include "path-helpers.hpp"
#include "obs-module-helper.hpp" #include "obs-module-helper.hpp"
#include "path-helpers.hpp"
#include "plugin-state-helpers.hpp" #include "plugin-state-helpers.hpp"
#include "splitter-helpers.hpp" #include "splitter-helpers.hpp"
#include "tab-helpers.hpp" #include "tab-helpers.hpp"

View File

@@ -1,6 +1,7 @@
#include "macro-ref.hpp" #include "macro-ref.hpp"
#include "macro.hpp"
#include "macro-helpers.hpp"
#include "macro.hpp"
#include "plugin-state-helpers.hpp" #include "plugin-state-helpers.hpp"
namespace advss { namespace advss {

View File

@@ -1,5 +1,7 @@
#include "macro-segment-copy-paste.hpp" #include "macro-segment-copy-paste.hpp"
#include "advanced-scene-switcher.hpp" #include "advanced-scene-switcher.hpp"
#include "condition-logic.hpp"
#include "macro.hpp" #include "macro.hpp"
#include <QShortcut> #include <QShortcut>

View File

@@ -1,4 +1,5 @@
#include "macro-segment.hpp" #include "macro-segment.hpp"
#include "macro.hpp" #include "macro.hpp"
#include "mouse-wheel-guard.hpp" #include "mouse-wheel-guard.hpp"
#include "path-helpers.hpp" #include "path-helpers.hpp"
@@ -8,10 +9,13 @@
#include <QApplication> #include <QApplication>
#include <QEvent> #include <QEvent>
#include <QFrame>
#include <QGraphicsOpacityEffect> #include <QGraphicsOpacityEffect>
#include <QLabel> #include <QLabel>
#include <QMouseEvent> #include <QMouseEvent>
#include <QPushButton>
#include <QScrollBar> #include <QScrollBar>
#include <QVBoxLayout>
namespace advss { namespace advss {

View File

@@ -7,15 +7,17 @@
#include "sync-helpers.hpp" #include "sync-helpers.hpp"
#include "temp-variable.hpp" #include "temp-variable.hpp"
#include <QWidget>
#include <QFrame>
#include <QPushButton>
#include <QVBoxLayout>
#include <QTimer>
#include <obs-data.h> #include <obs-data.h>
#include <QHBoxLayout>
#include <QPushButton>
#include <QWidget>
#include <memory> #include <memory>
class QFrame;
class QLabel; class QLabel;
class QVBoxLayout;
namespace advss { namespace advss {

View File

@@ -1,8 +1,11 @@
#include "macro-selection.hpp" #include "macro-selection.hpp"
#include "advanced-scene-switcher.hpp" #include "advanced-scene-switcher.hpp"
#include "layout-helpers.hpp" #include "layout-helpers.hpp"
#include "macro.hpp" #include "macro-helpers.hpp"
#include "macro-ref.hpp"
#include "macro-signals.hpp" #include "macro-signals.hpp"
#include "macro.hpp"
#include "ui-helpers.hpp" #include "ui-helpers.hpp"
#include <QDialogButtonBox> #include <QDialogButtonBox>

View File

@@ -2,8 +2,9 @@
#include "macro-action-edit.hpp" #include "macro-action-edit.hpp"
#include "macro-condition-edit.hpp" #include "macro-condition-edit.hpp"
#include "macro-export-import-dialog.hpp" #include "macro-export-import-dialog.hpp"
#include "macro-settings.hpp" #include "macro-helpers.hpp"
#include "macro-search.hpp" #include "macro-search.hpp"
#include "macro-settings.hpp"
#include "macro-signals.hpp" #include "macro-signals.hpp"
#include "macro-tree.hpp" #include "macro-tree.hpp"
#include "macro.hpp" #include "macro.hpp"
@@ -17,6 +18,7 @@
#include "version.h" #include "version.h"
#include <obs-frontend-api.h> #include <obs-frontend-api.h>
#include <QColor> #include <QColor>
#include <QMenu> #include <QMenu>

View File

@@ -1,21 +1,25 @@
#include "macro-tree.hpp" #include "macro-tree.hpp"
#include "macro.hpp"
#include "macro-helpers.hpp"
#include "macro-search.hpp" #include "macro-search.hpp"
#include "macro-signals.hpp" #include "macro-signals.hpp"
#include "macro.hpp"
#include "path-helpers.hpp" #include "path-helpers.hpp"
#include "sync-helpers.hpp" #include "sync-helpers.hpp"
#include "ui-helpers.hpp" #include "ui-helpers.hpp"
#include <obs.h> #include <obs.h>
#include <string>
#include <QHBoxLayout>
#include <QLabel> #include <QLabel>
#include <QLineEdit> #include <QLineEdit>
#include <QSpacerItem>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QMouseEvent> #include <QMouseEvent>
#include <QSpacerItem>
#include <QStylePainter> #include <QStylePainter>
#include <QToolTip> #include <QToolTip>
#include <QVBoxLayout>
#include <string>
Q_DECLARE_METATYPE(std::shared_ptr<advss::Macro>); Q_DECLARE_METATYPE(std::shared_ptr<advss::Macro>);

View File

@@ -1,4 +1,6 @@
#include "macro.hpp" #include "macro.hpp"
#include "condition-logic.hpp"
#include "macro-action-factory.hpp" #include "macro-action-factory.hpp"
#include "macro-condition-factory.hpp" #include "macro-condition-factory.hpp"
#include "macro-helpers.hpp" #include "macro-helpers.hpp"
@@ -7,12 +9,14 @@
#include "splitter-helpers.hpp" #include "splitter-helpers.hpp"
#include "sync-helpers.hpp" #include "sync-helpers.hpp"
#include <obs-frontend-api.h>
#include <QAction>
#include <QMainWindow>
#include <chrono> #include <chrono>
#include <limits> #include <limits>
#undef max #undef max
#include <obs-frontend-api.h>
#include <QAction>
#include <QMainWindow>
#include <unordered_map> #include <unordered_map>
namespace advss { namespace advss {

View File

@@ -1,21 +1,20 @@
#pragma once #pragma once
#include "macro-action.hpp" #include "macro-action.hpp"
#include "macro-condition.hpp" #include "macro-condition.hpp"
#include "macro-dock-settings.hpp" #include "macro-dock-settings.hpp"
#include "macro-helpers.hpp"
#include "macro-input.hpp" #include "macro-input.hpp"
#include "macro-ref.hpp"
#include "variable-string.hpp"
#include "temp-variable.hpp" #include "temp-variable.hpp"
#include <future>
#include <string>
#include <deque>
#include <memory>
#include <map>
#include <thread>
#include <obs.hpp> #include <obs.hpp>
#include <obs-module-helper.hpp>
#include <QList>
#include <deque>
#include <future>
#include <memory>
#include <string>
#include <thread>
namespace advss { namespace advss {
@@ -225,12 +224,7 @@ private:
MacroDockSettings _dockSettings; MacroDockSettings _dockSettings;
}; };
void LoadMacros(obs_data_t *obj);
void SaveMacros(obs_data_t *obj);
bool CheckMacros();
bool RunMacros();
void WaitForAllMacros(); void WaitForAllMacros();
void InvalidateMacroTempVarValues();
std::shared_ptr<Macro> GetMacroWithInvalidConditionInterval(); std::shared_ptr<Macro> GetMacroWithInvalidConditionInterval();
} // namespace advss } // namespace advss

40
lib/pch.hpp Normal file
View File

@@ -0,0 +1,40 @@
#pragma once
// OBS
#include <obs-data.h>
#include <obs-frontend-api.h>
#include <obs.hpp>
// Qt
#include <QCheckBox>
#include <QComboBox>
#include <QDialog>
#include <QDoubleSpinBox>
#include <QFrame>
#include <QHBoxLayout>
#include <QLabel>
#include <QLayout>
#include <QLineEdit>
#include <QList>
#include <QPushButton>
#include <QSpinBox>
#include <QString>
#include <QTimer>
#include <QVBoxLayout>
#include <QWidget>
// Standard library
#include <algorithm>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <deque>
#include <functional>
#include <map>
#include <memory>
#include <mutex>
#include <optional>
#include <string>
#include <thread>
#include <unordered_map>
#include <vector>

View File

@@ -3,6 +3,9 @@
#include "plugin-state-helpers.hpp" #include "plugin-state-helpers.hpp"
#include "ui-helpers.hpp" #include "ui-helpers.hpp"
#include <QGridLayout>
#include <QHBoxLayout>
namespace advss { namespace advss {
static std::deque<std::shared_ptr<Item>> queues; static std::deque<std::shared_ptr<Item>> queues;

View File

@@ -1,6 +1,8 @@
#include "priority-helper.hpp" #include "priority-helper.hpp"
#include "switcher-data.hpp"
#include "advanced-scene-switcher.hpp" #include "advanced-scene-switcher.hpp"
#include "macro-helpers.hpp"
#include "macro.hpp"
#include "scene-group.hpp" #include "scene-group.hpp"
#include "switch-audio.hpp" #include "switch-audio.hpp"
#include "switch-executable.hpp" #include "switch-executable.hpp"
@@ -10,15 +12,16 @@
#include "switch-pause.hpp" #include "switch-pause.hpp"
#include "switch-random.hpp" #include "switch-random.hpp"
#include "switch-screen-region.hpp" #include "switch-screen-region.hpp"
#include "switch-sequence.hpp"
#include "switch-time.hpp" #include "switch-time.hpp"
#include "switch-transitions.hpp" #include "switch-transitions.hpp"
#include "switch-window.hpp"
#include "switch-sequence.hpp"
#include "switch-video.hpp" #include "switch-video.hpp"
#include "macro.hpp" #include "switch-window.hpp"
#include "switcher-data.hpp"
#include <QThread>
#include <algorithm> #include <algorithm>
#include <QThread>
namespace advss { namespace advss {

View File

@@ -1,9 +1,11 @@
#include "temp-variable.hpp" #include "temp-variable.hpp"
#include "obs-module-helper.hpp"
#include "macro.hpp"
#include "macro-action-macro.hpp" #include "macro-action-macro.hpp"
#include "macro-edit.hpp" #include "macro-edit.hpp"
#include "macro-helpers.hpp"
#include "macro-segment.hpp" #include "macro-segment.hpp"
#include "macro.hpp"
#include "obs-module-helper.hpp"
#include "plugin-state-helpers.hpp" #include "plugin-state-helpers.hpp"
#include "sync-helpers.hpp" #include "sync-helpers.hpp"
#include "ui-helpers.hpp" #include "ui-helpers.hpp"

View File

@@ -1,12 +1,18 @@
#include "ui-helpers.hpp" #include "ui-helpers.hpp"
#include "advanced-scene-switcher.hpp" #include "advanced-scene-switcher.hpp"
#include "non-modal-dialog.hpp" #include "non-modal-dialog.hpp"
#include "obs-module-helper.hpp" #include "obs-module-helper.hpp"
#include "plugin-state-helpers.hpp" #include "plugin-state-helpers.hpp"
#include <obs-frontend-api.h> #include <obs-frontend-api.h>
#include <QAbstractButton>
#include <QComboBox>
#include <QCursor>
#include <QGraphicsColorizeEffect> #include <QGraphicsColorizeEffect>
#include <QListView> #include <QListView>
#include <QListWidget>
#include <QMainWindow> #include <QMainWindow>
#include <QPropertyAnimation> #include <QPropertyAnimation>
#include <QScrollBar> #include <QScrollBar>

View File

@@ -1,15 +1,18 @@
#pragma once #pragma once
#include "export-symbol-helper.hpp" #include "export-symbol-helper.hpp"
#include <QAbstractButton>
#include <QColor> #include <QColor>
#include <QComboBox>
#include <QIcon> #include <QIcon>
#include <QListWidget>
#include <QString> #include <QString>
#include <QWidget>
#include <string> #include <string>
class QAbstractButton;
class QComboBox;
class QListWidget;
class QWidget;
namespace advss { namespace advss {
// Returns QObject* to QPropertyAnimation object // Returns QObject* to QPropertyAnimation object

View File

@@ -1,6 +1,9 @@
#include "utility.hpp" #include "utility.hpp"
#include <QCursor>
#include <QListWidget>
#include <QTextStream> #include <QTextStream>
#include <sstream> #include <sstream>
namespace advss { namespace advss {

View File

@@ -1,14 +1,15 @@
#pragma once #pragma once
#include "export-symbol-helper.hpp" #include "export-symbol-helper.hpp"
#include <optional>
#include <QListWidget>
#include <QMetaObject>
#include <QPushButton>
#include <QString> #include <QString>
#include <QWidget>
#include <string> #include <string>
class QListWidget;
class QObject;
class QWidget;
namespace advss { namespace advss {
EXPORT std::pair<int, int> GetCursorPos(); EXPORT std::pair<int, int> GetCursorPos();

View File

@@ -28,7 +28,9 @@ endif()
if(EXISTS "${OpenVR_DIR}/CMakeLists.txt") if(EXISTS "${OpenVR_DIR}/CMakeLists.txt")
set(SIZEOF_VOIDP ${CMAKE_SIZEOF_VOID_P}) set(SIZEOF_VOIDP ${CMAKE_SIZEOF_VOID_P})
if((NOT APPLE) AND (CMAKE_SIZEOF_VOID_P EQUAL 8)) if(WIN32 AND CMAKE_SYSTEM_PROCESSOR MATCHES "ARM64|arm64|aarch64")
set(PROCESSOR_ARCH "arm64")
elseif((NOT APPLE) AND (CMAKE_SIZEOF_VOID_P EQUAL 8))
set(PROCESSOR_ARCH "64") set(PROCESSOR_ARCH "64")
else() else()
set(PROCESSOR_ARCH "32") set(PROCESSOR_ARCH "32")

View File

@@ -1,8 +1,9 @@
#include "macro-script-handler.hpp" #include "macro-script-handler.hpp"
#include "log-helper.hpp"
#include "macro-action-script.hpp" #include "macro-action-script.hpp"
#include "macro-condition-script.hpp" #include "macro-condition-script.hpp"
#include "plugin-state-helpers.hpp" #include "plugin-state-helpers.hpp"
#include "log-helper.hpp"
#include "variable.hpp" #include "variable.hpp"
#include <obs-properties.h> #include <obs-properties.h>

View File

@@ -1,4 +1,6 @@
#include "chat-connection.hpp" #include "chat-connection.hpp"
#include "log-helper.hpp"
#include "token.hpp" #include "token.hpp"
#include "twitch-helpers.hpp" #include "twitch-helpers.hpp"

View File

@@ -1,4 +1,5 @@
#include "content-classification.hpp" #include "content-classification.hpp"
#include "channel-selection.hpp" #include "channel-selection.hpp"
#include "log-helper.hpp" #include "log-helper.hpp"
#include "obs-module-helper.hpp" #include "obs-module-helper.hpp"

View File

@@ -1,10 +1,12 @@
#include "event-sub.hpp" #include "event-sub.hpp"
#include "log-helper.hpp"
#include "token.hpp" #include "token.hpp"
#include "twitch-helpers.hpp" #include "twitch-helpers.hpp"
#include "twitch-timestamp.hpp"
#include <log-helper.hpp> #include <log-helper.hpp>
#include <plugin-state-helpers.hpp> #include <plugin-state-helpers.hpp>
#include "twitch-timestamp.hpp"
using namespace std::chrono_literals; using namespace std::chrono_literals;

View File

@@ -1,10 +1,10 @@
#include "tag-selection.hpp" #include "tag-selection.hpp"
#include "channel-selection.hpp" #include "channel-selection.hpp"
#include "log-helper.hpp" #include "log-helper.hpp"
#include "obs-module-helper.hpp" #include "obs-module-helper.hpp"
#include "twitch-helpers.hpp" #include "twitch-helpers.hpp"
#include <nlohmann/json.hpp>
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QListWidget> #include <QListWidget>
#include <QMessageBox> #include <QMessageBox>
@@ -12,6 +12,8 @@
#include <QRegularExpression> #include <QRegularExpression>
#include <QVBoxLayout> #include <QVBoxLayout>
#include <nlohmann/json.hpp>
namespace advss { namespace advss {
void TwitchTagList::Load(obs_data_t *obj) void TwitchTagList::Load(obs_data_t *obj)

View File

@@ -1,16 +1,20 @@
#include "token.hpp" #include "token.hpp"
#include "log-helper.hpp"
#include "twitch-helpers.hpp" #include "twitch-helpers.hpp"
#include <obs-module-helper.hpp>
#include <QDesktopServices>
#include <QGroupBox>
#include <QScrollArea>
#include <QUrl>
#include <help-icon.hpp> #include <help-icon.hpp>
#include <layout-helpers.hpp> #include <layout-helpers.hpp>
#include <log-helper.hpp> #include <log-helper.hpp>
#include <macro-export-extensions.hpp> #include <macro-export-extensions.hpp>
#include <obs-module-helper.hpp>
#include <plugin-state-helpers.hpp> #include <plugin-state-helpers.hpp>
#include <QDesktopServices>
#include <QGroupBox>
#include <QScrollArea>
#include <QUrl>
#include <ui-helpers.hpp> #include <ui-helpers.hpp>
namespace advss { namespace advss {

View File

@@ -1,4 +1,6 @@
#include "twitch-helpers.hpp" #include "twitch-helpers.hpp"
#include "log-helper.hpp"
#include "plugin-state-helpers.hpp" #include "plugin-state-helpers.hpp"
#include "token.hpp" #include "token.hpp"