Skip to content

Commit ccb7098

Browse files
committed
Add libresvip format converter
1 parent ab6af3f commit ccb7098

26 files changed

Lines changed: 3215 additions & 36 deletions

.github/actions/initialize-build-environment/action.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ runs:
1818
if: runner.os == 'Windows'
1919
shell: pwsh
2020
run: |
21-
choco install ccache
21+
choco install ccache protoc
2222
2323
- name: Install build tools (Ubuntu)
2424
if: runner.os == 'Linux'
@@ -29,7 +29,8 @@ runs:
2929
ninja-build `
3030
libasound2-dev libatopology-dev `
3131
libxrandr-dev libxinerama-dev libxrender-dev libxcomposite-dev libxcursor-dev `
32-
libgl1-mesa-dev libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libzstd-dev
32+
libgl1-mesa-dev libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libzstd-dev `
33+
protobuf-compiler
3334
3435
- name: Install build tools (macOS)
3536
if: runner.os == 'macOS'
@@ -39,11 +40,11 @@ runs:
3940
HOMEBREW_NO_INSTALL_CLEANUP: 1
4041
run: |
4142
brew update
42-
brew install ninja ccache imagemagick create-dmg
43+
brew install ninja ccache imagemagick create-dmg protobuf
4344
4445
- name: Install Qt
4546
uses: jurplel/install-qt-action@v4
4647
with:
4748
version: ${{ inputs.qt_version }}
48-
modules: qt5compat qtscxml qtshadertools
49+
modules: qt5compat qtscxml qtshadertools qtgrpc
4950
cache: true

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ option(APPLICATION_CONFIGURE_INSTALLER "Configure installer" OFF)
2020
# ----------------------------------
2121
option(APPLICATION_ENABLE_BREAKPAD "Enable google breakpad" ON)
2222

23+
set(DIFFSCOPE_LIBRESVIP_URL "" CACHE STRING "URL of the LibreSVIP command-line archive")
24+
2325
# ----------------------------------
2426
# CMake Settings
2527
# ----------------------------------
@@ -76,4 +78,4 @@ qm_init_directories()
7678
# ----------------------------------
7779
add_subdirectory(src)
7880

79-
add_subdirectory(dist)
81+
add_subdirectory(dist)

scripts/vcpkg-manifest/vcpkg.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@
3030
"wolf-midi",
3131
"nlohmann-json",
3232
"zstd",
33-
"opendspx"
33+
"opendspx",
34+
{
35+
"name": "libarchive",
36+
"default-features": false
37+
}
3438
],
3539
"vcpkg-configuration": {
3640
"overlay-ports": [

src/plugins/libresvipformatconverter/CMakeLists.txt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ project(libresvipformatconverter
33
DESCRIPTION ${CURRENT_PLUGIN_DESC}
44
)
55

6+
qm_find_qt(Network Protobuf Grpc)
7+
find_package(LibArchive REQUIRED)
8+
69
diffscope_add_builtin_plugin(${PROJECT_NAME}
710
NAME org.diffscope.libresvipformatconverter
811
DISPLAY_NAME "LibreSVIP Format Converter"
@@ -15,13 +18,40 @@ diffscope_add_builtin_plugin(${PROJECT_NAME}
1518
Widgets
1619
Qml
1720
Quick
21+
Network
22+
Protobuf
23+
Grpc
1824
LINKS
1925
ExtensionSystem::ExtensionSystem
2026
ChorusKit::AppCore
2127
uishell
2228
coreplugin
2329
importexportmanager
2430
opendspx::model
31+
opendspx::serializer
32+
svscraft::Quick
33+
svscraft::Network
34+
LibArchive::LibArchive
2535
INCLUDE_PRIVATE
2636
internal/**
2737
)
38+
39+
qt_add_protobuf(${PROJECT_NAME}
40+
PROTO_FILES
41+
proto/libresvip.proto
42+
)
43+
44+
qt_add_grpc(${PROJECT_NAME} CLIENT
45+
PROTO_FILES
46+
proto/libresvip.proto
47+
)
48+
49+
qt_add_resources(${PROJECT_NAME} libresvipformatconverter_resources
50+
PREFIX "/libresvipformatconverter"
51+
FILES
52+
res/libresvip/libresvip.ico
53+
)
54+
55+
target_compile_definitions(${PROJECT_NAME} PRIVATE
56+
DIFFSCOPE_LIBRESVIP_URL="${DIFFSCOPE_LIBRESVIP_URL}"
57+
)

0 commit comments

Comments
 (0)