Skip to content

Commit

Permalink
Merge branch 'log-node'
Browse files Browse the repository at this point in the history
  • Loading branch information
mfep committed Jun 14, 2024
2 parents e473193 + e0e1dc5 commit cd97d9e
Show file tree
Hide file tree
Showing 40 changed files with 1,984 additions and 578 deletions.
60 changes: 35 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,18 @@ on: [push, pull_request]

jobs:
build-linux:
runs-on: ubuntu-22.04
strategy:
matrix:
RUNNER:
- ubuntu-22.04
- ubuntu-24.04
runs-on: ${{matrix.RUNNER}}
env:
CXXFLAGS: -Wall -Wextra -Wno-deprecated-declarations -Werror -Wno-stringop-overflow
steps:
- uses: actions/checkout@v3
- name: Setup system name
run: echo "SYSTEM_NAME=$(lsb_release --codename --short)" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
submodules: true
lfs: true
Expand All @@ -20,56 +29,56 @@ jobs:
nlohmann-json3-dev
- name: Configure CMake
run: cmake
-S ${{github.workspace}}
-B ${{github.workspace}}/build
-D CMAKE_CXX_FLAGS="-Wall -Wextra"
-D CMAKE_BUILD_TYPE=Release
-D MC_COMMIT_SHA=${{github.sha}}
-D MC_BUILD_NUMBER=${{github.run_number}}
-D CPACK_GENERATOR=DEB
-D CPACK_SYSTEM_NAME=ubuntu-22.04
-D CPACK_SYSTEM_NAME=$SYSTEM_NAME
- name: Build
run: cmake --build ${{github.workspace}}/build --target midiconn -j `nproc`
run: cmake --build ${{github.workspace}}/build --target midiconn -j $(nproc)
- name: Create DEB package
run: cd ${{github.workspace}}/build && cpack -C Release
- name: Upload Artifacts
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v4
with:
name: linux-${{env.SYSTEM_NAME}}
path: |
${{github.workspace}}/build/midiconn
${{github.workspace}}/build/*.deb
build-flatpak:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
container:
image: bilelmoussaoui/flatpak-github-actions:freedesktop-23.08
options: --privileged
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
lfs: true
- name: Install prerequisites
run: sudo apt-get update -y && sudo apt-get install -y
appstream-util
flatpak-builder
- name: Validate metainfo
run: appstream-util validate
${{github.workspace}}/data/packaging/xyz.safeworlds.midiconn.metainfo.xml
- name: Install flatpak prerequisites
run: sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo &&
sudo flatpak install -y flathub org.freedesktop.Sdk//23.08 org.freedesktop.Platform//23.08
data/packaging/xyz.safeworlds.midiconn.metainfo.xml
- name: Build flatpak
run: flatpak-builder build/flatpak ${{github.workspace}}/data/packaging/xyz.safeworlds.midiconn.yml
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
manifest-path: ${{github.workspace}}/data/packaging/xyz.safeworlds.midiconn.yml
cache-key: flatpak-builder-${{ github.sha }}

build-windows:
runs-on: windows-2022
runs-on: windows-latest
env:
vcpkg-prereqs: nlohmann-json:x64-windows spdlog:x64-windows sdl2:x64-windows freetype[core]:x64-windows zlib:x64-windows
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
lfs: true
- name: Restore vcpkg prerequisites cache
id: restore-cache-vcpkg
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: C:\vcpkg
key: ${{env.vcpkg-prereqs}}
Expand All @@ -78,7 +87,7 @@ jobs:
run: vcpkg install ${{env.vcpkg-prereqs}}
- name: Save vcpkg prerequisites cache
if: ${{ steps.restore-cache-vcpkg.outputs.cache-hit != 'true' }}
uses: actions/cache/save@v3
uses: actions/cache/save@v4
with:
path: C:\vcpkg
key: ${{env.vcpkg-prereqs}}
Expand All @@ -97,24 +106,25 @@ jobs:
- name: Build installer
run: cd ${{github.workspace}}\build; cpack -C Release
- name: Upload Artifacts
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v4
with:
name: windows
path: |
${{github.workspace}}\build\Release\*.exe
${{github.workspace}}\build\Release\*.dll
${{github.workspace}}\build\*.msi
release:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
needs:
- build-linux
- build-windows
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
- name: Create GitHub release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: |
${{github.workspace}}/artifact/*.deb
Expand Down
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,12 @@ set(sources
src/ActivityIndicator.cpp
src/Application.cpp
src/ConfigFile.cpp
src/DisconnectedMidiInNode.cpp
src/DisconnectedMidiOutNode.cpp
src/KeyboardShortcutAggregator.cpp
src/Licenses.cpp
src/LogNode.cpp
src/MidiChannelNode.cpp
src/MidiInNode.cpp
src/MidiOutNode.cpp
src/MidiPortWatchdog.cpp
src/Node.cpp
src/NodeEditor.cpp
src/NodeFactory.cpp
Expand Down
23 changes: 2 additions & 21 deletions src/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Application::Application(SDL_Window* window,
SDL_Renderer* renderer,
const std::filesystem::path& path_to_preset)
: m_theme_control(m_config, window), m_node_factory(m_theme_control, m_port_name_display),
m_preset{NodeEditor(m_node_factory, m_port_name_display, m_theme_control), {}},
m_preset{NodeEditor(m_node_factory, m_port_name_display, m_theme_control)},
m_preset_manager(m_preset, m_node_factory, m_config, m_port_name_display, m_theme_control),
m_port_name_display(m_config.get_show_full_port_names()),
m_welcome_enabled(m_config.get_show_welcome() && path_to_preset.empty()),
Expand Down Expand Up @@ -109,8 +109,7 @@ void Application::new_preset(bool create_nodes)
}
if (new_preset)
{
m_preset = {NodeEditor(m_node_factory, m_port_name_display, m_theme_control, create_nodes),
{}};
m_preset = {NodeEditor(m_node_factory, m_port_name_display, m_theme_control, create_nodes)};
m_preset_manager =
PresetManager(m_preset, m_node_factory, m_config, m_port_name_display, m_theme_control);
}
Expand Down Expand Up @@ -180,24 +179,6 @@ void Application::render_main_menu()
save_preset_as();
}
ImGui::Separator();
if (ImGui::BeginMenu("MIDI message filter"))
{
bool changed = ImGui::MenuItem(
"SysEx", nullptr, &m_preset.m_message_type_mask.m_sysex_enabled);
changed = ImGui::MenuItem(
"Clock", nullptr, &m_preset.m_message_type_mask.m_time_enabled) ||
changed;
changed = ImGui::MenuItem("Active Sensing",
nullptr,
&m_preset.m_message_type_mask.m_sensing_enabled) ||
changed;
if (changed)
{
// TODO
}
ImGui::EndMenu();
}
ImGui::Separator();
if (ImGui::MenuItem(" " ICON_FK_TIMES " Exit", "Alt+F4"))
{
exit();
Expand Down
28 changes: 0 additions & 28 deletions src/DisconnectedMidiInNode.cpp

This file was deleted.

23 changes: 0 additions & 23 deletions src/DisconnectedMidiInNode.hpp

This file was deleted.

29 changes: 0 additions & 29 deletions src/DisconnectedMidiOutNode.cpp

This file was deleted.

24 changes: 0 additions & 24 deletions src/DisconnectedMidiOutNode.hpp

This file was deleted.

Loading

0 comments on commit cd97d9e

Please sign in to comment.