The swig 3.0 generated python wrappers trigger a warning converted into an error issued
by gcc 8.0 for using strncpy as follows:
strncpy(buff, "swig_ptr: ", 10);
The reason is this call will truncate the trailing null byte from the string.
This appears to have been fixed in swig master already but that's not released yet
so let disable the warning when compiling the swig wrappers until it is.
This is a bit brittle because it depends on Martin Preuss applying our
patch (already applied to borrowed/gwen-gtk3) before releasing 4.20.1,
but creating a proper test for the changes proved to be too difficult.
This switches swig to use python 3 specific features when generating the
bindings, switches the build over to python 3 and makes the neccesary
python 2 to 3 conversions in the bindings and tests.
Currently running "ninja-build package" produces a file with and incorrect
version number. This patch passes the CMake version variables into CPack to get
the correct filename.
Old "gnucash-0.1.1-Linux.tar.gz" new "gnucash-2.7.5-Linux.tar.gz"
By default we require gettext 0.19.6 as this is needed to generate a translated version of gnucash.desktop and gnucash.appdata.xml.
However this version is not available on some platforms (most notably our own ubuntu 14.04LTS travis instance).
By setting ALLOW_OLD_GETTEXT=ON, the build configuration falls back to generating untranslated versions of said files instead.
If you need to do that for your build pass the values in on the cmake
command line.
As for all of the noise about Boost's install name if APPLE, just fix it
with the install name tool. There are instructions at the boost module
in gnucash.modules.
The swig wrappers don't really depend on git (but rather on swig) and there can be
situations the builder wants to generate the wrappers also from a tar ball.
Several were only there because they used to be generated via autogen.sh
and hence had to be included because autogen.sh was not supposed to be run
in a tarball based build.
A few others aren't clear so I have left them in for now:
- gnucash.1 (man page)
- gnucash-design.info (because it's unclear what we want to do with that one)
These files should clearly be in the tarball:
- gnucash.pot -> for our translators
- ChangeLog -> can't be generated outside of a git repo
- gnc-vcs-info.h -> can't be generated outside of a git repo
- guile/python bindings -> to avoid a swig dependency when building from tarball
- the two dist_add_... macros now both take a list of file names
as argument so more files can be added at once to the dist tarball.
- dist_add_generated now creates the right target by itself. There's
no need to pass one any more
- make the swig generated *.py module files explicit output files
- change a couple of custom_targets into custom_commands. The only
reason they were defined as targets was to ensure they got built
before the dist tarball. This is now properly handled by the
dist_add_... macros.
- correctly handle dependency on swig-runtime.h (using OBJECT_DEPENDS
was not the way to do it according to that property's help page)
cmake with unix makefiles fails to resolve dist dependencies
added from COPY_FROM_BUILD if these dependencies aren't built yet.
This commit replaces the COPY_FROM_BUILD based logic with two new functions
'dist_add_configured' and 'dist_add_generated' to indicate which files should
be included in the dist tarball. The latter also adds a target level dependency
to the dist tarball custom command. Hence the former should
be used for files that get generated during a cmake run while the latter
should be used for files generated as the result of a 'make/ninja-build' run
(like files for which an add_custom_command rule exists).
Note: this commit also temporarily disables the dist target when building
from a tarball (and hence it won't be tested in distcheck either). This
will be handled in a future commit.
This includes removal of the now unused make-gnucash-potfiles.in,
checking for CMakeLists.txt rather than Makefile.am in gnc-vcs-info,
upating the HACKING file,
and generally updating references to autotools.
I have kept "Makefile.*" exclude patterns in our CMakeLists.txt files
because they may still be lingering in the source directory from
previous autogen.sh runs. At some point these should probably be
removed as well still, together with the gitignore references to them.
Thanks to Robert Merkel for reporting them.
* Build gnucash-design.info if makeinfo is available, but don't complain
if it isn't.
* Fail Cmake if LibXSLT and xsltproc aren't found. Those are required to
build the gschemas and GnuCash won't work without them.
* Fix the WebKit detection so that it isn't faked out into thinking it has
WebKit2Gtk-4.0 when it's WebKit2Gtk-3.0 and cmake is run with a
CMakeCache.txt present.
as it doesn't load proper backend.
The cause was that the libdbi-driver path in CMakeLists.txt was wrong
and GNC_DBD_DIR was being set unconditionally in etc/gnucash/environment
with an invalid path.
Sets paths for finding componenents depending on the state of ENABLE_BINRELOC,
GNC_UNINSTALLED, GNC_BUILDDIR and whether any install paths have been set
outside of CMAKE_INSTALL_PREFIX.
GNUInstallDirs changes the name of CMAKE_INSTALL_LIBDIR depending on the
operating system and distro. When CMAKE_INSTALL_PREFIX is /usr,
/usr/local, or any subdirectory of /opt it also changes
CMAKE_INSTALL_FULL_SYSCONFDIR to /etc. An earlier commit by Aaron Laws
mirrors the name of CMAKE_INSTALL_LIBDIR to the build library directory.
It's possible for builders to set any of the install directories
anywhere they please.
Setting any directory outside of CMAKE_INSTALL_PREFIX breaks Binreloc so
the toplevel CMakeLists.txt now detects that and disables Binreloc.
If Binreloc is enabled then all path queries use it to find paths. This
works in the build directory because the gnucash executable and all of
the test programs are in build_directory/bin and LIBDIR, DATADIR, and
SYSCONFDIR can be found in the same root path.
If Binreloc is disabled then in order to build or run programs from the
build directory one must set GNC_UNINSTALLED and set GNC_BUILDDIR to the
absolute path of the build directory. When those are set GNC_BUILDDIR
replaces CMAKE_INSTALL_PREFIX in all paths that are subdirectories of
CMAKE_INSTALL_PREFIX; paths that are not in CMAKE_INSTALL_PREFIX are
appended whole to GNC_BUILDDIR. This process is constent between CMake
and gnc_path_get_foo. GnuCash is unlikely to run from a DESTDIR without
Binreloc.
WITH_OFX, WITH_SQL and WITH_AQBANKING handling is fixed. The
dist files for these features are always included in the dist
tarball.
I added code for WITH_GNUCASH=OFF to error out when trying to
create a dist tarball. Not fully tested because WITH_GNUCASH=OFF
itself does not build.
Still need to backport fixes from unstable for WITH_PYTHON=OFF.
gtk-mac-bundler can't access the executable's rpath list so it can't
follow dependencies if they're not in $install_dir/lib from @rpath.
Autotools always sets absolute path install names so this should have no
adverse affects on other Mac builds.
While I myself asked for it to be retained a couple of years back
I now believe it really makes no sense to keep on carrying
a completely outdated rpm spec file around. This should not
be part of the source and properly up to date and maintained
rpm spec files can be found in each rpm based distro that ships
gnucash.
It is split into
- /libgnucash (for the non-gui bits)
- /gnucash (for the gui)
- /common (misc source files used by both)
- /bindings (currently only holds python bindings)
This is the first step in restructuring the code. It will need much
more fine tuning later on.
These are currently unmaintained, cutecash us based on the obsolete qt4
and gtkmm is only used by cutecash. Whenever someone wishes to revive
this experiment it can be recovered from git history and be brought
into a separate repository.
The resolves it's 'allmost nongui' status. Note the options code still
stores a pointer to a gtk widget but this is never used in the app-utils code
itself. This was already so before this commit and fixing this will require
more refactoring later on.
This commit also aligns the list of non-gui source directories between
cmake and autotools. This may need further tweaking in the context of
splitting the source in libgnucash and gnucash (the application)
They are both about handling core gnucash objects. Qof was once split out
in an attempt to make it a separate library. This hasn't worked out so there's
no good reason any more to keep this artificial separation.
A few considerations:
- The qof tests are merged into the engine test directory but they are kept as
a separate test entity for now. Several assumptions made in the qof tests
are no longer valid in the context of the engine. (For example if the
pricedb test is added in the same test executable as the qofbook test,
the book creation test fails because it now has 2 collections (pricedb and
book) instead of only one. There are plenty of others like this so merging
the tests needs more careful review and is perhaps best done while converting
to c++/Google test.
- I had to use unique names for the MockBackend classes because apparently the tests were
using a MockClass from another file in the cmake builds, causing several
tests to fail.
Most are converted to GtkLayout/GtkiDrawingArea widgets as these
most closely approach the GnomeCanvas concept.
This currently builds and runs but has the following issues still:
- item edit isn't drawn properly (margin and offset issues)
- cursor is not handled properly yet
These will be handled in subsequent commits.
At the same time require --std=gnu11 instead of --sdt=gnu99.
This allows us to drop some conditionals is several places. I've
chosen 2.4 as that is the version available in travis, which appears to
be the oldest platform care about. Debian stable has 2.46 in backports,
our windows environment has 2.42
This was still pulled in via the now removed gnc-csv-model.
In order to remove this, the fixed format csv importer
has been tweaked to get the required features from
the c++ csv importer code instead.
This base class takes care of the common things like
file opening and character set conversion.
The actual interpretation of the contents will be
delegated to specialized child classes.
Effective c++ note: explicitly declare special member functions
All c++ unit tests will be written with it, and testing
should be possible out of the box.
We could make it optional, but then lots of tests will
be skipped. This creates an illusion of all tests passing
while many are simply not run. This confusion should be
avoided.
This change depends on a second commit for the windows build
in the gnucash-on-windows repository. This commit will be
pushed at the same time.
The fundamental problem is https://sourceforge.net/p/libofx/bugs/39.
Work around it by detecting it at configure time and if present check
to see if the time in question is not daylight time. If that's the case,
determine the daylight time offset and add it back to the timestamp.
* Add ability to either create SWIG C files or use generated ones
depending on BUILDING_FROM_VCS.
* Add complete support for compiling Python bindings using
WITH_PYTHON=YES.
* Add CMakeLists.txt files to a couple more directories.
* CMakeLists.txt: Give CMake a hint about where to find pod2man
based on where it found perl.
* src/cmake_modules/GncConfigure.cmake: Protect GNC_HELPDIR in
quotes for cases where it contains spaces (like "C:\Program Files"
on Windows).
* Remove symlink command that is now done a few lines later.
* Relocate comment.
* Do not install INSTALL (not needed) and COPYING (linked/copied elsewhere).
The original plan was to duplicate exactly what automake does, but
we don't really want to do that. Automake installs the GPLV3 COPYING
which we don't use--LICENSE is the GPLV2 version--and INSTALL is the
autotools procedure that doesn't make sense for a cmake build.
1. Use guile-2.0 instead of guile-1.8.
2. Set GNC_PLATFORM_POSIX on Unix (for gnc_timezone.cpp).
3. Pass guile include files when compiling cutecash.
4. Link Boost libraries.
5. Add -std=gnu99 to CMAKE_C_FLAGS.
6. Temporarily put -O2 in CMAKE_C_FLAGS since Fedora requires
optimization for FORTIFY_SOURCE. (Eventually with CMake
we will have separate Debug and Release builds.)
Tested that cutecash builds and launches on OS X, Fedora 23 and Ubuntu 14.04.3.
This would be an excellent test case for those wrappers...
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21485 57a11ea4-9604-0410-9ed3-97b8803252fd
However, this couldn't really re-use all non-GUI code because most code still
contains minor gtk bits here and there. But in the long run much more
code might be available.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20610 57a11ea4-9604-0410-9ed3-97b8803252fd
This requirement will be increased to 2.18.1 once our win32 build
is upgraded.
Following the gtk version, I increased also all the other related libraries
according to what I found here: ftp://ftp.gnome.org/pub/gnome/platform/2.26/2.26.3/sources/
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20489 57a11ea4-9604-0410-9ed3-97b8803252fd
Finally, config.h will only be re-created if anything has changed, thus
reducing re-compiling to a minimum. This was done with instructions from
http://www.cmake.org/Wiki/CMake:How_To_Write_Platform_Checks ; however,
more of those checks (like CheckFunctionExists etc) don't work as easily as
CheckHeaderExists, so I left it at that.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19127 57a11ea4-9604-0410-9ed3-97b8803252fd
Running "make package" will produce a binary package.
Running "make package_source" will produce a source package.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19020 57a11ea4-9604-0410-9ed3-97b8803252fd
app-utils is needed for the conversion from and to string
for gnc_numeric, date, and other values.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18905 57a11ea4-9604-0410-9ed3-97b8803252fd
To build this:
mkdir build-cpp
cd build-cpp
cmake ..
make
./src/gnc/cutecash
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18815 57a11ea4-9604-0410-9ed3-97b8803252fd