From 842ada0fd1bf29dba0b0e3c891525b8762b5fb4f Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Wed, 4 Feb 2026 14:22:32 +0100 Subject: [PATCH 1/3] find sqlite3.dll and pygeodiff*.pyd so that it can be added to the pyinstaller --- scripts/build_exe.bat | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/scripts/build_exe.bat b/scripts/build_exe.bat index 50d5b6e..52b7437 100755 --- a/scripts/build_exe.bat +++ b/scripts/build_exe.bat @@ -1,3 +1,34 @@ +@echo off + +set "PYTHON_EXE=" +for /f "delims=" %%P in ('where python 2^>nul') do ( + if not defined PYTHON_EXE set "PYTHON_EXE=%%P" +) + +if not defined PYTHON_EXE ( + echo Python was not found on PATH. + exit /b 1 +) + +for %%D in ("%PYTHON_EXE%") do set "PYTHON_DIR=%%~dpD" + +set "SQLITE3_DLL=" +for /f "delims=" %%S in ('where /r %PYTHON_DIR% sqlite3.dll 2^>nul') do ( + if not defined SQLITE3_DLL set "SQLITE3_DLL=%%S" +) + +if not defined SQLITE3_DLL ( + echo sqlite3.dll was not found in Python directory. Check your Python environment. + exit /b 1 +) + +for /f "delims=" %%G in ('python -c "import pygeodiff, os, glob; d = os.path.dirname(os.path.abspath(pygeodiff.__file__)); pyd = glob.glob(os.path.join(d, 'pygeodiff*.pyd')); print(pyd[0] if pyd else '')" 2^>nul') do set "PYGEODIFF_PYD=%%G" + +if not exist "%PYGEODIFF_PYD%" ( + echo pygeodiff*.pyd was not found. Check your Python environment. + exit /b 1 +) + pyinstaller ../dbsync_daemon.py ^ -c ^ --noconfirm ^ From 4f427e240fbe1c2d4f85066dcb34db67c385c4bf Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Wed, 4 Feb 2026 14:23:19 +0100 Subject: [PATCH 2/3] add pygeodiff, sqlite3 and libraries to the build --- scripts/build_exe.bat | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/build_exe.bat b/scripts/build_exe.bat index 52b7437..608ce6a 100755 --- a/scripts/build_exe.bat +++ b/scripts/build_exe.bat @@ -34,6 +34,12 @@ pyinstaller ../dbsync_daemon.py ^ --noconfirm ^ --add-binary="./windows_binaries/geodiff.exe;lib" ^ --hidden-import dynaconf ^ + --hidden-import sqlite3 ^ + --hidden-import pygeodiff ^ --collect-all mergin ^ + --collect-all sqlite3 ^ + --collect-all pygeodiff ^ + --add-binary="%PYGEODIFF_PYD%;pygeodiff" ^ + --add-binary="%SQLITE3_DLL%;." ^ --clean ^ -F \ No newline at end of file From 53f485c317093ae317adf900fdd78f7854884074 Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Wed, 4 Feb 2026 14:26:14 +0100 Subject: [PATCH 3/3] download artifact from version --- .github/workflows/build_windows.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_windows.yaml b/.github/workflows/build_windows.yaml index d972b7f..7557082 100644 --- a/.github/workflows/build_windows.yaml +++ b/.github/workflows/build_windows.yaml @@ -13,9 +13,10 @@ jobs: - uses: actions/checkout@v4 - uses: robinraju/release-downloader@v1.10 - with: - repository: "MerginMaps/geodiff" - latest: true + with: + repository: "MerginMaps/geodiff" + # latest: true + tag: "2.1.0" fileName: "geodiff.exe.zip" zipBall: false out-file-path: "scripts/windows_binaries"