Skip to content

Instantly share code, notes, and snippets.

@stevapple
Last active November 6, 2021 03:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevapple/20a2c5550d889e0303b4ca7737c2e927 to your computer and use it in GitHub Desktop.
Save stevapple/20a2c5550d889e0303b4ca7737c2e927 to your computer and use it in GitHub Desktop.
Install SQLite3 to Windows
@echo off
@REM Requires Curl and Unzip
set version=3360000
set year=2021
echo This program will install SQLite 3 (%version%) to your x64 computer.
echo Make sure you are running as Administrator in "x64 Native Tools Command Prompt".
pause
echo Downloading https://sqlite.org/%year%/sqlite-amalgamation-%version%.zip
curl https://sqlite.org/%year%/sqlite-amalgamation-%version%.zip --silent ^
-o sqlite-amalgamation-%version%.zip 2>nul
unzip -q -o sqlite-amalgamation-%version%.zip
copy /Y sqlite-amalgamation-%version%\sqlite3.h "%VCToolsInstallDir%\include" >nul
echo Installed C header at %VCToolsInstallDir%\include\sqlite3.h
del /Q sqlite-amalgamation-%version%.zip >nul
rmdir /S /Q sqlite-amalgamation-%version%
echo Downloading https://sqlite.org/%year%/sqlite-dll-win32-x86-%version%.zip
curl https://sqlite.org/%year%/sqlite-dll-win32-x86-%version%.zip --silent ^
-o sqlite-dll-win32-x86-%version%.zip 2>nul
unzip -q -o sqlite-dll-win32-x86-%version%.zip
lib /MACHINE:X86 /DEF:sqlite3.def >nul
copy /Y sqlite3.lib "%VCToolsInstallDir%\lib\x86" >nul
echo Installed x86 LIB at %VCToolsInstallDir%\lib\x86\sqlite3.lib
copy /Y sqlite3.dll %SystemRoot%\SysWOW64\sqlite3.dll >nul
echo Installed x86 DLL at %SystemRoot%\SysWOW64\sqlite3.dll
del /Q sqlite3.* sqlite-dll-win32-x86-%version%.zip >nul
echo Downloading https://sqlite.org/%year%/sqlite-dll-win64-x64-%version%.zip
curl https://sqlite.org/%year%/sqlite-dll-win64-x64-%version%.zip --silent ^
-o sqlite-dll-win64-x64-%version%.zip 2>nul
unzip -q -o sqlite-dll-win64-x64-%version%.zip
lib /MACHINE:X64 /DEF:sqlite3.def >nul
copy /Y sqlite3.lib "%VCToolsInstallDir%\lib\x64" >nul
echo Installed x64 LIB at %VCToolsInstallDir%\lib\x64\sqlite3.lib
copy /Y sqlite3.dll %SystemRoot%\System32\sqlite3.dll >nul
echo Installed x64 DLL at %SystemRoot%\System32\sqlite3.dll
del /Q sqlite3.* sqlite-dll-win64-x64-%version%.zip >nul
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment