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
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