From b53205e903a413936700499b2800ba757ff775fa Mon Sep 17 00:00:00 2001 From: Christian Stimming Date: Wed, 24 Mar 2010 19:28:20 +0000 Subject: [PATCH] Set some more line-ending style properties. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18961 57a11ea4-9604-0410-9ed3-97b8803252fd --- lib/libc/pow.h | 116 ++++++++--------- packaging/win32/README | 190 ++++++++++++++-------------- packaging/win32/install-fq-mods.cmd | 184 +++++++++++++-------------- packaging/win32/make_install.sh | 40 +++--- 4 files changed, 265 insertions(+), 265 deletions(-) diff --git a/lib/libc/pow.h b/lib/libc/pow.h index 9ca3e3dcf0..67d56de416 100644 --- a/lib/libc/pow.h +++ b/lib/libc/pow.h @@ -1,58 +1,58 @@ -/********************************************************************\ - * pow.h -- pow wrapper for MinGW systems * - * Copyright (C) 2007 Andreas Koehler * - * * - * This program is free software; you can redistribute it and/or * - * modify it under the terms of the GNU General Public License as * - * published by the Free Software Foundation; either version 2 of * - * the License, or (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License* - * along with this program; if not, contact: * - * * - * Free Software Foundation Voice: +1-617-542-5942 * - * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 * - * Boston, MA 02110-1301, USA gnu@gnu.org * -\********************************************************************/ - -#ifndef __POW_H__ -#define __POW_H__ - -#include - -/* From MinGW, math.h: */ - -/* Excess precision when using a 64-bit mantissa for FPU math ops can - * cause unexpected results with some of the MSVCRT math functions. - * For example, unless the function return value is stored (truncating - * to 53-bit mantissa), calls to pow with both x and y as integral - * values sometimes produce a non-integral result. */ - -#define __DEFINE_FLOAT_STORE_MATHFN_D1(fn1) \ -static __inline__ double \ -__float_store_ ## fn1 (double x) \ -{ \ - __volatile__ double res = (fn1) (x); \ - return res; \ -} - -#define __DEFINE_FLOAT_STORE_MATHFN_D2(fn2) \ -static __inline__ double \ -__float_store_ ## fn2 (double x, double y) \ -{ \ - __volatile__ double res = (fn2) (x, y); \ - return res; \ -} - -#undef pow - -/* Define the ___float_store_pow function and use it instead of pow(). */ -__DEFINE_FLOAT_STORE_MATHFN_D2 (pow) -#define pow __float_store_pow - -#endif /* __POW_H__ */ +/********************************************************************\ + * pow.h -- pow wrapper for MinGW systems * + * Copyright (C) 2007 Andreas Koehler * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License as * + * published by the Free Software Foundation; either version 2 of * + * the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License* + * along with this program; if not, contact: * + * * + * Free Software Foundation Voice: +1-617-542-5942 * + * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 * + * Boston, MA 02110-1301, USA gnu@gnu.org * +\********************************************************************/ + +#ifndef __POW_H__ +#define __POW_H__ + +#include + +/* From MinGW, math.h: */ + +/* Excess precision when using a 64-bit mantissa for FPU math ops can + * cause unexpected results with some of the MSVCRT math functions. + * For example, unless the function return value is stored (truncating + * to 53-bit mantissa), calls to pow with both x and y as integral + * values sometimes produce a non-integral result. */ + +#define __DEFINE_FLOAT_STORE_MATHFN_D1(fn1) \ +static __inline__ double \ +__float_store_ ## fn1 (double x) \ +{ \ + __volatile__ double res = (fn1) (x); \ + return res; \ +} + +#define __DEFINE_FLOAT_STORE_MATHFN_D2(fn2) \ +static __inline__ double \ +__float_store_ ## fn2 (double x, double y) \ +{ \ + __volatile__ double res = (fn2) (x, y); \ + return res; \ +} + +#undef pow + +/* Define the ___float_store_pow function and use it instead of pow(). */ +__DEFINE_FLOAT_STORE_MATHFN_D2 (pow) +#define pow __float_store_pow + +#endif /* __POW_H__ */ diff --git a/packaging/win32/README b/packaging/win32/README index 78a25123e8..57c08e4c67 100644 --- a/packaging/win32/README +++ b/packaging/win32/README @@ -1,95 +1,95 @@ -These scripts try to download and install a Windows/mingw32 build -environment for GnuCash on Windows. - -For cross-compiling the windows executable on Linux, see the lower -section of this file. - -Before you start with the automated build, you have to complete these -steps manually. The directory variables are set in `defaults.sh' and optionally -`custom.sh'. - -Note: The mingw homepage is http://www.mingw.org. You can read more - about mingw over there. The packages to download are all - on sourceforge however, so the direct links are given here. - -* Download MSYS from - https://sourceforge.net/projects/mingw/files/MSYS%20Base%20System/msys-1.0.11/MSYS-1.0.11.exe/download - to $DOWNLOAD_DIR - Note: there may be a more recent version available when you read this, use - whatever verion that is available. BUT: be sure to use MSYS-xyz.exe - (ie the MSYS installer) and not the *bin.tar.lzma. I got confused - the first time I tried, because directory msys-1.0.12 existed on - sourceforge, but it didn't have the windows installer. You should - use the installer, not try to unpack the -bin.tar.lzma files. So - choose whatever version that has got an installer. - -* Install MSYS into $MSYS_DIR. - -* Download minwPORT's wget from - https://sourceforge.net/projects/mingw/files/mingwPORT/Current%20Releases/wget-1.9.1-mingwPORT.tar.bz2/download - to $DOWNLOAD_DIR - Note: the version number may have changed when you try this. Use whatever version - that is available - -* Look at defaults.sh and create a file named custom.sh to specify adapted directory - variables. If you want verbose output of any script - step, add "set -x" to that file. - -* Either, download Qt from http://www.trolltech.com/developer/downloads/qt/windows, - install it and set QTDIR in custom.sh, like "QTDIR=/c/Qt/4.2.3"; or skip building - the AqBanking Setup Wizard by specifying "AQBANKING_WITH_QT=no". - -Start/Enter any MSYS shell window. Let the automated build begin by: - - $INSTALLER_DIR/install.sh - -Good luck! - -To generate a self-installing setup.exe file that contains -*everything*, run the following command after install.sh has -completed: - - $INSTALLER_DIR/dist.sh - -More information is collected on http://wiki.gnucash.org/wiki/Windows - - --------------------------- - -Cross-compiling a Windows/mingw32 executable of GnuCash on a Linux -host system. (Note: This used to work unchangedly in Sept'2006 but -probably not any longer.) - -These steps need to be performed: - -1. Edit the file create_cross_mingw.sh and set the PREFIX= variable to - the preferred prefix of the mingw32 gcc/binutils on your - Linux. (It is strongly recommended to choose a different prefix - than your normal compiler toolchain in order to distinguish - your native vs. cross compiler more easily.) Then run the - script create_cross_mingw.sh - it will - download, compile, and install a mingw32 toolchain. - -2. Edit the file defaults.sh: Make a global search-and-replace of - '\\' into '/' so that all directories are specified in unix - conventions. Set the variable cross_compile to "yes". Then - adjust the directories in defaults.sh according to your - preferred installation, especially $GLOBAL_DIR. - -3. Download a binary windows packages for "guile" e.g. from - http://www.tu-harburg.de/~et2cs/gnc/ and unpack it into the - directory $GUILE_DIR as given in defaults.sh. (This is done because - the build system for guile doesn't support cross-compiling.) - -4. Call install.sh, which will read the directory settings from - defaults.sh. It should download, compile, and install everything - automatically. Eventually the windows gnucash is installed into - $GNUCASH_DIR. - -5. The content of $GNUCASH_DIR (as well as all the other binary - packages) should then be copied to a windows machine. The paths - in $GNUCASH_DIR/bin/gnucash and/or $GNUCASH_DIR/bin/gnucash.cmd - need to be adjusted for the installation location on the - windows machine. - -Good luck! +These scripts try to download and install a Windows/mingw32 build +environment for GnuCash on Windows. + +For cross-compiling the windows executable on Linux, see the lower +section of this file. + +Before you start with the automated build, you have to complete these +steps manually. The directory variables are set in `defaults.sh' and optionally +`custom.sh'. + +Note: The mingw homepage is http://www.mingw.org. You can read more + about mingw over there. The packages to download are all + on sourceforge however, so the direct links are given here. + +* Download MSYS from + https://sourceforge.net/projects/mingw/files/MSYS%20Base%20System/msys-1.0.11/MSYS-1.0.11.exe/download + to $DOWNLOAD_DIR + Note: there may be a more recent version available when you read this, use + whatever verion that is available. BUT: be sure to use MSYS-xyz.exe + (ie the MSYS installer) and not the *bin.tar.lzma. I got confused + the first time I tried, because directory msys-1.0.12 existed on + sourceforge, but it didn't have the windows installer. You should + use the installer, not try to unpack the -bin.tar.lzma files. So + choose whatever version that has got an installer. + +* Install MSYS into $MSYS_DIR. + +* Download minwPORT's wget from + https://sourceforge.net/projects/mingw/files/mingwPORT/Current%20Releases/wget-1.9.1-mingwPORT.tar.bz2/download + to $DOWNLOAD_DIR + Note: the version number may have changed when you try this. Use whatever version + that is available + +* Look at defaults.sh and create a file named custom.sh to specify adapted directory + variables. If you want verbose output of any script + step, add "set -x" to that file. + +* Either, download Qt from http://www.trolltech.com/developer/downloads/qt/windows, + install it and set QTDIR in custom.sh, like "QTDIR=/c/Qt/4.2.3"; or skip building + the AqBanking Setup Wizard by specifying "AQBANKING_WITH_QT=no". + +Start/Enter any MSYS shell window. Let the automated build begin by: + + $INSTALLER_DIR/install.sh + +Good luck! + +To generate a self-installing setup.exe file that contains +*everything*, run the following command after install.sh has +completed: + + $INSTALLER_DIR/dist.sh + +More information is collected on http://wiki.gnucash.org/wiki/Windows + + +-------------------------- + +Cross-compiling a Windows/mingw32 executable of GnuCash on a Linux +host system. (Note: This used to work unchangedly in Sept'2006 but +probably not any longer.) + +These steps need to be performed: + +1. Edit the file create_cross_mingw.sh and set the PREFIX= variable to + the preferred prefix of the mingw32 gcc/binutils on your + Linux. (It is strongly recommended to choose a different prefix + than your normal compiler toolchain in order to distinguish + your native vs. cross compiler more easily.) Then run the + script create_cross_mingw.sh - it will + download, compile, and install a mingw32 toolchain. + +2. Edit the file defaults.sh: Make a global search-and-replace of + '\\' into '/' so that all directories are specified in unix + conventions. Set the variable cross_compile to "yes". Then + adjust the directories in defaults.sh according to your + preferred installation, especially $GLOBAL_DIR. + +3. Download a binary windows packages for "guile" e.g. from + http://www.tu-harburg.de/~et2cs/gnc/ and unpack it into the + directory $GUILE_DIR as given in defaults.sh. (This is done because + the build system for guile doesn't support cross-compiling.) + +4. Call install.sh, which will read the directory settings from + defaults.sh. It should download, compile, and install everything + automatically. Eventually the windows gnucash is installed into + $GNUCASH_DIR. + +5. The content of $GNUCASH_DIR (as well as all the other binary + packages) should then be copied to a windows machine. The paths + in $GNUCASH_DIR/bin/gnucash and/or $GNUCASH_DIR/bin/gnucash.cmd + need to be adjusted for the installation location on the + windows machine. + +Good luck! diff --git a/packaging/win32/install-fq-mods.cmd b/packaging/win32/install-fq-mods.cmd index 6bf1775754..3f71d87102 100644 --- a/packaging/win32/install-fq-mods.cmd +++ b/packaging/win32/install-fq-mods.cmd @@ -1,92 +1,92 @@ -@echo off -setlocal - -if not exist ssleay32.dll ( - echo. - echo Did not find ssleay32.dll in current directory. - echo Please start this cmd file in the bin directory created by the setup.exe. - goto error -) - -echo. -echo * Check Perl -echo. -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 ( - set _perlversion=5.10 - goto ccp - ) - 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 5.8 (http://www.activestate.com/store/activeperl) -echo and add the bin directory to your Path environment variable. -goto error -:ccp - -echo * Install DateManip -echo. -perl -x -S ppm install Date-Manip -if %errorlevel% neq 0 ( - perl -x -S ppm install DateManip - if %errorlevel% neq 0 goto error -) - -echo. -echo * Install Crypt-SSLeay -echo. -set OLDPATH=%PATH% -set PATH=%CD%;%PATH% -if %_perlversion% == 5.10 ( - perl -x -S ppm install Crypt-SSLeay -) else 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 -) -set errlvlbak=%errorlevel% -set PATH=%OLDPATH% -if %errlvlbak% neq 0 goto error - -echo. -echo * Install Finance-Quote -echo. -perl -x -S ppm install Finance-Quote -if %errorlevel% neq 0 goto error - -echo. -echo * Run gnc-fq-check -echo. -perl -w gnc-fq-check -if %errorlevel% neq 0 goto error - -echo. -echo * Run gnc-fq-helper -echo. -echo (yahoo "AMZN") | perl -w gnc-fq-helper -if %errorlevel% neq 0 goto error - -echo. -echo * Installation succeeded -echo. -goto end - -:error: -echo. -echo An error occured, see above. -echo. - -:end -pause +@echo off +setlocal + +if not exist ssleay32.dll ( + echo. + echo Did not find ssleay32.dll in current directory. + echo Please start this cmd file in the bin directory created by the setup.exe. + goto error +) + +echo. +echo * Check Perl +echo. +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 ( + set _perlversion=5.10 + goto ccp + ) + 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 5.8 (http://www.activestate.com/store/activeperl) +echo and add the bin directory to your Path environment variable. +goto error +:ccp + +echo * Install DateManip +echo. +perl -x -S ppm install Date-Manip +if %errorlevel% neq 0 ( + perl -x -S ppm install DateManip + if %errorlevel% neq 0 goto error +) + +echo. +echo * Install Crypt-SSLeay +echo. +set OLDPATH=%PATH% +set PATH=%CD%;%PATH% +if %_perlversion% == 5.10 ( + perl -x -S ppm install Crypt-SSLeay +) else 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 +) +set errlvlbak=%errorlevel% +set PATH=%OLDPATH% +if %errlvlbak% neq 0 goto error + +echo. +echo * Install Finance-Quote +echo. +perl -x -S ppm install Finance-Quote +if %errorlevel% neq 0 goto error + +echo. +echo * Run gnc-fq-check +echo. +perl -w gnc-fq-check +if %errorlevel% neq 0 goto error + +echo. +echo * Run gnc-fq-helper +echo. +echo (yahoo "AMZN") | perl -w gnc-fq-helper +if %errorlevel% neq 0 goto error + +echo. +echo * Installation succeeded +echo. +goto end + +:error: +echo. +echo An error occured, see above. +echo. + +:end +pause diff --git a/packaging/win32/make_install.sh b/packaging/win32/make_install.sh index 19fab94e4b..cd3b79bb8f 100644 --- a/packaging/win32/make_install.sh +++ b/packaging/win32/make_install.sh @@ -1,20 +1,20 @@ -#!/bin/sh - -set -e - -function qpushd() { pushd "$@" >/dev/null; } -function qpopd() { popd >/dev/null; } -function unix_path() { echo "$*" | sed 's,^\([A-Za-z]\):,/\1,;s,\\,/,g'; } - -qpushd "$(dirname $(unix_path "$0"))" -. functions.sh -. defaults.sh -reset_steps -. install.sh -qpopd - -prepare -_INSTALL_WFSDIR=`win_fs_path $INSTALL_DIR` -_INSTALL_UDIR=`unix_path $INSTALL_DIR` - -make_install "$@" +#!/bin/sh + +set -e + +function qpushd() { pushd "$@" >/dev/null; } +function qpopd() { popd >/dev/null; } +function unix_path() { echo "$*" | sed 's,^\([A-Za-z]\):,/\1,;s,\\,/,g'; } + +qpushd "$(dirname $(unix_path "$0"))" +. functions.sh +. defaults.sh +reset_steps +. install.sh +qpopd + +prepare +_INSTALL_WFSDIR=`win_fs_path $INSTALL_DIR` +_INSTALL_UDIR=`unix_path $INSTALL_DIR` + +make_install "$@"