diff --git a/CMakeLists.txt b/CMakeLists.txt index 54e72a9bc0..5b3544bacd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -868,7 +868,7 @@ configure_file( add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) -set(_MODULES gnc-core-utils gnc-module gnc-backend-xml-utils gnucash-guile) +set(_MODULES gnc-core-utils gnc-engine gnc-module gnc-backend-xml-utils gnucash-guile) if (WITH_SQL) list(APPEND _MODULES gnc-backend-sql) diff --git a/bindings/guile/CMakeLists.txt b/bindings/guile/CMakeLists.txt index a4ece15461..ced12f94d1 100644 --- a/bindings/guile/CMakeLists.txt +++ b/bindings/guile/CMakeLists.txt @@ -10,7 +10,7 @@ gnc_add_swig_guile_command (swig-core-utils-guile-c ) # Command to generate the swig-engine.c wrapper file -gnc_swig_extract_header_files (gncmod-engine ENGINE_HEADERS) +gnc_swig_extract_header_files (gnc-engine ENGINE_HEADERS) gnc_add_swig_guile_command (swig-engine-c SWIG_ENGINE_C swig-engine.c ${CMAKE_SOURCE_DIR}/bindings/engine.i @@ -66,7 +66,7 @@ target_link_libraries(gnucash-guile ${GUILE_LDFLAGS} PRIVATE gnc-core-utils - gncmod-engine + gnc-engine gnc-module ${GLIB2_LDFLAGS}) @@ -111,7 +111,7 @@ endif(WITH_SQL) set(GUILE_DEPENDS ${BACKEND_DEPENDS} - gncmod-engine + gnc-engine gnucash-guile) diff --git a/bindings/guile/test/CMakeLists.txt b/bindings/guile/test/CMakeLists.txt index 5467de1226..17be2b82c2 100644 --- a/bindings/guile/test/CMakeLists.txt +++ b/bindings/guile/test/CMakeLists.txt @@ -15,7 +15,7 @@ set(ENGINE_TEST_INCLUDE_DIRS ) set(ENGINE_TEST_LIBS - gncmod-engine + gnc-engine gncmod-test-engine test-core gnucash-guile @@ -80,7 +80,7 @@ if (HAVE_SRFI64) gnc_add_scheme_test_targets (scm-test-with-srfi64 "${scm_tests_with_srfi64_SOURCES}" "tests" - "${GUILE_DEPENDS};scm-test-engine-extras;scm-srfi64-extras;gncmod-engine" + "${GUILE_DEPENDS};scm-test-engine-extras;scm-srfi64-extras;gnc-engine" FALSE ) diff --git a/bindings/guile/test/test-scm-query.cpp b/bindings/guile/test/test-scm-query.cpp index 90f0926237..d4b3bc8cf9 100644 --- a/bindings/guile/test/test-scm-query.cpp +++ b/bindings/guile/test/test-scm-query.cpp @@ -84,8 +84,7 @@ run_tests (void) static void main_helper (void *closure, int argc, char **argv) { - gnc_module_system_init (); - gnc_module_load("gnucash/engine", 0); + gnc_engine_init (0, NULL); xaccLogDisable (); diff --git a/bindings/python/CMakeLists.txt b/bindings/python/CMakeLists.txt index 3a66467258..79775f28e2 100644 --- a/bindings/python/CMakeLists.txt +++ b/bindings/python/CMakeLists.txt @@ -76,7 +76,7 @@ if(WITH_PYTHON) add_library(gnucash_core_c MODULE ${SWIG_GNUCASH_CORE_C}) target_include_directories(gnucash_core_c PRIVATE ${gnucash_core_c_INCLUDE_DIRS}) - target_link_libraries(gnucash_core_c gncmod-app-utils gncmod-engine gnc-module ${GLIB_LIBS} ${PYTHON_LIBRARIES}) + target_link_libraries(gnucash_core_c gncmod-app-utils gnc-engine gnc-module ${GLIB_LIBS} ${PYTHON_LIBRARIES}) set_target_properties(gnucash_core_c PROPERTIES PREFIX "_") target_compile_options(gnucash_core_c PRIVATE -Wno-implicit -Wno-missing-prototypes -Wno-declaration-after-statement -Wno-missing-declarations) if (HAVE_STRINGOP_TRUNCATION) @@ -84,7 +84,7 @@ if(WITH_PYTHON) endif() add_executable(sqlite3test EXCLUDE_FROM_ALL sqlite3test.c ${SWIG_GNUCASH_CORE_C}) - target_link_libraries(sqlite3test gncmod-app-utils gncmod-engine gnc-module ${GLIB_LIBS} ${PYTHON_LIBRARIES}) + target_link_libraries(sqlite3test gncmod-app-utils gnc-engine gnc-module ${GLIB_LIBS} ${PYTHON_LIBRARIES}) target_include_directories(sqlite3test PRIVATE ${gnucash_core_c_INCLUDE_DIRS}) target_compile_options(sqlite3test PRIVATE -Wno-implicit -Wno-missing-prototypes -Wno-declaration-after-statement -Wno-missing-declarations) if (HAVE_STRINGOP_TRUNCATION) diff --git a/common/test-core/CMakeLists.txt b/common/test-core/CMakeLists.txt index 34fde1e7e1..dc05fb7d20 100644 --- a/common/test-core/CMakeLists.txt +++ b/common/test-core/CMakeLists.txt @@ -22,7 +22,7 @@ set_dist_list(test_core_DIST ${test_core_SOURCES} ${test_core_noinst_HEADERS} CM unittest-support.i unittest-support.scm) add_library(test-core STATIC ${test_core_SOURCES} ${test_core_noinst_HEADERS}) -target_link_libraries(test-core gncmod-engine ${GLIB2_LDFLAGS}) +target_link_libraries(test-core gnc-engine ${GLIB2_LDFLAGS}) if (UNIX) target_compile_options(test-core PRIVATE -fPIC) endif() diff --git a/gnucash/CMakeLists.txt b/gnucash/CMakeLists.txt index 875f89dad4..3d70de63de 100644 --- a/gnucash/CMakeLists.txt +++ b/gnucash/CMakeLists.txt @@ -52,7 +52,7 @@ endif (BUILDING_FROM_VCS) target_link_libraries (gnucash gncmod-ledger-core gnc-gnome gncmod-gnome-utils gncmod-app-utils - gncmod-engine gnc-module gnc-core-utils gncmod-report gnucash-guile + gnc-engine gnc-module gnc-core-utils gncmod-report gnucash-guile PkgConfig::GTK3 ${GUILE_LDFLAGS} ${GLIB2_LDFLAGS} ${GTK_MAC_LDFLAGS} ) diff --git a/gnucash/gnome-search/gncmod-gnome-search.c b/gnucash/gnome-search/gncmod-gnome-search.c index afdf4d48ba..ad5829fc70 100644 --- a/gnucash/gnome-search/gncmod-gnome-search.c +++ b/gnucash/gnome-search/gncmod-gnome-search.c @@ -60,12 +60,6 @@ libgncmod_gnome_search_gnc_module_description(void) int libgncmod_gnome_search_gnc_module_init(int refcount) { - /* load the engine (we depend on it) */ - if (!gnc_module_load("gnucash/engine", 0)) - { - return FALSE; - } - if (!gnc_module_load("gnucash/gnome-utils", 0)) { return FALSE; diff --git a/gnucash/gnome-utils/CMakeLists.txt b/gnucash/gnome-utils/CMakeLists.txt index b5d97e14cd..7ceb5c93cf 100644 --- a/gnucash/gnome-utils/CMakeLists.txt +++ b/gnucash/gnome-utils/CMakeLists.txt @@ -206,7 +206,7 @@ add_library (gncmod-gnome-utils target_link_libraries(gncmod-gnome-utils gncmod-app-utils - gncmod-engine + gnc-engine gnc-backend-xml-utils gnucash-guile PkgConfig::GTK3 diff --git a/gnucash/gnome-utils/gncmod-gnome-utils.c b/gnucash/gnome-utils/gncmod-gnome-utils.c index ced36ae49f..a063b0dc03 100644 --- a/gnucash/gnome-utils/gncmod-gnome-utils.c +++ b/gnucash/gnome-utils/gncmod-gnome-utils.c @@ -73,12 +73,6 @@ extern SCM scm_init_sw_gnome_utils_module(void); int libgncmod_gnome_utils_gnc_module_init(int refcount) { - /* load the engine (we depend on it) */ - if (!gnc_module_load("gnucash/engine", 0)) - { - return FALSE; - } - if (!gnc_module_load("gnucash/app-utils", 0)) { return FALSE; diff --git a/gnucash/gnome-utils/test/CMakeLists.txt b/gnucash/gnome-utils/test/CMakeLists.txt index 385a07ecfa..509777b33e 100644 --- a/gnucash/gnome-utils/test/CMakeLists.txt +++ b/gnucash/gnome-utils/test/CMakeLists.txt @@ -33,7 +33,7 @@ set(GUILE_DEPENDS gncmod-test-engine gncmod-app-utils gnc-core-utils - gncmod-engine + gnc-engine ) gnc_add_scheme_test_targets(scm-test-load-gnome-utils-module diff --git a/gnucash/gnome/CMakeLists.txt b/gnucash/gnome/CMakeLists.txt index e6a62c9a75..c8e319e45f 100644 --- a/gnucash/gnome/CMakeLists.txt +++ b/gnucash/gnome/CMakeLists.txt @@ -144,7 +144,7 @@ target_link_libraries(gnc-gnome gncmod-register-gnome gncmod-register-core gncmod-gnome-utils - gncmod-engine + gnc-engine gnucash-guile ${Boost_LIBRARIES} PkgConfig::GTK3 diff --git a/gnucash/gnucash-bin.c b/gnucash/gnucash-bin.c index f9b0614a31..b77bf35147 100644 --- a/gnucash/gnucash-bin.c +++ b/gnucash/gnucash-bin.c @@ -487,7 +487,6 @@ load_gnucash_modules() gboolean optional; } modules[] = { - { "gnucash/engine", 0, FALSE }, { "gnucash/app-utils", 0, FALSE }, { "gnucash/gnome-utils", 0, FALSE }, { "gnucash/gnome-search", 0, FALSE }, @@ -518,15 +517,6 @@ load_gnucash_modules() gnc_module_load(modules[i].name, modules[i].version); DEBUG("Loading module %s finished", modules[i].name); } - if (!gnc_engine_is_initialized()) - { - /* On Windows this check used to fail anyway, see - * https://lists.gnucash.org/pipermail/gnucash-devel/2006-September/018529.html - * but more recently it seems to work as expected - * again. 2006-12-20, cstim. */ - g_warning("GnuCash engine failed to initialize. Exiting.\n"); - exit(1); - } } static void @@ -900,6 +890,7 @@ main(int argc, char ** argv) g_print("\n\n%s\n", userdata_migration_msg); gnc_log_init(); + gnc_engine_init (0, NULL); /* Write some locale details to the log to simplify debugging */ PINFO ("System locale returned %s", sys_locale ? sys_locale : "(null)"); diff --git a/gnucash/html/CMakeLists.txt b/gnucash/html/CMakeLists.txt index 13e4a7c5d1..885357eaa0 100644 --- a/gnucash/html/CMakeLists.txt +++ b/gnucash/html/CMakeLists.txt @@ -54,7 +54,7 @@ add_library (gncmod-html ${html_HEADERS} ) -target_link_libraries(gncmod-html gncmod-engine gnc-module gncmod-gnome-utils +target_link_libraries(gncmod-html gnc-engine gnc-module gncmod-gnome-utils PkgConfig::GTK3 PkgConfig::WEBKIT ${GUILE_LDFLAGS}) target_compile_definitions(gncmod-html PRIVATE -DG_LOG_DOMAIN=\"gnc.html\") diff --git a/gnucash/html/gncmod-html.c b/gnucash/html/gncmod-html.c index afd01486b0..8a4d08277e 100644 --- a/gnucash/html/gncmod-html.c +++ b/gnucash/html/gncmod-html.c @@ -73,12 +73,6 @@ extern SCM scm_init_sw_gnc_html_module( void ); int libgncmod_html_gnc_module_init( int refcount ) { - /* load the engine (we depend on it) */ - if ( !gnc_module_load( "gnucash/engine", 0 ) ) - { - return FALSE; - } - if ( !gnc_module_load( "gnucash/app-utils", 0 ) ) { return FALSE; diff --git a/gnucash/import-export/CMakeLists.txt b/gnucash/import-export/CMakeLists.txt index 4138898787..cddad29940 100644 --- a/gnucash/import-export/CMakeLists.txt +++ b/gnucash/import-export/CMakeLists.txt @@ -51,7 +51,7 @@ add_library (gncmod-generic-import ${generic_import_noinst_HEADERS} ) -target_link_libraries(gncmod-generic-import gncmod-gnome-utils gncmod-engine PkgConfig::GTK3 ${GLIB2_LDFLAGS}) +target_link_libraries(gncmod-generic-import gncmod-gnome-utils gnc-engine PkgConfig::GTK3 ${GLIB2_LDFLAGS}) target_compile_definitions (gncmod-generic-import PRIVATE -DG_LOG_DOMAIN=\"gnc.import\") diff --git a/gnucash/import-export/aqb/CMakeLists.txt b/gnucash/import-export/aqb/CMakeLists.txt index 74cc2d327c..81c71cab43 100644 --- a/gnucash/import-export/aqb/CMakeLists.txt +++ b/gnucash/import-export/aqb/CMakeLists.txt @@ -56,7 +56,7 @@ if(WITH_AQBANKING) target_link_libraries(gncmod-aqbanking gnc-gnome gncmod-gnome-utils gncmod-generic-import gncmod-register-core - gncmod-register-gnome gncmod-ledger-core gncmod-engine gwengui-gtk3 + gncmod-register-gnome gncmod-ledger-core gnc-engine gwengui-gtk3 ${AQB_EXPORT_SYMBOLS} ${AQBANKING_LDFLAGS} ${GWENHYWFAR_LDFLAGS} ${GNOME_LDFLAGS} ${AQB_LIBSTDCXX}) diff --git a/gnucash/import-export/aqb/gncmod-aqbanking.c b/gnucash/import-export/aqb/gncmod-aqbanking.c index 7901eddca5..4f678891f8 100644 --- a/gnucash/import-export/aqb/gncmod-aqbanking.c +++ b/gnucash/import-export/aqb/gncmod-aqbanking.c @@ -62,8 +62,7 @@ gint libgncmod_aqbanking_gnc_module_init(gint refcount) { /* Load modules we depend on */ - if (!gnc_module_load("gnucash/engine", 0) - || !gnc_module_load("gnucash/app-utils", 0) + if (!gnc_module_load("gnucash/app-utils", 0) || !gnc_module_load("gnucash/gnome-utils", 0) || !gnc_module_load("gnucash/import-export", 0)) { diff --git a/gnucash/import-export/aqb/test/CMakeLists.txt b/gnucash/import-export/aqb/test/CMakeLists.txt index 651eb11705..30ad13014a 100644 --- a/gnucash/import-export/aqb/test/CMakeLists.txt +++ b/gnucash/import-export/aqb/test/CMakeLists.txt @@ -22,7 +22,7 @@ set(test_aqb_INCLUDE_DIRS set(test_aqb_LIBS gncmod-aqbanking gncmod-generic-import gnc-gnome gncmod-gnome-utils gncmod-ledger-core gncmod-app-utils - gncmod-backend-xml-utils gncmod-engine gnc-core-utils gnc-module + gncmod-backend-xml-utils gnc-engine gnc-core-utils gnc-module ${GLIB2_LDFLAGS} ) diff --git a/gnucash/import-export/bi-import/CMakeLists.txt b/gnucash/import-export/bi-import/CMakeLists.txt index 071f70ee30..1ec36809a6 100644 --- a/gnucash/import-export/bi-import/CMakeLists.txt +++ b/gnucash/import-export/bi-import/CMakeLists.txt @@ -22,7 +22,7 @@ target_link_libraries(gncmod-bi-import gncmod-gnome-utils gncmod-gnome-search gncmod-app-utils - gncmod-engine + gnc-engine gnc-core-utils gnc-module gnc-gnome diff --git a/gnucash/import-export/bi-import/gncmod-bi-import.c b/gnucash/import-export/bi-import/gncmod-bi-import.c index aaa5cbdacc..1aa7632076 100644 --- a/gnucash/import-export/bi-import/gncmod-bi-import.c +++ b/gnucash/import-export/bi-import/gncmod-bi-import.c @@ -73,10 +73,6 @@ libgncmod_bi_import_gnc_module_init (int refcount) { return FALSE; } - if (!gnc_module_load ("gnucash/engine", 0)) - { - return FALSE; - } if (refcount == 0) { diff --git a/gnucash/import-export/csv-exp/CMakeLists.txt b/gnucash/import-export/csv-exp/CMakeLists.txt index 4f47338f72..8351e7a240 100644 --- a/gnucash/import-export/csv-exp/CMakeLists.txt +++ b/gnucash/import-export/csv-exp/CMakeLists.txt @@ -18,7 +18,7 @@ set(csv_export_noinst_HEADERS add_library(gncmod-csv-export ${csv_export_noinst_HEADERS} ${csv_export_SOURCES}) -target_link_libraries(gncmod-csv-export gncmod-register-gnome gncmod-register-core gncmod-ledger-core gncmod-engine +target_link_libraries(gncmod-csv-export gncmod-register-gnome gncmod-register-core gncmod-ledger-core gnc-engine gnc-module gncmod-gnome-utils gnc-gnome gncmod-app-utils gnc-core-utils) target_compile_definitions(gncmod-csv-export PRIVATE -DG_LOG_DOMAIN=\"gnc.export.csv\") diff --git a/gnucash/import-export/csv-exp/gncmod-csv-export.c b/gnucash/import-export/csv-exp/gncmod-csv-export.c index 99292d8530..7a2dca9805 100644 --- a/gnucash/import-export/csv-exp/gncmod-csv-export.c +++ b/gnucash/import-export/csv-exp/gncmod-csv-export.c @@ -59,10 +59,6 @@ libgncmod_csv_export_gnc_module_description(void) int libgncmod_csv_export_gnc_module_init(int refcount) { - if (!gnc_module_load("gnucash/engine", 0)) - { - return FALSE; - } if (!gnc_module_load("gnucash/app-utils", 0)) { return FALSE; diff --git a/gnucash/import-export/csv-imp/CMakeLists.txt b/gnucash/import-export/csv-imp/CMakeLists.txt index c31aa80f84..e600912ed3 100644 --- a/gnucash/import-export/csv-imp/CMakeLists.txt +++ b/gnucash/import-export/csv-imp/CMakeLists.txt @@ -69,7 +69,7 @@ target_link_libraries( gncmod-generic-import gncmod-gnome-utils gncmod-app-utils - gncmod-engine + gnc-engine gnc-core-utils gnc-module) diff --git a/gnucash/import-export/csv-imp/gncmod-csv-import.c b/gnucash/import-export/csv-imp/gncmod-csv-import.c index 4fc1eea1b4..52be6ea526 100644 --- a/gnucash/import-export/csv-imp/gncmod-csv-import.c +++ b/gnucash/import-export/csv-imp/gncmod-csv-import.c @@ -59,10 +59,6 @@ libgncmod_csv_import_gnc_module_description(void) int libgncmod_csv_import_gnc_module_init(int refcount) { - if (!gnc_module_load("gnucash/engine", 0)) - { - return FALSE; - } if (!gnc_module_load("gnucash/app-utils", 0)) { return FALSE; diff --git a/gnucash/import-export/csv-imp/test/CMakeLists.txt b/gnucash/import-export/csv-imp/test/CMakeLists.txt index 52b11cbcba..113fb6e582 100644 --- a/gnucash/import-export/csv-imp/test/CMakeLists.txt +++ b/gnucash/import-export/csv-imp/test/CMakeLists.txt @@ -7,7 +7,7 @@ set(CSV_IMP_TEST_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/lib ${GLIB2_INCLUDE_DIRS} ) -set(CSV_IMP_TEST_LIBS gncmod-csv-import gncmod-engine test-core) +set(CSV_IMP_TEST_LIBS gncmod-csv-import gnc-engine test-core) # This test does not run in Win32 if (NOT WIN32) diff --git a/gnucash/import-export/customer-import/CMakeLists.txt b/gnucash/import-export/customer-import/CMakeLists.txt index 197ffc5443..3380d4ddf4 100644 --- a/gnucash/import-export/customer-import/CMakeLists.txt +++ b/gnucash/import-export/customer-import/CMakeLists.txt @@ -18,7 +18,7 @@ set(customer_import_noinst_HEADERS add_library(gncmod-customer-import ${customer_import_SOURCES} ${customer_import_noinst_HEADERS}) target_link_libraries(gncmod-customer-import gnc-gnome gncmod-gnome-utils gncmod-app-utils - gncmod-engine gnc-core-utils gnc-module ${GLIB2_LDFLAGS}) + gnc-engine gnc-core-utils gnc-module ${GLIB2_LDFLAGS}) target_include_directories(gncmod-customer-import PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} diff --git a/gnucash/import-export/customer-import/gncmod-customer-import.c b/gnucash/import-export/customer-import/gncmod-customer-import.c index c127c1b8f8..945d8e08fb 100644 --- a/gnucash/import-export/customer-import/gncmod-customer-import.c +++ b/gnucash/import-export/customer-import/gncmod-customer-import.c @@ -73,13 +73,6 @@ libgncmod_customer_import_gnc_module_init (int refcount) { return FALSE; } - //if (!gnc_module_load ("gnucash/business-core", 0)) { - // return FALSE; - //} - if (!gnc_module_load ("gnucash/engine", 0)) - { - return FALSE; - } if (refcount == 0) { diff --git a/gnucash/import-export/gncmod-generic-import.c b/gnucash/import-export/gncmod-generic-import.c index a347659205..7a68554adf 100644 --- a/gnucash/import-export/gncmod-generic-import.c +++ b/gnucash/import-export/gncmod-generic-import.c @@ -58,10 +58,6 @@ libgncmod_generic_import_gnc_module_description(void) int libgncmod_generic_import_gnc_module_init(int refcount) { - if (!gnc_module_load("gnucash/engine", 0)) - { - return FALSE; - } if (!gnc_module_load("gnucash/app-utils", 0)) { return FALSE; diff --git a/gnucash/import-export/log-replay/CMakeLists.txt b/gnucash/import-export/log-replay/CMakeLists.txt index b7bb5d7a68..8e6d71a1af 100644 --- a/gnucash/import-export/log-replay/CMakeLists.txt +++ b/gnucash/import-export/log-replay/CMakeLists.txt @@ -15,7 +15,7 @@ set(log_replay_noinst_HEADERS add_library(gncmod-log-replay ${log_replay_SOURCES} ${log_replay_noinst_HEADERS}) -target_link_libraries(gncmod-log-replay gncmod-gnome-utils gncmod-app-utils gncmod-engine +target_link_libraries(gncmod-log-replay gncmod-gnome-utils gncmod-app-utils gnc-engine gnc-core-utils gnc-module PkgConfig::GTK3) target_compile_definitions(gncmod-log-replay PRIVATE -DG_LOG_DOMAIN=\"gnc.import.log-replay\") diff --git a/gnucash/import-export/log-replay/gncmod-log-replay.c b/gnucash/import-export/log-replay/gncmod-log-replay.c index 4ace776552..a27729d17e 100644 --- a/gnucash/import-export/log-replay/gncmod-log-replay.c +++ b/gnucash/import-export/log-replay/gncmod-log-replay.c @@ -61,10 +61,6 @@ libgncmod_log_replay_gnc_module_description(void) int libgncmod_log_replay_gnc_module_init(int refcount) { - if (!gnc_module_load("gnucash/engine", 0)) - { - return FALSE; - } if (!gnc_module_load("gnucash/app-utils", 0)) { return FALSE; diff --git a/gnucash/import-export/ofx/CMakeLists.txt b/gnucash/import-export/ofx/CMakeLists.txt index 2d968e735b..c850b12936 100644 --- a/gnucash/import-export/ofx/CMakeLists.txt +++ b/gnucash/import-export/ofx/CMakeLists.txt @@ -20,7 +20,7 @@ set(ofx_UI gnc-plugin-ofx-ui.xml) if (WITH_OFX) add_library(gncmod-ofx ${ofx_SOURCES} ${ofx_noinst_HEADERS}) - target_link_libraries(gncmod-ofx gncmod-generic-import gncmod-engine gncmod-app-utils gnc-core-utils + target_link_libraries(gncmod-ofx gncmod-generic-import gnc-engine gncmod-app-utils gnc-core-utils gncmod-gnome-utils ${LIBOFX_LDFLAGS}) target_compile_definitions(gncmod-ofx PRIVATE -DG_LOG_DOMAIN=\"gnc.import.ofx\") diff --git a/gnucash/import-export/ofx/gncmod-ofx-import.c b/gnucash/import-export/ofx/gncmod-ofx-import.c index 4a758c36b5..897b30bc6d 100644 --- a/gnucash/import-export/ofx/gncmod-ofx-import.c +++ b/gnucash/import-export/ofx/gncmod-ofx-import.c @@ -61,10 +61,6 @@ libgncmod_ofx_gnc_module_description(void) int libgncmod_ofx_gnc_module_init(int refcount) { - if (!gnc_module_load("gnucash/engine", 0)) - { - return FALSE; - } if (!gnc_module_load("gnucash/app-utils", 0)) { return FALSE; diff --git a/gnucash/import-export/qif-imp/gncmod-qif-import.c b/gnucash/import-export/qif-imp/gncmod-qif-import.c index 8b0b414bd4..188a0ed97a 100644 --- a/gnucash/import-export/qif-imp/gncmod-qif-import.c +++ b/gnucash/import-export/qif-imp/gncmod-qif-import.c @@ -62,11 +62,6 @@ libgncmod_qif_import_gnc_module_description(void) int libgncmod_qif_import_gnc_module_init(int refcount) { - if (!gnc_module_load("gnucash/engine", 0)) - { - return FALSE; - } - if (!gnc_module_load("gnucash/app-utils", 0)) { return FALSE; diff --git a/gnucash/register/ledger-core/CMakeLists.txt b/gnucash/register/ledger-core/CMakeLists.txt index 0b671cee28..057ec60c04 100644 --- a/gnucash/register/ledger-core/CMakeLists.txt +++ b/gnucash/register/ledger-core/CMakeLists.txt @@ -45,7 +45,7 @@ set_source_files_properties (${ledger_core_SOURCES} PROPERTIES OBJECT_DEPENDS ${ add_library (gncmod-ledger-core ${ledger_core_SOURCES} ${ledger_core_HEADERS}) target_link_libraries(gncmod-ledger-core gncmod-register-gnome gncmod-register-core gncmod-gnome-utils - gncmod-engine gnc-core-utils PkgConfig::GTK3) + gnc-engine gnc-core-utils PkgConfig::GTK3) target_compile_definitions (gncmod-ledger-core PRIVATE -DG_LOG_DOMAIN=\"gnc.register.ledger\") diff --git a/gnucash/register/ledger-core/gncmod-ledger-core.c b/gnucash/register/ledger-core/gncmod-ledger-core.c index 543e7edc8d..c085759189 100644 --- a/gnucash/register/ledger-core/gncmod-ledger-core.c +++ b/gnucash/register/ledger-core/gncmod-ledger-core.c @@ -56,11 +56,6 @@ libgncmod_ledger_core_gnc_module_description(void) int libgncmod_ledger_core_gnc_module_init(int refcount) { - if (!gnc_module_load("gnucash/engine", 0)) - { - return FALSE; - } - if (!gnc_module_load("gnucash/register/register-core", 0)) { return FALSE; diff --git a/gnucash/register/register-core/gncmod-register-core.c b/gnucash/register/register-core/gncmod-register-core.c index 10ec59dc0e..08f4fcd368 100644 --- a/gnucash/register/register-core/gncmod-register-core.c +++ b/gnucash/register/register-core/gncmod-register-core.c @@ -57,11 +57,6 @@ libgncmod_register_core_gnc_module_description(void) int libgncmod_register_core_gnc_module_init(int refcount) { - if (!gnc_module_load("gnucash/engine", 0)) - { - return FALSE; - } - /* FIXME. We need this for the wide-character functions. * When fixing, get rid of gnome-utils includes, too. */ if (!gnc_module_load("gnucash/gnome-utils", 0)) diff --git a/gnucash/report/gncmod-report.c b/gnucash/report/gncmod-report.c index b4830cdbf3..c6cf26f72a 100644 --- a/gnucash/report/gncmod-report.c +++ b/gnucash/report/gncmod-report.c @@ -60,12 +60,6 @@ extern SCM scm_init_sw_report_module(void); int libgncmod_report_gnc_module_init(int refcount) { - /* load the engine (we depend on it) */ - if (!gnc_module_load("gnucash/engine", 0)) - { - return FALSE; - } - if (!gnc_module_load("gnucash/app-utils", 0)) { return FALSE; diff --git a/libgnucash/app-utils/CMakeLists.txt b/libgnucash/app-utils/CMakeLists.txt index 9e47e3a102..7f1cc09ad1 100644 --- a/libgnucash/app-utils/CMakeLists.txt +++ b/libgnucash/app-utils/CMakeLists.txt @@ -75,7 +75,7 @@ set_source_files_properties (${app_utils_SOURCES} PROPERTIES OBJECT_DEPENDS ${CO set(app_utils_ALL_SOURCES ${app_utils_SOURCES} ${app_utils_HEADERS} ${app_utils_noinst_HEADERS}) set(app_utils_ALL_LIBRARIES - gncmod-engine + gnc-engine gnc-module gnucash-guile ${GIO_LDFLAGS} diff --git a/libgnucash/app-utils/gncmod-app-utils.c b/libgnucash/app-utils/gncmod-app-utils.c index 12dcc68963..012516f391 100644 --- a/libgnucash/app-utils/gncmod-app-utils.c +++ b/libgnucash/app-utils/gncmod-app-utils.c @@ -80,12 +80,6 @@ extern SCM scm_init_sw_app_utils_module(void); int libgncmod_app_utils_gnc_module_init(int refcount) { - /* load the engine (we depend on it) */ - if (!gnc_module_load("gnucash/engine", 0)) - { - return FALSE; - } - scm_init_sw_app_utils_module(); /* publish swig bindings */ /* load the scheme code */ diff --git a/libgnucash/app-utils/test/test-print-queries.cpp b/libgnucash/app-utils/test/test-print-queries.cpp index b541deb171..783a2a5401 100644 --- a/libgnucash/app-utils/test/test-print-queries.cpp +++ b/libgnucash/app-utils/test/test-print-queries.cpp @@ -77,7 +77,6 @@ main_helper (void *closure, int argc, char **argv) { int count = 50; - gnc_module_load("gnucash/engine", 0); gnc_module_load("gnucash/app-utils", 0); if (argc > 1) diff --git a/libgnucash/app-utils/test/test-scm-query-string.cpp b/libgnucash/app-utils/test/test-scm-query-string.cpp index 7772875bb8..9b685c8c72 100644 --- a/libgnucash/app-utils/test/test-scm-query-string.cpp +++ b/libgnucash/app-utils/test/test-scm-query-string.cpp @@ -113,7 +113,6 @@ static void main_helper (void *closure, int argc, char **argv) { gnc_module_system_init (); - gnc_module_load("gnucash/engine", 0); gnc_module_load("gnucash/app-utils", 0); xaccLogDisable (); diff --git a/libgnucash/backend/dbi/CMakeLists.txt b/libgnucash/backend/dbi/CMakeLists.txt index ff7d760c72..c50a05e5c0 100644 --- a/libgnucash/backend/dbi/CMakeLists.txt +++ b/libgnucash/backend/dbi/CMakeLists.txt @@ -33,7 +33,7 @@ if (WITH_SQL) if(MINGW64) set(WINSOCK_LIB "-lws2_32") endif(MINGW64) - target_link_libraries(gncmod-backend-dbi gnc-backend-sql gncmod-engine ${GTK2_LDFLAGS} ${Boost_REGEX_LIBRARY} ${LIBDBI_LIBRARY} ${WINSOCK_LIB}) + target_link_libraries(gncmod-backend-dbi gnc-backend-sql gnc-engine ${GTK2_LDFLAGS} ${Boost_REGEX_LIBRARY} ${LIBDBI_LIBRARY} ${WINSOCK_LIB}) target_compile_definitions(gncmod-backend-dbi PRIVATE -DG_LOG_DOMAIN=\"gnc.backend.dbi\") diff --git a/libgnucash/backend/dbi/test/CMakeLists.txt b/libgnucash/backend/dbi/test/CMakeLists.txt index 1df34f05aa..f6c0b96ac1 100644 --- a/libgnucash/backend/dbi/test/CMakeLists.txt +++ b/libgnucash/backend/dbi/test/CMakeLists.txt @@ -10,7 +10,7 @@ set(BACKEND_DBI_TEST_INCLUDE_DIRS ${LIBDBI_INCLUDE_PATH} ${GLIB2_INCLUDE_DIRS} ) -set(BACKEND_DBI_TEST_LIBS gnc-backend-sql gncmod-engine gncmod-test-engine test-core ${Boost_REGEX_LIBRARY} ${LIBDBI_LIBRARY}) +set(BACKEND_DBI_TEST_LIBS gnc-backend-sql gnc-engine gncmod-test-engine test-core ${Boost_REGEX_LIBRARY} ${LIBDBI_LIBRARY}) set(test_dbi_backend_SOURCES test-backend-dbi.cpp diff --git a/libgnucash/backend/sql/CMakeLists.txt b/libgnucash/backend/sql/CMakeLists.txt index ebd2a83246..af4f4ace2b 100644 --- a/libgnucash/backend/sql/CMakeLists.txt +++ b/libgnucash/backend/sql/CMakeLists.txt @@ -69,7 +69,7 @@ if(WITH_SQL) ${backend_sql_noinst_HEADERS} ) - target_link_libraries(gnc-backend-sql gncmod-engine) + target_link_libraries(gnc-backend-sql gnc-engine) target_compile_definitions (gnc-backend-sql PRIVATE -DG_LOG_DOMAIN=\"gnc.backend.sql\") diff --git a/libgnucash/backend/sql/test/CMakeLists.txt b/libgnucash/backend/sql/test/CMakeLists.txt index d0c06ccfcc..465bbdc0b6 100644 --- a/libgnucash/backend/sql/test/CMakeLists.txt +++ b/libgnucash/backend/sql/test/CMakeLists.txt @@ -9,7 +9,7 @@ set(BACKEND_SQL_TEST_INCLUDE_DIRS set(test_backend_sql_SOURCES test-sqlbe.cpp utest-gnc-backend-sql.cpp) -set(BACKEND_SQL_TEST_LIBS gnc-backend-sql gncmod-engine test-core) +set(BACKEND_SQL_TEST_LIBS gnc-backend-sql gnc-engine test-core) set_dist_list(test_backend_sql_DIST ${test_backend_sql_SOURCES} CMakeLists.txt test-column-types.cpp) diff --git a/libgnucash/backend/xml/CMakeLists.txt b/libgnucash/backend/xml/CMakeLists.txt index 3c5c96dd3c..04e75e6ef8 100644 --- a/libgnucash/backend/xml/CMakeLists.txt +++ b/libgnucash/backend/xml/CMakeLists.txt @@ -82,7 +82,7 @@ add_library (gnc-backend-xml-utils ${backend_xml_utils_noinst_HEADERS} ) -target_link_libraries(gnc-backend-xml-utils gncmod-engine ${LIBXML2_LDFLAGS} ${ZLIB_LDFLAGS}) +target_link_libraries(gnc-backend-xml-utils gnc-engine ${LIBXML2_LDFLAGS} ${ZLIB_LDFLAGS}) target_include_directories (gnc-backend-xml-utils PUBLIC ${LIBXML2_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR} @@ -104,7 +104,7 @@ set(libgncmod_backend_xml_SOURCES gnc-backend-xml.cpp) set_source_files_properties (${libgncmod_backend_xml_SOURCES} PROPERTIES OBJECT_DEPENDS ${CONFIG_H}) add_library(gncmod-backend-xml MODULE ${libgncmod_backend_xml_SOURCES}) -target_link_libraries(gncmod-backend-xml gnc-backend-xml-utils gncmod-engine +target_link_libraries(gncmod-backend-xml gnc-backend-xml-utils gnc-engine gnc-core-utils ${LIBXML2_LDFLAGS} ${GLIB2_LDFLAGS} ${ZLIB_LIBRARY}) target_compile_definitions (gncmod-backend-xml PRIVATE -DG_LOG_DOMAIN=\"gnc.backend.xml\" -DU_SHOW_CPLUSPLUS_API=0) @@ -128,6 +128,6 @@ install(TARGETS gncmod-backend-xml # Special normal (non-MODULE) library for cutecash only add_library(gncmod-backend-xml-utils ${libgncmod_backend_xml_SOURCES}) -target_link_libraries(gncmod-backend-xml-utils gnc-backend-xml-utils gncmod-engine +target_link_libraries(gncmod-backend-xml-utils gnc-backend-xml-utils gnc-engine gnc-core-utils ${LIBXML2_LDFLAGS} ${GLIB2_LDFLAGS} ${ZLIB_LIBRARY}) target_compile_definitions (gncmod-backend-xml-utils PRIVATE -DG_LOG_DOMAIN=\"gnc.backend.xml\" -DU_SHOW_CPLUSPLUS_API=0) diff --git a/libgnucash/backend/xml/gncmod-backend-xml.cpp b/libgnucash/backend/xml/gncmod-backend-xml.cpp index ddf6d1e21a..5743fa31de 100644 --- a/libgnucash/backend/xml/gncmod-backend-xml.cpp +++ b/libgnucash/backend/xml/gncmod-backend-xml.cpp @@ -62,9 +62,6 @@ extern "C" int libgncmod_backend_file_gnc_module_init (int refcount) { - engine = gnc_module_load ("gnucash/engine", 0); - if (!engine) return FALSE; - return TRUE; } diff --git a/libgnucash/backend/xml/test/CMakeLists.txt b/libgnucash/backend/xml/test/CMakeLists.txt index 17cadb33f3..264a19d799 100644 --- a/libgnucash/backend/xml/test/CMakeLists.txt +++ b/libgnucash/backend/xml/test/CMakeLists.txt @@ -14,7 +14,7 @@ set(XML_TEST_INCLUDE_DIRS ) -set(XML_TEST_LIBS gncmod-engine gncmod-test-engine test-core ${LIBXML2_LDFLAGS} -lz) +set(XML_TEST_LIBS gnc-engine gncmod-test-engine test-core ${LIBXML2_LDFLAGS} -lz) function(add_xml_test _TARGET _SOURCE_FILES) gnc_add_test(${_TARGET} "${_SOURCE_FILES}" XML_TEST_INCLUDE_DIRS XML_TEST_LIBS ${ARGN}) diff --git a/libgnucash/backend/xml/test/test-load-example-account.cpp b/libgnucash/backend/xml/test/test-load-example-account.cpp index 16d356ae41..352b79084e 100644 --- a/libgnucash/backend/xml/test/test-load-example-account.cpp +++ b/libgnucash/backend/xml/test/test-load-example-account.cpp @@ -78,8 +78,7 @@ main (int argc, char** argv) location = "../../../../data/accounts/C"; } - gnc_module_system_init (); - gnc_module_load ("gnucash/engine", 0); + gnc_engine_init (0, NULL); if ((ea_dir = g_dir_open (location, 0, NULL)) == NULL) { diff --git a/libgnucash/engine/CMakeLists.txt b/libgnucash/engine/CMakeLists.txt index 1208f01931..923d7db6ca 100644 --- a/libgnucash/engine/CMakeLists.txt +++ b/libgnucash/engine/CMakeLists.txt @@ -155,7 +155,6 @@ set (engine_SOURCES gnc-session.c gnc-timezone.cpp gnc-uri-utils.c - gncmod-engine.c engine-helpers.c guid.cpp policy.c @@ -200,22 +199,22 @@ set_source_files_properties (${engine_SOURCES} PROPERTIES OBJECT_DEPENDS ${CONFI # Add dependency on iso-4217-currencies.c set_source_files_properties (gnc-commodity.c PROPERTIES OBJECT_DEPENDS "${ISO_4217_C};${CONFIG_H}") -add_library (gncmod-engine +add_library (gnc-engine ${engine_SOURCES} ${engine_HEADERS} ${engine_noinst_HEADERS} ) -target_sources(gncmod-engine +target_sources(gnc-engine PRIVATE $<$:qof-win32.cpp> $<$:${CMAKE_SOURCE_DIR}/borrowed/libc/strptime.c> ) # Add dependency on iso-4217-currencies.c -add_dependencies (gncmod-engine iso-4217-c) +add_dependencies (gnc-engine iso-4217-c) -target_link_libraries(gncmod-engine +target_link_libraries(gnc-engine gnc-core-utils gnc-module ${Boost_DATE_TIME_LIBRARIES} @@ -227,9 +226,9 @@ target_link_libraries(gncmod-engine ${GOBJECT_LDFLAGS} $<$:bcrypt.lib>) -target_compile_definitions (gncmod-engine PRIVATE -DG_LOG_DOMAIN=\"gnc.engine\") +target_compile_definitions (gnc-engine PRIVATE -DG_LOG_DOMAIN=\"gnc.engine\") -target_include_directories (gncmod-engine +target_include_directories (gnc-engine PRIVATE ${CMAKE_CURRENT_BINARY_DIR} # for iso-4217-currencies.c PUBLIC @@ -243,12 +242,12 @@ target_include_directories (gncmod-engine ) if (APPLE) - set_target_properties (gncmod-engine PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/gnucash") + set_target_properties (gnc-engine PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}") endif() -install(TARGETS gncmod-engine - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/gnucash - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/gnucash +install(TARGETS gnc-engine + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) install(FILES ${engine_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gnucash) diff --git a/libgnucash/engine/gncmod-engine.c b/libgnucash/engine/gncmod-engine.c deleted file mode 100644 index d7edaacb37..0000000000 --- a/libgnucash/engine/gncmod-engine.c +++ /dev/null @@ -1,73 +0,0 @@ -/********************************************************************* - * gnc-mod-engine.c - * module definition/initialization for the Engine module - * - * Copyright (c) 2001 Linux Developers Group, Inc. - *********************************************************************/ -/********************************************************************\ - * This program is free software; you can redistribute it and/or * - * modify it under the terms of the GNU General Public License as * - * published by the Free Software Foundation; either version 2 of * - * the License, or (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License* - * along with this program; if not, contact: * - * * - * Free Software Foundation Voice: +1-617-542-5942 * - * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 * - * Boston, MA 02110-1301, USA gnu@gnu.org * - * * -\********************************************************************/ - - -#include -#include - -#include "gnc-engine.h" -#include "gnc-module-api.h" - -GNC_MODULE_API_DECL(libgncmod_engine) - -/* version of the gnc module system interface we require */ -int libgncmod_engine_gnc_module_system_interface = 0; - -/* module versioning uses libtool semantics. */ -int libgncmod_engine_gnc_module_current = 0; -int libgncmod_engine_gnc_module_revision = 0; -int libgncmod_engine_gnc_module_age = 0; - - -char * -libgncmod_engine_gnc_module_path(void) -{ - return g_strdup("gnucash/engine"); -} - -char * -libgncmod_engine_gnc_module_description(void) -{ - return g_strdup("The GnuCash accounting engine"); -} - -int -libgncmod_engine_gnc_module_init(int refcount) -{ - if (refcount == 0) - { - /* initialize the engine on the first load */ - gnc_engine_init(0, NULL); - } - - return TRUE; -} - -int -libgncmod_engine_gnc_module_end(int refcount) -{ - return TRUE; -} diff --git a/libgnucash/engine/test/CMakeLists.txt b/libgnucash/engine/test/CMakeLists.txt index 2aa68d317f..0b5cc7c255 100644 --- a/libgnucash/engine/test/CMakeLists.txt +++ b/libgnucash/engine/test/CMakeLists.txt @@ -9,7 +9,7 @@ set(ENGINE_TEST_INCLUDE_DIRS ${GLIB2_INCLUDE_DIRS} ) -set(ENGINE_TEST_LIBS gncmod-engine gncmod-test-engine test-core ${LIBXML2_LDFLAGS} -lm) +set(ENGINE_TEST_LIBS gnc-engine gncmod-test-engine test-core ${LIBXML2_LDFLAGS} -lm) macro(add_engine_test _TARGET _SOURCE_FILES) gnc_add_test(${_TARGET} "${_SOURCE_FILES}" ENGINE_TEST_INCLUDE_DIRS ENGINE_TEST_LIBS) @@ -89,7 +89,7 @@ add_engine_test(test-numeric "${test_numeric_SOURCES}") set(MODULEPATH ${CMAKE_SOURCE_DIR}/libgnucash/engine) set(gtest_old_engine_LIBS - gncmod-engine + gnc-engine ${GLIB2_LDFLAGS} ${Boost_LIBRARIES} gtest) diff --git a/libgnucash/gnc-module/example/gncmod-example.c b/libgnucash/gnc-module/example/gncmod-example.c index 7d1e555991..38513d1c8b 100644 --- a/libgnucash/gnc-module/example/gncmod-example.c +++ b/libgnucash/gnc-module/example/gncmod-example.c @@ -65,10 +65,6 @@ libgncmod_example_gnc_module_description (void) int libgncmod_example_gnc_module_init (int refcount) { - if (!gnc_module_load ("gnucash/engine", 0)) { - return FALSE; - } - if (refcount == 0) { /* this is the first time the module is loaded */ diff --git a/po/POTFILES.in b/po/POTFILES.in index 015b1288c7..cf4dae0177 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -644,7 +644,6 @@ libgnucash/engine/gnc-int128.cpp libgnucash/engine/gncInvoice.c libgnucash/engine/gncJob.c libgnucash/engine/gnc-lot.c -libgnucash/engine/gncmod-engine.c libgnucash/engine/gnc-numeric.cpp libgnucash/engine/gncOrder.c libgnucash/engine/gncOwner.c