From ad87827e92a559da77366c1f7d7ba31fe01bc7d3 Mon Sep 17 00:00:00 2001
From: DominikDeak <deak.software@gmail.com>
Date: Tue, 20 Jul 2021 18:14:51 +1000
Subject: [PATCH 1/8] Added recursive tag fetching for git submodules.

---
 Scripts/build.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Scripts/build.py b/Scripts/build.py
index f14a585..a194366 100755
--- a/Scripts/build.py
+++ b/Scripts/build.py
@@ -17,6 +17,7 @@ def configureSubmodules():
    print( statusBefore )
 
    utility.runCommand( "git submodule update --init --remote --recursive" )
+   utility.runCommand( "git submodule foreach --recursive 'git fetch --tags'" )
 
    if config.productCheckout:
       os.chdir( config.productRepoPath )
@@ -64,6 +65,6 @@ def buildProducts():
 
 configureSubmodules()
 
-configureEnvironment()
+# configureEnvironment()
 
-buildProducts()
+# buildProducts()

From 2e8934da7816bef84478ff79405b3553dbeaa95b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dominik=20De=C3=A1k?= <deak.software@gmail.com>
Date: Wed, 21 Jul 2021 10:46:03 +1000
Subject: [PATCH 2/8] Fix commented out build script.

---
 Scripts/build.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Scripts/build.py b/Scripts/build.py
index a194366..39de547 100755
--- a/Scripts/build.py
+++ b/Scripts/build.py
@@ -65,6 +65,6 @@ def buildProducts():
 
 configureSubmodules()
 
-# configureEnvironment()
+configureEnvironment()
 
-# buildProducts()
+buildProducts()

From 5e5a338901bdeff7ebc9673afd2cc410fcbc2216 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dominik=20De=C3=A1k?= <deak.software@gmail.com>
Date: Wed, 21 Jul 2021 11:04:02 +1000
Subject: [PATCH 3/8] Update readme.md

---
 readme.md | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/readme.md b/readme.md
index d09275f..abcb9b1 100644
--- a/readme.md
+++ b/readme.md
@@ -6,9 +6,6 @@
 
 ## Download
 
-* [Synergy 1.13.1.41-stable](https://github.com/DEAKSoftware/Synergy-Binaries/releases/tag/1.13.1.41-stable)
-* [Synergy 1.12.0-stable](https://github.com/DEAKSoftware/Synergy-Binaries/releases/tag/1.12.0-stable)
-
 Binaries are available for the following platforms:
 
 * macOS 10.12 Sierra: `.dmg`

From 61cb532289f07758deebcc0bb1c7e58d3956c1aa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dominik=20De=C3=A1k?= <deak.software@gmail.com>
Date: Wed, 21 Jul 2021 11:24:42 +1000
Subject: [PATCH 4/8] Update readme.md

---
 readme.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/readme.md b/readme.md
index abcb9b1..46fc03d 100644
--- a/readme.md
+++ b/readme.md
@@ -8,7 +8,7 @@
 
 Binaries are available for the following platforms:
 
-* macOS 10.12 Sierra: `.dmg`
+* macOS 11.4 Big Sur: `.dmg`
 * Linux Mint 20 Ulyana: `.deb`, `.rpm`, `.AppImage`
 * Windows 10: `.msi`, portable `.zip`
 

From 0eb3fa90ff6bb2663fb3f6410eb3ae2cf03aec74 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dominik=20De=C3=A1k?= <deak.software@gmail.com>
Date: Wed, 21 Jul 2021 11:26:52 +1000
Subject: [PATCH 5/8] Update readme.md

---
 readme.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/readme.md b/readme.md
index 46fc03d..5c756ba 100644
--- a/readme.md
+++ b/readme.md
@@ -9,7 +9,7 @@
 Binaries are available for the following platforms:
 
 * macOS 11.4 Big Sur: `.dmg`
-* Linux Mint 20 Ulyana: `.deb`, `.rpm`, `.AppImage`
+* Linux Mint 20 Ulyana: `.deb`, `.rpm`, portable `.AppImage`
 * Windows 10: `.msi`, portable `.zip`
 
 See [Releases](https://github.com/DEAKSoftware/Synergy-Binaries/releases) for additional versions, such as release candidates, patches, etc. If a particular version is missing, [create a new issue](https://github.com/DEAKSoftware/Synergy-Binaries/issues/new/choose) to request new binaries. If you can't locate a binary package for your particular distribution, you might want to try building the project yourself.

From bb21dc127ab8a907af6d982b5e1d844e5ac7356c Mon Sep 17 00:00:00 2001
From: DominikDeak <deak.software@gmail.com>
Date: Thu, 22 Jul 2021 15:05:04 +1000
Subject: [PATCH 6/8] Work in progress for arm64 build on Apple M1

---
 Documentation/BuildingOnDarwin.md   | 13 ++++++-------
 Scripts/Build/BuildDarwin.sh        |  2 +-
 Scripts/Install/PackageListBrew.txt |  1 +
 Scripts/config.txt                  |  4 ++--
 Synergy-Core                        |  2 +-
 5 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/Documentation/BuildingOnDarwin.md b/Documentation/BuildingOnDarwin.md
index 77fd4cb..56a29df 100644
--- a/Documentation/BuildingOnDarwin.md
+++ b/Documentation/BuildingOnDarwin.md
@@ -7,14 +7,8 @@
       * [Homebrew](http://brew.sh/)
       * [Python 3](https://www.python.org/downloads/windows/)
       * [XCode](https://developer.apple.com/xcode/download/)
-      * [Qt 5](https://www.qt.io/download/), select the following components:
-         * Qt 5.12.9 / macOS
 
-2. Edit the [`Scripts/config.txt`](../Scripts/config.txt) file and make sure the following variables are configured properly under the `[Darwin]` section:
-
-      * `libQtPath` -- Full path to the Qt library, clang, 64-bit build.
-
-3. Run the installer script to configure additional dependencies, as noted below. If you wish to examine what packages will be installed, see package lists [`PackageListBrew.txt`](../Scripts/Install/PackageListBrew.txt) and [`PackageListPython.txt`](../Scripts/Install/PackageListPython.txt).
+2. Run the installer script to configure additional dependencies, as noted below. If you wish to examine what packages will be installed, see package lists [`PackageListBrew.txt`](../Scripts/Install/PackageListBrew.txt) and [`PackageListPython.txt`](../Scripts/Install/PackageListPython.txt).
 
       * If Python is already installed:
          ```sh
@@ -27,6 +21,11 @@
 
       Use the `--upgrade` switch to refresh packages at a later date.
 
+3. Edit the [`Scripts/config.txt`](../Scripts/config.txt) file and make sure the following variables are configured properly under the `[Darwin]` section:
+
+      * `libQtPath` -- Full path to the Qt library (query with `brew --prefix qt5`).
+      * `openSSLPath` -- Full path to the OpenSSL library (query with `brew --prefix openssl`).
+
 ### Building
 
 Build the project with the following Python script. Packages will be copied into the [`Binaries`](../Binaries) directory.
diff --git a/Scripts/Build/BuildDarwin.sh b/Scripts/Build/BuildDarwin.sh
index 48592fc..f1ea02a 100755
--- a/Scripts/Build/BuildDarwin.sh
+++ b/Scripts/Build/BuildDarwin.sh
@@ -6,7 +6,7 @@ configureCMake() {
       -D CMAKE_PREFIX_PATH="${libQtPath};${openSSLPath}" \
       -D CMAKE_BUILD_TYPE=Release \
       -D CMAKE_OSX_DEPLOYMENT_TARGET=10.12 \
-      -D CMAKE_OSX_ARCHITECTURES=x86_64 \
+      -D CMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
       -D SYNERGY_ENTERPRISE=ON \
       -D SYNERGY_REVISION="${productRevision}" \
       || exit 1
diff --git a/Scripts/Install/PackageListBrew.txt b/Scripts/Install/PackageListBrew.txt
index 91cc448..6064a04 100644
--- a/Scripts/Install/PackageListBrew.txt
+++ b/Scripts/Install/PackageListBrew.txt
@@ -3,3 +3,4 @@ git
 libsodium
 openssl
 python
+qt5
diff --git a/Scripts/config.txt b/Scripts/config.txt
index 097b5a3..45ea897 100644
--- a/Scripts/config.txt
+++ b/Scripts/config.txt
@@ -19,8 +19,8 @@
 
 [Darwin]
 
-   libQtPath   = ~/Qt5.12.9/5.12.9/clang_64
-   openSSLPath = /usr/local/opt/openssl
+   libQtPath   = /usr/local/opt/qt@5
+   openSSLPath = /usr/local/opt/openssl@1.1
 
 [Linux]
 
diff --git a/Synergy-Core b/Synergy-Core
index 67d824b..2def465 160000
--- a/Synergy-Core
+++ b/Synergy-Core
@@ -1 +1 @@
-Subproject commit 67d824b8483003d531097dded302965b88ee867b
+Subproject commit 2def4652562278b63e608b4a762ed1daee76db3b

From 536b9cf9b4c63985f9a95f5675fff26d30a9ee1b Mon Sep 17 00:00:00 2001
From: DominikDeak <deak.software@gmail.com>
Date: Thu, 22 Jul 2021 16:03:08 +1000
Subject: [PATCH 7/8] Updated scripts and build docs.

---
 Documentation/BuildingOnDarwin.md  | 16 ++++++++++++++++
 Documentation/BuildingOnWindows.md | 17 ++++++++---------
 Scripts/Build/BuildDarwin.sh       |  2 +-
 3 files changed, 25 insertions(+), 10 deletions(-)

diff --git a/Documentation/BuildingOnDarwin.md b/Documentation/BuildingOnDarwin.md
index 56a29df..fb43226 100644
--- a/Documentation/BuildingOnDarwin.md
+++ b/Documentation/BuildingOnDarwin.md
@@ -7,6 +7,7 @@
       * [Homebrew](http://brew.sh/)
       * [Python 3](https://www.python.org/downloads/windows/)
       * [XCode](https://developer.apple.com/xcode/download/)
+      * [Qt5](https://download.qt.io/official_releases/qt/)
 
 2. Run the installer script to configure additional dependencies, as noted below. If you wish to examine what packages will be installed, see package lists [`PackageListBrew.txt`](../Scripts/Install/PackageListBrew.txt) and [`PackageListPython.txt`](../Scripts/Install/PackageListPython.txt).
 
@@ -45,3 +46,18 @@ Similarly, one can clean the project, which resets Git repositories to a clean s
 ```sh
 ./Scripts/clean.py
 ```
+<!--
+### Issues
+
+If you are building on Apple M1 and having trouble linking `arm64` binaries with the Qt5 library, try the following. Install Qt build dependencies:
+
+```sh
+brew install pcre2 harfbuzz freetype
+```
+
+Reinstall Qt5 and build from source:
+
+```sh
+brew reinstall -s qt5
+```
+-->
\ No newline at end of file
diff --git a/Documentation/BuildingOnWindows.md b/Documentation/BuildingOnWindows.md
index b0029b7..8de0430 100644
--- a/Documentation/BuildingOnWindows.md
+++ b/Documentation/BuildingOnWindows.md
@@ -12,16 +12,9 @@
       * [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
+      * [Qt5](https://download.qt.io/official_releases/qt/)
 
-2. Edit the [`Scripts\config.txt`](../Scripts/config.txt) file and make sure the following variables are configured properly under the `[Windows]` section:
-
-      * `libQtPath` -- Full path to the Qt library, Visual C++, 64-bit build.
-      * `vcvarsallPath` -- Full path to Visual Studio's `vcvarsall.bat` command script. This sets the necessary compiler environment variables for building. See [Microsoft C++ toolset documentation](https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=vs-2019) for details.
-      * `cmakeGenerator` -- Specifies the generator setting for cmake. Run `cmake --help` to choose a suitable generator that best matches the Visual Studio version installed earlier.
-
-3. Run the installer script to configure additional dependencies, as noted below. If you wish to examine what packages will be installed, see package lists [`PackageListChoco.config`](../Scripts/Install/PackageListChoco.config) and [`PackageListPython.txt`](../Scripts/Install/PackageListPython.txt).
+2. Run the installer script to configure additional dependencies, as noted below. If you wish to examine what packages will be installed, see package lists [`PackageListChoco.config`](../Scripts/Install/PackageListChoco.config) and [`PackageListPython.txt`](../Scripts/Install/PackageListPython.txt).
 
       * If Python is already installed:
          ```bat
@@ -34,6 +27,12 @@
 
       Use the `--upgrade` switch (Python), or the `-upgrade` switch (PowerShell) to refresh packages at a later date.
 
+3. Edit the [`Scripts\config.txt`](../Scripts/config.txt) file and make sure the following variables are configured properly under the `[Windows]` section:
+
+      * `libQtPath` -- Full path to the Qt library, Visual C++, 64-bit build.
+      * `vcvarsallPath` -- Full path to Visual Studio's `vcvarsall.bat` command script. This sets the necessary compiler environment variables for building. See [Microsoft C++ toolset documentation](https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=vs-2019) for details.
+      * `cmakeGenerator` -- Specifies the generator setting for cmake. Run `cmake --help` to choose a suitable generator that best matches the Visual Studio version installed earlier.
+
 ### Building
 
 Build the project with the following Python script. Packages will be copied into the [`Binaries`](../Binaries) directory.
diff --git a/Scripts/Build/BuildDarwin.sh b/Scripts/Build/BuildDarwin.sh
index f1ea02a..48592fc 100755
--- a/Scripts/Build/BuildDarwin.sh
+++ b/Scripts/Build/BuildDarwin.sh
@@ -6,7 +6,7 @@ configureCMake() {
       -D CMAKE_PREFIX_PATH="${libQtPath};${openSSLPath}" \
       -D CMAKE_BUILD_TYPE=Release \
       -D CMAKE_OSX_DEPLOYMENT_TARGET=10.12 \
-      -D CMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
+      -D CMAKE_OSX_ARCHITECTURES=x86_64 \
       -D SYNERGY_ENTERPRISE=ON \
       -D SYNERGY_REVISION="${productRevision}" \
       || exit 1

From a7638c5ec9ebe837ab461ea33f386a9182124093 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dominik=20De=C3=A1k?= <deak.software@gmail.com>
Date: Fri, 23 Jul 2021 14:09:15 +1000
Subject: [PATCH 8/8] Update bug_report.md

---
 .github/ISSUE_TEMPLATE/bug_report.md | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index fc86891..1fd1c19 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -10,6 +10,12 @@ Provide a descriptive summary of the issue.
 
 **NOTE:** Do not submit bug reports for the Synergy application here. Only submit issues relating to the build scripts in this repository.
 
+### System Information
+
+* Operating System: _[Example: macOS Big Sur 11.5 (20G71)]_  
+* Build Environment: _[Example: Xcode 13.0 beta 3 (13A5192i)]_  
+* Synergy Version: _[Example: Synergy 1.14.0.4-stable]_  
+
 ### Steps to Reproduce
 
 1. Describe any preparation work or required setup, if appropriate;