From 1e5a53abb30e9d1c04ef8c0ad67f804e3b985a9d Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sat, 27 Jun 2020 21:23:20 +0300 Subject: [PATCH] sqlite: support for thirdparty/sqlite amalgamation install --- .github/workflows/ci.yml | 3 +++ .github/workflows/windows-install-sqlite.bat | 11 +++++++++++ vlib/sqlite/sqlite.v | 10 +++++++++- 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/windows-install-sqlite.bat diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2f98e92c41..5065fc9b17 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -229,6 +229,7 @@ jobs: run: | .\v.exe setup-freetype .\.github\workflows\windows-install-sdl.bat + .\.github\workflows\windows-install-sqlite.bat - name: Fixed tests run: | .\v.exe test-fixed @@ -261,6 +262,7 @@ jobs: run: | .\v.exe setup-freetype .\.github\workflows\windows-install-sdl.bat + .\.github\workflows\windows-install-sqlite.bat - name: Fixed tests run: | ./v -cg cmd\tools\vtest-fixed.v @@ -298,6 +300,7 @@ jobs: run: | .\v.exe setup-freetype .\.github\workflows\windows-install-sdl.bat + .\.github\workflows\windows-install-sqlite.bat - name: Fixed tests run: | .\v.exe test-fixed diff --git a/.github/workflows/windows-install-sqlite.bat b/.github/workflows/windows-install-sqlite.bat new file mode 100644 index 0000000000..6613ffc141 --- /dev/null +++ b/.github/workflows/windows-install-sqlite.bat @@ -0,0 +1,11 @@ +REM @echo off + +echo on + +curl -L https://www.sqlite.org/2020/sqlite-amalgamation-3320300.zip -o sqlite-amalgamation-3320300.zip + +unzip sqlite-amalgamation-3320300.zip -d thirdparty/ + +move /y thirdparty/sqlite-amalgamation-3320300 thirdparty/sqlite + +dir thirdparty thirdparty\sqlite\ thirdparty/sqlite/ diff --git a/vlib/sqlite/sqlite.v b/vlib/sqlite/sqlite.v index faf3bec7cc..de9fc4082c 100644 --- a/vlib/sqlite/sqlite.v +++ b/vlib/sqlite/sqlite.v @@ -1,8 +1,16 @@ module sqlite -#flag -lsqlite3 +#flag darwin -lsqlite3 +#flag linux -lsqlite3 +#flag solaris -lsqlite3 + #flag freebsd -I/usr/local/include #flag freebsd -Wl -L/usr/local/lib -lsqlite3 + +#flag windows -I@VROOT/thirdparty/sqlite +#flag windows -L@VROOT/thirdparty/sqlite +#flag windows @VROOT/thirdparty/sqlite/sqlite3.o + //#flag linux -I @VROOT/thirdparty/sqlite //#flag @VROOT/thirdparty/sqlite/sqlite.c