mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-29 04:36:21 -05:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
16bdcc348b | ||
|
|
e76df589e2 | ||
|
|
1390565fc6 | ||
|
|
d76a37c785 | ||
|
|
ce8a35adea | ||
|
|
9030ba1adf |
16
.github/workflows/build-project.yaml
vendored
16
.github/workflows/build-project.yaml
vendored
@@ -249,6 +249,14 @@ jobs:
|
||||
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-sources-${{ needs.check-event.outputs.commitHash }}
|
||||
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-*-source.*
|
||||
|
||||
- name: Rename artifacts for Ubuntu 24 🏷️
|
||||
run: |
|
||||
: Rename artifacts for Ubuntu 24 🏷️
|
||||
for f in ${{ github.workspace }}/release/*-x86_64-linux-gnu.*; do
|
||||
[ -e "${f}" ] || continue
|
||||
mv "${f}" "${f/x86_64-linux-gnu/x86_64-ubuntu24.04-linux-gnu}"
|
||||
done
|
||||
|
||||
- name: Upload Artifacts 📡
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
@@ -320,6 +328,14 @@ jobs:
|
||||
target: x86_64
|
||||
config: ${{ needs.check-event.outputs.config }}
|
||||
|
||||
- name: Rename artifacts for Ubuntu 26 🏷️
|
||||
run: |
|
||||
: Rename artifacts for Ubuntu 26 🏷️
|
||||
for f in ${{ github.workspace }}/release/*-x86_64-linux-gnu.*; do
|
||||
[ -e "${f}" ] || continue
|
||||
mv "${f}" "${f/x86_64-linux-gnu/x86_64-ubuntu26.04-linux-gnu}"
|
||||
done
|
||||
|
||||
- name: Upload Artifacts 📡
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
|
||||
1
.github/workflows/push.yaml
vendored
1
.github/workflows/push.yaml
vendored
@@ -78,6 +78,7 @@ jobs:
|
||||
'windows-x64;zip|exe'
|
||||
'macos-universal;tar.xz|pkg'
|
||||
'ubuntu-24.04-x86_64;tar.xz|deb|ddeb'
|
||||
'ubuntu-26.04-x86_64;tar.xz|deb|ddeb'
|
||||
'sources;tar.xz'
|
||||
)
|
||||
|
||||
|
||||
@@ -191,14 +191,21 @@ function(_check_dependencies)
|
||||
foreach(i RANGE 1 ${MAX_DOWNLOAD_RETRIES})
|
||||
message(STATUS "Attempt ${i}/${MAX_DOWNLOAD_RETRIES} for ${url}")
|
||||
|
||||
file(
|
||||
DOWNLOAD "${url}" "${dependencies_dir}/${file}"
|
||||
STATUS download_status
|
||||
EXPECTED_HASH SHA256=${hash})
|
||||
file(DOWNLOAD "${url}" "${dependencies_dir}/${file}"
|
||||
STATUS download_status)
|
||||
|
||||
list(GET download_status 0 error_code)
|
||||
list(GET download_status 1 error_message)
|
||||
|
||||
if(error_code EQUAL 0)
|
||||
file(SHA256 "${dependencies_dir}/${file}" actual_hash)
|
||||
if(NOT actual_hash STREQUAL hash)
|
||||
set(error_code 1)
|
||||
set(error_message
|
||||
"hash mismatch (expected ${hash}, got ${actual_hash})")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(error_code EQUAL 0)
|
||||
message(STATUS "Downloading ${url} - success on attempt ${i}")
|
||||
set(download_success TRUE)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,7 @@
|
||||
#include "websocket-api.hpp"
|
||||
#include "obs-websocket-api.h"
|
||||
#include "plugin-state-helpers.hpp"
|
||||
#include "version.h"
|
||||
|
||||
// Must be after "obs-websocket-api.h" to avoid logging function conflict
|
||||
#include "log-helper.hpp"
|
||||
@@ -15,6 +16,7 @@ static constexpr char VendorName[] = "AdvancedSceneSwitcher";
|
||||
static constexpr char VendorRequestStart[] = "AdvancedSceneSwitcherStart";
|
||||
static constexpr char VendorRequestStop[] = "AdvancedSceneSwitcherStop";
|
||||
static constexpr char VendorRequestStatus[] = "IsAdvancedSceneSwitcherRunning";
|
||||
static constexpr char VendorRequestVersion[] = "AdvancedSceneSwitcherVersion";
|
||||
static obs_websocket_vendor vendor;
|
||||
|
||||
static void registerWebsocketVendor();
|
||||
@@ -82,6 +84,12 @@ static void registerWebsocketVendor()
|
||||
obs_data_set_bool(response, "isRunning",
|
||||
PluginIsRunning());
|
||||
});
|
||||
registerWebsocketVendorRequest(
|
||||
VendorRequestVersion,
|
||||
[](obs_data_t *, obs_data_t *response, void *) {
|
||||
obs_data_set_string(response, "version", g_GIT_TAG);
|
||||
obs_data_set_string(response, "commit", g_GIT_SHA1);
|
||||
});
|
||||
}
|
||||
|
||||
const char *GetWebsocketVendorName()
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
#include "macro-action-scene-collection.hpp"
|
||||
|
||||
#include "layout-helpers.hpp"
|
||||
#include "plugin-state-helpers.hpp"
|
||||
#include "selection-helpers.hpp"
|
||||
#include "ui-helpers.hpp"
|
||||
|
||||
#include <obs-frontend-api.h>
|
||||
|
||||
@@ -15,6 +17,20 @@ bool MacroActionSceneCollection::_registered = MacroActionFactory::Register(
|
||||
MacroActionSceneCollectionEdit::Create,
|
||||
"AdvSceneSwitcher.action.sceneCollection"});
|
||||
|
||||
template<typename F> void QueueUITaskLambda(F &&func)
|
||||
{
|
||||
using FnType = std::decay_t<F>;
|
||||
auto *heapFunc = new FnType(std::forward<F>(func));
|
||||
|
||||
QueueUITask(
|
||||
[](void *param) {
|
||||
std::unique_ptr<FnType> fn(
|
||||
static_cast<FnType *>(param));
|
||||
(*fn)();
|
||||
},
|
||||
heapFunc);
|
||||
}
|
||||
|
||||
bool MacroActionSceneCollection::PerformAction()
|
||||
{
|
||||
// Changing the scene collection will also reload the settings of the
|
||||
@@ -23,7 +39,13 @@ bool MacroActionSceneCollection::PerformAction()
|
||||
if (SettingsWindowIsOpened()) {
|
||||
return false;
|
||||
}
|
||||
obs_frontend_set_current_scene_collection(_sceneCollection.c_str());
|
||||
|
||||
const auto collectionName = _sceneCollection;
|
||||
QueueUITaskLambda([collectionName]() {
|
||||
obs_frontend_set_current_scene_collection(
|
||||
collectionName.c_str());
|
||||
});
|
||||
|
||||
// It does not make sense to continue as the current settings will be
|
||||
// invalid after switching scene collection.
|
||||
return false;
|
||||
|
||||
@@ -61,9 +61,14 @@ function(_advss_whisper_suppress_werror dir)
|
||||
endif()
|
||||
target_compile_options(
|
||||
${_target}
|
||||
PRIVATE $<$<C_COMPILER_ID:GNU,Clang,AppleClang>:-Wno-error>
|
||||
$<$<CXX_COMPILER_ID:GNU,Clang,AppleClang>:-Wno-error>
|
||||
$<$<C_COMPILER_ID:MSVC>:/WX-> $<$<CXX_COMPILER_ID:MSVC>:/WX->)
|
||||
PRIVATE $<$<C_COMPILER_ID:GNU,Clang,AppleClang>:-Wno-error
|
||||
-Wno-shorten-64-to-32
|
||||
-Wno-ambiguous-macro>
|
||||
$<$<CXX_COMPILER_ID:GNU,Clang,AppleClang>:-Wno-error
|
||||
-Wno-shorten-64-to-32
|
||||
-Wno-ambiguous-macro>
|
||||
$<$<C_COMPILER_ID:MSVC>:/WX->
|
||||
$<$<CXX_COMPILER_ID:MSVC>:/WX->)
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user