Skip to content

Commit

Permalink
Official v1.1.0 commit
Browse files Browse the repository at this point in the history
  • Loading branch information
nhielost committed Aug 15, 2022
1 parent 7ee2d0a commit 07d45ea
Show file tree
Hide file tree
Showing 13 changed files with 443 additions and 214 deletions.
5 changes: 3 additions & 2 deletions .github/scripts/.build.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@ build() {
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 generator='Ninja'
local -r _usage="
Usage: %B${functrace[1]%:*}%b <option> [<options>]
Expand Down Expand Up @@ -197,7 +198,7 @@ Usage: %B${functrace[1]%:*}%b <option> [<options>]
)
if (( _loglevel == 0 )) cmake_args+=(-Wno_deprecated -Wno-dev --log-level=ERROR)
if (( _logLevel > 2 )) cmake_args+=(--debug-output)
if (( _loglevel > 2 )) cmake_args+=(--debug-output)
local num_procs
Expand Down
4 changes: 2 additions & 2 deletions .github/scripts/Build-Windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if ( $PSVersionTable.PSVersion -lt '7.0.0' ) {

function Build {
trap {
Pop-Location -Stack BuildTemp
Pop-Location -Stack BuildTemp -ErrorAction 'SilentlyContinue'
Write-Error $_
exit 2
}
Expand Down Expand Up @@ -54,7 +54,7 @@ function Build {
Setup-Host

if ( $CmakeGenerator -eq '' ) {
$CmakeGenerator = $VisualStudioVersion
$CmakeGenerator = $script:VisualStudioVersion
}

(Get-Content -Path ${ProjectRoot}/CMakeLists.txt -Raw) `
Expand Down
3 changes: 2 additions & 1 deletion .github/scripts/check-cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ if ! type cmake-format 2> /dev/null ; then
fi

find . -type d \( \
-path ./\*build -o \
-path ./\*build\* -o \
-path ./release -o \
-path ./deps/jansson -o \
-path ./plugins/decklink/\*/decklink-sdk -o \
-path ./plugins/enc-amf -o \
Expand Down
3 changes: 2 additions & 1 deletion .github/scripts/check-format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ else
fi

find . -type d \( \
-path ./\*build -o \
-path ./\*build\* -o \
-path ./release -o \
-path ./cmake -o \
-path ./plugins/decklink/\*/decklink-sdk -o \
-path ./plugins/enc-amf -o \
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/utils.pwsh/Setup-Obs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function Setup-Obs {
$DepsPath = "plugin-deps-${script:DepsVersion}-qt${script:QtVersion}-${script:Target}"

$CmakeArgs = @(
'-G', $script:CmakeGenerator
'-G', $CmakeGenerator
"-DCMAKE_SYSTEM_VERSION=${script:PlatformSDK}"
"-DCMAKE_GENERATOR_PLATFORM=$(if (${script:Target} -eq "x86") { "Win32" } else { "x64" })"
"-DCMAKE_BUILD_TYPE=${script:Configuration}"
Expand Down
19 changes: 6 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@ jobs:
name: ${{ env.PLUGIN_NAME }}-windows-${{ matrix.arch }}-${{ steps.setup.outputs.commitHash }}-installer
path: ${{ github.workspace }}/plugin/release/${{ env.PLUGIN_NAME }}-*.exe


make-release:
name: 03 - Create and upload release
runs-on: ubuntu-22.04
Expand All @@ -356,8 +355,6 @@ jobs:
run: |
## METADATA SCRIPT
echo "::set-output name=version::${GITHUB_REF/refs\/tags\//}"
echo "::set-output name=date::$(date +"%Y-%m-%d")"
echo '::set-output name=commitHash::${{ needs.macos_build.outputs.commitHash }}'
- name: Download build artifacts
uses: actions/download-artifact@v3
Expand All @@ -376,16 +373,12 @@ jobs:
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5
with:
draft: false
prerelease: false
prerelease: ${{ contains(steps.metadata.outputs.version, 'rc') || contains(steps.metadata.outputs.version, 'beta') }}
tag_name: ${{ steps.metadata.outputs.version }}
name: "${{ env.PLUGIN_NAME }} Build ${{ steps.metadata.outputs.version }}"
name: "${{ env.PLUGIN_NAME }} ${{ steps.metadata.outputs.version }}"
body_path: ${{ github.workspace }}/CHECKSUMS.txt
files: |
${{ github.workspace }}/${{ env.PLUGIN_NAME }}-windows-x64-${{ steps.metadata.outputs.commitHash }}/*.zip
${{ github.workspace }}/${{ env.PLUGIN_NAME }}-windows-x64-${{ steps.metadata.outputs.commitHash }}-installer/*.exe
${{ github.workspace }}/${{ env.PLUGIN_NAME }}-windows-x86-${{ steps.metadata.outputs.commitHash }}/*.zip
${{ github.workspace }}/${{ env.PLUGIN_NAME }}-windows-x86-${{ steps.metadata.outputs.commitHash }}-installer/*.exe
${{ github.workspace }}/${{ env.PLUGIN_NAME }}-linux-x86_64-${{ steps.metadata.outputs.commitHash }}/*.deb
${{ github.workspace }}/${{ env.PLUGIN_NAME }}-macos-x86_64-${{ steps.metadata.outputs.commitHash }}/*.pkg
${{ github.workspace }}/${{ env.PLUGIN_NAME }}-macos-arm64-${{ steps.metadata.outputs.commitHash }}/*.pkg
${{ github.workspace }}/${{ env.PLUGIN_NAME }}-macos-universal-${{ steps.metadata.outputs.commitHash }}/*.pkg
${{ github.workspace }}/**/*.zip
${{ github.workspace }}/**/*.exe
${{ github.workspace }}/**/*.deb
${{ github.workspace }}/**/*.pkg
50 changes: 25 additions & 25 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ set(LIBREMIDI_HEADER_ONLY
CACHE BOOL "Header-only mode")
add_subdirectory(libremidi EXCLUDE_FROM_ALL)
include_directories(libremidi/include)
target_link_libraries(obs-midi-mg PRIVATE libremidi)

# Add your custom source files here - header files are optional and only
# required for visibility e.g. in Xcode or Visual Studio
Expand All @@ -49,32 +50,37 @@ target_sources(
./src/obs-midi-mg.h
./src/forms/midimg-window.h)

# /!\ TAKE NOTE: No need to edit things past this point /!\

# Import libobs as main plugin dependency
find_package(libobs REQUIRED)
find_package(obs-frontend-api REQUIRED)
include(cmake/ObsPluginHelpers.cmake)
find_qt(VERSION ${QT_VERSION} COMPONENTS Widgets Core)

configure_file(src/plugin-macros.h.in
${CMAKE_SOURCE_DIR}/src/plugin-macros.generated.h)

target_sources(obs-midi-mg PRIVATE ./src/plugin-macros.generated.h)
# Uncomment these lines if you want to use the OBS Frontend API in your plugin

# --- Platform-independent build settings ---

target_include_directories(obs-midi-mg PRIVATE ${CMAKE_SOURCE_DIR}/src)
find_package(obs-frontend-api REQUIRED)
target_link_libraries(obs-midi-mg PRIVATE OBS::obs-frontend-api)

target_link_libraries(obs-midi-mg PRIVATE OBS::libobs OBS::obs-frontend-api
Qt::Core Qt::Widgets libremidi)
# Uncomment those lines if you want to use Qt in your plugin

find_qt(COMPONENTS Widgets Core)
target_link_libraries(obs-midi-mg PRIVATE Qt::Core Qt::Widgets)
set_target_properties(
obs-midi-mg
PROPERTIES AUTOMOC ON
AUTOUIC ON
AUTORCC ON)

target_compile_features(obs-midi-mg PRIVATE cxx_std_17)
configure_file(src/plugin-macros.h.in
${CMAKE_SOURCE_DIR}/src/plugin-macros.generated.h)

target_sources(obs-midi-mg PRIVATE src/plugin-macros.generated.h)

# /!\ TAKE NOTE: No need to edit things past this point /!\

# --- Platform-independent build settings ---

target_include_directories(obs-midi-mg PRIVATE ${CMAKE_SOURCE_DIR}/src)

target_link_libraries(obs-midi-mg PRIVATE OBS::libobs)

# --- End of section ---

Expand All @@ -84,31 +90,25 @@ if(OS_WINDOWS)
${CMAKE_BINARY_DIR}/installer-Windows.generated.iss)

if(MSVC)
target_compile_options(obs-midi-mg PRIVATE /MP /d2FH4-)
target_compile_options(obs-midi-mg PRIVATE /W4)
endif()
# --- End of section ---

# -- macOS specific build settings and tasks --
elseif(OS_MACOS)
configure_file(cmake/bundle/macos/installer-macOS.pkgproj.in
${CMAKE_BINARY_DIR}/installer-macOS.generated.pkgproj)
configure_file(cmake/bundle/macos/installer-macos.pkgproj.in
${CMAKE_BINARY_DIR}/installer-macos.generated.pkgproj)

set(MACOSX_PLUGIN_GUI_IDENTIFIER "${MACOS_BUNDLEID}")
set(MACOSX_PLUGIN_BUNDLE_VERSION "${CMAKE_PROJECT_VERSION}")
set(MACOSX_PLUGIN_SHORT_VERSION_STRING "1")

target_compile_options(
obs-midi-mg PRIVATE -Wall -Wextra -Werror-implicit-function-declaration
-stdlib=libc++ -fvisibility=default)

set_target_properties(obs-midi-mg PROPERTIES PREFIX "")
target_compile_options(obs-midi-mg PRIVATE -Wall)
# --- End of section ---

# --- Linux-specific build settings and tasks ---
else()
target_compile_options(obs-midi-mg PRIVATE -Wall -Wextra)

set_target_properties(obs-midi-mg PROPERTIES PREFIX "")
target_compile_options(obs-midi-mg PRIVATE -Wall)
endif()
# --- End of section ---

Expand Down
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

Allows MIDI devices to interact with OBS Studio.

### This plugin will not work in OBS Studio versions below 28.0.0, meaning that any users on Windows 8 or MacOS 10.14 and below will not be able to use this plugin.
### This plugin will not work in OBS Studio versions below 28.0.0 due to its usage of Qt 6, meaning that any users using an OS below Windows 10 or MacOS 10.15 will not be able to use this plugin.
(This may be addressed at a later date.)

### Beta releases of 28.0.0 may not allow this plugin to display properly in the new default theme *Yami*. Use the old default theme *Dark* for a better-looking display.

Expand Down Expand Up @@ -55,9 +56,7 @@ To edit the action, select the action in the ***Actions*** display, and the edit

Adjust the values as necessary for the action(s) in this binding. Settings will appear as the form is filled out. To use a value from a message, either check the box for the number fields, or select *Use Message Value* in the selection fields.

*Note 1: At this time, some actions are currently unavailable. Future releases of this plugin will implement these actions, and potentially new ones as well*.

*Note 2: You can use multiple actions in a binding by adding more actions. If this is desired, the behavior of the binding may not be appropriate. See [Binding Modes](#binding-modes) for more details*.
*Note: You can use multiple actions in a binding by adding more actions. If this is desired, the behavior of the binding may not be appropriate. See [Binding Modes](#binding-modes) for more details*.

### Binding Modes

Expand All @@ -79,11 +78,10 @@ To adjust other settings or view this page, click the *Preferences* button in th

The coming updates will hopefully introduce these new features:

- Implement already planned actions
- A transfer bindings between devices feature (for when a device has disconnected)
- A transfer bindings between devices feature (for when a device has disconnected or is unavailable)
- Using more elements of the message than just the value
- (Potentially) more actions - involving external features such as Scene Collections, Themes, and other settings
- MIDI Output device support - send a message when an event in OBS Studio occurs
- MIDI Output device support - send a message when an event in OBS Studio occurs (well underway!)

## Feedback

Expand Down
4 changes: 2 additions & 2 deletions buildspec.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"dependencies": {
"obs-studio": {
"version": "28.0.0-beta2",
"version": "28.0.0-beta1",
"repository": "https://github.com/obsproject/obs-studio.git",
"branch": "master",
"hash": "7b76619c434d161f525290224e481dd5735478bc"
"hash": "43a49dca47344a5170159ef99b86b97f90d4e4ad"
},
"prebuilt": {
"version": "2022-08-02",
Expand Down

0 comments on commit 07d45ea

Please sign in to comment.