From 6d8ce9aa33774a7d229bdfe6902200e2bfea1032 Mon Sep 17 00:00:00 2001 From: pnwmatt <180812017+pnwmatt@users.noreply.github.com> Date: Thu, 28 Aug 2025 22:22:47 -0700 Subject: [PATCH 1/8] build just windows --- .github/workflows/build.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 04429d4..82b8bf4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,17 +15,8 @@ jobs: strategy: matrix: include: - - os: linux - runs-on: ubuntu-latest - arch: amd64 - - os: darwin - runs-on: macos-latest - arch: amd64 - - os: darwin - runs-on: macos-latest - arch: arm64 - os: windows - runs-on: windows-latest + runs-on: warp-windows-latest-2204-4x arch: amd64 steps: From 685801f416e8b85edbe788fbafe053dd9f47e1ec Mon Sep 17 00:00:00 2001 From: pnwmatt <180812017+pnwmatt@users.noreply.github.com> Date: Thu, 28 Aug 2025 22:29:34 -0700 Subject: [PATCH 2/8] update runs on --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 82b8bf4..f705aae 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,7 @@ jobs: matrix: include: - os: windows - runs-on: warp-windows-latest-2204-4x + runs-on: warp-windows-latest-x64-4x arch: amd64 steps: From cae45c5c8fa1c42b909dda57960fbaeb62fb79c0 Mon Sep 17 00:00:00 2001 From: pnwmatt <180812017+pnwmatt@users.noreply.github.com> Date: Thu, 28 Aug 2025 22:34:43 -0700 Subject: [PATCH 3/8] windows --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f705aae..90e724a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,7 @@ jobs: matrix: include: - os: windows - runs-on: warp-windows-latest-x64-4x + runs-on: windows-latest arch: amd64 steps: From b2fe85966018b383ef1163b468d76546dfda2e69 Mon Sep 17 00:00:00 2001 From: pnwmatt <180812017+pnwmatt@users.noreply.github.com> Date: Thu, 28 Aug 2025 22:40:06 -0700 Subject: [PATCH 4/8] remove unused dependencies --- .github/workflows/build.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 90e724a..38bd1d3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,17 +32,7 @@ jobs: if: matrix.os == 'linux' run: | sudo apt-get update - sudo apt-get install -y sqlite3 libsqlite3-dev build-essential - - - name: Install dependencies (macOS) - if: matrix.os == 'darwin' - run: | - brew install sqlite3 - - - name: Install dependencies (Windows) - if: matrix.os == 'windows' - run: | - choco install sqlite + sudo apt-get install -y libsqlite3-dev build-essential - name: Build SQLite (Unix) if: matrix.os != 'windows' From c5c07cb025f3c21f11eb889fa2c2ffee1f029362 Mon Sep 17 00:00:00 2001 From: pnwmatt <180812017+pnwmatt@users.noreply.github.com> Date: Thu, 28 Aug 2025 23:05:40 -0700 Subject: [PATCH 5/8] Windows --- .github/workflows/build.yml | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 38bd1d3..3047a9a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -49,6 +49,12 @@ jobs: make make install + - name: Setup MSVC (Windows) + if: matrix.os == 'windows' + uses: ilammy/msvc-dev-cmd@v1 + with: + arch: x64 + - name: Build SQLite (Windows) if: matrix.os == 'windows' run: | @@ -59,10 +65,19 @@ jobs: Rename-Item sqlite-autoconf-3450100 sqlite-latest } cd sqlite-latest - # Use MSYS2/MinGW for Windows build - bash -c "./configure --prefix=$(pwd)/../install --enable-static --disable-shared 'CFLAGS=-DSQLITE_ENABLE_DBPAGE_VTAB=1 -O2'" - bash -c "make" - bash -c "make install" + # Use Visual Studio tools for Windows build as recommended by SQLite docs + nmake /f Makefile.msc clean + nmake /f Makefile.msc sqlite3.c + nmake /f Makefile.msc sqlite3.exe + # Create install directory structure + New-Item -ItemType Directory -Force -Path "../install/bin" + New-Item -ItemType Directory -Force -Path "../install/include" + New-Item -ItemType Directory -Force -Path "../install/lib" + # Copy built files to install directory + Copy-Item "sqlite3.exe" "../install/bin/" + Copy-Item "sqlite3.h" "../install/include/" + Copy-Item "sqlite3ext.h" "../install/include/" + if (Test-Path "sqlite3.lib") { Copy-Item "sqlite3.lib" "../install/lib/" } - name: Build Bridge run: | @@ -107,8 +122,8 @@ jobs: if: matrix.os == 'windows' run: | cd client - # Use make with MSYS2/MinGW - bash -c "make build" + # MSVC environment is already set up from previous step + make build - name: Create release directory run: | From 90425ae3e2108d28de53cf5d2e83df58a88616d1 Mon Sep 17 00:00:00 2001 From: pnwmatt <180812017+pnwmatt@users.noreply.github.com> Date: Thu, 28 Aug 2025 23:36:47 -0700 Subject: [PATCH 6/8] maybe main? --- bridge/sqlite_rsync.c | 1 - 1 file changed, 1 deletion(-) diff --git a/bridge/sqlite_rsync.c b/bridge/sqlite_rsync.c index f597c46..b6a5693 100644 --- a/bridge/sqlite_rsync.c +++ b/bridge/sqlite_rsync.c @@ -1,5 +1,4 @@ #define SQLITE_ENABLE_DBPAGE_VTAB 1 -#define SQLITE_RSYNC_NO_MAIN #define SQLITE_RSYNC_USE_H #ifndef SQLITE_RSYNC_C_INCLUDED From d6b3aa3f3466ed60130429b797f543cb2929ab5f Mon Sep 17 00:00:00 2001 From: pnwmatt <180812017+pnwmatt@users.noreply.github.com> Date: Thu, 28 Aug 2025 23:48:25 -0700 Subject: [PATCH 7/8] gulp --- bridge/sqlite_rsync.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bridge/sqlite_rsync.c b/bridge/sqlite_rsync.c index b6a5693..1f2479f 100644 --- a/bridge/sqlite_rsync.c +++ b/bridge/sqlite_rsync.c @@ -1,5 +1,4 @@ #define SQLITE_ENABLE_DBPAGE_VTAB 1 -#define SQLITE_RSYNC_USE_H #ifndef SQLITE_RSYNC_C_INCLUDED #define SQLITE_RSYNC_C_INCLUDED @@ -125,7 +124,7 @@ static void win32_fatal_error(const char *zMsg) fprintf(stderr, "%s", zMsg); exit(1); } -extern int _open_osfhandle(intptr_t, int); +#include /* For _open_osfhandle */ #else #include #include @@ -174,7 +173,7 @@ extern int sqlite3_sha_init( ** ** Return the number of errors. */ -static int win32_create_child_process( +int win32_create_child_process( wchar_t *zCmd, /* The command that the child process will run */ HANDLE hIn, /* Standard input */ HANDLE hOut, /* Standard output */ From 591df9b90017021f74e59894f3d28781273e97f7 Mon Sep 17 00:00:00 2001 From: pnwmatt <180812017+pnwmatt@users.noreply.github.com> Date: Fri, 29 Aug 2025 00:02:46 -0700 Subject: [PATCH 8/8] gulp2 --- bridge/sqlite_rsync.h | 2 -- bridge/sqlite_rsync_wrapper.c | 7 ++++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/bridge/sqlite_rsync.h b/bridge/sqlite_rsync.h index edcc8e0..e7772d9 100644 --- a/bridge/sqlite_rsync.h +++ b/bridge/sqlite_rsync.h @@ -15,8 +15,6 @@ ** similar to "rsync". */ -#define SQLITE_RSYNC_USE_H - #ifndef SQLITE_RSYNC_H_INCLUDED #define SQLITE_RSYNC_H_INCLUDED diff --git a/bridge/sqlite_rsync_wrapper.c b/bridge/sqlite_rsync_wrapper.c index 6bf7aa6..876b868 100644 --- a/bridge/sqlite_rsync_wrapper.c +++ b/bridge/sqlite_rsync_wrapper.c @@ -1,13 +1,14 @@ -#define SQLITE_RSYNC_NO_MAIN -#define SQLITE_RSYNC_USE_H - #include "sqlite_rsync.h" #include "sqlite_rsync_wrapper.h" #include #include #include +#ifdef _WIN32 +#include +#else #include #include +#endif #ifndef SQLITE_RSYNC_WRAPPER_C_INCLUDED #define SQLITE_RSYNC_WRAPPER_C_INCLUDED