Skip to content

Commit

Permalink
Merge pull request #91 from labstreaminglayer/cboulay/build_update
Browse files Browse the repository at this point in the history
Build Update -- Simpler Qt version management and new target Ubuntu jammy
  • Loading branch information
cboulay authored Dec 27, 2022
2 parents 2647f05 + d0d4a9a commit ab0de12
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 38 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/cppcmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ jobs:
fail-fast: false
matrix:
config:
- name: "ubuntu-22.04"
os: "ubuntu-latest"
- name: "ubuntu-20.04"
os: "ubuntu-20.04"
qt_ver: "6.3.0"
- name: "ubuntu-18.04"
os: "ubuntu-18.04"
qt_ver: "5.12.12"
Expand All @@ -40,7 +41,7 @@ jobs:
cmake_extra: "-T v142,host=x86"
arch: "amd64"
qt_arch: "win64_msvc2019_64"
qt_ver: "6.3.0"
qt_ver: "6.4.0"
- name: "windows-x86"
os: "windows-latest"
cmake_extra: "-T v142,host=x86 -A Win32"
Expand All @@ -49,7 +50,6 @@ jobs:
qt_ver: "5.15.2"
- name: "macOS-10"
os: "macos-10.15"
qt_ver: "6.3.0"
steps:
- uses: actions/checkout@v2

Expand All @@ -70,12 +70,25 @@ jobs:
if: startsWith(matrix.config.os, 'macos-')
run: brew install labstreaminglayer/tap/lsl

- name: Install Qt
- name: Install Qt (Window and Ubuntu bionic)
if: (matrix.config.os == 'windows-latest') || (matrix.config.os == 'ubuntu-18.04')
uses: jurplel/install-qt-action@v2.14.0
with:
version: ${{ matrix.config.qt_ver }}
arch: ${{ matrix.config.qt_arch }}

- name: Install Qt (Ubuntu focal)
if: matrix.config.os == 'ubuntu-20.04'
run: sudo apt install qtbase5-dev

- name: Install Qt (Ubuntu jammy)
if: matrix.config.os == 'ubuntu-latest'
run: sudo apt install qt6-base-dev freeglut3-dev

- name: Install Qt (MacOS)
if: startsWith(matrix.config.os, 'macos-')
run: brew install qt

- name: Configure CMake
run: |
cmake --version
Expand Down
22 changes: 8 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ project(LabRecorder
DESCRIPTION "Record and write LabStreamingLayer streams to an XDF file"
HOMEPAGE_URL "https://github.com/labstreaminglayer/App-LabRecorder/"
LANGUAGES C CXX
VERSION 1.16.2)
VERSION 1.16.3)

# Needed for customized MacOSXBundleInfo.plist.in
SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake" ${CMAKE_MODULE_PATH})
Expand Down Expand Up @@ -44,22 +44,15 @@ if (BUILD_GUI)
set(CMAKE_AUTOMOC ON) # The later version of this in LSLCMake is somehow not enough.
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
find_package(Qt6 COMPONENTS Core Widgets Network DBus)
if(NOT Qt6_FOUND)
# If we require 5.15 then we can use version-agnostic linking, but 5.15 not easily available on Ubuntu.
find_package(Qt5 COMPONENTS Core Widgets Network DBus REQUIRED)
add_executable(${PROJECT_NAME} MACOSX_BUNDLE)
set(LSLAPP_QT_VER Qt5)
else()
qt_add_executable(${PROJECT_NAME} MACOSX_BUNDLE MANUAL_FINALIZATION)
set(LSLAPP_QT_VER Qt)
endif()
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Widgets Network DBus)
endif(BUILD_GUI)

## Threads
find_package(Threads REQUIRED)

# Targets
add_executable(${PROJECT_NAME} MACOSX_BUNDLE)

## xdfwriter - stand alone library
add_subdirectory(xdfwriter)
Expand All @@ -79,9 +72,10 @@ if (BUILD_GUI)
target_link_libraries(${PROJECT_NAME}
PRIVATE
xdfwriter
${LSLAPP_QT_VER}::Widgets
${LSLAPP_QT_VER}::Network
${LSLAPP_QT_VER}::DBus
Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Widgets
Qt${QT_VERSION_MAJOR}::Network
Qt${QT_VERSION_MAJOR}::DBus
Threads::Threads
LSL::lsl
)
Expand Down
46 changes: 26 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,44 +11,50 @@ The file format used by the LabRecorder is XDF. This is an open general-purpose

# Getting LabRecorder

## Dependencies
The [releases page](https://github.com/labstreaminglayer/App-LabRecorder/releases) contains archives of past LabRecorder builds. Try downloading and running an archive that matches your platform.

For LabRecorder to work on your system, you might need to first install some dependencies.
If there are no archives matching your target platform, or the ones available don't run, then continue reading below. If the instructions don't help then please post an issue to the [repo's issues page](https://github.com/labstreaminglayer/App-LabRecorder/issues).

### MacOS
## Dependencies

In the near future it will be necessary to use [homebrew](https://brew.sh/) to manage LSL Apps and their dependencies:
* Install homebrew: `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`
For LabRecorder to work on your system, you might need to first install some dependencies, specifically liblsl and optionally Qt.

### Linux Ubuntu
### Windows

The Ubuntu releases do not typically ship with their dependencies so you will also have to download and install those:
* Download and install the latest [liblsl-{version}-bionic_amd64.deb from its release page](https://github.com/sccn/liblsl/releases)
* We hope to make this available via a package manager soon.
* You can install liblsl directly by double clicking on it, or with with `sudo dpkg -i {filename}.deb`
* See the bottom of the [lsl build env docs](https://labstreaminglayer.readthedocs.io/dev/build_env.html).
* For most cases, this will amount to `sudo apt-get install qtbase5-dev`

## Downloading LabRecorder
The Windows archives ship with all required dependencies. If you suspect you are missing a dependency, try running [Dependencies.exe](https://github.com/lucasg/Dependencies/releases) then navigating to the LabRecorder.exe. It's important to launch Dependencies.exe from the same environment that you would use to launch this application: if you launch this application by double-clicking the executable in Windows' finder then do the same on the Dependencies.exe icon; if you launch this application in a Terminal window, then use that same Terminal to launch Dependencies.

### MacOS

* `brew install labstreaminglayer/tap/labrecorder`
In the near future, many LSL Apps (especially LabRecorder) will not ship with their dependencies and will look for the dependencies to be installed on the system. The easiest way to manage the dependencies is by using [homebrew](https://brew.sh/):
* Install homebrew: `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`
* `brew install labstreaminglayer/tap/lsl`
* `brew install qt`

You can then install LabRecorder directly from homebrew: `brew install labrecorder`

* Run it with `open /usr/local/opt/labrecorder/LabRecorder/LabRecorder.app`
Run it with `open /usr/local/opt/labrecorder/LabRecorder/LabRecorder.app`

### Others
### Linux Ubuntu

Navigate to the [`releases` page](https://github.com/labstreaminglayer/App-LabRecorder/releases) and download the latest release for your platform.
The Ubuntu releases do not typically ship with their dependencies, so you must download and install those:
* Download, extract, and install the latest [liblsl-{version}-{target}_amd64.deb from its release page](https://github.com/sccn/liblsl/releases)
* We hope to make this available via a package manager soon.
* Quick ref Ubuntu 20.04: `curl -L https://github.com/sccn/liblsl/releases/download/v1.16.0/liblsl-1.16.0-bionic_amd64.deb -o liblsl.deb`
* Quick ref Ubuntu 22.04: `curl -L https://github.com/sccn/liblsl/releases/download/v1.16.0/liblsl-1.16.0-jammy_amd64.deb -o liblsl.deb`
* You can install liblsl directly by double-clicking on the deb, or with `sudo dpkg -i {filename}.deb` or `sudo apt install {filename}.deb`
* See the bottom of the [lsl build env docs](https://labstreaminglayer.readthedocs.io/dev/build_env.html).
* For most cases, this will amount to installing Qt and its dependencies:
* Ubuntu 18.xx or 20.xx: `sudo apt-get install build-essential qtbase5-dev libpugixml-dev`
* Ubuntu >= 22.04: `sudo apt-get install qt6-base-dev freeglut3-dev`

# Usage

The LabRecorder displays a list of currently present device streams under "Record from Streams". If you have turned on a device after you have already started the recorder, click the "Update" button to update the list (this takes ca. 2 seconds).
> For testing you can use a "dummy" device from the `lslexamples` found in the [liblsl release assets](https://github.com/sccn/liblsl/releases) (for example SendData<!--, SendStringMarkers, and SendDataSimple-->).
> For testing, you can use a "dummy" device from the `lslexamples` found in the [liblsl release assets](https://github.com/sccn/liblsl/releases) (for example SendData<!--, SendStringMarkers, and SendDataSimple-->).
If you cannot see streams that are provided on another computer, read the section Network Troubleshooting on the NetworkConnectivity page.

You can select which streams you want to record from and which not by checking the check boxes next to them.
You can select which streams you want to record from and which not by checking the checkboxes next to them.
> ![labrecorder-default.png](doc/labrecorder-default.png)
Note that if you have multiple streams with the same name and host, it is impossible to check only 1. If any is checked then they will all be recorded.
Expand Down

0 comments on commit ab0de12

Please sign in to comment.