From ba4d8be58b9ab3a11a38a82c2d145c8f7a34af91 Mon Sep 17 00:00:00 2001 From: Chadwick Boulay Date: Mon, 26 Dec 2022 22:26:32 -0500 Subject: [PATCH 1/6] Try simpler Qt version management in CMakeLists.txt --- CMakeLists.txt | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cfd0a4a..ba39d61 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) @@ -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 ) From 22222eaa6debb4f877fbd86f46863120fa8bc4b7 Mon Sep 17 00:00:00 2001 From: Chadwick Boulay Date: Mon, 26 Dec 2022 22:51:52 -0500 Subject: [PATCH 2/6] Add ubuntu 22.04 to CI; Use OS' native-ish Qt for more compatible distribution. --- .github/workflows/cppcmake.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cppcmake.yml b/.github/workflows/cppcmake.yml index b2534e5..dc62b1c 100644 --- a/.github/workflows/cppcmake.yml +++ b/.github/workflows/cppcmake.yml @@ -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" @@ -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.*" - name: "windows-x86" os: "windows-latest" cmake_extra: "-T v142,host=x86 -A Win32" @@ -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 @@ -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-22.04' + 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 From fddd03d221c8c905948a72076e3f31b703fbb1cd Mon Sep 17 00:00:00 2001 From: Chadwick Boulay Date: Mon, 26 Dec 2022 22:57:17 -0500 Subject: [PATCH 3/6] Update build instructions. --- README.md | 46 ++++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index ef420ef..93b4aae 100644 --- a/README.md +++ b/README.md @@ -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). +> 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). 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. From f95f1c5b0292e26c8f1de185feefb28e0f889a0c Mon Sep 17 00:00:00 2001 From: Chadwick Boulay Date: Mon, 26 Dec 2022 22:58:11 -0500 Subject: [PATCH 4/6] Version bump for build update --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ba39d61..504d1a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}) From 7cab86a7be70693d74312e30a599dc9d21c0a85a Mon Sep 17 00:00:00 2001 From: Chadwick Boulay Date: Mon, 26 Dec 2022 23:01:23 -0500 Subject: [PATCH 5/6] Fixup Qt install for jammy on CI. --- .github/workflows/cppcmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cppcmake.yml b/.github/workflows/cppcmake.yml index dc62b1c..f1b7afd 100644 --- a/.github/workflows/cppcmake.yml +++ b/.github/workflows/cppcmake.yml @@ -82,7 +82,7 @@ jobs: run: sudo apt install qtbase5-dev - name: Install Qt (Ubuntu jammy) - if: matrix.config.os == 'ubuntu-22.04' + if: matrix.config.os == 'ubuntu-latest' run: sudo apt install qt6-base-dev freeglut3-dev - name: Install Qt (MacOS) From d0d4a9a6a1194edf96eeebae264b02b15a73843d Mon Sep 17 00:00:00 2001 From: Chadwick Boulay Date: Mon, 26 Dec 2022 23:08:33 -0500 Subject: [PATCH 6/6] Qt 6.4.0 not 6.4.* --- .github/workflows/cppcmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cppcmake.yml b/.github/workflows/cppcmake.yml index f1b7afd..e490eb6 100644 --- a/.github/workflows/cppcmake.yml +++ b/.github/workflows/cppcmake.yml @@ -41,7 +41,7 @@ jobs: cmake_extra: "-T v142,host=x86" arch: "amd64" qt_arch: "win64_msvc2019_64" - qt_ver: "6.4.*" + qt_ver: "6.4.0" - name: "windows-x86" os: "windows-latest" cmake_extra: "-T v142,host=x86 -A Win32"