[GNC] Newest version for Ubuntu 20.04 LTS

david whiting dw at davidwhiting.me.uk
Fri Nov 19 02:10:52 EST 2021


Hi Brad,

Once you have the sources you can use git to checkout any previous
version you want. To see the tagged versions, in a terminal type:

git tag

The last 10 lines show:

4.2-post-string-freeze
4.3
4.3-string-freeze
4.4
4.5
4.6
4.7
4.8
4.8a
gnucash-1-9-0

So, if you want version 4.8a, you can do:

git checkout -b 4.8a 4.8a

This will checkout the version tagged 4.8a, and create a new branch
called 4.8a. Once you have that, you can just change to the build
directory and run the cmake and make commands. I have selected 4.8a,
if you want version 4.8 instead, just use 4.8 instead of 4.8a in the
git checkout. Note, once you have the source code, you don't need to
run the whole script again to get a new version. When there is a new
release, e.g. 4.9 or 5.0, or 5.1, or whatever, you can just:

git checkout maint
git pull

to get the latest commits, then:

git checkout -b 5.0 5.0

(for example) to get that version.

Here is the script again, with the git checkout command added (near the end):

==== build-gnucash.sh  ====

## Change this if you want to build it somewhere else.
SOURCEDIR="$HOME/Documents/gnucash/source"
BUILDDIR="$HOME/Documents/gnucash/build"

sudo apt update
sudo apt upgrade

sudo apt-get install build-essential
## This is one long line
sudo apt install git make cmake libglib2.0-dev libxml2-dev
libxslt1-dev libwebkit2gtk-4.0-dev gettext swig guile-3.0-dev
libofx-dev xsltproc libboost-all-dev libdbi1 libdbi-dev libdbd-sqlite3
libsecret-1-0 libsecret-1-dev aqbanking-tools libaqbanking-dev
gwenhywfar-tools libgwengui-gtk3-dev

# Only use the next 2 lines if you have not installed [[Google_Test |
Google Test]] already.
sudo apt install libgtest-dev                # >=1.7.0
sudo apt install google-mock                 # 1.8.0 installs
googlemock in a subdirectory of gtest

mkdir -p $SOURCEDIR
mkdir -p $BUILDDIR

## Clone gnucash source from git, if it is not already there
[ ! -d $SOURCEDIR/gnucash ] && git clone
https://github.com/Gnucash/gnucash.git $SOURCEDIR

## Checkout version 4.8a
git checkout -b 4.8a 4.8a

cd $BUILDDIR
cmake -DCMAKE_INSTALL_PREFIX=$HOME/opt/gnucash $SOURCEDIR

make

==== end of script ====


David

On Thu, 18 Nov 2021 at 22:07, brad <bradhaack at fastmail.com> wrote:
>
> David,  Will your script build the latest stable release?  If not what
> do I change to do that?
>
> On 10/2/21 11:48 AM, david whiting wrote:
> > Hi Jeff,
> >
> > On Wed, 29 Sept 2021 at 07:11, Jeff <beastmaster126 at hotmail.com> wrote:
> > [...]
> >> I would settle for a copy of "Building the Newest Version of GNC for
> >> Dummies Course" book.
> > Others have shown you that you can use flatpak to get the latest
> > version, but if you do want to build from source I have found that the
> > following works on Ubuntu 20.04. I have also attached it as a script.
> > This clones the source from git and by default builds the maintenance
> > version. The versions are tagged, so you can use git to checkout a
> > different version and build that if you want, e.g. you could build 4.8
> > rather than maint.
> >
> > ==== build-gnucash.sh  ====
> >
> > ## Change this if you want to build it somewhere else.
> > SOURCEDIR="$HOME/Documents/gnucash/source"
> > BUILDDIR="$HOME/Documents/gnucash/build"
> >
> > sudo apt update
> > sudo apt upgrade
> >
> > sudo apt-get install build-essential
> > ## This is one long line
> > sudo apt install git make cmake libglib2.0-dev libxml2-dev
> > libxslt1-dev libwebkit2gtk-4.0-dev gettext swig guile-3.0-dev
> > libofx-dev xsltproc libboost-all-dev libdbi1 libdbi-dev libdbd-sqlite3
> > libsecret-1-0 libsecret-1-dev aqbanking-tools libaqbanking-dev
> > gwenhywfar-tools libgwengui-gtk3-dev
> >
> > # Only use the next 2 lines if you have not installed [[Google_Test |
> > Google Test]] already.
> > sudo apt install libgtest-dev                # >=1.7.0
> > sudo apt install google-mock                 # 1.8.0 installs
> > googlemock in a subdirectory of gtest
> >
> > mkdir -p $SOURCEDIR
> > mkdir -p $BUILDDIR
> >
> > ## Clone gnucash source from git, if it is not already there
> > [ ! -d $SOURCEDIR/gnucash ] && git clone
> > https://github.com/Gnucash/gnucash.git $SOURCEDIR
> >
> > cd $BUILDDIR
> > cmake -DCMAKE_INSTALL_PREFIX=$HOME/opt/gnucash $SOURCEDIR
> >
> > make
> >
> > ==== end of script ====
> >
> > David
> >
> > _______________________________________________
> > gnucash-user mailing list
> > gnucash-user at gnucash.org
> > To update your subscription preferences or to unsubscribe:
> > https://lists.gnucash.org/mailman/listinfo/gnucash-user
> > If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> > -----
> > Please remember to CC this list on all your replies.
> > You can do this by using Reply-To-List or Reply-All.
>
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.



-- 
David Whiting


More information about the gnucash-user mailing list