Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Commit

Permalink
Wayland support (port Red Hat libei and libportal impl) (deskflow…
Browse files Browse the repository at this point in the history
…#7449)

* Add libei and libportal

* Port libei and libportal code by Peter Hutterer and Olivier Fourdan

* Add Peter Hutterer and Olivier Fourdan to important devs list

* Improve error handling for libei and libportal builds

* Checkout libportal  tags/0.7.1

* Hack out the gi-docgen clone

* Remove new submodules in favor of using ExternalProject_Add

* Remove submodule dirs

* Use ExternalProject_Add instead of submodules

* Fixed namespace

* Hack to work around type libportal causing type conflicts

* Add log helper functions

* Use original log functions

* Switch to FetchContent, use libportal a1530a9 (unreleased) and use camelCase member names for consistency

* Restore a few events (much more work required)

* Add TODOs for supporting multiple lib versions

* Revert "Switch to FetchContent, use libportal a1530a9 (unreleased) and use camelCase member names for consistency"

This reverts commit 610cebb.

* Simplify cmake config by removing builds for libei and libportal (will do this in `install_deps.py` instead)

* Remove submodules

* Remove .gitmodules

* Use meson to build subprojects

* Update copyright with Peter Hutterer's guidance

* Use meson for installing deps

* Fixed typo in tag name

* Remove submodules

* Remove old submodules

* Fixed libei name

* Defaults for pugixml and gtest depending on whether source exists in subprojects

* Ignore some subproject dirs

* Make deps OS-specific

* Move python deps to pyproject

* Only compile and install on Linux with Meson

* Revert "Move python deps to pyproject"

This reverts commit 92c8a28.

* Add ninja to brewfile

* Add python3-attr

* Restore original coverage config

* Add ninja for meson

* Include meson in same try-except

* Fixed ninja dep name

* Move libs to correct oS

* Fixed include for wintoast

* Disable docs for libportal

* More options for libei and libportal

* Fixed option for libei

* Use ninja directly to install

* Revert "Use ninja directly to install"

This reverts commit c926d78.

* Meson install verbose

* Prints stdout/stderr

* Remove `from None`

* Remove submodules that somehow crept back in?!

* Prepend sudo if exists

* Add libei deps for all distros

* Fixed Fedora package name

* Add more deps for other distros

* Add more libs (including pugixml)

* Fix lib name

* Drop -u from pacman

* Add vala to rhel

* Make libportal optional

* Make portal link optional

* Remove example code

* Always use system pugixml

* Disable interactive apt through install_deps.py

* Revert "Disable interactive apt through install_deps.py"

This reverts commit 5bbc8fd.

* Set DEBIAN_FRONTEND in workflows

* Set DEBIAN_FRONTEND in CodeQL workflow

* Add gtest dep

* Add bundled libei dep

* Add libei dep to Arch

* Use `googletest` on openSUSE

* Add gmock dep

* Remove gtest dep from openSUSE

* Add libei on Fedora

* Bundle libei for older Linux distros

* Disable libei dep for RPM

* Also bundle symlink to .so

* Use ${CMAKE_INSTALL_LIBDIR}

* Rename libei to fix openSUSE

* List installed files

* Add libei-devel to openSUSE

* Add googletest-devel to openSUSE

* Remove manual deps (probably resolved automatically)

* Remove googletest from openSUSE (doesn't provide google mock)

* Only add Portal* if libportal found

* WIP - Partial work on using old events system :'(

* Add deps install commands for subprojects

* Solved more compile issues related to events system, threads, etc

* Fixed bad config for adding x, ei, portal sources

* Remove redundant deps

* Remove (another) redundant dep

* Fixed pacman command

* Add Ubuntu and Linux Mint libei deps

* Fixed Ubuntu and Linux Mint libei deps aliases

* Only iterate subprojects if not None

* Add rhel, rocky, and alma for libei

* Make rhel-like deps same as fedora again

* Build libportal on rhel-like

* Re-enable meson rhel-like for libportal

* Remove dbus-python

* Make libportal optional (for rhel-like)

* Handle ei event queue results

* Re-introduce libportal

* Print libei and libportal versions

* Add ei/portal args and client screen

* Switch --use args to --no

* Don't build libei/libportal on older distros as it's pointless

* Make libei and libportal optional

* Add Debian 13 runner

* Make some packages optional

* Remove subprojects

* Improve comment

* Add comment for libportal

* Improve comment

* Add Debian 13 runner

* Make optional... optional

* Change continuation stripper to remove newline and continuation char

* Make command strip more uniform

* Fixed help var syntax

* Fixed libei linking

* Ensure `kHelpNoWayland` is always defined

* Improve help message

* Fixed Debian 13 runner name

* Include sstream and use const var

* Update ChangeLog

* Remove Wayland block

* Return new timer

* Make tray icon logging verbose

* Fixed arg parser for wayland args

* Fixed init of EI screen

* Fixed lint issues

* Update README to indicate Wayland support in GNOME 46

* Add missing word

* Fixed comment positions

* Automate CI env

* Tone down debug log messages

* Add missing comma

* Remove redundant log line
  • Loading branch information
nbolton authored Aug 30, 2024
1 parent 2b663a8 commit 4e844bf
Show file tree
Hide file tree
Showing 74 changed files with 3,334 additions and 513 deletions.
2 changes: 1 addition & 1 deletion .github/docker/archlinux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ RUN useradd -m build
WORKDIR /app

RUN --mount=type=bind,target=/app,rw \
./scripts/install_deps.py --ci-env && \
./scripts/install_deps.py && \
pacman -Scc --noconfirm
2 changes: 1 addition & 1 deletion .github/docker/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ RUN apt update && \
WORKDIR /app

RUN --mount=type=bind,target=/app,rw \
./scripts/install_deps.py --ci-env && \
./scripts/install_deps.py && \
apt clean
2 changes: 1 addition & 1 deletion .github/docker/fedora/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ RUN dnf upgrade -y && \
WORKDIR /app

RUN --mount=type=bind,target=/app,rw \
./scripts/install_deps.py --ci-env && \
./scripts/install_deps.py && \
dnf clean all
2 changes: 1 addition & 1 deletion .github/docker/opensuse/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ RUN zypper refresh && \
WORKDIR /app

RUN --mount=type=bind,target=/app,rw \
./scripts/install_deps.py --ci-env && \
./scripts/install_deps.py && \
zypper clean --all
6 changes: 6 additions & 0 deletions .github/workflows/build-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ jobs:

matrix:
os:
- name: debian-13-amd64
runs-on: ubuntu-latest
config-dir: debian
base-image: debian:trixie-slim
platform: amd64

- name: debian-12-amd64
runs-on: ubuntu-latest
config-dir: debian
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
key: ${{ runner.os }}-deps-${{ hashFiles('config.yaml') }}

- name: Install dependencies
run: python ./scripts/install_deps.py --ci-env
run: python ./scripts/install_deps.py

- name: Setup VC++ environment
uses: ilammy/msvc-dev-cmd@v1
Expand Down Expand Up @@ -156,7 +156,7 @@ jobs:
key: ${{ runner.os }}-deps-${{ hashFiles('config.yaml') }}

- name: Install dependencies
run: ./scripts/install_deps.py --ci-env
run: ./scripts/install_deps.py

- name: Configure
run: cmake -B build --preset=macos-release
Expand Down Expand Up @@ -199,17 +199,18 @@ jobs:
container: ${{ matrix.distro.container }}
timeout-minutes: 20

env:
# Prevent apt prompting for input.
DEBIAN_FRONTEND: noninteractive

strategy:
# Normally, we want to fail fast, but in this case we shouldn't since one distro may
# fail due to transient issues unrelated to the build.
fail-fast: false

matrix:
distro:
- name: debian-13-amd64
container: symless/synergy-core:debian-13-amd64
runs-on: ubuntu-latest
extra-packages: true

- name: debian-12-arm64
container: symless/synergy-core:debian-12-arm64
runs-on: ubuntu-24.04-8-core-arm64
Expand Down Expand Up @@ -272,7 +273,10 @@ jobs:
run: git config --global --add safe.directory $GITHUB_WORKSPACE

- name: Install dependencies
run: ./scripts/install_deps.py --ci-env
run: ./scripts/install_deps.py
env:
# Prevent apt prompting for input.
DEBIAN_FRONTEND: noninteractive

- name: Configure
run: cmake -B build --preset=linux-release
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ jobs:
run: git config --global --add safe.directory $GITHUB_WORKSPACE

- name: Install dependencies
run: ./scripts/install_deps.py --ci-env
run: ./scripts/install_deps.py
env:
# Prevent apt prompting for input.
DEBIAN_FRONTEND: noninteractive

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/sonarcloud-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@ jobs:

- name: Install dependencies
run: |
./scripts/install_deps.py --ci-env &&
./scripts/install_deps.py &&
apt install curl unzip -y &&
pip install gcovr
env:
# Prevent apt prompting for input.
DEBIAN_FRONTEND: noninteractive

- name: Install SonarScanner
run: |
Expand Down Expand Up @@ -102,8 +105,8 @@ jobs:
-Dsonar.projectKey=symless_synergy-core \
-Dsonar.sources=scripts,src/cmd,src/gui,src/lib \
-Dsonar.tests=src/test \
-Dsonar.exclusions=ext/**,build/** \
-Dsonar.coverage.exclusions=ext/**,scripts/**,src/test/** \
-Dsonar.exclusions=subprojects/**,build/** \
-Dsonar.coverage.exclusions=subprojects/**,scripts/**,src/test/** \
-Dsonar.cpd.exclusions=**/*Test*.cpp \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.coverageReportPaths=${{ steps.coverage-paths.outputs.csv }} \
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/valgrind-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ jobs:

- name: Install dependencies
run: |
./scripts/install_deps.py --ci-env &&
./scripts/install_deps.py &&
apt install valgrind -y
env:
# Prevent apt prompting for input.
DEBIAN_FRONTEND: noninteractive

- name: Configure
run: cmake -B build --preset=linux-release
Expand Down
9 changes: 0 additions & 9 deletions .gitmodules

This file was deleted.

1 change: 1 addition & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
brew 'make'
brew 'cmake'
brew 'openssl'
brew 'ninja'
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Enhancements:

- #7449 Wayland support (port Red Hat libei and libportal impl)
- #7448 Only add PR comments for internal PR
- #7445 Update `config.yaml` to support Linux Mint build target

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

This project contains the source code for _Synergy 1 Community Edition_ which is actively maintained, free to use, and does not require a license or serial key.

**Wayland support:** Wayland is supported (GNOME 46 is required).

![Synergy 1 Community Edition](https://github.com/user-attachments/assets/faf5bd69-336c-4bd0-ace3-e911f199d961)

To use the community edition, install the `synergy` package with your favorite package manager or build it yourself using the Developer Quick Start instructions below.
Expand Down Expand Up @@ -95,7 +97,7 @@ sudo dnf install synergy

*Arch, Manjaro, etc:*
```
sudo pacman -Syu synergy
sudo pacman -S synergy
```

*Repology:*
Expand Down
Loading

0 comments on commit 4e844bf

Please sign in to comment.