Commit Graph

13 Commits

Author SHA1 Message Date
4e844bf307 Wayland support (port Red Hat libei and libportal impl) (#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 610cebb5b6a08282eee68f4424fcdbe9eaab4bf9.

* 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 92c8a287b8376a4d166058c85f1d6081f6fdb423.

* 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 c926d78ba483406a55acd10fb157c39e13f90b71.

* 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 5bbc8fd689182447c79b81db16c961b98361a292.

* 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
2024-08-30 15:53:25 +01:00
13bf2dace4 Only add PR comments for internal PR (#7448)
* Add write permission for issues

* Add write permission to PRs

* Update ChangeLog

* Fixed ChangeLog version

* Correct ChangeLog

* Remove GITHUB_TOKEN input

* Revert "Remove GITHUB_TOKEN input"

This reverts commit e868a8d3f4b753f758b4b2bd25aef78e4d4d62d7.

* Use COMMENT_PAT for GITHUB_TOKEN

* Use default permissions

* Only use `sticky-pull-request-comment` for internal PRs

* Update ChangeLog
2024-08-23 10:38:17 +01:00
ce3f8869e7 Reduce GUI compile time by building a GUI library (#7412)
* Call ensure_in_venv before all imports

* Create `gui` lib and link to `synergy` and test bins

* Move GUI IPC code to GUI lib

* Improve `AppConfig` members and change `minimizeOnClose` to `closeToTray`

* Group getters and setters

* Add missing `m_CloseToTray` load

* Fixed lint issue

* Add TODO comment for main window integ test

* Remove redundant comments and add override

* Remove dead code

* Update ChangeLog

* Fixed activation related compile errors

* Disable concurrency cancel jobs

* Disable fail-fast for matrix
2024-07-23 20:17:40 +01:00
6f411e4ab8 Restore integtests and add to CI as warning comment on failure (#7404)
* Add coverage for both targets

* Use var for test bins

* Disable cmake-format comment fiddling

* Refactor GUI source config

* Use bin var for tests

* Remove unused member

* Add integration tests to CI

* Use modern cmake args

* Use max threads for build

* Use better var name for CPU core count

* Split build and configure steps

* Combine tests into action and add a PR comment

* Fixed yaml indentation in action

* Pass GITHUB_TOKEN

* Update coverage paths for SonarCloud

* Don't ignore return codes

* Add shell

* Run Valgrind on integ tests

* Use header for tests

* Save test results in table

* Move setup step outside of action

* Change logic of creating PR comment

* Remove header formatting

* Use emojis for simplicity

* Run build wrapper in build dir

* Use default make target

* Pass secrets

* Fixed SonarScanner warnings

* Don't allow unit tests to fail

* Fixed typo

* Update sonar scanner paths

* Fixed line endings

* Use step output

* Improve exclusion glob

* Exclude files from coverage

* Restore simpler pattern

* Set temp file path

* Coverage tests

* Re-create comment at start of job

* Append table header

* Add setup action

* Checkout before action

* Re-add projectBaseDir

* Restore original sonar scanner

* Use bash syntax for if

* Remove unused `shell`

* Add missing shell for valgrind action

* Restore new sonar scanner config

* Add missing shell

* Run only MainWindowTests

* Test with big change

* More changes

* Move to correct dir

* Remove test code

* Disable broken integ tests

* Switch coverage to front of filename

* Remove filter

* Refactor status step

* Disable segfault test

* Fixed: No status showing

* Add link to workflows

* Add test code for coverage

* Revert "Add test code for coverage"

This reverts commit c42309349b64f7828f2ca89149b30c5b0f93478a.

* Get workflow run URL

* Add missing shell

* Use dynamic URL in valgrind comment

* Revert "Revert "Add test code for coverage""

This reverts commit 9cff58b7ea5c581681ae6d6660c073bd76ba99aa.

* Test with commented out code

* Reintroduce 6 lines for coverage

* Test code to pass scanner

* Test code to pass scanner (take 2)

* Simplify to 2 new lines

* Add another line

* Trim changes to only 3 lines

* Add task for all tests

* Surface warning on failure

* Simplify build-wrapper step and move settings from web UI to CI

* Add missing line delims

* Also run tests action on Windows and macOS

* Add names to action steps

* Add timeout for test steps

* Add failure warning for integ tests

* Remove space

* Disable failing test on macOS

* Disable problem matcher

* Simplify names

* Disable freezing test on Windows

* Disable failing integ test on Windows

* Add build-kill task

* Ignore kill result on Windows

* Delete test code

* Update ChangeLog

* Move timeout to workflow step
2024-07-18 17:51:06 +01:00
6399feb324 Solve low hanging reliability and maintainability issues (#7403)
* Add missing atom ctor init

* Init members with `None`

* Use in-class init and delcare getter inside if init

* Temp revert of changes ahead of unit test repair

* Move IPC header to shared, restore X clipboard test, simplify test cmake, new X clipboard unit test

* Suppress sonar for undefs

* Remove base dir include

* Revert "Temp revert of changes ahead of unit test repair"

This reverts commit 8f84b6ea5d5828f1be1362de3809279bcacb8cc8.

* Use new accessor

* Use default dtor

* Beef up to 32 core

* Use enum class

* Make IPC protocol headers const at all levels

* Use enum class and const char for better type safety

* Use unique_ptr for m_clipboard

* Use `-j` instead of `-j8` to utilize full parallelism

* Increase thread count for sonar-scanner

* Use 32 threads

* Use in-class init for IpcClientProxy members

* Use const instead of #define

* Remove ctor member inits

* Use unique_ptr on win

* Implement temp bin dir for windows with more robust post-build copy

* Fixed missing iostream

* Add warning about copy errors

* Only run clean-gcda on Linux

* Use in-class init for IPC mutex

* Do no-op on Windows

* Hide clean-gcda task

* Move flakey test to integtests

* Delete dead code

* Test

* Temp disable post_config_all

* Disable post config step

* Revert "Disable post config step"

This reverts commit 2f956a7714ba9bedacd4b39d4ae00940c3d565d6.

* Revert "Temp disable post_config_all"

This reverts commit b44ed72e44f838bfe1309f6e9672d2f1c6f21b75.

* Restore -j8

* Simplify error handling

* Use const for test port

* Remove python check

* Update changelog

* Fixed order

* Fixed bad issue number

* Fixed bin copy source path

* Remove redundant except
2024-07-18 08:04:39 +01:00
47849db4d9 Run Valgrind on unit tests in CI to detect memory leaks (#7401)
* Move QApplication out of main to reduce memory impact when running individual tests

* Add --valgrind arg and colorize output when command returns non-zero exit code

* Fixed: colorama not always available

* Test multiple Qt tests

* Fixed: Windows Qt test failing due to missing QCoreApplication

* Simplify fake args for Qt

* Use --ci-env arg

* Create Valgrind analysis workflow

* Rename vars for fake args

* Parse and output valgrind summary

* Add build mode to comment

* Use GITHUB_OUTPUT to output summary

* Merge valgrind comment

* Improve comment

* Use `tee` instead of `--log-file` to also print stdout

* Improve comment about debug and release

* Simplify output writing in parse step

* Improve step name

* Correct comment about summaries

* Remove commented out code

* Better var name

* Missing copyright

* Rename global to shared

* Remove space

* Revert change to ConfigTests.cpp
2024-07-17 09:22:46 +01:00
50d29edd05 Solve SonarCloud security hotspots and bugs (#7383)
* Test: allocLockCursorToScreenInfo_withState_setsState

* Merge remote-tracking branch 'origin/master' into S1-1717-sonarcloud-issues

* Remove header wrappers for gmock/gtest

* Convenience wrapper script for tests

* Use `std::copy` instead of `strcpy`

* Use `std::ranges::copy` instead of `stdcpy`

* Delete dead code

* Add guitests VS Code config and test wrapper

* Revert "Delete dead code"

This reverts commit aa40f5cd35a22b4b69acfd1876aceea053088060.

* Build guitests with CMake

* Run all tests

* Don't use --gtest_filter for Qt tests

* Undo skip for GUI tests

* Coverage for `IpcClient::sendCommand`

* Remove provider and proxy

* Use lamda for StreamProvider to reduce boilerplate

* Restore version checker tests

* Remove activation souces

* Tasks for current/all tests

* Change command for tasks

* Mock QNetworkAccessManager

* Create core app to satisfy Qt assertations

* Use `std::copy` instead of `std::ranges::copy`

* Remove integtests

* Merge guitests into unittests

* Use std::string::length

* Remove include (resolves to root)

* Fix memory leaks

* Disable sigsegv tests

* Fixed formatting

* Remove guitests from CI

* New MainWindowTests

* Passing test for MainWindowTests

* Use alternative to strlen in MainWindow::checkSecureSocket

* Passing test for Log::print

* Fixed dtor call order

* Fixed var name typo

* Use proxy instead of `#define protected public`

* Add args test for log

* Add license ctor

* Fixed log test for release

* Add error log test

* Init qt with -platform offscreen

* Back-out initQt function

* Use QT_QPA_PLATFORM

* Try QT_QPA_PLATFORM=offscreen

* Use more readable env node

* Set QT_QPA_PLATFORM in CI and CodeQL

* Remove env not needed

* Modernize Log::print

* Calculate the length of the format string fmt during the initial scan loop

* More direct and efficient alterative to `strlen`

* Fixed major maint issues in AppConfig

* New clang and cmake rules

* Set `max_pargs_hwrap` to 4

* Undo clang format for now

* Fix missing `Setting::`

* Fixed missing `m_S` on Windows

* Re-add accidental dep resolution (fix later)

* Fixed missing buffer position increment

* Turn on errors

* Fixed tests and improve error message

* Fixed segfault on log refactor

* Extract log time to function

* Copyright date

* Update ChangeLog
2024-07-16 08:30:35 +00:00
481680d072 Run install_deps.py script when building containers weekly (#7384)
* Don't run CodeQL in PR draft

* Speed up analysis workflows

* Run install deps on Debian

* Add badge to readme

* Fixed copy and use workdir

* Use mount instead of copy

* Fixed unwanted && and changed workdir

* Split deps and deps-full

* Fixed context

* Use /app dir

* Use copy instead

* Revert to --mount and use .py (not .sh)

* Test

* Add `./scripts/install_deps.py` to all platforms

* Add missing syntax

* Fixed Python dep for OpenSUSE

* Temp remove WORKDIR for OpenSUSE

* Re-add workdir

* Increase timeout

* Delete `zypper --non-interactive remove busybox-which`

* Restore python3

* Test

* Rename to `lint-source-code`

* Beef up analysis runners

* Fixed workflow runs-on

* Use deps script

* Try pipx for gcovr

* Use containers with deps

* Add -y arg

* Install curl

* Merge deps step

* Add unzip dep

* Make Git dir safe

* Add .local/bin to env

* Improve step name

* Use `pipx ensurepath`

* Install gcovr with apt

* Use Ubuntu 22 with pip

* Update ChangeLog

* Use 16-core for Windows

* Use choco cache

* Test

* Use 8-core for Windows (picked up quicker, more available?)
2024-07-11 15:26:38 +01:00
e9557b8c19 Improve workflow triggers to ensure correct run time (#7378)
* Improve workflow triggers to ensure correct run time

* Update ChangeLog
2024-07-09 18:50:54 +01:00
4690b61551 Simplify compile options and use comprehensive edition logic (#7365)
* Simplify options

* Use more sensible edition logic

* Use set instead of option for string

* Improve macro for product name

* Add tests launch config

* Restore unregistered state

* Reorganize cases for title and improve function name

* Code coverage on by default

* Fixed copyright

* Improve code coverage and test readability

* Separate build-all and build-coverage

* Back out coverage on by default

* Fixed bad var in cmake

* More verbose logging for coverage

* Restore tasks

* Restore preLaunchTask

* Use default comparitor

* Move temp files to temp dir

* Add tasks for tests

* Support for wstring

* Upgrade sonar-scanner to 6 on Debian 12

* Use modern pip install

* Install python for sonarcloud

* Use Ubuntu and install deps

* Fixed sonar-scanner URL

* Fix exported dir

* Persist build dir

* Don't use venv for pip install gcovr

* Fixed another path

* Update actions/checkout to v4 for SonarCloud analysis workflow

* Add coverage task

* Improve coverage for SerialKeyEdition.cpp

* Enable licensing for builds

* Fixed invalid macro names, missing arguments, etc

* Fixed more copyright

* Fixed incorrect use of "enterprise"

* Fixed incorrect use of "business"

* Experiment with environment

* Make package prefix variable

* Add environment matrix to all OS

* Improve job names

* Make job names easier to read

* Roll back environment matrix (too much noise)

* Fixed: default should override required

* Refactor CI with vars

* Fixed arg for env.get_env
2024-07-04 10:14:54 +01:00
865063b77c Re-implement packaging for GitHub workflows (macOS) (#7353)
* Restore Azure macOS dist scripts

* Move steps to workflow for testing

* Always upload to GitHub

* Add codesign ID

* Echo codesign ID

* Add cert import code

* Stub file for Mac

* Self-install pyyaml and choco

* Auto add env var on Windows

* Auto add CMAKE_PREFIX_PATH to .zshrc

* Shorter var names

* Append env var instead of replace

* Only set env var if not CI

* Improve function names and print output

* Simplify Linux package command

* Support continuation sequence

* Add note about Windows

* Remove dead doc file

* Tidy up version file and move to .env format

* Use Python venv for deps

* Only use venv on Mac

* Rename package script for all OS

* Add package and dist steps, and use common upload

* Remove version source

* Fixed vars not available

* Fixed python paths

* Use RuntimeError which is sufficient

* Remove dead code

* Add extras command for Linux

* Always install deps on Linux

* Move Python deps to CI

* More env bootstrapping, ugh

* Forgot to return!

* Simplify code

* Use shell

* Simplify command

* Skip sudo if no sudo

* Update package managers

* Fixed Fedora package name

* Tidy up commands

* Use newer upload artifact

* Strip don't trim!

* Check for version file and reduce log verbosity

* Remove CentOS 7.6

* Print more info about return code and log more to stderr

* Install certificate on macOS

* Better errors for no env var

* Implement Mac signing and notary

* Move dmgbuild load

* Simplify notary

* Rename dist files to same as dest

* Fixed paths for dist

* Move checked-in dist files to res (dist is meant to be a temp dir)

* Fixed Mac path in CMake

* Fixed dmg path

* Format Python

* Ignore import warnings and move function

* Fixed cmake paths

* Add missing env var secrets

* Remove extensions from GH upload

* Make deps.yml general purpose config

* Add cspell config

* Pass codesign ID

* Use new general config file

* Sign bundle on Mac

* Move imports to functions

* Escape chars in docs

* Fixed config key accessor

* Change module import order

* Move file to tmp dir in workflow dir

* Persist temp dir

* Add tmp dir to ignore

* Flush stdio before running process

* Trying quotes around env values

* Add codesigning certificate validation for Mac signing

* Revert "Trying quotes around env values"

This reverts commit 0dd741e8cd6fde21e69d4fb871e835a5f4fa1a23.

* Extract codesign verify

* Fixed version number

* Ignore .cache dir

* Fix macro name

* Package name with version number and arch

* Improve package function readability

* Change order of vars

* Testing upload to GDrive

* Add missing return code

* Use positional args and declare error

* Use machine instead of arch and remove build from filename

* Remove redundant build jobs

* Replace massively over-complicated `build_version.py` script

* Move version info to env module

* Use version info script

* Fixed: too many values to unpack

* Chmod version script

* Use shebang

* Don't check return code on Linux

* Fixed function name

* Convert to GitHub specific script

* Env vars must be after configure

* Fixed Windows env var command

* Remove && from deps command so it's not conditional

* Fixed position of set env

* Change order of env script

* Only upload when not draft

* Test

* Tweak config

* Fixed if condition

* Don't package in draft (Windows and Linux)
2024-06-24 09:36:30 +00:00
d0a4c3d7a0 Use deps script to make life easier for contribs (#7351)
* Use deps script to make life easier for contribs

* Make readme more developer friendly

* YAML file to describe Linux deps

* Silent fail for yaml module (Python 3.6+)

* Move Qt install to deps script

* Update readme to add Windows command

* Fixed Linux package name

* Simplify env vars for workflow

* Exclude scripts from SonarCloud

* Move all deps config to .yml file

* Fixed exclude glob

* Simplify quickstart

* Fixed macOS deps config key name

* Fixed bug in Linux config read

* Use backslash for consistency

* Change SonarCloud path to /build/

* Fixed dep name

* Exclude scripts in CMake coverage

* Move script coverage exclusion to online config

* Use try/except instead of checking return value

* Fixed comment typo
2024-06-14 15:32:47 +00:00
444b7d764e Repair macOS CI workflow ahead of combining all CI workflows (#7350)
* Test

* Fixed Mac image names

* Version lock to macOS 14

* Change name of Homebrew Qt package

* Use CMake to build

* Remove dep already installed

* Remove version source

* Remove env var not needed

* Add homebrew path to CMake presets

* Revert "Add homebrew path to CMake presets"

This reverts commit 6b1342cdc2f412cad3e840e51e3e018dd7470d21.

* Add Qt prefix to workflow

* Upgrade CodeQL analysis to v2

* Rename SonarCloud workflow for convention

* Delete test file

* Upgrade CodeQL analysis to v3
2024-06-11 11:48:15 +01:00