Compare commits
261 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 760e3b99b0 | |||
| 042abd699d | |||
| f6b1546f8b | |||
| 2cc19c9f1e | |||
| 329cf07275 | |||
| 99da66dbf7 | |||
| 3c6aa9999b | |||
| 19724e3b69 | |||
| b96619d726 | |||
| c9aaeaee2a | |||
| 1b6def23d8 | |||
| c1172ab8b5 | |||
| 12860646d2 | |||
| 869bd0e2aa | |||
| 71929e8332 | |||
| fe285dc192 | |||
| 67066c339e | |||
| 759ed684e3 | |||
| 611a3300ba | |||
| 64c104a5c2 | |||
| f9857e102a | |||
| 9dc76c1caf | |||
| 68f867b914 | |||
| dd77f79b17 | |||
| e555b63931 | |||
| b33eb0135d | |||
| f9d7c75492 | |||
| a532f655c1 | |||
| 82588a7fc9 | |||
| 1f2d169b0d | |||
| 1c99736c16 | |||
| 050cb649c2 | |||
| 5612e99f1d | |||
| a520e3b2e9 | |||
| 380f65954d | |||
| 0f6ec6c196 | |||
| 857326b274 | |||
| 5e8a6f0bcb | |||
| a960f2ff30 | |||
| 5c3e1f182c | |||
| 84e1e722c0 | |||
| 4200de66ee | |||
| be4e861604 | |||
| 8f5a4106d3 | |||
| 145e9ec926 | |||
| 05c050b81e | |||
| 403c4ad9b9 | |||
| f065979b3f | |||
| 933617d5b1 | |||
| adbaef7dfb | |||
| fdf6a5b8f3 | |||
| 028b71a833 | |||
| b2b2951fb7 | |||
| dbed37e9ba | |||
| 0d3768d838 | |||
| be2546c27b | |||
| 6459eb40df | |||
| 555cb6888f | |||
| a00230829c | |||
| 1df5ab0851 | |||
| 26cb66c1e5 | |||
| 348e26564f | |||
| 1ed394e3ef | |||
| 2cf4fc8d0a | |||
| d6ffcd37d7 | |||
| 046c15736b | |||
| 6980e86d6a | |||
| 973cc76927 | |||
| 86c8c66b6e | |||
| a5b2a4fab9 | |||
| e7eb324f16 | |||
| 1157bff34b | |||
| 3a242e7fc1 | |||
| fe179556ad | |||
| c7a427a94c | |||
| ed114252e2 | |||
| 34f949dc72 | |||
| 1763c82ccc | |||
| 6d8804f08f | |||
| ed7e29589b | |||
| 7641fe7549 | |||
| c63fd21c8e | |||
| 281b3b8d07 | |||
| d6fe8fa2d5 | |||
| ffa887838f | |||
| 49f38c6a8b | |||
| 7a2ceeedf4 | |||
| b25f083433 | |||
| c45d586bbf | |||
| d193af8cc8 | |||
| bb88bd8695 | |||
| 73dbe62e48 | |||
| 1163cb842c | |||
| 15db716f04 | |||
| 9f8f805888 | |||
| 119f23a085 | |||
| aca274e9ee | |||
| 50e7b3aadf | |||
| e5e53c02b5 | |||
| 938db301f0 | |||
| d8dfba6372 | |||
| 7f57d53494 | |||
| 5e61a2b5ce | |||
| 2da14c3da3 | |||
| cab33df72d | |||
| 35ee17f959 | |||
| 7fdb26f2ea | |||
| 3993449594 | |||
| f8ae8c5781 | |||
| 22dad7ac06 | |||
| db10f1c5a4 | |||
| 0c368f402b | |||
| 0e04364d17 | |||
| 3ff06b7d9a | |||
| c7da833f07 | |||
| 09c1bd1582 | |||
| d324dd1a93 | |||
| 889689bd8e | |||
| 844ebf5216 | |||
| ae9ca35448 | |||
| dac9539ad9 | |||
| b8e0415632 | |||
| 3598eb6a47 | |||
| 38722f7308 | |||
| 8d52facc0b | |||
| 61fcad2c14 | |||
| a84e91a3f2 | |||
| c2314ad893 | |||
| 1973005e98 | |||
| 00235ba189 | |||
| 495277c7c9 | |||
| a73057f3a7 | |||
| a0f06d907f | |||
| 3d8cf17d57 | |||
| ca418b3ba5 | |||
| 189053697b | |||
| e674d8b27c | |||
| 7682e17afe | |||
| 163ec18730 | |||
| d27fd22d8f | |||
| cbebaad3b8 | |||
| 16d35349d3 | |||
| f8d9de1f2e | |||
| 53d2c5e399 | |||
| 89ee932db3 | |||
| fb63b70e8d | |||
| 4a62e51d1d | |||
| 2dd0360dec | |||
| 9976caafab | |||
| 530bcad8a6 | |||
| 949913cd6e | |||
| 1855d33e1f | |||
| ccd40c2927 | |||
| 6851046c5a | |||
| 1a9316150d | |||
| b56dd3f387 | |||
| 2cbe2c65e8 | |||
| b8b7799a47 | |||
| 2b8e7fa6b2 | |||
| fdb5405e2c | |||
| 0c440843b0 | |||
| caf77fe342 | |||
| b432cbc145 | |||
| ce97817d45 | |||
| 2b4b6a8470 | |||
| 5c34d0edc5 | |||
| 049f8d718a | |||
| c693d258fd | |||
| b23e9f9b04 | |||
| a5bb310e94 | |||
| 7f3d661e31 | |||
| 6982ce824f | |||
| 0c5b7de554 | |||
| 2a54f57532 | |||
| f0e77c499b | |||
| fa78b957b5 | |||
| 60d5bb8378 | |||
| d8e2537d47 | |||
| 425d427fce | |||
| 8f972bf15e | |||
| c36074df9f | |||
| 5e347d8725 | |||
| ef734a869c | |||
| c942de81e7 | |||
| dfe6c82a5c | |||
| 97b11bf2da | |||
| 023c9509e0 | |||
| b1bac23dcb | |||
| 13750f4175 | |||
| 27579e4fae | |||
| cb4621cad7 | |||
| 2d682d9151 | |||
| 26417a2543 | |||
| 87e6521f65 | |||
| b151666f6b | |||
| d1e2865319 | |||
| 70c54d6cf7 | |||
| 62a73996b9 | |||
| 75a1ab9719 | |||
| 6174043c7f | |||
| bfc65ebf6b | |||
| 53441821e0 | |||
| f012cf2e4b | |||
| c73923947a | |||
| a6daff59f6 | |||
| dc76366a48 | |||
| 9b40bf2f9b | |||
| ea0222b1e6 | |||
| 78234f60c4 | |||
| 7d07222832 | |||
| e5513101a6 | |||
| df78f0757e | |||
| 8e8ab25fd0 | |||
| b4e4277e08 | |||
| 13219ca49c | |||
| 0446db93e6 | |||
| a37d30c6ab | |||
| a78702d68f | |||
| 7831ba293a | |||
| a01a6b0b89 | |||
| c1b5e125b0 | |||
| accb9d9c59 | |||
| 11fa5d636e | |||
| cca6f80cb5 | |||
| 1ebcab60e2 | |||
| 2485916ad1 | |||
| 5287c51957 | |||
| 695dc04c00 | |||
| fd94403a73 | |||
| d35716f574 | |||
| b6bc9202db | |||
| 4cb184989c | |||
| ff02285a6a | |||
| 1a6f81a34b | |||
| 2dfba73cfb | |||
| 52e0daba0f | |||
| 2f5166fafa | |||
| 274fae1e31 | |||
| 7e278b6210 | |||
| 5736566a79 | |||
| bd4db268f1 | |||
| c13421c20a | |||
| 0d5d66b880 | |||
| ad01e296dc | |||
| 4698326717 | |||
| 2087097415 | |||
| 94eaa79768 | |||
| 6f10cd269e | |||
| c4a2dfd300 | |||
| 393c2fa9bc | |||
| 91b9680643 | |||
| 4216acdb3a | |||
| bc857a7cb4 | |||
| 2039106be2 | |||
| 18ed5faf99 | |||
| cdf9a5606d | |||
| 2166de2114 | |||
| 15b6da097c | |||
| 3b2d687bfd | |||
| dc4947af5c | |||
| 1e4d15c4b6 |
7
.github/CODEOWNERS
vendored
@ -1,2 +1,9 @@
|
||||
# Apply to all files
|
||||
* @nbolton @sithlord48
|
||||
|
||||
# Translators
|
||||
translations/deskflow_es.ts @sithlord48
|
||||
translations/deskflow_it.ts @sithlord48
|
||||
translations/deskflow_ja.ts @ykasap
|
||||
translations/deskflow_ru.ts @levpr1c
|
||||
translations/deskflow_zh_CN.ts @sailordiary
|
||||
|
||||
49
.github/actions/test-package/action.yml
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
name: "Test Package"
|
||||
description: "Installs the built package and verifies the installed binaries can run"
|
||||
|
||||
inputs:
|
||||
like:
|
||||
description: "Used only on linux distro type: debian, fedora, suse, arch"
|
||||
required: false
|
||||
default: ""
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
|
||||
steps:
|
||||
- name: Test package
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "$RUNNER_OS" == "macOS" ]; then
|
||||
dmg=$(ls build/deskflow-*.dmg | head -1)
|
||||
echo "Y" | hdiutil attach "$dmg" -nobrowse -mountpoint /tmp/deskflow-dmg
|
||||
/tmp/deskflow-dmg/Deskflow.app/Contents/MacOS/deskflow-core --version
|
||||
hdiutil detach /tmp/deskflow-dmg
|
||||
|
||||
elif [ "$RUNNER_OS" == "Windows" ]; then
|
||||
7z x build/deskflow-*-portable.7z -otmp/deskflow-pkg
|
||||
exe=$(find tmp/deskflow-pkg -name "deskflow-core.exe" -type f | head -1)
|
||||
exe_dir=$(dirname "$exe")
|
||||
pkg_root=$(dirname "$exe_dir")
|
||||
export PATH="$exe_dir:$pkg_root:$pkg_root/lib:$PATH"
|
||||
"$exe" --version
|
||||
|
||||
elif [ "$RUNNER_OS" == "Linux" ]; then
|
||||
if [ "${{inputs.like}}" == "debian" ]; then
|
||||
apt-get install -y ./build/deskflow-*.deb
|
||||
elif [ "${{inputs.like}}" == "fedora" ]; then
|
||||
dnf install -y build/deskflow-*.rpm
|
||||
elif [ "${{inputs.like}}" == "suse" ]; then
|
||||
zypper install -y --allow-unsigned-rpm build/deskflow-*.rpm
|
||||
elif [ "${{inputs.like}}" == "arch" ]; then
|
||||
pacman -U --noconfirm build/deskflow-*.pkg.tar.zst
|
||||
else
|
||||
echo "Unknown like: ${{inputs.like}}"
|
||||
exit 1
|
||||
fi
|
||||
deskflow-core --version
|
||||
|
||||
else
|
||||
echo "Unknown OS: $RUNNER_OS"
|
||||
exit 1
|
||||
fi
|
||||
2
.github/actions/test-summary/action.yml
vendored
@ -60,7 +60,7 @@ runs:
|
||||
|
||||
echo "$table" > $GITHUB_STEP_SUMMARY
|
||||
|
||||
count=$(echo "$table" | awk -v RS='' '{gsub(/[^❌]/, ""); print length}')
|
||||
count=$(echo "$table" | { grep -o '❌' || true; } | wc -l)
|
||||
|
||||
# Keep at this indentation level for heredoc.
|
||||
fail_summary=$(cat <<EOF
|
||||
|
||||
15
.github/pull_request_template.md
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
## Description
|
||||
<!--- Describe your what your changes do -->
|
||||
|
||||
## Disclosure of AI use
|
||||
<!--- Disclouse your use of AI Tools used to make this pr -->
|
||||
<!--- If any AI tools were used to crate the code let us know -->
|
||||
|
||||
## Related Issue
|
||||
<!--- If fixing an issue you must add a `fixes` line for each issues fixed-->
|
||||
<!--- Example, if fixing Issues #1234 you would add -->
|
||||
<!--- fixes: #1234 -->
|
||||
|
||||
## How Has This Been Tested?
|
||||
<!--- Please describe how you tested your changes -->
|
||||
<!--- Include details of your testing environment -->
|
||||
14
.github/workflows/ci-comment.yml
vendored
@ -18,12 +18,15 @@ on:
|
||||
jobs:
|
||||
summary:
|
||||
if: github.event.workflow_run.event == 'pull_request'
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-slim
|
||||
|
||||
steps:
|
||||
# If the workflow fails before uploading summaries, no artifacts exist and this step fails.
|
||||
# Allow failure so the "Delete PR comment" step still runs to clean up stale comments.
|
||||
- name: Download summaries
|
||||
id: download
|
||||
uses: actions/download-artifact@v4
|
||||
continue-on-error: true
|
||||
with:
|
||||
run-id: ${{ github.event.workflow_run.id }}
|
||||
pattern: summary-*
|
||||
@ -54,15 +57,16 @@ jobs:
|
||||
console.log("Found PR:", pr.number);
|
||||
return pr.number;
|
||||
} else {
|
||||
core.setFailed("PR not found");
|
||||
core.warning("PR not found for SHA (maybe removed by force push)");
|
||||
}
|
||||
|
||||
- name: Merge summaries
|
||||
if: steps.get-pr-number.outputs.result
|
||||
id: summary
|
||||
run: |
|
||||
ls -R
|
||||
|
||||
files=$(find $dir -type f)
|
||||
files=$(find summaries -type f 2>/dev/null || true)
|
||||
if [ -z "$files" ]; then
|
||||
echo "No files found in dir: $dir"
|
||||
exit 0
|
||||
@ -85,7 +89,7 @@ jobs:
|
||||
} >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Set PR comment
|
||||
if: steps.summary.outputs.message
|
||||
if: steps.get-pr-number.outputs.result && steps.summary.outputs.message
|
||||
uses: marocchino/sticky-pull-request-comment@v2
|
||||
with:
|
||||
number: ${{ steps.get-pr-number.outputs.result }}
|
||||
@ -93,7 +97,7 @@ jobs:
|
||||
message: ${{ steps.summary.outputs.message }}
|
||||
|
||||
- name: Delete PR comment
|
||||
if: ${{ !steps.summary.outputs.message }}
|
||||
if: ${{ steps.get-pr-number.outputs.result && !steps.summary.outputs.message }}
|
||||
uses: marocchino/sticky-pull-request-comment@v2
|
||||
with:
|
||||
number: ${{ steps.get-pr-number.outputs.result }}
|
||||
|
||||
12
.github/workflows/codeql-analysis.yml
vendored
@ -22,6 +22,10 @@ on:
|
||||
- '!src/res/**'
|
||||
- '!src/unittests/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
codeql:
|
||||
runs-on: ubuntu-latest
|
||||
@ -35,7 +39,7 @@ jobs:
|
||||
apt install -qqq git > /dev/null
|
||||
|
||||
- name: Fancy Checkout
|
||||
uses: sithlord48/fancy-checkout@v1
|
||||
uses: sithlord48/fancy-checkout@v2
|
||||
|
||||
- name: Install dependencies
|
||||
uses: ./.github/actions/install-dependencies
|
||||
@ -43,12 +47,12 @@ jobs:
|
||||
like: "debian"
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
uses: github/codeql-action/init@v4
|
||||
with:
|
||||
languages: cpp
|
||||
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v3
|
||||
uses: github/codeql-action/autobuild@v4
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
uses: github/codeql-action/analyze@v4
|
||||
|
||||
120
.github/workflows/continuous-integration.yml
vendored
@ -11,6 +11,10 @@ on:
|
||||
- "v*"
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
GIT_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||
PACKAGE_PREFIX: "deskflow"
|
||||
@ -21,10 +25,17 @@ jobs:
|
||||
# Quality gate to allow PR merge, used in the branch protection rules.
|
||||
ci-passed:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [test-results, unix, flatpak]
|
||||
needs: [main-build, test-results, unix, flatpak]
|
||||
if: always()
|
||||
|
||||
steps:
|
||||
- run: echo "✅ CI passed" > $GITHUB_STEP_SUMMARY
|
||||
- name: Check all steps passed
|
||||
run: |
|
||||
if [[ ${{needs.main-build.result}} == 'success' && ${{needs.test-results.result}} == 'success' && ${{needs.unix.result}} == 'success' && ${{needs.flatpak.result}} == 'success' ]]; then
|
||||
echo "✅ CI passed" > $GITHUB_STEP_SUMMARY
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Summary of test results, combined from test result artifacts.
|
||||
# Runs even if the tests fail to provide a summary of the failures.
|
||||
@ -32,7 +43,7 @@ jobs:
|
||||
needs: main-build
|
||||
if: always() && needs.main-build.result != 'skipped'
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-slim
|
||||
timeout-minutes: 5
|
||||
|
||||
steps:
|
||||
@ -54,7 +65,7 @@ jobs:
|
||||
|
||||
lint-clang:
|
||||
needs: [lint-reuse]
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-slim
|
||||
timeout-minutes: 5
|
||||
|
||||
steps:
|
||||
@ -88,6 +99,7 @@ jobs:
|
||||
config-args: "-G Ninja"
|
||||
vcpkg-triplet: x64-windows-release
|
||||
arch: "amd64"
|
||||
qt-version: 6.10.1
|
||||
|
||||
- name: "windows-2022-arm64"
|
||||
runs-on: "windows-11-arm"
|
||||
@ -95,42 +107,45 @@ jobs:
|
||||
config-args: "-G Ninja"
|
||||
vcpkg-triplet: arm64-windows
|
||||
arch: "arm64"
|
||||
qt-version: 6.10.1
|
||||
|
||||
- name: "macos-arm64"
|
||||
runs-on: macos-15
|
||||
timeout: 10
|
||||
qt-version: 6.10.1
|
||||
config-args: '-DCMAKE_OSX_ARCHITECTURES="arm64" -DCMAKE_OSX_DEPLOYMENT_TARGET=14 -DCMAKE_OSX_SYSROOT=/Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk'
|
||||
|
||||
- name: "macos-x64"
|
||||
runs-on: macos-15-intel
|
||||
timeout: 20
|
||||
qt-version: 6.9.3
|
||||
config-args: '-DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET=12 -DCMAKE_OSX_SYSROOT=/Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk'
|
||||
|
||||
- name: "debian-13-x86_64"
|
||||
- name: "debian-x86_64"
|
||||
runs-on: ubuntu-latest
|
||||
container: debian:trixie-slim
|
||||
container: debian:stable-slim
|
||||
like: "debian"
|
||||
timeout: 20
|
||||
config-args: "-G Ninja -DCMAKE_INSTALL_PREFIX=/usr"
|
||||
|
||||
- name: "debian-13-arm64"
|
||||
- name: "debian-arm64"
|
||||
runs-on: ubuntu-24.04-arm
|
||||
container: debian:trixie-slim
|
||||
container: debian:stable-slim
|
||||
like: "debian"
|
||||
timeout: 20
|
||||
config-args: "-G Ninja -DCMAKE_INSTALL_PREFIX=/usr"
|
||||
|
||||
- name: "fedora-43-x86_64"
|
||||
- name: "debian-testing-x86_64"
|
||||
runs-on: ubuntu-latest
|
||||
container: fedora:43
|
||||
like: "fedora"
|
||||
container: debian:testing-slim
|
||||
like: "debian"
|
||||
timeout: 20
|
||||
config-args: "-G Ninja -DCMAKE_INSTALL_PREFIX=/usr"
|
||||
|
||||
- name: "fedora-43-arm64"
|
||||
- name: "debian-testing-arm64"
|
||||
runs-on: ubuntu-24.04-arm
|
||||
container: fedora:43
|
||||
like: "fedora"
|
||||
container: debian:testing-slim
|
||||
like: "debian"
|
||||
timeout: 20
|
||||
config-args: "-G Ninja -DCMAKE_INSTALL_PREFIX=/usr"
|
||||
|
||||
@ -148,16 +163,16 @@ jobs:
|
||||
timeout: 20
|
||||
config-args: "-G Ninja -DCMAKE_INSTALL_PREFIX=/usr"
|
||||
|
||||
- name: "fedora-41-x86_64"
|
||||
- name: "fedora-43-x86_64"
|
||||
runs-on: ubuntu-latest
|
||||
container: fedora:41
|
||||
container: fedora:43
|
||||
like: "fedora"
|
||||
timeout: 20
|
||||
config-args: "-G Ninja -DCMAKE_INSTALL_PREFIX=/usr"
|
||||
|
||||
- name: "fedora-41-arm64"
|
||||
- name: "fedora-43-arm64"
|
||||
runs-on: ubuntu-24.04-arm
|
||||
container: fedora:41
|
||||
container: fedora:43
|
||||
like: "fedora"
|
||||
timeout: 20
|
||||
config-args: "-G Ninja -DCMAKE_INSTALL_PREFIX=/usr"
|
||||
@ -183,20 +198,6 @@ jobs:
|
||||
timeout: 20
|
||||
config-args: "-G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_DEV_DOCS=ON"
|
||||
|
||||
- name: "ubuntu-25.04-x86_64"
|
||||
runs-on: ubuntu-latest
|
||||
container: ubuntu:25.04
|
||||
like: "debian"
|
||||
timeout: 20
|
||||
config-args: "-G Ninja -DCMAKE_INSTALL_PREFIX=/usr"
|
||||
|
||||
- name: "ubuntu-25.04-arm64"
|
||||
runs-on: ubuntu-24.04-arm
|
||||
container: ubuntu:25.04
|
||||
like: "debian"
|
||||
timeout: 20
|
||||
config-args: "-G Ninja -DCMAKE_INSTALL_PREFIX=/usr"
|
||||
|
||||
- name: "ubuntu-25.10-x86_64"
|
||||
runs-on: ubuntu-latest
|
||||
container: ubuntu:25.10
|
||||
@ -211,6 +212,20 @@ jobs:
|
||||
timeout: 20
|
||||
config-args: "-G Ninja -DCMAKE_INSTALL_PREFIX=/usr"
|
||||
|
||||
- name: "ubuntu-26.04-x86_64"
|
||||
runs-on: ubuntu-latest
|
||||
container: ubuntu:26.04
|
||||
like: "debian"
|
||||
timeout: 20
|
||||
config-args: "-G Ninja -DCMAKE_INSTALL_PREFIX=/usr"
|
||||
|
||||
- name: "ubuntu-26.04-arm64"
|
||||
runs-on: ubuntu-24.04-arm
|
||||
container: ubuntu:26.04
|
||||
like: "debian"
|
||||
timeout: 20
|
||||
config-args: "-G Ninja -DCMAKE_INSTALL_PREFIX=/usr"
|
||||
|
||||
steps:
|
||||
# Make sure the container has git before we do anything else
|
||||
- name: Install Git on Container
|
||||
@ -232,7 +247,7 @@ jobs:
|
||||
# Fancy checkout gets all the tags
|
||||
# it also makes sure we can use git --describe correctly
|
||||
- name: Fancy Checkout
|
||||
uses: sithlord48/fancy-checkout@v1
|
||||
uses: sithlord48/fancy-checkout@v2
|
||||
|
||||
# This effectively runs `vcvarsall.bat`, etc. It's not actually installing
|
||||
# VC++ as that's already pre-installed on the Windows runner.
|
||||
@ -246,7 +261,7 @@ jobs:
|
||||
id: get-deps
|
||||
uses: ./.github/actions/install-dependencies
|
||||
with:
|
||||
qt-version: 6.10.0
|
||||
qt-version: ${{matrix.target.qt-version}}
|
||||
vcpkg-triplet: ${{matrix.target.vcpkg-triplet}}
|
||||
like: ${{ matrix.target.like }}
|
||||
|
||||
@ -273,12 +288,25 @@ jobs:
|
||||
cd ..
|
||||
fi
|
||||
|
||||
- name: Check for unexpected repo changes
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ `git status --porcelain` ]]; then
|
||||
echo "Unexpected changes to the repo, Often caused by forgetting to commit the updated translation files"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Tests
|
||||
uses: ./.github/actions/run-tests
|
||||
timeout-minutes: 2
|
||||
with:
|
||||
job: ${{ matrix.target.name }}
|
||||
|
||||
- name: Test package
|
||||
uses: ./.github/actions/test-package
|
||||
with:
|
||||
like: ${{ matrix.target.like }}
|
||||
|
||||
- name: Update Development Documentation
|
||||
if: matrix.target.like == 'arch' && github.ref == 'refs/heads/master'
|
||||
uses: JamesIves/github-pages-deploy-action@v4.7.3
|
||||
@ -310,7 +338,7 @@ jobs:
|
||||
# Fancy checkout gets all the tags
|
||||
# it also makes sure we can use git --describe correctly
|
||||
- name: Fancy Checkout
|
||||
uses: sithlord48/fancy-checkout@v1
|
||||
uses: sithlord48/fancy-checkout@v2
|
||||
- name: Build on FreeBSD
|
||||
if: ${{ matrix.distro.name == 'freebsd' }}
|
||||
uses: vmactions/freebsd-vm@v1
|
||||
@ -318,8 +346,8 @@ jobs:
|
||||
usesh: true
|
||||
run: |
|
||||
pkg install -y cmake ninja gmake gcc12 openssl glib \
|
||||
libX11 libXtst libxkbfile qt6-base qt6-tools gtk3 googletest \
|
||||
tomlplusplus cli11 pkgconf libei libportal
|
||||
libX11 libXtst libxkbfile qt6-base qt6-tools gtk3 \
|
||||
googletest pkgconf libei libportal
|
||||
${{env.CMAKE_CONFIGURE}} -G Ninja
|
||||
cmake --build build -j16
|
||||
# Integration tests are flakey by nature, make them optional.
|
||||
@ -331,7 +359,7 @@ jobs:
|
||||
runs-on: ${{matrix.flatpak.runs-on}}
|
||||
timeout-minutes: 60
|
||||
container:
|
||||
image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.8
|
||||
image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.10
|
||||
options: --privileged
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@ -343,7 +371,7 @@ jobs:
|
||||
arch: aarch64
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: sithlord48/fancy-checkout@v1
|
||||
uses: sithlord48/fancy-checkout@v2
|
||||
|
||||
- run: git config --global protocol.file.allow always
|
||||
|
||||
@ -381,7 +409,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Fancy Checkout
|
||||
uses: sithlord48/fancy-checkout@v1
|
||||
uses: sithlord48/fancy-checkout@v2
|
||||
|
||||
- name: Get version
|
||||
uses: ./.github/actions/get-version
|
||||
@ -420,13 +448,23 @@ jobs:
|
||||
deskflow-*
|
||||
sums.txt
|
||||
|
||||
- name: Update Homebrewtap
|
||||
shell: bash
|
||||
run: |
|
||||
curl -L -X POST \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
-H "Authorization: Bearer ${{ secrets.DF_TAP_TOKEN }}" \
|
||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||
https://api.github.com/repos/deskflow/homebrew-tap/dispatches \
|
||||
-d '{"event_type":"update_tap"}'
|
||||
|
||||
winget-publish:
|
||||
needs: release
|
||||
if: contains(github.ref, 'tags/v')
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Fancy Checkout
|
||||
uses: sithlord48/fancy-checkout@v1
|
||||
uses: sithlord48/fancy-checkout@v2
|
||||
|
||||
- name: Get version
|
||||
uses: ./.github/actions/get-version
|
||||
|
||||
2
.github/workflows/issue-check-stale.yml
vendored
@ -5,7 +5,7 @@ on:
|
||||
|
||||
jobs:
|
||||
stale-issues:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-slim
|
||||
timeout-minutes: 10
|
||||
|
||||
steps:
|
||||
|
||||
6
.github/workflows/sonarcloud-analysis.yml
vendored
@ -23,6 +23,10 @@ on:
|
||||
- '!src/res/**'
|
||||
- '!src/unittests/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
sonar:
|
||||
# This job would fail for contributors who open PRs as the workflow runs outside of our repo
|
||||
@ -43,7 +47,7 @@ jobs:
|
||||
apt install -qqq git curl unzip gcovr > /dev/null
|
||||
|
||||
- name: Fancy Checkout
|
||||
uses: sithlord48/fancy-checkout@v1
|
||||
uses: sithlord48/fancy-checkout@v2
|
||||
|
||||
- name: Install project dependencies
|
||||
uses: ./.github/actions/install-dependencies
|
||||
|
||||
2
.github/workflows/valgrind-analysis.yml
vendored
@ -17,7 +17,7 @@ jobs:
|
||||
apt install -qqq git valgrind > /dev/null
|
||||
|
||||
- name: Fancy Checkout
|
||||
uses: sithlord48/fancy-checkout@v1
|
||||
uses: sithlord48/fancy-checkout@v2
|
||||
|
||||
- name: Install dependencies
|
||||
uses: ./.github/actions/install-dependencies
|
||||
|
||||
4
.gitignore
vendored
@ -45,3 +45,7 @@ CMakeFiles/*
|
||||
|
||||
# scripts folder
|
||||
/scripts
|
||||
|
||||
# Ai helperfilers
|
||||
**/[cC]laude.[mM][dD]
|
||||
**/CLAUDE.[mM][dD]
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# SPDX-FileCopyrightText: 2024 - 2025 Deskflow Developers
|
||||
# SPDX-FileCopyrightText: 2012 - 2024 Symless Ltd
|
||||
# SPDX-FileCopyrightText: 2009 - 2012 Nick Bolton
|
||||
# SPDX-FileCopyrightText: (C) 2024 - 2026 Deskflow Developers
|
||||
# SPDX-FileCopyrightText: (C) 2012 - 2024 Symless Ltd
|
||||
# SPDX-FileCopyrightText: (C) 2009 - 2012 Nick Bolton
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
cmake_minimum_required(VERSION 3.24)
|
||||
@ -11,6 +11,11 @@ cmake_policy(SET CMP0003 NEW)
|
||||
# Fix define escaping
|
||||
cmake_policy(SET CMP0005 NEW)
|
||||
|
||||
# De-duplicate libraries on linker calls
|
||||
if(POLICY CMP0156)
|
||||
cmake_policy(SET CMP0156 NEW)
|
||||
endif()
|
||||
|
||||
# Set CXX Requirements
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
@ -18,7 +23,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
# Fallback for when git can not be found
|
||||
set(DESKFLOW_VERSION_MAJOR 1)
|
||||
set(DESKFLOW_VERSION_MINOR 25)
|
||||
set(DESKFLOW_VERSION_MINOR 26)
|
||||
set(DESKFLOW_VERSION_PATCH 0)
|
||||
set(DESKFLOW_VERSION_TWEAK 0)
|
||||
|
||||
@ -33,38 +38,28 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
|
||||
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} rev-list --tags --count
|
||||
COMMAND ${GIT_EXECUTABLE} describe --long --match v* --always
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
OUTPUT_VARIABLE GIT_TAG_COUNT
|
||||
OUTPUT_VARIABLE GITREV
|
||||
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
if(${GIT_TAG_COUNT} EQUAL 0)
|
||||
set(DESKFLOW_VERSION_TWEAK "9999")
|
||||
string(FIND "${GITREV}" "v" isRev)
|
||||
if(NOT ${isRev} EQUAL -1)
|
||||
string(REGEX MATCH [0-9]+ MAJOR ${GITREV})
|
||||
string(REGEX MATCH \\.[0-9]+ MINOR ${GITREV})
|
||||
string(REPLACE "." "" MINOR "${MINOR}")
|
||||
string(REGEX MATCH [0-9]+\- PATCH ${GITREV})
|
||||
string(REPLACE "-" "" PATCH "${PATCH}")
|
||||
string(REGEX MATCH \-[0-9]+\- TWEAK ${GITREV})
|
||||
string(REPLACE "-" "" TWEAK "${TWEAK}")
|
||||
set(DESKFLOW_VERSION_MAJOR ${MAJOR})
|
||||
set(DESKFLOW_VERSION_MINOR ${MINOR})
|
||||
set(DESKFLOW_VERSION_PATCH ${PATCH})
|
||||
set(DESKFLOW_VERSION_TWEAK ${TWEAK})
|
||||
else()
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} describe --long --match v* --always
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
OUTPUT_VARIABLE GITREV
|
||||
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
string(FIND "${GITREV}" "v" isRev)
|
||||
if(NOT ${isRev} EQUAL -1)
|
||||
string(REGEX MATCH [0-9]+ MAJOR ${GITREV})
|
||||
string(REGEX MATCH \\.[0-9]+ MINOR ${GITREV})
|
||||
string(REPLACE "." "" MINOR "${MINOR}")
|
||||
string(REGEX MATCH [0-9]+\- PATCH ${GITREV})
|
||||
string(REPLACE "-" "" PATCH "${PATCH}")
|
||||
string(REGEX MATCH \-[0-9]+\- TWEAK ${GITREV})
|
||||
string(REPLACE "-" "" TWEAK "${TWEAK}")
|
||||
set(DESKFLOW_VERSION_MAJOR ${MAJOR})
|
||||
set(DESKFLOW_VERSION_MINOR ${MINOR})
|
||||
set(DESKFLOW_VERSION_PATCH ${PATCH})
|
||||
set(DESKFLOW_VERSION_TWEAK ${TWEAK})
|
||||
elseif(NOT ${GITREV} STREQUAL "")
|
||||
set(DESKFLOW_VERSION_TWEAK ${GITREV})
|
||||
endif()
|
||||
set(DESKFLOW_VERSION_TWEAK "9999")
|
||||
endif()
|
||||
unset(GITREV)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -89,7 +84,7 @@ project(
|
||||
# Define Additional "PROJECT" vars for packaging and metadata
|
||||
set(CMAKE_PROJECT_PROPER_NAME "Deskflow")
|
||||
set(CMAKE_PROJECT_VENDOR "${CMAKE_PROJECT_PROPER_NAME} Devs")
|
||||
set(CMAKE_PROJECT_COPYRIGHT "(C) 2024-2025 ${CMAKE_PROJECT_VENDOR}")
|
||||
set(CMAKE_PROJECT_COPYRIGHT "(C) 2024-2026 ${CMAKE_PROJECT_VENDOR}")
|
||||
set(CMAKE_PROJECT_CONTACT "${CMAKE_PROJECT_PROPER_NAME} <maintainers@deskflow.org>")
|
||||
set(CMAKE_PROJECT_REV_FQDN "org.deskflow.deskflow")
|
||||
|
||||
@ -183,9 +178,12 @@ else()
|
||||
endif()
|
||||
|
||||
add_subdirectory(doc)
|
||||
add_subdirectory(src)
|
||||
|
||||
# build translations before source, I18N unit tests fail if they are missing
|
||||
add_subdirectory(translations)
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
option(BUILD_INSTALLER "Build installer" ON)
|
||||
if(BUILD_INSTALLER)
|
||||
add_subdirectory(deploy)
|
||||
|
||||
15
README.md
@ -25,10 +25,11 @@ TLS encryption is enabled by default. Wayland is supported. Clipboard sharing is
|
||||
> [!NOTE]
|
||||
> On Windows, you will need to install the
|
||||
> [Microsoft Visual C++ Redistributable](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#latest-microsoft-visual-c-redistributable-version).
|
||||
> Download latest: [`vc_redist.x64.exe`](https://aka.ms/vs/17/release/vc_redist.x64.exe) [`vc_redist.arm64.exe`](https://aka.ms/vs/17/release/vc_redist.arm64.exe)
|
||||
> Download latest: [`vc_redist.x64.exe`](https://aka.ms/vc14/vc_redist.x64.exe) [`vc_redist.arm64.exe`](https://aka.ms/vc14/vc_redist.arm64.exe)
|
||||
|
||||
> [!TIP]
|
||||
> For macOS users, the easiest way to install and stay up to date is to use [Homebrew](https://brew.sh) with our [homebrew-tap](https://github.com/deskflow/homebrew-tap).
|
||||
> macOS reports unsigned apps as damaged. This occurs because we do not use an Apple certificate for notarization. Clear the quarantine attribute to run the app: `xattr -c Deskflow.app`
|
||||
|
||||
To use Deskflow, download one of our [packages](https://github.com/deskflow/deskflow/releases), install `deskflow` (from your package repository), or [build it](https://github.com/deskflow/deskflow/wiki/Building) from source.
|
||||
|
||||
@ -50,7 +51,7 @@ To use Deskflow, download one of our [packages](https://github.com/deskflow/desk
|
||||
|
||||
## Contribute
|
||||
|
||||
[](https://github.com/deskflow/deskflow/labels/good%20first%20issue) [](https://github.com/deskflow/deskflow/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22%F0%9F%92%8E%20bounty%22) [](https://github.com/deskflow/deskflow/issues?q=label%3A%22%F0%9F%92%B0%20rewarded%22%20sort%3Aupdated-desc)
|
||||
[](https://github.com/deskflow/deskflow/labels/good%20first%20issue)
|
||||
|
||||
There are many ways to contribute to the Deskflow project.
|
||||
|
||||
@ -64,9 +65,9 @@ For instructions on building Deskflow, use the wiki page: [Building](https://git
|
||||
|
||||
We support all major operating systems, including Windows, macOS, Linux, and Unix-like BSD-derived.
|
||||
|
||||
Windows 10 or higher is required.
|
||||
Windows 10 v1809 or higher is required.
|
||||
|
||||
macOS 12 or higher is required.
|
||||
macOS 13 or higher is required to use our CI builds for Apple Silicon machines. macOS 12 or higher is required for Intel macs or local builds.
|
||||
|
||||
Linux requires libei 1.3+ and libportal 0.8+ for the server/client. Additionally, Qt 6.7+ is required for the GUI.
|
||||
Linux users with systems not meeting these requirements should use flatpak in place of a native package.
|
||||
@ -80,8 +81,6 @@ versions across them and gathering other information.
|
||||
|
||||
[](https://repology.org/project/deskflow/versions)
|
||||
|
||||
**Note:** We are working with package maintainers to have our new package name adopted.
|
||||
|
||||
## Installing on macOS
|
||||
|
||||
When you install Deskflow on macOS, you need to allow accessibility access (Privacy & Security) to both the `Deskflow` app and the `deskflow` process.
|
||||
@ -94,12 +93,12 @@ on the allowed list you will need to manually remove them before accessibility a
|
||||
|
||||
macOS users who download directly from releases may need to run `xattr -c /Applications/Deskflow.app` after copying the app to the `Applications` dir.
|
||||
|
||||
It is recommend to install Deskflow using [Homebrew](https://brew.sh) from our [homebrew-tap](https://github.com/deskflow/homebrew-tap)
|
||||
It is recommended to install Deskflow using [Homebrew](https://brew.sh) from our [homebrew-tap](https://github.com/deskflow/homebrew-tap)
|
||||
|
||||
To add our tap, run:
|
||||
|
||||
```
|
||||
brew tap deskflow/homebrew-tap
|
||||
brew tap deskflow/tap
|
||||
```
|
||||
|
||||
Then install either:
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
# SOURCE https://github.com/bilke/cmake-modules/blob/master/CodeCoverage.cmake
|
||||
# SPDX-FileCopyrightText: 2020 Bob Apthrope
|
||||
# SPDX-FileCopyrightText: 2019 Anatolii Kurotych
|
||||
# SPDX-FileCopyrightText: 2019 - 2020 Frank Dana
|
||||
# SPDX-FileCopyrightText: 2013 Joakim Söderberg
|
||||
# SPDX-FileCopyrightText: 2012 - 2017 Lars Bilke
|
||||
# SPDX-FileCopyrightText: (C) 2020 Bob Apthrope
|
||||
# SPDX-FileCopyrightText: (C) 2019 Anatolii Kurotych
|
||||
# SPDX-FileCopyrightText: (C) 2019 - 2020 Frank Dana
|
||||
# SPDX-FileCopyrightText: (C) 2013 Joakim Söderberg
|
||||
# SPDX-FileCopyrightText: (C) 2012 - 2017 Lars Bilke
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
# USAGE:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# SPDX-FileCopyrightText: 2024 - 2025 Deskflow Developers
|
||||
# SPDX-FileCopyrightText: 2024 Symless Ltd
|
||||
# SPDX-FileCopyrightText: (C) 2024 - 2025 Deskflow Developers
|
||||
# SPDX-FileCopyrightText: (C) 2024 Symless Ltd
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
macro(configure_libs)
|
||||
@ -164,13 +164,7 @@ macro(configure_unix_libs)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Unix only: For config.h, save the results based on a template (config.h.in).
|
||||
# Note that this won't work on Windows because filenames are not case sensitive,
|
||||
# and we have header files named "Config.h" (upper case 'C').
|
||||
configure_file(${CMAKE_SOURCE_DIR}/src/lib/Config.h.in
|
||||
${CMAKE_BINARY_DIR}/src/lib/Config.h @ONLY)
|
||||
|
||||
add_definitions(-DSYSAPI_UNIX=1 -DHAVE_CONFIG_H)
|
||||
add_definitions(-DSYSAPI_UNIX=1)
|
||||
|
||||
endmacro()
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2024 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-FileCopyrightText: (C) 2024 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
# Copy License with txt ext for picky package creation tools
|
||||
@ -8,7 +8,6 @@ file(COPY_FILE
|
||||
ONLY_IF_DIFFERENT
|
||||
)
|
||||
|
||||
|
||||
# Generic Package Items
|
||||
set(CPACK_STRIP_FILES TRUE)
|
||||
set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME})
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2024 Deskflow Developers
|
||||
# SPDX-FileCopyrightText: (C) 2024 Deskflow Developers
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Maintainer: Deskflow Developers
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2024 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-FileCopyrightText: (C) 2024 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
# HACK This is set when the files is included so its the real path
|
||||
@ -35,6 +35,7 @@ configure_file(
|
||||
|
||||
set(CPACK_DEBIAN_PACKAGE_SECTION "utils")
|
||||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
||||
set(CPACK_DEBIAN_PACKAGE_RECOMMENDS "qt6-svg-plugins")
|
||||
set(CPACK_RPM_PACKAGE_LICENSE "GPLv2")
|
||||
set(CPACK_RPM_PACKAGE_GROUP "Applications/System")
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
app-id: org.deskflow.deskflow
|
||||
runtime: org.kde.Platform
|
||||
runtime-version: "6.9"
|
||||
runtime-version: "6.10"
|
||||
sdk: org.kde.Sdk
|
||||
command: deskflow
|
||||
finish-args:
|
||||
@ -29,8 +29,12 @@ modules:
|
||||
--prefix=${FLATPAK_DEST} --no-build-isolation Jinja2
|
||||
sources:
|
||||
- type: file
|
||||
url: https://files.pythonhosted.org/packages/30/6d/6de6be2d02603ab56e72997708809e8a5b0fbfee080735109b40a3564843/Jinja2-3.1.3-py3-none-any.whl
|
||||
sha256: 7d6d50dd97d52cbc355597bd845fabfbac3f551e1f99619e39a35ce8c370b5fa
|
||||
url: https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl
|
||||
sha256: 85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67
|
||||
x-checker-data:
|
||||
type: pypi
|
||||
name: Jinja2
|
||||
packagetype: bdist_wheel
|
||||
- type: file
|
||||
url: https://files.pythonhosted.org/packages/87/5b/aae44c6655f3801e81aa3eef09dbbf012431987ba564d7231722f68df02d/MarkupSafe-2.1.5.tar.gz
|
||||
sha256: d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b
|
||||
@ -45,8 +49,11 @@ modules:
|
||||
sources:
|
||||
- type: git
|
||||
url: https://gitlab.freedesktop.org/libinput/libei
|
||||
tag: 1.4.1
|
||||
commit: 9e0413cbc7d3ae6656266890425f152589ddf74d
|
||||
tag: 1.5.0
|
||||
commit: 19b64535408aa47abbc8151bc2c925afd6583851
|
||||
x-checker-data:
|
||||
type: git
|
||||
tag-pattern: ^([\\d.]+)$
|
||||
- name: libportal
|
||||
buildsystem: meson
|
||||
config-opts:
|
||||
@ -67,8 +74,11 @@ modules:
|
||||
sources:
|
||||
- type: git
|
||||
url: https://github.com/google/googletest.git
|
||||
tag: v1.15.2
|
||||
commit: b514bdc898e2951020cbdca1304b75f5950d1f59
|
||||
tag: v1.17.0
|
||||
commit: 52eb8108c5bdec04579160ae17225d66034bd723
|
||||
x-checker-data:
|
||||
type: git
|
||||
tag-pattern: ^([\\d.]+)$
|
||||
cleanup:
|
||||
- '*'
|
||||
- name: deskflow
|
||||
|
||||
@ -17,3 +17,6 @@ Keywords[zh_CN]=键盘;鼠标;网络;共享;
|
||||
Name[ru]=Deskflow
|
||||
Comment[ru]=Приложения чтобы использовать одну мышку и клавиатуру с разными устройствами
|
||||
Keywords[ru]=Передача;Трансляция;barrier;input-leap;
|
||||
Name[ko]=Deskflow
|
||||
Comment[ko]=마우스 및 키보드 공유 유틸리티
|
||||
Keywords[ko]=키보드;마우스;공유;네트워크;
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
</developer>
|
||||
<summary>Software Keyboard and mouse sharing</summary>
|
||||
<summary xml:lang="zh_CN">用软件共享键鼠</summary>
|
||||
<summary xml:lang="ko">키보드 및 마우스 공유 소프트웨어</summary>
|
||||
<description>
|
||||
<p>
|
||||
Use the keyboard, mouse, or trackpad of one computer to control nearby computers, and work seamlessly between them.
|
||||
@ -16,6 +17,9 @@
|
||||
<p xml:lang="zh_CN">
|
||||
使用一台计算机的键盘、鼠标或触控板来控制附近的其它计算机,并在它们之间无缝工作。
|
||||
</p>
|
||||
<p xml:lang="ko">
|
||||
한 대의 컴퓨터에 연결된 키보드, 마우스 또는 트랙패드로 주변의 다른 컴퓨터를 제어하고, 컴퓨터 사이를 끊김 없이 오가며 작업할 수 있습니다.
|
||||
</p>
|
||||
</description>
|
||||
<launchable type="desktop-id">org.deskflow.deskflow.desktop</launchable>
|
||||
<url type="homepage">https://deskflow.org</url>
|
||||
@ -57,8 +61,10 @@
|
||||
<keywords>
|
||||
<keyword>Input</keyword>
|
||||
<keyword xml:lang="zh_CN">输入</keyword>
|
||||
<keyword xml:lang="ko">입력</keyword>
|
||||
<keyword>Sharing</keyword>
|
||||
<keyword xml:lang="zh_CN">共享</keyword>
|
||||
<keyword xml:lang="ko">공유</keyword>
|
||||
<keyword translate="no">KVM</keyword>
|
||||
<keyword translate="no">Synergy</keyword>
|
||||
</keywords>
|
||||
@ -68,6 +74,45 @@
|
||||
</branding>
|
||||
<content_rating type="oars-1.0" />
|
||||
<releases>
|
||||
<release version="1.26.0" date="2026-02-16" urgency="high">
|
||||
<description>
|
||||
<p>This stable release fixes known issues and adds a few new features, For the full changelog, see the release page.</p>
|
||||
<ul>
|
||||
<li>New: Korean(ko) translation</li>
|
||||
<li>New: Option to start in the "locked to computer" state</li>
|
||||
<li>New: Option to show the version in the windows title</li>
|
||||
<li>New: Clients can now use a list hostnames or ips for the server address</li>
|
||||
<li>New: Client options are in a new client configuration dialog</li>
|
||||
<li>New: Provide a more accurate suggested IP, Update as network info changes if needed.</li>
|
||||
<li>New: Add a simple search to the log</li>
|
||||
<li>New: Lookup host name with IP4 or IP6</li>
|
||||
<li>New: Replace broken scroll speed with a scroll scaling options</li>
|
||||
<li>Fix: Horizontal scrolling is working again on all platforms</li>
|
||||
<li>Fix: Key repeat events are now sent as repeat not press and release</li>
|
||||
<li>Fix: Deskflow-core correctly blocks new instances when run without the `--new-instance` option</li>
|
||||
<li>Fix: Server Mode, Only use the external config path if the option is enabled</li>
|
||||
<li>Fix: Allow comma and semicolon to be used in the hotkey configuration</li>
|
||||
<li>Fix: Gui can crash when clearing settings in debug mode</li>
|
||||
<li>Fix: Mouse Back and Forward buttons are now working (again) on all platforms</li>
|
||||
<li>Fix: macOS, crash when the log is opened and the gui minimized</li>
|
||||
<li>Fix: macOS, restore Preferences menu entry when the application is using non english language</li>
|
||||
<li>Fix: macOS, try icon was not showing when in `Colorful` mode</li>
|
||||
<li>Fix: macOS, do not allow the os to kill deskflow for memory reasons</li>
|
||||
<li>Fix: macOS, possible server crash when a client disconnects abruptly</li>
|
||||
<li>Fix: macOS, possible crash on screen wake / screen saver activation</li>
|
||||
<li>Fix: macOS, Wrong keys send when using "RIME" input method</li>
|
||||
<li>Fix: Windows, possible crash when the daemon is started for the first time</li>
|
||||
<li>Use `Computer` in place of `Screen` to indicate we work with Computers display layout and not individual screens attached</li>
|
||||
<li>Clean and update the settings when starting up.</li>
|
||||
<li>Do not show client connection error messages dialogs if the gui is hidden</li>
|
||||
<li>Use Qt 6.9.3 for Intel Mac builds.</li>
|
||||
<li>Windows: Use ICU dlls from the host system</li>
|
||||
<li>Code continues to be cleaned of unused methods and updated to modern C++</li>
|
||||
<li>Consolidate Debug levels to remove DEBUG3-5 levels</li>
|
||||
</ul>
|
||||
</description>
|
||||
<url>https://github.com/deskflow/deskflow/releases/tag/v1.26.0</url>
|
||||
</release>
|
||||
<release version="1.25.0" date="2025-11-21" urgency="high">
|
||||
<description>
|
||||
<p>This stable release fixes known issues and adds a few new features. Most notable symbolic icon support, I18N support and experimental support for wl-clipboard to access clipboards on wayland. This release also continues our trend of cleaning up the codebase. For the full changelog, see the release page.</p>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2024 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-FileCopyrightText: (C) 2024 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
# HACK This is set when the files is included so its the real path
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#SPDX-FileCopyrightText: 2025 Chris Rizzitello <sithlord48@gmail.com>
|
||||
#SPDX-FileCopyrightText: (C) 2025 Chris Rizzitello <sithlord48@gmail.com>
|
||||
#SPDX-License-Identifier: MIT
|
||||
|
||||
if(CPACK_GENERATOR MATCHES 7Z|ZIP)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2024 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-FileCopyrightText: (C) 2024 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
# HACK This is set when the files is included so its the real path
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2025 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-FileCopyrightText: (C) 2025 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
if(CPACK_GENERATOR MATCHES 7Z|ZIP)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2019 - 2025 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-FileCopyrightText: (C) 2019 - 2025 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
find_package(Doxygen QUIET)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2025 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-FileCopyrightText: (C) 2025 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
set(DOXYGEN_USE_MDFILE_AS_MAINPAGE mainpage.md)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2025 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-FileCopyrightText: (C) 2025 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
set(DOXYGEN_USE_MDFILE_AS_MAINPAGE mainpage.md)
|
||||
|
||||
@ -56,24 +56,27 @@ It will begin with `[client]`
|
||||
| binary | Filename | The filename of the binary to call for client mode. This binary exists in the same path as the GUI |
|
||||
| invertScrollDirection | `true` or `false` | Invert scroll on this client [default: false] |
|
||||
| languageSync | `true` or `false` | Sync to server language [default: true] |
|
||||
| remoteHost | `IP` or `hostname` | The remote host last connected to |
|
||||
| remoteHost | `IP` or `hostname` | The remote host(s) to connect to. Use a comma seperated list when you want to try severial hosts |
|
||||
| yScrollScale | Double 0.1 - 10.0 | Mouse scrolling will be scaled by this amount on the client [default: 1.0] |
|
||||
| xdpRestoreToken | UUID | Restore token provided by XDG portals |
|
||||
|
||||
|
||||
### Core
|
||||
|
||||
This section contains general options it will begin with `[core]`
|
||||
|
||||
|Option | Valid Values|Description|
|
||||
|:--------------|:-----------:|:-----------|
|
||||
| coreMode | `0` or `1` or `2` | The mode to start in 0: None, 1: Client, 2: Server [default: 0]|
|
||||
| display | int | The XWindow display to use [default: autodetected] |
|
||||
| interface | IP Address | Preferred IP to use for network communication. By default the server board casts on any available address |
|
||||
| lastVersion | M.m.p.t | The version last run used for checking for updates |
|
||||
| port | port # | Port to use when connecting [default: 24800 |
|
||||
| preventSleep | `true` or `false` | Prevent sleep when Deskflow is active [default: false] |
|
||||
| processMode | `1` or `0` | The mode we use to start the process Service or Desktop |
|
||||
| screenName | string | Name used to identify the screen [default: machine's hostname] |
|
||||
| startedBefore | `true` or `false `| Have we started client or server before. Used in logic when deciding to show some dialogs.
|
||||
| updateUrl | URL | The URL to use when checking for a new version number, it should return a version [default: https://api.deskflow.org/version]|
|
||||
| computerName | string | Name used to identify the computer [default: machine's hostname] |
|
||||
| useHooks | `true` or `false` | If Windows uses hooks or not [default: true] |
|
||||
| language | 639 language | The language to display the GUI in [default: en] |
|
||||
| wlClipboard | `true` or `false` | When true the wl-clipboard backend will be enabled [default: false] |
|
||||
|
||||
### Daemon
|
||||
|
||||
@ -90,25 +93,32 @@ This section contains options used by the daemon on windows it will begin with `
|
||||
|
||||
This section contains options used by the GUI it will begin with `[gui]`
|
||||
|
||||
|Option | Valid Values |Description|
|
||||
|:------------------|:-----------------:|:-----------|
|
||||
| autoHide | `true` or `false` | When true the app will hide itself on start up [default: false] |
|
||||
| enableUpdateCheck | `true` or `false` | When true check the update URL to see if a new version was released on start up [default: false] |
|
||||
| closeReminder | `true` or `false` | Used to track if we have shown the reminder that when you close the app it remain running in the background [default: true]|
|
||||
| logExpanded | `true` or `false` | Should the log section of the GUI be opened [default: false] |
|
||||
| symbolicTrayIcon | `true` or `false` | When true use the monocolor (symbolic) icon false uses a colorful icon for the tray |
|
||||
| windowGeometry | QRect | Geometry of the window used to restore the window geometry after exiting the app |
|
||||
|Option | Valid Values |Description|
|
||||
|:-------------------------------|:-----------------:|:-----------|
|
||||
| autoHide | `true` or `false` | When true the app will hide itself on start up [default: false] |
|
||||
| enableUpdateCheck | `true` or `false` | When true check the update URL to see if a new version was released on start up [default: false] |
|
||||
| closeReminder | `true` or `false` | Used to track if we have shown the reminder that when you close the app it remain running in the background [default: true]|
|
||||
| closeToTray | `true` or `false` | When `true` the gui will run in the systemTray when its closed [default: true] |
|
||||
| logExpanded | `true` or `false` | Should the log section of the GUI be opened [default: false] |
|
||||
| symbolicTrayIcon | `true` or `false` | When true use the monocolor (symbolic) icon false uses a colorful icon for the tray [default: true] |
|
||||
| windowGeometry | QRect | Geometry of the window used to restore the window geometry after exiting the app |
|
||||
| showGenericClientFailureDialog | `true` or `false` | When `true` client connection errors will not show popup error messages [default: true] |
|
||||
| shownFirstConnectedMessage | `true` or `false` | When `true` GUI has shown the user the message for connecting the first time [default: false] |
|
||||
| shownServerFirstStartMessage | `true` or `false` | When `true` GUI has shown the user the Deskflow server is now running message [default: false] |
|
||||
| shownVerionInTitle | `true` or `false` | When `true` GUI will include the version in the window title [default: false] |
|
||||
| startCoreWithGui | `true` or `false` | When true the Core will be started with the GUI. It is set to the Core's state on exit. |
|
||||
| updateCheckUrl | URL | The URL to use when checking for a new version number, it should return a version [default: https://api.deskflow.org/version]|
|
||||
|
||||
### Log
|
||||
|
||||
This section contains options used by the application logging it will begin with `[log]`
|
||||
|
||||
|Option | Valid Values |Description|
|
||||
|:------|:-----------------:|:-----------|
|
||||
| file | Filepath | The file to write the log into |
|
||||
| level | Valid log level | Log level to use |
|
||||
| toFile | `true` or `false` | When true the log will be written to the value of the `file` option |
|
||||
|
||||
|Option | Valid Values |Description|
|
||||
|:---------|:-----------------:|:-----------|
|
||||
| file | Filepath | The file to write the log into |
|
||||
| level | Valid log level | Log level to use |
|
||||
| toFile | `true` or `false` | When true the log will be written to the value of the `file` option |
|
||||
| guiDebug | `true` or `false` | When true the log will show the Gui's internal debug messages |
|
||||
|
||||
### Security
|
||||
|
||||
@ -127,8 +137,6 @@ This section contains options used when in server mode it will begin with `[serv
|
||||
|
||||
|Option | Valid Values |Description|
|
||||
|:-------------------|:-----------------:|:-----------|
|
||||
| binary | Filename | The name of the binary to call for client mode. This binary exists in same path as the Deskflow GUI |
|
||||
| configVisible | `true` or `false` | Used internally to track when the severs has a configuration dialog showing.|
|
||||
| externalConfig | `true` or `false` | When true use the external config path |
|
||||
| externalConfigFile | Filepath | Path the server config file if it does not exist the GUI will it generated based on the `internalConfig` section.|
|
||||
|
||||
@ -141,6 +149,7 @@ block of a server config file as seen below. This section is used by the GUI to
|
||||
[internalConfig]
|
||||
clipboardSharing=true
|
||||
clipboardSharingSize=@Variant(\0\0\0\x84\0\0\0\0\0\0<\0)
|
||||
defaultLockToScreenState=false
|
||||
disableLockToScreen=false
|
||||
hasHeartbeat=false
|
||||
hasSwitchDelay=false
|
||||
@ -290,7 +299,7 @@ The file is parsed top to bottom and names cannot be used before they've been de
|
||||
|
||||
### The screens section
|
||||
|
||||
''args'' is a list of screen names, one name per line, each followed by a colon. Names are arbitrary strings but they must be unique. The hostname of each computer is recommended. (This is the computer's network name on win32 and the name reported by the program hostname on Unix and OS X. Note that OS X may append .local to the name you gave your computer; e.g. somehost.local.) There must be a screen name for the server and each client. Each screen can specify a number of options. Options have the form name = value and are listed one per line after the screen name.
|
||||
''args'' is a list of computer names, one name per line, each followed by a colon. Names are arbitrary strings but they must be unique. The hostname of each computer is recommended. (This is the computer's network name on win32 and the name reported by the program hostname on Unix and OS X. Note that OS X may append .local to the name you gave your computer; e.g. somehost.local.) There must be a computer name for the server and each client. Each computer can specify a number of options. Options have the form name = value and are listed one per line after the computer name.
|
||||
|
||||
```
|
||||
section: screens
|
||||
@ -303,29 +312,29 @@ section: screens
|
||||
end
|
||||
```
|
||||
|
||||
This declares three screens named ''moe'', ''larry'', and ''curly''. Screen ''larry'' has half-duplex ''Caps Lock'' and ''Num Lock'' keys (see below) and screen ''curly'' converts the ''Meta'' modifier key to the ''Alt'' modifier key.
|
||||
This declares three computers named ''moe'', ''larry'', and ''curly''. Computer ''larry'' has half-duplex ''Caps Lock'' and ''Num Lock'' keys (see below) and computer ''curly'' converts the ''Meta'' modifier key to the ''Alt'' modifier key.
|
||||
|
||||
#### screen options
|
||||
|
||||
A screen can have the following options:
|
||||
A computer can have the following options:
|
||||
|Option | Valid Values| Description|
|
||||
|:----------|:-----------:|:-----------|
|
||||
|halfDuplexCapsLock| `true` or `false` | This computer has a ''Caps Lock'' key that doesn't report a press and a release event when the user presses it but instead reports a press event when it's turned on and a release event when it's turned off. If ''Caps Lock'' acts strangely on all screens then you may need to set this option to true on the server screen. If it acts strangely on one screen then that screen may need the option set to true.|
|
||||
|halfDuplexNumLock | `true` or `false` | This computer has a ''Num Lock'' key that doesn't report a press and a release event when the user presses it but instead reports a press event when it's turned on and a release event when it's turned off. If ''Num Lock'' acts strangely on all screens then you may need to set this option to true on the server screen. If it acts strangely on one screen then that screen may need the option set to true.|
|
||||
|halfDuplexScrollLock| `true` or `false`| This computer has a ''Scroll Lock'' key that doesn't report a press and a release event when the user presses it but instead reports a press event when it's turned on and a release event when it's turned off. If ''Scroll Lock'' acts strangely on all screens then you may need to set this option to true on the server screen. If it acts strangely on one screen then that screen may need the option set to true.|
|
||||
|halfDuplexCapsLock| `true` or `false` | This computer has a ''Caps Lock'' key that doesn't report a press and a release event when the user presses it but instead reports a press event when it's turned on and a release event when it's turned off. If ''Caps Lock'' acts strangely on all computers then you may need to set this option to true on the server. If it acts strangely on one computer then that computer may need the option set to true.|
|
||||
|halfDuplexNumLock | `true` or `false` | This computer has a ''Num Lock'' key that doesn't report a press and a release event when the user presses it but instead reports a press event when it's turned on and a release event when it's turned off. If ''Num Lock'' acts strangely on all computers then you may need to set this option to true on the server. If it acts strangely on one computer then that computer may need the option set to true.|
|
||||
|halfDuplexScrollLock| `true` or `false`| This computer has a ''Scroll Lock'' key that doesn't report a press and a release event when the user presses it but instead reports a press event when it's turned on and a release event when it's turned off. If ''Scroll Lock'' acts strangely on all computers then you may need to set this option to true on the server. If it acts strangely on one computer then that computer may need the option set to true.|
|
||||
|xtestIsXineramaUnaware| `true` or `false`| This option works around a bug in the XTest extension when used in combination with Xinerama. It affects X11 clients only. Not all versions of the XTest extension are aware of the Xinerama extension. As a result, they do not move the mouse correctly when using multiple Xinerama screens. This option is currently ''true'' by default. If you know your XTest extension is Xinerama aware then set this option to ''false''.|
|
||||
|preserveFocus| `true` or `false` | When true don't drop focus when switching screens
|
||||
|preserveFocus| `true` or `false` | When true don't drop focus when switching computers
|
||||
|switchCorners| corners |See <a href="#switch-corners">switchCorners</a> below.|
|
||||
|switchCornerSize | integer | see switchCornerSize below.|
|
||||
|shift | shift ctrl alt meta super none | Map the server's shift modifer to different key on a client screen|
|
||||
|ctrl | shift ctrl alt meta super none | Map the server's ctrl modifer to different key on a client screen|
|
||||
|alt | shift ctrl alt meta super none | Map the server's alt modifer to different key on a client screen|
|
||||
|meta| shift ctrl alt meta super none | Map the server's meta modifer to different key on a client screen|
|
||||
|super| shift ctrl alt meta super none | Map the server's super modifer to different key on a client screen|
|
||||
|shift | shift ctrl alt meta super none | Map the server's shift modifer to different key on a client computer|
|
||||
|ctrl | shift ctrl alt meta super none | Map the server's ctrl modifer to different key on a client computer|
|
||||
|alt | shift ctrl alt meta super none | Map the server's alt modifer to different key on a client computer|
|
||||
|meta| shift ctrl alt meta super none | Map the server's meta modifer to different key on a client computer|
|
||||
|super| shift ctrl alt meta super none | Map the server's super modifer to different key on a client computer|
|
||||
|
||||
### aliases section
|
||||
|
||||
''args'' is a list of screen names just like in the ''screens'' section except each screen is followed by a list of aliases, one per line, not followed by a colon. An ''alias'' is a screen name and must be unique. During screen name lookup each alias is equivalent to the screen name it aliases. So a client can connect using its canonical screen name or any of its aliases.
|
||||
''args'' is a list of computer names just like in the ''screens'' section except each computer is followed by a list of aliases, one per line, not followed by a colon. An ''alias'' is a computer name and must be unique. When searching for computers each alias is equivalent to the computer name it aliases. So a client can connect using its canonical computer name or any of its aliases.
|
||||
|
||||
```
|
||||
section: aliases
|
||||
@ -336,20 +345,20 @@ section: aliases
|
||||
end
|
||||
```
|
||||
|
||||
Screen ''larry'' is also known as ''larry.stooges.com'' and can connect as either name. Screen ''curly'' is also known as ''shemp'' (hey, it's just an example).
|
||||
Computer ''larry'' is also known as ''larry.stooges.com'' and can connect as either name. Computer ''curly'' is also known as ''shemp'' (hey, it's just an example).
|
||||
|
||||
### links secion
|
||||
|
||||
''args'' is a list of screen names just like in the ''screens'' section except each screen is followed by a list of links, one per line. Each link has the form:
|
||||
''args'' is a list of computer names just like in the ''screens'' section except each computer is followed by a list of links, one per line. Each link has the form:
|
||||
```
|
||||
{left|right|up|down}[<range>] = name[<range>]
|
||||
```
|
||||
|
||||
A link indicates which screen is adjacent in the given direction.
|
||||
A link indicates which computer is adjacent in the given direction.
|
||||
|
||||
Each side of a link can specify a range which defines a portion of an edge. A range on the direction is the portion of edge you can leave from while a range on the screen is the portion of edge you'll enter into. Ranges are optional and default to the entire edge. All ranges on a particular direction of a particular screen must not overlap.
|
||||
Each side of a link can specify a range which defines a portion of an edge. A range on the direction is the portion of edge you can leave from while a range on the computer is the portion of edge you'll enter into. Ranges are optional and default to the entire edge. All ranges on a particular direction of a particular computer must not overlap.
|
||||
|
||||
A ''range'' is written as <code>(start,end)</code>. Both ''start'' and ''end'' are percentages in the range 0 to 100, inclusive. The start must be less than the end. 0 is the left or top of an edge and 100 is the right or bottom.
|
||||
A ''range'' is written as <code>(start,end)</code>. Both ''start'' and ''end'' are percentages in the range 0 to 100, inclusive. The start must be less than the end. 0 is the left or top of an edge and 100 is the right or bottom.
|
||||
|
||||
```
|
||||
section: links
|
||||
@ -365,9 +374,9 @@ section: links
|
||||
end
|
||||
```
|
||||
|
||||
This indicates that screen ''larry'' is to the right of screen ''moe'' (so moving the cursor off the right edge of ''moe'' would make it appear at the left edge of ''larry''), the left half of curly is above the right half of ''moe'', ''moe'' is to the left of ''larry'' (edges are not necessarily symmetric so you have to provide both directions), the right half of curly is above the left half of ''larry'', all of ''moe'' is below the left half of ''curly'', and the left half of ''larry'' is below the right half of ''curly''.
|
||||
This indicates that computer ''larry'' is to the right of computer ''moe'' (so moving the cursor off the right edge of ''moe'' would make it appear at the left edge of ''larry''), the left half of curly is above the right half of ''moe'', ''moe'' is to the left of ''larry'' (edges are not necessarily symmetric so you have to provide both directions), the right half of curly is above the left half of ''larry'', all of ''moe'' is below the left half of ''curly'', and the left half of ''larry'' is below the right half of ''curly''.
|
||||
|
||||
Note that links do not have to be symmetrical; for instance, here the edge between ''moe'' and ''curly'' maps to different ranges depending on if you're going up or down. In fact links don't have to be bidirectional. You can configure the right of ''moe'' to go to ''larry'' without a link from the left of ''larry'' to ''moe''. It's possible to configure a screen with no outgoing links; the cursor will get stuck on that screen unless you have a hot key configured to switch off of that screen.
|
||||
Note that links do not have to be symmetrical; for instance, here the edge between ''moe'' and ''curly'' maps to different ranges depending on if you're going up or down. In fact links don't have to be bidirectional. You can configure the right of ''moe'' to go to ''larry'' without a link from the left of ''larry'' to ''moe''. It's possible to configure a computer with no outgoing links; the cursor will get stuck on that computer unless you have a hot key configured to switch off of that computer.
|
||||
|
||||
### options section
|
||||
|
||||
@ -387,17 +396,17 @@ end
|
||||
|:--------|:-----------:|:-----------|
|
||||
|protocol | barrier or synergy| The protocol to use when saying hello to clients. Can be set to barrier or synergy. If not set barrier is used as the default |
|
||||
|heartbeat| integer (N) | The server will expect each client to send a message no less than every `N` milliseconds. If no message arrives from a client within `3N` seconds the server forces that client to disconnect. If deskflow fails to detect clients disconnecting while the server is sleeping or vice versa, try using this option. |
|
||||
|switchCorners | none top-left top-right bottom-left bottom-right left right top bottom all | Deskflow won't switch screens when the mouse reaches the edge of the screen if it's in a listed corner. The size of all corners is given by the `switchCornerSize` option. The first name in the list is one of the above names and defines the initial set of corners. Subsequent names are prefixed with + or - to add the corner to or remove the corner from the set, respectively. For example: `all -left +top-left` starts will all corners, removes the left corners (top and bottom) then adds the top-left back in, resulting in the top-left, bottom-left and bottom-right corners.|
|
||||
|switchCorners | none top-left top-right bottom-left bottom-right left right top bottom all | Deskflow won't switch computers when the mouse reaches the edge of the computer if it's in a listed corner. The size of all corners is given by the `switchCornerSize` option. The first name in the list is one of the above names and defines the initial set of corners. Subsequent names are prefixed with + or - to add the corner to or remove the corner from the set, respectively. For example: `all -left +top-left` starts will all corners, removes the left corners (top and bottom) then adds the top-left back in, resulting in the top-left, bottom-left and bottom-right corners.|
|
||||
|switchCornerSize | integer (N) | Sets the size of all corners in pixels. The cursor must be within `N` pixels of the corner to be considered to be in the corner.|
|
||||
|switchDelay | integer| Deskflow won't switch screens when the mouse reaches the edge of a screen unless it stays on the edge for `N` milliseconds. This helps prevent unintentional switching when working near the edge of a screen.|
|
||||
|switchDoubleTap| integer(N) | Deskflow won't switch screens when the mouse reaches the edge of a screen unless it's moved away from the edge and then back to the edge within `N` milliseconds. With the option you have to quickly tap the edge twice to switch. This helps prevent unintentional switching when working near the edge of a screen.|
|
||||
|screenSaverSync| `true` or `false`| ''Note: Removed in v1.14.1'' If set to ''false'' then Deskflow won't synchronize screen savers. Client screen savers will start according to their individual configurations. The server screen saver won't start if there is input, even if that input is directed toward a client screen.|
|
||||
|relativeMouseMoves| `true` or `false`| If set to ''true'' then secondary screens move the mouse using relative rather than absolute mouse moves when and only when the cursor is locked to the screen (by ''Scroll Lock'' or a configured hot key). This is intended to make Deskflow work better with certain games. If set to ''false'' or not set then all mouse moves are absolute.|
|
||||
|switchDelay | integer| Deskflow won't switch computers when the mouse reaches edge of a computer unless it stays on the edge for `N` milliseconds. This helps prevent unintentional switching when working near an edge.|
|
||||
|switchDoubleTap| integer(N) | Deskflow won't switch computers when the mouse reaches the edge of a computer unless it's moved away from the edge and then back to the edge within `N` milliseconds. With the option you have to quickly tap the edge twice to switch. This helps prevent unintentional switching when working near the edge.|
|
||||
|screenSaverSync| `true` or `false`| ''Note: Removed in v1.14.1'' If set to ''false'' then Deskflow won't synchronize screen savers. Client screen savers will start according to their individual configurations. The server screen saver won't start if there is input, even if that input is directed toward a client computer.|
|
||||
|relativeMouseMoves| `true` or `false`| If set to ''true'' then secondary computers move the mouse using relative rather than absolute mouse moves when and only when the cursor is locked to the computer (by ''Scroll Lock'' or a configured hot key). This is intended to make Deskflow work better with certain games. If set to ''false'' or not set then all mouse moves are absolute.|
|
||||
|clipboardSharing| `true` or `false`|If set to ''true'' then clipboard sharing will be enabled and the ''clipboardSharingSize'' setting will be used. If set to false, then clipboard sharing will be disabled and the the ''clipboardSharingSize'' setting will be ignored.|
|
||||
|clipboardSharingSize| integer (N)| Deskflow will send a maximum of `N` kilobytes of clipboard data to another computer when the mouse transitions to that computer.|
|
||||
|win32KeepForeground | `true` or `false`| If set to ''true'' (the default), Deskflow will grab the foreground focus on a Windows server (thereby putting all other windows in the background) upon switching to a client. If set to ''false'', it will leave the currently foreground window in the foreground. Deskflow grabs the focus to avoid issues with other apps interfering with Deskflow's ability to read the hardware inputs. |
|
||||
|keystroke(key) | actions | Binds the ''key'' combination key to the given ''actions''. ''key'' is an optional list of modifiers (''shift'', ''control'', ''alt'', ''meta'' or ''super'') optionally followed by a character or a key name, all separated by + (plus signs). You must have either modifiers or a character/key name or both. See below for `valid key names` and `actions`. Keyboard hot keys are handled while the cursor is on the primary screen and secondary screens. Separate actions can be assigned to press and release.|
|
||||
|mousebutton(button) | actions| Binds the modifier and mouse button combination ''button'' to the given ''actions''. ''button'' is an optional list of modifiers (''shift'', ''control'', ''alt'', ''meta'' or ''super'') followed by a button number. The primary button (the left button for right handed users) is button 1, the middle button is 2, etc. Actions can be found below. Mouse button actions are not handled while the cursor is on the primary screen. You cannot use these to perform an action while on the primary screen. Separate actions can be assigned to press and release.|
|
||||
|keystroke(key) | actions | Binds the ''key'' combination key to the given ''actions''. ''key'' is an optional list of modifiers (''shift'', ''control'', ''alt'', ''meta'' or ''super'') optionally followed by a character or a key name, all separated by + (plus signs). You must have either modifiers or a character/key name or both. See below for `valid key names` and `actions`. Keyboard hot keys are handled while the cursor any computer. Separate actions can be assigned to press and release.|
|
||||
|mousebutton(button) | actions| Binds the modifier and mouse button combination ''button'' to the given ''actions''. ''button'' is an optional list of modifiers (''shift'', ''control'', ''alt'', ''meta'' or ''super'') followed by a button number. The primary button (the left button for right handed users) is button 1, the middle button is 2, etc. Actions can be found below. Mouse button actions are not handled while the cursor is on the server. You cannot use these to perform an action while on the server. Separate actions can be assigned to press and release.|
|
||||
|
||||
|
||||
You can use both the ''switchDelay'' and ''switchDoubleTap'' options at the same time. Deskflow will switch when either requirement is satisfied.
|
||||
@ -406,16 +415,16 @@ You can use both the ''switchDelay'' and ''switchDoubleTap'' options at the same
|
||||
|
||||
Actions are two lists of individual actions separated by commas. The two lists are separated by a '';'' (semicolon). Either list can be empty and if the second list is empty then the semicolon is optional. The first list lists actions to take when the condition becomes true (e.g. the hot key or mouse button is pressed) and the second lists actions to take when the condition becomes false (e.g. the hot key or button is released). The condition becoming true is called activation and becoming false is called deactivation. Allowed individual actions are:
|
||||
|
||||
* `keystroke(key[,screens])`
|
||||
* `keystroke(key[,computers])`
|
||||
|
||||
* `keyDown(key[,screens])`
|
||||
* `keyDown(key[,computers])`
|
||||
|
||||
* `keyUp(key[,screens])`
|
||||
* `keyUp(key[,computers])`
|
||||
|
||||
|
||||
: Synthesizes the modifiers and key given in ''key'' which has the same form as described in the ''keystroke'' option. If given, ''screens'' lists the screen or screens to direct the event to, regardless of the active screen. If not given then the event is directed to the active screen only.
|
||||
: Synthesizes the modifiers and key given in ''key'' which has the same form as described in the ''keystroke'' option. If given, ''computers'' lists the computer or computers to direct the event to, regardless of the active computer. If not given then the event is directed to the active computer only.
|
||||
: ''keyDown'' synthesizes a key press and ''keyUp'' synthesizes a key release. ''keystroke'' synthesizes a key press on activation and a release on deactivation and is equivalent to a ''keyDown'' on activation and ''keyUp'' on deactivation.
|
||||
: ''screens'' is either ''*'' (asterisk) to indicate all screens or a '':'' (colon) separated list of screen names. (Note that the screen name must have already been encountered in the configuration file so you'll probably want to put ''actions'' at the bottom of the file.)
|
||||
: ''computers'' is either ''*'' (asterisk) to indicate all computers or a '':'' (colon) separated list of computer names. (Note that the computer name must have already been encountered in the configuration file so you'll probably want to put ''actions'' at the bottom of the file.)
|
||||
|
||||
* `mousebutton(button)`
|
||||
* `mouseDown(button)`
|
||||
@ -424,16 +433,16 @@ Actions are two lists of individual actions separated by commas. The two lists a
|
||||
: ''mouseDown'' synthesizes a mouse press and ''mouseUp'' synthesizes a mouse release. ''mousebutton'' synthesizes a mouse press on activation and a release on deactivation and is equivalent to a ''mouseDown'' on activation and ''mouseUp'' on deactivation.
|
||||
|
||||
* `lockCursorToScreen(mode)`
|
||||
: Locks the cursor to or unlocks the cursor from the active screen. ''mode'' can be ''off'' to unlock the cursor, ''on'' to lock the cursor, or ''toggle'' to toggle the current state. The default is ''toggle''. If the configuration has no ''lockCursorToScreen'' action and ''Scroll Lock'' is not used as a hot key then ''Scroll Lock'' toggles cursor locking.
|
||||
: Locks the cursor to or unlocks the cursor from the active computer. ''mode'' can be ''off'' to unlock the cursor, ''on'' to lock the cursor, or ''toggle'' to toggle the current state. The default is ''toggle''. If the configuration has no ''lockCursorToScreen'' action and ''Scroll Lock'' is not used as a hot key then ''Scroll Lock'' toggles cursor locking.
|
||||
|
||||
* `switchToScreen(screen)`
|
||||
: Jump to screen with name or alias ''screen''.
|
||||
* `switchToScreen(computerName)`
|
||||
: Jump to computer with name or alias ''computerName''.
|
||||
|
||||
* `switchInDirection(dir)`
|
||||
: Switch to the screen in the direction ''dir'', which may be one of ''left'', ''right'', ''up'' or ''down''.
|
||||
: Switch to the computer in the direction ''dir'', which may be one of ''left'', ''right'', ''up'' or ''down''.
|
||||
|
||||
* `switchToNextScreen()`
|
||||
: Cycle to the next screen in the configuration order. If at the last screen, cycles back to the first screen.
|
||||
: Cycle to the next computer in the configuration order. If at the last computer, cycles back to the first computer.
|
||||
|
||||
##### Keynames
|
||||
Valid key names are:
|
||||
@ -627,7 +636,7 @@ section: links
|
||||
# iMac is to the right of Desktop1
|
||||
# Laptop is to the left of Desktop1
|
||||
Desktop1:
|
||||
right(0,100) = iMac # the numbers in parentheses indicate the percentage of the screen's edge to be considered active for switching)
|
||||
right(0,100) = iMac # the numbers in parentheses indicate the percentage of the computer's edge to be considered active for switching)
|
||||
left = Laptop
|
||||
shift = shift (shift, alt, super, meta can be mapped to any of the others)
|
||||
# Desktop1 is to the right of Laptop
|
||||
@ -648,7 +657,7 @@ end
|
||||
|
||||
#### Cursor Wrapping
|
||||
|
||||
The text config allows screens to be wrapped around. For example, with two machines (a server and a client), the mouse can go off the right of the server onto the left side of the client, then off the right side of the client back onto the left side of server. This config also uses ''Ctrl''+''Super''+(''left arrow''/''right arrow'') to switch between machines on keypress.
|
||||
The text config allows computers to be wrapped around. For example, with two machines (a server and a client), the mouse can go off the right of the server onto the left side of the client, then off the right side of the client back onto the left side of server. This config also uses ''Ctrl''+''Super''+(''left arrow''/''right arrow'') to switch between machines on keypress.
|
||||
|
||||
```
|
||||
# Physical monitor arrangement, with machine names as used by Deskflow.
|
||||
@ -670,7 +679,7 @@ section: links
|
||||
right = syn-serv # "wrapping"
|
||||
end
|
||||
section: options
|
||||
keystroke(control+super+right) = switchInDirection(right) # Switch screens on keypress
|
||||
keystroke(control+super+right) = switchInDirection(right) # Switch computers on keypress
|
||||
<!-- keystroke(control+super+left) = switchInDirection(left) -->
|
||||
end
|
||||
```
|
||||
@ -689,7 +698,7 @@ See also: the man page for ''deskflow-core''.
|
||||
|
||||
### Stacked Example
|
||||
|
||||
Stack one computer's screen on top of another's.
|
||||
Stack one computer on top of another's.
|
||||
|
||||
```
|
||||
# +-------+
|
||||
@ -733,7 +742,7 @@ end
|
||||
|
||||
### Horizontal Example
|
||||
|
||||
Align all screens horizontally.
|
||||
Align all computers horizontally.
|
||||
|
||||
```
|
||||
# +-------+ +-------+ +-------+
|
||||
@ -767,7 +776,7 @@ end
|
||||
|
||||
### Span Example
|
||||
|
||||
Span two screens on one computer across the screens of two computers.
|
||||
Span one computer across the two other computers.
|
||||
|
||||
```
|
||||
# +-------+ +-------+
|
||||
|
||||
@ -1,10 +1,9 @@
|
||||
# SPDX-FileCopyrightText: 2024 Deskflow Developers
|
||||
# SPDX-FileCopyrightText: 2012 - 2024 Symless Ltd
|
||||
# SPDX-FileCopyrightText: 2009 - 2012 Nick Bolton
|
||||
# SPDX-FileCopyrightText: (C) 2024 Deskflow Developers
|
||||
# SPDX-FileCopyrightText: (C) 2012 - 2024 Symless Ltd
|
||||
# SPDX-FileCopyrightText: (C) 2009 - 2012 Nick Bolton
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
include_directories(./lib)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/lib)
|
||||
include_directories(./lib "${CMAKE_CURRENT_BINARY_DIR}/lib")
|
||||
|
||||
add_subdirectory(lib)
|
||||
add_subdirectory(apps)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# SPDX-FileCopyrightText: 2024 Deskflow Developers
|
||||
# SPDX-FileCopyrightText: 2012 - 2024 Symless Ltd
|
||||
# SPDX-FileCopyrightText: 2009 - 2012 Nick Bolton
|
||||
# SPDX-FileCopyrightText: (C) 2024 Deskflow Developers
|
||||
# SPDX-FileCopyrightText: (C) 2012 - 2024 Symless Ltd
|
||||
# SPDX-FileCopyrightText: (C) 2009 - 2012 Nick Bolton
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
@ -28,6 +28,15 @@ function(generate_app_man TARGET NAME)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
set(WIN32_PRE_EXCLUDE_REGEXES
|
||||
"api-ms-win-.*"
|
||||
"ext-ms-.*"
|
||||
"^hvsifiletrust\\.dll$"
|
||||
"^icu.*\\.dll$"
|
||||
)
|
||||
|
||||
set(WIN32_POST_EXCLUDE_REGEXES ".*system32.*")
|
||||
|
||||
add_subdirectory(deskflow-core)
|
||||
add_subdirectory(deskflow-daemon) #Only used on windows
|
||||
add_subdirectory(deskflow-gui)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# SPDX-FileCopyrightText: 2024 - 2025 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-FileCopyrightText: 2012 - 2024 Symless Ltd
|
||||
# SPDX-FileCopyrightText: 2009 - 2012 Nick Bolton
|
||||
# SPDX-FileCopyrightText: (C) 2024 - 2025 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-FileCopyrightText: (C) 2012 - 2024 Symless Ltd
|
||||
# SPDX-FileCopyrightText: (C) 2009 - 2012 Nick Bolton
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
set(target ${CMAKE_PROJECT_NAME}-core)
|
||||
@ -52,12 +52,8 @@ if(BUILD_OSX_BUNDLE)
|
||||
)
|
||||
elseif (WIN32)
|
||||
install(RUNTIME_DEPENDENCY_SET coreDeps
|
||||
PRE_EXCLUDE_REGEXES
|
||||
"api-ms-win-.*"
|
||||
"ext-ms-.*"
|
||||
"^hvsifiletrust\\.dll$"
|
||||
POST_EXCLUDE_REGEXES
|
||||
".*system32.*"
|
||||
PRE_EXCLUDE_REGEXES ${WIN32_PRE_EXCLUDE_REGEXES}
|
||||
POST_EXCLUDE_REGEXES ${WIN32_POST_EXCLUDE_REGEXES}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
)
|
||||
else()
|
||||
|
||||
@ -6,11 +6,11 @@
|
||||
|
||||
#include "CoreArgParser.h"
|
||||
#include "CoreArgs.h"
|
||||
#include "VersionInfo.h"
|
||||
|
||||
#include "common/Constants.h"
|
||||
#include "common/ExitCodes.h"
|
||||
#include "common/Settings.h"
|
||||
#include "common/VersionInfo.h"
|
||||
#include "deskflow/ProtocolTypes.h"
|
||||
|
||||
const QString CoreArgParser::s_headerText = QStringLiteral("%1: %2\n").arg(kCoreBinName, kDisplayVersion);
|
||||
|
||||
@ -66,22 +66,19 @@ int main(int argc, char **argv)
|
||||
return s_exitSuccess;
|
||||
}
|
||||
|
||||
if (parser.singleInstanceOnly()) {
|
||||
// Before we check any more args we need to check for a duplicate process.
|
||||
// Create a shared memory segment with a unique key
|
||||
// This is to prevent a new instance from running if one is already running
|
||||
QSharedMemory sharedMemory(kCoreBinName);
|
||||
// Before we check any more args we need to check for a duplicate process.
|
||||
// Create a shared memory segment with a unique key
|
||||
// This is to prevent a new instance from running if one is already running
|
||||
QSharedMemory sharedMemory(kCoreBinName);
|
||||
|
||||
// Attempt to attach first and detach in order to clean up stale shm chunks
|
||||
// This can happen if the previous instance was killed or crashed
|
||||
if (sharedMemory.attach())
|
||||
sharedMemory.detach();
|
||||
// Attempt to attach first and detach in order to clean up stale shm chunks
|
||||
// This can happen if the previous instance was killed or crashed
|
||||
if (sharedMemory.attach())
|
||||
sharedMemory.detach();
|
||||
|
||||
// If we can create 1 byte of SHM we are the only instance
|
||||
if (!sharedMemory.create(1)) {
|
||||
LOG_WARN("an instance of deskflow core is already running");
|
||||
return s_exitDuplicate;
|
||||
}
|
||||
if (!sharedMemory.create(1) && parser.singleInstanceOnly()) {
|
||||
LOG_WARN("an instance of deskflow core is already running");
|
||||
return s_exitDuplicate;
|
||||
}
|
||||
|
||||
parser.parse();
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# SPDX-FileCopyrightText: 2024 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-FileCopyrightText: 2012 - 2024 Symless Ltd
|
||||
# SPDX-FileCopyrightText: 2009 - 2012 Nick Bolton
|
||||
# SPDX-FileCopyrightText: (C) 2024 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-FileCopyrightText: (C) 2012 - 2024 Symless Ltd
|
||||
# SPDX-FileCopyrightText: (C) 2009 - 2012 Nick Bolton
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
# Daemon is only needed on Windows for elevating processes to deal with UAC.
|
||||
@ -12,7 +12,12 @@ if(WIN32)
|
||||
set(EXE_ICON "IDI_DESKFLOW ICON DISCARDABLE \"${CMAKE_SOURCE_DIR}/src/apps/res/deskflow.ico\"")
|
||||
configure_file(${CMAKE_SOURCE_DIR}/src/apps/res/windows.rc.in ${target}.rc)
|
||||
|
||||
add_executable(${target} WIN32 ${target}.cpp ${CMAKE_CURRENT_BINARY_DIR}/${target}.rc)
|
||||
add_executable(
|
||||
${target} WIN32
|
||||
${target}.cpp
|
||||
DaemonApp.cpp
|
||||
DaemonApp.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${target}.rc)
|
||||
|
||||
target_link_libraries(
|
||||
${target}
|
||||
@ -29,16 +34,12 @@ if(WIN32)
|
||||
|
||||
install(
|
||||
TARGETS ${target}
|
||||
RUNTIME_DEPENDENCY_SET deamonDeps
|
||||
RUNTIME_DEPENDENCY_SET daemonDeps
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
install(RUNTIME_DEPENDENCY_SET daemonDeps
|
||||
PRE_EXCLUDE_REGEXES
|
||||
"api-ms-win-.*"
|
||||
"ext-ms-.*"
|
||||
"^hvsifiletrust\\.dll$"
|
||||
POST_EXCLUDE_REGEXES
|
||||
".*system32.*"
|
||||
PRE_EXCLUDE_REGEXES ${WIN32_PRE_EXCLUDE_REGEXES}
|
||||
POST_EXCLUDE_REGEXES ${WIN32_POST_EXCLUDE_REGEXES}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
/*
|
||||
* Deskflow -- mouse and keyboard sharing utility
|
||||
* SPDX-FileCopyrightText: (C) 2026 Deskflow Developers
|
||||
* SPDX-FileCopyrightText: (C) 2012 - 2025 Symless Ltd.
|
||||
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
||||
*/
|
||||
|
||||
#include "deskflow/DaemonApp.h"
|
||||
#include "DaemonApp.h"
|
||||
|
||||
#include "arch/Arch.h"
|
||||
#include "base/IEventQueue.h"
|
||||
@ -12,12 +13,11 @@
|
||||
#include "base/LogOutputters.h"
|
||||
#include "common/ExitCodes.h"
|
||||
#include "common/Settings.h"
|
||||
#include "deskflow/App.h"
|
||||
#include "deskflow/ipc/DaemonIpcServer.h"
|
||||
|
||||
#if SYSAPI_WIN32
|
||||
|
||||
#include "arch/win32/ArchMiscWindows.h" // IWYU pragma: keep
|
||||
#include "arch/win32/ArchDaemonWindows.h"
|
||||
#include "deskflow/Screen.h"
|
||||
#include "platform/MSWindowsDebugOutputter.h"
|
||||
#include "platform/MSWindowsEventQueueBuffer.h"
|
||||
@ -28,18 +28,10 @@
|
||||
|
||||
#endif
|
||||
|
||||
#include <filesystem>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
using namespace deskflow::core;
|
||||
|
||||
void showHelp(int argc, char **argv) // NOSONAR - CLI args
|
||||
{
|
||||
const auto binName = argc > 0 ? std::filesystem::path(argv[0]).filename().string() : kDaemonBinName;
|
||||
std::cout << "Usage: " << binName << " [-f|--foreground] [--install] [--uninstall]" << std::endl;
|
||||
}
|
||||
|
||||
DaemonApp::DaemonApp(IEventQueue &events) : m_events(events)
|
||||
{
|
||||
// do nothing
|
||||
@ -96,10 +88,10 @@ void DaemonApp::clearWatchdogCommand()
|
||||
void DaemonApp::clearSettings() const
|
||||
{
|
||||
LOG_INFO("clearing daemon settings");
|
||||
Settings::setValue(Settings::Daemon::Command, QVariant());
|
||||
Settings::setValue(Settings::Daemon::Elevate, QVariant());
|
||||
Settings::setValue(Settings::Daemon::LogFile, QVariant());
|
||||
Settings::setValue(Settings::Daemon::LogLevel, QVariant());
|
||||
Settings::setValue(Settings::Daemon::Command);
|
||||
Settings::setValue(Settings::Daemon::Elevate);
|
||||
Settings::setValue(Settings::Daemon::LogFile);
|
||||
Settings::setValue(Settings::Daemon::LogLevel);
|
||||
}
|
||||
|
||||
void DaemonApp::connectIpcServer(const ipc::DaemonIpcServer *ipcServer) const
|
||||
@ -164,7 +156,7 @@ int DaemonApp::daemonLoop()
|
||||
{
|
||||
#if SYSAPI_WIN32
|
||||
// Runs the daemon through the Windows service controller, which controls the program lifecycle.
|
||||
return ArchMiscWindows::runDaemon([this]() { return mainLoop(); });
|
||||
return ArchDaemonWindows::runDaemon([this]() { return mainLoop(); });
|
||||
#elif SYSAPI_UNIX
|
||||
return mainLoop();
|
||||
#endif
|
||||
@ -177,10 +169,9 @@ int DaemonApp::mainLoop()
|
||||
LOG_ERR("watchdog not initialized");
|
||||
return s_exitFailed;
|
||||
}
|
||||
ArchDaemonWindows::daemonRunning(true);
|
||||
#endif
|
||||
|
||||
DAEMON_RUNNING(true);
|
||||
|
||||
try {
|
||||
#if SYSAPI_WIN32
|
||||
// Install the platform event queue to handle service stop events.
|
||||
@ -211,9 +202,9 @@ int DaemonApp::mainLoop()
|
||||
} catch (...) { // NOSONAR - Catching remaining exceptions
|
||||
LOG_CRIT("daemon stop watchdog unknown error");
|
||||
}
|
||||
ArchDaemonWindows::daemonRunning(false);
|
||||
#endif
|
||||
|
||||
DAEMON_RUNNING(false);
|
||||
return s_exitSuccess;
|
||||
}
|
||||
|
||||
@ -32,20 +32,9 @@ class DaemonApp : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum class InitResult
|
||||
{
|
||||
Installed,
|
||||
Uninstalled,
|
||||
StartDaemon,
|
||||
ShowHelp,
|
||||
ArgsError,
|
||||
FatalError,
|
||||
};
|
||||
|
||||
explicit DaemonApp(IEventQueue &events);
|
||||
~DaemonApp() override;
|
||||
|
||||
InitResult init(int argc, char **argv);
|
||||
void run(QThread &daemonThread);
|
||||
void setForeground();
|
||||
void initLogging();
|
||||
@ -5,13 +5,14 @@
|
||||
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
||||
*/
|
||||
|
||||
#include "VersionInfo.h"
|
||||
#include "DaemonApp.h"
|
||||
|
||||
#include "arch/Arch.h"
|
||||
#include "base/EventQueue.h"
|
||||
#include "base/Log.h"
|
||||
#include "common/ExitCodes.h"
|
||||
#include "common/Settings.h"
|
||||
#include "deskflow/DaemonApp.h"
|
||||
#include "common/VersionInfo.h"
|
||||
#include "deskflow/ipc/DaemonIpcServer.h"
|
||||
|
||||
#if SYSAPI_WIN32
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# SPDX-FileCopyrightText: 2024 - 2025 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-FileCopyrightText: 2024 Symless Ltd
|
||||
# SPDX-FileCopyrightText: (C) 2024 - 2025 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-FileCopyrightText: (C) 2024 Symless Ltd
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
if(APPLE)
|
||||
@ -60,12 +60,8 @@ if(WIN32)
|
||||
set_target_properties(${target} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:LIBCMT")
|
||||
|
||||
install(RUNTIME_DEPENDENCY_SET guiDeps
|
||||
PRE_EXCLUDE_REGEXES
|
||||
"api-ms-win-.*"
|
||||
"ext-ms-.*"
|
||||
"^hvsifiletrust\\.dll$"
|
||||
POST_EXCLUDE_REGEXES
|
||||
".*system32.*"
|
||||
PRE_EXCLUDE_REGEXES ${WIN32_PRE_EXCLUDE_REGEXES}
|
||||
POST_EXCLUDE_REGEXES ${WIN32_POST_EXCLUDE_REGEXES}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
)
|
||||
|
||||
@ -90,6 +86,7 @@ if(WIN32)
|
||||
DIRECTORY ${QT_DEPENDS_DIR}/
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
PATTERN "dx*.dll" EXCLUDE
|
||||
PATTERN "icu*.dll" EXCLUDE
|
||||
)
|
||||
|
||||
elseif(APPLE)
|
||||
|
||||
@ -6,12 +6,12 @@
|
||||
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
||||
*/
|
||||
|
||||
#include "VersionInfo.h"
|
||||
#include "common/Constants.h"
|
||||
#include "common/ExitCodes.h"
|
||||
#include "common/I18N.h"
|
||||
#include "common/PlatformInfo.h"
|
||||
#include "common/UrlConstants.h"
|
||||
#include "common/VersionInfo.h"
|
||||
#include "gui/Diagnostic.h"
|
||||
#include "gui/MainWindow.h"
|
||||
#include "gui/Messages.h"
|
||||
|
||||
@ -30,8 +30,12 @@
|
||||
<true/>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>@BUNDLE_COPYRIGHT@</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.utilities</string>
|
||||
|
||||
<!-- Don't Allow Os to kill for memory -->
|
||||
<!-- Prevent macOS from terminating during memory pressure -->
|
||||
<key>NSSupportsAutomaticTermination</key>
|
||||
<false/>
|
||||
<key>NSSupportsSuddenTermination</key>
|
||||
<false/>
|
||||
|
||||
|
||||
@ -5,11 +5,14 @@
|
||||
<file>icons/deskflow-dark/actions/16/document-edit.svg</file>
|
||||
<file>icons/deskflow-dark/actions/16/document-open.svg</file>
|
||||
<file>icons/deskflow-dark/actions/16/document-save-as.svg</file>
|
||||
<file>icons/deskflow-dark/actions/16/go-down.svg</file>
|
||||
<file>icons/deskflow-dark/actions/16/go-up.svg</file>
|
||||
<file>icons/deskflow-dark/actions/16/help-about.svg</file>
|
||||
<file>icons/deskflow-dark/actions/16/network-connect.svg</file>
|
||||
<file>icons/deskflow-dark/actions/16/network-disconnect.svg</file>
|
||||
<file>icons/deskflow-dark/actions/16/process-stop.svg</file>
|
||||
<file>icons/deskflow-dark/actions/16/system-run.svg</file>
|
||||
<file>icons/deskflow-dark/actions/16/system-search.svg</file>
|
||||
<file>icons/deskflow-dark/actions/16/tools-report-bug.svg</file>
|
||||
<file>icons/deskflow-dark/actions/16/view-close.svg</file>
|
||||
<file>icons/deskflow-dark/actions/16/view-refresh.svg</file>
|
||||
@ -21,11 +24,14 @@
|
||||
<file>icons/deskflow-dark/actions/22/document-open.svg</file>
|
||||
<file>icons/deskflow-dark/actions/22/document-save-as.svg</file>
|
||||
<file>icons/deskflow-dark/actions/22/fingerprint.svg</file>
|
||||
<file>icons/deskflow-dark/actions/22/go-down.svg</file>
|
||||
<file>icons/deskflow-dark/actions/22/go-up.svg</file>
|
||||
<file>icons/deskflow-dark/actions/22/help-about.svg</file>
|
||||
<file>icons/deskflow-dark/actions/22/network-connect.svg</file>
|
||||
<file>icons/deskflow-dark/actions/22/network-disconnect.svg</file>
|
||||
<file>icons/deskflow-dark/actions/22/process-stop.svg</file>
|
||||
<file>icons/deskflow-dark/actions/22/system-run.svg</file>
|
||||
<file>icons/deskflow-dark/actions/22/system-search.svg</file>
|
||||
<file>icons/deskflow-dark/actions/22/tools-report-bug.svg</file>
|
||||
<file>icons/deskflow-dark/actions/22/view-close.svg</file>
|
||||
<file>icons/deskflow-dark/actions/22/view-refresh.svg</file>
|
||||
@ -36,6 +42,8 @@
|
||||
<file>icons/deskflow-dark/actions/24/document-edit.svg</file>
|
||||
<file>icons/deskflow-dark/actions/24/document-open.svg</file>
|
||||
<file>icons/deskflow-dark/actions/24/document-save-as.svg</file>
|
||||
<file>icons/deskflow-dark/actions/24/go-down.svg</file>
|
||||
<file>icons/deskflow-dark/actions/24/go-up.svg</file>
|
||||
<file>icons/deskflow-dark/actions/24/edit-clear-all.svg</file>
|
||||
<file>icons/deskflow-dark/actions/24/fingerprint.svg</file>
|
||||
<file>icons/deskflow-dark/actions/24/help-about.svg</file>
|
||||
@ -43,6 +51,7 @@
|
||||
<file>icons/deskflow-dark/actions/24/network-disconnect.svg</file>
|
||||
<file>icons/deskflow-dark/actions/24/process-stop.svg</file>
|
||||
<file>icons/deskflow-dark/actions/24/system-run.svg</file>
|
||||
<file>icons/deskflow-dark/actions/24/system-search.svg</file>
|
||||
<file>icons/deskflow-dark/actions/24/tools-report-bug.svg</file>
|
||||
<file>icons/deskflow-dark/actions/24/view-close.svg</file>
|
||||
<file>icons/deskflow-dark/actions/24/view-refresh.svg</file>
|
||||
@ -55,8 +64,11 @@
|
||||
<file>icons/deskflow-dark/actions/32/dialog-ok-apply.svg</file>
|
||||
<file>icons/deskflow-dark/actions/32/document-open.svg</file>
|
||||
<file>icons/deskflow-dark/actions/32/document-save-as.svg</file>
|
||||
<file>icons/deskflow-dark/actions/32/go-down.svg</file>
|
||||
<file>icons/deskflow-dark/actions/32/go-up.svg</file>
|
||||
<file>icons/deskflow-dark/actions/32/help-about.svg</file>
|
||||
<file>icons/deskflow-dark/actions/32/view-refresh.svg</file>
|
||||
<file>icons/deskflow-dark/actions/32/system-search.svg</file>
|
||||
<file>icons/deskflow-dark/apps/64/org.deskflow.deskflow.svg</file>
|
||||
<file>icons/deskflow-dark/apps/64/org.deskflow.deskflow-symbolic.svg</file>
|
||||
<file>icons/deskflow-dark/devices/64/video-display.svg</file>
|
||||
@ -77,11 +89,14 @@
|
||||
<file>icons/deskflow-light/actions/16/document-edit.svg</file>
|
||||
<file>icons/deskflow-light/actions/16/document-open.svg</file>
|
||||
<file>icons/deskflow-light/actions/16/document-save-as.svg</file>
|
||||
<file>icons/deskflow-light/actions/16/go-down.svg</file>
|
||||
<file>icons/deskflow-light/actions/16/go-up.svg</file>
|
||||
<file>icons/deskflow-light/actions/16/help-about.svg</file>
|
||||
<file>icons/deskflow-light/actions/16/network-connect.svg</file>
|
||||
<file>icons/deskflow-light/actions/16/network-disconnect.svg</file>
|
||||
<file>icons/deskflow-light/actions/16/process-stop.svg</file>
|
||||
<file>icons/deskflow-light/actions/16/system-run.svg</file>
|
||||
<file>icons/deskflow-light/actions/16/system-search.svg</file>
|
||||
<file>icons/deskflow-light/actions/16/tools-report-bug.svg</file>
|
||||
<file>icons/deskflow-light/actions/16/view-close.svg</file>
|
||||
<file>icons/deskflow-light/actions/16/view-refresh.svg</file>
|
||||
@ -94,11 +109,14 @@
|
||||
<file>icons/deskflow-light/actions/22/document-open.svg</file>
|
||||
<file>icons/deskflow-light/actions/22/document-save-as.svg</file>
|
||||
<file>icons/deskflow-light/actions/22/fingerprint.svg</file>
|
||||
<file>icons/deskflow-light/actions/22/go-down.svg</file>
|
||||
<file>icons/deskflow-light/actions/22/go-up.svg</file>
|
||||
<file>icons/deskflow-light/actions/22/network-connect.svg</file>
|
||||
<file>icons/deskflow-light/actions/22/network-disconnect.svg</file>
|
||||
<file>icons/deskflow-light/actions/22/help-about.svg</file>
|
||||
<file>icons/deskflow-light/actions/22/process-stop.svg</file>
|
||||
<file>icons/deskflow-light/actions/22/system-run.svg</file>
|
||||
<file>icons/deskflow-light/actions/22/system-search.svg</file>
|
||||
<file>icons/deskflow-light/actions/22/tools-report-bug.svg</file>
|
||||
<file>icons/deskflow-light/actions/22/view-close.svg</file>
|
||||
<file>icons/deskflow-light/actions/22/view-refresh.svg</file>
|
||||
@ -111,11 +129,14 @@
|
||||
<file>icons/deskflow-light/actions/24/document-edit.svg</file>
|
||||
<file>icons/deskflow-light/actions/24/document-open.svg</file>
|
||||
<file>icons/deskflow-light/actions/24/document-save-as.svg</file>
|
||||
<file>icons/deskflow-light/actions/24/go-down.svg</file>
|
||||
<file>icons/deskflow-light/actions/24/go-up.svg</file>
|
||||
<file>icons/deskflow-light/actions/24/help-about.svg</file>
|
||||
<file>icons/deskflow-light/actions/24/network-connect.svg</file>
|
||||
<file>icons/deskflow-light/actions/24/network-disconnect.svg</file>
|
||||
<file>icons/deskflow-light/actions/24/process-stop.svg</file>
|
||||
<file>icons/deskflow-light/actions/24/system-run.svg</file>
|
||||
<file>icons/deskflow-light/actions/24/system-search.svg</file>
|
||||
<file>icons/deskflow-light/actions/24/tools-report-bug.svg</file>
|
||||
<file>icons/deskflow-light/actions/24/view-close.svg</file>
|
||||
<file>icons/deskflow-light/actions/24/view-refresh.svg</file>
|
||||
@ -128,8 +149,11 @@
|
||||
<file>icons/deskflow-light/actions/32/dialog-ok-apply.svg</file>
|
||||
<file>icons/deskflow-light/actions/32/document-open.svg</file>
|
||||
<file>icons/deskflow-light/actions/32/document-save-as.svg</file>
|
||||
<file>icons/deskflow-light/actions/32/go-down.svg</file>
|
||||
<file>icons/deskflow-light/actions/32/go-up.svg</file>
|
||||
<file>icons/deskflow-light/actions/32/help-about.svg</file>
|
||||
<file>icons/deskflow-light/actions/32/view-refresh.svg</file>
|
||||
<file>icons/deskflow-light/actions/32/system-search.svg</file>
|
||||
<file>icons/deskflow-light/apps/64/org.deskflow.deskflow.svg</file>
|
||||
<file>icons/deskflow-light/apps/64/org.deskflow.deskflow-symbolic.svg</file>
|
||||
<file>icons/deskflow-light/devices/64/video-display.svg</file>
|
||||
|
||||
5
src/apps/res/icons/deskflow-dark/actions/16/go-down.svg
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
||||
<style type="text/css" id="current-color-scheme">.ColorScheme-Text { color: #fcfcfc; } </style>
|
||||
<path d="M8 11.707l-6-6L2.707 5 8 10.293 13.293 5l.707.707-6 6z" class="ColorScheme-Text" fill="currentColor"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 323 B |
5
src/apps/res/icons/deskflow-dark/actions/16/go-up.svg
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
||||
<style type="text/css" id="current-color-scheme">.ColorScheme-Text { color: #fcfcfc; } </style>
|
||||
<path d="M8 4.293l-6 6 .707.707L8 5.707 13.293 11l.707-.707-6-6z" class="ColorScheme-Text" fill="currentColor"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 324 B |
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">.ColorScheme-Text { color: #fcfcfc; } </style>
|
||||
</defs>
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none" d="M 6.5 2 C 4.007 2 2 4.01 2 6.5 C 2 8.993 4.01 11 6.5 11 C 7.5636432 11 8.5263409 10.618801 9.2949219 10.005859 L 13.292969 14.003906 L 14 13.296875 L 10.001953 9.2988281 C 10.617604 8.529048 11 7.565338 11 6.5 C 11 4.007 8.99 2 6.5 2 z M 6.5 3 C 8.439 3 10 4.561 10 6.5 C 10 8.439 8.439 10 6.5 10 C 4.561 10 3 8.439 3 6.5 C 3 4.561 4.561 3 6.5 3 z " class="ColorScheme-Text"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 680 B |
7
src/apps/res/icons/deskflow-dark/actions/22/go-down.svg
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">.ColorScheme-Text { color: #fcfcfc; } </style>
|
||||
</defs>
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none" d="m3.707031 7l-.707031.707031 6.125 6.125 1.875 1.875 1.875-1.875 6.125-6.125-.707031-.707031-6.125 6.125-1.167969 1.167969-1.167969-1.167969-6.125-6.125" class="ColorScheme-Text"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 485 B |
5
src/apps/res/icons/deskflow-dark/actions/22/go-up.svg
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">
|
||||
<style type="text/css" id="current-color-scheme">.ColorScheme-Text { color: #fcfcfc; } </style>
|
||||
<path d="M3.707 15L3 14.293l6.125-6.125L11 6.293l1.875 1.875L19 14.293l-.707.707-6.125-6.125L11 7.707 9.832 8.875 3.707 15" class="ColorScheme-Text" fill="currentColor"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 382 B |
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">.ColorScheme-Text { color: #fcfcfc; } </style>
|
||||
</defs>
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none" d="M 9 3 C 5.6759952 3 3 5.6759952 3 9 C 3 12.324005 5.6759952 15 9 15 C 10.481205 15 11.830584 14.465318 12.875 13.582031 L 18.292969 19 L 19 18.292969 L 13.582031 12.875 C 14.465318 11.830584 15 10.481205 15 9 C 15 5.6759952 12.324005 3 9 3 z M 9 4 C 11.770005 4 14 6.2299952 14 9 C 14 11.770005 11.770005 14 9 14 C 6.2299952 14 4 11.770005 4 9 C 4 6.2299952 6.2299952 4 9 4 z " class="ColorScheme-Text"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 710 B |
9
src/apps/res/icons/deskflow-dark/actions/24/go-down.svg
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">.ColorScheme-Text { color: #fcfcfc; } </style>
|
||||
</defs>
|
||||
<g transform="translate(1,1)">
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none" d="m3.707031 7l-.707031.707031 6.125 6.125 1.875 1.875 1.875-1.875 6.125-6.125-.707031-.707031-6.125 6.125-1.167969 1.167969-1.167969-1.167969-6.125-6.125" class="ColorScheme-Text"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 549 B |
7
src/apps/res/icons/deskflow-dark/actions/24/go-up.svg
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
||||
<style type="text/css" id="current-color-scheme">.ColorScheme-Text { color: #fcfcfc; } </style>
|
||||
<g transform="translate(1,1)">
|
||||
<path d="M3.707 15L3 14.293l6.125-6.125L11 6.293l1.875 1.875L19 14.293l-.707.707-6.125-6.125L11 7.707 9.832 8.875 3.707 15" class="ColorScheme-Text" fill="currentColor"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 443 B |
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">.ColorScheme-Text { color: #fcfcfc; } </style>
|
||||
</defs>
|
||||
<g transform="translate(1,1)">
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none" d="M 9 3 C 5.6759952 3 3 5.6759952 3 9 C 3 12.324005 5.6759952 15 9 15 C 10.481205 15 11.830584 14.465318 12.875 13.582031 L 18.292969 19 L 19 18.292969 L 13.582031 12.875 C 14.465318 11.830584 15 10.481205 15 9 C 15 5.6759952 12.324005 3 9 3 z M 9 4 C 11.770005 4 14 6.2299952 14 9 C 14 11.770005 11.770005 14 9 14 C 6.2299952 14 4 11.770005 4 9 C 4 6.2299952 6.2299952 4 9 4 z " class="ColorScheme-Text"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 774 B |
5
src/apps/res/icons/deskflow-dark/actions/32/go-down.svg
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
|
||||
<style type="text/css" id="current-color-scheme">.ColorScheme-Text { color: #fcfcfc; } </style>
|
||||
<path d="M16 23.707l-14-14L2.707 9 16 22.293 29.293 9l.707.707z" class="ColorScheme-Text" fill="currentColor"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 323 B |
5
src/apps/res/icons/deskflow-dark/actions/32/go-up.svg
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
|
||||
<style type="text/css" id="current-color-scheme">.ColorScheme-Text { color: #fcfcfc; } </style>
|
||||
<path d="M16 8.293l-14 14 .707.707L16 9.707 29.293 23l.707-.707z" class="ColorScheme-Text" fill="currentColor"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 324 B |
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" width="32" height="32">
|
||||
<style type="text/css" id="current-color-scheme">.ColorScheme-Text { color: #fcfcfc; } </style>
|
||||
<g id="system-search" transform="translate(0 -32) translate(-22,32)">
|
||||
<path id="path66" class="ColorScheme-Text" d="m35 4a9 9 0 0 0-9 9 9 9 0 0 0 9 9 9 9 0 0 0 5.994141-2.298828l8.298828 8.298828 0.707031-0.707031-8.300781-8.300782a9 9 0 0 0 2.300781-5.992187 9 9 0 0 0-9-9zm0 1a8 8 0 0 1 8 8 8 8 0 0 1-8 8 8 8 0 0 1-8-8 8 8 0 0 1 8-8z" fill="currentColor"/>
|
||||
<path id="path68" d="m22 0v32h32v-32z" fill="none"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 965 B |
10
src/apps/res/icons/deskflow-light/actions/16/go-down.svg
Normal file
@ -0,0 +1,10 @@
|
||||
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
||||
<style
|
||||
type="text/css"
|
||||
id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#232629;
|
||||
}
|
||||
</style>
|
||||
<path d="M8 11.707l-6-6L2.707 5 8 10.293 13.293 5l.707.707-6 6z" class="ColorScheme-Text" fill="currentColor"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 332 B |
10
src/apps/res/icons/deskflow-light/actions/16/go-up.svg
Normal file
@ -0,0 +1,10 @@
|
||||
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
||||
<style
|
||||
type="text/css"
|
||||
id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#232629;
|
||||
}
|
||||
</style>
|
||||
<path d="M8 4.293l-6 6 .707.707L8 5.707 13.293 11l.707-.707-6-6z" class="ColorScheme-Text" fill="currentColor"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 333 B |
@ -0,0 +1,13 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#232629;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="M 6.5 2 C 4.007 2 2 4.01 2 6.5 C 2 8.993 4.01 11 6.5 11 C 7.5636432 11 8.5263409 10.618801 9.2949219 10.005859 L 13.292969 14.003906 L 14 13.296875 L 10.001953 9.2988281 C 10.617604 8.529048 11 7.565338 11 6.5 C 11 4.007 8.99 2 6.5 2 z M 6.5 3 C 8.439 3 10 4.561 10 6.5 C 10 8.439 8.439 10 6.5 10 C 4.561 10 3 8.439 3 6.5 C 3 4.561 4.561 3 6.5 3 z "
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 684 B |
14
src/apps/res/icons/deskflow-light/actions/22/go-down.svg
Normal file
@ -0,0 +1,14 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#232629;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path
|
||||
style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="m3.707031 7l-.707031.707031 6.125 6.125 1.875 1.875 1.875-1.875 6.125-6.125-.707031-.707031-6.125 6.125-1.167969 1.167969-1.167969-1.167969-6.125-6.125"
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 488 B |
10
src/apps/res/icons/deskflow-light/actions/22/go-up.svg
Normal file
@ -0,0 +1,10 @@
|
||||
<svg viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">
|
||||
<style
|
||||
type="text/css"
|
||||
id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#232629;
|
||||
}
|
||||
</style>
|
||||
<path d="M3.707 15L3 14.293l6.125-6.125L11 6.293l1.875 1.875L19 14.293l-.707.707-6.125-6.125L11 7.707 9.832 8.875 3.707 15" class="ColorScheme-Text" fill="currentColor"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 391 B |
@ -0,0 +1,14 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#232629;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path
|
||||
style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="M 9 3 C 5.6759952 3 3 5.6759952 3 9 C 3 12.324005 5.6759952 15 9 15 C 10.481205 15 11.830584 14.465318 12.875 13.582031 L 18.292969 19 L 19 18.292969 L 13.582031 12.875 C 14.465318 11.830584 15 10.481205 15 9 C 15 5.6759952 12.324005 3 9 3 z M 9 4 C 11.770005 4 14 6.2299952 14 9 C 14 11.770005 11.770005 14 9 14 C 6.2299952 14 4 11.770005 4 9 C 4 6.2299952 6.2299952 4 9 4 z "
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 716 B |
12
src/apps/res/icons/deskflow-light/actions/24/go-down.svg
Normal file
@ -0,0 +1,12 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#232629;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<g transform="translate(1,1)">
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none" d="m3.707031 7l-.707031.707031 6.125 6.125 1.875 1.875 1.875-1.875 6.125-6.125-.707031-.707031-6.125 6.125-1.167969 1.167969-1.167969-1.167969-6.125-6.125" class="ColorScheme-Text"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 536 B |
10
src/apps/res/icons/deskflow-light/actions/24/go-up.svg
Normal file
@ -0,0 +1,10 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#232629;
|
||||
}
|
||||
</style>
|
||||
<g transform="translate(1,1)">
|
||||
<path d="M3.707 15L3 14.293l6.125-6.125L11 6.293l1.875 1.875L19 14.293l-.707.707-6.125-6.125L11 7.707 9.832 8.875 3.707 15" class="ColorScheme-Text" fill="currentColor"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 436 B |
@ -0,0 +1,12 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#232629;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<g transform="translate(1,1)">
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none" d="M 9 3 C 5.6759952 3 3 5.6759952 3 9 C 3 12.324005 5.6759952 15 9 15 C 10.481205 15 11.830584 14.465318 12.875 13.582031 L 18.292969 19 L 19 18.292969 L 13.582031 12.875 C 14.465318 11.830584 15 10.481205 15 9 C 15 5.6759952 12.324005 3 9 3 z M 9 4 C 11.770005 4 14 6.2299952 14 9 C 14 11.770005 11.770005 14 9 14 C 6.2299952 14 4 11.770005 4 9 C 4 6.2299952 6.2299952 4 9 4 z " class="ColorScheme-Text"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 761 B |
10
src/apps/res/icons/deskflow-light/actions/32/go-down.svg
Normal file
@ -0,0 +1,10 @@
|
||||
<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
|
||||
<style
|
||||
type="text/css"
|
||||
id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#232629;
|
||||
}
|
||||
</style>
|
||||
<path d="M16 23.707l-14-14L2.707 9 16 22.293 29.293 9l.707.707z" class="ColorScheme-Text" fill="currentColor"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 332 B |
10
src/apps/res/icons/deskflow-light/actions/32/go-up.svg
Normal file
@ -0,0 +1,10 @@
|
||||
<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
|
||||
<style
|
||||
type="text/css"
|
||||
id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#232629;
|
||||
}
|
||||
</style>
|
||||
<path d="M16 8.293l-14 14 .707.707L16 9.707 29.293 23l.707-.707z" class="ColorScheme-Text" fill="currentColor"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 333 B |
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" width="32" height="32">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#232629;
|
||||
}
|
||||
</style>
|
||||
<g id="system-search" transform="translate(0 -32) translate(-22,32)">
|
||||
<path id="path66" class="ColorScheme-Text" d="m35 4a9 9 0 0 0-9 9 9 9 0 0 0 9 9 9 9 0 0 0 5.994141-2.298828l8.298828 8.298828 0.707031-0.707031-8.300781-8.300782a9 9 0 0 0 2.300781-5.992187 9 9 0 0 0-9-9zm0 1a8 8 0 0 1 8 8 8 8 0 0 1-8 8 8 8 0 0 1-8-8 8 8 0 0 1 8-8z" fill="currentColor"/>
|
||||
<path id="path68" d="m22 0v32h32v-32z" fill="none"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 997 B |
@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: 2025 Chris Rizzitello <sithlord48@gmail.com>
|
||||
// SPDX-FileCopyrightText: (C) 2025 Chris Rizzitello <sithlord48@gmail.com>
|
||||
// SPDX-License-Identifier: MIT
|
||||
// Generic Template for rc files in deskflow
|
||||
#include <windows.h>
|
||||
|
||||
@ -1,10 +1,8 @@
|
||||
# SPDX-FileCopyrightText: 2024 Deskflow Developers
|
||||
# SPDX-FileCopyrightText: 2012 - 2024 Symless Ltd
|
||||
# SPDX-FileCopyrightText: 2009 - 2012 Nick Bolton
|
||||
# SPDX-FileCopyrightText: (C) 2024 Deskflow Developers
|
||||
# SPDX-FileCopyrightText: (C) 2012 - 2024 Symless Ltd
|
||||
# SPDX-FileCopyrightText: (C) 2009 - 2012 Nick Bolton
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
configure_file(VersionInfo.h.in VersionInfo.h @ONLY)
|
||||
|
||||
add_subdirectory(arch)
|
||||
add_subdirectory(base)
|
||||
add_subdirectory(client)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# SPDX-FileCopyrightText: 2024 - 2025 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-FileCopyrightText: 2012 - 2024 Symless Ltd
|
||||
# SPDX-FileCopyrightText: 2009 - 2012 Nick Bolton
|
||||
# SPDX-FileCopyrightText: (C) 2024 - 2025 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-FileCopyrightText: (C) 2012 - 2024 Symless Ltd
|
||||
# SPDX-FileCopyrightText: (C) 2009 - 2012 Nick Bolton
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
# Platform Specific Code
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Deskflow -- mouse and keyboard sharing utility
|
||||
* SPDX-FileCopyrightText: (C) 2025 Deskflow Developers
|
||||
* SPDX-FileCopyrightText: (C) 2025 - 2026 Deskflow Developers
|
||||
* SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd.
|
||||
* SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman
|
||||
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
||||
@ -41,16 +41,16 @@ public:
|
||||
Becomes a service. Argument 0 is the name of the service
|
||||
and the rest are the arguments passed to StartService().
|
||||
\c func is only called when the service is actually started.
|
||||
\c func must call \c ArchMiscWindows::runDaemon() to finally
|
||||
\c func must call \c ArchDaemonWindows::runDaemon() to finally
|
||||
becoming a service. The \c runFunc function passed to \c runDaemon()
|
||||
must call \c ArchMiscWindows::daemonRunning(true) when it
|
||||
must call \c ArchDaemonWindows::daemonRunning(true) when it
|
||||
enters the main loop (i.e. after initialization) and
|
||||
\c ArchMiscWindows::daemonRunning(false) when it leaves
|
||||
\c ArchDaemonWindows::daemonRunning(false) when it leaves
|
||||
the main loop. The \c stopFunc function passed to \c runDaemon()
|
||||
is called when the daemon must exit the main loop and it must cause
|
||||
\c runFunc to return. \c func should return what \c runDaemon()
|
||||
returns. \c func or \c runFunc can call
|
||||
\c ArchMiscWindows::daemonFailed() to indicate startup failure.
|
||||
\c ArchDaemonWindows::daemonFailed() to indicate startup failure.
|
||||
</ul>
|
||||
*/
|
||||
virtual int daemonize(DaemonFunc const &func) = 0;
|
||||
|
||||
@ -79,6 +79,10 @@ ArchSocket ArchNetworkBSD::newSocket(AddressFamily family, SocketType type)
|
||||
}
|
||||
try {
|
||||
setBlockingOnSocket(fd, false);
|
||||
#if defined(__APPLE__)
|
||||
int on = 1;
|
||||
setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &on, sizeof(on));
|
||||
#endif
|
||||
} catch (...) {
|
||||
close(fd);
|
||||
throw;
|
||||
@ -196,6 +200,10 @@ ArchSocket ArchNetworkBSD::acceptSocket(ArchSocket s, ArchNetAddress *addr)
|
||||
|
||||
try {
|
||||
setBlockingOnSocket(fd, false);
|
||||
#if defined(__APPLE__)
|
||||
int on = 1;
|
||||
setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &on, sizeof(on));
|
||||
#endif
|
||||
} catch (...) {
|
||||
close(fd);
|
||||
delete newSocket;
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Deskflow -- mouse and keyboard sharing utility
|
||||
* SPDX-FileCopyrightText: (C) 2026 Deskflow Developers
|
||||
* SPDX-FileCopyrightText: (C) 2012 - 2016, 2024 - 2025 Symless Ltd.
|
||||
* SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman
|
||||
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
||||
@ -7,7 +8,6 @@
|
||||
|
||||
#include "arch/win32/ArchMiscWindows.h"
|
||||
|
||||
#include "arch/win32/ArchDaemonWindows.h"
|
||||
#include "arch/win32/XArchWindows.h"
|
||||
#include "base/Log.h"
|
||||
#include "base/String.h"
|
||||
@ -17,6 +17,7 @@
|
||||
|
||||
#include <array>
|
||||
#include <filesystem>
|
||||
#include <stdexcept>
|
||||
|
||||
// Useful for debugging Windows specific bootstrapping code before the logging system is initialized.
|
||||
// This output can be viewed by attaching a Microsoft debugger or by using the DebugView program.
|
||||
@ -64,26 +65,6 @@ void ArchMiscWindows::init()
|
||||
SetErrorMode(SEM_FAILCRITICALERRORS);
|
||||
}
|
||||
|
||||
int ArchMiscWindows::runDaemon(RunFunc runFunc)
|
||||
{
|
||||
return ArchDaemonWindows::runDaemon(runFunc);
|
||||
}
|
||||
|
||||
void ArchMiscWindows::daemonRunning(bool running)
|
||||
{
|
||||
ArchDaemonWindows::daemonRunning(running);
|
||||
}
|
||||
|
||||
void ArchMiscWindows::daemonFailed(int result)
|
||||
{
|
||||
ArchDaemonWindows::daemonFailed(result);
|
||||
}
|
||||
|
||||
UINT ArchMiscWindows::getDaemonQuitMessage()
|
||||
{
|
||||
return ArchDaemonWindows::getDaemonQuitMessage();
|
||||
}
|
||||
|
||||
HKEY ArchMiscWindows::openKey(HKEY key, const TCHAR *keyName)
|
||||
{
|
||||
return openKey(key, keyName, false);
|
||||
@ -178,20 +159,16 @@ ArchMiscWindows::EValueType ArchMiscWindows::typeOfValue(HKEY key, const TCHAR *
|
||||
|
||||
void ArchMiscWindows::setValue(HKEY key, const TCHAR *name, const std::string &value)
|
||||
{
|
||||
assert(key != nullptr);
|
||||
if (key == nullptr) {
|
||||
// TODO: throw exception
|
||||
return;
|
||||
throw std::invalid_argument("Registry key cannot be nullptr");
|
||||
}
|
||||
RegSetValueEx(key, name, 0, REG_SZ, reinterpret_cast<const BYTE *>(value.c_str()), (DWORD)value.size() + 1);
|
||||
}
|
||||
|
||||
void ArchMiscWindows::setValue(HKEY key, const TCHAR *name, DWORD value)
|
||||
{
|
||||
assert(key != nullptr);
|
||||
if (key == nullptr) {
|
||||
// TODO: throw exception
|
||||
return;
|
||||
throw std::invalid_argument("Registry key cannot be nullptr");
|
||||
}
|
||||
RegSetValueEx(key, name, 0, REG_DWORD, reinterpret_cast<CONST BYTE *>(&value), sizeof(DWORD));
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Deskflow -- mouse and keyboard sharing utility
|
||||
* SPDX-FileCopyrightText: (C) 2026 Deskflow Developers
|
||||
* SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd.
|
||||
* SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman
|
||||
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
||||
@ -40,30 +41,6 @@ public:
|
||||
//! Initialize
|
||||
static void init();
|
||||
|
||||
//! Run the daemon
|
||||
/*!
|
||||
Delegates to ArchDaemonWindows.
|
||||
*/
|
||||
static int runDaemon(RunFunc runFunc);
|
||||
|
||||
//! Indicate daemon is in main loop
|
||||
/*!
|
||||
Delegates to ArchDaemonWindows.
|
||||
*/
|
||||
static void daemonRunning(bool running);
|
||||
|
||||
//! Indicate failure of running daemon
|
||||
/*!
|
||||
Delegates to ArchDaemonWindows.
|
||||
*/
|
||||
static void daemonFailed(int result);
|
||||
|
||||
//! Get daemon quit message
|
||||
/*!
|
||||
Delegates to ArchDaemonWindows.
|
||||
*/
|
||||
static UINT getDaemonQuitMessage();
|
||||
|
||||
//! Open and return a registry key, closing the parent key
|
||||
static HKEY openKey(HKEY parent, const TCHAR *child);
|
||||
|
||||
|
||||
@ -135,7 +135,7 @@ void ArchNetworkWinsock::initModule(HMODULE module)
|
||||
WSADATA data;
|
||||
int err = startup(version, &data);
|
||||
if (data.wVersion != version) {
|
||||
throw ArchNetworkSupportException(winsockErrorToString(err));
|
||||
throw ArchNetworkSupportException(windowsErrorToString(err));
|
||||
}
|
||||
if (err != 0) {
|
||||
// some other initialization error
|
||||
@ -819,12 +819,12 @@ bool ArchNetworkWinsock::isEqualAddr(ArchNetAddress a, ArchNetAddress b)
|
||||
{
|
||||
switch (err) {
|
||||
case WSAEACCES:
|
||||
throw ArchNetworkAccessException(winsockErrorToString(err));
|
||||
throw ArchNetworkAccessException(windowsErrorToString(err));
|
||||
|
||||
case WSAEMFILE:
|
||||
case WSAENOBUFS:
|
||||
case WSAENETDOWN:
|
||||
throw ArchNetworkResourceException(winsockErrorToString(err));
|
||||
throw ArchNetworkResourceException(windowsErrorToString(err));
|
||||
|
||||
case WSAEPROTOTYPE:
|
||||
case WSAEPROTONOSUPPORT:
|
||||
@ -838,50 +838,50 @@ bool ArchNetworkWinsock::isEqualAddr(ArchNetAddress a, ArchNetAddress b)
|
||||
case WSANOTINITIALISED:
|
||||
case WSAVERNOTSUPPORTED:
|
||||
case WSASYSNOTREADY:
|
||||
throw ArchNetworkSupportException(winsockErrorToString(err));
|
||||
throw ArchNetworkSupportException(windowsErrorToString(err));
|
||||
|
||||
case WSAEADDRNOTAVAIL:
|
||||
throw ArchNetworkNoAddressException(winsockErrorToString(err));
|
||||
throw ArchNetworkNoAddressException(windowsErrorToString(err));
|
||||
|
||||
case WSAEADDRINUSE:
|
||||
throw ArchNetworkAddressInUseException(winsockErrorToString(err));
|
||||
throw ArchNetworkAddressInUseException(windowsErrorToString(err));
|
||||
|
||||
case WSAEHOSTUNREACH:
|
||||
case WSAENETUNREACH:
|
||||
throw ArchNetworkNoRouteException(winsockErrorToString(err));
|
||||
throw ArchNetworkNoRouteException(windowsErrorToString(err));
|
||||
|
||||
case WSAENOTCONN:
|
||||
throw ArchNetworkNotConnectedException(winsockErrorToString(err));
|
||||
throw ArchNetworkNotConnectedException(windowsErrorToString(err));
|
||||
|
||||
case WSAEDISCON:
|
||||
throw ArchNetworkShutdownException(winsockErrorToString(err));
|
||||
throw ArchNetworkShutdownException(windowsErrorToString(err));
|
||||
|
||||
case WSAENETRESET:
|
||||
case WSAECONNABORTED:
|
||||
case WSAECONNRESET:
|
||||
throw ArchNetworkDisconnectedException(winsockErrorToString(err));
|
||||
throw ArchNetworkDisconnectedException(windowsErrorToString(err));
|
||||
|
||||
case WSAECONNREFUSED:
|
||||
throw ArchNetworkConnectionRefusedException(winsockErrorToString(err));
|
||||
throw ArchNetworkConnectionRefusedException(windowsErrorToString(err));
|
||||
|
||||
case WSAEHOSTDOWN:
|
||||
case WSAETIMEDOUT:
|
||||
throw ArchNetworkTimedOutException(winsockErrorToString(err));
|
||||
throw ArchNetworkTimedOutException(windowsErrorToString(err));
|
||||
|
||||
case WSAHOST_NOT_FOUND:
|
||||
throw ArchNetworkNameUnknownException(winsockErrorToString(err));
|
||||
throw ArchNetworkNameUnknownException(windowsErrorToString(err));
|
||||
|
||||
case WSANO_DATA:
|
||||
throw ArchNetworkNameNoAddressException(winsockErrorToString(err));
|
||||
throw ArchNetworkNameNoAddressException(windowsErrorToString(err));
|
||||
|
||||
case WSANO_RECOVERY:
|
||||
throw ArchNetworkNameFailureException(winsockErrorToString(err));
|
||||
throw ArchNetworkNameFailureException(windowsErrorToString(err));
|
||||
|
||||
case WSATRY_AGAIN:
|
||||
throw ArchNetworkNameUnavailableException(winsockErrorToString(err));
|
||||
throw ArchNetworkNameUnavailableException(windowsErrorToString(err));
|
||||
|
||||
default:
|
||||
throw ArchNetworkException(winsockErrorToString(err));
|
||||
throw ArchNetworkException(windowsErrorToString(err));
|
||||
}
|
||||
}
|
||||
|
||||
@ -889,18 +889,18 @@ bool ArchNetworkWinsock::isEqualAddr(ArchNetAddress a, ArchNetAddress b)
|
||||
{
|
||||
switch (err) {
|
||||
case WSAHOST_NOT_FOUND:
|
||||
throw ArchNetworkNameUnknownException(winsockErrorToString(err));
|
||||
throw ArchNetworkNameUnknownException(windowsErrorToString(err));
|
||||
|
||||
case WSANO_DATA:
|
||||
throw ArchNetworkNameNoAddressException(winsockErrorToString(err));
|
||||
throw ArchNetworkNameNoAddressException(windowsErrorToString(err));
|
||||
|
||||
case WSANO_RECOVERY:
|
||||
throw ArchNetworkNameFailureException(winsockErrorToString(err));
|
||||
throw ArchNetworkNameFailureException(windowsErrorToString(err));
|
||||
|
||||
case WSATRY_AGAIN:
|
||||
throw ArchNetworkNameUnavailableException(winsockErrorToString(err));
|
||||
throw ArchNetworkNameUnavailableException(windowsErrorToString(err));
|
||||
|
||||
default:
|
||||
throw ArchNetworkNameException(winsockErrorToString(err));
|
||||
throw ArchNetworkNameException(windowsErrorToString(err));
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,192 +30,7 @@ QString windowsErrorToQString(DWORD error)
|
||||
return QString("[%1] %2").arg(error).arg(message.trimmed());
|
||||
}
|
||||
|
||||
QString winsockErrorToQString(int error)
|
||||
{
|
||||
// built-in windows function for looking up error message strings
|
||||
// may not look up network error messages correctly. we'll have
|
||||
// to do it ourself.
|
||||
static const struct
|
||||
{
|
||||
int m_code;
|
||||
const char *m_msg;
|
||||
}
|
||||
|
||||
s_netErrorCodes[] = {
|
||||
|
||||
// 10004
|
||||
{WSAEINTR, "The (blocking) call was canceled via WSACancelBlockingCall"},
|
||||
|
||||
// 10009
|
||||
{WSAEBADF, "Bad file handle"},
|
||||
|
||||
// 10013
|
||||
{WSAEACCES, "The requested address is a broadcast address, but the appropriate flag was not set"},
|
||||
|
||||
// 10014
|
||||
{WSAEFAULT, "WSAEFAULT"},
|
||||
|
||||
// 10022
|
||||
{WSAEINVAL, "WSAEINVAL"},
|
||||
|
||||
// 10024
|
||||
{WSAEMFILE, "No more file descriptors available"},
|
||||
|
||||
// 10035
|
||||
{WSAEWOULDBLOCK,
|
||||
"Socket is marked as non-blocking and no connections are present or the receive operation would block"},
|
||||
|
||||
// 10036
|
||||
{WSAEINPROGRESS, "A blocking Windows Sockets operation is in progress"},
|
||||
|
||||
// 10037
|
||||
{WSAEALREADY, "The asynchronous routine being canceled has already completed"},
|
||||
|
||||
// 10038
|
||||
{WSAENOTSOCK, "At least on descriptor is not a socket"},
|
||||
|
||||
// 10039
|
||||
{WSAEDESTADDRREQ, "A destination address is required"},
|
||||
|
||||
// 10040
|
||||
{WSAEMSGSIZE, "The datagram was too large to fit into the specified buffer and was truncated"},
|
||||
|
||||
// 10041
|
||||
{WSAEPROTOTYPE, "The specified protocol is the wrong type for this socket"},
|
||||
|
||||
// 10042
|
||||
{WSAENOPROTOOPT, "The option is unknown or unsupported"},
|
||||
|
||||
// 10043
|
||||
{WSAEPROTONOSUPPORT, "The specified protocol is not supported"},
|
||||
|
||||
// 10044
|
||||
{WSAESOCKTNOSUPPORT, "The specified socket type is not supported by this address family"},
|
||||
|
||||
// 10045
|
||||
{WSAEOPNOTSUPP, "The referenced socket is not a type that supports that operation"},
|
||||
|
||||
// 10046
|
||||
{WSAEPFNOSUPPORT, "BSD: Protocol family not supported"},
|
||||
|
||||
// 10047
|
||||
{WSAEAFNOSUPPORT, "The specified address family is not supported"},
|
||||
|
||||
// 10048
|
||||
{WSAEADDRINUSE, "The specified address is already in use"},
|
||||
|
||||
// 10049
|
||||
{WSAEADDRNOTAVAIL, "The specified address is not available from the local machine"},
|
||||
|
||||
// 10050
|
||||
{WSAENETDOWN, "The Windows Sockets implementation has detected that the network subsystem has failed"},
|
||||
|
||||
// 10051
|
||||
{WSAENETUNREACH, "The network can't be reached from this host at this time"},
|
||||
|
||||
// 10052
|
||||
{WSAENETRESET, "The connection must be reset because the Windows Sockets implementation dropped it"},
|
||||
|
||||
// 10053
|
||||
{WSAECONNABORTED, "The virtual circuit was aborted due to timeout or other failure"},
|
||||
|
||||
// 10054
|
||||
{WSAECONNRESET, "The virtual circuit was reset by the remote side"},
|
||||
|
||||
// 10055
|
||||
{WSAENOBUFS, "No buffer space is available or a buffer deadlock has occurred. The socket cannot be created"},
|
||||
|
||||
// 10056
|
||||
{WSAEISCONN, "The socket is already connected"},
|
||||
|
||||
// 10057
|
||||
{WSAENOTCONN, "The socket is not connected"},
|
||||
|
||||
// 10058
|
||||
{WSAESHUTDOWN, "The socket has been shutdown"},
|
||||
|
||||
// 10059
|
||||
{WSAETOOMANYREFS, "BSD: Too many references"},
|
||||
|
||||
// 10060
|
||||
{WSAETIMEDOUT, "Attempt to connect timed out without establishing a connection"},
|
||||
|
||||
// 10061
|
||||
{WSAECONNREFUSED, "Connection was refused"},
|
||||
|
||||
// 10062
|
||||
{WSAELOOP, "Undocumented WinSock error code used in BSD"},
|
||||
|
||||
// 10063
|
||||
{WSAENAMETOOLONG, "Undocumented WinSock error code used in BSD"},
|
||||
|
||||
// 10064
|
||||
{WSAEHOSTDOWN, "Undocumented WinSock error code used in BSD"},
|
||||
|
||||
// 10065
|
||||
{WSAEHOSTUNREACH, "No route to host"},
|
||||
|
||||
// 10066
|
||||
{WSAENOTEMPTY, "Undocumented WinSock error code"},
|
||||
|
||||
// 10067
|
||||
{WSAEPROCLIM, "Undocumented WinSock error code"},
|
||||
|
||||
// 10068
|
||||
{WSAEUSERS, "Undocumented WinSock error code"},
|
||||
|
||||
// 10069
|
||||
{WSAEDQUOT, "Undocumented WinSock error code"},
|
||||
|
||||
// 10070
|
||||
{WSAESTALE, "Undocumented WinSock error code"},
|
||||
|
||||
// 10071
|
||||
{WSAEREMOTE, "Undocumented WinSock error code"},
|
||||
|
||||
// 10091
|
||||
{WSASYSNOTREADY, "Underlying network subsytem is not ready for network communication"},
|
||||
|
||||
// 10092
|
||||
{WSAVERNOTSUPPORTED, "The version of WinSock API support requested is not provided in this implementation"},
|
||||
|
||||
// 10093
|
||||
{WSANOTINITIALISED, "WinSock subsystem not properly initialized"},
|
||||
|
||||
// 10101
|
||||
{WSAEDISCON, "Virtual circuit has gracefully terminated connection"},
|
||||
|
||||
// 11001
|
||||
{WSAHOST_NOT_FOUND, "The specified host is unknown"},
|
||||
|
||||
// 11002
|
||||
{WSATRY_AGAIN, "A temporary error occurred on an authoritative name server"},
|
||||
|
||||
// 11003
|
||||
{WSANO_RECOVERY, "A non-recoverable name server error occurred"},
|
||||
|
||||
// 11004
|
||||
{WSANO_DATA, "The requested name is valid but does not have an IP address"},
|
||||
|
||||
// end
|
||||
{0, nullptr}
|
||||
};
|
||||
|
||||
for (unsigned int i = 0; s_netErrorCodes[i].m_code != 0; ++i) {
|
||||
if (s_netErrorCodes[i].m_code == error) {
|
||||
return QString("[%1] %2").arg(error).arg(s_netErrorCodes[i].m_msg);
|
||||
}
|
||||
}
|
||||
|
||||
return QString("Unknown Winsock error: %1").arg(error);
|
||||
}
|
||||
|
||||
std::string windowsErrorToString(DWORD error)
|
||||
{
|
||||
return windowsErrorToQString(error).toStdString();
|
||||
}
|
||||
|
||||
std::string winsockErrorToString(int error)
|
||||
{
|
||||
return winsockErrorToQString(error).toStdString();
|
||||
}
|
||||
|
||||
@ -14,7 +14,5 @@
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
|
||||
QString winsockErrorToQString(int error);
|
||||
QString windowsErrorToQString(DWORD error);
|
||||
std::string winsockErrorToString(int error);
|
||||
std::string windowsErrorToString(DWORD error);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# SPDX-FileCopyrightText: 2024 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-FileCopyrightText: 2012 - 2024 Symless Ltd
|
||||
# SPDX-FileCopyrightText: 2009 - 2012 Nick Bolton
|
||||
# SPDX-FileCopyrightText: (C) 2024 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-FileCopyrightText: (C) 2012 - 2024 Symless Ltd
|
||||
# SPDX-FileCopyrightText: (C) 2009 - 2012 Nick Bolton
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
add_library(base STATIC
|
||||
@ -27,8 +27,6 @@ add_library(base STATIC
|
||||
Log.h
|
||||
LogLevel.h
|
||||
NetworkProtocol.h
|
||||
Path.cpp
|
||||
Path.h
|
||||
PriorityQueue.h
|
||||
SimpleEventQueueBuffer.cpp
|
||||
SimpleEventQueueBuffer.h
|
||||
|
||||
@ -11,20 +11,20 @@
|
||||
#include <cstdint>
|
||||
|
||||
/**
|
||||
* @brief Screen edge directions for mouse movement
|
||||
* @brief Computer edge directions for mouse movement
|
||||
*
|
||||
* Used to specify which edge of a screen the mouse cursor crosses
|
||||
* when moving between primary and secondary screens.
|
||||
* Used to specify which edge of a computer the mouse cursor crosses
|
||||
* when moving between primary and secondary computers.
|
||||
*
|
||||
* @since Protocol version 1.0
|
||||
*/
|
||||
enum class Direction : uint8_t
|
||||
{
|
||||
NoDirection, ///< No specific direction
|
||||
Left, ///< Left edge of screen
|
||||
Right, ///< Right edge of screen
|
||||
Top, ///< Top edge of screen
|
||||
Bottom, ///< Bottom edge of screen
|
||||
Left, ///< Left edge of computer
|
||||
Right, ///< Right edge of computer
|
||||
Top, ///< Top edge of computer
|
||||
Bottom, ///< Bottom edge of computer
|
||||
FirstDirection = Direction::Left, ///< First valid direction value
|
||||
LastDirection = Direction::Bottom, ///< Last valid direction value
|
||||
NumDirections = Direction::LastDirection - Direction::FirstDirection + 1 ///< Total number of directions
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Deskflow -- mouse and keyboard sharing utility
|
||||
* SPDX-FileCopyrightText: (C) 2025 Deskflow Developers
|
||||
* SPDX-FileCopyrightText: (C) 2025 - 2026 Deskflow Developers
|
||||
* SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd.
|
||||
* SPDX-FileCopyrightText: (C) 2004 Chris Schoeneman
|
||||
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
||||
@ -9,6 +9,7 @@
|
||||
#include "base/EventQueue.h"
|
||||
|
||||
#include "arch/Arch.h"
|
||||
#include "base/EventQueueTimer.h"
|
||||
#include "base/Log.h"
|
||||
#include "base/SimpleEventQueueBuffer.h"
|
||||
#include "mt/Lock.h"
|
||||
@ -213,7 +214,7 @@ EventQueueTimer *EventQueue::newTimer(double duration, void *target)
|
||||
{
|
||||
assert(duration > 0.0);
|
||||
|
||||
EventQueueTimer *timer = m_buffer->newTimer(duration, false);
|
||||
auto timer = new EventQueueTimer;
|
||||
if (target == nullptr) {
|
||||
target = timer;
|
||||
}
|
||||
@ -230,7 +231,7 @@ EventQueueTimer *EventQueue::newOneShotTimer(double duration, void *target)
|
||||
{
|
||||
assert(duration > 0.0);
|
||||
|
||||
EventQueueTimer *timer = m_buffer->newTimer(duration, true);
|
||||
auto timer = new EventQueueTimer;
|
||||
if (target == nullptr) {
|
||||
target = timer;
|
||||
}
|
||||
@ -255,7 +256,7 @@ void EventQueue::deleteTimer(EventQueueTimer *timer)
|
||||
if (Timers::iterator index = m_timers.find(timer); index != m_timers.end()) {
|
||||
m_timers.erase(index);
|
||||
}
|
||||
m_buffer->deleteTimer(timer);
|
||||
delete timer;
|
||||
}
|
||||
|
||||
void EventQueue::addHandler(EventTypes type, void *target, const EventHandler &handler)
|
||||
|
||||
@ -111,23 +111,23 @@ enum class EventTypes : uint32_t
|
||||
*/
|
||||
ClientProxyUnknownFailure,
|
||||
|
||||
/** This event is sent when a client screen has connected.
|
||||
The event data is a pointer to ScreenConnectedInfo that indicates the connected screen.
|
||||
/** This event is sent when a client computer has connected.
|
||||
The event data is a pointer to ScreenConnectedInfo that indicates the connected computer.
|
||||
*/
|
||||
ServerConnected,
|
||||
|
||||
/// This is event sent when all the clients have disconnected.
|
||||
ServerDisconnected,
|
||||
|
||||
/** This event is sent to inform the server to switch screens.
|
||||
The event data is a pointer to SwitchToScreenInfo that indicates the target screen.
|
||||
/** This event is sent to inform the server to switch computers.
|
||||
The event data is a pointer to SwitchToScreenInfo that indicates the target computer.
|
||||
*/
|
||||
ServerSwitchToScreen,
|
||||
|
||||
/// This event is sent to inform the server to toggle screens. These is no event data.
|
||||
/// This event is sent to inform the server to toggle computers. These is no event data.
|
||||
ServerToggleScreen,
|
||||
|
||||
/** This event is sent to inform the server to switch screens.
|
||||
/** This event is sent to inform the server to switch computers.
|
||||
The event data is a pointer to SwitchInDirectionInfo that indicates the target direction.
|
||||
*/
|
||||
ServerSwitchInDirection,
|
||||
@ -137,12 +137,12 @@ enum class EventTypes : uint32_t
|
||||
*/
|
||||
ServerKeyboardBroadcast,
|
||||
|
||||
/** This event is sent to inform the server to lock the cursor to the active screen or to
|
||||
/** This event is sent to inform the server to lock the cursor to the active computer or to
|
||||
unlock it. The event data is a pointer to LockCursorToScreenInfo.
|
||||
*/
|
||||
ServerLockCursorToScreen,
|
||||
|
||||
/// This event is sent when the screen has been switched to a client.
|
||||
/// This event is sent when the computer has been switched to a client.
|
||||
ServerScreenSwitched,
|
||||
|
||||
ServerAppReloadConfig,
|
||||
@ -162,12 +162,12 @@ enum class EventTypes : uint32_t
|
||||
/// This event is sent when button is up. Event data is a pointer to ButtonInfo
|
||||
PrimaryScreenButtonUp,
|
||||
|
||||
/** This event is sent when mouse moves on primary screen.
|
||||
/** This event is sent when mouse moves on the server.
|
||||
Event data is a pointer to MotionInfo, the values are absolute position.
|
||||
*/
|
||||
PrimaryScreenMotionOnPrimary,
|
||||
|
||||
/** This event is sent when mouse moves on secondary screen.
|
||||
/** This event is sent when mouse moves on a client.
|
||||
Event data is a pointer to MotionInfo, the values are relative motion deltas.
|
||||
*/
|
||||
PrimaryScreenMotionOnSecondary,
|
||||
@ -193,12 +193,12 @@ enum class EventTypes : uint32_t
|
||||
/// This event is sent when fake input ends.
|
||||
PrimaryScreenFakeInputEnd,
|
||||
|
||||
/** This event is sent whenever the screen has failed for some reason (e.g. the X Windows
|
||||
/** This event is sent whenever the computer has failed for some reason (e.g. the X Windows
|
||||
server died).
|
||||
*/
|
||||
ScreenError,
|
||||
|
||||
/// This event is sent whenever the screen's shape changes.
|
||||
/// This event is sent whenever the computer's display shape changes.
|
||||
ScreenShapeChanged,
|
||||
|
||||
/** This event is sent whenever the system goes to sleep or a user session is deactivated (fast
|
||||
@ -224,9 +224,10 @@ enum class EventTypes : uint32_t
|
||||
/// This event is sent whenever a clipboard chunk is transferred.
|
||||
ClipboardSending,
|
||||
|
||||
/// Start libEI
|
||||
/// Start libei
|
||||
EIConnected,
|
||||
/// Stop libEi
|
||||
EISessionClosed
|
||||
|
||||
/// Stop libei
|
||||
EISessionClosed,
|
||||
};
|
||||
} // namespace deskflow
|
||||
|
||||
@ -65,29 +65,9 @@ public:
|
||||
*/
|
||||
virtual bool addEvent(uint32_t dataID) = 0;
|
||||
|
||||
//@}
|
||||
//! @name accessors
|
||||
//@{
|
||||
|
||||
//! Check if event queue buffer is empty
|
||||
/*!
|
||||
Return true iff the event queue buffer is empty.
|
||||
*/
|
||||
virtual bool isEmpty() const = 0;
|
||||
|
||||
//! Create a timer object
|
||||
/*!
|
||||
Create and return a timer object. The object is opaque and is
|
||||
used only by the buffer but it must be a valid object (i.e.
|
||||
not nullptr).
|
||||
*/
|
||||
virtual EventQueueTimer *newTimer(double duration, bool oneShot) const = 0;
|
||||
|
||||
//! Destroy a timer object
|
||||
/*!
|
||||
Destroy a timer object previously returned by \c newTimer().
|
||||
*/
|
||||
virtual void deleteTimer(EventQueueTimer *) const = 0;
|
||||
|
||||
//@}
|
||||
};
|
||||
|
||||
@ -24,11 +24,10 @@
|
||||
const int kPriorityPrefixLength = 3;
|
||||
|
||||
// names of priorities
|
||||
static const char *g_priority[] = {"FATAL", "ERROR", "WARNING", "NOTE", "INFO", "DEBUG",
|
||||
"DEBUG1", "DEBUG2", "DEBUG3", "DEBUG4", "DEBUG5"};
|
||||
static const char *g_priority[] = {"FATAL", "ERROR", "WARNING", "NOTE", "INFO", "DEBUG", "DEBUG1", "DEBUG2"};
|
||||
|
||||
// number of priorities
|
||||
static const int g_numPriority = 11;
|
||||
static const int g_numPriority = 8;
|
||||
|
||||
// if NDEBUG (not debug) is not specified, i.e. you're building in debug,
|
||||
// then set default log level to DEBUG, otherwise the max level is INFO.
|
||||
|
||||
@ -209,9 +209,6 @@ otherwise it expands to a call that doesn't.
|
||||
#define CLOG_DEBUG CLOG_TRACE "%z\065"
|
||||
#define CLOG_DEBUG1 CLOG_TRACE "%z\066"
|
||||
#define CLOG_DEBUG2 CLOG_TRACE "%z\067"
|
||||
#define CLOG_DEBUG3 CLOG_TRACE "%z\070"
|
||||
#define CLOG_DEBUG4 CLOG_TRACE "%z\071" // char is '9'
|
||||
#define CLOG_DEBUG5 CLOG_TRACE "%z\072" // char is ':'
|
||||
|
||||
#define LOG_IPC(...) LOG((CLOG_IPC __VA_ARGS__))
|
||||
#define LOG_PRINT(...) LOG((CLOG_PRINT __VA_ARGS__))
|
||||
@ -223,6 +220,3 @@ otherwise it expands to a call that doesn't.
|
||||
#define LOG_DEBUG(...) LOG((CLOG_DEBUG __VA_ARGS__))
|
||||
#define LOG_DEBUG1(...) LOG((CLOG_DEBUG1 __VA_ARGS__))
|
||||
#define LOG_DEBUG2(...) LOG((CLOG_DEBUG2 __VA_ARGS__))
|
||||
#define LOG_DEBUG3(...) LOG((CLOG_DEBUG3 __VA_ARGS__))
|
||||
#define LOG_DEBUG4(...) LOG((CLOG_DEBUG4 __VA_ARGS__))
|
||||
#define LOG_DEBUG5(...) LOG((CLOG_DEBUG5 __VA_ARGS__))
|
||||
|
||||
@ -22,8 +22,5 @@ enum class LogLevel
|
||||
Info, //!< For informational messages
|
||||
Debug, //!< For important debugging messages
|
||||
Debug1, //!< For verbosity +1 debugging messages
|
||||
Debug2, //!< For verbosity +2 debugging messages
|
||||
Debug3, //!< For verbosity +3 debugging messages
|
||||
Debug4, //!< For verbosity +4 debugging messages
|
||||
Debug5 //!< For verbosity +5 debugging messages
|
||||
Debug2 //!< For verbosity +2 debugging messages
|
||||
};
|
||||
|
||||
@ -1,13 +1,62 @@
|
||||
/*
|
||||
* Deskflow -- mouse and keyboard sharing utility
|
||||
* SPDX-FileCopyrightText: (C) 2025 Deskflow Developers
|
||||
* SPDX-FileCopyrightText: (C) 2025 - 2026 Deskflow Developers
|
||||
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <QString>
|
||||
|
||||
inline static const auto kSynergyProtocolOption = "synergy";
|
||||
inline static const auto kBarrierProtocolOption = "barrier";
|
||||
|
||||
enum class NetworkProtocol
|
||||
{
|
||||
Unknown = -1,
|
||||
Synergy,
|
||||
Barrier
|
||||
};
|
||||
|
||||
static int networkProtocolToInt(const NetworkProtocol proto)
|
||||
{
|
||||
return static_cast<int>(proto);
|
||||
}
|
||||
|
||||
static NetworkProtocol networkProtocolFromInt(const int value)
|
||||
{
|
||||
return static_cast<NetworkProtocol>(value);
|
||||
}
|
||||
|
||||
static QString networkProtocolToOption(const NetworkProtocol proto)
|
||||
{
|
||||
switch (proto) {
|
||||
case NetworkProtocol::Synergy:
|
||||
return kSynergyProtocolOption;
|
||||
case NetworkProtocol::Barrier:
|
||||
return kBarrierProtocolOption;
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
static QString networkProtocolToName(const NetworkProtocol proto)
|
||||
{
|
||||
switch (proto) {
|
||||
case NetworkProtocol::Synergy:
|
||||
return QStringLiteral("Synergy");
|
||||
case NetworkProtocol::Barrier:
|
||||
return QStringLiteral("Barrier");
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
static NetworkProtocol networkProtocolFromString(const QString &proto)
|
||||
{
|
||||
using enum NetworkProtocol;
|
||||
if (proto.compare(kBarrierProtocolOption, Qt::CaseInsensitive) == 0)
|
||||
return Barrier;
|
||||
if (proto.compare(kSynergyProtocolOption, Qt::CaseInsensitive) == 0)
|
||||
return Synergy;
|
||||
return Unknown;
|
||||
}
|
||||
|
||||
@ -1,37 +0,0 @@
|
||||
/*
|
||||
* Deskflow -- mouse and keyboard sharing utility
|
||||
* SPDX-FileCopyrightText: (C) 2014 - 2021 Symless Ltd.
|
||||
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
||||
*/
|
||||
|
||||
#include "Path.h"
|
||||
|
||||
#if SYSAPI_WIN32
|
||||
#include "arch/win32/ArchMiscWindows.h"
|
||||
#endif
|
||||
|
||||
namespace deskflow::filesystem {
|
||||
|
||||
#ifdef SYSAPI_WIN32
|
||||
|
||||
std::wstring path(const std::string &filePath)
|
||||
{
|
||||
std::wstring result;
|
||||
|
||||
auto length = MultiByteToWideChar(CP_UTF8, 0, filePath.c_str(), static_cast<int>(filePath.length()), nullptr, 0);
|
||||
if (length > 0) {
|
||||
result.resize(length);
|
||||
MultiByteToWideChar(CP_UTF8, 0, filePath.c_str(), static_cast<int>(filePath.length()), &result[0], length);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#else
|
||||
std::string path(const std::string &filePath)
|
||||
{
|
||||
return filePath;
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace deskflow::filesystem
|
||||
@ -1,19 +0,0 @@
|
||||
/*
|
||||
* Deskflow -- mouse and keyboard sharing utility
|
||||
* SPDX-FileCopyrightText: (C) 2014 - 2021 Symless Ltd.
|
||||
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace deskflow::filesystem {
|
||||
|
||||
#ifdef SYSAPI_WIN32
|
||||
std::wstring path(const std::string &filePath);
|
||||
#else
|
||||
std::string path(const std::string &filePath);
|
||||
#endif
|
||||
|
||||
} // namespace deskflow::filesystem
|
||||
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Deskflow -- mouse and keyboard sharing utility
|
||||
* SPDX-FileCopyrightText: (C) 2026 Deskflow Developers
|
||||
* SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd.
|
||||
* SPDX-FileCopyrightText: (C) 2004 Chris Schoeneman
|
||||
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
||||
@ -9,10 +10,6 @@
|
||||
#include "arch/Arch.h"
|
||||
#include "base/Stopwatch.h"
|
||||
|
||||
class EventQueueTimer
|
||||
{
|
||||
};
|
||||
|
||||
//
|
||||
// SimpleEventQueueBuffer
|
||||
//
|
||||
@ -73,13 +70,3 @@ bool SimpleEventQueueBuffer::isEmpty() const
|
||||
ArchMutexLock lock(m_queueMutex);
|
||||
return !m_queueReady;
|
||||
}
|
||||
|
||||
EventQueueTimer *SimpleEventQueueBuffer::newTimer(double, bool) const
|
||||
{
|
||||
return new EventQueueTimer;
|
||||
}
|
||||
|
||||
void SimpleEventQueueBuffer::deleteTimer(EventQueueTimer *timer) const
|
||||
{
|
||||
delete timer;
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Deskflow -- mouse and keyboard sharing utility
|
||||
* SPDX-FileCopyrightText: (C) 2026 Deskflow Developers
|
||||
* SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd.
|
||||
* SPDX-FileCopyrightText: (C) 2004 Chris Schoeneman
|
||||
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
||||
@ -35,8 +36,6 @@ public:
|
||||
Type getEvent(Event &event, uint32_t &dataID) override;
|
||||
bool addEvent(uint32_t dataID) override;
|
||||
bool isEmpty() const override;
|
||||
EventQueueTimer *newTimer(double duration, bool oneShot) const override;
|
||||
void deleteTimer(EventQueueTimer *) const override;
|
||||
|
||||
private:
|
||||
using EventDeque = std::deque<uint32_t>;
|
||||
|
||||
@ -12,7 +12,6 @@
|
||||
#include <cstdarg>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
|
||||
namespace deskflow::string {
|
||||
@ -140,21 +139,6 @@ std::string sprintf(const char *fmt, ...)
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string sizeTypeToString(size_t n)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << n;
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
size_t stringToSizeType(const std::string &string)
|
||||
{
|
||||
std::istringstream iss(string);
|
||||
size_t value;
|
||||
iss >> value;
|
||||
return value;
|
||||
}
|
||||
|
||||
//
|
||||
// CaselessCmp
|
||||
//
|
||||
|
||||
@ -40,18 +40,6 @@ Equivalent to sprintf() except the result is returned as a String.
|
||||
*/
|
||||
std::string sprintf(const char *fmt, ...);
|
||||
|
||||
//! Convert a size type to a string
|
||||
/*!
|
||||
Convert an size type to a string
|
||||
*/
|
||||
std::string sizeTypeToString(size_t n);
|
||||
|
||||
//! Convert a string to a size type
|
||||
/*!
|
||||
Convert an a \c string to an size type
|
||||
*/
|
||||
size_t stringToSizeType(const std::string &string);
|
||||
|
||||
//! Case-insensitive comparisons
|
||||
/*!
|
||||
This class provides case-insensitve comparison functions.
|
||||
|
||||
@ -113,29 +113,6 @@ std::string Unicode::UTF8ToUCS2(const std::string &src, bool *errors)
|
||||
return dst;
|
||||
}
|
||||
|
||||
std::string Unicode::UTF8ToUCS4(const std::string &src, bool *errors)
|
||||
{
|
||||
// default to success
|
||||
resetError(errors);
|
||||
|
||||
// get size of input string and reserve some space in output
|
||||
auto n = (uint32_t)src.size();
|
||||
std::string dst;
|
||||
dst.reserve(4 * n);
|
||||
|
||||
// convert each character
|
||||
const auto *data = reinterpret_cast<const uint8_t *>(src.c_str());
|
||||
while (n > 0) {
|
||||
uint32_t c = fromUTF8(data, n);
|
||||
if (c == s_invalid) {
|
||||
c = s_replacement;
|
||||
}
|
||||
dst.append(reinterpret_cast<const char *>(&c), 4);
|
||||
}
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
||||
std::string Unicode::UTF8ToUTF16(const std::string &src, bool *errors)
|
||||
{
|
||||
// default to success
|
||||
@ -171,32 +148,6 @@ std::string Unicode::UTF8ToUTF16(const std::string &src, bool *errors)
|
||||
return dst;
|
||||
}
|
||||
|
||||
std::string Unicode::UTF8ToUTF32(const std::string &src, bool *errors)
|
||||
{
|
||||
// default to success
|
||||
resetError(errors);
|
||||
|
||||
// get size of input string and reserve some space in output
|
||||
auto n = (uint32_t)src.size();
|
||||
std::string dst;
|
||||
dst.reserve(4 * n);
|
||||
|
||||
// convert each character
|
||||
const auto *data = reinterpret_cast<const uint8_t *>(src.c_str());
|
||||
while (n > 0) {
|
||||
uint32_t c = fromUTF8(data, n);
|
||||
if (c == s_invalid) {
|
||||
c = s_replacement;
|
||||
} else if (c >= 0x00110000) {
|
||||
setError(errors);
|
||||
c = s_replacement;
|
||||
}
|
||||
dst.append(reinterpret_cast<const char *>(&c), 4);
|
||||
}
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
||||
std::string Unicode::UCS2ToUTF8(const std::string_view &src, bool *errors)
|
||||
{
|
||||
// default to success
|
||||
@ -207,16 +158,6 @@ std::string Unicode::UCS2ToUTF8(const std::string_view &src, bool *errors)
|
||||
return doUCS2ToUTF8(reinterpret_cast<const uint8_t *>(src.data()), n, errors);
|
||||
}
|
||||
|
||||
std::string Unicode::UCS4ToUTF8(const std::string_view &src, bool *errors)
|
||||
{
|
||||
// default to success
|
||||
resetError(errors);
|
||||
|
||||
// convert
|
||||
uint32_t n = (uint32_t)src.size() >> 2;
|
||||
return doUCS4ToUTF8(reinterpret_cast<const uint8_t *>(src.data()), n, errors);
|
||||
}
|
||||
|
||||
std::string Unicode::UTF16ToUTF8(const std::string_view &src, bool *errors)
|
||||
{
|
||||
// default to success
|
||||
@ -227,16 +168,6 @@ std::string Unicode::UTF16ToUTF8(const std::string_view &src, bool *errors)
|
||||
return doUTF16ToUTF8(reinterpret_cast<const uint8_t *>(src.data()), n, errors);
|
||||
}
|
||||
|
||||
std::string Unicode::UTF32ToUTF8(const std::string_view &src, bool *errors)
|
||||
{
|
||||
// default to success
|
||||
resetError(errors);
|
||||
|
||||
// convert
|
||||
uint32_t n = (uint32_t)src.size() >> 2;
|
||||
return doUTF32ToUTF8(reinterpret_cast<const uint8_t *>(src.data()), n, errors);
|
||||
}
|
||||
|
||||
std::string Unicode::doUCS2ToUTF8(const uint8_t *data, uint32_t n, bool *errors)
|
||||
{
|
||||
// make some space
|
||||
@ -273,42 +204,6 @@ std::string Unicode::doUCS2ToUTF8(const uint8_t *data, uint32_t n, bool *errors)
|
||||
return dst;
|
||||
}
|
||||
|
||||
std::string Unicode::doUCS4ToUTF8(const uint8_t *data, uint32_t n, bool *errors)
|
||||
{
|
||||
// make some space
|
||||
std::string dst;
|
||||
dst.reserve(n);
|
||||
|
||||
// check if first character is 0xfffe or 0xfeff
|
||||
bool byteSwapped = false;
|
||||
if (n >= 1) {
|
||||
switch (decode32(data, false)) {
|
||||
case 0x0000feff:
|
||||
data += 4;
|
||||
--n;
|
||||
break;
|
||||
|
||||
case 0x0000fffe:
|
||||
byteSwapped = true;
|
||||
data += 4;
|
||||
--n;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// convert each character
|
||||
for (; n > 0; --n) {
|
||||
auto c = decode32(data, byteSwapped);
|
||||
toUTF8(dst, c, errors);
|
||||
data += 4;
|
||||
}
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
||||
std::string Unicode::doUTF16ToUTF8(const uint8_t *data, uint32_t n, bool *errors)
|
||||
{
|
||||
// make some space
|
||||
@ -368,48 +263,6 @@ std::string Unicode::doUTF16ToUTF8(const uint8_t *data, uint32_t n, bool *errors
|
||||
return dst;
|
||||
}
|
||||
|
||||
std::string Unicode::doUTF32ToUTF8(const uint8_t *data, uint32_t n, bool *errors)
|
||||
{
|
||||
// make some space
|
||||
std::string dst;
|
||||
dst.reserve(n);
|
||||
|
||||
// check if first character is 0xfffe or 0xfeff
|
||||
bool byteSwapped = false;
|
||||
if (n >= 1) {
|
||||
switch (decode32(data, false)) {
|
||||
case 0x0000feff:
|
||||
data += 4;
|
||||
--n;
|
||||
break;
|
||||
|
||||
case 0x0000fffe:
|
||||
byteSwapped = true;
|
||||
data += 4;
|
||||
--n;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
byteSwapped = !byteSwapped;
|
||||
#endif
|
||||
// convert each character
|
||||
for (; n > 0; --n) {
|
||||
auto c = decode32(data, byteSwapped);
|
||||
if (c >= 0x00110000) {
|
||||
setError(errors);
|
||||
c = s_replacement;
|
||||
}
|
||||
toUTF8(dst, c, errors);
|
||||
data += 4;
|
||||
}
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
||||
uint32_t Unicode::fromUTF8(const uint8_t *&data, uint32_t &n)
|
||||
{
|
||||
assert(data != nullptr);
|
||||
|
||||
@ -36,14 +36,6 @@ public:
|
||||
*/
|
||||
static std::string UTF8ToUCS2(const std::string &, bool *errors = nullptr);
|
||||
|
||||
//! Convert from UTF-8 to UCS-4 encoding
|
||||
/*!
|
||||
Convert from UTF-8 to UCS-4. If errors is not nullptr then *errors
|
||||
is set to true iff any character could not be encoded in UCS-4.
|
||||
Decoding errors do not set *errors.
|
||||
*/
|
||||
static std::string UTF8ToUCS4(const std::string &, bool *errors = nullptr);
|
||||
|
||||
//! Convert from UTF-8 to UTF-16 encoding
|
||||
/*!
|
||||
Convert from UTF-8 to UTF-16. If errors is not nullptr then *errors
|
||||
@ -52,14 +44,6 @@ public:
|
||||
*/
|
||||
static std::string UTF8ToUTF16(const std::string &, bool *errors = nullptr);
|
||||
|
||||
//! Convert from UTF-8 to UTF-32 encoding
|
||||
/*!
|
||||
Convert from UTF-8 to UTF-32. If errors is not nullptr then *errors
|
||||
is set to true iff any character could not be encoded in UTF-32.
|
||||
Decoding errors do not set *errors.
|
||||
*/
|
||||
static std::string UTF8ToUTF32(const std::string &, bool *errors = nullptr);
|
||||
|
||||
//! Convert from UCS-2 to UTF-8
|
||||
/*!
|
||||
Convert from UCS-2 to UTF-8. If errors is not nullptr then *errors is
|
||||
@ -67,13 +51,6 @@ public:
|
||||
*/
|
||||
static std::string UCS2ToUTF8(const std::string_view &, bool *errors = nullptr);
|
||||
|
||||
//! Convert from UCS-4 to UTF-8
|
||||
/*!
|
||||
Convert from UCS-4 to UTF-8. If errors is not nullptr then *errors is
|
||||
set to true iff any character could not be decoded.
|
||||
*/
|
||||
static std::string UCS4ToUTF8(const std::string_view &, bool *errors = nullptr);
|
||||
|
||||
//! Convert from UTF-16 to UTF-8
|
||||
/*!
|
||||
Convert from UTF-16 to UTF-8. If errors is not nullptr then *errors is
|
||||
@ -81,21 +58,12 @@ public:
|
||||
*/
|
||||
static std::string UTF16ToUTF8(const std::string_view &, bool *errors = nullptr);
|
||||
|
||||
//! Convert from UTF-32 to UTF-8
|
||||
/*!
|
||||
Convert from UTF-32 to UTF-8. If errors is not nullptr then *errors is
|
||||
set to true iff any character could not be decoded.
|
||||
*/
|
||||
static std::string UTF32ToUTF8(const std::string_view &, bool *errors = nullptr);
|
||||
|
||||
//@}
|
||||
|
||||
private:
|
||||
// internal conversion to UTF8
|
||||
static std::string doUCS2ToUTF8(const uint8_t *src, uint32_t n, bool *errors);
|
||||
static std::string doUCS4ToUTF8(const uint8_t *src, uint32_t n, bool *errors);
|
||||
static std::string doUTF16ToUTF8(const uint8_t *src, uint32_t n, bool *errors);
|
||||
static std::string doUTF32ToUTF8(const uint8_t *src, uint32_t n, bool *errors);
|
||||
|
||||
// convert characters to/from UTF8
|
||||
static uint32_t fromUTF8(const uint8_t *&src, uint32_t &size);
|
||||
|
||||
@ -1,14 +1,11 @@
|
||||
# SPDX-FileCopyrightText: 2024 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-FileCopyrightText: 2012 - 2024 Symless Ltd
|
||||
# SPDX-FileCopyrightText: 2009 - 2012 Nick Bolton
|
||||
# SPDX-FileCopyrightText: (C) 2024 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-FileCopyrightText: (C) 2012 - 2024 Symless Ltd
|
||||
# SPDX-FileCopyrightText: (C) 2009 - 2012 Nick Bolton
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
add_library(client STATIC
|
||||
Client.cpp
|
||||
Client.h
|
||||
HelloBack.cpp
|
||||
HelloBack.h
|
||||
ServerProxy.cpp
|
||||
ServerProxy.h
|
||||
)
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Deskflow -- mouse and keyboard sharing utility
|
||||
* SPDX-FileCopyrightText: (C) 2025 Deskflow Developers
|
||||
* SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd.
|
||||
* SPDX-FileCopyrightText: (C) 2012 - 2016, 2026 Symless Ltd.
|
||||
* SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman
|
||||
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
||||
*/
|
||||
@ -11,12 +11,13 @@
|
||||
#include "arch/Arch.h"
|
||||
#include "base/IEventQueue.h"
|
||||
#include "base/Log.h"
|
||||
#include "base/NetworkProtocol.h"
|
||||
#include "client/ServerProxy.h"
|
||||
#include "common/Settings.h"
|
||||
#include "deskflow/Clipboard.h"
|
||||
#include "deskflow/DeskflowException.h"
|
||||
#include "deskflow/IPlatformScreen.h"
|
||||
#include "deskflow/PacketStreamFilter.h"
|
||||
#include "deskflow/ProtocolTypes.h"
|
||||
#include "deskflow/ProtocolUtil.h"
|
||||
#include "deskflow/Screen.h"
|
||||
#include "deskflow/StreamChunker.h"
|
||||
@ -27,9 +28,6 @@
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
|
||||
using namespace deskflow::client;
|
||||
|
||||
//
|
||||
// Client
|
||||
@ -52,19 +50,6 @@ Client::Client(
|
||||
// register suspend/resume event handlers
|
||||
m_events->addHandler(EventTypes::ScreenSuspend, getEventTarget(), [this](const auto &) { handleSuspend(); });
|
||||
m_events->addHandler(EventTypes::ScreenResume, getEventTarget(), [this](const auto &) { handleResume(); });
|
||||
|
||||
m_pHelloBack = std::make_unique<HelloBack>(std::make_shared<HelloBack::Deps>(
|
||||
[this]() {
|
||||
sendConnectionFailedEvent("got invalid hello message from server");
|
||||
cleanupTimer();
|
||||
cleanupConnection();
|
||||
},
|
||||
[this](int major, int minor) {
|
||||
sendConnectionFailedEvent(IncompatibleClientException(major, minor).what());
|
||||
cleanupTimer();
|
||||
cleanupConnection();
|
||||
}
|
||||
));
|
||||
}
|
||||
|
||||
Client::~Client()
|
||||
@ -79,6 +64,11 @@ Client::~Client()
|
||||
delete m_socketFactory;
|
||||
}
|
||||
|
||||
void Client::setServerAddress(const NetworkAddress &address)
|
||||
{
|
||||
m_serverAddress = address;
|
||||
}
|
||||
|
||||
void Client::connect(size_t addressIndex)
|
||||
{
|
||||
if (m_stream != nullptr) {
|
||||
@ -579,7 +569,33 @@ void Client::handleClipboardGrabbed(const Event &event)
|
||||
|
||||
void Client::handleHello()
|
||||
{
|
||||
m_pHelloBack->handleHello(m_stream, m_name);
|
||||
int16_t serverMajor;
|
||||
int16_t serverMinor;
|
||||
|
||||
// as luck would have it, both "Synergy" and "Barrier" are 7 chars,
|
||||
// so we eat 7 chars and then test for either protocol name.
|
||||
// we cannot re-use `readf` to check for various hello messages,
|
||||
// as `readf` eats bytes (advances the stream position reference).
|
||||
std::string protocolName;
|
||||
ProtocolUtil::readf(m_stream, kMsgHello, &protocolName, &serverMajor, &serverMinor);
|
||||
|
||||
if (const auto proto = networkProtocolFromString(QString::fromStdString(protocolName));
|
||||
proto == NetworkProtocol::Unknown) {
|
||||
LOG_WARN("hello back received with protocol: '%s'", protocolName.c_str());
|
||||
sendConnectionFailedEvent("got invalid hello message from server");
|
||||
cleanupTimer();
|
||||
cleanupConnection();
|
||||
return;
|
||||
}
|
||||
|
||||
LOG_DEBUG(
|
||||
"saying hello back with version %s %d.%d", protocolName.c_str(), kProtocolMajorVersion, kProtocolMinorVersion
|
||||
);
|
||||
|
||||
// dynamically build write format for hello back since `ProtocolUtil::writef`
|
||||
// doesn't support formatting fixed length strings yet.
|
||||
std::string helloBackMessage = protocolName + kMsgHelloBackArgs;
|
||||
ProtocolUtil::writef(m_stream, helloBackMessage.c_str(), kProtocolMajorVersion, kProtocolMinorVersion, &m_name);
|
||||
|
||||
// now connected but waiting to complete handshake
|
||||
setupScreen();
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Deskflow -- mouse and keyboard sharing utility
|
||||
* SPDX-FileCopyrightText: (C) 2025 Deskflow Developers
|
||||
* SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd.
|
||||
* SPDX-FileCopyrightText: (C) 2012 - 2016, 2026 Symless Ltd.
|
||||
* SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman
|
||||
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
||||
*/
|
||||
@ -10,13 +10,11 @@
|
||||
|
||||
#include "deskflow/IClient.h"
|
||||
|
||||
#include "HelloBack.h"
|
||||
#include "base/EventTypes.h"
|
||||
#include "deskflow/IClipboard.h"
|
||||
#include "net/NetworkAddress.h"
|
||||
|
||||
#include <climits>
|
||||
#include <memory>
|
||||
|
||||
class Event;
|
||||
class EventQueueTimer;
|
||||
@ -77,6 +75,7 @@ public:
|
||||
the client is trying to connect or is already connected.
|
||||
*/
|
||||
void connect(size_t addressIndex = 0);
|
||||
void setServerAddress(const NetworkAddress &address);
|
||||
|
||||
//! Disconnect
|
||||
/*!
|
||||
@ -202,5 +201,4 @@ private:
|
||||
bool m_enableClipboard = true;
|
||||
size_t m_maximumClipboardSize = INT_MAX;
|
||||
size_t m_resolvedAddressesCount = 0;
|
||||
std::unique_ptr<deskflow::client::HelloBack> m_pHelloBack;
|
||||
};
|
||||
|
||||
@ -1,99 +0,0 @@
|
||||
/*
|
||||
* Deskflow -- mouse and keyboard sharing utility
|
||||
* SPDX-FileCopyrightText: (C) 2024 Symless Ltd.
|
||||
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
||||
*/
|
||||
|
||||
#include "HelloBack.h"
|
||||
|
||||
#include "base/Log.h"
|
||||
#include "deskflow/ProtocolTypes.h"
|
||||
#include "deskflow/ProtocolUtil.h"
|
||||
|
||||
#include <map>
|
||||
#include <set>
|
||||
|
||||
namespace deskflow::client {
|
||||
|
||||
//
|
||||
// HelloBack::Deps
|
||||
//
|
||||
|
||||
void HelloBack::Deps::invalidHello()
|
||||
{
|
||||
m_invalidHello();
|
||||
}
|
||||
|
||||
void HelloBack::Deps::incompatible(int major, int minor)
|
||||
{
|
||||
m_incompatible(major, minor);
|
||||
}
|
||||
|
||||
//
|
||||
// HelloBack
|
||||
//
|
||||
|
||||
void HelloBack::handleHello(deskflow::IStream *stream, const std::string &clientName) const
|
||||
{
|
||||
int16_t serverMajor;
|
||||
int16_t serverMinor;
|
||||
|
||||
// as luck would have it, both "Synergy" and "Barrier" are 7 chars,
|
||||
// so we eat 7 chars and then test for either protocol name.
|
||||
// we cannot re-use `readf` to check for various hello messages,
|
||||
// as `readf` eats bytes (advances the stream position reference).
|
||||
std::string protocolName;
|
||||
ProtocolUtil::readf(stream, kMsgHello, &protocolName, &serverMajor, &serverMinor);
|
||||
|
||||
if (protocolName != kSynergyProtocolName && protocolName != kBarrierProtocolName) {
|
||||
m_deps->invalidHello();
|
||||
return;
|
||||
}
|
||||
|
||||
// check versions
|
||||
LOG_DEBUG("got hello from %s, protocol v%d.%d", protocolName.c_str(), serverMajor, serverMinor);
|
||||
|
||||
const auto helloBackMajor = m_majorVersion;
|
||||
auto helloBackMinor = m_minorVersion;
|
||||
|
||||
if (shouldDowngrade(serverMajor, serverMinor)) {
|
||||
LOG_NOTE("downgrading to %d.%d protocol for server", serverMajor, serverMinor);
|
||||
helloBackMinor = serverMinor;
|
||||
} else if (serverMajor < m_majorVersion || (serverMajor == m_majorVersion && serverMinor < m_minorVersion)) {
|
||||
m_deps->incompatible(serverMajor, serverMinor);
|
||||
return;
|
||||
}
|
||||
|
||||
// say hello back with same protocol name and version
|
||||
LOG_DEBUG("saying hello back with version %s %d.%d", protocolName.c_str(), helloBackMajor, helloBackMinor);
|
||||
|
||||
// dynamically build write format for hello back since `ProtocolUtil::writef`
|
||||
// doesn't support formatting fixed length strings yet.
|
||||
std::string helloBackMessage = protocolName + kMsgHelloBackArgs;
|
||||
ProtocolUtil::writef(stream, helloBackMessage.c_str(), helloBackMajor, helloBackMinor, &clientName);
|
||||
}
|
||||
|
||||
bool HelloBack::shouldDowngrade(int major, int minor) const
|
||||
{
|
||||
const std::map<int, std::set<int>> map{
|
||||
// 1.6 is compatible with 1.7 and 1.8
|
||||
{6, {7, 8}},
|
||||
|
||||
// 1.7 is compatible with 1.8
|
||||
{7, {8}},
|
||||
};
|
||||
|
||||
if (major == m_majorVersion) {
|
||||
auto versions = map.find(minor);
|
||||
if (versions != map.end()) {
|
||||
auto compatibleVersions = versions->second;
|
||||
if (compatibleVersions.contains(m_minorVersion)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace deskflow::client
|
||||
@ -1,71 +0,0 @@
|
||||
/*
|
||||
* Deskflow -- mouse and keyboard sharing utility
|
||||
* SPDX-FileCopyrightText: (C) 2024 Symless Ltd.
|
||||
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "deskflow/ProtocolTypes.h"
|
||||
#include "io/IStream.h"
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <string> //IWYU
|
||||
|
||||
namespace deskflow::client {
|
||||
|
||||
class HelloBack
|
||||
{
|
||||
public:
|
||||
struct Deps
|
||||
{
|
||||
Deps() = default;
|
||||
explicit Deps(std::function<void()> invalidHello, std::function<void(int, int)> incompatible)
|
||||
: m_invalidHello(std::move(invalidHello)),
|
||||
m_incompatible(std::move(incompatible))
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
virtual ~Deps() = default;
|
||||
|
||||
/**
|
||||
* @brief Call when invalid hello message received from server.
|
||||
*/
|
||||
virtual void invalidHello();
|
||||
|
||||
/**
|
||||
* @brief Call when the client is incompatible with the server.
|
||||
*/
|
||||
virtual void incompatible(int major, int minor);
|
||||
|
||||
private:
|
||||
std::function<void()> m_invalidHello;
|
||||
std::function<void(int, int)> m_incompatible;
|
||||
};
|
||||
|
||||
explicit HelloBack(
|
||||
std::shared_ptr<Deps> deps, const int16_t majorVersion = kProtocolMajorVersion,
|
||||
const int16_t minorVersion = kProtocolMinorVersion
|
||||
)
|
||||
: m_deps(deps),
|
||||
m_majorVersion(majorVersion),
|
||||
m_minorVersion(minorVersion)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Handle hello message from server and reply with hello back.
|
||||
*/
|
||||
void handleHello(deskflow::IStream *stream, const std::string &clientName) const;
|
||||
|
||||
private:
|
||||
bool shouldDowngrade(int major, int minor) const;
|
||||
|
||||
std::shared_ptr<Deps> m_deps;
|
||||
int16_t m_majorVersion;
|
||||
int16_t m_minorVersion;
|
||||
};
|
||||
|
||||
} // namespace deskflow::client
|
||||
@ -1,17 +1,17 @@
|
||||
# SPDX-FileCopyrightText: (C) 2024 - 2025 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
set(CORE_BINARY "${CMAKE_PROJECT_NAME}-core")
|
||||
set(CORE_BINARY "${CMAKE_PROJECT_NAME}-core")
|
||||
if(WIN32)
|
||||
string(APPEND CORE_BINARY ".exe")
|
||||
endif()
|
||||
|
||||
configure_file(Constants.h.in Constants.h @ONLY)
|
||||
|
||||
unset(CLIENT_BINARY)
|
||||
unset(SERVER_BINARY)
|
||||
configure_file(VersionInfo.h.in VersionInfo.h @ONLY)
|
||||
|
||||
add_library(common STATIC
|
||||
Coordinate.h
|
||||
Enums.h
|
||||
ExitCodes.h
|
||||
I18N.h
|
||||
I18N.cpp
|
||||
@ -22,6 +22,7 @@ add_library(common STATIC
|
||||
QSettingsProxy.h
|
||||
UrlConstants.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Constants.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/VersionInfo.h
|
||||
)
|
||||
|
||||
target_link_libraries(common PUBLIC Qt6::Core)
|
||||
|
||||
@ -12,8 +12,6 @@ const auto kAppId = "@CMAKE_PROJECT_NAME@";
|
||||
const auto kAppDescription = "@CMAKE_PROJECT_DESCRIPTION@";
|
||||
const auto kDaemonBinName = "@CMAKE_PROJECT_NAME@-daemon";
|
||||
const auto kDaemonIpcName = "@CMAKE_PROJECT_NAME@-daemon";
|
||||
const auto kDaemonLogFilename = "@CMAKE_PROJECT_NAME@-daemon.log";
|
||||
const auto kDefaultLogFile = "@CMAKE_PROJECT_NAME@.log";
|
||||
const auto kRevFqdnName = "@CMAKE_PROJECT_REV_FQDN@";
|
||||
|
||||
const auto kCopyright = //
|
||||
@ -24,12 +22,6 @@ const auto kCopyright = //
|
||||
|
||||
const auto kCoreBinName = "@CORE_BINARY@";
|
||||
|
||||
const auto kTlsDirName = "tls";
|
||||
const auto kTlsCertificateFilename = "@CMAKE_PROJECT_NAME@.pem";
|
||||
const auto kTlsFingerprintLocalFilename = "local-fingerprint";
|
||||
const auto kTlsFingerprintTrustedServersFilename = "trusted-servers";
|
||||
const auto kTlsFingerprintTrustedClientsFilename = "trusted-clients";
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
// clang-format off
|
||||
@ -37,7 +29,6 @@ const auto kWindowsRuntimeMajor = @REQUIRED_MSVC_RUNTIME_MAJOR@;
|
||||
const auto kWindowsRuntimeMinor = @REQUIRED_MSVC_RUNTIME_MINOR@;
|
||||
// clang-format on
|
||||
|
||||
constexpr auto kWindowsRegistryKey = L"SOFTWARE\\@CMAKE_PROJECT_PROPER_NAME@";
|
||||
constexpr auto kCloseEventName = L"Global\\@CMAKE_PROJECT_PROPER_NAME@Close";
|
||||
constexpr auto kSendSasEventName = L"Global\\@CMAKE_PROJECT_PROPER_NAME@SendSAS";
|
||||
|
||||
|
||||