mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-09-03 20:53:02 -05:00
The problem is caused by leftover files from a previous install. The solution is to uninstall GnuCash before installing a new version in such cases. This commit adds a compatibility test and uninstall step to the windows installer that will automatically uninstall the previous gnucash release if it is considered 'incompatible' with the one to be installed. The user will be warned of this, so he can decide to cancel the installation if he doesn't like the idea of uninstalling his working GnuCash installation. Currently, versions are considered 'incompatible' if their major or minor version components are different, so 2.3.x is incompatible with 2.2.x and will trigger an uninstall. Likewise, a 2.4.x install is incompatible with a 2.3.x and will trigger an uninstall. This is a nice way to remove all testing 'cruft' from the system once the new release comes out. Note that in the future installing 2.3.16+ over 2.4.x will also trigger the uninstall, which is a good thing IMO. An older release can't know about changes made in a newer one, so it's safer to first uninstall the newer one to avoid leftover files. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19528 57a11ea4-9604-0410-9ed3-97b8803252fd
These scripts try to download and install a Windows/mingw32 build
environment for GnuCash on Windows.
These scripts support two ways to build a Windows/mingw32 version of GnuCash:
- directly on a Windows PC
- via cross-compilation on Linux
1. Build GnuCash directly on a Windows PC
-----------------------------------------
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 version 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 mingwPORT'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
Note: if you didn't download and install Qt earlier, this command will fail
regardless of whether you disabled AQ_BANKING_WITH_QT or not. This is
a bug in the configuration script for the installer builder (issc).
More information is collected on http://wiki.gnucash.org/wiki/Windows
2. Cross-compile GnuCash/win32 on a linux PC
--------------------------------------------
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. 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. Particularly for cross-compiling,
set these variables:
* cross_compile: should be set to yes
* GLOBAL_DIR: the base directory for all other directory definitions,
unless you explicitly override it for some directories.
* MINGW_DIR: set this to your preferred prefix of the mingw32 gcc/binutils
on your Linux installation.
(It is strongly recommended to choose a prefix different
from your normal compiler tool chain in order to distinguish
your native vs. cross compiler more easily.)
2. Then run the script create_cross_mingw.sh - it will
download, compile, and install a mingw32 tool chain.
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/custom.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!