]> git.street.me.uk Git - andy/viking.git/commitdiff
[WINDOWS] Build with SQLite DLL 3.8.0.2
authorRob Norris <rw_norris@hotmail.com>
Fri, 11 Oct 2013 18:56:16 +0000 (19:56 +0100)
committerRob Norris <rw_norris@hotmail.com>
Wed, 16 Oct 2013 22:45:10 +0000 (23:45 +0100)
win32/installer.bat
win32/prepare.bat

index 7bf41a80a82c2347630c22b1218385f68d3ed676..3f391671b65f980b79ceab0b78ab321a5ebfacb1 100644 (file)
@@ -82,6 +82,13 @@ if exist "%LIBMAGIC%" (
        echo Required %LIBMAGIC% does not exist\r
        goto Tidy\r
 )\r
+set LIBSQL3=%MINGW_BIN%\sqlite3.dll\r
+if exist "%LIBSQL3%" (\r
+       %MYCOPY% "%LIBSQL3%" %DESTINATION%\r
+) else (\r
+       echo Required %LIBSQL3% does not exist\r
+       goto Tidy\r
+)\r
 \r
 :: TODO Maybe embed http://gtk-win.sourceforge.net/home/index.php/Main/EmbeddingGTK directly in NSIS?\r
 :: Best to use the same GTK version as we built against in prepare.bat!!\r
index 06597f7457d45a0fb249bc550d626b7e64e1d4c8..9ae404fe284df7aa071b81716171041053e10ccf 100644 (file)
@@ -292,6 +292,38 @@ if not exist "%MINGW_BIN%\regex2.dll" (
        if ERRORLEVEL 1 goto Error\r
 )\r
 \r
+echo =+=+=\r
+echo Checking SQLite dev...\r
+echo =+=+=\r
+set SQL_ZIP=sqlite-amalgamation-3080002.zip\r
+if not exist "%MINGW%\include\sqlite3.h" (\r
+       if not exist %SQL_ZIP% (\r
+               wget http://www.sqlite.org/2013/%SQL_ZIP%\r
+       )\r
+       7z x %SQL_ZIP%\r
+       if ERRORLEVEL 1 goto Error\r
+       copy /Y sqlite-amalgamation-3080002\s* "%MinGW%\include"\r
+       rmdir /S /Q sqlite-amalgamation-3080002\r
+)\r
+\r
+echo =+=+=\r
+echo Checking SQL DLL...\r
+echo =+=+=\r
+set SQLDLL_ZIP=sqlite-dll-win32-x86-3080002.zip\r
+if not exist "%MINGW_BIN%\sqlite3.dll" (\r
+       if not exist %SQLDLL_ZIP% (\r
+               wget http://www.sqlite.org/2013/%SQLDLL_ZIP%\r
+       )\r
+       7z x %SQLDLL_ZIP% -o"%MinGW_BIN%"\r
+       if ERRORLEVEL 1 goto Error\r
+       REM Annoyingly SQL doesn't come with a .lib file so have to generate it ourselves:\r
+       REM Possibly need to insert the line 'LIBRARY sqlite3.dll' at the beginning of the def file?\r
+       REM  but this may not be needed as the --dllname option may suffice\r
+       popd %MinGW_BIN%\r
+       dlltool -d sqlite3.def --dllname sqlite3.dll -l ..\lib\sqlite3.lib\r
+       pushd\r
+)\r
+\r
 ::\r
 :: Ideally building the code on Windows shouldn't need Doc Utils or the Help processor stuff\r
 :: But ATM it's too hard to avoid.\r