Skip to content

Commit

Permalink
Merge develop into master
Browse files Browse the repository at this point in the history
  • Loading branch information
lpugin committed Jul 3, 2023
2 parents 5abc7c0 + fa13013 commit 3cc8c56
Show file tree
Hide file tree
Showing 630 changed files with 62,593 additions and 55,043 deletions.
11 changes: 11 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Contribution guidelines

This document sets out the methods and practices for contributing to the Verovio project.

## Contributor License Agreement

In order to contribute the the project you need to sign and send us a [Contributor License Agreement](https://rism.digital/resources/verovio-cla.pdf) (CLA). However, following a generally accepted practice, very small contributions (below 20 lines of code) will be accepted without signing the CLA.

## Coding Guidelines

Please follow the [coding guidelines](https://book.verovio.org/contributing/guidelines.html).
2 changes: 1 addition & 1 deletion .github/workflows/tests_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Test Suite Evaluation

on:
pull_request:
branches: develop
branches: [develop]
# TODO: run this task only on PR in production; use push event for testing
#push:
#branches:
Expand Down
896 changes: 839 additions & 57 deletions Verovio.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

43 changes: 41 additions & 2 deletions bindings/android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,52 @@

This allows verovio to be built as a native library for Android. It does not include any Java bindings.

## Build instructions
### Build with ndk-build

As a prerequisite you have to install the Android NDK.
DISCLAIMER: It has been reported on various occasions that this is not working properly. There seem to be other way to have it working, and contributions would be welcome.

```sh
export ANDROID_NDK_ROOT="/opt/Android/android-ndk-r21b" # adjust to NDK install ANDROID_NDK
ndk_build=$ANDROID_NDK_ROOT/ndk-build
cd jni
$ndk_build
```

### Build with CMake

Set `NDK` and the appropriate `ABI` (e.g., to `armeabi-v7a`) environment variables and run:
```
cmake -DCMAKE_TOOLCHAIN_FILE=$NDK/build/cmake/android.toolchain.cmake -DANDROID_ABI=$ABI -DBUILD_AS_ANDROID_LIBRARY=ON ../../cmake
```

### Build with Android Studio

1. Create a new project with C++ Native
2. Checkout the Verovio repository in the `./app/src/main/cpp` directory
3. Add the following to the `CMakeLists.txt` generated by Android Studio:
```
# Build Verovio as a library
set(BUILD_AS_LIBRARY ON)
# Add the subdirectory with the Verovio CMakeLists.txt
add_subdirectory(./verovio/cmake)
# Add the inlude paths with the Verovio files
file(GLOB VRV_INCLUDES "./verovio/include/*" "./verovio/libmei/*")
include_directories(${VRV_INCLUDES})
# Link the Verovio library
target_link_libraries(myapplication verovio)
```

A minimal example would look like:
```cpp
#include <jni.h>
#include <string>

#include "toolkit.h"

extern "C" JNIEXPORT jstring JNICALL
Java_com_example_myapplication_MainActivity_stringFromJNI(JNIEnv* env, jobject /* this */) {
vrv::Toolkit tk(false);
std::string hello = "Hello from Verovio " + tk.GetVersion();
return env->NewStringUTF(hello.c_str());
}
```
Loading

0 comments on commit 3cc8c56

Please sign in to comment.