]> git.street.me.uk Git - andy/viking.git/blobdiff - win32/installer.bat
Make generation of the copyright year in the code automatic.
[andy/viking.git] / win32 / installer.bat
index 56bd33fcf0cb4e2f757ad1fde131a87956986b58..699019adf27dc05894759a832a68f5658ba8cc2f 100644 (file)
@@ -96,6 +96,13 @@ if exist "%LIBSQL3%" (
        echo Required %LIBSQL3% does not exist\r
        goto Tidy\r
 )\r
        echo Required %LIBSQL3% does not exist\r
        goto Tidy\r
 )\r
+set LIBZIP=%MINGW_BIN%\libzip.dll\r
+if exist "%LIBZIP%" (\r
+       %MYCOPY% "%LIBZIP%" %DESTINATION%\r
+) else (\r
+       echo Required %LIBZIP% 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
 \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
@@ -120,21 +127,15 @@ set /p PWD=<tmp.tmp
 del tmp.tmp\r
 cache\%GTK_RUNTIME% /sideeffects=no /setpath=no /dllpath=root /translations=no /compatdlls=yes /S /D=%PWD%\%DESTINATION%\r
 \r
 del tmp.tmp\r
 cache\%GTK_RUNTIME% /sideeffects=no /setpath=no /dllpath=root /translations=no /compatdlls=yes /S /D=%PWD%\%DESTINATION%\r
 \r
+echo Copying GPSBabel Installer
+mkdir %DESTINATION%\Optional
+%MYCOPY% cache\GPSBabel-1.5.2-Setup.exe %DESTINATION%\Optional
+if ERRORLEVEL 1 goto Error
+
 ::\r
 echo Copying Translations\r
 %MYCOPY% installer\translations\*nsh %DESTINATION%\r
 ::\r
 echo Copying Translations\r
 %MYCOPY% installer\translations\*nsh %DESTINATION%\r
-\r
-echo Copying GPSBabel\r
-:: Install it from http://www.gpsbabel.org/download.html\r
-::  Thus GPSBabel should be here\r
-:: NB GPSBabel has standard GPL2 COPYING.txt file so don't need another copy\r
-if exist "%ProgramFiles%\GPSBabel\gpsbabel.exe" (\r
-       %MYCOPY% "%ProgramFiles%\GPSBabel\gpsbabel.exe" %DESTINATION%\r
-       %MYCOPY% "%ProgramFiles%\GPSBabel\libexpat.dll" %DESTINATION%\r
-) else (\r
-       echo GPSBabel missing\r
-       goto Tidy\r
-)\r
+if ERRORLEVEL 1 goto Error
 \r
 echo Running NSIS (command line version)\r
 pushd installer\r
 \r
 echo Running NSIS (command line version)\r
 pushd installer\r
@@ -145,6 +146,11 @@ if exist "%ProgramFiles%\NSIS" (
 )\r
 popd\r
 \r
 )\r
 popd\r
 \r
-echo Tidy Up\r
+goto Tidy
+
+:Error
+echo Exitting due to error: %ERRORLEVEL%
+
 :Tidy\r
 :Tidy\r
+echo Tidy Up
 rmdir /S /Q %DESTINATION%\r
 rmdir /S /Q %DESTINATION%\r