diff --git a/Synergy-Core b/Synergy-Core index c579858..3698410 160000 --- a/Synergy-Core +++ b/Synergy-Core @@ -1 +1 @@ -Subproject commit c579858dd23739aa6ed12928fd4f3c7c23d9130f +Subproject commit 36984104ec98aa4d03206d654746113c865e507d diff --git a/buildWindows.cmd b/buildWindows.cmd new file mode 100644 index 0000000..cbf8d5c --- /dev/null +++ b/buildWindows.cmd @@ -0,0 +1,155 @@ +@echo off + +set libQtPath=c:\Qt\Qt5.12.9\5.12.9\msvc2017_64 + +if not exist "%libQtPath%" ( + echo "error: Unable to resolve Qt library. Make sure the 'libQtPath' variable is correct." + exit 1 + ) + +rem https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=vs-2019 +set vcvarsallCommand=c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat + +if not exist "%vcvarsallCommand%" ( + echo "error: Unable to resolve vcvarsall command file. Make sure the 'vcvarsallCommand' variable is correct." + exit 1 + ) + +set upstreamURL=https://github.com/DEAKSoftware/Synergy-Binaries.git + +for /F "tokens=* USEBACKQ" %%F in (`git config --get remote.origin.url`) do ( + set queriedURL=%%F + ) + +if "%upstreamURL%" NEQ "%queriedURL%" ( + echo "error: Unrecognised Git upstream URL. This script must run within the top-level directory of the Synergy-Binaries repository." + exit 1 + ) + +for /F "tokens=* USEBACKQ" %%F in (`git rev-parse --show-toplevel`) do ( + set toplevelPath=%%F + ) + +if "%toplevelPath%" EQU "" ( + echo "error: Unrecognised top-level directory. This script must run within the top-level directory of the Synergy-Binaries repository." + exit 1 + ) + +set synergyCorePath=%toplevelPath%\Synergy-Core +set buildPath=%synergyCorePath%\build +set binariesPath=%toplevelPath%\Binaries +set toolsPath=%toplevelPath%\Tools + +call "%vcvarsallCommand%" x64 + +:main + + +call :configure +call :buildMSI + + +exit 0 + +:configureSubmodules + + git submodule update --init --remote --recursive + exit /b 0 + +:configureCMake + + cmake -S "%synergyCorePath%" -B "%buildPath%" -G "Visual Studio 16 2019" -D CMAKE_PREFIX_PATH="%libQtPath%" -D CMAKE_BUILD_TYPE=MINSIZEREL -D SYNERGY_ENTERPRISE=ON + if %errorlevel% equ 1 exit 1 + exit /b 0 + +:configureVersion + + call "%buildPath%\version.bat" + set synergyVersion=%SYNERGY_VERSION_MAJOR%.%SYNERGY_VERSION_MINOR%.%SYNERGY_VERSION_PATCH% + set synergyVersionStage=%SYNERGY_VERSION_STAGE% + exit /b 0 + +:configure + + call :configureSubmodules + call :configureCMake + call :configureVersion + exit /b 0 + +:buildMSBuild + + pushd "%buildPath%" + if %errorlevel% equ 1 exit 1 + + msbuild synergy-core.sln /p:Platform="x64" /p:Configuration=Release /m + if %errorlevel% equ 1 exit 1 + + popd + + exit /b 0 + +:buildZIP + + setlocal + + set inputPath=%buildPath%\bin\Release + set outputPath=%binariesPath%\Synergy-%synergyVersion%-%synergyVersionStage%-x64 + + mkdir "%outputPath%" + + copy "%inputPath%\libEGL.dll" "%outputPath%" + copy "%inputPath%\libGLESv2.dll" "%outputPath%" + copy "%inputPath%\Qt5Core.dll" "%outputPath%" + copy "%inputPath%\Qt5Gui.dll" "%outputPath%" + copy "%inputPath%\Qt5Network.dll" "%outputPath%" + copy "%inputPath%\Qt5Svg.dll" "%outputPath%" + copy "%inputPath%\Qt5Widgets.dll" "%outputPath%" + copy "%inputPath%\synergy.exe" "%outputPath%" + copy "%inputPath%\synergyc.exe" "%outputPath%" + copy "%inputPath%\synergyd.exe" "%outputPath%" + copy "%inputPath%\synergys.exe" "%outputPath%" + copy "%inputPath%\syntool.exe" "%outputPath%" + + mkdir "%outputPath%\Platforms" + copy "%inputPath%\Platforms" "%outputPath%\Platforms" + + mkdir "%outputPath%\OpenSSL" + copy "%synergyCorePath%\ext\openssl\windows\x64\bin\*" "%outputPath%\OpenSSL" + + endlocal + exit /b 0 + +:buildMSI + + pushd "%buildPath%\installer" + if %errorlevel% equ 1 exit 1 + + msbuild Synergy.sln /p:Configuration=Release + if %errorlevel% equ 1 exit 1 + + popd + + copy "%buildPath%\installer\bin\Release\Synergy.msi" "%binariesPath%" + if %errorlevel% equ 1 exit 1 + + ren "%binariesPath%\Synergy.msi" "Synergy-%synergyVersion%-%synergyVersionStage%-x64.msi" + + exit /b 0 + +:buildClean + + pushd "%synergyCorePath%" + if %errorlevel% equ 1 exit 1 + + git clean -fdx + + popd + + pushd "%toplevelPath%" + if %errorlevel% equ 1 exit 1 + + git clean -fdx + + popd + + exit /b 0 diff --git a/readme.html b/readme.html new file mode 100644 index 0000000..896fdeb --- /dev/null +++ b/readme.html @@ -0,0 +1,1220 @@ +readme

Synergy Binaries

+

Synergy is a keyboard and mouse sharing tool for devices connected over a network. Up until version 1.8.8, binaries were freely available to download from the official project website. Since then, Synergy maintainers have decided to publish binaries behind a pay wall. However, Synergy is an open source project, and therefore anyone can build the application on their system.

+

This repository provides some convenience tools and documentation for building Synergy. Alternatively, one can also download the pre-compiled binaries.

+

Information presented here is based on the official wiki pages. Anyone attempting to build Synergy should consult the official wiki pages first.

+

Download Binaries

+

The following binaries available in the Releases section:

+ +

If you can’t locate a binary package for your particular distribution, try building the project yourself.

+

Project Structure

+

The following files or directories should be of interest:

+ + + + + + + + + + + + + + + + + + + + + + + + + +
File / DirectoryDescription
BinariesOutput location for the build binaries.
[Synergy-Core]((https://github.com/symless/synergy-core/)The official Synergy Core submodule.
ToolsTemporary location for build tools.
buildLinux.shShell script for building binaries in Linux Mint or Ubuntu.
+ + +

Cloning the Repository

+

Before you begin building Synergy, you need to recursively clone this project and its submodules:

+
    +
  1. +

    Clone the repository:

    +
    git clone https://github.com/DEAKSoftware/Synergy-Binaries.git
    +
    + + +
  2. +
  3. +

    Update all submodules:

    +
    cd Synergy-Binaries
    +git submodule update --init --remote --recursive
    +
    + + +
  4. +
+

Linux Mint / Ubuntu

+

Prerequisites

+

Install the following tools and dependencies:

+
sudo apt-get install \
+    cmake g++ libavahi-compat-libdnssd-dev \
+    libcurl4-openssl-dev libegl1-mesa \
+    libgl1-mesa-glx libqt5svg5-dev libsodium-dev \
+    libssl-dev libsystemd-dev libx11-dev \
+    make qtbase5-dev qtcreator qtdeclarative5-dev \
+    qttools5-dev xorg-dev
+
+ + +

For building Debian packages:

+
sudo apt-get install build-essential devscripts dh-make lintian
+
+ + +

Alternatively, consult the official wiki for installing dependencies.

+

Building

+

Run the shell script buildLinux.sh --all to build all packages. For other options, run with the --help switch.

+

Alternatively, you can opt to build the binaries only, as detailed below. We’re assuming the current path is in the Synergy-Binaries project root.

+
    +
  1. +

    Create a build subdirectory in the Synergy-Core submodule:

    +
    cd Synergy-Core
    +mkdir build
    +cd build
    +
    + + +
  2. +
  3. +

    Configure the project:

    +
    cmake .. -D CMAKE_BUILD_TYPE=MINSIZEREL -D SYNERGY_ENTERPRISE=ON
    +
    + + +
  4. +
  5. +

    Build the project:

    +
    cmake --build . --parallel 8
    +
    + + +
  6. +
  7. +

    Optional, install the application:

    +
    sudo cmake --install .
    +
    + + +
  8. +
+

Launching Automatically

+

In Linux Mint we can launch synergy client automatically via System Settings → Startup Applications, then add an entry with the command:

+
/usr/bin/synergyc --name ClientName --daemon #.#.#.#
+
+ + +

Substitute the ClientName with the local machine name, and the Synergy server IP #.#.#.# with whatever appropriate for your set-up.

+ + +

Windows

+

Prerequisites

+
    +
  1. +

    Install the following tools and dependencies:

    +
      +
    • Git for Windows
    • +
    • CMake
    • +
    • Visual Studio 2019, select the following components:
        +
      • VS 2019 C++ x64/x86 build tools
      • +
      • Windows 10 SDK
      • +
      +
    • +
    • WiX Toolset, install the following components:
        +
      • WiX Toolset Build Tools
      • +
      • WiX Toolset Visual Studio 2019 Extension
      • +
      +
    • +
    • Qt 5, select the following components:
        +
      • Qt 5.12.9, MSVC 2017 64-bit
      • +
      +
    • +
    +
  2. +
+

2.

+

Building

+

Run the command script buildWindows.cmd --all to build all packages. For other options, run with the --help switch.

+

Alternatively, you can opt to build the binaries only, as detailed below. We’re assuming the current path is in the Synergy-Binaries project root.

+ +

DEAK Software is not the maintainer of Synergy, nor is affiliated with Symless in anyway way. Bugs or issues related to the application should be reported directly on the official Synergy GitHub page.

+

This project is released under the MIT License.

\ No newline at end of file diff --git a/readme.md b/readme.md index 641b17e..d9b5a3e 100644 --- a/readme.md +++ b/readme.md @@ -22,16 +22,16 @@ If you can't locate a binary package for your particular distribution, try build The following files or directories should be of interest: -File / Directory | Description ---- | --- -[`Binaries`](./Binaries) | Output location for the build binaries. -`Synergy-Core` | The official Synergy Core submodule. -[`Tools`](./Tools) | Temporary location for build tools. -[`buildLinux.sh`](./buildLinux.sh) | Shell script for building binaries in Linux Mint or Ubuntu. +File / Directory | Description +--- | --- +[`Binaries`](./Binaries) | Output location for the build binaries. +[`Synergy-Core`]((https://github.com/symless/synergy-core/) | The official Synergy Core submodule. +[`Tools`](./Tools) | Temporary location for build tools. +[`buildLinux.sh`](./buildLinux.sh) | Shell script for building binaries in Linux Mint or Ubuntu. ## Cloning the Repository @@ -52,9 +52,15 @@ Before you begin building Synergy, you need to recursively clone this project an ### Prerequisites -Install the following packages: +Install the following tools and dependencies: - sudo apt-get install qtcreator qtbase5-dev qttools5-dev cmake make g++ xorg-dev libssl-dev libx11-dev libsodium-dev libgl1-mesa-glx libegl1-mesa libcurl4-openssl-dev libavahi-compat-libdnssd-dev qtdeclarative5-dev libqt5svg5-dev libsystemd-dev + sudo apt-get install \ + cmake g++ libavahi-compat-libdnssd-dev \ + libcurl4-openssl-dev libegl1-mesa \ + libgl1-mesa-glx libqt5svg5-dev libsodium-dev \ + libssl-dev libsystemd-dev libx11-dev \ + make qtbase5-dev qtcreator qtdeclarative5-dev \ + qttools5-dev xorg-dev For building Debian packages: @@ -64,7 +70,7 @@ Alternatively, consult the [official wiki](https://github.com/symless/synergy-co ### Building -Run the shell script with `buildLinux.sh --all` to build all packages. For other options, run with the `--help` switch. +Run the shell script `buildLinux.sh --all` to build all packages. For other options, run with the `--help` switch. Alternatively, you can opt to build the binaries only, as detailed below. We're assuming the current path is in the `Synergy-Binaries` project root. @@ -98,11 +104,33 @@ Substitute the `ClientName` with the local machine name, and the Synergy server ## macOS _Incomplete._ +--> ## Windows -_Incomplete._ - --> +### Prerequisites + +1. Install the following tools and dependencies: + + * [Git for Windows](https://gitforwindows.org/) + * [CMake](https://cmake.org/) + * [Visual Studio 2019](https://visualstudio.microsoft.com/downloads/), select the following components: + * VS 2019 C++ x64/x86 build tools + * Windows 10 SDK + * [WiX Toolset](https://wixtoolset.org/releases/), install the following components: + * WiX Toolset Build Tools + * WiX Toolset Visual Studio 2019 Extension + * [Qt 5](https://www.qt.io/download), select the following components: + * Qt 5.12.9, MSVC 2017 64-bit + +2. + +### Building + +Run the command script `buildWindows.cmd --all` to build all packages. For other options, run with the `--help` switch. + +Alternatively, you can opt to build the binaries only, as detailed below. We're assuming the current path is in the `Synergy-Binaries` project root. + ## Disclaimers and Legal