Commit graph

92 commits

Author SHA1 Message Date
Nick Bolton
a099276e4e refactor: Move Windows SendSAS call to new thread
Moving the SAS event wait and SendSAS call prevents blocking the main thread allowing for more responsive watchdog (e.g. faster restart Core client/server on session switch).
2025-03-12 12:18:32 -04:00
Nick Bolton
b9017de881 refactor: Use simpler lock_guard for Windows daemon set process config 2025-03-12 12:18:32 -04:00
Nick Bolton
3bcc1e11ed chore: Move Windows event constants to constants file 2025-03-12 12:18:32 -04:00
Nick Bolton
5b091dee56 refactor: Rename SAS IPC event name to be more specific 2025-03-12 12:18:32 -04:00
Nick Bolton
5eac984757 chore: Add mutex for process state management in MSWindowsWatchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
997d4a9473 chore: Move free functions to top of Windows watchdog source 2025-03-03 14:33:46 +00:00
Nick Bolton
0f11b61576 chore: Reduce complexity of outputLoop in Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
98aba612c0 chore: Improve loop stop log line in Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
b0547f6713 chore: Use ref to const for openProcessForKill arg in Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
40fefb9369 chore: Use string_view for MSWindowsWatchdog::setProcessConfig 2025-03-03 14:33:46 +00:00
Nick Bolton
d8d022e9fe chore: Scope constants in Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
84194cf5ef chore: Use default init instead of ctor init Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
cd5ba1382d chore: Clean up shutdownExistingProcesses (unused var and use if-init) in Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
c84b4e3f00 refactor: Reduce complexity of mainLoop in Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
be8029deb6 chore: Remove unused g_activeDesktop from Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
dbb9b3bf5a chore: Remove unused trimDesktopName from Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
32bf9aa02a chore: Use const auto instead of enum for kOutputBufferSize in Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
0891afdd63 chore: Use nullptr instead of NULL in Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
f7ab6aba58 chore: Remove unused includes from Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
74e8a63dcd chore: Remove unused getCommand from Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
475172597a chore: Remove unused m_ready from Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
8c30ed7a59 chore: Remove unused m_autoDetectCommand and ctor arg from Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
44f72a29e9 refactor: Use state machine for Windows daemon watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
f0c60f5ca9 chore: Improve logging for pipe readers in Windows watchdog 2025-02-28 17:58:16 +00:00
Nick Bolton
a99d408be1 chore: Improve logging related to Windows daemon start/stop/install/uninstall 2025-02-28 17:58:16 +00:00
Nick Bolton
19c41e2ac5 fix: Improve Windows daemon stop speed by using non-blocking pipes and shorter sleep times 2025-02-28 17:58:16 +00:00
Nick Bolton
5a7f6bd1c0 refactor: Remove old Windows TCP IPC implementation (replaced by Qt equivalent) 2025-02-28 17:58:16 +00:00
Nick Bolton
a3b0ec28fc refactor: Improve logging message for process backoff and reset failure count when no command is set 2025-02-28 17:58:16 +00:00
Nick Bolton
e07a2efbcc refactor: Implement Windows event loop in AppUtilWindows for graceful shutdown handling 2025-02-28 17:58:16 +00:00
Nick Bolton
e967944c1e fix: Strip line endings for Windows daemon file logging
Windows file logger and `OutputDebugString` already add new lines, so remove the ones added by the Core.
2025-02-28 17:58:16 +00:00
Nick Bolton
80cc323f5a refactor: Improve logging and error handling for SendSAS function in Windows watchdog 2025-02-28 17:58:16 +00:00
Nick Bolton
90e63e2e9e refactor: Exclude current process when killing existing process from Windows daemon 2025-02-28 17:58:16 +00:00
Nick Bolton
0d2d9f385d feat: Implement basic IPC connection between Daemon and GUI 2025-02-28 17:58:16 +00:00
Nick Bolton
e808eed413 refactor: Improve Windows daemon failure backoff for faster client restarts on first fail 2025-02-19 18:23:10 +00:00
Nick Bolton
c9a360a144 fix: Restore active desktop name check in Windows daemon
- Use `PIPE_NOWAIT` to skip empty stderr output on process output reading from Windows daemon watchdog
- Use `CreateProcess` result to determine when to call `CloseHandle` in Windows daemon watchdog
- Trim output from active desktop process in Windows daemon watchdog
- Improve error logging in Windows daemon watchdog
2025-02-19 18:23:10 +00:00
Nick Bolton
524c3b0e7b refactor: Change log level for active desktop query to debug 2025-02-11 13:06:51 +00:00
sithlord48
1085df54ed refactor: Reuse compliance
build files and documentation: MIT
  images / sources: GPL-2.0-only
  breeze icons: LGPL-2.0-only
  Microsoft MSM file, vc redist license
2025-01-27 17:05:47 -05:00
sithlord48
3991e0c1a1 refactor: use std::string in place of String
basedon: https://github.com/debauchee/barrier/pull/709
2025-01-08 00:11:34 +00:00
sithlord48
45a61310a4 build: rm CORE_BINARY_NAME define 2024-11-15 12:20:17 +00:00
sithlord48
2213f3f746 build:rm CLIENT_BINARY_NAME define 2024-11-15 12:20:17 +00:00
sithlord48
e52ce58541 build: rm SERVER_BINARY_NAME define 2024-11-15 12:20:17 +00:00
sithlord48
fb686ede21 refactor: remove desktop legacy 2024-10-30 20:04:55 +00:00
sithlord48
9b9ecb0d05 chore: Adjust Clang-format linter rules
120 Column Lines
 Block Indent for Bracket Align
 Custom Line Break Rules
 No Single Line Functions
2024-10-17 21:38:29 +01:00
Nick Bolton
6bb1bcad8c chore!: Relocate commercial code downstream 2024-10-01 14:39:05 +01:00
Nick Bolton
0220a481f2
Fix broken CI caused by renaming project to Deskflow (#7522)
* Bump CI

* Use 2 core arm runner

* Update ChangeLog

* Fixed filename `deskflowc.exe.manifest`

* Remove  .vscode/settings.json file

* Restore test values to make tests work (test values should not contain app name)

* Fixed syntax error in Windows watchdog

* Add `sonar-project.properties` file

* Change default core count

* Add default package prefix

* Default product name in CMake

* Tweak ChangeLog
2024-09-18 10:56:29 -04:00
enzious
9dc6377bd9
fix: windows build typos (#7521) 2024-09-18 11:09:56 +01:00
Chris Rizzitello
ed1217e9cc
Use Deskflow Name (#7519)
* Use Deskflow Name

* Remove business-oriented options from issue templates

* Remove business-oriented workflow

* Bump version to 3.0.0 (to avoid confusion with previously used version numbers 1.x & 2.x)

* Update readme to reflect new project name and goals

* Found some more "synergy" to rename

* Rename `synlib` to `app`

* Rename `syntool` to `deskflow-legacy`

* Rename `synwinhk` to `dfwhook`

* Rename dirs from synergy to deskflow

* Rename more "Synergy" files

* Rename app bundle ID

* Fixed copyright typo

* Rename only title in serial key dialog (to be moved downstream later)

* Preserve original serial key window for moving downstream

* Restore dialogs ready for moving downstream

* Rename `QDeskflowApplication` to `DeskflowApplication` (the Q is confusing)

* Restore Volker's original project name

* Fixed mimetype

* Fixed weird grammar

* Fixed (more) weird grammar

* Broken link, restoring (but we should move all links out of source)

* Broken link, restoring (but we should move all links out of source)

* Add write permission to valgrind-analysis.yml

* Restore AUR conflicts

* Apply Clang format

* Update ChangeLog

* Back out version change

---------

Co-authored-by: Nick Bolton <nick@symless.com>
2024-09-17 20:00:25 +01:00
Nick Bolton
321418fcf8
Improve handling of Qt-related warnings and errors (#7431)
* Load .env from app dir

* Use `OutputDebugStringA` on Windows

* Improved string manipulation in logger and better use of OutputDebugStringA

* Use noquote for path

* Apply TLS setting after activation

* Restart after activation

* Move skip debug message to correct place

* Only print settings path on create, not shown

* Merge common and global libs

* Reduce code duplication around constants, version, etc

* Simplify sprintf code

* Use snprintf

* Add error test menu

* Coverage for dotenv

* Coverage for Logger

* Add missing include

* Add init when no Git SHA

* Update ChangeLog

* Add spellings

* Set debugging on for release build

* Remove unused variable

* Remove bad comment

* Fixed copyright date

* Remove import

* Move URL const back to GUI

* Remove dead code and duplication

* Fixed/ignored lint warnings
2024-08-09 14:03:48 +01:00
Nick Bolton
9315b089c8
Improve UI design and reduce over-use of #ifdef (#7413)
* Rename `LicenseManager` to `License`

* Rename `LicenseManager` to `License`

* Move License class to gui lib

* Rename license related classes

* Refactor serial key parsing

* Don't fail fast on containers

* Move licensed product name from config to code

* Fixed formatting

* Update code coverage generator and fixed args

* WIP: Converting license to chrono

* WIP: Fixed compile errors, tests failing

* Fixed all serial key and license tests

* Disable verbose logging

* Add missing </p>

* Add missing include

* Revert code coverage config

* Handle parse errors

* Move more classes into the new gui lib and improve license/serial object ownership

* WIP: Fixing signal/slots in MainWindow

* Fixed slot for about to quit

* Rename manual slots to solve auto-connection warnings

* Fixed logging issue

* By default, don't close to tray

* Add .env support and furthe refactor license code, also fixed some copyright dates

* Remove test code

* Fixed memory error in .env parser and refactor more licensing display code

* Fixed color inconsistencies

* Fixed link colors and made log view expand

* Disable server components rather than hiding

* Reset years of blind UI layout fiddling

* Fixed clean Qt task

* Only show notice when time limited

* Fixed main window layout

* Show connected clients

* Set 15 spacing

* Auto connect on start

* More intentional screen size

* Fixed tests related to license

* Tests for expiry notifications

* Reorg tests and remove death test

* Update gtest

* Tests for dotenv parser

* Test command process

* What the heck is that doing there?

* Merge constants headers

* Fixed magic includes

* Remove helper function

* Remove comment

* Remove extern decl

* Update ChangeLog
2024-07-26 23:53:52 +01:00
Nick Bolton
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