]> git.street.me.uk Git - andy/viking.git/commitdiff
Need more files for Windows packaging.
authorRob Norris <rw_norris@hotmail.com>
Sat, 9 Feb 2013 03:25:13 +0000 (03:25 +0000)
committerRob Norris <rw_norris@hotmail.com>
Sat, 9 Feb 2013 03:29:00 +0000 (03:29 +0000)
Put locale files in right place.
Add our text files and COPYING notices.
Setup to package GTK2.24.10
When creating via Wine - ensure production of items not known how on Windows:
. ChangeLog.txt
. Help PDF
. configure script

Need to use xsltproc to complete build cleanly.

win32/configure_and_make-wine.sh
win32/configure_and_make.bat
win32/installer-wine.sh [new file with mode: 0755]
win32/installer.bat
win32/installer/viking-installer.nsi
win32/make.bat
win32/prepare.bat

index cc5529ce18cd2940f1079f96929b78ccea720a29..481fad2565fb738e5697203ee3d1f2e2cf7933c7 100755 (executable)
@@ -1,4 +1,11 @@
-#!/bin/sh
+#!/bin/bash
+
+# First ensure we have a configure script:
+pushd ..
+./autogen.sh
+make distclean
+popd
+
 # Note the configure stage under wine** is really slow can easily be over 15 minutes
 # make of the icons is also very slow** - can easily over 5 minutes
 # compartively the make of the actual src code is not too bad
index 49937609785f8c051caf747dac2cc36e5de9636a..ef9f07da64ef82700f711a735db1bebdc5880ac7 100644 (file)
@@ -1,5 +1,9 @@
 :: Full build\r
-set PATH=%PATH%;C:\Mingw\bin;C:\msys\1.0\bin\r
+::\r
+:: Note this assumes the 'configure' script already exists\r
+::  either via part of the source download or via separate generation - e.g. using wine\r
+::\r
+set PATH=%PATH%;%SystemDrive%\Mingw\bin;%SystemDrive%\msys\1.0\bin\r
 cd ..\\r
 sh configure CFLAGS=-DWINDOWS LIBCURL=-lcurldll LIBS=-lzdll --disable-realtime-gps-tracking --disable-scrollkeeper\r
 make\r
diff --git a/win32/installer-wine.sh b/win32/installer-wine.sh
new file mode 100755 (executable)
index 0000000..6cc1369
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+# 'make dist' stuff
+# ensure we have the latest changelog
+../maintainer/git2changelog.sh > cache/ChangeLog.txt
+
+# ensure we have the help PDF
+pushd ../help/
+make get-icons
+pushd C
+dblatex viking.xml
+popd
+popd
+
+wine ~/.wine/drive_c/windows/system32/cmd.exe /c installer.bat
index d522e16e385a8d68779f2d1e6bf0dcd02e14854b..a200e1b207788cf2891b6c881d1276d5887f3d4d 100644 (file)
@@ -1,6 +1,12 @@
 @echo OFF\r
+::\r
+:: TODO return an error code when not completed as expected\r
+::\r
 echo STARTING INSTALLER PROCESS...\r
 \r
+:: For windres + strip\r
+set PATH=%PATH%;%SystemDrive%\MinGW\bin\r
+\r
 echo Create Icon\r
 pushd installer\pixmaps\r
 windres.exe viking_icon.rc -o viking_icon.o\r
@@ -16,42 +22,88 @@ set DESTINATION=installer\bin
 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
+for /f %%i in (gmolist.txt) do mkdir %DESTINATION%\locale\%%~ni\LC_MESSAGES\r
+for /f %%i in (gmolist.txt) do %MYCOPY% ..\po\%%i %DESTINATION%\locale\%%~ni\LC_MESSAGES\viking.mo\r
 del gmolist.txt\r
 \r
 echo Copying Viking\r
 %MYCOPY% ..\src\viking.exe %DESTINATION%\r
 %MYCOPY% installer\pixmaps\viking_icon.ico %DESTINATION%\r
 %MYCOPY% ..\COPYING %DESTINATION%\COPYING_GPL.txt\r
-::\r
-echo Copying GPSBabel\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% ..\AUTHORS %DESTINATION%\AUTHORS.txt\r
+%MYCOPY% ..\NEWS %DESTINATION%\NEWS.txt\r
+%MYCOPY% ..\README %DESTINATION%\README.txt\r
+:: ATM this relies on being generated by an external system\r
+%MYCOPY% cache\ChangeLog.txt %DESTINATION%\r
+:: ATM this relies on being generated by an external system\r
+%MYCOPY% ..\help\C\viking.pdf %DESTINATION%\r
+\r
+\r
 echo Copying Libraries\r
-set LIBCURL=C:\MinGW\bin\libcurl.dll\r
-if exist %LIBCURL% (\r
-       %MYCOPY% %LIBCURL% %DESTINATION%\r
+set MINGW=C:\MinGW\r
+if not exist "%MINGW%" (\r
+       echo Required %MINGW% does not exist\r
+       goto Tidy\r
+)\r
+\r
+set MINGW_BIN=%MINGW%\Bin\r
+\r
+set LIBCURL=%MINGW_BIN%\libcurl.dll\r
+if exist "%LIBCURL%" (\r
+       %MYCOPY% "%LIBCURL%" %DESTINATION%\r
+       %MYCOPY% "%MINGW%\COPYING_curl.txt" %DESTINATION%\r
+\r
 ) else (\r
        echo %LIBCURL% does not exist\r
        goto Tidy\r
 )\r
-set LIBEXIF=C:\MinGW\bin\libexif-12.dll\r
-if exist %LIBEXIF% (\r
-       %MYCOPY% %LIBEXIF% %DESTINATION%\r
+set LIBEXIF=%MINGW_BIN%\libexif-12.dll\r
+if exist "%LIBEXIF%" (\r
+       %MYCOPY% "%LIBEXIF%" %DESTINATION%\r
 ) else (\r
-       echo %LIBEXIF% does not exist\r
+       echo Required %LIBEXIF% 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
+echo =+=+=\r
+echo Checking gtk runtime\r
+echo =+=+=\r
+set GTK_RUNTIME=gtk2-runtime-2.24.10-2012-10-10-ash.exe\r
+pushd cache\r
+if not exist %GTK_RUNTIME% (\r
+       set PATH=%PATH%;%ProgramFiles%\GnuWin32\bin\r
+       wget http://downloads.sourceforge.net/gtk-win/%GTK_RUNTIME%\r
+)\r
+if not exist %GTK_RUNTIME% (\r
+       echo Required GTK Runtime does not exist\r
+       goto Tidy\r
+)\r
+:: Install GTK into temporary location so we can repackage it\r
+:: Destination path appears to have to be an absolute kind\r
+popd\r
+cd > tmp.tmp\r
+set /p PWD=<tmp.tmp\r
+del tmp.tmp\r
+cache\%GTK_RUNTIME% /sideeffects=no /setpath=no /dllpath=root /translations=no /compatdlls=yes /S /D=%PWD%\%DESTINATION%\r
+\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
+\r
 echo Running NSIS (command line version)\r
 pushd installer\r
 if exist "%ProgramFiles%\NSIS" (\r
index 13820907c056c7531542b2f1fdf5b7bb45ce0038..f6e01f0b5be87e739f2e0769a2081eddbd041a4a 100644 (file)
@@ -48,8 +48,6 @@ SetDateSave on
 !define HKLM_APP_PATHS_KEY                     "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\viking.exe"
 !define VIKING_UNINST_EXE                      "viking-uninst.exe"
 
-!define DOWNLOADER_URL                         "http://downloads.sourceforge.net/viking/"
-
 ;--------------------------------
 ;Version resource
 VIProductVersion "${VIKING_VERSION}"
@@ -322,51 +320,8 @@ Section Uninstall
 
   cont_uninstall:
 
-    RMDir /r "$INSTDIR\etc"
-    RMDir /r "$INSTDIR\lib"
-    RMDir /r "$INSTDIR\locale"
-    RMDir /r "$INSTDIR\share"
-    Delete "$INSTDIR\AUTHORS.txt"
-    Delete "$INSTDIR\Changelog.txt"
-    Delete "$INSTDIR\COPYING_curl.txt"
-    Delete "$INSTDIR\COPYING_GPL.txt"
-    Delete "$INSTDIR\freetype6.dll"
-    Delete "$INSTDIR\gpsbabel.exe"
-    Delete "$INSTDIR\intl.dll"
-    Delete "$INSTDIR\libatk-1.0-0.dll"
-    Delete "$INSTDIR\libcairo-2.dll"
-    Delete "$INSTDIR\libcurl.dll"
-    Delete "$INSTDIR\libexif-12.dll"
-    Delete "$INSTDIR\libexpat.dll"
-    Delete "$INSTDIR\libexpat-1.dll"
-    Delete "$INSTDIR\libfontconfig-1.dll"
-    Delete "$INSTDIR\libgailutil-18.dll"
-    Delete "$INSTDIR\libgdk_pixbuf-2.0-0.dll"
-    Delete "$INSTDIR\libgdk-win32-2.0-0.dll"
-    Delete "$INSTDIR\libgio-2.0-0.dll"
-    Delete "$INSTDIR\libglib-2.0-0.dll"
-    Delete "$INSTDIR\libgmodule-2.0-0.dll"
-    Delete "$INSTDIR\libgobject-2.0-0.dll"
-    Delete "$INSTDIR\libgthread-2.0-0.dll"
-    Delete "$INSTDIR\libgtk-win32-2.0-0.dll"
-    Delete "$INSTDIR\libjpeg-7.dll"
-    Delete "$INSTDIR\libpango-1.0-0.dll"
-    Delete "$INSTDIR\libpangocairo-1.0-0.dll"
-    Delete "$INSTDIR\libpangoft2-1.0-0.dll"
-    Delete "$INSTDIR\libpangowin32-1.0-0.dll"
-    Delete "$INSTDIR\libpng12-0.dll"
-    Delete "$INSTDIR\libtiff-3.dll"
-    Delete "$INSTDIR\libtiffxx-3.dll"
-    Delete "$INSTDIR\NEWS.txt"
-    Delete "$INSTDIR\README.txt"
-    Delete "$INSTDIR\viking.exe"
-    Delete "$INSTDIR\viking.pdf"
-    Delete "$INSTDIR\zlib1.dll"
-    Delete "$INSTDIR\${VIKING_UNINST_EXE}"
-    Delete "$INSTDIR\install.log"
-
-    ;Try to remove Viking install dir (only if empty)
-    RMDir "$INSTDIR"
+    ;Simply wipe the Viking install dir
+    RMDir /r "$INSTDIR"
 
     ; Shortcuts..
     Delete "$DESKTOP\Viking.lnk"
index e6f43d5d5e9cf707844ded703a864a883c6cea2f..249464f8f4d551c225d29d9ad3a800ad496c3a60 100644 (file)
@@ -1,4 +1,4 @@
 :: Standard build\r
-set PATH=%PATH%;C:\MinGW\bin;C:\msys\1.0\bin\r
+set PATH=%PATH%;%SystemDrive%\MinGW\bin;%SystemDrive%\msys\1.0\bin\r
 cd ..\src\r
 make\r
index 250c0570dbcd6201b0e0dafd08bb02bb82ffce14..371ce3acd56add52f9484269d0318e87beed7717 100644 (file)
@@ -181,6 +181,7 @@ if not exist "%MINGW_BIN%\libcurl.dll" (
        copy /Y libcurl\bin\*.* "%MinGW_BIN%"\r
        copy /Y libcurl\lib\*.* "%MinGW%\lib"\r
        copy /Y libcurl\docs\*.* "%MinGW%\doc"\r
+       copy /Y COPYING.txt "%MinGW%\COPYING_curl.txt"\r
        rmdir /S /Q libcurl\r
        del %CURL_TAR%\r
        @echo OFF\r
@@ -222,6 +223,10 @@ if not exist "%MINGW_BIN%\libstdc++-6.dll" (
        del %STDCPP_TAR%\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
+::\r
 echo =+=+=\r
 echo Checking Gnome Doc Utils...\r
 echo =+=+=\r
@@ -235,6 +240,54 @@ if not exist "%MINGW_BIN%\gnome-doc-prepare" (
        if ERRORLEVEL 1 goto Error\r
 )\r
 \r
+echo =+=+=\r
+echo Checking xsltproc...\r
+echo =+=+=\r
+set XLST=libxslt-1.1.26.win32\r
+set XLST_ZIP=%XLST%.zip\r
+if not exist "%MINGW_BIN%\xsltproc.exe" (\r
+       if not exist %XLST_ZIP% (\r
+               wget ftp://ftp.zlatkovic.com/libxml/%XLST_ZIP%\r
+       )\r
+       echo Extracting XLST...\r
+       7z x %XLST_ZIP%\r
+       xcopy /Y /S "%XLST%\bin\*" "%MinGW_BIN%"\r
+       if ERRORLEVEL 1 goto Error\r
+       rmdir /Q /S %XLST%\r
+)\r
+\r
+echo =+=+=\r
+echo Checking xmllint...\r
+echo =+=+=\r
+set XML2=libxml2-2.7.8.win32\r
+set XML2_ZIP=%XML2%.zip\r
+if not exist "%MINGW_BIN%\xmllint.exe" (\r
+       if not exist %XML2_ZIP% (\r
+               wget ftp://ftp.zlatkovic.com/libxml/%XML2_ZIP%\r
+       )\r
+       echo Extracting xmllint...\r
+       7z x %XML2_ZIP%\r
+       xcopy /Y /S "%XML2%\bin\*" "%MinGW_BIN%"\r
+       if ERRORLEVEL 1 goto Error\r
+       rmdir /Q /S %XML2%\r
+)\r
+\r
+echo =+=+=\r
+echo Checking iconv...\r
+echo =+=+=\r
+set ICONV=iconv-1.9.2.win32\r
+set ICONV_ZIP=%ICONV%.zip\r
+if not exist "%MINGW_BIN%\iconv.dll" (\r
+       if not exist %ICONV_ZIP% (\r
+               wget ftp://ftp.zlatkovic.com/libxml/%ICONV_ZIP%\r
+       )\r
+       echo Extracting iconv...\r
+       7z x %ICONV_ZIP%\r
+       xcopy /Y /S "%ICONV%\bin\*" "%MinGW_BIN%"\r
+       if ERRORLEVEL 1 goto Error\r
+       rmdir /Q /S %ICONV%\r
+)\r
+\r
 :: Note GPSBabel can not be directly downloaded via wget\r
 :: ATM get it manually from here:\r
 ::   http://www.gpsbabel.org/download.html\r