Skip to content

Commit 8635bd9

Browse files
authored
Simpleble version bump (#831)
* Simpleble bump Signed-off-by: Andrey Parfenov <a1994ndrey@gmail.com> * Fix SimpleBLE README headings * Remove unused SimpleBLE docs import * Fix SimpleCBLE debug artifact names --------- Signed-off-by: Andrey Parfenov <a1994ndrey@gmail.com>
1 parent 99fa8ba commit 8635bd9

739 files changed

Lines changed: 68437 additions & 16480 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy_cpp_libs.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ jobs:
2020
- name: Add msbuild to PATH
2121
uses: microsoft/setup-msbuild@v1.0.2
2222
# compile and prepare everything
23-
# need to build SimpleBLE outside from BrainFlow because they have different Windows System Versions
24-
- name: Compile SimpleBLE ${{ matrix.build_type }} ${{ matrix.arch }} with MSVC runtime ${{ matrix.msvc_runtime }}
23+
# need to build SimpleCBLE outside from BrainFlow because they have different Windows System Versions
24+
- name: Compile SimpleCBLE ${{ matrix.build_type }} ${{ matrix.arch }} with MSVC runtime ${{ matrix.msvc_runtime }}
2525
run: |
26-
mkdir %GITHUB_WORKSPACE%\third_party\SimpleBLE\simpleble\%BUILD%_%RUNTIME%_%ARCH%
27-
cd %GITHUB_WORKSPACE%\third_party\SimpleBLE\simpleble\%BUILD%_%RUNTIME%_%ARCH%
26+
mkdir %GITHUB_WORKSPACE%\third_party\SimpleBLE\simplecble\%BUILD%_%RUNTIME%_%ARCH%
27+
cd %GITHUB_WORKSPACE%\third_party\SimpleBLE\simplecble\%BUILD%_%RUNTIME%_%ARCH%
2828
cmake -G "Visual Studio 17 2022" -A %ARCH% -DMSVC_RUNTIME=%RUNTIME% -DCMAKE_SYSTEM_VERSION=10.0.19041.0 -DCMAKE_INSTALL_PREFIX=%GITHUB_WORKSPACE%\artifacts\%ARCH%_%BUILD%_%RUNTIME%\ ..
2929
cmake --build . --target install --config %BUILD% -j 2 --parallel 2
3030
shell: cmd
@@ -75,12 +75,12 @@ jobs:
7575
brew install ninja
7676
fi
7777
ninja --version
78-
# build simpleble outside from brainflow because of different deployment targets
79-
- name: Compile SimpleBLE MacOS
78+
# build SimpleCBLE outside from brainflow because of different deployment targets
79+
- name: Compile SimpleCBLE MacOS
8080
if: (matrix.os == 'macos-14')
8181
run: |
82-
mkdir $GITHUB_WORKSPACE/third_party/SimpleBLE/simpleble/build
83-
cd $GITHUB_WORKSPACE/third_party/SimpleBLE/simpleble/build
82+
mkdir $GITHUB_WORKSPACE/third_party/SimpleBLE/simplecble/build
83+
cd $GITHUB_WORKSPACE/third_party/SimpleBLE/simplecble/build
8484
cmake -G Ninja -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/artifacts/macos_$BUILD -DCMAKE_BUILD_TYPE=$BUILD ..
8585
ninja
8686
ninja install

.github/workflows/run_unix.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
if: (matrix.os == 'ubuntu-latest')
3434
run: |
3535
sudo -H apt-get update -y
36-
sudo -H apt-get install -y python3-setuptools python3-pygments libbluetooth-dev
36+
sudo -H apt-get install -y python3-setuptools python3-pygments libbluetooth-dev libdbus-1-dev
3737
env:
3838
DEBIAN_FRONTEND: noninteractive
3939
- name: Install Node
@@ -63,12 +63,12 @@ jobs:
6363
uses: actions/setup-java@v1
6464
with:
6565
java-version: 11.0.3
66-
# build simpleble outside from brainflow because of different deployment targets
67-
- name: Compile SimpleBLE MacOS
66+
# build SimpleCBLE outside from brainflow because of different deployment targets
67+
- name: Compile SimpleCBLE MacOS
6868
if: (matrix.os == 'macos-14')
6969
run: |
70-
mkdir $GITHUB_WORKSPACE/third_party/SimpleBLE/simpleble/build
71-
cd $GITHUB_WORKSPACE/third_party/SimpleBLE/simpleble/build
70+
mkdir $GITHUB_WORKSPACE/third_party/SimpleBLE/simplecble/build
71+
cd $GITHUB_WORKSPACE/third_party/SimpleBLE/simplecble/build
7272
cmake -G Ninja -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/installed -DCMAKE_BUILD_TYPE=Release ..
7373
ninja
7474
ninja install

src/board_controller/ble_lib_board.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
DLLLoader *BLELibBoard::dll_loader = NULL;
1111
std::mutex BLELibBoard::mutex;
1212
#else
13-
#include "simpleble_c/adapter.h"
14-
#include "simpleble_c/peripheral.h"
15-
#include "simpleble_c/simpleble.h"
16-
#include "simpleble_c/utils.h"
13+
#include "simplecble/adapter.h"
14+
#include "simplecble/peripheral.h"
15+
#include "simplecble/simplecble.h"
16+
#include "simplecble/utils.h"
1717
#endif
1818

1919
BLELibBoard::BLELibBoard (int board_id, struct BrainFlowInputParams params)

src/board_controller/build.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ if (BUILD_BLUETOOTH)
113113
endif (BUILD_BLUETOOTH)
114114

115115
if (BUILD_BLE)
116-
add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR}/third_party/SimpleBLE/simpleble)
116+
add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR}/third_party/SimpleBLE/simplecble)
117117
endif (BUILD_BLE)
118118

119119
add_library (
@@ -146,7 +146,7 @@ target_include_directories (
146146
${CMAKE_CURRENT_SOURCE_DIR}/third_party/ant_neuro
147147
${CMAKE_CURRENT_SOURCE_DIR}/src/board_controller/ant_neuro/inc
148148
${CMAKE_CURRENT_SOURCE_DIR}/src/board_controller/enophone/inc
149-
${CMAKE_CURRENT_SOURCE_DIR}/third_party/SimpleBLE/simpleble/include
149+
${CMAKE_CURRENT_SOURCE_DIR}/third_party/SimpleBLE/simplecble/include
150150
${CMAKE_CURRENT_SOURCE_DIR}/src/board_controller/brainalive/inc
151151
${CMAKE_CURRENT_SOURCE_DIR}/src/board_controller/mentalab/inc
152152
${CMAKE_CURRENT_SOURCE_DIR}/src/board_controller/emotibit/inc

src/board_controller/inc/ble_lib_board.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include "board.h"
66
#include "board_controller.h"
77
#include "runtime_dll_loader.h"
8-
#include "simpleble_c/types.h"
8+
#include "simplecble/types.h"
99

1010

1111
class BLELibBoard : public Board
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
!docs-new/
2+
!simpleble/include/
3+
!dependencies/external/
4+
5+
docs-new/node_modules/
6+
docs-new/.next/
7+
docs-new/out/
8+
docs-new/_doxygen/
9+
10+
.env*.local
11+
.env.local
12+
13+
.vscode
14+
.idea
15+
**/*.swp
16+
**/*.swo
17+
18+
.DS_Store
19+
.DS_Store?
20+
._*
21+
.Spotlight-V100
22+
.Trashes
23+
ehthumbs.db
24+
Thumbs.db
25+
26+
.git
27+
.gitignore
28+
29+
**/Dockerfile*
30+
**/docker-compose*
31+
32+
**/*.log
33+
34+
**/.cache
35+
**/.parcel-cache
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: 'Build DBus'
2+
description: 'Clone and build DBus'
3+
4+
inputs:
5+
os:
6+
description: "Runner OS"
7+
default: ''
8+
required: true
9+
arch:
10+
description: "Platform architecture"
11+
default: ''
12+
required: true
13+
14+
runs:
15+
using: "composite"
16+
steps:
17+
- name: Install Dependencies
18+
shell: bash
19+
env:
20+
DEBIAN_FRONTEND: noninteractive
21+
run: |
22+
if [[ "${{ inputs.arch }}" == "x86" ]]; then
23+
sudo -H apt-get remove -y libexpat1-dev:i386
24+
else
25+
sudo -H apt-get remove -y libexpat1-dev
26+
fi
27+
28+
- name: Generate Hashes
29+
id: hashes
30+
shell: bash
31+
# NOTE: Pinning libexpat to 2.7.0 as the exact version is not important.
32+
# NOTE: Pinning DBus to 1.16.2 as the exact version is not important.
33+
run: |
34+
EXPAT_HASH=6d4ffe856df497ac2cae33537665c3fec7ec8a00
35+
DBUS_HASH=958bf9db2100553bcd2fe2a854e1ebb42e886054
36+
COMBINED_HASH="$EXPAT_HASH-$DBUS_HASH"
37+
echo "expat_hash=$EXPAT_HASH" >> $GITHUB_OUTPUT
38+
echo "dbus_hash=$DBUS_HASH" >> $GITHUB_OUTPUT
39+
echo "combined_hash=$COMBINED_HASH" >> $GITHUB_OUTPUT
40+
41+
- name: Cache Linux Dependencies
42+
id: cache-simpleble-linux-deps
43+
uses: actions/cache@v4
44+
with:
45+
path: /tmp/install
46+
key: expat-dbus-${{ inputs.os }}-${{ inputs.arch }}-${{ steps.hashes.outputs.combined_hash }}
47+
48+
- name: Build Expat
49+
if: steps.cache-simpleble-linux-deps.outputs.cache-hit != 'true'
50+
shell: bash
51+
run: |
52+
if [[ -d "/tmp/expat" ]]; then
53+
echo "/tmp/expat already exists, skipping clone and build."
54+
exit 0
55+
fi
56+
git clone https://github.com/libexpat/libexpat.git /tmp/expat
57+
cd /tmp/expat/expat
58+
git checkout ${{ steps.hashes.outputs.expat_hash }}
59+
cmake -B build -DEXPAT_BUILD_DOCS=OFF -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF
60+
cmake --build build --config Release --parallel 4
61+
cmake --install build --prefix /tmp/install
62+
63+
- name: Build DBus
64+
if: steps.cache-simpleble-linux-deps.outputs.cache-hit != 'true'
65+
shell: bash
66+
run: |
67+
if [[ -d "/tmp/dbus" ]]; then
68+
echo "/tmp/dbus already exists, skipping clone and build."
69+
exit 0
70+
fi
71+
git clone https://gitlab.freedesktop.org/dbus/dbus.git /tmp/dbus
72+
cd /tmp/dbus
73+
git checkout ${{ steps.hashes.outputs.dbus_hash }}
74+
cmake -B build -DDBUS_SESSION_SOCKET_DIR=/usr/local/var/run/dbus/system_bus_socket -DDBUS_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=/tmp/install -DCMAKE_PREFIX_PATH=/tmp/install
75+
cmake --build build --config Release --parallel 4
76+
cmake --install build --prefix /tmp/install
77+
78+
- name: Export Environment Variables
79+
shell: bash
80+
run: |
81+
echo "CMAKE_PREFIX_PATH=/tmp/install" >> $GITHUB_ENV

third_party/SimpleBLE/.github/actions/build-dbus/action.yml

Lines changed: 0 additions & 63 deletions
This file was deleted.

third_party/SimpleBLE/.github/actions/build-expat/action.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)