diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3008e68..5c440ca 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -143,7 +143,7 @@ jobs: print "CODESIGN_IDENT_INSTALLER=${{ secrets.MACOS_SIGNING_INSTALLER_IDENTITY }}" >> $GITHUB_ENV - name: Setup vcpkg - uses: lukka/run-vcpkg@v11 + uses: lukka/run-vcpkg@6fe69898af670ac05f4a8427cc5cff4fb361cee5 env: VCPKG_DEFAULT_TRIPLET: ${{ (matrix.arch == 'arm64' && 'arm64-osx') || 'x64-osx' }} with: @@ -246,7 +246,7 @@ jobs: run: sudo apt-get install gcc-12 g++-12 - name: Setup vcpkg - uses: lukka/run-vcpkg@v11 + uses: lukka/run-vcpkg@6fe69898af670ac05f4a8427cc5cff4fb361cee5 with: vcpkgDirectory: '${{ github.workspace }}/plugin/vcpkg' doNotUpdateVcpkg: true @@ -336,7 +336,7 @@ jobs: "found=$(([string]${LabelFound}).ToLower())" >> $env:GITHUB_OUTPUT - name: Setup vcpkg - uses: lukka/run-vcpkg@v11 + uses: lukka/run-vcpkg@6fe69898af670ac05f4a8427cc5cff4fb361cee5 env: VCPKG_DEFAULT_TRIPLET: ${{ format('{0}-windows-static-md', matrix.arch) }} with: diff --git a/BUILDING.md b/BUILDING.md index abd99f5..44e0ae0 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -13,10 +13,10 @@ These steps are a continuation of the previous section on building. 1. Install [pre-commit](https://pre-commit.com/) and run `pre-commit install` in the root of the repository in order to format code automatically before a commit. (This uses [.pre-commit-config.yaml](.pre-commit-config.yaml) and [.cmake-format.json](.cmake-format.json)). 2. Navigate to `../obs-studio`. OBS Studio should be cloned already by the build script. Then build it according to the instructions on the [OBS website](https://obsproject.com/wiki/Building-OBS-Studio). -2. Open the `RewardsTheater/build64` directory. Open `CMakeCache.txt` and add the following line: ```OBS_BUILD_DIR:FILEPATH=../../obs-studio/build64``` +2. Open the `RewardsTheater/build_x64` directory. Open `CMakeCache.txt` and add the following line: ```OBS_BUILD_DIR:FILEPATH=../../obs-studio/build64``` Then build RewardsTheater again via the build script. -3. Open the project in Visual Studio. Right-click the `ALL_BUILD` project and set the debugging target to the OBS binary at `your_obs_clone_path\obs-studio\build64\rundir\Debug\bin\64bit\obs64.exe`, and the working directory to `your_obs_clone_path\obs-studio\build64\rundir\Debug\bin\64bit`. Now when you hit "Run" inside Visual Studio, the plugin is copied automatically to the rundir and then VS launches OBS for debugging. +3. Open the project in Visual Studio. Right-click the `ALL_BUILD` project. Select "Debug" in the "Configuration:" dropdown. Set the "Command:" to the OBS binary at `your_user_dir\source\repos\obs-studio\build64\rundir\Debug\bin\64bit\obs64.exe`, and the working directory to `your_user_dir\source\repos\obs-studio\build64\rundir\Debug\bin\64bit`. Now when you hit "Run" inside Visual Studio, the plugin is copied automatically to the rundir and then VS launches OBS for debugging. ## Building locally on Linux 1. Install GCC 12 (or later) via `sudo apt install gcc-12 g++-12` (use your favorite package manager). diff --git a/CMakeLists.txt b/CMakeLists.txt index 531f00f..1c77c8a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.20) cmake_policy(SET CMP0111 OLD) -project(RewardsTheater VERSION 1.0.5) +project(RewardsTheater VERSION 1.0.6) add_library(${CMAKE_PROJECT_NAME} MODULE) # Replace `Your Name Here` with the name (yours or your organization's) you want to see as the diff --git a/buildspec.json b/buildspec.json index 1816add..f660d22 100644 --- a/buildspec.json +++ b/buildspec.json @@ -1,35 +1,29 @@ { "dependencies": { "obs-studio": { - "version": "29.1.2", + "version": "30.0.0", "repository": "https://github.com/obsproject/obs-studio.git", "branch": "master", - "hash": "e15a92e16fc3827027a956f6d6a1223b41aced61" + "hash": "34ef67e212f24a085a63705a0ab81e3401c8eca4" }, "prebuilt": { - "version": "2023-04-12", + "version": "2023-10-09", "baseUrl": "https://github.com/obsproject/obs-deps/releases/download", "label": "Pre-Built obs-deps", "hashes": { - "macos-x86_64": "81120ffa33bb050c6c5fcd236e5cedfd7b80f7053fdba271fead5af20be0b5f5", - "macos-arm64": "b9bab79611774c4651d084e14259abe889d2b8d1653787a843d08cf3f0db881c", - "macos-universal": "9535c6e1ad96f7d49960251e85a245774088d48da1d602bb82f734b10219125a", - "windows-x64": "c13a14a1acc4224b21304d97b63da4121de1ed6981297e50496fbc474abc0503", - "linux-x86_64": "056425a8a7a4a0c242ed5ab9c1eba4dd6b004386877de4304524e7bea11c0ee2" + "windows-x64": "7585ba9cc470c1f668af6d51efe6da211b16822b884382817750d9e8b502a81c", + "linux-x86_64": "856a51a53981b1bd3f5e5b9670a0924f70473353e669fce52e64d5d730209564" } }, "qt6": { - "version": "2023-04-12", + "version": "2023-10-09", "baseUrl": "https://github.com/obsproject/obs-deps/releases/download", "label": "Pre-Built Qt6", "hashes": { - "macos-x86_64": "2622d6ecd484a596da12b6a45b709fe563821eda558d0bbb27335c8c2f63945c", - "macos-arm64": "4f72aa1103d88a00d90c01bb3650276ffa1408e16ef40579177605483b986dc9", - "macos-universal": "eb7614544ab4f3d2c6052c797635602280ca5b028a6b987523d8484222ce45d1", - "windows-x64": "4d39364b8a8dee5aa24fcebd8440d5c22bb4551c6b440ffeacce7d61f2ed1add" + "windows-x64": "feadb745e622fb81aa1cdcdc1179baef4c4442d15cb8f0212cb7ceda0f1911df" }, "debugSymbols": { - "windows-x64": "f34ee5067be19ed370268b15c53684b7b8aaa867dc800b68931df905d679e31f" + "windows-x64": "3c43ae5293051958bc024af3083b3a60c4c4fac2629f88446dbc671d22d9f997" } } }, @@ -64,7 +58,7 @@ } }, "name": "RewardsTheater", - "version": "1.0.5", + "version": "1.0.6", "author": "gottagofaster", "email": "lr.soft.now@gmail.com" } diff --git a/src/RewardsTheaterPlugin.cpp b/src/RewardsTheaterPlugin.cpp index 9feb780..4237e47 100644 --- a/src/RewardsTheaterPlugin.cpp +++ b/src/RewardsTheaterPlugin.cpp @@ -103,6 +103,11 @@ void RewardsTheaterPlugin::checkMinObsVersion() { } void RewardsTheaterPlugin::checkRestrictedRegion() { + if (std::getenv("container")) { + // Inside Flatpak + return; + } + if (std::strcmp(obs_get_locale(), "ru-RU") != 0) { return; } diff --git a/src/TwitchRewardsApi.cpp b/src/TwitchRewardsApi.cpp index 85a61b0..2cf27ce 100644 --- a/src/TwitchRewardsApi.cpp +++ b/src/TwitchRewardsApi.cpp @@ -268,11 +268,11 @@ json::value TwitchRewardsApi::rewardDataToJson(const RewardData& rewardData) { {"is_enabled", rewardData.isEnabled}, {"background_color", rewardData.backgroundColor.toHex()}, {"is_max_per_stream_enabled", rewardData.maxRedemptionsPerStream.has_value()}, - {"max_per_stream", rewardData.maxRedemptionsPerStream.value_or(1)}, + {"max_per_stream", rewardData.maxRedemptionsPerStream.value_or(0)}, {"is_max_per_user_per_stream_enabled", rewardData.maxRedemptionsPerUserPerStream.has_value()}, - {"max_per_user_per_stream", rewardData.maxRedemptionsPerUserPerStream.value_or(1)}, + {"max_per_user_per_stream", rewardData.maxRedemptionsPerUserPerStream.value_or(0)}, {"is_global_cooldown_enabled", rewardData.globalCooldownSeconds.has_value()}, - {"global_cooldown_seconds", rewardData.globalCooldownSeconds.value_or(1)}, + {"global_cooldown_seconds", rewardData.globalCooldownSeconds.value_or(0)}, {"should_redemptions_skip_request_queue", false}, }; } diff --git a/vcpkg b/vcpkg index c95000e..7ebd64e 160000 --- a/vcpkg +++ b/vcpkg @@ -1 +1 @@ -Subproject commit c95000e1b5bb62884de08d5e952993c8bced9db6 +Subproject commit 7ebd64e6bb56c739136ba9a691b0f4440bacb5cd