@echo OFF\r
+:: License: CC0\r
::\r
:: Setup wget first - this has to be done manually\r
:: http://gnuwin32.sourceforge.net/packages/wget.htm\r
set GCC_CORE=gcc-core-3.4.5-20060117-3.tar.gz\r
set GCC_GPP=gcc-g++-3.4.5-20060117-3.tar.gz\r
set MINGWRTDLL=mingwrt-3.15.2-mingw32-dll.tar.gz\r
-set MINGWRTDEV=mingwrt-3.15.2-mingw32-dll.tar.gz\r
+set MINGWRTDEV=mingwrt-3.15.2-mingw32-dev.tar.gz\r
set W32API=w32api-3.13-mingw32-dev.tar.gz\r
\r
if not exist "%MINGW_BIN%" (\r
copy /Y libcurl\bin\*.* "%MinGW_BIN%"\r
copy /Y libcurl\lib\*.* "%MinGW%\lib"\r
copy /Y libcurl\docs\*.* "%MinGW%\doc"\r
+ copy /Y COPYING.txt "%MinGW%\COPYING_curl.txt"\r
rmdir /S /Q libcurl\r
del %CURL_TAR%\r
@echo OFF\r
del %STDCPP_TAR%\r
)\r
\r
+echo =+=+=\r
+echo Checking libbz2 header...\r
+echo =+=+=\r
+set BZ2_TAR=bzip2-1.0.6-4-mingw32-dev.tar\r
+set BZ2_LZ=%BZ2_TAR%.lzma\r
+if not exist "%MINGW%\include\bzlib.h" (\r
+ if not exist %BZ2_LZ% (\r
+ wget "http://sourceforge.net/projects/mingw/files/MinGW/Extension/bzip2/bzip2-1.0.6-4/%BZ2_LZ%"\r
+ )\r
+ echo Extracting libbz2 header...\r
+ 7z e %BZ2_LZ%\r
+ 7z x %BZ2_TAR% -o"%MinGW%"\r
+ if ERRORLEVEL 1 goto Error\r
+ del %BZ2_TAR%\r
+)\r
+\r
+echo =+=+=\r
+echo Checking libbz2...\r
+echo =+=+=\r
+set BZ2DLL_TAR=libbz2-1.0.6-4-mingw32-dll-2.tar\r
+set BZ2DLL_LZ=%BZ2DLL_TAR%.lzma\r
+if not exist "%MINGW_BIN%\libbz2-2.dll" (\r
+ if not exist %BZ2DLL_LZ% (\r
+ wget "http://sourceforge.net/projects/mingw/files/MinGW/Extension/bzip2/bzip2-1.0.6-4/%BZ2DLL_LZ%"\r
+ )\r
+ echo Extracting libbz2...\r
+ 7z e %BZ2DLL_LZ%\r
+ 7z x %BZ2DLL_TAR% -o"%MinGW%"\r
+ if ERRORLEVEL 1 goto Error\r
+ del %BZ2DLL_TAR%\r
+)\r
+\r
+echo =+=+=\r
+echo Checking magic dev...\r
+echo =+=+=\r
+set MAGIC_ZIP=file-5.03-lib.zip\r
+if not exist "%MINGW%\include\magic.h" (\r
+ if not exist %MAGIC_ZIP% (\r
+ wget http://downloads.sourceforge.net/gnuwin32/%MAGIC_ZIP%\r
+ )\r
+ 7z x %MAGIC_ZIP% -o"%MinGW%"\r
+ if ERRORLEVEL 1 goto Error\r
+)\r
+\r
+echo =+=+=\r
+echo Checking magic DLL...\r
+echo =+=+=\r
+set MAGICDLL_ZIP=file-5.03-bin.zip\r
+if not exist "%MINGW_BIN%\magic1.dll" (\r
+ if not exist %MAGICDLL_ZIP% (\r
+ wget http://downloads.sourceforge.net/gnuwin32/%MAGICDLL_ZIP%\r
+ )\r
+ 7z x %MAGICDLL_ZIP% -o"%MinGW%"\r
+ if ERRORLEVEL 1 goto Error\r
+)\r
+\r
+echo =+=+=\r
+echo Checking regex DLL (required by magic)...\r
+echo =+=+=\r
+set REGDLL_ZIP=regex-2.7-bin.zip\r
+if not exist "%MINGW_BIN%\regex2.dll" (\r
+ if not exist %REGDLL_ZIP% (\r
+ wget http://downloads.sourceforge.net/gnuwin32/%REGDLL_ZIP%\r
+ )\r
+ 7z x %REGDLL_ZIP% -o"%MinGW%"\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
+::\r
echo =+=+=\r
echo Checking Gnome Doc Utils...\r
echo =+=+=\r
if ERRORLEVEL 1 goto Error\r
)\r
\r
+echo =+=+=\r
+echo Checking xsltproc...\r
+echo =+=+=\r
+set XLST=libxslt-1.1.26.win32\r
+set XLST_ZIP=%XLST%.zip\r
+if not exist "%MINGW_BIN%\xsltproc.exe" (\r
+ if not exist %XLST_ZIP% (\r
+ wget ftp://ftp.zlatkovic.com/libxml/%XLST_ZIP%\r
+ )\r
+ echo Extracting XLST...\r
+ 7z x %XLST_ZIP%\r
+ xcopy /Y /S "%XLST%\bin\*" "%MinGW_BIN%"\r
+ if ERRORLEVEL 1 goto Error\r
+ rmdir /Q /S %XLST%\r
+)\r
+\r
+echo =+=+=\r
+echo Checking xmllint...\r
+echo =+=+=\r
+set XML2=libxml2-2.7.8.win32\r
+set XML2_ZIP=%XML2%.zip\r
+if not exist "%MINGW_BIN%\xmllint.exe" (\r
+ if not exist %XML2_ZIP% (\r
+ wget ftp://ftp.zlatkovic.com/libxml/%XML2_ZIP%\r
+ )\r
+ echo Extracting xmllint...\r
+ 7z x %XML2_ZIP%\r
+ xcopy /Y /S "%XML2%\bin\*" "%MinGW_BIN%"\r
+ if ERRORLEVEL 1 goto Error\r
+ rmdir /Q /S %XML2%\r
+)\r
+\r
+echo =+=+=\r
+echo Checking iconv...\r
+echo =+=+=\r
+set ICONV=iconv-1.9.2.win32\r
+set ICONV_ZIP=%ICONV%.zip\r
+if not exist "%MINGW_BIN%\iconv.dll" (\r
+ if not exist %ICONV_ZIP% (\r
+ wget ftp://ftp.zlatkovic.com/libxml/%ICONV_ZIP%\r
+ )\r
+ echo Extracting iconv...\r
+ 7z x %ICONV_ZIP%\r
+ xcopy /Y /S "%ICONV%\bin\*" "%MinGW_BIN%"\r
+ if ERRORLEVEL 1 goto Error\r
+ rmdir /Q /S %ICONV%\r
+)\r
+\r
:: Note GPSBabel can not be directly downloaded via wget\r
:: ATM get it manually from here:\r
:: http://www.gpsbabel.org/download.html\r