+@echo OFF\r
+echo STARTING INSTALLER PROCESS...\r
+\r
+echo Create Icon\r
+pushd installer\pixmaps\r
+windres.exe viking_icon.rc -o viking_icon.o\r
+popd\r
+\r
+echo Remove debugging symbols\r
+pushd ..\src\r
+strip.exe -g viking.exe\r
+popd\r
+\r
+set MYCOPY=copy /y\r
+set DESTINATION=installer\bin\r
+echo Copying locale files into layout required by NSIS\r
+dir ..\po\*.gmo /B > gmolist.txt\r
+:: Create directories like de\LC_MESSAGES\r
+for /f %%i in (gmolist.txt) do mkdir %DESTINATION%\%~ni\LC_MESSAGES\r
+for /f %%i in (gmolist.txt) do %MYCOPY% ..\po\%%i %DESTINATION%\%~ni\LC_MESSAGES\viking.mo\r
+del gmolist.txt\r
+\r
+echo Copying other stuff\r
+%MYCOPY% ..\src\viking.exe %DESTINATION%\r
+%MYCOPY% installer\pixmaps\viking_icon.ico %DESTINATION%\r
+%MYCOPY% ..\COPYING %DESTINATION%\COPYING_GPL.txt\r
+::\r
+:: It is assumed you've tested the code after building it :)\r
+:: Thus GPSBabel should be here\r
+%MYCOPY% ..\src\gpsbabel.exe %DESTINATION%\r
+:: Otherwise install it from http://www.gpsbabel.org/download.html\r
+:: (or get it from an old Viking Windows release)\r
+:: and copy the command line program into ..\src\r
+::\r
+%MYCOPY% C:\MinGW\bin\libcurl.dll %DESTINATION%\r
+%MYCOPY% C:\MinGW\bin\libexif-12.dll %DESTINATION%\r
+::\r
+%MYCOPY% installer\translations\*nsh %DESTINATION%\r
+\r
+echo Run NSIS\r
+pushd installer\r
+"C:\Program Files\NSIS\makensisw.exe" viking-installer.nsi\r
+popd\r
+\r