]> git.street.me.uk Git - andy/viking.git/commitdiff
[WINDOWS] Add libmagic DLL 5.03 for Windows build.
authorRob Norris <rw_norris@hotmail.com>
Tue, 3 Sep 2013 18:27:11 +0000 (19:27 +0100)
committerRob Norris <rw_norris@hotmail.com>
Wed, 4 Sep 2013 23:18:44 +0000 (00:18 +0100)
win32/installer.bat
win32/prepare.bat

index 9d0c9e4f6468c1c32e2ceb7f9a27e39fe86b11e9..7bf41a80a82c2347630c22b1218385f68d3ed676 100644 (file)
@@ -73,6 +73,15 @@ if exist "%LIBBZ2%" (
        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
index 4cd6ed0d29bbc1d026e2a45a0e371a4ad068416c..06597f7457d45a0fb249bc550d626b7e64e1d4c8 100644 (file)
@@ -256,6 +256,42 @@ if not exist "%MINGW_BIN%\libbz2-2.dll" (
        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