[GRASS-SVN] r55817 - grass/branches/develbranch_6/mswindows
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Apr 15 15:06:58 PDT 2013
Author: hellik
Date: 2013-04-15 15:06:58 -0700 (Mon, 15 Apr 2013)
New Revision: 55817
Modified:
grass/branches/develbranch_6/mswindows/GRASS-Installer.nsi.tmpl
grass/branches/develbranch_6/mswindows/GRASS-Packager.bat.tmpl
Log:
first try to fix #1428
Modified: grass/branches/develbranch_6/mswindows/GRASS-Installer.nsi.tmpl
===================================================================
--- grass/branches/develbranch_6/mswindows/GRASS-Installer.nsi.tmpl 2013-04-15 14:14:01 UTC (rev 55816)
+++ grass/branches/develbranch_6/mswindows/GRASS-Installer.nsi.tmpl 2013-04-15 22:06:58 UTC (rev 55817)
@@ -952,6 +952,82 @@
;----------------------------------------------------------------------------------------------------------------------------
+
+Function DownloadInstallMSRuntime
+
+ IntOp $ARCHIVE_SIZE_MB $ARCHIVE_SIZE_KB / 1024
+
+ StrCpy $DOWNLOAD_MESSAGE_ "The installer will download the $EXTENDED_ARCHIVE_NAME.$\r$\n"
+ StrCpy $DOWNLOAD_MESSAGE_ "$DOWNLOAD_MESSAGE_$\r$\n"
+ StrCpy $DOWNLOAD_MESSAGE_ "$DOWNLOAD_MESSAGE_The archive is about $ARCHIVE_SIZE_MB MB and may take"
+ StrCpy $DOWNLOAD_MESSAGE_ "$DOWNLOAD_MESSAGE_ several minutes to be downloaded.$\r$\n"
+ StrCpy $DOWNLOAD_MESSAGE_ "$DOWNLOAD_MESSAGE_$\r$\n"
+ StrCpy $DOWNLOAD_MESSAGE_ "$DOWNLOAD_MESSAGE_The $EXTENDED_ARCHIVE_NAME will be copyed to:$\r$\n"
+ StrCpy $DOWNLOAD_MESSAGE_ "$DOWNLOAD_MESSAGE_$TEMP\$CUSTOM_UNTAR_FOLDER.$\r$\n"
+ StrCpy $DOWNLOAD_MESSAGE_ "$DOWNLOAD_MESSAGE_$\r$\n"
+ StrCpy $DOWNLOAD_MESSAGE_ "$DOWNLOAD_MESSAGE_Press OK to continue and install runtimes or Cancel to skip the download and complete the GRASS"
+ StrCpy $DOWNLOAD_MESSAGE_ "$DOWNLOAD_MESSAGE_ installation without the $EXTENDED_ARCHIVE_NAME.$\r$\n"
+
+ MessageBox MB_OKCANCEL "$DOWNLOAD_MESSAGE_" IDOK download IDCANCEL cancel_download
+
+ download:
+ SetShellVarContext current
+ InitPluginsDir
+ NSISdl::download "$HTTP_PATH/$ARCHIVE_NAME" "$TEMP\$ARCHIVE_NAME"
+ Pop $0
+ StrCmp $0 "success" download_ok download_failed
+
+ download_ok:
+ InitPluginsDir
+ untgz::extract "-d" "$TEMP\$ORIGINAL_UNTAR_FOLDER" "-zbz2" "$TEMP\$ARCHIVE_NAME"
+ Pop $0
+ StrCmp $0 "success" untar_ok untar_failed
+
+ untar_ok:
+ ; execute also vcredist_2005_x86.exe ?
+ Exec "$TEMP\$ORIGINAL_UNTAR_FOLDER\bin\vcredist_2005_x86.exe"
+ ; execute also vcredist_2008_x86.exe ?
+ Exec "$TEMP\$ORIGINAL_UNTAR_FOLDER\bin\vcredist_2008_x86.exe"
+ Exec "$TEMP\$ORIGINAL_UNTAR_FOLDER\bin\vcredist_2010_x86.exe"
+ Delete "$TEMP\$ARCHIVE_NAME"
+ Delete "$TEMP\$ORIGINAL_UNTAR_FOLDER"
+ Goto end
+
+ download_failed:
+ DetailPrint "$0" ;print error message to log
+ MessageBox MB_OK "Download Failed.$\r$\nGRASS will be installed without the $EXTENDED_ARCHIVE_NAME."
+ Goto end
+
+ cancel_download:
+ MessageBox MB_OK "Download Cancelled.$\r$\nGRASS will be installed without the $EXTENDED_ARCHIVE_NAME."
+ Goto end
+
+ untar_failed:
+ DetailPrint "$0" ;print error message to log
+
+ end:
+
+FunctionEnd
+
+Section /O "MS Visual C++ Redistributable Package" SecMSRuntime
+
+ ;Set the size (in KB) of the archive file
+ StrCpy $ARCHIVE_SIZE_KB 12521
+
+ ;Set the size (in KB) of the unpacked archive file
+ AddSize 13500
+
+ StrCpy $HTTP_PATH "http://download.osgeo.org/osgeo4w/release/msvcrt/"
+ StrCpy $ARCHIVE_NAME "msvcrt-1.0.1-7.tar.bz2"
+ StrCpy $EXTENDED_ARCHIVE_NAME "MS Visual C++ Redistributable Package"
+ StrCpy $ORIGINAL_UNTAR_FOLDER "install_msruntime"
+
+ Call DownloadInstallMSRuntime
+
+SectionEnd
+
+;----------------------------------------------------------------------------------------------------------------------------
+
;Uninstaller Section
Section "Uninstall"
@@ -987,6 +1063,7 @@
!insertmacro MUI_DESCRIPTION_TEXT ${SecGRASS} "Install GRASS ${VERSION_NUMBER}"
!insertmacro MUI_DESCRIPTION_TEXT ${SecNorthCarolinaSDB} "Download and install the North Carolina (Wake County) sample data set"
!insertmacro MUI_DESCRIPTION_TEXT ${SecSpearfishSDB} "Download and install the South Dakota (Spearfish County) sample data set"
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecMSRuntime} "Some extra open source software included in the installer (e.g. gdal, python) may need the MS Visual C++ Redistributable Package.$\r$\nDownload and install Redistributable Package"
!insertmacro MUI_FUNCTION_DESCRIPTION_END
;----------------------------------------------------------------------------------------------------------------------------
Modified: grass/branches/develbranch_6/mswindows/GRASS-Packager.bat.tmpl
===================================================================
--- grass/branches/develbranch_6/mswindows/GRASS-Packager.bat.tmpl 2013-04-15 14:14:01 UTC (rev 55816)
+++ grass/branches/develbranch_6/mswindows/GRASS-Packager.bat.tmpl 2013-04-15 22:06:58 UTC (rev 55817)
@@ -51,6 +51,8 @@
del %PACKAGE_DIR%\extralib\libgrass_*6.4*.dll
del %PACKAGE_DIR%\extralib\libgrass_*6.5*.dll
del %PACKAGE_DIR%\extralib\Qt*4.dll
+del %PACKAGE_DIR%\extralib\msvcp*
+del %PACKAGE_DIR%\extralib\msvcr*
rem copy %OSGEO4W_DIR%\pgsql\lib\libpq.dll %PACKAGE_DIR%\extralib
@echo.
More information about the grass-commit
mailing list