echo Required %LIBBZ2% does not exist\r
goto Tidy\r
)\r
+set LIBMAGIC=%MINGW_BIN%\magic1.dll\r
+if exist "%LIBMAGIC%" (\r
+ %MYCOPY% "%LIBMAGIC%" %DESTINATION%\r
+ %MYCOPY% "%MINGW_BIN%\regex2.dll" %DESTINATION%\r
+ %MYCOPY% "%MINGW%\share\misc\magic.mgc" %DESTINATION%\r
+) else (\r
+ echo Required %LIBMAGIC% 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
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
::\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