diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 48dc2fe25..142d9c577 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -63,14 +63,14 @@ jobs:
uses: actions/cache@v4
with:
path: |
- deskflow/vcpkg
- deskflow/vcpkg_installed
- key: vcpkg-${{ runner.os }}-${{ hashFiles('deskflow/vcpkg.json', 'deskflow/vcpkg-configuration.json') }}
+ odin/vcpkg
+ odin/vcpkg_installed
+ key: vcpkg-${{ runner.os }}-${{ hashFiles('odin/vcpkg.json', 'odin/vcpkg-configuration.json') }}
- name: Cache deps dir
uses: actions/cache@v4
with:
- path: deskflow/deps
+ path: odin/deps
key: ${{ runner.os }}-deps-${{ hashFiles('config.yaml') }}
# This effectively runs `vcvarsall.bat`, etc. It's not actually installing
@@ -90,7 +90,7 @@ jobs:
run: python ./scripts/setup.py
- name: Get version
- uses: ./deskflow/.github/actions/get-version
+ uses: ./odin/.github/actions/get-version
- name: Configure
run: cmake -B build --preset=windows-release
@@ -99,11 +99,11 @@ jobs:
run: cmake --build build -j8
- name: Tests
- uses: ./deskflow/.github/actions/run-tests
+ uses: ./odin/.github/actions/run-tests
timeout-minutes: 2
with:
job: ${{ matrix.target.name }}
- bin-dir: build/deskflow/bin
+ bin-dir: build/odin/bin
- name: Package
if: ${{ env.PACKAGE_BUILD == 'true' }}
@@ -161,14 +161,14 @@ jobs:
- name: Cache deps dir
uses: actions/cache@v4
with:
- path: deskflow/deps
+ path: odin/deps
key: ${{ runner.os }}-deps-${{ hashFiles('config.yaml') }}
- name: Install dependencies
run: ./scripts/setup.py
- name: Get version
- uses: ./deskflow/.github/actions/get-version
+ uses: ./odin/.github/actions/get-version
- name: Configure
run: cmake -B build --preset=macos-release
@@ -177,11 +177,11 @@ jobs:
run: cmake --build build -j8
- name: Tests
- uses: ./deskflow/.github/actions/run-tests
+ uses: ./odin/.github/actions/run-tests
timeout-minutes: 2
with:
job: ${{ matrix.target.name }}
- bin-dir: build/deskflow/bin
+ bin-dir: build/odin/bin
- name: Package
if: ${{ env.PACKAGE_BUILD == 'true' }}
@@ -221,7 +221,7 @@ jobs:
- name: Get JSON file
id: get
run: |
- json_file="./deskflow/.github/workflows/ci-linux.json"
+ json_file="./odin/.github/workflows/ci-linux.json"
json=$(cat $json_file)
echo "json=$(echo $json)" >> $GITHUB_OUTPUT
@@ -254,7 +254,7 @@ jobs:
DEBIAN_FRONTEND: noninteractive
- name: Get version
- uses: ./deskflow/.github/actions/get-version
+ uses: ./odin/.github/actions/get-version
- name: Configure
run: cmake -B build --preset=linux-release ${{ matrix.distro.extra-cmake-args }}
@@ -263,11 +263,11 @@ jobs:
run: cmake --build build -j8
- name: Tests
- uses: ./deskflow/.github/actions/run-tests
+ uses: ./odin/.github/actions/run-tests
timeout-minutes: 2
with:
job: linux-${{ matrix.distro.name }}
- bin-dir: build/deskflow/bin
+ bin-dir: build/odin/bin
- name: Package
if: ${{ env.PACKAGE_BUILD == 'true' }}
diff --git a/.gitmodules b/.gitmodules
index 1d3a19dc6..774c0663a 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,3 @@
-[submodule "synergy-deskflow"]
- path = deskflow
- url = git@github.com:symless/synergy-deskflow.git
+[submodule "synergy-odin"]
+ path = odin
+ url = git@github.com:symless/synergy-odin.git
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 62fe0d6cd..70d62cd7b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,15 +17,15 @@ cmake_minimum_required(VERSION 3.8)
project(synergy C CXX)
-include(cmake/Deskflow.cmake)
+include(cmake/Odin.cmake)
include(cmake/Licensing.cmake)
include(cmake/Build.cmake)
include(cmake/Libraries.cmake)
-configure_deskflow()
+configure_odin()
configure_licensing()
configure_build()
configure_libs()
-add_subdirectory(deskflow)
+add_subdirectory(odin)
add_subdirectory(src)
diff --git a/cmake/Deskflow.cmake b/cmake/Odin.cmake
similarity index 97%
rename from cmake/Deskflow.cmake
rename to cmake/Odin.cmake
index 4f601aff1..e575f07e4 100644
--- a/cmake/Deskflow.cmake
+++ b/cmake/Odin.cmake
@@ -13,9 +13,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
-macro(configure_deskflow)
+# Synergy Odin is our fork of Deskflow.
+macro(configure_odin)
- set(DESKFLOW_SOURCE_DIR ${CMAKE_SOURCE_DIR}/deskflow)
+ set(DESKFLOW_SOURCE_DIR ${CMAKE_SOURCE_DIR}/odin)
configure_meta()
configure_dist()
diff --git a/deskflow b/odin
similarity index 100%
rename from deskflow
rename to odin
diff --git a/scripts/lib/bootstrap.py b/scripts/lib/bootstrap.py
index 7ca0c034a..4673c12f9 100644
--- a/scripts/lib/bootstrap.py
+++ b/scripts/lib/bootstrap.py
@@ -16,14 +16,19 @@
# along with this program. If not, see .
import sys, os, subprocess, venv
+import lib.config as config
VENV_DIR = ".venv"
-def add_deskflow_path(script):
+def add_odin_path(script):
+ path = os.path.abspath(os.path.join(os.path.dirname(script), f"../{config.ODIN_DIR}/scripts"))
+ if not os.path.exists(path):
+ raise RuntimeError(f"Path does not exist: {path}")
+
sys.path.insert(
0,
- os.path.abspath(os.path.join(os.path.dirname(script), "../deskflow/scripts")),
+ os.path.abspath(path),
)
diff --git a/scripts/lib/config.py b/scripts/lib/config.py
new file mode 100644
index 000000000..da6552705
--- /dev/null
+++ b/scripts/lib/config.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python3
+
+# Synergy -- mouse and keyboard sharing utility
+# Copyright (C) 2024 Symless Ltd.
+#
+# This package is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# found in the file LICENSE that should have accompanied this file.
+#
+# This package is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+ODIN_DIR = "odin"
+
diff --git a/scripts/package.py b/scripts/package.py
index 17f344d53..d235b611f 100755
--- a/scripts/package.py
+++ b/scripts/package.py
@@ -17,13 +17,13 @@
import os, argparse
import lib.bootstrap as bootstrap
+import lib.config as config
APP_NAME = "Synergy"
-DESKFLOW_SOURCE_DIR = "deskflow"
-DESKFLOW_BUILD_DIR = "build/deskflow"
+ODIN_BUILD_DIR = f"build/{config.ODIN_DIR}"
+VERSION_FILENAME = f"{config.ODIN_DIR}/VERSION"
DEFAULT_PREFIX = "synergy"
DIST_DIR = "dist"
-VERSION_FILENAME = "deskflow/VERSION"
TEST_CMD = "synergy-server --version"
PACKAGE_NAME = "synergy"
@@ -38,7 +38,7 @@ def main():
args = parser.parse_args()
bootstrap.ensure_in_venv(__file__)
- bootstrap.add_deskflow_path(__file__)
+ bootstrap.add_odin_path(__file__)
import package
@@ -51,12 +51,12 @@ def main():
package.package(
filename_base,
version,
- DESKFLOW_BUILD_DIR,
+ ODIN_BUILD_DIR,
DIST_DIR,
TEST_CMD,
APP_NAME,
PACKAGE_NAME,
- source_dir=DESKFLOW_SOURCE_DIR,
+ source_dir=config.ODIN_DIR,
leave_test_installed=args.leave_test_installed,
)
diff --git a/scripts/setup.py b/scripts/setup.py
index 3dceba669..e91b42b32 100755
--- a/scripts/setup.py
+++ b/scripts/setup.py
@@ -19,9 +19,7 @@
import sys
import os
import lib.bootstrap as bootstrap
-
-DESKFLOW_DIR = "deskflow"
-
+import lib.config as config
def main():
bootstrap.ensure_in_venv(__file__)
@@ -41,20 +39,18 @@ def setup_deskflow():
"submodule",
"update",
"--init",
- "--recursive",
- "--remote",
- "--merge",
+ "--recursive"
]
)
# HACK: This proves why we should not be using Meson, and should only use CMake.
args = sys.argv[1:]
if "--build-dir" not in args:
- args += ["--build-dir", "../build/deskflow"]
+ args += ["--build-dir", f"../build/{config.ODIN_DIR}"]
current_dir = os.getcwd()
try:
- os.chdir(DESKFLOW_DIR)
+ os.chdir(config.ODIN_DIR)
subprocess.run([sys.executable, "scripts/install_deps.py"] + sys.argv[1:])
finally:
os.chdir(current_dir)