From b91805fd57a85cb4e7db406f3360418e98a3d0fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=B6hler?= Date: Fri, 8 Feb 2008 22:23:25 +0000 Subject: [PATCH] Win32: Detect and warn about ActivePerl 5.10 (#506873). BP git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16931 57a11ea4-9604-0410-9ed3-97b8803252fd --- packaging/win32/install-fq-mods.bat | 33 ++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/packaging/win32/install-fq-mods.bat b/packaging/win32/install-fq-mods.bat index 6bdaa04435..84e2041761 100644 --- a/packaging/win32/install-fq-mods.bat +++ b/packaging/win32/install-fq-mods.bat @@ -1,4 +1,5 @@ @echo off +setlocal if not exist ssleay32.dll ( echo. @@ -10,18 +11,30 @@ if not exist ssleay32.dll ( echo. echo * Check Perl echo. -perl -e "$ver=1000*sprintf(\"%%.3f\", $]); exit(int($ver/100)+$ver%%1000);" -if %errorlevel% equ 58 ( - set _haveperl58=1 - goto ccp -) -if %errorlevel% equ 56 ( - set _haveperl58= - goto ccp +perl -e "exit(int($]));" +set _perlmajor=%errorlevel% +perl -e "$ver=1000*sprintf(\"%%.3f\", $]); exit(int($ver)-5000);" +set _perlminor=%errorlevel% +if %_perlmajor% equ 5 ( + if %_perlminor% equ 10 ( + echo. + echo Found ActivePerl 5.10. This version does not yet support Finance-Quote. + echo Please install ActivePerl 5.8 (http://www.activestate.com/store/activeperl^) + echo instead and add the bin directory to your Path environment variable. + goto error + ) + if %_perlminor% equ 8 ( + set _perlversion=5.8 + goto ccp + ) + if %_perlminor% equ 6 ( + set _perlversion=5.6 + goto ccp + ) ) echo. echo Did not find a usable perl. -echo Please install ActivePerl (http://www.activestate.com/store/activeperl) +echo Please install ActivePerl 5.8 (http://www.activestate.com/store/activeperl) echo and add the bin directory to your Path environment variable. goto error :ccp @@ -36,7 +49,7 @@ echo * Install Crypt-SSLeay echo. set OLDPATH=%PATH% set PATH=%CD%;%PATH% -if defined _haveperl58 ( +if %_perlversion% == 5.8 ( echo anything | perl -x -S ppm install http://theoryx5.uwinnipeg.ca/ppms/Crypt-SSLeay.ppd ) else ( perl -x -S ppm install http://theoryx5.uwinnipeg.ca/ppmpackages/Crypt-SSLeay.ppd