GnuCash c935c2f+
Loading...
Searching...
No Matches
Files | Functions
Version Information

The functions in this file allow you to query various version related strings that were set at build time. More...

Files

file  gnc-version.h
 functions to query various version related strings that were set at build time.
 

Functions

const char * gnc_version (void)
 Parse <prefix>/etc/gnucash/environment and set environment variables based on the contents of that file.
 
const char * gnc_build_id (void)
 
const char * gnc_vcs_rev (void)
 
const char * gnc_vcs_rev_date (void)
 
const int gnc_gnucash_major_version (void)
 

Detailed Description

The functions in this file allow you to query various version related strings that were set at build time.

Function Documentation

◆ gnc_build_id()

const char * gnc_build_id ( void  )

Definition at line 40 of file gnc-version.c.

41{
42 /* GNUCASH_BUILD_ID can be set by the builder prior to compiling to anything
43 * the builder sees fit (eg distributions may want to print a package source
44 * version number (rpm, dpkg,...)
45 * If not set by a builder it will be set by default to our
46 * git revision ("git706a3b (<commit-date>)"
47 */
48 if (GNUCASH_BUILD_ID[0] != '\0')
49 return GNUCASH_BUILD_ID;
50 else
51 return dflt_build_id;
52
53}

◆ gnc_gnucash_major_version()

const int gnc_gnucash_major_version ( void  )

Definition at line 65 of file gnc-version.c.

66{
67 return PROJECT_VERSION_MAJOR;
68}

◆ gnc_vcs_rev()

const char * gnc_vcs_rev ( void  )

Definition at line 55 of file gnc-version.c.

56{
57 return GNC_VCS_REV;
58}

◆ gnc_vcs_rev_date()

const char * gnc_vcs_rev_date ( void  )

Definition at line 60 of file gnc-version.c.

61{
62 return GNC_VCS_REV_DATE;
63}

◆ gnc_version()

const char * gnc_version ( void  )

Parse <prefix>/etc/gnucash/environment and set environment variables based on the contents of that file.

Read the comments in <prefix>/etc/gnucash/environment for more details.

Definition at line 35 of file gnc-version.c.

36{
37 return PROJECT_VERSION;
38}