gnucash master: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Fri Sep 1 14:24:38 EDT 2017


Updated	 via  https://github.com/Gnucash/gnucash/commit/1b3a0e56 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/48365a92 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/1d4dc42a (commit)
	 via  https://github.com/Gnucash/gnucash/commit/e798d6bd (commit)
	 via  https://github.com/Gnucash/gnucash/commit/d02ce3af (commit)
	 via  https://github.com/Gnucash/gnucash/commit/e2386253 (commit)
	from  https://github.com/Gnucash/gnucash/commit/e732ff94 (commit)



commit 1b3a0e56ff50574423eec243af827898c521a977
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Thu Aug 31 20:06:27 2017 +0200

    Use boost::filesystem's built-in conversion between character encodings.
    
    This should fix the wide character mixup on Windows

diff --git a/libgnucash/core-utils/gnc-filepath-utils.cpp b/libgnucash/core-utils/gnc-filepath-utils.cpp
index efc2440..066e892 100644
--- a/libgnucash/core-utils/gnc-filepath-utils.cpp
+++ b/libgnucash/core-utils/gnc-filepath-utils.cpp
@@ -448,15 +448,16 @@ get_userdata_home(bool create)
             if (!gnc_validate_directory(userdata_home, create))
                 throw (bfs::filesystem_error(
                     std::string(_("Directory doesn't exist: "))
-                    + userdata_home.c_str(), userdata_home,
+                    + userdata_home.string(), userdata_home,
                     bst::error_code(bst::errc::permission_denied, bst::generic_category())));
             try_home_dir = false;
         }
         catch (const bfs::filesystem_error& ex)
         {
+            auto path_string = userdata_home.string();
             g_warning("%s is not a suitable base directory for the user data."
             "Trying home directory instead.\nThe failure is\n%s",
-            userdata_home.c_str(), ex.what());
+            path_string.c_str(), ex.what());
         }
     }
 
@@ -469,7 +470,7 @@ get_userdata_home(bool create)
             if (!gnc_validate_directory(userdata_home, false))
                 throw (bfs::filesystem_error(
                     std::string(_("Directory doesn't exist: "))
-                    + userdata_home.c_str(), userdata_home,
+                    + userdata_home.string(), userdata_home,
                     bst::error_code(bst::errc::permission_denied, bst::generic_category())));
             userdata_is_home = true;
         }
@@ -501,15 +502,16 @@ gnc_filepath_init(gboolean create)
             if (!gnc_validate_directory(gnc_userdata_home, create))
                 throw (bfs::filesystem_error(
                     std::string(_("Directory doesn't exist: "))
-                    + userdata_home.c_str(), userdata_home,
+                    + userdata_home.string(), userdata_home,
                     bst::error_code(bst::errc::permission_denied, bst::generic_category())));
             gnc_userdata_home_from_env = true;
         }
         catch (const bfs::filesystem_error& ex)
         {
+            auto path_string = userdata_home.string();
             g_warning("%s (from environment variable 'GNC_DATA_HOME') is not a suitable directory for the user data."
             "Trying the default instead.\nThe failure is\n%s",
-            gnc_userdata_home.c_str(), ex.what());
+            path_string.c_str(), ex.what());
         }
     }
 

commit 48365a923d9743eb9b15f2f1fe16f75e5a82172c
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Aug 27 17:32:21 2017 -0700

    Remove set target property on no-longer-extant gncmod-utility-reports target.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 75e7ee9..1d0890a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -808,7 +808,7 @@ SET_TARGET_PROPERTIES(gnc-core-utils gnc-module gnc-backend-sql gnc-backend-xml-
 )
 
 IF (WIN32)
-  SET_TARGET_PROPERTIES(gncmod-backend-xml gncmod-stylesheets gncmod-utility-reports PROPERTIES
+  SET_TARGET_PROPERTIES(gncmod-backend-xml gncmod-stylesheets PROPERTIES
     LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
   )
 ENDIF()

commit 1d4dc42a3f16efd7de574aa595bbd189ffb5ee60
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Aug 27 17:31:37 2017 -0700

    Fix poor error message on missing guile and make it fatal.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 515d08e..75e7ee9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -270,7 +270,7 @@ ELSE()
   # look for guile 1.8
   GNC_PKG_CHECK_MODULES (GUILE1 guile-1.8>=1.8.8 QUIET)
   IF (NOT GUILE1_FOUND)
-    MESSAGE (SEND_ERROR "Neither guile 1.8 nor guile 2.0 where find. Please set PKG_CONFIG_PATH one of these is found.")
+    MESSAGE (FATAL_ERROR "Neither guile 1.8 nor guile 2.0 were found GnuCash can't run without one of them. Ensure that one is installed and can be found with pgk-config.")
   ENDIF(NOT GUILE1_FOUND)
 
   SET(HAVE_GUILE1 TRUE)

commit e798d6bd250c7523e9e146b1dd3c6a88399de925
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Aug 27 17:27:58 2017 -0700

    Remove references to special HTMLHELP directory.
    
    In Mingw64 build we put the Html Help Workshop files in the
    appropriate mingw directories.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5457eb6..515d08e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -85,7 +85,6 @@ SET(GNC_DBD_DIR ${CMAKE_PREFIX_PATH}/lib/dbd CACHE PATH "specify location of lib
 SET(PKGLIBDIR ${CMAKE_INSTALL_PREFIX}/lib/gnucash)
 SET(TEST_MYSQL_URL "" CACHE STRING "MySQL database URL for testing")
 SET(TEST_PGSQL_URL "" CACHE STRING "PgSQL database URL for testing")
-SET(HTMLHELP_DIR ${CMAKE_PREFIX_PATH}/hh CACHE PATH "Specify location of Win32 HTMLHELP library")
 
 SET(DATADIR_BUILD    ${CMAKE_BINARY_DIR}/${DATADIRNAME})
 SET(LIBDIR_BUILD     ${CMAKE_BINARY_DIR}/lib)
@@ -236,9 +235,9 @@ FIND_PATH (REGEX_INCLUDE_PATH NAMES regex.h
 		  PATHS /usr/include /opt/gnome/include)
 FIND_LIBRARY (REGEX_LIBRARY NAMES regex)
 IF (WIN32)
-  message(STATUS "Looking for htmlhelp.h and htmlhelp.a in ${HTMLHELP_DIR}")
-  FIND_PATH (HTMLHELP_INCLUDE_PATH NAMES htmlhelp.h HINTS ${HTMLHELP_DIR}/include)
-  FIND_LIBRARY (HTMLHELP_LIBRARY htmlhelp HINTS ${HTMLHELP_DIR}/lib)
+  message(STATUS "Looking for htmlhelp.h and htmlhelp.a")
+  FIND_PATH (HTMLHELP_INCLUDE_PATH NAMES htmlhelp.h)
+  FIND_LIBRARY (HTMLHELP_LIBRARY htmlhelp)
 ENDIF (WIN32)
 
 # ############################################################

commit d02ce3afb1d1f8b8caa7d3c4def324b33053147b
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Aug 27 17:21:37 2017 -0700

    Fix type mismatch (ptr & int) in comparison.

diff --git a/borrowed/libc/strfmon.c b/borrowed/libc/strfmon.c
index f6a665f..d5ce44f 100644
--- a/borrowed/libc/strfmon.c
+++ b/borrowed/libc/strfmon.c
@@ -414,7 +414,7 @@ __setup_vars(int flags, char *cs_precedes, char *sep_by_space,
                 *cs_precedes = lc->n_cs_precedes;
                 *sep_by_space = lc->n_sep_by_space;
                 *sign_posn = (flags & PARENTH_POSN) ? 0 : lc->n_sign_posn;
-                *signstr = (lc->negative_sign == '\0') ? "-"
+                *signstr = (lc->negative_sign == NULL) ? "-"
                     : lc->negative_sign;
         } else {
                 *cs_precedes = lc->p_cs_precedes;

commit e2386253ca167c99b127b4d50f06e52cae09362b
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Aug 27 17:17:43 2017 -0700

    Move Win32 additions to engine_SOURCES to before first use.
    
    It doesn't do anything where it is.

diff --git a/libgnucash/engine/CMakeLists.txt b/libgnucash/engine/CMakeLists.txt
index 041ef20..a3cd35b 100644
--- a/libgnucash/engine/CMakeLists.txt
+++ b/libgnucash/engine/CMakeLists.txt
@@ -206,6 +206,14 @@ SET (engine_SOURCES
   qof-string-cache.cpp
 )
 
+IF (WIN32)
+  ADD_DEFINITIONS (-DOS_WIN32)
+  SET (engine_SOURCES ${engine_SOURCES}
+  qof-win32.cpp
+  ../../borrowed/libc/strptime.c
+  )
+ENDIF (WIN32)
+
 # Add dependency on config.h
 SET_SOURCE_FILES_PROPERTIES (${engine_SOURCES} PROPERTIES OBJECT_DEPENDS ${CONFIG_H})
 
@@ -270,13 +278,6 @@ SET (engine_SCHEME_1
     engine-utilities.scm
     gnc-numeric.scm
 )
-IF (WIN32)
-  ADD_DEFINITIONS (-DOS_WIN32)
-  SET (engine_SOURCES ${engine_SOURCES}
-  qof-win32.cpp
-  ../../borrowed/libc/strptime.c
-  )
-ENDIF (WIN32)
 
 SET(BACKEND_DEPENDS gncmod-backend-xml)
 IF (WITH_SQL)



Summary of changes:
 CMakeLists.txt                               | 11 +++++------
 borrowed/libc/strfmon.c                      |  2 +-
 libgnucash/core-utils/gnc-filepath-utils.cpp | 12 +++++++-----
 libgnucash/engine/CMakeLists.txt             | 15 ++++++++-------
 4 files changed, 21 insertions(+), 19 deletions(-)



More information about the gnucash-changes mailing list