From ae6e663117b86eaea941cf18e0648275229ca04a Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Thu, 31 Jan 2013 20:51:06 +0000 Subject: [PATCH] Improve Windows installer script. Better comments, some error checking and use of %ProgramFiles% Bin the need for the bin directory - it was only a temporary holding space. --- win32/installer.bat | 32 +++++++++++++++++++++++++++----- win32/installer/bin/.gitignore | 6 ------ 2 files changed, 27 insertions(+), 11 deletions(-) delete mode 100644 win32/installer/bin/.gitignore diff --git a/win32/installer.bat b/win32/installer.bat index b21ab2d1..d522e16e 100644 --- a/win32/installer.bat +++ b/win32/installer.bat @@ -20,11 +20,12 @@ for /f %%i in (gmolist.txt) do mkdir %DESTINATION%\%%~ni\LC_MESSAGES for /f %%i in (gmolist.txt) do %MYCOPY% ..\po\%%i %DESTINATION%\%%~ni\LC_MESSAGES\viking.mo del gmolist.txt -echo Copying other stuff +echo Copying Viking %MYCOPY% ..\src\viking.exe %DESTINATION% %MYCOPY% installer\pixmaps\viking_icon.ico %DESTINATION% %MYCOPY% ..\COPYING %DESTINATION%\COPYING_GPL.txt :: +echo Copying GPSBabel :: It is assumed you've tested the code after building it :) :: Thus GPSBabel should be here %MYCOPY% ..\src\gpsbabel.exe %DESTINATION% @@ -32,13 +33,34 @@ echo Copying other stuff :: (or get it from an old Viking Windows release) :: and copy the command line program into ..\src :: -%MYCOPY% C:\MinGW\bin\libcurl.dll %DESTINATION% -%MYCOPY% C:\MinGW\bin\libexif-12.dll %DESTINATION% +echo Copying Libraries +set LIBCURL=C:\MinGW\bin\libcurl.dll +if exist %LIBCURL% ( + %MYCOPY% %LIBCURL% %DESTINATION% +) else ( + echo %LIBCURL% does not exist + goto Tidy +) +set LIBEXIF=C:\MinGW\bin\libexif-12.dll +if exist %LIBEXIF% ( + %MYCOPY% %LIBEXIF% %DESTINATION% +) else ( + echo %LIBEXIF% does not exist + goto Tidy +) :: +echo Copying Translations %MYCOPY% installer\translations\*nsh %DESTINATION% -echo Run NSIS +echo Running NSIS (command line version) pushd installer -"C:\Program Files\NSIS\makensisw.exe" viking-installer.nsi +if exist "%ProgramFiles%\NSIS" ( + "%ProgramFiles%\NSIS\makensis.exe" viking-installer.nsi +) else ( + echo NSIS Not installed in known location +) popd +echo Tidy Up +:Tidy +rmdir /S /Q %DESTINATION% diff --git a/win32/installer/bin/.gitignore b/win32/installer/bin/.gitignore deleted file mode 100644 index 93aad366..00000000 --- a/win32/installer/bin/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -# This directory is delibrately 'empty' -# It possibly could be created by the installation but ATM it's not. -# -# This where all the viking+gtk binaries (exe, dll, ...) go (it's exactly what will be copied to your installation directory) -* -!.gitignore -- 2.39.5