From: <ste...@us...> - 2012-10-09 09:52:40
|
Revision: 3039 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=3039&view=rev Author: stef145g Date: 2012-10-09 09:52:29 +0000 (Tue, 09 Oct 2012) Log Message: ----------- Adding a universal files update utility for Windows to allow the easy collection of mmex.exe support files. Added Paths: ----------- trunk/mmex/setup/win/update_mmex_build_files.bat Property Changed: ---------------- trunk/ Property changes on: trunk ___________________________________________________________________ Added: svn:ignore + mmex_release Added: trunk/mmex/setup/win/update_mmex_build_files.bat =================================================================== --- trunk/mmex/setup/win/update_mmex_build_files.bat (rev 0) +++ trunk/mmex/setup/win/update_mmex_build_files.bat 2012-10-09 09:52:29 UTC (rev 3039) @@ -0,0 +1,188 @@ +REM -------------------------------------------------------------------------- +REM Author : Stefano Giorgio - Copyright (C) 2012 +REM Purpose: To allow the easy collection of support files required for +REM - testing in the msw-vc-2010e environment. +REM - providing a release version for others. +REM +REM Revision of last commit: $Revision$ +REM Author of last commit: $Author$ +REM -------------------------------------------------------------------------- +@echo off +cls + +REM To create a release configuration, create the following directories: +REM - trunk\mmex_release +REM - trunk\mmex_release\mmex_0.9.9.2_win32_portable +REM - When creating actual releases, rename the directory to the correct version number + +set mmex_release_destination=..\..\..\mmex_release\mmex_0.9.9.2_win32_portable +set mmex_build_location=..\..\build\msw-vc-2010e +set mmex_release_type=vc-static-28u +set mmex_release_source=%mmex_build_location%\%mmex_release_type% + +@echo ------------------------------------------------------------------------ +@echo MMEX Support Files Updating Facility +@echo. +@set display_message=Update Build Configurations. +if not exist %mmex_release_destination% goto display_config_continue +@set display_message=Update Build and Release Configurations. +@echo. +@echo Release Configuration Setup: +@echo Source: %mmex_release_source% +@echo Destination: %mmex_release_destination% +:display_config_continue +@echo. +@echo %display_message% +@echo ------------------------------------------------------------------------ +pause +cls + +REM Starts with Unicode Release +goto update_u + +REM The routine: UpdateFiles +REM will collect the files for all configurations to the specified location. +:UpdateFiles +set mmex_build_dir=%mmex_build_location%\%current_location% +if not exist %mmex_build_dir% goto skip_this_location +@echo ------------------------------------------------------------------------ +@echo Updating MMEX Files for: %mmex_build_dir% +@echo. +@echo Copying Root files for: %current_location% +@echo ------------------------------------------------------------------------ +copy "..\..\doc\*.txt" %mmex_build_dir% +copy "..\..\readme.*" %mmex_build_dir% +@echo. +@echo ------------------------------------------------------------------------ +@echo Copying Help files for: %current_location% +@echo ------------------------------------------------------------------------ +REM del "%mmex_build_dir%\help\*.* /S" +REM create the directories if they don't exist +if not exist %mmex_build_dir%\help mkdir %mmex_build_dir%\help +copy "..\..\doc\help\*.*" "%mmex_build_dir%\help" +@echo. +if not exist %mmex_build_dir%\help\french mkdir %mmex_build_dir%\help\french +copy "..\..\doc\help\french\*.*" "%mmex_build_dir%\help\french" +@echo. +if not exist %mmex_build_dir%\help\german mkdir %mmex_build_dir%\help\german +copy "..\..\doc\help\german\*.*" "%mmex_build_dir%\help\german" +@echo. +if not exist %mmex_build_dir%\help\italian mkdir %mmex_build_dir%\help\italian +copy "..\..\doc\help\italian\*.*" "%mmex_build_dir%\help\italian" +@echo. +if not exist %mmex_build_dir%\help\polish mkdir %mmex_build_dir%\help\polish +copy "..\..\doc\help\polish\*.*" "%mmex_build_dir%\help\polish" +@echo. +if not exist %mmex_build_dir%\help\russian mkdir %mmex_build_dir%\help\russian +copy "..\..\doc\help\russian\*.*" "%mmex_build_dir%\help\russian" +@echo. +if not exist %mmex_build_dir%\help\spanish mkdir %mmex_build_dir%\help\spanish +copy "..\..\doc\help\spanish\*.*" "%mmex_build_dir%\help\spanish" +@echo. +@echo ------------------------------------------------------------------------ +@echo Copying Language files for: %current_location% +@echo ------------------------------------------------------------------------ +if not exist %mmex_build_dir%\po mkdir %mmex_build_dir%\po +copy "..\..\po\*.mo" "%mmex_build_dir%\po" +@echo. +@echo ------------------------------------------------------------------------ +@echo Copying Resources files for: %current_location% +@echo ------------------------------------------------------------------------ +if not exist %mmex_build_dir%\res mkdir %mmex_build_dir%\res +copy "..\..\resources\currency_seed.csv" "%mmex_build_dir%\res" +copy "..\..\resources\kaching.wav" "%mmex_build_dir%\res" +copy "..\..\resources\mmex.ico" "%mmex_build_dir%\res" +@echo ------------------------------------------------------------------------ +pause +cls + +:skip_this_location +REM Work out where to go next. +if %location%==vc-static-u goto update_ud +if %location%==vc-static-ud goto update_28u +if %location%==vc-static-28u goto update_28ud +if %location%==vc-static-28ud goto update_29u +if %location%==vc-static-29u goto update_29ud +if %location%==vc-static-29ud goto update_release +goto ScriptEnd +REM -------------------------------------------------------------------------- + +REM Unicode Release +:update_u +set location=vc-static-u +set current_location=%location% +goto UpdateFiles + +REM Unicode Debug +:update_ud +set location=vc-static-ud +set current_location=%location% +goto UpdateFiles + +REM wx28 Unicode Release +:update_28u +set location=vc-static-28u +set current_location=%location% +goto UpdateFiles + +REM wx28 Unicode Debug +:update_28ud +set location=vc-static-28ud +set current_location=%location% +goto UpdateFiles + +REM wx29 Unicode Release +:update_29u +set location=vc-static-29u +set current_location=%location% +goto UpdateFiles + +REM wx29 Unicode Debug +:update_29ud +set location=vc-static-29ud +set current_location=%location% +goto UpdateFiles + +REM Update the release +:update_release +REM Update the exe files first +if not exist %mmex_release_destination% goto ScriptEnd +@echo -------------------------------------------------------------------- +@echo Updating MMEX Release +@echo. +@echo To Destination: %mmex_release_destination% +@echo From Source: %mmex_release_source% +@echo -------------------------------------------------------------------- +pause +cls + +@echo -------------------------------------------------------------------- +@echo Updating MMEX Release +@echo. +@echo To Destination: %mmex_release_destination% +@echo From Source: %mmex_release_source% +@echo. +@echo -------------------------------------------------------------------- +REM Set up the release location. Create locations if not exist +set location=MoneyManagerEX +set mmex_release_dir=%mmex_release_destination%\%location% +if not exist %mmex_release_dir% mkdir %mmex_release_dir% + +set mmex_release_bin_dir=%mmex_release_dir%\bin +if not exist %mmex_release_bin_dir% mkdir %mmex_release_bin_dir% + +REM set up the executable files +copy %mmex_release_source%\mmex.exe %mmex_release_bin_dir% +copy "C:\Windows\sysWOW64\msvcp100.dll" %mmex_release_bin_dir% +copy "C:\Windows\sysWOW64\msvcr100.dll" %mmex_release_bin_dir% + +REM Set up the support files before ending process. +set mmex_build_location=%mmex_release_destination% +set current_location=%location% +goto UpdateFiles + +:ScriptEnd +@echo. +@echo Update completed. +@echo ------------------------------------------------------------------------ +pause Property changes on: trunk/mmex/setup/win/update_mmex_build_files.bat ___________________________________________________________________ Added: svn:keywords + Author Revision This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2013-06-14 02:47:15
|
Revision: 4073 http://sourceforge.net/p/moneymanagerex/code/4073 Author: guanlisheng Date: 2013-06-14 02:47:10 +0000 (Fri, 14 Jun 2013) Log Message: ----------- new source file struct Added Paths: ----------- trunk/INSTALL.TXT trunk/Makefile.in trunk/README.RU trunk/README.TXT trunk/aclocal.m4 trunk/auxd/ trunk/bootstrap trunk/bootstrap.bat trunk/build/ trunk/configure trunk/configure.ac trunk/doc/ trunk/graphics/ trunk/lib/ trunk/m4/ trunk/misc/ trunk/po/ trunk/resources/ trunk/setup/ trunk/src/ trunk/tools/ Removed Paths: ------------- trunk/mmex/ Copied: trunk/INSTALL.TXT (from rev 4071, trunk/mmex/INSTALL.TXT) =================================================================== --- trunk/INSTALL.TXT (rev 0) +++ trunk/INSTALL.TXT 2013-06-14 02:47:10 UTC (rev 4073) @@ -0,0 +1,81 @@ +------------------------------------------------------------------------------- +1. Required Libraries +------------------------------------------------------------------------------- +- wxWidgets >= 2.9.4 (www.wxwidgets.org) +- GNU GetText + +Prepackaged Libraries +- sqlite3 +- wxSqlite3 +- UnitTest++ + +------------------------------------------------------------------------------- +2. Building Money Manager Ex +------------------------------------------------------------------------------- +2.1. Microsoft Windows: read build\msw\readme.txt for build instructions. + +2.2. Building on Linux + +2.2.1. Pre-built Binaries + If you don't want to build MMEX, you can download prebuilt binary packages + for UBUNTU and SUSE. + +2.2.2. Building from Source. + + GENERIC INSTRUCTIONS + + 1. Download & install the latest wxWidgets for wxGTK: + tar xfv wxGTK-2.8.11.tar.gz + cd wxGTK-2.8.11 + ./configure --disable-shared --enable-unicode + sudo make install + + 2. cd trunk/mmex + mkdir release + cd release + ../configure + make + make check + + mkdir share + mkdir share/doc/ + mkdir share/doc/mmex + mkdir share/mmex + mkdir share/mmex/res + ln -s ../../../../doc/help share/doc/mmex/ + ln -s ../../../../doc/version.txt share/doc/mmex/ + ln -s ../../../../doc/contrib.txt share/doc/mmex/ + ln -s ../../../../doc/license.txt share/doc/mmex/ + + ln -s ../../../po share/mmex/ + ln -s ../../../../resources/mmex.ico share/mmex/res/ + ln -s ../../../../resources/splash.png share/mmex/res/ + + sudo make install + /usr/bin/mmex & + + UBUNTU SPECIFIC INSTRUCTIONS + + With apt-get support, it is a little easier to do this in Ubuntu. + + 1. [Optional] Install Dev Tools by the following: sudo apt-get install build-essential + + 2. Install these packages + libwxgtk2.X-X, + libwxgtk2.X-X-dev + + 3. Execute step #2 from generic instructions. + +------------------------------------------------------------------------------- +3. REGENERATING AUTOMAKE FILES +------------------------------------------------------------------------------- +If for some reason, you need to regenerate AutoMake files. +This might be required if you are adding new source files to MMEX +or if bakefile's script(s) has modified. + +1. Download and install latest version of Bakefile, www.bakefile.org. +2. cd trunk/mmex + chmod a+rx bootstrap + ./bootstrap + +------------------------------------------------------------------------------- Copied: trunk/Makefile.in (from rev 4071, trunk/mmex/Makefile.in) =================================================================== --- trunk/Makefile.in (rev 0) +++ trunk/Makefile.in 2013-06-14 02:47:10 UTC (rev 4073) @@ -0,0 +1,676 @@ +# ========================================================================= +# This makefile was generated by +# Bakefile 0.2.9 (http://www.bakefile.org) +# Do not modify, all changes will be overwritten! +# ========================================================================= + + +@MAKE_SET@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +datarootdir = @datarootdir@ +INSTALL = @INSTALL@ +LIBEXT = @LIBEXT@ +LIBPREFIX = @LIBPREFIX@ +EXEEXT = @EXEEXT@ +SETFILE = @SETFILE@ +PIC_FLAG = @PIC_FLAG@ +STRIP = @STRIP@ +NM = @NM@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_DIR = @INSTALL_DIR@ +BK_DEPS = @BK_DEPS@ +srcdir = @srcdir@ +bindir = @bindir@ +datadir = @datadir@ +LIBS = @LIBS@ +LDFLAGS_GUI = @LDFLAGS_GUI@ +AR = @AR@ +AROPTIONS = @AROPTIONS@ +RANLIB = @RANLIB@ +CC = @CC@ +CXX = @CXX@ +CFLAGS = @CFLAGS@ +CXXFLAGS = @CXXFLAGS@ +CPPFLAGS = @CPPFLAGS@ +LDFLAGS = @LDFLAGS@ +WX_CXXFLAGS = @WX_CXXFLAGS@ +WX_LIBS = @WX_LIBS@ +WX_RESCOMP = @WX_RESCOMP@ + +### Variables: ### + +DESTDIR = +WXSQLITE_CXXFLAGS = -DNOPCH -DSQLITE_HAS_CODEC -DWXSQLITE3_HAVE_CODEC \ + -DWXSQLITE3_HAVE_METADATA -I$(srcdir)/lib/sqlite -I$(srcdir)/lib/wxsqlite \ + $(PIC_FLAG) $(WX_CXXFLAGS) $(CPPFLAGS) $(CXXFLAGS) +WXSQLITE_OBJECTS = \ + wxsqlite_wxsqlite3.o +SQLITE_CFLAGS = -DSQLITE_CORE -DSQLITE_HAS_CODEC \ + -DSQLITE_ENABLE_COLUMN_METADATA $(PIC_FLAG) $(CPPFLAGS) $(CFLAGS) +SQLITE_OBJECTS = \ + sqlite_sqlite3secure.o +LUA_CFLAGS = $(PIC_FLAG) $(CPPFLAGS) $(CFLAGS) +LUA_OBJECTS = \ + lua_lapi.o \ + lua_lauxlib.o \ + lua_lbaselib.o \ + lua_lbitlib.o \ + lua_lcode.o \ + lua_lcorolib.o \ + lua_lctype.o \ + lua_ldblib.o \ + lua_ldebug.o \ + lua_ldo.o \ + lua_ldump.o \ + lua_lfunc.o \ + lua_lgc.o \ + lua_linit.o \ + lua_liolib.o \ + lua_llex.o \ + lua_lmathlib.o \ + lua_lmem.o \ + lua_loadlib.o \ + lua_lobject.o \ + lua_lopcodes.o \ + lua_loslib.o \ + lua_lparser.o \ + lua_lstate.o \ + lua_lstring.o \ + lua_lstrlib.o \ + lua_ltable.o \ + lua_ltablib.o \ + lua_ltm.o \ + lua_lua.o \ + lua_luac.o \ + lua_lundump.o \ + lua_lvm.o \ + lua_lzio.o +MMEX_CXXFLAGS = -I$(srcdir)/lib/sqlite -I$(srcdir)/lib/wxsqlite \ + -I$(srcdir)/lib/lua/src -I$(srcdir)/lib -DNOPCH $(WX_CXXFLAGS) $(PIC_FLAG) \ + $(CPPFLAGS) $(CXXFLAGS) +MMEX_OBJECTS = \ + mmex_aboutdialog.o \ + mmex_appstartdialog.o \ + mmex_assetdialog.o \ + mmex_assetspanel.o \ + mmex_billsdepositsdialog.o \ + mmex_billsdepositspanel.o \ + mmex_budgetentrydialog.o \ + mmex_budgetingpanel.o \ + mmex_budgetyeardialog.o \ + mmex_budgetyearentrydialog.o \ + mmex_categdialog.o \ + mmex_chart.o \ + mmex_constants.o \ + mmex_currencydialog.o \ + mmex_customreportdialog.o \ + mmex_customreportdisplay.o \ + mmex_customreportindex.o \ + mmex_dbwrapper.o \ + mmex_fileviewerdialog.o \ + mmex_filtertransdialog.o \ + mmex_htmlbuilder.o \ + mmex_lua_interface.o \ + mmex_maincurrencydialog.o \ + mmex_mmCurrencyFormatter.o \ + mmex_mmOption.o \ + mmex_mmaccount.o \ + mmex_mmcategory.o \ + mmex_mmcheckingpanel.o \ + mmex_mmcoredb.o \ + mmex_mmcurrency.o \ + mmex_mmex.o \ + mmex_mmex_settings.o \ + mmex_mmgraphgenerator.o \ + mmex_mmgraphincexpensesmonth.o \ + mmex_mmgraphpie.o \ + mmex_mmgraphtopcategories.o \ + mmex_mmhelppanel.o \ + mmex_mmhomepagepanel.o \ + mmex_mmpayee.o \ + mmex_mmreportspanel.o \ + mmex_mmtransaction.o \ + mmex_newacctdialog.o \ + mmex_optionsdialog.o \ + mmex_paths.o \ + mmex_payeedialog.o \ + mmex_qif_export.o \ + mmex_qif_import.o \ + mmex_recentfiles.o \ + mmex_relocatecategorydialog.o \ + mmex_relocatepayeedialog.o \ + mmex_splitdetailsdialog.o \ + mmex_splittransactionsdialog.o \ + mmex_stockdialog.o \ + mmex_stockspanel.o \ + mmex_transdialog.o \ + mmex_univcsvdialog.o \ + mmex_util.o \ + mmex_budget.o \ + mmex_budgetcategorysummary.o \ + mmex_budgetingperf.o \ + mmex_cashflow.o \ + mmex_categexp.o \ + mmex_categovertimeperf.o \ + mmex_incexpenses.o \ + mmex_mmDateRange.o \ + mmex_mmRepeat.o \ + mmex_payee.o \ + mmex_summary.o \ + mmex_summaryassets.o \ + mmex_summarystocks.o \ + mmex_transactions.o \ + mmex_trx_stats.o \ + mmex_account.o \ + mmex_assets.o \ + mmex_budget_table.o \ + mmex_budget_year.o \ + mmex_category.o \ + mmex_currency.o \ + mmex_entry_base.o \ + mmex_payee_table.o \ + mmex_settings.o \ + mmex_splittransaction.o \ + mmex_stocks.o \ + mmex_subcategory.o \ + mmex_transaction.o \ + mmex_transactionbill.o \ + mmex_platfdep.o \ + $(__mmex___win32rc) + +### Conditionally set variables: ### + +@COND_DEPS_TRACKING_0@CCC = $(CC) +@COND_DEPS_TRACKING_1@CCC = $(BK_DEPS) $(CC) +@COND_DEPS_TRACKING_0@CXXC = $(CXX) +@COND_DEPS_TRACKING_1@CXXC = $(BK_DEPS) $(CXX) +@COND_PLATFORM_MAC_0@__mmex___mac_setfilecmd = @true +@COND_PLATFORM_MAC_1@__mmex___mac_setfilecmd = \ +@COND_PLATFORM_MAC_1@ $(SETFILE) -t APPL mmex$(EXEEXT) +COND_PLATFORM_OS2_1___mmex___os2_emxbindcmd = $(NM) mmex$(EXEEXT) | if grep -q \ + pmwin.763 ; then emxbind -ep mmex$(EXEEXT) ; fi +@COND_PLATFORM_OS2_1@__mmex___os2_emxbindcmd = $(COND_PLATFORM_OS2_1___mmex___os2_emxbindcmd) +@COND_PLATFORM_WIN32_1@__mmex___win32rc = mmex_resources_mmex_rc.o + +### Targets: ### + +all: $(LIBPREFIX)wxsqlite$(LIBEXT) $(LIBPREFIX)sqlite$(LIBEXT) $(LIBPREFIX)lua$(LIBEXT) mmex$(EXEEXT) po + +install: install_mmex + $(INSTALL_DIR) $(DESTDIR)$(datadir)/mmex/res + (cd $(srcdir)/resources ; $(INSTALL_DATA) kaching.wav mmex.ico currency_seed.csv $(DESTDIR)$(datadir)/mmex/res) + $(INSTALL_DIR) $(DESTDIR)$(datadir)/mmex/po + (cd $(srcdir)/po ; $(INSTALL_DATA) *.mo $(DESTDIR)$(datadir)/mmex/po) + $(INSTALL_DIR) $(DESTDIR)$(datadir)/doc/mmex + (cd $(srcdir)/doc ; $(INSTALL_DATA) *.txt $(DESTDIR)$(datadir)/doc/mmex) + $(INSTALL_DIR) $(DESTDIR)$(datadir)/doc/mmex/help + (cd $(srcdir)/doc/help ; $(INSTALL_DATA) *.html *.png $(DESTDIR)$(datadir)/doc/mmex/help) + $(INSTALL_DIR) $(DESTDIR)$(datadir)/doc/mmex/help/german + (cd $(srcdir)/doc/help/german ; $(INSTALL_DATA) * $(DESTDIR)$(datadir)/doc/mmex/help/german) + $(INSTALL_DIR) $(DESTDIR)$(datadir)/doc/mmex/help/french + (cd $(srcdir)/doc/help/french ; $(INSTALL_DATA) * $(DESTDIR)$(datadir)/doc/mmex/help/french) + $(INSTALL_DIR) $(DESTDIR)$(datadir)/doc/mmex/help/hungarian + (cd $(srcdir)/doc/help/hungarian ; $(INSTALL_DATA) * $(DESTDIR)$(datadir)/doc/mmex/help/hungarian) + $(INSTALL_DIR) $(DESTDIR)$(datadir)/doc/mmex/help/italian + (cd $(srcdir)/doc/help/italian ; $(INSTALL_DATA) * $(DESTDIR)$(datadir)/doc/mmex/help/italian) + $(INSTALL_DIR) $(DESTDIR)$(datadir)/doc/mmex/help/polish + (cd $(srcdir)/doc/help/polish ; $(INSTALL_DATA) * $(DESTDIR)$(datadir)/doc/mmex/help/polish) + $(INSTALL_DIR) $(DESTDIR)$(datadir)/doc/mmex/help/russian + (cd $(srcdir)/doc/help/russian ; $(INSTALL_DATA) * $(DESTDIR)$(datadir)/doc/mmex/help/russian) + $(INSTALL_DIR) $(DESTDIR)$(datadir)/doc/mmex/help/spanish + (cd $(srcdir)/doc/help/spanish ; $(INSTALL_DATA) * $(DESTDIR)$(datadir)/doc/mmex/help/spanish) + $(INSTALL_DIR) $(DESTDIR)$(datadir)/applications + (cd $(srcdir)/resources ; $(INSTALL_DATA) mmex.desktop $(DESTDIR)$(datadir)/applications) + $(INSTALL_DIR) $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps + (cd $(srcdir)/graphics ; $(INSTALL_DATA) mmex.svg $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps) + $(INSTALL_DIR) $(DESTDIR)$(datadir)/man/man1 + (cd $(srcdir)/doc ; $(INSTALL_DATA) mmex.1.gz $(DESTDIR)$(datadir)/man/man1) + +uninstall: uninstall_mmex + (cd $(DESTDIR)$(datadir)/mmex/res ; rm -f kaching.wav mmex.ico currency_seed.csv) + (cd $(DESTDIR)$(datadir)/mmex/po ; rm -f *.mo) + (cd $(DESTDIR)$(datadir)/doc/mmex ; rm -f *.txt) + (cd $(DESTDIR)$(datadir)/doc/mmex/help ; rm -f *.html *.png) + (cd $(DESTDIR)$(datadir)/doc/mmex/help/german ; rm -f *) + (cd $(DESTDIR)$(datadir)/doc/mmex/help/french ; rm -f *) + (cd $(DESTDIR)$(datadir)/doc/mmex/help/hungarian ; rm -f *) + (cd $(DESTDIR)$(datadir)/doc/mmex/help/italian ; rm -f *) + (cd $(DESTDIR)$(datadir)/doc/mmex/help/polish ; rm -f *) + (cd $(DESTDIR)$(datadir)/doc/mmex/help/russian ; rm -f *) + (cd $(DESTDIR)$(datadir)/doc/mmex/help/spanish ; rm -f *) + (cd $(DESTDIR)$(datadir)/applications ; rm -f mmex.desktop) + (cd $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps ; rm -f mmex.svg) + (cd $(DESTDIR)$(datadir)/man/man1 ; rm -f mmex.1.gz) + +install-strip: install + $(STRIP) $(DESTDIR)$(bindir)/mmex$(EXEEXT) + +clean: + rm -rf ./.deps ./.pch + rm -f ./*.o + rm -f $(LIBPREFIX)wxsqlite$(LIBEXT) + rm -f $(LIBPREFIX)sqlite$(LIBEXT) + rm -f $(LIBPREFIX)lua$(LIBEXT) + rm -f mmex$(EXEEXT) + -(cd $(srcdir)/po && $(MAKE) clean) + -(cd ./src/tests && $(MAKE) clean) + +distclean: clean + rm -f config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile + -(cd $(srcdir)/po && $(MAKE) distclean) + -(cd ./src/tests && $(MAKE) distclean) + +$(LIBPREFIX)wxsqlite$(LIBEXT): $(WXSQLITE_OBJECTS) + rm -f $@ + $(AR) $(AROPTIONS) $@ $(WXSQLITE_OBJECTS) + $(RANLIB) $@ + +$(LIBPREFIX)sqlite$(LIBEXT): $(SQLITE_OBJECTS) + rm -f $@ + $(AR) $(AROPTIONS) $@ $(SQLITE_OBJECTS) + $(RANLIB) $@ + +$(LIBPREFIX)lua$(LIBEXT): $(LUA_OBJECTS) + rm -f $@ + $(AR) $(AROPTIONS) $@ $(LUA_OBJECTS) + $(RANLIB) $@ + +mmex$(EXEEXT): $(MMEX_OBJECTS) $(LIBPREFIX)wxsqlite$(LIBEXT) $(LIBPREFIX)sqlite$(LIBEXT) $(LIBPREFIX)lua$(LIBEXT) $(__mmex___win32rc) + $(CXX) -o $@ $(MMEX_OBJECTS) -L. -L. -L. $(LDFLAGS_GUI) $(LDFLAGS) -lwxsqlite -lsqlite -llua $(WX_LIBS) $(LIBS) + + $(__mmex___mac_setfilecmd) + $(__mmex___os2_emxbindcmd) + +install_mmex: mmex$(EXEEXT) + $(INSTALL_DIR) $(DESTDIR)$(bindir) + $(INSTALL_PROGRAM) mmex$(EXEEXT) $(DESTDIR)$(bindir) + +uninstall_mmex: + rm -f $(DESTDIR)$(bindir)/mmex$(EXEEXT) + +po: + (cd $(srcdir)/po && $(MAKE) all) + +check: + (cd ./src/tests && $(MAKE) check) + +wxsqlite_wxsqlite3.o: $(srcdir)/lib/wxsqlite/wxsqlite3.cpp + $(CXXC) -c -o $@ $(WXSQLITE_CXXFLAGS) $(srcdir)/lib/wxsqlite/wxsqlite3.cpp + +sqlite_sqlite3secure.o: $(srcdir)/lib/sqlite/sqlite3secure.c + $(CCC) -c -o $@ $(SQLITE_CFLAGS) $(srcdir)/lib/sqlite/sqlite3secure.c + +lua_lapi.o: $(srcdir)/lib/lua/src/lapi.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/lapi.c + +lua_lauxlib.o: $(srcdir)/lib/lua/src/lauxlib.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/lauxlib.c + +lua_lbaselib.o: $(srcdir)/lib/lua/src/lbaselib.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/lbaselib.c + +lua_lbitlib.o: $(srcdir)/lib/lua/src/lbitlib.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/lbitlib.c + +lua_lcode.o: $(srcdir)/lib/lua/src/lcode.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/lcode.c + +lua_lcorolib.o: $(srcdir)/lib/lua/src/lcorolib.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/lcorolib.c + +lua_lctype.o: $(srcdir)/lib/lua/src/lctype.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/lctype.c + +lua_ldblib.o: $(srcdir)/lib/lua/src/ldblib.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/ldblib.c + +lua_ldebug.o: $(srcdir)/lib/lua/src/ldebug.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/ldebug.c + +lua_ldo.o: $(srcdir)/lib/lua/src/ldo.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/ldo.c + +lua_ldump.o: $(srcdir)/lib/lua/src/ldump.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/ldump.c + +lua_lfunc.o: $(srcdir)/lib/lua/src/lfunc.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/lfunc.c + +lua_lgc.o: $(srcdir)/lib/lua/src/lgc.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/lgc.c + +lua_linit.o: $(srcdir)/lib/lua/src/linit.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/linit.c + +lua_liolib.o: $(srcdir)/lib/lua/src/liolib.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/liolib.c + +lua_llex.o: $(srcdir)/lib/lua/src/llex.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/llex.c + +lua_lmathlib.o: $(srcdir)/lib/lua/src/lmathlib.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/lmathlib.c + +lua_lmem.o: $(srcdir)/lib/lua/src/lmem.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/lmem.c + +lua_loadlib.o: $(srcdir)/lib/lua/src/loadlib.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/loadlib.c + +lua_lobject.o: $(srcdir)/lib/lua/src/lobject.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/lobject.c + +lua_lopcodes.o: $(srcdir)/lib/lua/src/lopcodes.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/lopcodes.c + +lua_loslib.o: $(srcdir)/lib/lua/src/loslib.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/loslib.c + +lua_lparser.o: $(srcdir)/lib/lua/src/lparser.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/lparser.c + +lua_lstate.o: $(srcdir)/lib/lua/src/lstate.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/lstate.c + +lua_lstring.o: $(srcdir)/lib/lua/src/lstring.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/lstring.c + +lua_lstrlib.o: $(srcdir)/lib/lua/src/lstrlib.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/lstrlib.c + +lua_ltable.o: $(srcdir)/lib/lua/src/ltable.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/ltable.c + +lua_ltablib.o: $(srcdir)/lib/lua/src/ltablib.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/ltablib.c + +lua_ltm.o: $(srcdir)/lib/lua/src/ltm.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/ltm.c + +lua_lua.o: $(srcdir)/lib/lua/src/lua.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/lua.c + +lua_luac.o: $(srcdir)/lib/lua/src/luac.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/luac.c + +lua_lundump.o: $(srcdir)/lib/lua/src/lundump.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/lundump.c + +lua_lvm.o: $(srcdir)/lib/lua/src/lvm.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/lvm.c + +lua_lzio.o: $(srcdir)/lib/lua/src/lzio.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/lzio.c + +mmex_aboutdialog.o: $(srcdir)/src/aboutdialog.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/aboutdialog.cpp + +mmex_appstartdialog.o: $(srcdir)/src/appstartdialog.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/appstartdialog.cpp + +mmex_assetdialog.o: $(srcdir)/src/assetdialog.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/assetdialog.cpp + +mmex_assetspanel.o: $(srcdir)/src/assetspanel.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/assetspanel.cpp + +mmex_billsdepositsdialog.o: $(srcdir)/src/billsdepositsdialog.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/billsdepositsdialog.cpp + +mmex_billsdepositspanel.o: $(srcdir)/src/billsdepositspanel.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/billsdepositspanel.cpp + +mmex_budgetentrydialog.o: $(srcdir)/src/budgetentrydialog.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/budgetentrydialog.cpp + +mmex_budgetingpanel.o: $(srcdir)/src/budgetingpanel.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/budgetingpanel.cpp + +mmex_budgetyeardialog.o: $(srcdir)/src/budgetyeardialog.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/budgetyeardialog.cpp + +mmex_budgetyearentrydialog.o: $(srcdir)/src/budgetyearentrydialog.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/budgetyearentrydialog.cpp + +mmex_categdialog.o: $(srcdir)/src/categdialog.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/categdialog.cpp + +mmex_chart.o: $(srcdir)/src/chart.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/chart.cpp + +mmex_constants.o: $(srcdir)/src/constants.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/constants.cpp + +mmex_currencydialog.o: $(srcdir)/src/currencydialog.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/currencydialog.cpp + +mmex_customreportdialog.o: $(srcdir)/src/customreportdialog.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/customreportdialog.cpp + +mmex_customreportdisplay.o: $(srcdir)/src/customreportdisplay.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/customreportdisplay.cpp + +mmex_customreportindex.o: $(srcdir)/src/customreportindex.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/customreportindex.cpp + +mmex_dbwrapper.o: $(srcdir)/src/dbwrapper.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/dbwrapper.cpp + +mmex_fileviewerdialog.o: $(srcdir)/src/fileviewerdialog.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/fileviewerdialog.cpp + +mmex_filtertransdialog.o: $(srcdir)/src/filtertransdialog.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/filtertransdialog.cpp + +mmex_htmlbuilder.o: $(srcdir)/src/htmlbuilder.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/htmlbuilder.cpp + +mmex_lua_interface.o: $(srcdir)/src/lua_interface.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/lua_interface.cpp + +mmex_maincurrencydialog.o: $(srcdir)/src/maincurrencydialog.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/maincurrencydialog.cpp + +mmex_mmCurrencyFormatter.o: $(srcdir)/src/mmCurrencyFormatter.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/mmCurrencyFormatter.cpp + +mmex_mmOption.o: $(srcdir)/src/mmOption.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/mmOption.cpp + +mmex_mmaccount.o: $(srcdir)/src/mmaccount.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/mmaccount.cpp + +mmex_mmcategory.o: $(srcdir)/src/mmcategory.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/mmcategory.cpp + +mmex_mmcheckingpanel.o: $(srcdir)/src/mmcheckingpanel.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/mmcheckingpanel.cpp + +mmex_mmcoredb.o: $(srcdir)/src/mmcoredb.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/mmcoredb.cpp + +mmex_mmcurrency.o: $(srcdir)/src/mmcurrency.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/mmcurrency.cpp + +mmex_mmex.o: $(srcdir)/src/mmex.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/mmex.cpp + +mmex_mmex_settings.o: $(srcdir)/src/mmex_settings.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/mmex_settings.cpp + +mmex_mmgraphgenerator.o: $(srcdir)/src/mmgraphgenerator.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/mmgraphgenerator.cpp + +mmex_mmgraphincexpensesmonth.o: $(srcdir)/src/mmgraphincexpensesmonth.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/mmgraphincexpensesmonth.cpp + +mmex_mmgraphpie.o: $(srcdir)/src/mmgraphpie.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/mmgraphpie.cpp + +mmex_mmgraphtopcategories.o: $(srcdir)/src/mmgraphtopcategories.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/mmgraphtopcategories.cpp + +mmex_mmhelppanel.o: $(srcdir)/src/mmhelppanel.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/mmhelppanel.cpp + +mmex_mmhomepagepanel.o: $(srcdir)/src/mmhomepagepanel.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/mmhomepagepanel.cpp + +mmex_mmpayee.o: $(srcdir)/src/mmpayee.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/mmpayee.cpp + +mmex_mmreportspanel.o: $(srcdir)/src/mmreportspanel.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/mmreportspanel.cpp + +mmex_mmtransaction.o: $(srcdir)/src/mmtransaction.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/mmtransaction.cpp + +mmex_newacctdialog.o: $(srcdir)/src/newacctdialog.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/newacctdialog.cpp + +mmex_optionsdialog.o: $(srcdir)/src/optionsdialog.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/optionsdialog.cpp + +mmex_paths.o: $(srcdir)/src/paths.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/paths.cpp + +mmex_payeedialog.o: $(srcdir)/src/payeedialog.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/payeedialog.cpp + +mmex_qif_export.o: $(srcdir)/src/qif_export.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/qif_export.cpp + +mmex_qif_import.o: $(srcdir)/src/qif_import.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/qif_import.cpp + +mmex_recentfiles.o: $(srcdir)/src/recentfiles.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/recentfiles.cpp + +mmex_relocatecategorydialog.o: $(srcdir)/src/relocatecategorydialog.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/relocatecategorydialog.cpp + +mmex_relocatepayeedialog.o: $(srcdir)/src/relocatepayeedialog.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/relocatepayeedialog.cpp + +mmex_splitdetailsdialog.o: $(srcdir)/src/splitdetailsdialog.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/splitdetailsdialog.cpp + +mmex_splittransactionsdialog.o: $(srcdir)/src/splittransactionsdialog.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/splittransactionsdialog.cpp + +mmex_stockdialog.o: $(srcdir)/src/stockdialog.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/stockdialog.cpp + +mmex_stockspanel.o: $(srcdir)/src/stockspanel.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/stockspanel.cpp + +mmex_transdialog.o: $(srcdir)/src/transdialog.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/transdialog.cpp + +mmex_univcsvdialog.o: $(srcdir)/src/univcsvdialog.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/univcsvdialog.cpp + +mmex_util.o: $(srcdir)/src/util.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/util.cpp + +mmex_budget.o: $(srcdir)/src/reports/budget.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/reports/budget.cpp + +mmex_budgetcategorysummary.o: $(srcdir)/src/reports/budgetcategorysummary.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/reports/budgetcategorysummary.cpp + +mmex_budgetingperf.o: $(srcdir)/src/reports/budgetingperf.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/reports/budgetingperf.cpp + +mmex_cashflow.o: $(srcdir)/src/reports/cashflow.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/reports/cashflow.cpp + +mmex_categexp.o: $(srcdir)/src/reports/categexp.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/reports/categexp.cpp + +mmex_categovertimeperf.o: $(srcdir)/src/reports/categovertimeperf.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/reports/categovertimeperf.cpp + +mmex_incexpenses.o: $(srcdir)/src/reports/incexpenses.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/reports/incexpenses.cpp + +mmex_mmDateRange.o: $(srcdir)/src/reports/mmDateRange.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/reports/mmDateRange.cpp + +mmex_mmRepeat.o: $(srcdir)/src/reports/mmRepeat.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/reports/mmRepeat.cpp + +mmex_payee.o: $(srcdir)/src/reports/payee.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/reports/payee.cpp + +mmex_summary.o: $(srcdir)/src/reports/summary.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/reports/summary.cpp + +mmex_summaryassets.o: $(srcdir)/src/reports/summaryassets.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/reports/summaryassets.cpp + +mmex_summarystocks.o: $(srcdir)/src/reports/summarystocks.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/reports/summarystocks.cpp + +mmex_transactions.o: $(srcdir)/src/reports/transactions.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/reports/transactions.cpp + +mmex_trx_stats.o: $(srcdir)/src/reports/trx_stats.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/reports/trx_stats.cpp + +mmex_account.o: $(srcdir)/src/db/account.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/db/account.cpp + +mmex_assets.o: $(srcdir)/src/db/assets.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/db/assets.cpp + +mmex_budget_table.o: $(srcdir)/src/db/budget_table.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/db/budget_table.cpp + +mmex_budget_year.o: $(srcdir)/src/db/budget_year.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/db/budget_year.cpp + +mmex_category.o: $(srcdir)/src/db/category.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/db/category.cpp + +mmex_currency.o: $(srcdir)/src/db/currency.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/db/currency.cpp + +mmex_entry_base.o: $(srcdir)/src/db/entry_base.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/db/entry_base.cpp + +mmex_payee_table.o: $(srcdir)/src/db/payee_table.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/db/payee_table.cpp + +mmex_settings.o: $(srcdir)/src/db/settings.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/db/settings.cpp + +mmex_splittransaction.o: $(srcdir)/src/db/splittransaction.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/db/splittransaction.cpp + +mmex_stocks.o: $(srcdir)/src/db/stocks.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/db/stocks.cpp + +mmex_subcategory.o: $(srcdir)/src/db/subcategory.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/db/subcategory.cpp + +mmex_transaction.o: $(srcdir)/src/db/transaction.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/db/transaction.cpp + +mmex_transactionbill.o: $(srcdir)/src/db/transactionbill.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/db/transactionbill.cpp + +mmex_platfdep.o: $(srcdir)/src/unix/platfdep.cpp + $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/unix/platfdep.cpp + +mmex_resources_mmex_rc.o: $(srcdir)/resources/mmex.rc + $(WX_RESCOMP) -i$< -o$@ --include-dir $(srcdir)/lib/sqlite --include-dir $(srcdir)/lib/wxsqlite --include-dir $(srcdir)/lib/lua/src --include-dir $(srcdir)/lib --define NOPCH + + +# Include dependency info, if present: +@IF_GNU_MAKE@-include ./.deps/*.d + +.PHONY: all install uninstall clean distclean install_mmex uninstall_mmex po check Copied: trunk/README.RU (from rev 4071, trunk/mmex/README.RU) =================================================================== --- trunk/README.RU (rev 0) +++ trunk/README.RU 2013-06-14 02:47:10 UTC (rev 4073) @@ -0,0 +1,15 @@ +Money Manager Ex - бесплатная, с открытым исходным кодом, +мультиплатформенная программа для персонального учёта финансов. +Она поможет Вам знать, когда, сколько и на что были потрачены деньги. + +MMEX включает функции, которые 90% пользователей хотят видеть +в программе учёта финансов. Принципы реализации - легковесность, +простота выполнения операций, дружелюбность к пользователю. + +Программа работает на: + +MS Windows: 95, 98, ME, 2000, NT, XP, 7. + Ansi и Юникод сборки; x86, x64, ia64 версии. + +Юниксы: любой Unix с GTK+ 2.0 и выше. +Маки: Mac OS 8.6/9.x (Классик) или Mac OS X 10.x. \ No newline at end of file Copied: trunk/README.TXT (from rev 4071, trunk/mmex/README.TXT) =================================================================== --- trunk/README.TXT (rev 0) +++ trunk/README.TXT 2013-06-14 02:47:10 UTC (rev 4073) @@ -0,0 +1,15 @@ +Money Manager Ex is a free, open-source, cross-platform, easy-to-use personal +finance software. It primarily helps organize one's finances and keeps track +of where, when and how the money goes. + +MMEX includes all the basic features that 90% of users would want to see in a +personal finance application. The design goals are to concentrate on simplicity +and user-friendliness - something one can use everyday. + +Supported platforms: + +MS Windows: 95, 98, ME, 2000, NT, XP, 7. + ANSI and Unicode builds; x86, x64, ia64 versions available. + +Unixes: almost any Unix workstation with GTK+ 2.0 and above. +Mac: Mac OS 8.6/9.x (eg. Classic) or Mac OS X 10.x. \ No newline at end of file Copied: trunk/aclocal.m4 (from rev 4071, trunk/mmex/aclocal.m4) =================================================================== --- trunk/aclocal.m4 (rev 0) +++ trunk/aclocal.m4 2013-06-14 02:47:10 UTC (rev 4073) @@ -0,0 +1,1986 @@ +# generated automatically by aclocal 1.13.1 -*- Autoconf -*- + +# Copyright (C) 1996-2012 Free Software Foundation, Inc. + +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) +AC_DEFUN([AC_BAKEFILE_CREATE_FILE_DLLAR_SH], +[ +dnl ===================== dllar.sh begins here ===================== +dnl (Created by merge-scripts.py from dllar.sh +dnl file do not edit here!) +D='$' +cat <<EOF >dllar.sh +#!/bin/sh +# +# dllar - a tool to build both a .dll and an .a file +# from a set of object (.o) files for EMX/OS2. +# +# Written by Andrew Zabolotny, bi...@fr... +# Ported to Unix like shell by Stefan Neis, Ste...@t-... +# +# This script will accept a set of files on the command line. +# All the public symbols from the .o files will be exported into +# a .DEF file, then linker will be run (through gcc) against them to +# build a shared library consisting of all given .o files. All libraries +# (.a) will be first decompressed into component .o files then act as +# described above. You can optionally give a description (-d "description") +# which will be put into .DLL. To see the list of accepted options (as well +# as command-line format) simply run this program without options. The .DLL +# is built to be imported by name (there is no guarantee that new versions +# of the library you build will have same ordinals for same symbols). +# +# dllar 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, or (at your option) +# any later version. +# +# dllar 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 dllar; see the file COPYING. If not, write to the Free +# Software Foundation, 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# To successfuly run this program you will need: +# - Current drive should have LFN support (HPFS, ext2, network, etc) +# (Sometimes dllar generates filenames which won't fit 8.3 scheme) +# - gcc +# (used to build the .dll) +# - emxexp +# (used to create .def file from .o files) +# - emximp +# (used to create .a file from .def file) +# - GNU text utilites (cat, sort, uniq) +# used to process emxexp output +# - GNU file utilities (mv, rm) +# - GNU sed +# - lxlite (optional, see flag below) +# (used for general .dll cleanup) +# + +flag_USE_LXLITE=1; + +# +# helper functions +# basnam, variant of basename, which does _not_ remove the path, _iff_ +# second argument (suffix to remove) is given +basnam(){ + case ${D}# in + 1) + echo ${D}1 | sed 's/.*\\///' | sed 's/.*\\\\//' + ;; + 2) + echo ${D}1 | sed 's/'${D}2'${D}//' + ;; + *) + echo "error in basnam ${D}*" + exit 8 + ;; + esac +} + +# Cleanup temporary files and output +CleanUp() { + cd ${D}curDir + for i in ${D}inputFiles ; do + case ${D}i in + *!) + rm -rf \`basnam ${D}i !\` + ;; + *) + ;; + esac + done + + # Kill result in case of failure as there is just to many stupid make/nmake + # things out there which doesn't do this. + if @<:@ ${D}# -eq 0 @:>@; then + rm -f ${D}arcFile ${D}arcFile2 ${D}defFile ${D}dllFile + fi +} + +# Print usage and exit script with rc=1. +PrintHelp() { + echo 'Usage: dllar.sh @<:@-o@<:@utput@:>@ output_file@:>@ @<:@-i@<:@mport@:>@ importlib_name@:>@' + echo ' @<:@-name-mangler-script script.sh@:>@' + echo ' @<:@-d@<:@escription@:>@ "dll descrption"@:>@ @<:@-cc "CC"@:>@ @<:@-f@<:@lags@:>@ "CFLAGS"@:>@' + echo ' @<:@-ord@<:@inals@:>@@:>@ -ex@<:@clude@:>@ "symbol(s)"' + echo ' @<:@-libf@<:@lags@:>@ "{INIT|TERM}{GLOBAL|INSTANCE}"@:>@ @<:@-nocrt@<:@dll@:>@@:>@ @<:@-nolxl@<:@ite@:>@@:>@' + echo ' @<:@*.o@:>@ @<:@*.a@:>@' + echo '*> "output_file" should have no extension.' + echo ' If it has the .o, .a or .dll extension, it is automatically removed.' + echo ' The import library name is derived from this and is set to "name".a,' + echo ' unless overridden by -import' + echo '*> "importlib_name" should have no extension.' + echo ' If it has the .o, or .a extension, it is automatically removed.' + echo ' This name is used as the import library name and may be longer and' + echo ' more descriptive than the DLL name which has to follow the old ' + echo ' 8.3 convention of FAT.' + echo '*> "script.sh may be given to override the output_file name by a' + echo ' different name. It is mainly useful if the regular make process' + echo ' of some package does not take into account OS/2 restriction of' + echo ' DLL name lengths. It takes the importlib name as input and is' + echo ' supposed to procude a shorter name as output. The script should' + echo ' expect to get importlib_name without extension and should produce' + echo ' a (max.) 8 letter name without extension.' + echo '*> "cc" is used to use another GCC executable. (default: gcc.exe)' + echo '*> "flags" should be any set of valid GCC flags. (default: -s -Zcrtdll)' + echo ' These flags will be put at the start of GCC command line.' + echo '*> -ord@<:@inals@:>@ tells dllar to export entries by ordinals. Be careful.' + echo '*> -ex@<:@clude@:>@ defines symbols which will not be exported. You can define' + echo ' multiple symbols, for example -ex "myfunc yourfunc _GLOBAL*".' + echo ' If the last character of a symbol is "*", all symbols beginning' + echo ' with the prefix before "*" will be exclude, (see _GLOBAL* above).' + echo '*> -libf@<:@lags@:>@ can be used to add INITGLOBAL/INITINSTANCE and/or' + echo ' TERMGLOBAL/TERMINSTANCE flags to the dynamically-linked library.' + echo '*> -nocrt@<:@dll@:>@ switch will disable linking the library against emx''s' + echo ' C runtime DLLs.' + echo '*> -nolxl@<:@ite@:>@ switch will disable running lxlite on the resulting DLL.' + echo '*> All other switches (for example -L./ or -lmylib) will be passed' + echo ' unchanged to GCC at the end of command line.' + echo '*> If you create a DLL from a library and you do not specify -o,' + echo ' the basename for DLL and import library will be set to library name,' + echo ' the initial library will be renamed to 'name'_s.a (_s for static)' + echo ' i.e. "dllar gcc.a" will create gcc.dll and gcc.a, and the initial' + echo ' library will be renamed into gcc_s.a.' + echo '--------' + echo 'Example:' + echo ' dllar -o gcc290.dll libgcc.a -d "GNU C runtime library" -ord' + echo ' -ex "__main __ctordtor*" -libf "INITINSTANCE TERMINSTANCE"' + CleanUp + exit 1 +} + +# Execute a command. +# If exit code of the commnad <> 0 CleanUp() is called and we'll exit the script. +# @Uses Whatever CleanUp() uses. +doCommand() { + echo "${D}*" + eval ${D}* + rcCmd=${D}? + + if @<:@ ${D}rcCmd -ne 0 @:>@; then + echo "command failed, exit code="${D}rcCmd + CleanUp + exit ${D}rcCmd + fi +} + +# main routine +# setup globals +cmdLine=${D}* +outFile="" +outimpFile="" +inputFiles="" +renameScript="" +description="" +CC=gcc.exe +CFLAGS="-s -Zcrtdll" +EXTRA_CFLAGS="" +EXPORT_BY_ORDINALS=0 +exclude_symbols="" +library_flags="" +curDir=\`pwd\` +curDirS=curDir +case ${D}curDirS in +*/) + ;; +*) + curDirS=${D}{curDirS}"/" + ;; +esac +# Parse commandline +libsToLink=0 +omfLinking=0 +while @<:@ ${D}1 @:>@; do + case ${D}1 in + -ord*) + EXPORT_BY_ORDINALS=1; + ;; + -o*) + shift + outFile=${D}1 + ;; + -i*) + shift + outimpFile=${D}1 + ;; + -name-mangler-script) + shift + renameScript=${D}1 + ;; + -d*) + shift + description=${D}1 + ;; + -f*) + shift + CFLAGS=${D}1 + ;; + -c*) + shift + CC=${D}1 + ;; + -h*) + PrintHelp + ;; + -ex*) + shift + exclude_symbols=${D}{exclude_symbols}${D}1" " + ;; + -libf*) + shift + library_flags=${D}{library_flags}${D}1" " + ;; + -nocrt*) + CFLAGS="-s" + ;; + -nolxl*) + flag_USE_LXLITE=0 + ;; + -* | /*) + case ${D}1 in + -L* | -l*) + libsToLink=1 + ;; + -Zomf) + omfLinking=1 + ;; + *) + ;; + esac + EXTRA_CFLAGS=${D}{EXTRA_CFLAGS}" "${D}1 + ;; + *.dll) + EXTRA_CFLAGS="${D}{EXTRA_CFLAGS} \`basnam ${D}1 .dll\`" + if @<:@ ${D}omfLinking -eq 1 @:>@; then + EXTRA_CFLAGS="${D}{EXTRA_CFLAGS}.lib" + else + EXTRA_CFLAGS="${D}{EXTRA_CFLAGS}.a" + fi + ;; + *) + found=0; + if @<:@ ${D}libsToLink -ne 0 @:>@; then + EXTRA_CFLAGS=${D}{EXTRA_CFLAGS}" "${D}1 + else + for file in ${D}1 ; do + if @<:@ -f ${D}file @:>@; then + inputFiles="${D}{inputFiles} ${D}file" + found=1 + fi + done + if @<:@ ${D}found -eq 0 @:>@; then + echo "ERROR: No file(s) found: "${D}1 + exit 8 + fi + fi + ;; + esac + shift +done # iterate cmdline words + +# +if @<:@ -z "${D}inputFiles" @:>@; then + echo "dllar: no input files" + PrintHelp +fi + +# Now extract all .o files from .a files +newInputFiles="" +for file in ${D}inputFiles ; do + case ${D}file in + *.a | *.lib) + case ${D}file in + *.a) + suffix=".a" + AR="ar" + ;; + *.lib) + suffix=".lib" + AR="emxomfar" + EXTRA_CFLAGS="${D}EXTRA_CFLAGS -Zomf" + ;; + *) + ;; + esac + dirname=\`basnam ${D}file ${D}suffix\`"_%" + mkdir ${D}dirname + if @<:@ ${D}? -ne 0 @:>@; then + echo "Failed to create subdirectory ./${D}dirname" + CleanUp + exit 8; + fi + # Append '!' to indicate archive + newInputFiles="${D}newInputFiles ${D}{dirname}!" + doCommand "cd ${D}dirname; ${D}AR x ../${D}file" + cd ${D}curDir + found=0; + for subfile in ${D}dirname/*.o* ; do + if @<:@ -f ${D}subfile @:>@; then + found=1 + if @<:@ -s ${D}subfile @:>@; then + # FIXME: This should be: is file size > 32 byte, _not_ > 0! + newInputFiles="${D}newInputFiles ${D}subfile" + fi + fi + done + if @<:@ ${D}found -eq 0 @:>@; then + echo "WARNING: there are no files in archive \\'${D}file\\'" + fi + ;; + *) + newInputFiles="${D}{newInputFiles} ${D}file" + ;; + esac +done +inputFiles="${D}newInputFiles" + +# Output filename(s). +do_backup=0; +if @<:@ -z ${D}outFile @:>@; then + do_backup=1; + set outFile ${D}inputFiles; outFile=${D}2 +fi + +# If it is an archive, remove the '!' and the '_%' suffixes +case ${D}outFile in +*_%!) + outFile=\`basnam ${D}outFile _%!\` + ;; +*) + ;; +esac +case ${D}outFile in +*.dll) + outFile=\`basnam ${D}outFile .dll\` + ;; +*.DLL) + outFile=\`basnam ${D}outFile .DLL\` + ;; +*.o) + outFile=\`basnam ${D}outFile .o\` + ;; +*.obj) + outFile=\`basnam ${D}outFile .obj\` + ;; +*.a) + outFile=\`basnam ${D}outFile .a\` + ;; +*.lib) + outFile=\`basnam ${D}outFile .lib\` + ;; +*) + ;; +esac +case ${D}outimpFile in +*.a) + outimpFile=\`basnam ${D}outimpFile .a\` + ;; +*.lib) + outimpFile=\`basnam ${D}outimpFile .lib\` + ;; +*) + ;; +esac +if @<:@ -z ${D}outimpFile @:>@; then + outimpFile=${D}outFile +fi +defFile="${D}{outFile}.def" +arcFile="${D}{outimpFile}.a" +arcFile2="${D}{outimpFile}.lib" + +#create ${D}dllFile as something matching 8.3 restrictions, +if @<:@ -z ${D}renameScript @:>@ ; then + dllFile="${D}outFile" +else + dllFile=\`${D}renameScript ${D}outimpFile\` +fi + +if @<:@ ${D}do_backup -ne 0 @:>@ ; then + if @<:@ -f ${D}arcFile @:>@ ; then + doCommand "mv ${D}arcFile ${D}{outFile}_s.a" + fi + if @<:@ -f ${D}arcFile2 @:>@ ; then + doCommand "mv ${D}arcFile2 ${D}{outFile}_s.lib" + fi +fi + +# Extract public symbols from all the object files. +tmpdefFile=${D}{defFile}_% +rm -f ${D}tmpdefFile +for file in ${D}inputFiles ; do + case ${D}file in + *!) + ;; + *) + doCommand "emxexp -u ${D}file >> ${D}tmpdefFile" + ;; + esac +done + +# Create the def file. +rm -f ${D}defFile +echo "LIBRARY \`basnam ${D}dllFile\` ${D}library_flags" >> ${D}defFile +dllFile="${D}{dllFile}.dll" +if @<:@ ! -z ${D}description @:>@; then + echo "DESCRIPTION \\"${D}{description}\\"" >> ${D}defFile +fi +echo "EXPORTS" >> ${D}defFile + +doCommand "cat ${D}tmpdefFile | sort.exe | uniq.exe > ${D}{tmpdefFile}%" +grep -v "^ *;" < ${D}{tmpdefFile}% | grep -v "^ *${D}" >${D}tmpdefFile + +# Checks if the export is ok or not. +for word in ${D}exclude_symbols; do + grep -v ${D}word < ${D}tmpdefFile >${D}{tmpdefFile}% + mv ${D}{tmpdefFile}% ${D}tmpdefFile +done + + +if @<:@ ${D}EXPORT_BY_ORDINALS -ne 0 @:>@; then + sed "=" < ${D}tmpdefFile | \\ + sed ' + N + : loop + s/^\\(@<:@0-9@:>@\\+\\)\\(@<:@^;@:>@*\\)\\(;.*\\)\\?/\\2 @\\1 NONAME/ + t loop + ' > ${D}{tmpdefFile}% + grep -v "^ *${D}" < ${D}{tmpdefFile}% > ${D}tmpdefFile +else + rm -f ${D}{tmpdefFile}% +fi +cat ${D}tmpdefFile >> ${D}defFile +rm -f ${D}tmpdefFile + +# Do linking, create implib, and apply lxlite. +gccCmdl=""; +for file in ${D}inputFiles ; do + case ${D}file in + *!) + ;; + *) + gccCmdl="${D}gccCmdl ${D}file" + ;; + esac +done +doCommand "${D}CC ${D}CFLAGS -Zdll -o ${D}dllFile ${D}defFile ${D}gccCmdl ${D}EXTRA_CFLAGS" +touch "${D}{outFile}.dll" + +doCommand "emximp -o ${D}arcFile ${D}defFile" +if @<:@ ${D}flag_USE_LXLITE -ne 0 @:>@; then + add_flags=""; + if @<:@ ${D}EXPORT_BY_ORDINALS -ne 0 @:>@; then + add_flags="-ynd" + fi + doCommand "lxlite -cs -t: -mrn -mln ${D}add_flags ${D}dllFile" +fi +doCommand "emxomf -s -l ${D}arcFile" + +# Successful exit. +CleanUp 1 +exit 0 +EOF +dnl ===================== dllar.sh ends here ===================== +]) + +dnl +dnl This file is part of Bakefile (http://www.bakefile.org) +dnl +dnl Copyright (C) 2003-2007 Vaclav Slavik, David Elliott and others +dnl +dnl Permission is hereby granted, free of charge, to any person obtaining a +dnl copy of this software and associated documentation files (the "Software"), +dnl to deal in the Software without restriction, including without limitation +dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, +dnl and/or sell copies of the Software, and to permit persons to whom the +dnl Software is furnished to do so, subject to the following conditions: +dnl +dnl The above copyright notice and this permission notice shall be included in +dnl all copies or substantial portions of the Software. +dnl +dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +dnl DEALINGS IN THE SOFTWARE. +dnl +dnl $Id: bakefile-lang.m4 1337 2010-02-09 20:22:43Z vaclavslavik $ +dnl +dnl Compiler detection macros by David Elliott and Vadim Zeitlin +dnl + + +dnl =========================================================================== +dnl Macros to detect different C/C++ compilers +dnl =========================================================================== + +dnl Based on autoconf _AC_LANG_COMPILER_GNU +dnl _AC_BAKEFILE_LANG_COMPILER(NAME, LANG, SYMBOL, IF-YES, IF-NO) +AC_DEFUN([_AC_BAKEFILE_LANG_COMPILER], +[ + AC_LANG_PUSH($2) + AC_CACHE_CHECK( + [whether we are using the $1 $2 compiler], + [bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3], + [AC_TRY_COMPILE( + [], + [ + #ifndef $3 + choke me + #endif + ], + [bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3=yes], + [bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3=no] + ) + ] + ) + if test "x$bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3" = "xyes"; then + :; $4 + else + :; $5 + fi + AC_LANG_POP($2) +]) + +dnl More specific version of the above macro checking whether the compiler +dnl version is at least the given one (assumes that we do use this compiler) +dnl +dnl _AC_BAKEFILE_LANG_COMPILER_LATER_THAN(NAME, LANG, SYMBOL, VER, VERMSG, IF-YES, IF-NO) +AC_DEFUN([_AC_BAKEFILE_LANG_COMPILER_LATER_THAN], +[ + AC_LANG_PUSH($2) + AC_CACHE_CHECK( + [whether we are using $1 $2 compiler v$5 or later], + [bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3[]_lt_[]$4], + [AC_TRY_COMPILE( + [], + [ + #ifndef $3 || $3 < $4 + choke me + #endif + ], + [bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3[]_lt_[]$4=yes], + [bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3[]_lt_[]$4=no] + ) + ] + ) + if test "x$bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3[]_lt_[]$4" = "xyes"; then + :; $6 + else + :; $7 + fi + AC_LANG_POP($2) +]) + +dnl CodeWarrior Metrowerks compiler defines __MWERKS__ for both C and C++ +AC_DEFUN([AC_BAKEFILE_PROG_MWCC], +[ + _AC_BAKEFILE_LANG_COMPILER(Metrowerks, C, __MWERKS__, MWCC=yes) +]) + +AC_DEFUN([AC_BAKEFILE_PROG_MWCXX], +[ + _AC_BAKEFILE_LANG_COMPILER(Metrowerks, C++, __MWERKS__, MWCXX=yes) +]) + +dnl IBM xlC compiler defines __xlC__ for both C and C++ +AC_DEFUN([AC_BAKEFILE_PROG_XLCC], +[ + _AC_BAKEFILE_LANG_COMPILER([IBM xlC], C, __xlC__, XLCC=yes) +]) + +AC_DEFUN([AC_BAKEFILE_PROG_XLCXX], +[ + _AC_BAKEFILE_LANG_COMPILER([IBM xlC], C++, __xlC__, XLCXX=yes) +]) + +dnl recent versions of SGI mipsPro compiler define _SGI_COMPILER_VERSION +dnl +dnl NB: old versions define _COMPILER_VERSION but this could probably be +dnl defined by other compilers too so don't test for it to be safe +AC_DEFUN([AC_BAKEFILE_PROG_SGICC], +[ + _AC_BAKEFILE_LANG_COMPILER(SGI, C, _SGI_COMPILER_VERSION, SGICC=yes) +]) + +AC_DEFUN([AC_BAKEFILE_PROG_SGICXX], +[ + _AC_BAKEFILE_LANG_COMPILER(SGI, C++, _SGI_COMPILER_VERSION, SGICXX=yes) +]) + +dnl Sun compiler defines __SUNPRO_C/__SUNPRO_CC +AC_DEFUN([AC_BAKEFILE_PROG_SUNCC], +[ + _AC_BAKEFILE_LANG_COMPILER(Sun, C, __SUNPRO_C, SUNCC=yes) +]) + +AC_DEFUN([AC_BAKEFILE_PROG_SUNCXX], +[ + _AC_BAKEFILE_LANG_COMPILER(Sun, C++, __SUNPRO_CC, SUNCXX=yes) +]) + +dnl Intel icc compiler defines __INTEL_COMPILER for both C and C++ +AC_DEFUN([AC_BAKEFILE_PROG_INTELCC], +[ + _AC_BAKEFILE_LANG_COMPILER(Intel, C, __INTEL_COMPILER, INTELCC=yes) +]) + +AC_DEFUN([AC_BAKEFILE_PROG_INTELCXX], +[ + _AC_BAKEFILE_LANG_COMPILER(Intel, C++, __INTEL_COMPILER, INTELCXX=yes) +]) + +dnl Intel compiler command line options changed in incompatible ways sometimes +dnl before v8 (-KPIC was replaced with gcc-compatible -fPIC) and again in v10 +dnl (-create-pch deprecated in favour of -pch-create) so we need to test for +dnl its exact version too +AC_DEFUN([AC_BAKEFILE_PROG_INTELCC_8], +[ + _AC_BAKEFILE_LANG_COMPILER_LATER_THAN(Intel, C, __INTEL_COMPILER, 800, 8, INTELCC8=yes) +]) +AC_DEFUN([AC_BAKEFILE_PROG_INTELCXX_8], +[ + _AC_BAKEFILE_LANG_COMPILER_LATER_THAN(Intel, C++, __INTEL_COMPILER, 800, 8, INTELCXX8=yes) +]) + +AC_DEFUN([AC_BAKEFILE_PROG_INTELCC_10], +[ + _AC_BAKEFILE_LANG_COMPILER_LATER_THAN(Intel, C, __INTEL_COMPILER, 1000, 10, INTELCC10=yes) +]) + +AC_DEFUN([AC_BAKEFILE_PROG_INTELCXX_10], +[ + _AC_BAKEFILE_LANG_COMPILER_LATER_THAN(Intel, C++, __INTEL_COMPILER, 1000, 10, INTELCXX10=yes) +]) + +dnl HP-UX aCC: see http://docs.hp.com/en/6162/preprocess.htm#macropredef +AC_DEFUN([AC_BAKEFILE_PROG_HPCC], +[ + _AC_BAKEFILE_LANG_COMPILER(HP, C, __HP_cc, HPCC=yes) +]) + +AC_DEFUN([AC_BAKEFILE_PROG_HPCXX], +[ + _AC_BAKEFILE_LANG_COMPILER(HP, C++, __HP_aCC, HPCXX=yes) +]) + +dnl Tru64 cc and cxx +AC_DEFUN([AC_BAKEFILE_PROG_COMPAQCC], +[ + _AC_BAKEFILE_LANG_COMPILER(Compaq, C, __DECC, COMPAQCC=yes) +]) + +AC_DEFUN([AC_BAKEFILE_PROG_COMPAQCXX], +[ + _AC_BAKEFILE_LANG_COMPILER(Compaq, C++, __DECCXX, COMPAQCXX=yes) +]) + +dnl =========================================================================== +dnl macros to detect specialty compiler options +dnl =========================================================================== + +dnl Figure out if we need to pass -ext o to compiler (MetroWerks) +AC_DEFUN([AC_BAKEFILE_METROWERKS_EXTO], +[AC_CACHE_CHECK([if the _AC_LANG compiler requires -ext o], bakefile_cv_[]_AC_LANG_ABBREV[]_exto, +dnl First create an empty conf test +[AC_LANG_CONFTEST([AC_LANG_PROGRAM()]) +dnl Now remove .o and .c.o or .cc.o +rm -f conftest.$ac_objext conftest.$ac_ext.o +dnl Now compile the test +AS_IF([AC_TRY_EVAL(ac_compile)], +dnl If the test succeeded look for conftest.c.o or conftest.cc.o +[for ac_file in `(ls conftest.* 2>/dev/null)`; do + case $ac_file in + conftest.$ac_ext.o) + bakefile_cv_[]_AC_LANG_ABBREV[]_exto="-ext o" + ;; + *) + ;; + esac +done], +[AC_MSG_FAILURE([cannot figure out if compiler needs -ext o: cannot compile]) +]) dnl AS_IF + +rm -f conftest.$ac_ext.o conftest.$ac_objext conftest.$ac_ext +]) dnl AC_CACHE_CHECK + +if test "x$bakefile_cv_[]_AC_LANG_ABBREV[]_exto" '!=' "x"; then + if test "[]_AC_LANG_ABBREV[]" = "c"; then + CFLAGS="$bakefile_cv_[]_AC_LANG_ABBREV[]_exto $CFLAGS" + fi + if test "[]_AC_LANG_ABBREV[]" = "cxx"; then + CXXFLAGS="$bakefile_cv_[]_AC_LANG_ABBREV[]_exto $CXXFLAGS" + fi +fi +]) dnl AC_DEFUN + + +dnl =========================================================================== +dnl Macros to do all of the compiler detections as one macro +dnl =========================================================================== + +dnl check for different proprietary compilers depending on target platform +dnl _AC_BAKEFILE_PROG_COMPILER(LANG) +AC_DEFUN([_AC_BAKEFILE_PROG_COMPILER], +[ + AC_REQUIRE([AC_PROG_$1]) + + dnl Intel compiler can be used under several different OS and even + dnl different architectures (x86, amd64 and Itanium) so it's easier to just + dnl always test for it + AC_BAKEFILE_PROG_INTEL$1 + + dnl If we use Intel compiler we also need to know its version + if test "$INTEL$1" = "yes"; then + AC_BAKEFILE_PROG_INTEL$1_8 + AC_BAKEFILE_PROG_INTEL$1_10 + fi + + dnl if we're using gcc, we can't be using any of incompatible compilers + if test "x$G$1" != "xyes"; then + if test "x$1" = "xC"; then + AC_BAKEFILE_METROWERKS_EXTO + if test "x$bakefile_cv_c_exto" '!=' "x"; then + unset ac_cv_prog_cc_g + _AC_PROG_CC_G + fi + fi + + dnl most of these compilers are only used under well-defined OS so + dnl don't waste time checking for them on other ones + case `uname -s` in + AIX*) + AC_BAKEFILE_PROG_XL$1 + ;; + + Darwin) + AC_BAKEFILE_PROG_MW$1 + if test "$MW$1" != "yes"; then + AC_BAKEFILE_PROG_XL$1 + fi + ;; + + IRIX*) + AC_BAKEFILE_PROG_SGI$1 + ;; + + Linux*) + dnl Sun CC is now available under Linux too, test for it unless + dnl we already found that we were using a different compiler + if test "$INTEL$1" != "yes"; then + AC_BAKEFILE_PROG_SUN$1 + fi + ;; + + HP-UX*) + AC_BAKEFILE_PROG_HP$1 + ;; + + OSF1) + AC_BAKEFILE_PROG_COMPAQ$1 + ;; + + SunOS) + AC_BAKEFILE_PROG_SUN$1 + ;; + esac + fi +]) + +AC_DEFUN([AC_BAKEFILE_PROG_CC], +[ + _AC_BAKEFILE_PROG_COMPILER(CC) +]) + +AC_DEFUN([AC_BAKEFILE_PROG_CXX], +[ + _AC_BAKEFILE_PROG_COMPILER(CXX) +]) + + +dnl +dnl This file is part of Bakefile (http://www.bakefile.org) +dnl +dnl Copyright (C) 2003-2007 Vaclav Slavik and others +dnl +dnl Permission is hereby granted, free of charge, to any person obtaining a +dnl copy of this software and associated documentation files (the "Software"), +dnl to deal in the Software without restriction, including without limitation +dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, +dnl and/or sell copies of the Software, and to permit persons to whom the +dnl Software is furnished to do so, subject to the following conditions: +dnl +dnl The above copyright notice and this permission notice shall be included in +dnl all copies or substantial portions of the Software. +dnl +dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +dnl DEALINGS IN THE SOFTWARE. +dnl +dnl $Id: bakefile.m4 1346 2011-02-01 14:03:00Z vaclavslavik $ +dnl +dnl Support macros for makefiles generated by BAKEFILE. +dnl + + +dnl --------------------------------------------------------------------------- +dnl Lots of compiler & linker detection code contained here was taken from +dnl wxWidgets configure.in script (see http://www.wxwidgets.org) +dnl --------------------------------------------------------------------------- + + + +dnl --------------------------------------------------------------------------- +dnl AC_BAKEFILE_GNUMAKE +dnl +dnl Detects GNU make +dnl --------------------------------------------------------------------------- + +AC_DEFUN([AC_BAKEFILE_GNUMAKE], +[ + dnl does make support "-include" (only GNU make does AFAIK)? + AC_CACHE_CHECK([if make is GNU make], bakefile_cv_prog_makeisgnu, + [ + if ( ${SHELL-sh} -c "${MAKE-make} --version" 2> /dev/null | + egrep -s GNU > /dev/null); then + bakefile_cv_prog_makeisgnu="yes" + else + bakefile_cv_prog_makeisgnu="no" + fi + ]) + + if test "x$bakefile_cv_prog_makeisgnu" = "xyes"; then + IF_GNU_MAKE="" + else + IF_GNU_MAKE="#" + fi + AC_SUBST(IF_GNU_MAKE) +]) + +dnl --------------------------------------------------------------------------- +dnl AC_BAKEFILE_PLATFORM +dnl +dnl Detects platform and sets PLATFORM_XXX variables accordingly +dnl --------------------------------------------------------------------------- + +AC_DEFUN([AC_BAKEFILE_PLATFORM], +[ + PLATFORM_UNIX=0 + PLATFORM_WIN32=0 + PLATFORM_MSDOS=0 + PLATFORM_MAC=0 + PLATFORM_MACOS=0 + PLATFORM_MACOSX=0 + PLATFORM_OS2=0 + PLATFORM_BEOS=0 + + if test "x$BAKEFILE_FORCE_PLATFORM" = "x"; then + case "${BAKEFILE_HOST}" in + *-*-mingw32* ) + PLATFORM_WIN32=1 + ;; + *-pc-msdosdjgpp ) + PLATFORM_MSDOS=1 + ;; + *-pc-os2_emx | *-pc-os2-emx ) + PLATFORM_OS2=1 + ;; + *-*-darwin* ) + PLATFORM_MAC=1 + PLATFORM_MACOSX=1 + ;; + *-*-beos* ) + PLATFORM_BEOS=1 + ;; + powerpc-apple-macos* ) + PLATFORM_MAC=1 + PLATFORM_MACOS=1 + ;; + * ) + PLATFORM_UNIX=1 + ;; + esac + else + case "$BAKEFILE_FORCE_PLATFORM" in + win32 ) + PLATFORM_WIN32=1 + ;; + msdos ) + PLATFORM_MSDOS=1 + ;; + os2 ) + PLATFORM_OS2=1 + ;; + darwin ) + PLATFORM_MAC=1 + PLATFORM_MACOSX=1 + ;; + unix ) + PLATFORM_UNIX=1 + ;; + beos ) + PLATFORM_BEOS=1 + ;; + * ) + AC_MSG_ERROR([Unknown platform: $BAKEFILE_FORCE_PLATFORM]) + ;; + esac + fi + + AC_SUBST(PLATFORM_UNIX) + AC_SUBST(PLATF... [truncated message content] |
From: <gua...@us...> - 2013-06-15 05:45:59
|
Revision: 4086 http://sourceforge.net/p/moneymanagerex/code/4086 Author: guanlisheng Date: 2013-06-15 05:45:54 +0000 (Sat, 15 Jun 2013) Log Message: ----------- pass const reference for wxString Modified Paths: -------------- trunk/aclocal.m4 trunk/src/util.cpp trunk/src/util.h Modified: trunk/aclocal.m4 =================================================================== --- trunk/aclocal.m4 2013-06-15 05:41:47 UTC (rev 4085) +++ trunk/aclocal.m4 2013-06-15 05:45:54 UTC (rev 4086) @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.13.1 -*- Autoconf -*- +# generated automatically by aclocal 1.13.3 -*- Autoconf -*- -# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, Modified: trunk/src/util.cpp =================================================================== --- trunk/src/util.cpp 2013-06-15 05:41:47 UTC (rev 4085) +++ trunk/src/util.cpp 2013-06-15 05:45:54 UTC (rev 4086) @@ -67,7 +67,7 @@ //---------------------------------------------------------------------------- -void correctEmptyFileExt(wxString ext, wxString & fileName) +void correctEmptyFileExt(const wxString& ext, wxString & fileName) { wxFileName tempFileName(fileName); if (tempFileName.GetExt().IsEmpty()) @@ -317,16 +317,17 @@ //*-------------------------------------------------------------------------*// -wxString adjustedExportAmount(wxString amtSeparator, wxString strValue) +wxString adjustedExportAmount(const wxString& amtSeparator, const wxString& strValue) { // if number does not have a decimal point, add one to user requirements - int dp = strValue.Find("."); + wxString value = strValue; + int dp = value.Find("."); if (dp < 0) - strValue << amtSeparator << "0"; + value<< amtSeparator << "0"; else - strValue.Replace(".",amtSeparator); + value.Replace(".",amtSeparator); - return strValue; + return value; } wxString Tips(wxString type) Modified: trunk/src/util.h =================================================================== --- trunk/src/util.h 2013-06-15 05:41:47 UTC (rev 4085) +++ trunk/src/util.h 2013-06-15 05:45:54 UTC (rev 4086) @@ -94,9 +94,9 @@ std::map<wxString,wxString> date_formats_map(); wxString inQuotes(wxString label, wxString& delimiter); -wxString adjustedExportAmount(wxString amtSeparator, wxString strValue); +wxString adjustedExportAmount(const wxString& amtSeparator, const wxString& strValue); -void correctEmptyFileExt(wxString ext, wxString & fileName ); +void correctEmptyFileExt(const wxString& ext, wxString & fileName ); void mmLoadColorsFromDatabase(std::shared_ptr<MMEX_IniSettings> pIniSettings); wxColour mmGetColourFromString( const wxString& str ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2013-06-17 09:22:31
|
Revision: 4111 http://sourceforge.net/p/moneymanagerex/code/4111 Author: guanlisheng Date: 2013-06-17 09:22:27 +0000 (Mon, 17 Jun 2013) Log Message: ----------- integrate lua-cjson to lua code directly Modified Paths: -------------- trunk/Makefile.in trunk/src/scripts/transaction_stats.lua Modified: trunk/Makefile.in =================================================================== --- trunk/Makefile.in 2013-06-17 09:19:52 UTC (rev 4110) +++ trunk/Makefile.in 2013-06-17 09:22:27 UTC (rev 4111) @@ -54,6 +54,8 @@ sqlite_sqlite3secure.o LUA_CFLAGS = $(PIC_FLAG) $(CPPFLAGS) $(CFLAGS) LUA_OBJECTS = \ + lua_dtoa.o \ + lua_g_fmt.o \ lua_lapi.o \ lua_lauxlib.o \ lua_lbaselib.o \ @@ -84,10 +86,12 @@ lua_ltablib.o \ lua_ltm.o \ lua_lua.o \ + lua_lua_cjson.o \ lua_luac.o \ lua_lundump.o \ lua_lvm.o \ - lua_lzio.o + lua_lzio.o \ + lua_strbuf.o MMEX_CXXFLAGS = -I$(srcdir)/lib/sqlite -I$(srcdir)/lib/wxsqlite \ -I$(srcdir)/lib/lua/src -I$(srcdir)/lib -DNOPCH $(WX_CXXFLAGS) $(PIC_FLAG) \ $(CPPFLAGS) $(CXXFLAGS) @@ -303,6 +307,12 @@ sqlite_sqlite3secure.o: $(srcdir)/lib/sqlite/sqlite3secure.c $(CCC) -c -o $@ $(SQLITE_CFLAGS) $(srcdir)/lib/sqlite/sqlite3secure.c +lua_dtoa.o: $(srcdir)/lib/lua/src/dtoa.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/dtoa.c + +lua_g_fmt.o: $(srcdir)/lib/lua/src/g_fmt.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/g_fmt.c + lua_lapi.o: $(srcdir)/lib/lua/src/lapi.c $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/lapi.c @@ -393,6 +403,9 @@ lua_lua.o: $(srcdir)/lib/lua/src/lua.c $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/lua.c +lua_lua_cjson.o: $(srcdir)/lib/lua/src/lua_cjson.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/lua_cjson.c + lua_luac.o: $(srcdir)/lib/lua/src/luac.c $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/luac.c @@ -405,6 +418,9 @@ lua_lzio.o: $(srcdir)/lib/lua/src/lzio.c $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/lzio.c +lua_strbuf.o: $(srcdir)/lib/lua/src/strbuf.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/lib/lua/src/strbuf.c + mmex_aboutdialog.o: $(srcdir)/src/aboutdialog.cpp $(CXXC) -c -o $@ $(MMEX_CXXFLAGS) $(srcdir)/src/aboutdialog.cpp Modified: trunk/src/scripts/transaction_stats.lua =================================================================== --- trunk/src/scripts/transaction_stats.lua 2013-06-17 09:19:52 UTC (rev 4110) +++ trunk/src/scripts/transaction_stats.lua 2013-06-17 09:22:27 UTC (rev 4111) @@ -24,7 +24,10 @@ --Main function ----------------------------------------------------------- local function main(m_stat) - mmHTMLReportHeader(_("Transaction Statistics")) + local json_text = '{ "title": "Transaction Statistics" }' + local value = cjson.decode(json_text) + + mmHTMLReportHeader(value.title) mmHTMLhr() total = get_stats(m_stat) mmHTMLhr() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2013-06-17 12:36:05
|
Revision: 4113 http://sourceforge.net/p/moneymanagerex/code/4113 Author: guanlisheng Date: 2013-06-17 12:36:03 +0000 (Mon, 17 Jun 2013) Log Message: ----------- update build Modified Paths: -------------- trunk/build/msw/makefile.gcc trunk/build/msw/makefile.vc trunk/lib/lua/src/strbuf.h Modified: trunk/build/msw/makefile.gcc =================================================================== --- trunk/build/msw/makefile.gcc 2013-06-17 11:51:40 UTC (rev 4112) +++ trunk/build/msw/makefile.gcc 2013-06-17 12:36:03 UTC (rev 4113) @@ -52,6 +52,8 @@ LUA_CFLAGS = -mthreads -W -Wall $(__DEBUGINFO) $(__OPTIMIZEFLAG) \ $(__DEBUG_DEFINE_p) $(CPPFLAGS) $(CFLAGS) LUA_OBJECTS = \ + lua_dtoa.o \ + lua_g_fmt.o \ lua_lapi.o \ lua_lauxlib.o \ lua_lbaselib.o \ @@ -82,10 +84,12 @@ lua_ltablib.o \ lua_ltm.o \ lua_lua.o \ + lua_lua_cjson.o \ lua_luac.o \ lua_lundump.o \ lua_lvm.o \ - lua_lzio.o + lua_lzio.o \ + lua_strbuf.o MMEX_CXXFLAGS = -DHAVE_W32API_H $(____WX_SHARED) $(__WXUNICODE_DEFINE_p) \ $(__WXDEBUG_DEFINE_p) -D__WXMSW__ \ -I$(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX) -I$(WX_DIR)\include -mthreads -W \ @@ -398,6 +402,12 @@ sqlite_sqlite3secure.o: ../../lib/sqlite/sqlite3secure.c $(CC) -c -o $@ $(SQLITE_CFLAGS) $(CPPDEPS) $< +lua_dtoa.o: ../../lib/lua/src/dtoa.c + $(CC) -c -o $@ $(LUA_CFLAGS) $(CPPDEPS) $< + +lua_g_fmt.o: ../../lib/lua/src/g_fmt.c + $(CC) -c -o $@ $(LUA_CFLAGS) $(CPPDEPS) $< + lua_lapi.o: ../../lib/lua/src/lapi.c $(CC) -c -o $@ $(LUA_CFLAGS) $(CPPDEPS) $< @@ -488,6 +498,9 @@ lua_lua.o: ../../lib/lua/src/lua.c $(CC) -c -o $@ $(LUA_CFLAGS) $(CPPDEPS) $< +lua_lua_cjson.o: ../../lib/lua/src/lua_cjson.c + $(CC) -c -o $@ $(LUA_CFLAGS) $(CPPDEPS) $< + lua_luac.o: ../../lib/lua/src/luac.c $(CC) -c -o $@ $(LUA_CFLAGS) $(CPPDEPS) $< @@ -500,6 +513,9 @@ lua_lzio.o: ../../lib/lua/src/lzio.c $(CC) -c -o $@ $(LUA_CFLAGS) $(CPPDEPS) $< +lua_strbuf.o: ../../lib/lua/src/strbuf.c + $(CC) -c -o $@ $(LUA_CFLAGS) $(CPPDEPS) $< + mmex_aboutdialog.o: ../../src/aboutdialog.cpp $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< Modified: trunk/build/msw/makefile.vc =================================================================== --- trunk/build/msw/makefile.vc 2013-06-17 11:51:40 UTC (rev 4112) +++ trunk/build/msw/makefile.vc 2013-06-17 12:36:03 UTC (rev 4113) @@ -52,6 +52,8 @@ LUA_CFLAGS = /MD$(__DEBUGINFO_2) /DWIN32 /W4 $(__DEBUGINFO) $(____DEBUGINFO) \ /Fdlua.pdb $(__OPTIMIZEFLAG) $(__DEBUG_DEFINE_p) $(CPPFLAGS) $(CFLAGS) LUA_OBJECTS = \ + lua_dtoa.obj \ + lua_g_fmt.obj \ lua_lapi.obj \ lua_lauxlib.obj \ lua_lbaselib.obj \ @@ -82,10 +84,12 @@ lua_ltablib.obj \ lua_ltm.obj \ lua_lua.obj \ + lua_lua_cjson.obj \ lua_luac.obj \ lua_lundump.obj \ lua_lvm.obj \ - lua_lzio.obj + lua_lzio.obj \ + lua_strbuf.obj MMEX_CXXFLAGS = /MD$(__DEBUGINFO_2) /DWIN32 $(____WX_SHARED) \ $(__WXUNICODE_DEFINE_p) $(__WXDEBUG_DEFINE_p) /D__WXMSW__ \ /I$(WX_DIR)$(__WXLIBPATH_FILENAMES_1)\msw$(WXLIBPOSTFIX) \ @@ -531,6 +535,12 @@ sqlite_sqlite3secure.obj: ..\..\lib\sqlite\sqlite3secure.c $(CC) /c /nologo /TC /Fo$@ $(SQLITE_CFLAGS) ..\..\lib\sqlite\sqlite3secure.c +lua_dtoa.obj: ..\..\lib\lua\src\dtoa.c + $(CC) /c /nologo /TC /Fo$@ $(LUA_CFLAGS) ..\..\lib\lua\src\dtoa.c + +lua_g_fmt.obj: ..\..\lib\lua\src\g_fmt.c + $(CC) /c /nologo /TC /Fo$@ $(LUA_CFLAGS) ..\..\lib\lua\src\g_fmt.c + lua_lapi.obj: ..\..\lib\lua\src\lapi.c $(CC) /c /nologo /TC /Fo$@ $(LUA_CFLAGS) ..\..\lib\lua\src\lapi.c @@ -621,6 +631,9 @@ lua_lua.obj: ..\..\lib\lua\src\lua.c $(CC) /c /nologo /TC /Fo$@ $(LUA_CFLAGS) ..\..\lib\lua\src\lua.c +lua_lua_cjson.obj: ..\..\lib\lua\src\lua_cjson.c + $(CC) /c /nologo /TC /Fo$@ $(LUA_CFLAGS) ..\..\lib\lua\src\lua_cjson.c + lua_luac.obj: ..\..\lib\lua\src\luac.c $(CC) /c /nologo /TC /Fo$@ $(LUA_CFLAGS) ..\..\lib\lua\src\luac.c @@ -633,6 +646,9 @@ lua_lzio.obj: ..\..\lib\lua\src\lzio.c $(CC) /c /nologo /TC /Fo$@ $(LUA_CFLAGS) ..\..\lib\lua\src\lzio.c +lua_strbuf.obj: ..\..\lib\lua\src\strbuf.c + $(CC) /c /nologo /TC /Fo$@ $(LUA_CFLAGS) ..\..\lib\lua\src\strbuf.c + mmex_aboutdialog.obj: ..\..\src\aboutdialog.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\aboutdialog.cpp Modified: trunk/lib/lua/src/strbuf.h =================================================================== --- trunk/lib/lua/src/strbuf.h 2013-06-17 11:51:40 UTC (rev 4112) +++ trunk/lib/lua/src/strbuf.h 2013-06-17 12:36:03 UTC (rev 4113) @@ -48,8 +48,8 @@ #define STRBUF_DEFAULT_INCREMENT -2 #endif -#ifdef _MSC_VER - #define inline __forceinline /* use __forceinline (VC++ specific) */ +#ifdef _MSC_VER + #define inline __forceinline /* use __forceinline (VC++ specific) */ #endif /* Initialise */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2013-06-22 08:53:52
|
Revision: 4135 http://sourceforge.net/p/moneymanagerex/code/4135 Author: guanlisheng Date: 2013-06-22 08:53:46 +0000 (Sat, 22 Jun 2013) Log Message: ----------- add sql folder to store all table ddl Added Paths: ----------- trunk/sql/ trunk/sql/tables_v1.sql Added: trunk/sql/tables_v1.sql =================================================================== --- trunk/sql/tables_v1.sql (rev 0) +++ trunk/sql/tables_v1.sql 2013-06-22 08:53:46 UTC (rev 4135) @@ -0,0 +1,957 @@ +<!DOCTYPE html> +<!-- Server: sfn-web-10 --> + + + + + + + + + + + + + +<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]--> +<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]--> +<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]--> +<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]--> +<!--[if (gt IE 9)|!(IE)]>--> <html lang="en" class="no-js"> <!--<![endif]--> + <head> + <meta content="text/html; charset=UTF-8" http-equiv="content-type"/> + <title> + Money Manager Ex / Code / + [r4134] + /branches/mmex_dbview_wx29/mmex/sql/tables_v1.sql +</title> + +<meta id="webtracker" name="webtracker" content='{"event_id": "2e7dcd62-db19-11e2-9dc0-0200ac1d293c", "project": "moneymanagerex", "action_type": "svn"}' /> + +<script src="http://a.fsdn.com/allura/nf/1371835376/_ew_/theme/sftheme/js/sftheme/modernizr.custom.90514.js"></script> + +<script src="http://a.fsdn.com/allura/nf/1371835376/_ew_/theme/sftheme/js/sftheme/jquery-1.8.0.min.js"></script> + +<script src="http://a.fsdn.com/allura/nf/1371835376/_ew_/theme/sftheme/js/sftheme/header.js"></script> +<!--[if lt IE 7 ]> + <script src="http://a.fsdn.com/allura/nf/1371835376/_ew_/theme/sftheme/js/sftheme/dd_belatedpng.js"></script> + <script> DD_belatedPNG.fix('img, .png_bg'); //fix any <img> or .png_bg background-images </script> +<![endif]--> +<link href='//fonts.googleapis.com/css?family=Ubuntu:regular' rel='stylesheet' type='text/css'> +<style type="text/css"> + @font-face { + font-family: "Pictos"; + src: url('http://a.fsdn.com/allura/nf/1371835376/_ew_/theme/sftheme/css/fonts/sftheme/pictos-web.eot'); + src: local("☺"), url('http://a.fsdn.com/allura/nf/1371835376/_ew_/theme/sftheme/css/fonts/sftheme/pictos-web.woff') format('woff'), url('http://a.fsdn.com/allura/nf/1371835376/_ew_/theme/sftheme/css/fonts/sftheme/pictos-web.ttf') format('truetype'), url('http://a.fsdn.com/allura/nf/1371835376/_ew_/theme/sftheme/css/fonts/sftheme/pictos-web.svg') format('svg'); + } +</style> + <script type="text/javascript"> + /*jslint onevar: false, nomen: false, evil: true, css: true, plusplus: false, white: false, forin: true, on: true, immed: false */ + /*global confirm, alert, unescape, window, jQuery, $, net, COMSCORE */ + </script> + + <!-- ew:head_css --> + + + <link rel="stylesheet" + type="text/css" + href="http://a.fsdn.com/allura/nf/1371835376/_ew_/_slim/css?href=allura%2Fcss%2Fforge%2Fhilite.css" + > + + <link rel="stylesheet" + type="text/css" + href="http://a.fsdn.com/allura/nf/1371835376/_ew_/theme/sftheme/css/forge.css" + > + + +<!-- /ew:head_css --> + + + + + <!-- ew:head_js --> + + + +<!-- /ew:head_js --> + + + + + + <style type="text/css"> + #page-body.project---init-- #top_nav { display: none; } +#page-body.project---init-- #nav_menu_holder { display: none; margin-bottom: 0; } +#page-body.project---init-- #content_base {margin-top: 0; } + </style> + + + <link rel="alternate" type="application/rss+xml" title="RSS" href="/p/moneymanagerex/code/feed.rss"/> + <link rel="alternate" type="application/atom+xml" title="Atom" href="/p/moneymanagerex/code/feed.atom"/> + + <style>.XwNLKqVxtDczfFitYcVI { display:none }</style> + + + + + + + +<script type="text/javascript"> + var _gaq = _gaq || []; + + function _add_tracking(prefix, tracking_id, send_user) { + _gaq.push([prefix+'._setAccount', tracking_id]); + _gaq.push([prefix+'._setCustomVar', 1, 'Page Type', 'svn', 3]);_gaq.push([prefix+'._trackPageview']); + } + _add_tracking('sfnt1', 'UA-32013-6', true); + _add_tracking('sfnt2', 'UA-36130941-1', true); + + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' === document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); +</script> + </head> + + <body id="forge"> + + <!-- ew:body_top_js --> + + + +<!-- /ew:body_top_js --> + + + +<header id="site-header"> + <div class="wrapper"> + <a href="/" class="logo"> + <span>SourceForge</span> + </a> + + <form method="get" action="/directory/"> + <input type="text" id="words" name="q" placeholder="Search"> + </form> + + <!--Switch to {language}--> + <nav id="nav-site"> + <a href="/directory/" title="Browse our software.">Browse</a> + <a href="/directory/enterprise" title="Browse our Enterprise software.">Enterprise</a> + <a href="/blog/" title="Read the latest news from the SF HQ.">Blog</a> + <a href="/support" title="Contact us for help and feedback.">Help</a> + <a href="/jobs?source=header" title="Search 80k+ tech jobs." class="featured-link">Jobs</a> + </nav> + <nav id="nav-account"> + + <div class="logged_out"> + <a href="/account/login.php">Log In</a> + <span>or</span> + <a href="https://sourceforge.net/user/registration/">Join</a> + </div> + + </nav> + + </div> +</header> +<header id="site-sec-header"> + <div class="wrapper"> + <nav id="nav-hubs"> + <h4>Solution Centers</h4> + <a href="http://ibmsmartercommerce.sourceforge.net/">Smarter Commerce</a> + <a href="http://goparallel.sourceforge.net/">Go Parallel</a> + <a href="http://html5center.sourceforge.net/">HTML5</a> + <a href="http://ibmsmarteritservices.sourceforge.net/">Smarter IT</a> + </nav> + <nav id="nav-collateral"> + <a href="http://library.geeknetmedia.com">Resources</a> + + <a href="">Newsletters</a> + + </nav> + </div> +</header> + + <section id="page-body" class=" neighborhood-Projects project-moneymanagerex mountpoint-code"> + <div class="grid-24" id="nav_menu_holder"> + + + + + + + <nav id="breadcrumbs"> + <ul> + <li><a href="/">Home</a></li> + <li><a href="/directory">Browse</a></li> + + + + + + + + <li><a href="/directory/office/">Office/Business</a></li> + + + + <li><a href="/directory/office/financial/">Financial</a></li> + + + + <li><a href="/directory/office/financial/personalfinance/">Personal finance</a></li> + + + + <li>Code</li> + + + </ul> + </nav> + + + <img src="/p/moneymanagerex//icon?2013-04-02 20:06:01+00:00" class="project_icon" alt="Project Logo"> + + <h1 class="project_title"> + <a href="/p/moneymanagerex/" class="project_link">Money Manager Ex</a> + </h1> + + + + <h2 class="project_summary"> + + </h2> + <div class="brought-by with-icon"> + Brought to you by: + + + + <a href="/u/guanlisheng/">guanlisheng</a>, + + + <a href="/u/madhan/">madhan</a>, + + + <a href="/u/stef145g/">stef145g</a>, + + + <a href="/u/vomikan/">vomikan</a> + </div> + + + </div> + <div id="top_nav" class=""> + + +<ul class="dropdown"> + + <li class=""> + <a href="/projects/moneymanagerex/" class="ui-icon-tool-summary"> + Summary + </a> + + + </li> + + <li class=""> + <a href="/projects/moneymanagerex/files/" class="ui-icon-tool-files"> + Files + </a> + + + </li> + + <li class=""> + <a href="/projects/moneymanagerex/reviews" class="ui-icon-tool-reviews"> + Reviews + </a> + + + </li> + + <li class=""> + <a href="/projects/moneymanagerex/support" class="ui-icon-tool-support"> + Support + </a> + + + </li> + + <li class=""> + <a href="/p/moneymanagerex/wiki/" class="ui-icon-tool-wiki"> + Wiki + </a> + + + </li> + + <li class=""> + <a href="/p/moneymanagerex/mailman/" class="ui-icon-tool-mailman"> + Mailing Lists + </a> + + + </li> + + <li class=""> + <a href="/p/moneymanagerex/_list/tickets" class="ui-icon-tool-tickets"> + Tickets ▾ + </a> + + + <ul> + + <li class=""><a href="/p/moneymanagerex/patches/">Patches</a></li> + + <li class=""><a href="/p/moneymanagerex/bugs/">Bugs</a></li> + + <li class=""><a href="/p/moneymanagerex/feature-requests/">Feature Requests</a></li> + + </ul> + + </li> + + <li class=""> + <a href="/p/moneymanagerex/news/" class="ui-icon-tool-blog"> + News + </a> + + + </li> + + <li class=""> + <a href="/p/moneymanagerex/donate/" class="ui-icon-tool-link"> + Donate + </a> + + + </li> + + <li class="selected"> + <a href="/p/moneymanagerex/code/" class="ui-icon-tool-svn"> + Code + </a> + + + </li> + +</ul> + + + </div> + <div id="content_base"> + + + + + +<div id="sidebar"> + + <div> </div> + + + + + + + <ul class="sidebarmenu"> + + + <li> + <a href="/p/moneymanagerex/code/commit_browser"><b data-icon="o" class="ico ico-folder"></b> <span>Browse Commits</span></a> + </li> + + + + + </ul> + + + +</div> + + + + + + + <div class="grid-20 pad"> + <h2 class="dark title"> +<a href="/p/moneymanagerex/code/4134/">[r4134]</a>: + + + + <a href="./../../../">branches</a> / + + + <a href="./../../">mmex_dbview_wx29</a> / + + + <a href="./../">mmex</a> / + + + <a href="./">sql</a> / + + + tables_v1.sql + + <!-- actions --> + <small> + +<a href="/p/moneymanagerex/code/4134/log/?path=/branches/mmex_dbview_wx29/mmex/sql/tables_v1.sql"> + <b data-icon="N" class="ico ico-history" title="History"> </b> History +</a> + + </small> + <!-- /actions --> + </h2> + + <div> + + + + + + + + + + <p><a href="?format=raw">Download this file</a></p> + <div class="clip grid-19 codebrowser"> + <h3> + <span class="ico-l"><b data-icon="n" class="ico ico-table"></b> tables_v1.sql</span> + + 175 lines (152 with data), 3.5 kB + </h3> + + <table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre> 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174</pre></div></td><td class="code"><div class="codehilite"><pre><div id="l1" class="code_block"><span class="c1">-- Describe ACCOUNTLIST_V1</span> +</div><div id="l2" class="code_block"><span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">ACCOUNTLIST_V1</span><span class="p">(</span> +</div><div id="l3" class="code_block"><span class="n">ACCOUNTID</span> <span class="nb">integer</span> <span class="k">primary</span> <span class="k">key</span> +</div><div id="l4" class="code_block"><span class="p">,</span> <span class="n">ACCOUNTNAME</span> <span class="nb">TEXT</span> <span class="k">NOT</span> <span class="k">NULL</span> <span class="k">UNIQUE</span> +</div><div id="l5" class="code_block"><span class="p">,</span> <span class="n">ACCOUNTTYPE</span> <span class="nb">TEXT</span> <span class="k">NOT</span> <span class="k">NULL</span> +</div><div id="l6" class="code_block"><span class="p">,</span> <span class="n">ACCOUNTNUM</span> <span class="nb">TEXT</span> +</div><div id="l7" class="code_block"><span class="p">,</span> <span class="n">STATUS</span> <span class="nb">TEXT</span> <span class="k">NOT</span> <span class="k">NULL</span> +</div><div id="l8" class="code_block"><span class="p">,</span> <span class="n">NOTES</span> <span class="nb">TEXT</span> +</div><div id="l9" class="code_block"><span class="p">,</span> <span class="n">HELDAT</span> <span class="nb">TEXT</span> +</div><div id="l10" class="code_block"><span class="p">,</span> <span class="n">WEBSITE</span> <span class="nb">TEXT</span> +</div><div id="l11" class="code_block"><span class="p">,</span> <span class="n">CONTACTINFO</span> <span class="nb">TEXT</span> +</div><div id="l12" class="code_block"><span class="p">,</span> <span class="n">ACCESSINFO</span> <span class="nb">TEXT</span> +</div><div id="l13" class="code_block"><span class="p">,</span> <span class="n">INITIALBAL</span> <span class="nb">numeric</span> +</div><div id="l14" class="code_block"><span class="p">,</span> <span class="n">FAVORITEACCT</span> <span class="nb">TEXT</span> <span class="k">NOT</span> <span class="k">NULL</span> +</div><div id="l15" class="code_block"><span class="p">,</span> <span class="n">CURRENCYID</span> <span class="nb">integer</span> <span class="k">NOT</span> <span class="k">NULL</span> +</div><div id="l16" class="code_block"><span class="p">);</span> +</div><div id="l17" class="code_block"> +</div><div id="l18" class="code_block"><span class="c1">-- Describe ASSETS_V1</span> +</div><div id="l19" class="code_block"><span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">ASSETS_V1</span><span class="p">(</span> +</div><div id="l20" class="code_block"><span class="n">ASSETID</span> <span class="nb">integer</span> <span class="k">primary</span> <span class="k">key</span> +</div><div id="l21" class="code_block"><span class="p">,</span> <span class="n">STARTDATE</span> <span class="nb">TEXT</span> <span class="k">NOT</span> <span class="k">NULL</span> +</div><div id="l22" class="code_block"><span class="p">,</span> <span class="n">ASSETNAME</span> <span class="nb">TEXT</span> <span class="k">NOT</span> <span class="k">NULL</span> <span class="k">UNIQUE</span> +</div><div id="l23" class="code_block"><span class="p">,</span> <span class="n">VALUE</span> <span class="nb">numeric</span> +</div><div id="l24" class="code_block"><span class="p">,</span> <span class="n">VALUECHANGE</span> <span class="nb">TEXT</span> +</div><div id="l25" class="code_block"><span class="p">,</span> <span class="n">NOTES</span> <span class="nb">TEXT</span> +</div><div id="l26" class="code_block"><span class="p">,</span> <span class="n">VALUECHANGERATE</span> <span class="nb">numeric</span> +</div><div id="l27" class="code_block"><span class="p">,</span> <span class="n">ASSETTYPE</span> <span class="nb">TEXT</span> +</div><div id="l28" class="code_block"><span class="p">);</span> +</div><div id="l29" class="code_block"> +</div><div id="l30" class="code_block"> +</div><div id="l31" class="code_block"><span class="c1">-- Describe BILLSDEPOSITS_V1</span> +</div><div id="l32" class="code_block"><span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">BILLSDEPOSITS_V1</span><span class="p">(</span> +</div><div id="l33" class="code_block"><span class="n">BDID</span> <span class="nb">integer</span> <span class="k">primary</span> <span class="k">key</span> +</div><div id="l34" class="code_block"><span class="p">,</span> <span class="n">ACCOUNTID</span> <span class="nb">integer</span> <span class="k">NOT</span> <span class="k">NULL</span> +</div><div id="l35" class="code_block"><span class="p">,</span> <span class="n">TOACCOUNTID</span> <span class="nb">integer</span> +</div><div id="l36" class="code_block"><span class="p">,</span> <span class="n">PAYEEID</span> <span class="nb">integer</span> <span class="k">NOT</span> <span class="k">NULL</span> +</div><div id="l37" class="code_block"><span class="p">,</span> <span class="n">TRANSCODE</span> <span class="nb">TEXT</span> <span class="k">NOT</span> <span class="k">NULL</span> +</div><div id="l38" class="code_block"><span class="p">,</span> <span class="n">TRANSAMOUNT</span> <span class="nb">numeric</span> <span class="k">NOT</span> <span class="k">NULL</span> +</div><div id="l39" class="code_block"><span class="p">,</span> <span class="n">STATUS</span> <span class="nb">TEXT</span> +</div><div id="l40" class="code_block"><span class="p">,</span> <span class="n">TRANSACTIONNUMBER</span> <span class="nb">TEXT</span> +</div><div id="l41" class="code_block"><span class="p">,</span> <span class="n">NOTES</span> <span class="nb">TEXT</span> +</div><div id="l42" class="code_block"><span class="p">,</span> <span class="n">CATEGID</span> <span class="nb">integer</span> +</div><div id="l43" class="code_block"><span class="p">,</span> <span class="n">SUBCATEGID</span> <span class="nb">integer</span> +</div><div id="l44" class="code_block"><span class="p">,</span> <span class="n">TRANSDATE</span> <span class="nb">TEXT</span> +</div><div id="l45" class="code_block"><span class="p">,</span> <span class="n">FOLLOWUPID</span> <span class="nb">integer</span> +</div><div id="l46" class="code_block"><span class="p">,</span> <span class="n">TOTRANSAMOUNT</span> <span class="nb">numeric</span> +</div><div id="l47" class="code_block"><span class="p">,</span> <span class="n">REPEATS</span> <span class="nb">integer</span> +</div><div id="l48" class="code_block"><span class="p">,</span> <span class="n">NEXTOCCURRENCEDATE</span> <span class="nb">TEXT</span> +</div><div id="l49" class="code_block"><span class="p">,</span> <span class="n">NUMOCCURRENCES</span> <span class="nb">numeric</span> +</div><div id="l50" class="code_block"><span class="p">);</span> +</div><div id="l51" class="code_block"> +</div><div id="l52" class="code_block"><span class="c1">-- Describe BUDGETSPLITTRANSACTIONS_V1</span> +</div><div id="l53" class="code_block"><span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">BUDGETSPLITTRANSACTIONS_V1</span><span class="p">(</span> +</div><div id="l54" class="code_block"><span class="n">SPLITTRANSID</span> <span class="nb">integer</span> <span class="k">primary</span> <span class="k">key</span> +</div><div id="l55" class="code_block"><span class="p">,</span> <span class="n">TRANSID</span> <span class="nb">integer</span> <span class="k">NOT</span> <span class="k">NULL</span> +</div><div id="l56" class="code_block"><span class="p">,</span> <span class="n">CATEGID</span> <span class="nb">integer</span> +</div><div id="l57" class="code_block"><span class="p">,</span> <span class="n">SUBCATEGID</span> <span class="nb">integer</span> +</div><div id="l58" class="code_block"><span class="p">,</span> <span class="n">SPLITTRANSAMOUNT</span> <span class="nb">numeric</span> +</div><div id="l59" class="code_block"><span class="p">);</span> +</div><div id="l60" class="code_block"> +</div><div id="l61" class="code_block"><span class="c1">-- Describe BUDGETTABLE_V1</span> +</div><div id="l62" class="code_block"><span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">BUDGETTABLE_V1</span><span class="p">(</span> +</div><div id="l63" class="code_block"><span class="n">BUDGETENTRYID</span> <span class="nb">integer</span> <span class="k">primary</span> <span class="k">key</span> +</div><div id="l64" class="code_block"><span class="p">,</span> <span class="n">BUDGETYEARID</span> <span class="nb">integer</span> +</div><div id="l65" class="code_block"><span class="p">,</span> <span class="n">CATEGID</span> <span class="nb">integer</span> +</div><div id="l66" class="code_block"><span class="p">,</span> <span class="n">SUBCATEGID</span> <span class="nb">integer</span> +</div><div id="l67" class="code_block"><span class="p">,</span> <span class="n">PERIOD</span> <span class="nb">TEXT</span> <span class="k">NOT</span> <span class="k">NULL</span> +</div><div id="l68" class="code_block"><span class="p">,</span> <span class="n">AMOUNT</span> <span class="nb">numeric</span> <span class="k">NOT</span> <span class="k">NULL</span> +</div><div id="l69" class="code_block"><span class="p">);</span> +</div><div id="l70" class="code_block"> +</div><div id="l71" class="code_block"><span class="c1">-- Describe BUDGETYEAR_V1</span> +</div><div id="l72" class="code_block"><span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">BUDGETYEAR_V1</span><span class="p">(</span> +</div><div id="l73" class="code_block"><span class="n">BUDGETYEARID</span> <span class="nb">integer</span> <span class="k">primary</span> <span class="k">key</span> +</div><div id="l74" class="code_block"><span class="p">,</span> <span class="n">BUDGETYEARNAME</span> <span class="nb">TEXT</span> <span class="k">NOT</span> <span class="k">NULL</span> <span class="k">UNIQUE</span> +</div><div id="l75" class="code_block"><span class="p">);</span> +</div><div id="l76" class="code_block"> +</div><div id="l77" class="code_block"><span class="c1">-- Describe CATEGORY_V1</span> +</div><div id="l78" class="code_block"><span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">CATEGORY_V1</span><span class="p">(</span> +</div><div id="l79" class="code_block"><span class="n">CATEGID</span> <span class="nb">integer</span> <span class="k">primary</span> <span class="k">key</span> +</div><div id="l80" class="code_block"><span class="p">,</span> <span class="n">CATEGNAME</span> <span class="nb">TEXT</span> <span class="k">NOT</span> <span class="k">NULL</span> +</div><div id="l81" class="code_block"><span class="p">);</span> +</div><div id="l82" class="code_block"> +</div><div id="l83" class="code_block"> +</div><div id="l84" class="code_block"><span class="c1">-- Describe CHECKINGACCOUNT_V1</span> +</div><div id="l85" class="code_block"><span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">CHECKINGACCOUNT_V1</span><span class="p">(</span> +</div><div id="l86" class="code_block"><span class="n">TRANSID</span> <span class="nb">integer</span> <span class="k">primary</span> <span class="k">key</span> +</div><div id="l87" class="code_block"><span class="p">,</span> <span class="n">ACCOUNTID</span> <span class="nb">integer</span> <span class="k">NOT</span> <span class="k">NULL</span> +</div><div id="l88" class="code_block"><span class="p">,</span> <span class="n">TOACCOUNTID</span> <span class="nb">integer</span> +</div><div id="l89" class="code_block"><span class="p">,</span> <span class="n">PAYEEID</span> <span class="nb">integer</span> <span class="k">NOT</span> <span class="k">NULL</span> +</div><div id="l90" class="code_block"><span class="p">,</span> <span class="n">TRANSCODE</span> <span class="nb">TEXT</span> <span class="k">NOT</span> <span class="k">NULL</span> +</div><div id="l91" class="code_block"><span class="p">,</span> <span class="n">TRANSAMOUNT</span> <span class="nb">numeric</span> <span class="k">NOT</span> <span class="k">NULL</span> +</div><div id="l92" class="code_block"><span class="p">,</span> <span class="n">STATUS</span> <span class="nb">TEXT</span> +</div><div id="l93" class="code_block"><span class="p">,</span> <span class="n">TRANSACTIONNUMBER</span> <span class="nb">TEXT</span> +</div><div id="l94" class="code_block"><span class="p">,</span> <span class="n">NOTES</span> <span class="nb">TEXT</span> +</div><div id="l95" class="code_block"><span class="p">,</span> <span class="n">CATEGID</span> <span class="nb">integer</span> +</div><div id="l96" class="code_block"><span class="p">,</span> <span class="n">SUBCATEGID</span> <span class="nb">integer</span> +</div><div id="l97" class="code_block"><span class="p">,</span> <span class="n">TRANSDATE</span> <span class="nb">TEXT</span> +</div><div id="l98" class="code_block"><span class="p">,</span> <span class="n">FOLLOWUPID</span> <span class="nb">integer</span> +</div><div id="l99" class="code_block"><span class="p">,</span> <span class="n">TOTRANSAMOUNT</span> <span class="nb">numeric</span> +</div><div id="l100" class="code_block"><span class="p">);</span> +</div><div id="l101" class="code_block"> +</div><div id="l102" class="code_block"> +</div><div id="l103" class="code_block"><span class="c1">-- Describe CURRENCYFORMATS_V1</span> +</div><div id="l104" class="code_block"><span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">CURRENCYFORMATS_V1</span><span class="p">(</span> +</div><div id="l105" class="code_block"><span class="n">CURRENCYID</span> <span class="nb">integer</span> <span class="k">primary</span> <span class="k">key</span> +</div><div id="l106" class="code_block"><span class="p">,</span> <span class="n">CURRENCYNAME</span> <span class="nb">TEXT</span> <span class="k">NOT</span> <span class="k">NULL</span> <span class="k">UNIQUE</span> +</div><div id="l107" class="code_block"><span class="p">,</span> <span class="n">PFX_SYMBOL</span> <span class="nb">TEXT</span> +</div><div id="l108" class="code_block"><span class="p">,</span> <span class="n">SFX_SYMBOL</span> <span class="nb">TEXT</span> +</div><div id="l109" class="code_block"><span class="p">,</span> <span class="n">DECIMAL_POINT</span> <span class="nb">TEXT</span> +</div><div id="l110" class="code_block"><span class="p">,</span> <span class="n">GROUP_SEPARATOR</span> <span class="nb">TEXT</span> +</div><div id="l111" class="code_block"><span class="p">,</span> <span class="n">UNIT_NAME</span> <span class="nb">TEXT</span> +</div><div id="l112" class="code_block"><span class="p">,</span> <span class="n">CENT_NAME</span> <span class="nb">TEXT</span> +</div><div id="l113" class="code_block"><span class="p">,</span> <span class="k">SCALE</span> <span class="nb">integer</span> +</div><div id="l114" class="code_block"><span class="p">,</span> <span class="n">BASECONVRATE</span> <span class="nb">numeric</span> +</div><div id="l115" class="code_block"><span class="p">,</span> <span class="n">CURRENCY_SYMBOL</span> <span class="nb">TEXT</span> +</div><div id="l116" class="code_block"><span class="p">);</span> +</div><div id="l117" class="code_block"> +</div><div id="l118" class="code_block"> +</div><div id="l119" class="code_block"><span class="c1">-- Describe INFOTABLE_V1</span> +</div><div id="l120" class="code_block"><span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">INFOTABLE_V1</span><span class="p">(</span> +</div><div id="l121" class="code_block"><span class="n">INFOID</span> <span class="nb">integer</span> <span class="k">not</span> <span class="k">null</span> <span class="k">primary</span> <span class="k">key</span> +</div><div id="l122" class="code_block"><span class="p">,</span> <span class="n">INFONAME</span> <span class="nb">TEXT</span> <span class="k">NOT</span> <span class="k">NULL</span> <span class="k">UNIQUE</span> +</div><div id="l123" class="code_block"><span class="p">,</span> <span class="n">INFOVALUE</span> <span class="nb">TEXT</span> <span class="k">NOT</span> <span class="k">NULL</span> +</div><div id="l124" class="code_block"><span class="p">);</span> +</div><div id="l125" class="code_block"> +</div><div id="l126" class="code_block"> +</div><div id="l127" class="code_block"><span class="c1">-- Describe PAYEE_V1</span> +</div><div id="l128" class="code_block"><span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">PAYEE_V1</span><span class="p">(</span> +</div><div id="l129" class="code_block"><span class="n">PAYEEID</span> <span class="nb">integer</span> <span class="k">primary</span> <span class="k">key</span> +</div><div id="l130" class="code_block"><span class="p">,</span> <span class="n">PAYEENAME</span> <span class="nb">TEXT</span> <span class="k">NOT</span> <span class="k">NULL</span> <span class="k">UNIQUE</span> +</div><div id="l131" class="code_block"><span class="p">,</span> <span class="n">CATEGID</span> <span class="nb">integer</span> +</div><div id="l132" class="code_block"><span class="p">,</span> <span class="n">SUBCATEGID</span> <span class="nb">integer</span> +</div><div id="l133" class="code_block"><span class="p">);</span> +</div><div id="l134" class="code_block"> +</div><div id="l135" class="code_block"> +</div><div id="l136" class="code_block"><span class="c1">-- Describe SPLITTRANSACTIONS_V1</span> +</div><div id="l137" class="code_block"><span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">SPLITTRANSACTIONS_V1</span><span class="p">(</span> +</div><div id="l138" class="code_block"><span class="n">SPLITTRANSID</span> <span class="nb">integer</span> <span class="k">primary</span> <span class="k">key</span> +</div><div id="l139" class="code_block"><span class="p">,</span> <span class="n">TRANSID</span> <span class="nb">numeric</span> <span class="k">NOT</span> <span class="k">NULL</span> +</div><div id="l140" class="code_block"><span class="p">,</span> <span class="n">CATEGID</span> <span class="nb">integer</span> +</div><div id="l141" class="code_block"><span class="p">,</span> <span class="n">SUBCATEGID</span> <span class="nb">integer</span> +</div><div id="l142" class="code_block"><span class="p">,</span> <span class="n">SPLITTRANSAMOUNT</span> <span class="nb">numeric</span> +</div><div id="l143" class="code_block"><span class="p">);</span> +</div><div id="l144" class="code_block"> +</div><div id="l145" class="code_block"> +</div><div id="l146" class="code_block"><span class="c1">-- Describe STOCK_V1</span> +</div><div id="l147" class="code_block"><span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">STOCK_V1</span><span class="p">(</span> +</div><div id="l148" class="code_block"><span class="n">STOCKID</span> <span class="nb">integer</span> <span class="k">primary</span> <span class="k">key</span> +</div><div id="l149" class="code_block"><span class="p">,</span> <span class="n">HELDAT</span> <span class="nb">integer</span> +</div><div id="l150" class="code_block"><span class="p">,</span> <span class="n">PURCHASEDATE</span> <span class="nb">TEXT</span> <span class="k">NOT</span> <span class="k">NULL</span> +</div><div id="l151" class="code_block"><span class="p">,</span> <span class="n">STOCKNAME</span> <span class="nb">TEXT</span> <span class="k">NOT</span> <span class="k">NULL</span> <span class="k">UNIQUE</span> +</div><div id="l152" class="code_block"><span class="p">,</span> <span class="n">SYMBOL</span> <span class="nb">TEXT</span> +</div><div id="l153" class="code_block"><span class="p">,</span> <span class="n">NUMSHARES</span> <span class="nb">numeric</span> +</div><div id="l154" class="code_block"><span class="p">,</span> <span class="n">PURCHASEPRICE</span> <span class="nb">numeric</span> <span class="k">NOT</span> <span class="k">NULL</span> +</div><div id="l155" class="code_block"><span class="p">,</span> <span class="n">NOTES</span> <span class="nb">TEXT</span> +</div><div id="l156" class="code_block"><span class="p">,</span> <span class="n">CURRENTPRICE</span> <span class="nb">numeric</span> <span class="k">NOT</span> <span class="k">NULL</span> +</div><div id="l157" class="code_block"><span class="p">,</span> <span class="n">VALUE</span> <span class="nb">numeric</span> +</div><div id="l158" class="code_block"><span class="p">,</span> <span class="n">COMMISSION</span> <span class="nb">numeric</span> +</div><div id="l159" class="code_block"><span class="p">);</span> +</div><div id="l160" class="code_block"> +</div><div id="l161" class="code_block"> +</div><div id="l162" class="code_block"><span class="c1">-- Describe SUBCATEGORY_V1</span> +</div><div id="l163" class="code_block"><span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">SUBCATEGORY_V1</span><span class="p">(</span> +</div><div id="l164" class="code_block"><span class="n">SUBCATEGID</span> <span class="nb">integer</span> <span class="k">primary</span> <span class="k">key</span> +</div><div id="l165" class="code_block"><span class="p">,</span> <span class="n">SUBCATEGNAME</span> <span class="nb">TEXT</span> <span class="k">NOT</span> <span class="k">NULL</span> +</div><div id="l166" class="code_block"><span class="p">,</span> <span class="n">CATEGID</span> <span class="nb">integer</span> <span class="k">NOT</span> <span class="k">NULL</span> +</div><div id="l167" class="code_block"><span class="p">);</span> +</div><div id="l168" class="code_block"> +</div><div id="l169" class="code_block"><span class="c1">-- Describe SETTING_V1</span> +</div><div id="l170" class="code_block"><span class="k">create</span> <span class="k">table</span> <span class="n">SETTING_V1</span><span class="p">(</span> +</div><div id="l171" class="code_block"><span class="n">SETTINGID</span> <span class="nb">integer</span> <span class="k">not</span> <span class="k">null</span> <span class="k">primary</span> <span class="k">key</span> +</div><div id="l172" class="code_block"><span class="p">,</span> <span class="n">SETTINGNAME</span> <span class="nb">TEXT</span> <span class="k">NOT</span> <span class="k">NULL</span> <span class="k">UNIQUE</span> +</div><div id="l173" class="code_block"><span class="p">,</span> <span class="n">SETTINGVALUE</span> <span class="nb">TEXT</span> +</div><div id="l174" class="code_block"><span class="p">);</span> +</div></pre></div> +</td></tr></table> + + </div> + + + </div> + + + </div> + </div> + </section> + +<footer id="site-footer"> + <div class="wrapper"> + <nav> + <h5>SourceForge</h5> + <a href="/about">About</a> + <a href="/blog/category/sitestatus/">Site Status</a> + <a href="http://twitter.com/sfnet_ops">@sfnet_ops</a> + </nav> + <nav> + <h5>Find and Develop Software</h5> + <a href="/create/">Create a Project</a> + <a href="/directory/">Software Directory</a> + <a href="/top">Top Downloaded Projects</a> + </nav> + <nav> + <h5>Community</h5> + <a href="/blog/">Blog</a> + <a href="http://twitter.com/sourceforge">@sourceforge</a> + <a href="/jobs?source=footer">Job Board</a> + </nav> + <nav> + <h5>Help</h5> + <a href="http://p.sf.net/sourceforge/docs">Site Documentation</a> + <a href="/support">Support Request</a> + <a href="http://p.sf.net/sourceforge/irc">Real-Time Support</a> + </nav> + </div> +</footer> +<footer id="site-copyright-footer"> + <div class="wrapper"> + <div id="copyright"> + Copyright © 2013 SourceForge. All Rights Reserved.<br /> + SourceForge is a <a href="http://www.diceholdingsinc.com/phoenix.zhtml?c=211152&p=irol-landing">Dice Holdings, Inc.</a> company. + </div> + <nav> + <a href="http://slashdotmedia.com/terms-of-use">Terms</a> + <a href="http://slashdotmedia.com/privacy-statement/">Privacy</a> + <a href="http://slashdotmedia.com/opt-out-choices">Cookies/Opt Out</a> + <a href="http://slashdotmedia.com">Advertise</a> + <a href="http://sourceforge.jp/">SourceForge.JP</a> + </nav> + </div> +</footer> + <div id="messages"> + + </div> + + <!-- ew:body_js --> + + + <script type="text/javascript" src="http://a.fsdn.com/allura/nf/1371835376/_ew_/_slim/js?href=allura%2Fjs%2Fjquery-base.js%3Ballura%2Fjs%2Fjquery.notify.js%3Ballura%2Fjs%2Fsylvester.js%3Ballura%2Fjs%2Fpb.transformie.min.js%3Ballura%2Fjs%2Fallura-base.js"></script> + + +<!-- /ew:body_js --> + + + + <!-- ew:body_js_tail --> + + + +<!-- /ew:body_js_tail --> + + + + +<script type="text/javascript" src="http://a.fsdn.com/allura/nf/1371835376/_static_/js/spin.min.js"></script> +<script type="text/javascript">(function() { + $('#access_urls .btn').click(function(evt){ + evt.preventDefault(); + var parent = $(this).parents('.btn-bar'); + $(parent).find('input').val($(this).attr('data-url')); + $(parent).find('span').text($(this).attr('title')+' access'); + $(this).parent().children('.btn').removeClass('active'); + $(this).addClass('active'); + }); + $('#access_urls .btn').first().click(); + + + var repo_status = document.getElementById('repo_status'); + // The repo_status div will only be present if repo.status != 'ready' + if (repo_status) { + var opts = { + lines: 9, // The number of lines to draw + length: 4, // The length of each line + width: 2, // The line thickness + radius: 3, // The radius of the inner circle + rotate: 0, // The rotation offset + color: '#555', // #rgb or #rrggbb + speed: 1, // Rounds per second + trail: 60, // Afterglow percentage + shadow: false, // Whether to render a shadow + hwaccel: false, // Whether to use hardware acceleration + className: 'spinner', // The CSS class to assign to the spinner + zIndex: 2e9, // The z-index (defaults to 2000000000) + top: 10, // Top position relative to parent in px + left: 10 // Left position relative to parent in px + }; + var spinner = new Spinner(opts).spin(repo_status); + function check_status() { + $.get('/p/moneymanagerex/code/status', function(data) { + if (data.status === 'ready') { + window.clearInterval(status_checker); + spinner.opts.speed = 0; + spinner.opts.opacity = 1; + spinner.spin(repo_status) + $('#repo_status h2').html('Repo status: ready. <a href=".">Click here to refresh this page.</a>'); + } + else { + $('#repo_status h2 span').html(data.status); + } + }); + } + // Check repo status every 15 seconds + var status_checker = window.setInterval(check_status, 15000); + + } +}()); +</script> + +<script type="text/javascript">(function() { + $(window).bind('hashchange', function(e) { + var hash = window.location.hash.substring(1); + if ('originalEvent' in e && 'oldURL' in e.originalEvent) { + $('#' + e.originalEvent.oldURL.split('#')[1]).css('background-color', 'transparent'); + } + if (hash !== '' && hash.substring(0, 1) === 'l' && !isNaN(hash.substring(1))) { + $('#' + hash).css('background-color', '#ffff99'); + } + }).trigger('hashchange'); + + $('.code_block').each(function(index, element) { + $(element).bind('click', function() { + var hash = window.location.hash.substring(1); + if (hash !== '' && hash.substring(0, 1) === 'l' && !isNaN(hash.substring(1))) { + $('#' + hash).css('background-color', 'transparent'); + } + $(element).css('background-color', '#ffff99'); + window.location.href = '#' + $(element).attr('id'); + }); + }); +}()); +</script> + + + + + + + <script src="//s.fsdn.com/con/js/webtracker.js" type="text/javascript"></script> + <!-- Google Code for Remarketing tag --> + <!-- Remarketing tags may not be associated with personally identifiable information or placed on pages related to sensitive categories. For instructions on adding this tag and more information on the above requirements, read the setup guide: google.com/ads/remarketingsetup --> + <script type="text/javascript"> + /* <![CDATA[ */ + var google_conversion_id = 1002083962; + var google_conversion_label = "G_uGCOaBlAQQ-qzq3QM"; + var google_custom_params = window.google_tag_params; + var google_remarketing_only = true; + /* ]]> */ + </script> + <script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"> </script> + <noscript> + <div style="display:inline;"> + <img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/1002083962/?value=0&label=G_uGCOaBlAQQ-qzq3QM&guid=ON&script=0"/> + </div> + </noscript> + + </body> +</html> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2013-06-22 10:22:48
|
Revision: 4137 http://sourceforge.net/p/moneymanagerex/code/4137 Author: guanlisheng Date: 2013-06-22 10:22:44 +0000 (Sat, 22 Jun 2013) Log Message: ----------- add update_revision.sh Modified Paths: -------------- trunk/bootstrap Added Paths: ----------- trunk/update_revision.sh Modified: trunk/bootstrap =================================================================== --- trunk/bootstrap 2013-06-22 08:55:06 UTC (rev 4136) +++ trunk/bootstrap 2013-06-22 10:22:44 UTC (rev 4137) @@ -1,5 +1,14 @@ #!/bin/sh +# Touch revision.m4 +if [ -f ./update_revision.sh ]; then + ./update_revision.sh; +elif [ ! -f ./revision.m4 ]; then + echo "m4_define([SVN_REV], 0)" > ./revision.m4; + echo "m4_define([SVN_REVISION], trunk-r0)" >> ./revision.m4; + echo "m4_define([SVN_DATE], )" >> ./revision.m4; +fi + cd build/bakefiles bakefile_gen Added: trunk/update_revision.sh =================================================================== --- trunk/update_revision.sh (rev 0) +++ trunk/update_revision.sh 2013-06-22 10:22:44 UTC (rev 4137) @@ -0,0 +1,50 @@ +#!/bin/sh + +# +# This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3 +# http://www.gnu.org/licenses/gpl-3.0.html +# +# $Revision: 8962 $ +# $Id: update_revision.sh 8962 2013-04-07 10:37:27Z biplab $ +# $HeadURL: svn://svn.code.sf.net/p/codeblocks/code/trunk/update_revision.sh $ +# + + +# make sure [git-]svn answers in english +export LC_ALL="C" + +REV_FILE=./revision.m4 + +# let's import OLD_REV (if there) +if [ -f ./.last_revision ]; then + . ./.last_revision +else + OLD_REV=0 +fi + +if svn --xml info >/dev/null 2>&1; then + REV=`svn --xml info | tr -d '\r\n' | sed -e 's/.*<commit.*revision="\([0-9]*\)".*<\/commit>.*/\1/'` + LCD=`svn --xml info | tr -d '\r\n' | sed -e 's/.*<commit.*<date>\([0-9\-]*\)\T\([0-9\:]*\)\..*<\/date>.*<\/commit>.*/\1 \2/'` +elif svn --info >/dev/null 2>&1; then + REV=`svn info | grep "^Revision:" | cut -d" " -f2` + LCD=`svn info | grep "^Last Changed Date:" | cut -d" " -f4,5` +elif git svn --version >/dev/null 2>&1; then + REV=`git svn info | grep "^Revision:" | cut -d" " -f2` + LCD=`git svn info | grep "^Last Changed Date:" | cut -d" " -f4,5` +elif git version >/dev/null 2>&1; then + REV=`git log --max-count=1 | grep -o -e "@\([0-9]*\)" | tr -d '@ '` + LCD=`git log --max-count=1 | grep -o -e "Date: \(.*\)" | cut -d " " -f 5-9` +else + REV=0 + LCD="" +fi + +if [ "x$REV" != "x$OLD_REV" -o ! -r $REV_FILE ]; then + echo "m4_define([SVN_REV], $REV)" > $REV_FILE + echo "m4_define([SVN_REVISION], 0.9.9.2svn$REV)" >> $REV_FILE + echo "m4_define([SVN_DATE], $LCD)" >> $REV_FILE +fi + +echo "OLD_REV=$REV" > ./.last_revision + +exit 0 Property changes on: trunk/update_revision.sh ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2013-06-22 12:24:36
|
Revision: 4139 http://sourceforge.net/p/moneymanagerex/code/4139 Author: guanlisheng Date: 2013-06-22 12:24:29 +0000 (Sat, 22 Jun 2013) Log Message: ----------- svn propset Modified Paths: -------------- trunk/aclocal.m4 trunk/update_revision.sh Property Changed: ---------------- trunk/INSTALL.TXT trunk/Makefile.in trunk/README.RU trunk/README.TXT trunk/aclocal.m4 trunk/sql/tables_v1.sql trunk/src/aboutdialog.cpp trunk/src/aboutdialog.h trunk/src/appstartdialog.cpp trunk/src/appstartdialog.h trunk/src/assetdialog.cpp trunk/src/assetdialog.h trunk/src/assetspanel.cpp trunk/src/assetspanel.h trunk/src/billsdepositsdialog.cpp trunk/src/billsdepositsdialog.h trunk/src/billsdepositspanel.cpp trunk/src/billsdepositspanel.h trunk/src/budgetentrydialog.cpp trunk/src/budgetentrydialog.h trunk/src/budgetingpanel.cpp trunk/src/budgetingpanel.h trunk/src/budgetyeardialog.cpp trunk/src/budgetyeardialog.h trunk/src/budgetyearentrydialog.cpp trunk/src/budgetyearentrydialog.h trunk/src/categdialog.cpp trunk/src/categdialog.h trunk/src/chart.cpp trunk/src/chart.h trunk/src/constants.cpp trunk/src/constants.h trunk/src/currencydialog.cpp trunk/src/currencydialog.h trunk/src/customreportdialog.cpp trunk/src/customreportdialog.h trunk/src/customreportdisplay.cpp trunk/src/customreportdisplay.h trunk/src/customreportindex.cpp trunk/src/customreportindex.h trunk/src/db/account.cpp trunk/src/db/account.h trunk/src/db/assets.cpp trunk/src/db/assets.h trunk/src/db/budget_table.cpp trunk/src/db/budget_table.h trunk/src/db/budget_year.cpp trunk/src/db/budget_year.h trunk/src/db/category.cpp trunk/src/db/category.h trunk/src/db/currency.cpp trunk/src/db/currency.h trunk/src/db/entry_base.cpp trunk/src/db/entry_base.h trunk/src/db/payee_table.cpp trunk/src/db/payee_table.h trunk/src/db/settings.cpp trunk/src/db/settings.h trunk/src/db/splittransaction.cpp trunk/src/db/splittransaction.h trunk/src/db/stocks.cpp trunk/src/db/stocks.h trunk/src/db/subcategory.cpp trunk/src/db/subcategory.h trunk/src/db/transaction.cpp trunk/src/db/transaction.h trunk/src/db/transactionbill.cpp trunk/src/db/transactionbill.h trunk/src/dbwrapper.cpp trunk/src/dbwrapper.h trunk/src/defs.h trunk/src/fileviewerdialog.cpp trunk/src/fileviewerdialog.h trunk/src/filtertransdialog.cpp trunk/src/filtertransdialog.h trunk/src/guiid.h trunk/src/htmlbuilder.cpp trunk/src/htmlbuilder.h trunk/src/lua_interface.cpp trunk/src/lua_interface.h trunk/src/maincurrencydialog.cpp trunk/src/maincurrencydialog.h trunk/src/mmCurrencyFormatter.cpp trunk/src/mmCurrencyFormatter.h trunk/src/mmOption.cpp trunk/src/mmOption.h trunk/src/mm_Scriptable_Objects.h trunk/src/mmaccount.cpp trunk/src/mmaccount.h trunk/src/mmcategory.cpp trunk/src/mmcategory.h trunk/src/mmcheckingpanel.cpp trunk/src/mmcheckingpanel.h trunk/src/mmcoredb.cpp trunk/src/mmcoredb.h trunk/src/mmcurrency.cpp trunk/src/mmcurrency.h trunk/src/mmex.cpp trunk/src/mmex.h trunk/src/mmex_settings.cpp trunk/src/mmex_settings.h trunk/src/mmgraphgenerator.cpp trunk/src/mmgraphgenerator.h trunk/src/mmgraphincexpensesmonth.cpp trunk/src/mmgraphincexpensesmonth.h trunk/src/mmgraphpie.cpp trunk/src/mmgraphpie.h trunk/src/mmgraphtopcategories.cpp trunk/src/mmgraphtopcategories.h trunk/src/mmhelppanel.cpp trunk/src/mmhelppanel.h trunk/src/mmhomepagepanel.cpp trunk/src/mmhomepagepanel.h trunk/src/mmpanelbase.h trunk/src/mmpayee.cpp trunk/src/mmpayee.h trunk/src/mmreportspanel.cpp trunk/src/mmreportspanel.h trunk/src/mmtransaction.cpp trunk/src/mmtransaction.h trunk/src/newacctdialog.cpp trunk/src/newacctdialog.h trunk/src/optionsdialog.cpp trunk/src/optionsdialog.h trunk/src/paths.cpp trunk/src/paths.h trunk/src/payeedialog.cpp trunk/src/payeedialog.h trunk/src/platfdep.h trunk/src/qif_export.cpp trunk/src/qif_export.h trunk/src/qif_import.cpp trunk/src/qif_import.h trunk/src/recentfiles.cpp trunk/src/recentfiles.h trunk/src/relocatecategorydialog.cpp trunk/src/relocatecategorydialog.h trunk/src/relocatepayeedialog.cpp trunk/src/relocatepayeedialog.h trunk/src/reportbase.h trunk/src/resource.h trunk/src/singleton.h trunk/src/splitdetailsdialog.cpp trunk/src/splitdetailsdialog.h trunk/src/splittransactionsdialog.cpp trunk/src/splittransactionsdialog.h trunk/src/stockdialog.cpp trunk/src/stockdialog.h trunk/src/stockspanel.cpp trunk/src/stockspanel.h trunk/src/transdialog.cpp trunk/src/transdialog.h trunk/src/univcsvdialog.cpp trunk/src/univcsvdialog.h trunk/src/util.cpp trunk/src/util.h trunk/src/validators.h trunk/update_revision.sh Index: trunk/INSTALL.TXT =================================================================== --- trunk/INSTALL.TXT 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/INSTALL.TXT 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/INSTALL.TXT ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/Makefile.in =================================================================== --- trunk/Makefile.in 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/Makefile.in 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/Makefile.in ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/README.RU =================================================================== --- trunk/README.RU 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/README.RU 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/README.RU ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/README.TXT =================================================================== --- trunk/README.TXT 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/README.TXT 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/README.TXT ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Modified: trunk/aclocal.m4 =================================================================== --- trunk/aclocal.m4 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/aclocal.m4 2013-06-22 12:24:29 UTC (rev 4139) @@ -519,7 +519,7 @@ dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER dnl DEALINGS IN THE SOFTWARE. dnl -dnl $Id: bakefile-lang.m4 1337 2010-02-09 20:22:43Z vaclavslavik $ +dnl $Id$ dnl dnl Compiler detection macros by David Elliott and Vadim Zeitlin dnl @@ -836,7 +836,7 @@ dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER dnl DEALINGS IN THE SOFTWARE. dnl -dnl $Id: bakefile.m4 1346 2011-02-01 14:03:00Z vaclavslavik $ +dnl $Id$ dnl dnl Support macros for makefiles generated by BAKEFILE. dnl Property changes on: trunk/aclocal.m4 ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/sql/tables_v1.sql =================================================================== --- trunk/sql/tables_v1.sql 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/sql/tables_v1.sql 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/sql/tables_v1.sql ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/aboutdialog.cpp =================================================================== --- trunk/src/aboutdialog.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/aboutdialog.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/aboutdialog.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/aboutdialog.h =================================================================== --- trunk/src/aboutdialog.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/aboutdialog.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/aboutdialog.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/appstartdialog.cpp =================================================================== --- trunk/src/appstartdialog.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/appstartdialog.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/appstartdialog.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/appstartdialog.h =================================================================== --- trunk/src/appstartdialog.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/appstartdialog.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/appstartdialog.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/assetdialog.cpp =================================================================== --- trunk/src/assetdialog.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/assetdialog.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/assetdialog.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/assetdialog.h =================================================================== --- trunk/src/assetdialog.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/assetdialog.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/assetdialog.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/assetspanel.cpp =================================================================== --- trunk/src/assetspanel.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/assetspanel.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/assetspanel.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/assetspanel.h =================================================================== --- trunk/src/assetspanel.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/assetspanel.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/assetspanel.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/billsdepositsdialog.cpp =================================================================== --- trunk/src/billsdepositsdialog.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/billsdepositsdialog.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/billsdepositsdialog.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/billsdepositsdialog.h =================================================================== --- trunk/src/billsdepositsdialog.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/billsdepositsdialog.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/billsdepositsdialog.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/billsdepositspanel.cpp =================================================================== --- trunk/src/billsdepositspanel.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/billsdepositspanel.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/billsdepositspanel.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/billsdepositspanel.h =================================================================== --- trunk/src/billsdepositspanel.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/billsdepositspanel.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/billsdepositspanel.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/budgetentrydialog.cpp =================================================================== --- trunk/src/budgetentrydialog.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/budgetentrydialog.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/budgetentrydialog.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/budgetentrydialog.h =================================================================== --- trunk/src/budgetentrydialog.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/budgetentrydialog.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/budgetentrydialog.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/budgetingpanel.cpp =================================================================== --- trunk/src/budgetingpanel.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/budgetingpanel.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/budgetingpanel.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/budgetingpanel.h =================================================================== --- trunk/src/budgetingpanel.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/budgetingpanel.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/budgetingpanel.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/budgetyeardialog.cpp =================================================================== --- trunk/src/budgetyeardialog.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/budgetyeardialog.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/budgetyeardialog.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/budgetyeardialog.h =================================================================== --- trunk/src/budgetyeardialog.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/budgetyeardialog.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/budgetyeardialog.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/budgetyearentrydialog.cpp =================================================================== --- trunk/src/budgetyearentrydialog.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/budgetyearentrydialog.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/budgetyearentrydialog.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/budgetyearentrydialog.h =================================================================== --- trunk/src/budgetyearentrydialog.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/budgetyearentrydialog.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/budgetyearentrydialog.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/categdialog.cpp =================================================================== --- trunk/src/categdialog.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/categdialog.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/categdialog.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/categdialog.h =================================================================== --- trunk/src/categdialog.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/categdialog.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/categdialog.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/chart.cpp =================================================================== --- trunk/src/chart.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/chart.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/chart.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/chart.h =================================================================== --- trunk/src/chart.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/chart.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/chart.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/constants.cpp =================================================================== --- trunk/src/constants.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/constants.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/constants.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/constants.h =================================================================== --- trunk/src/constants.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/constants.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/constants.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/currencydialog.cpp =================================================================== --- trunk/src/currencydialog.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/currencydialog.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/currencydialog.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/currencydialog.h =================================================================== --- trunk/src/currencydialog.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/currencydialog.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/currencydialog.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/customreportdialog.cpp =================================================================== --- trunk/src/customreportdialog.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/customreportdialog.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/customreportdialog.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/customreportdialog.h =================================================================== --- trunk/src/customreportdialog.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/customreportdialog.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/customreportdialog.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/customreportdisplay.cpp =================================================================== --- trunk/src/customreportdisplay.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/customreportdisplay.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/customreportdisplay.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/customreportdisplay.h =================================================================== --- trunk/src/customreportdisplay.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/customreportdisplay.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/customreportdisplay.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/customreportindex.cpp =================================================================== --- trunk/src/customreportindex.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/customreportindex.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/customreportindex.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/customreportindex.h =================================================================== --- trunk/src/customreportindex.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/customreportindex.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/customreportindex.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/db/account.cpp =================================================================== --- trunk/src/db/account.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/db/account.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/db/account.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/db/account.h =================================================================== --- trunk/src/db/account.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/db/account.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/db/account.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/db/assets.cpp =================================================================== --- trunk/src/db/assets.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/db/assets.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/db/assets.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/db/assets.h =================================================================== --- trunk/src/db/assets.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/db/assets.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/db/assets.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/db/budget_table.cpp =================================================================== --- trunk/src/db/budget_table.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/db/budget_table.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/db/budget_table.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/db/budget_table.h =================================================================== --- trunk/src/db/budget_table.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/db/budget_table.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/db/budget_table.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/db/budget_year.cpp =================================================================== --- trunk/src/db/budget_year.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/db/budget_year.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/db/budget_year.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/db/budget_year.h =================================================================== --- trunk/src/db/budget_year.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/db/budget_year.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/db/budget_year.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/db/category.cpp =================================================================== --- trunk/src/db/category.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/db/category.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/db/category.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/db/category.h =================================================================== --- trunk/src/db/category.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/db/category.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/db/category.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/db/currency.cpp =================================================================== --- trunk/src/db/currency.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/db/currency.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/db/currency.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/db/currency.h =================================================================== --- trunk/src/db/currency.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/db/currency.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/db/currency.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/db/entry_base.cpp =================================================================== --- trunk/src/db/entry_base.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/db/entry_base.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/db/entry_base.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/db/entry_base.h =================================================================== --- trunk/src/db/entry_base.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/db/entry_base.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/db/entry_base.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/db/payee_table.cpp =================================================================== --- trunk/src/db/payee_table.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/db/payee_table.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/db/payee_table.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/db/payee_table.h =================================================================== --- trunk/src/db/payee_table.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/db/payee_table.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/db/payee_table.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/db/settings.cpp =================================================================== --- trunk/src/db/settings.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/db/settings.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/db/settings.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/db/settings.h =================================================================== --- trunk/src/db/settings.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/db/settings.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/db/settings.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/db/splittransaction.cpp =================================================================== --- trunk/src/db/splittransaction.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/db/splittransaction.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/db/splittransaction.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/db/splittransaction.h =================================================================== --- trunk/src/db/splittransaction.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/db/splittransaction.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/db/splittransaction.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/db/stocks.cpp =================================================================== --- trunk/src/db/stocks.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/db/stocks.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/db/stocks.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/db/stocks.h =================================================================== --- trunk/src/db/stocks.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/db/stocks.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/db/stocks.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/db/subcategory.cpp =================================================================== --- trunk/src/db/subcategory.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/db/subcategory.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/db/subcategory.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/db/subcategory.h =================================================================== --- trunk/src/db/subcategory.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/db/subcategory.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/db/subcategory.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/db/transaction.cpp =================================================================== --- trunk/src/db/transaction.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/db/transaction.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/db/transaction.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/db/transaction.h =================================================================== --- trunk/src/db/transaction.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/db/transaction.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/db/transaction.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/db/transactionbill.cpp =================================================================== --- trunk/src/db/transactionbill.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/db/transactionbill.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/db/transactionbill.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/db/transactionbill.h =================================================================== --- trunk/src/db/transactionbill.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/db/transactionbill.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/db/transactionbill.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/dbwrapper.cpp =================================================================== --- trunk/src/dbwrapper.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/dbwrapper.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/dbwrapper.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/dbwrapper.h =================================================================== --- trunk/src/dbwrapper.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/dbwrapper.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/dbwrapper.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/defs.h =================================================================== --- trunk/src/defs.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/defs.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/defs.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/fileviewerdialog.cpp =================================================================== --- trunk/src/fileviewerdialog.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/fileviewerdialog.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/fileviewerdialog.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/fileviewerdialog.h =================================================================== --- trunk/src/fileviewerdialog.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/fileviewerdialog.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/fileviewerdialog.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/filtertransdialog.cpp =================================================================== --- trunk/src/filtertransdialog.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/filtertransdialog.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/filtertransdialog.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/filtertransdialog.h =================================================================== --- trunk/src/filtertransdialog.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/filtertransdialog.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/filtertransdialog.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/guiid.h =================================================================== --- trunk/src/guiid.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/guiid.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/guiid.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/htmlbuilder.cpp =================================================================== --- trunk/src/htmlbuilder.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/htmlbuilder.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/htmlbuilder.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/htmlbuilder.h =================================================================== --- trunk/src/htmlbuilder.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/htmlbuilder.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/htmlbuilder.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/lua_interface.cpp =================================================================== --- trunk/src/lua_interface.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/lua_interface.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/lua_interface.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/lua_interface.h =================================================================== --- trunk/src/lua_interface.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/lua_interface.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/lua_interface.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/maincurrencydialog.cpp =================================================================== --- trunk/src/maincurrencydialog.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/maincurrencydialog.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/maincurrencydialog.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/maincurrencydialog.h =================================================================== --- trunk/src/maincurrencydialog.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/maincurrencydialog.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/maincurrencydialog.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmCurrencyFormatter.cpp =================================================================== --- trunk/src/mmCurrencyFormatter.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmCurrencyFormatter.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmCurrencyFormatter.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmCurrencyFormatter.h =================================================================== --- trunk/src/mmCurrencyFormatter.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmCurrencyFormatter.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmCurrencyFormatter.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmOption.cpp =================================================================== --- trunk/src/mmOption.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmOption.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmOption.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmOption.h =================================================================== --- trunk/src/mmOption.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmOption.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmOption.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mm_Scriptable_Objects.h =================================================================== --- trunk/src/mm_Scriptable_Objects.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mm_Scriptable_Objects.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mm_Scriptable_Objects.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmaccount.cpp =================================================================== --- trunk/src/mmaccount.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmaccount.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmaccount.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmaccount.h =================================================================== --- trunk/src/mmaccount.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmaccount.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmaccount.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmcategory.cpp =================================================================== --- trunk/src/mmcategory.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmcategory.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmcategory.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmcategory.h =================================================================== --- trunk/src/mmcategory.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmcategory.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmcategory.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmcheckingpanel.cpp =================================================================== --- trunk/src/mmcheckingpanel.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmcheckingpanel.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmcheckingpanel.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmcheckingpanel.h =================================================================== --- trunk/src/mmcheckingpanel.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmcheckingpanel.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmcheckingpanel.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmcoredb.cpp =================================================================== --- trunk/src/mmcoredb.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmcoredb.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmcoredb.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmcoredb.h =================================================================== --- trunk/src/mmcoredb.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmcoredb.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmcoredb.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmcurrency.cpp =================================================================== --- trunk/src/mmcurrency.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmcurrency.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmcurrency.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmcurrency.h =================================================================== --- trunk/src/mmcurrency.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmcurrency.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmcurrency.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmex.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmex.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmex.h =================================================================== --- trunk/src/mmex.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmex.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmex.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmex_settings.cpp =================================================================== --- trunk/src/mmex_settings.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmex_settings.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmex_settings.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmex_settings.h =================================================================== --- trunk/src/mmex_settings.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmex_settings.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmex_settings.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmgraphgenerator.cpp =================================================================== --- trunk/src/mmgraphgenerator.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmgraphgenerator.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmgraphgenerator.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmgraphgenerator.h =================================================================== --- trunk/src/mmgraphgenerator.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmgraphgenerator.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmgraphgenerator.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmgraphincexpensesmonth.cpp =================================================================== --- trunk/src/mmgraphincexpensesmonth.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmgraphincexpensesmonth.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmgraphincexpensesmonth.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmgraphincexpensesmonth.h =================================================================== --- trunk/src/mmgraphincexpensesmonth.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmgraphincexpensesmonth.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmgraphincexpensesmonth.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmgraphpie.cpp =================================================================== --- trunk/src/mmgraphpie.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmgraphpie.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmgraphpie.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmgraphpie.h =================================================================== --- trunk/src/mmgraphpie.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmgraphpie.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmgraphpie.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmgraphtopcategories.cpp =================================================================== --- trunk/src/mmgraphtopcategories.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmgraphtopcategories.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmgraphtopcategories.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmgraphtopcategories.h =================================================================== --- trunk/src/mmgraphtopcategories.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmgraphtopcategories.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmgraphtopcategories.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmhelppanel.cpp =================================================================== --- trunk/src/mmhelppanel.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmhelppanel.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmhelppanel.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmhelppanel.h =================================================================== --- trunk/src/mmhelppanel.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmhelppanel.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmhelppanel.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmhomepagepanel.cpp =================================================================== --- trunk/src/mmhomepagepanel.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmhomepagepanel.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmhomepagepanel.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmhomepagepanel.h =================================================================== --- trunk/src/mmhomepagepanel.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmhomepagepanel.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmhomepagepanel.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmpanelbase.h =================================================================== --- trunk/src/mmpanelbase.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmpanelbase.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmpanelbase.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmpayee.cpp =================================================================== --- trunk/src/mmpayee.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmpayee.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmpayee.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmpayee.h =================================================================== --- trunk/src/mmpayee.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmpayee.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmpayee.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmreportspanel.cpp =================================================================== --- trunk/src/mmreportspanel.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmreportspanel.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmreportspanel.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmreportspanel.h =================================================================== --- trunk/src/mmreportspanel.h 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmreportspanel.h 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmreportspanel.h ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmtransaction.cpp =================================================================== --- trunk/src/mmtransaction.cpp 2013-06-22 10:49:06 UTC (rev 4138) +++ trunk/src/mmtransaction.cpp 2013-06-22 12:24:29 UTC (rev 4139) Property changes on: trunk/src/mmtransaction.cpp ___________________________________________________________________ Modified: svn:keywords ## -1 +1 ## -Author Revision +Date Author Revision HeadURL Id \ No newline at end of property Index: trunk/src/mmtransaction.h =============================================================... [truncated message content] |
From: <gua...@us...> - 2013-06-22 14:30:59
|
Revision: 4143 http://sourceforge.net/p/moneymanagerex/code/4143 Author: guanlisheng Date: 2013-06-22 14:30:53 +0000 (Sat, 22 Jun 2013) Log Message: ----------- update version Modified Paths: -------------- trunk/configure trunk/configure.ac Modified: trunk/configure =================================================================== --- trunk/configure 2013-06-22 13:28:47 UTC (rev 4142) +++ trunk/configure 2013-06-22 14:30:53 UTC (rev 4143) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for MoneyManagerEx 0.9.9.0. +# Generated by GNU Autoconf 2.69 for MoneyManagerEx 0.9.9.2. # # Report bugs to <ma...@so...>. # @@ -579,8 +579,8 @@ # Identity of this package. PACKAGE_NAME='MoneyManagerEx' PACKAGE_TARNAME='moneymanagerex' -PACKAGE_VERSION='0.9.9.0' -PACKAGE_STRING='MoneyManagerEx 0.9.9.0' +PACKAGE_VERSION='0.9.9.2' +PACKAGE_STRING='MoneyManagerEx 0.9.9.2' PACKAGE_BUGREPORT='ma...@so...' PACKAGE_URL='' @@ -1300,7 +1300,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures MoneyManagerEx 0.9.9.0 to adapt to many kinds of systems. +\`configure' configures MoneyManagerEx 0.9.9.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1366,7 +1366,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of MoneyManagerEx 0.9.9.0:";; + short | recursive ) echo "Configuration of MoneyManagerEx 0.9.9.2:";; esac cat <<\_ACEOF @@ -1480,7 +1480,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -MoneyManagerEx configure 0.9.9.0 +MoneyManagerEx configure 0.9.9.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1647,7 +1647,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by MoneyManagerEx $as_me 0.9.9.0, which was +It was created by MoneyManagerEx $as_me 0.9.9.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -10459,7 +10459,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by MoneyManagerEx $as_me 0.9.9.0, which was +This file was extended by MoneyManagerEx $as_me 0.9.9.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -10512,7 +10512,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -MoneyManagerEx config.status 0.9.9.0 +MoneyManagerEx config.status 0.9.9.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2013-06-22 13:28:47 UTC (rev 4142) +++ trunk/configure.ac 2013-06-22 14:30:53 UTC (rev 4143) @@ -3,7 +3,7 @@ ########################################################################## AC_PREREQ(2.53) -AC_INIT([MoneyManagerEx], [0.9.9.0], [ma...@so...]) +AC_INIT([MoneyManagerEx], [0.9.9.2], [ma...@so...]) ########################################################################## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2013-06-22 15:27:48
|
Revision: 4144 http://sourceforge.net/p/moneymanagerex/code/4144 Author: guanlisheng Date: 2013-06-22 15:27:45 +0000 (Sat, 22 Jun 2013) Log Message: ----------- cleanup Modified Paths: -------------- trunk/configure trunk/configure.ac Modified: trunk/configure =================================================================== --- trunk/configure 2013-06-22 14:30:53 UTC (rev 4143) +++ trunk/configure 2013-06-22 15:27:45 UTC (rev 4144) @@ -5493,7 +5493,7 @@ fi - WX_ADDITIONAL_LIBS="base, core, html, xml, net, aui, adv, qa,core,base" + WX_ADDITIONAL_LIBS="html, net, aui, adv, qa,core,base" if test x${WX_CONFIG_NAME+set} != xset ; then Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2013-06-22 14:30:53 UTC (rev 4143) +++ trunk/configure.ac 2013-06-22 15:27:45 UTC (rev 4144) @@ -45,7 +45,7 @@ AM_OPTIONS_WXCONFIG AM_OPTIONS_WXPRESETS -AM_WXPRESETS_FULL([2.9.4], [base, core, html, xml, net, aui, adv, qa]) +AM_WXPRESETS_FULL([2.9.4], [html, net, aui, adv, qa]) ########################################################################## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2013-06-22 15:37:37
|
Revision: 4145 http://sourceforge.net/p/moneymanagerex/code/4145 Author: guanlisheng Date: 2013-06-22 15:37:34 +0000 (Sat, 22 Jun 2013) Log Message: ----------- cleanup and pass SVN_REVISION from revision.m4 Modified Paths: -------------- trunk/configure.ac Removed Paths: ------------- trunk/configure Deleted: trunk/configure =================================================================== --- trunk/configure 2013-06-22 15:27:45 UTC (rev 4144) +++ trunk/configure 2013-06-22 15:37:34 UTC (rev 4145) @@ -1,11219 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for MoneyManagerEx 0.9.9.2. -# -# Report bugs to <ma...@so...>. -# -# -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1 -test -x / || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug...@gn... and -$0: ma...@so... about your system, including any -$0: error possibly output before this message. Then install -$0: a modern shell, or manually run the script under such a -$0: shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -test -n "$DJDIR" || exec 7<&0 </dev/null -exec 6>&1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='MoneyManagerEx' -PACKAGE_TARNAME='moneymanagerex' -PACKAGE_VERSION='0.9.9.2' -PACKAGE_STRING='MoneyManagerEx 0.9.9.2' -PACKAGE_BUGREPORT='ma...@so...' -PACKAGE_URL='' - -ac_unique_file="src/mmex.cpp" -ac_subst_vars='LTLIBOBJS -LIBOBJS -COND_WX_DEBUG_1_WX_UNICODE_1 -COND_WX_DEBUG_1_WX_UNICODE_0 -COND_WX_DEBUG_0_WX_UNICODE_1 -COND_PLATFORM_WIN32_1 -COND_PLATFORM_OS2_1 -COND_PLATFORM_MAC_1 -COND_PLATFORM_MAC_0 -COND_DEPS_TRACKING_1 -COND_DEPS_TRACKING_0 -OBJCXXFLAGS -SETFILE -REZ -WINDRES -BK_DEPS -DEPS_TRACKING -SONAME_FLAG -USE_SOTWOSYMLINKS -USE_MACVERSION -USE_SOVERCYGWIN -USE_SOVERSOLARIS -USE_SOVERLINUX -USE_SOVERSION -WINDOWS_IMPLIB -PIC_FLAG -SHARED_LD_MODULE_CXX -SHARED_LD_MODULE_CC -SHARED_LD_CXX -SHARED_LD_CC -AIX_CXX_LD -dlldir -DLLPREFIX_MODULE -DLLPREFIX -LIBEXT -LIBPREFIX -DLLIMP_SUFFIX -SO_SUFFIX_MODULE -SO_SUFFIX -PLATFORM_BEOS -PLATFORM_OS2 -PLATFORM_MACOSX -PLATFORM_MACOS -PLATFORM_MAC -PLATFORM_MSDOS -PLATFORM_WIN32 -PLATFORM_UNIX -IF_GNU_MAKE -LDFLAGS_GUI -INSTALL_DIR -NM -STRIP -AROPTIONS -AR -MAKE_SET -SET_MAKE -WX_GTKPORT_VERSION -WX_PORT -WX_VERSION_MINOR -WX_VERSION_MAJOR -WX_VERSION_FULL -WX_RESCOMP -WX_VERSION -WX_LIBS_STATIC -WX_LIBS -WX_CXXFLAGS_ONLY -WX_CFLAGS_ONLY -WX_CXXFLAGS -WX_CFLAGS -WX_CPPFLAGS -WX_CONFIG_PATH -LN_S -AWK -HAVE_CXX11 -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -RANLIB -CPP -CXXCPP -ac_ct_CC -CFLAGS -CC -OBJEXT -EXEEXT -ac_ct_CXX -CPPFLAGS -LDFLAGS -CXXFLAGS -CXX -target_os -target_vendor -target_cpu -target -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_largefile -with_wxdir -with_wx_config -with_wx_prefix -with_wx_exec_prefix -enable_debug -enable_unicode -enable_shared -with_motif -with_gtk -with_x11 -with_mac -with_cocoa -with_mgl -with_msw -with_wxshared -enable_omf -enable_dependency_tracking -' - ac_precious_vars='build_alias -host_alias -target_alias -CXX -CXXFLAGS -LDFLAGS -LIBS -CPPFLAGS -CCC -CC -CFLAGS -CXXCPP -CPP' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures MoneyManagerEx 0.9.9.2 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/moneymanagerex] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] - --target=TARGET configure for building compilers for TARGET [HOST] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of MoneyManagerEx 0.9.9.2:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-largefile omit support for large files - --enable-debug Builds in debug mode (default is auto) - --enable-unicode Builds in unicode mode (default is auto) - --enable-shared Builds in shared mode (default is auto) - --enable-omf use OMF object format (OS/2) - --disable-dependency-tracking - don't use dependency tracking even if the compiler - can - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-wxdir=PATH Use uninstalled version of wxWidgets in PATH - --with-wx-config=CONFIG wx-config script to use (optional) - --with-wx-prefix=PREFIX Prefix where wxWidgets is installed (optional) - --with-wx-exec-prefix=PREFIX - Exec prefix where wxWidgets is installed (optional) - --with-motif Uses the wxMotif port (default is auto) - --with-gtk Uses the wxGTK port (default is auto) - --with-x11 Uses the wxX11 port (default is auto) - --with-mac Uses the wxMac port (default is auto) - --with-cocoa Uses the wxCocoa port (default is auto) - --with-mgl Uses the wxMGL port (default is auto) - --with-msw Uses the wxMSW port (default is auto) - --with-wxshared Builds against a shared build of wxWidgets (default - is auto) - -Some influential environment variables: - CXX C++ compiler command - CXXFLAGS C++ compiler flags - LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a - nonstandard directory <lib dir> - LIBS libraries to pass to the linker, e.g. -l<library> - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if - you have headers in a nonstandard directory <include dir> - CC C compiler command - CFLAGS C compiler flags - CXXCPP C++ preprocessor - CPP C preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to <ma...@so...>. -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -MoneyManagerEx configure 0.9.9.2 -generated by GNU Autoconf 2.69 - -Copyright (C) 2012 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_cxx_try_compile LINENO -# ---------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_compile - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_cxx_try_cpp LINENO -# ------------------------ -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_cpp - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by MoneyManagerEx $as_me 0.9.9.2, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to... [truncated message content] |
From: <gua...@us...> - 2013-06-23 06:31:02
|
Revision: 4152 http://sourceforge.net/p/moneymanagerex/code/4152 Author: guanlisheng Date: 2013-06-23 06:30:57 +0000 (Sun, 23 Jun 2013) Log Message: ----------- svn:ignore Property Changed: ---------------- trunk/ trunk/lib/ trunk/lib/lua/ trunk/lib/sqlite/ trunk/lib/wxsqlite/ trunk/src/ trunk/src/reports/ Index: trunk =================================================================== --- trunk 2013-06-23 06:17:27 UTC (rev 4151) +++ trunk 2013-06-23 06:30:57 UTC (rev 4152) Property changes on: trunk ___________________________________________________________________ Modified: svn:ignore ## -1 +1 ## -mmex_release +CMakefiles Index: trunk/lib =================================================================== --- trunk/lib 2013-06-23 06:17:27 UTC (rev 4151) +++ trunk/lib 2013-06-23 06:30:57 UTC (rev 4152) Property changes on: trunk/lib ___________________________________________________________________ Added: svn:ignore ## -0,0 +1 ## +CMakefiles Index: trunk/lib/lua =================================================================== --- trunk/lib/lua 2013-06-23 06:17:27 UTC (rev 4151) +++ trunk/lib/lua 2013-06-23 06:30:57 UTC (rev 4152) Property changes on: trunk/lib/lua ___________________________________________________________________ Added: svn:ignore ## -0,0 +1 ## +CMakeFiles Index: trunk/lib/sqlite =================================================================== --- trunk/lib/sqlite 2013-06-23 06:17:27 UTC (rev 4151) +++ trunk/lib/sqlite 2013-06-23 06:30:57 UTC (rev 4152) Property changes on: trunk/lib/sqlite ___________________________________________________________________ Added: svn:ignore ## -0,0 +1 ## +CMakefiles Index: trunk/lib/wxsqlite =================================================================== --- trunk/lib/wxsqlite 2013-06-23 06:17:27 UTC (rev 4151) +++ trunk/lib/wxsqlite 2013-06-23 06:30:57 UTC (rev 4152) Property changes on: trunk/lib/wxsqlite ___________________________________________________________________ Added: svn:ignore ## -0,0 +1 ## +CMakefiles Index: trunk/src =================================================================== --- trunk/src 2013-06-23 06:17:27 UTC (rev 4151) +++ trunk/src 2013-06-23 06:30:57 UTC (rev 4152) Property changes on: trunk/src ___________________________________________________________________ Added: svn:ignore ## -0,0 +1 ## +CMakefiles Index: trunk/src/reports =================================================================== --- trunk/src/reports 2013-06-23 06:17:27 UTC (rev 4151) +++ trunk/src/reports 2013-06-23 06:30:57 UTC (rev 4152) Property changes on: trunk/src/reports ___________________________________________________________________ Added: svn:ignore ## -0,0 +1 ## +*.cmake This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2013-06-23 14:05:30
|
Revision: 4154 http://sourceforge.net/p/moneymanagerex/code/4154 Author: guanlisheng Date: 2013-06-23 14:05:25 +0000 (Sun, 23 Jun 2013) Log Message: ----------- fix mmex_tests.bkl Modified Paths: -------------- trunk/build/bakefiles/Bakefiles.bkgen trunk/build/msw/tests/makefile.gcc trunk/build/msw/tests/makefile.vc trunk/m4/autoconf_inc.m4 trunk/src/tests/Makefile.in Modified: trunk/build/bakefiles/Bakefiles.bkgen =================================================================== --- trunk/build/bakefiles/Bakefiles.bkgen 2013-06-23 11:54:29 UTC (rev 4153) +++ trunk/build/bakefiles/Bakefiles.bkgen 2013-06-23 14:05:25 UTC (rev 4154) @@ -12,7 +12,7 @@ <input> mmex.bkl - ../../src/tests/*.bkl + mmex_tests.bkl ../../po/*.bkl ../../setup/win/*.bkl </input> @@ -54,6 +54,9 @@ -o../msw/mmex.sln </add-flags> + <add-flags files="mmex_tests.bkl" formats="autoconf"> + -o../../src/tests/Makefile.in + </add-flags> <add-flags files="mmex_tests.bkl" formats="mingw"> -o../msw/tests/makefile.gcc </add-flags> Modified: trunk/build/msw/tests/makefile.gcc =================================================================== --- trunk/build/msw/tests/makefile.gcc 2013-06-23 11:54:29 UTC (rev 4153) +++ trunk/build/msw/tests/makefile.gcc 2013-06-23 14:05:25 UTC (rev 4154) @@ -30,6 +30,8 @@ LUA_CFLAGS = -mthreads -W -Wall $(__DEBUGINFO) $(__OPTIMIZEFLAG) \ $(__DEBUG_DEFINE_p) $(CPPFLAGS) $(CFLAGS) LUA_OBJECTS = \ + lua_dtoa.o \ + lua_g_fmt.o \ lua_lapi.o \ lua_lauxlib.o \ lua_lbaselib.o \ @@ -60,10 +62,12 @@ lua_ltablib.o \ lua_ltm.o \ lua_lua.o \ + lua_lua_cjson.o \ lua_luac.o \ lua_lundump.o \ lua_lvm.o \ - lua_lzio.o + lua_lzio.o \ + lua_strbuf.o UNITTESTPP_CXXFLAGS = -mthreads -W -Wall $(__DEBUGINFO) $(__OPTIMIZEFLAG) \ $(__DEBUG_DEFINE_p) $(CPPFLAGS) $(CXXFLAGS) UNITTESTPP_OBJECTS = \ @@ -89,7 +93,8 @@ -I$(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX) -I$(WX_DIR)\include -mthreads -W \ -Wall $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__DEBUG_DEFINE_p) \ -I..\..\..\lib\sqlite -I..\..\..\lib\wxsqlite -I..\..\..\lib\lua\src \ - -DNOPCH -I..\..\..\src -I..\..\..\lib\UnitTest++ $(CPPFLAGS) $(CXXFLAGS) + -I..\..\..\lib -DNOPCH -I..\..\..\src -I..\..\..\lib\UnitTest++ $(CPPFLAGS) \ + $(CXXFLAGS) MMEX_TESTS_OBJECTS = \ mmex_tests_aboutdialog.o \ mmex_tests_appstartdialog.o \ @@ -359,6 +364,12 @@ sqlite_sqlite3secure.o: ../../../lib/sqlite/sqlite3secure.c $(CC) -c -o $@ $(SQLITE_CFLAGS) $(CPPDEPS) $< +lua_dtoa.o: ../../../lib/lua/src/dtoa.c + $(CC) -c -o $@ $(LUA_CFLAGS) $(CPPDEPS) $< + +lua_g_fmt.o: ../../../lib/lua/src/g_fmt.c + $(CC) -c -o $@ $(LUA_CFLAGS) $(CPPDEPS) $< + lua_lapi.o: ../../../lib/lua/src/lapi.c $(CC) -c -o $@ $(LUA_CFLAGS) $(CPPDEPS) $< @@ -449,6 +460,9 @@ lua_lua.o: ../../../lib/lua/src/lua.c $(CC) -c -o $@ $(LUA_CFLAGS) $(CPPDEPS) $< +lua_lua_cjson.o: ../../../lib/lua/src/lua_cjson.c + $(CC) -c -o $@ $(LUA_CFLAGS) $(CPPDEPS) $< + lua_luac.o: ../../../lib/lua/src/luac.c $(CC) -c -o $@ $(LUA_CFLAGS) $(CPPDEPS) $< @@ -461,6 +475,9 @@ lua_lzio.o: ../../../lib/lua/src/lzio.c $(CC) -c -o $@ $(LUA_CFLAGS) $(CPPDEPS) $< +lua_strbuf.o: ../../../lib/lua/src/strbuf.c + $(CC) -c -o $@ $(LUA_CFLAGS) $(CPPDEPS) $< + UnitTestPP_AssertException.o: ../../../lib/UnitTest++/AssertException.cpp $(CXX) -c -o $@ $(UNITTESTPP_CXXFLAGS) $(CPPDEPS) $< @@ -792,7 +809,7 @@ $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< mmex_tests_mmex_tests_rc.o: ../../../src/tests/mmex_tests.rc - windres --use-temp-file -i$< -o$@ --define HAVE_W32API_H $(____WX_SHARED_35_p_1) $(__WXUNICODE_DEFINE_p_2) $(__WXDEBUG_DEFINE_p_2) --define __WXMSW__ --include-dir $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX) --include-dir $(WX_DIR)/include $(__DEBUG_DEFINE_p_5) --include-dir ../../../lib/sqlite --include-dir ../../../lib/wxsqlite --include-dir ../../../lib/lua/src --define NOPCH --include-dir ../../../src --include-dir ../../../lib/UnitTest++ + windres --use-temp-file -i$< -o$@ --define HAVE_W32API_H $(____WX_SHARED_35_p_1) $(__WXUNICODE_DEFINE_p_2) $(__WXDEBUG_DEFINE_p_2) --define __WXMSW__ --include-dir $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX) --include-dir $(WX_DIR)/include $(__DEBUG_DEFINE_p_5) --include-dir ../../../lib/sqlite --include-dir ../../../lib/wxsqlite --include-dir ../../../lib/lua/src --include-dir ../../../lib --define NOPCH --include-dir ../../../src --include-dir ../../../lib/UnitTest++ .PHONY: all install uninstall clean check Modified: trunk/build/msw/tests/makefile.vc =================================================================== --- trunk/build/msw/tests/makefile.vc 2013-06-23 11:54:29 UTC (rev 4153) +++ trunk/build/msw/tests/makefile.vc 2013-06-23 14:05:25 UTC (rev 4154) @@ -30,6 +30,8 @@ LUA_CFLAGS = /MD$(__DEBUGINFO_3) /DWIN32 /W4 $(__DEBUGINFO) $(____DEBUGINFO) \ /Fdlua.pdb $(__OPTIMIZEFLAG) $(__DEBUG_DEFINE_p) $(CPPFLAGS) $(CFLAGS) LUA_OBJECTS = \ + lua_dtoa.obj \ + lua_g_fmt.obj \ lua_lapi.obj \ lua_lauxlib.obj \ lua_lbaselib.obj \ @@ -60,10 +62,12 @@ lua_ltablib.obj \ lua_ltm.obj \ lua_lua.obj \ + lua_lua_cjson.obj \ lua_luac.obj \ lua_lundump.obj \ lua_lvm.obj \ - lua_lzio.obj + lua_lzio.obj \ + lua_strbuf.obj UNITTESTPP_CXXFLAGS = /MD$(__DEBUGINFO_3) /DWIN32 /W4 $(__DEBUGINFO) \ $(____DEBUGINFO) /FdUnitTestPP.pdb $(__OPTIMIZEFLAG) $(__DEBUG_DEFINE_p) \ /EHsc /GR $(CPPFLAGS) $(CXXFLAGS) @@ -90,9 +94,9 @@ /I$(WX_DIR)$(__WXLIBPATH_FILENAMES_1)\msw$(WXLIBPOSTFIX) \ /I$(WX_DIR)\include /W4 $(__DEBUGINFO) $(____DEBUGINFO) /Fdmmex_tests.pdb \ $(__OPTIMIZEFLAG) $(__DEBUG_DEFINE_p) /I..\..\..\lib\sqlite \ - /I..\..\..\lib\wxsqlite /I..\..\..\lib\lua\src /DNOPCH /D_CONSOLE \ - /I..\..\..\src /I..\..\..\lib\UnitTest++ /EHsc /GR $(__mmex_tests_CL_FLAGS) \ - $(CPPFLAGS) $(CXXFLAGS) + /I..\..\..\lib\wxsqlite /I..\..\..\lib\lua\src /I..\..\..\lib /DNOPCH \ + /D_CONSOLE /I..\..\..\src /I..\..\..\lib\UnitTest++ /EHsc /GR \ + $(__mmex_tests_CL_FLAGS) $(CPPFLAGS) $(CXXFLAGS) MMEX_TESTS_OBJECTS = \ mmex_tests_aboutdialog.obj \ mmex_tests_appstartdialog.obj \ @@ -451,6 +455,12 @@ sqlite_sqlite3secure.obj: ..\..\..\lib\sqlite\sqlite3secure.c $(CC) /c /nologo /TC /Fo$@ $(SQLITE_CFLAGS) ..\..\..\lib\sqlite\sqlite3secure.c +lua_dtoa.obj: ..\..\..\lib\lua\src\dtoa.c + $(CC) /c /nologo /TC /Fo$@ $(LUA_CFLAGS) ..\..\..\lib\lua\src\dtoa.c + +lua_g_fmt.obj: ..\..\..\lib\lua\src\g_fmt.c + $(CC) /c /nologo /TC /Fo$@ $(LUA_CFLAGS) ..\..\..\lib\lua\src\g_fmt.c + lua_lapi.obj: ..\..\..\lib\lua\src\lapi.c $(CC) /c /nologo /TC /Fo$@ $(LUA_CFLAGS) ..\..\..\lib\lua\src\lapi.c @@ -541,6 +551,9 @@ lua_lua.obj: ..\..\..\lib\lua\src\lua.c $(CC) /c /nologo /TC /Fo$@ $(LUA_CFLAGS) ..\..\..\lib\lua\src\lua.c +lua_lua_cjson.obj: ..\..\..\lib\lua\src\lua_cjson.c + $(CC) /c /nologo /TC /Fo$@ $(LUA_CFLAGS) ..\..\..\lib\lua\src\lua_cjson.c + lua_luac.obj: ..\..\..\lib\lua\src\luac.c $(CC) /c /nologo /TC /Fo$@ $(LUA_CFLAGS) ..\..\..\lib\lua\src\luac.c @@ -553,6 +566,9 @@ lua_lzio.obj: ..\..\..\lib\lua\src\lzio.c $(CC) /c /nologo /TC /Fo$@ $(LUA_CFLAGS) ..\..\..\lib\lua\src\lzio.c +lua_strbuf.obj: ..\..\..\lib\lua\src\strbuf.c + $(CC) /c /nologo /TC /Fo$@ $(LUA_CFLAGS) ..\..\..\lib\lua\src\strbuf.c + UnitTestPP_AssertException.obj: ..\..\..\lib\UnitTest++\AssertException.cpp $(CXX) /c /nologo /TP /Fo$@ $(UNITTESTPP_CXXFLAGS) ..\..\..\lib\UnitTest++\AssertException.cpp @@ -884,5 +900,5 @@ $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\tests\util_test.cpp mmex_tests_mmex_tests.res: ..\..\..\src\tests\mmex_tests.rc - rc /fo$@ /d WIN32 $(____WX_SHARED_61_p_1) $(__WXUNICODE_DEFINE_p_2) $(__WXDEBUG_DEFINE_p_2) /d __WXMSW__ /i $(WX_DIR)$(__WXLIBPATH_FILENAMES_2)\msw$(WXLIBPOSTFIX) /i $(WX_DIR)\include $(____DEBUGINFO_70_p_1) $(__DEBUG_DEFINE_p_5) /i ..\..\..\lib\sqlite /i ..\..\..\lib\wxsqlite /i ..\..\..\lib\lua\src /d NOPCH /d _CONSOLE /i ..\..\..\src /i ..\..\..\lib\UnitTest++ ..\..\..\src\tests\mmex_tests.rc + rc /fo$@ /d WIN32 $(____WX_SHARED_61_p_1) $(__WXUNICODE_DEFINE_p_2) $(__WXDEBUG_DEFINE_p_2) /d __WXMSW__ /i $(WX_DIR)$(__WXLIBPATH_FILENAMES_2)\msw$(WXLIBPOSTFIX) /i $(WX_DIR)\include $(____DEBUGINFO_70_p_1) $(__DEBUG_DEFINE_p_5) /i ..\..\..\lib\sqlite /i ..\..\..\lib\wxsqlite /i ..\..\..\lib\lua\src /i ..\..\..\lib /d NOPCH /d _CONSOLE /i ..\..\..\src /i ..\..\..\lib\UnitTest++ ..\..\..\src\tests\mmex_tests.rc Modified: trunk/m4/autoconf_inc.m4 =================================================================== --- trunk/m4/autoconf_inc.m4 2013-06-23 11:54:29 UTC (rev 4153) +++ trunk/m4/autoconf_inc.m4 2013-06-23 14:05:25 UTC (rev 4154) @@ -1,4 +1,4 @@ -dnl ### begin block 00_header[../../i18n/i18n.bkl,../../po/po.bkl,../../runtime/en/i18n.bkl,../../runtime/en/i18n2.bkl,../../setup/win/setup.bkl,../../setup/win32/setup.bkl,../../src/tests/mmex_tests.bkl,mmex.bkl] ### +dnl ### begin block 00_header[../../i18n/i18n.bkl,../../po/po.bkl,../../runtime/en/i18n.bkl,../../runtime/en/i18n2.bkl,../../setup/win/setup.bkl,../../setup/win32/setup.bkl,../../src/tests/mmex_tests.bkl,mmex.bkl,mmex_tests.bkl] ### dnl dnl This macro was generated by dnl Bakefile 0.2.9 (http://www.bakefile.org) @@ -6,25 +6,25 @@ BAKEFILE_AUTOCONF_INC_M4_VERSION="0.2.9" -dnl ### begin block 20_COND_DEPS_TRACKING_0[../../i18n/i18n.bkl,../../po/po.bkl,../../runtime/en/i18n.bkl,../../runtime/en/i18n2.bkl,../../setup/win/setup.bkl,../../setup/win32/setup.bkl,../../src/tests/mmex_tests.bkl,mmex.bkl] ### +dnl ### begin block 20_COND_DEPS_TRACKING_0[../../i18n/i18n.bkl,../../po/po.bkl,../../runtime/en/i18n.bkl,../../runtime/en/i18n2.bkl,../../setup/win/setup.bkl,../../setup/win32/setup.bkl,../../src/tests/mmex_tests.bkl,mmex.bkl,mmex_tests.bkl] ### COND_DEPS_TRACKING_0="#" if test "x$DEPS_TRACKING" = "x0" ; then COND_DEPS_TRACKING_0="" fi AC_SUBST(COND_DEPS_TRACKING_0) -dnl ### begin block 20_COND_DEPS_TRACKING_1[../../i18n/i18n.bkl,../../po/po.bkl,../../runtime/en/i18n.bkl,../../runtime/en/i18n2.bkl,../../setup/win/setup.bkl,../../setup/win32/setup.bkl,../../src/tests/mmex_tests.bkl,mmex.bkl] ### +dnl ### begin block 20_COND_DEPS_TRACKING_1[../../i18n/i18n.bkl,../../po/po.bkl,../../runtime/en/i18n.bkl,../../runtime/en/i18n2.bkl,../../setup/win/setup.bkl,../../setup/win32/setup.bkl,../../src/tests/mmex_tests.bkl,mmex.bkl,mmex_tests.bkl] ### COND_DEPS_TRACKING_1="#" if test "x$DEPS_TRACKING" = "x1" ; then COND_DEPS_TRACKING_1="" fi AC_SUBST(COND_DEPS_TRACKING_1) -dnl ### begin block 20_COND_PLATFORM_MAC_0[../../src/tests/mmex_tests.bkl,mmex.bkl] ### +dnl ### begin block 20_COND_PLATFORM_MAC_0[../../src/tests/mmex_tests.bkl,mmex.bkl,mmex_tests.bkl] ### COND_PLATFORM_MAC_0="#" if test "x$PLATFORM_MAC" = "x0" ; then COND_PLATFORM_MAC_0="" fi AC_SUBST(COND_PLATFORM_MAC_0) -dnl ### begin block 20_COND_PLATFORM_MAC_1[../../src/tests/mmex_tests.bkl,mmex.bkl] ### +dnl ### begin block 20_COND_PLATFORM_MAC_1[../../src/tests/mmex_tests.bkl,mmex.bkl,mmex_tests.bkl] ### COND_PLATFORM_MAC_1="#" if test "x$PLATFORM_MAC" = "x1" ; then COND_PLATFORM_MAC_1="" @@ -36,25 +36,25 @@ COND_PLATFORM_OS2_1="" fi AC_SUBST(COND_PLATFORM_OS2_1) -dnl ### begin block 20_COND_PLATFORM_WIN32_1[../../src/tests/mmex_tests.bkl,mmex.bkl] ### +dnl ### begin block 20_COND_PLATFORM_WIN32_1[../../src/tests/mmex_tests.bkl,mmex.bkl,mmex_tests.bkl] ### COND_PLATFORM_WIN32_1="#" if test "x$PLATFORM_WIN32" = "x1" ; then COND_PLATFORM_WIN32_1="" fi AC_SUBST(COND_PLATFORM_WIN32_1) -dnl ### begin block 20_COND_WX_DEBUG_0_WX_UNICODE_1[../../src/tests/mmex_tests.bkl,mmex.bkl] ### +dnl ### begin block 20_COND_WX_DEBUG_0_WX_UNICODE_1[../../src/tests/mmex_tests.bkl,mmex.bkl,mmex_tests.bkl] ### COND_WX_DEBUG_0_WX_UNICODE_1="#" if test "x$WX_DEBUG" = "x0" -a "x$WX_UNICODE" = "x1" ; then COND_WX_DEBUG_0_WX_UNICODE_1="" fi AC_SUBST(COND_WX_DEBUG_0_WX_UNICODE_1) -dnl ### begin block 20_COND_WX_DEBUG_1_WX_UNICODE_0[../../src/tests/mmex_tests.bkl,mmex.bkl] ### +dnl ### begin block 20_COND_WX_DEBUG_1_WX_UNICODE_0[../../src/tests/mmex_tests.bkl,mmex.bkl,mmex_tests.bkl] ### COND_WX_DEBUG_1_WX_UNICODE_0="#" if test "x$WX_DEBUG" = "x1" -a "x$WX_UNICODE" = "x0" ; then COND_WX_DEBUG_1_WX_UNICODE_0="" fi AC_SUBST(COND_WX_DEBUG_1_WX_UNICODE_0) -dnl ### begin block 20_COND_WX_DEBUG_1_WX_UNICODE_1[../../src/tests/mmex_tests.bkl,mmex.bkl] ### +dnl ### begin block 20_COND_WX_DEBUG_1_WX_UNICODE_1[../../src/tests/mmex_tests.bkl,mmex.bkl,mmex_tests.bkl] ### COND_WX_DEBUG_1_WX_UNICODE_1="#" if test "x$WX_DEBUG" = "x1" -a "x$WX_UNICODE" = "x1" ; then COND_WX_DEBUG_1_WX_UNICODE_1="" Modified: trunk/src/tests/Makefile.in =================================================================== --- trunk/src/tests/Makefile.in 2013-06-23 11:54:29 UTC (rev 4153) +++ trunk/src/tests/Makefile.in 2013-06-23 14:05:25 UTC (rev 4154) @@ -47,6 +47,8 @@ sqlite_sqlite3secure.o LUA_CFLAGS = $(PIC_FLAG) $(CPPFLAGS) $(CFLAGS) LUA_OBJECTS = \ + lua_dtoa.o \ + lua_g_fmt.o \ lua_lapi.o \ lua_lauxlib.o \ lua_lbaselib.o \ @@ -77,10 +79,12 @@ lua_ltablib.o \ lua_ltm.o \ lua_lua.o \ + lua_lua_cjson.o \ lua_luac.o \ lua_lundump.o \ lua_lvm.o \ - lua_lzio.o + lua_lzio.o \ + lua_strbuf.o UNITTESTPP_CXXFLAGS = $(PIC_FLAG) $(CPPFLAGS) $(CXXFLAGS) UNITTESTPP_OBJECTS = \ UnitTestPP_AssertException.o \ @@ -102,9 +106,10 @@ UnitTestPP_SignalTranslator.o \ UnitTestPP_TimeHelpers.o MMEX_TESTS_CXXFLAGS = -I$(srcdir)/../../lib/sqlite \ - -I$(srcdir)/../../lib/wxsqlite -I$(srcdir)/../../lib/lua/src -DNOPCH \ - -I$(srcdir)/../../src -I$(srcdir)/../../lib/UnitTest++ $(WX_CXXFLAGS) \ - $(PIC_FLAG) $(CPPFLAGS) $(CXXFLAGS) + -I$(srcdir)/../../lib/wxsqlite -I$(srcdir)/../../lib/lua/src \ + -I$(srcdir)/../../lib -DNOPCH -I$(srcdir)/../../src \ + -I$(srcdir)/../../lib/UnitTest++ $(WX_CXXFLAGS) $(PIC_FLAG) $(CPPFLAGS) \ + $(CXXFLAGS) MMEX_TESTS_OBJECTS = \ mmex_tests_aboutdialog.o \ mmex_tests_appstartdialog.o \ @@ -271,6 +276,12 @@ sqlite_sqlite3secure.o: $(srcdir)/../../lib/sqlite/sqlite3secure.c $(CCC) -c -o $@ $(SQLITE_CFLAGS) $(srcdir)/../../lib/sqlite/sqlite3secure.c +lua_dtoa.o: $(srcdir)/../../lib/lua/src/dtoa.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/../../lib/lua/src/dtoa.c + +lua_g_fmt.o: $(srcdir)/../../lib/lua/src/g_fmt.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/../../lib/lua/src/g_fmt.c + lua_lapi.o: $(srcdir)/../../lib/lua/src/lapi.c $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/../../lib/lua/src/lapi.c @@ -361,6 +372,9 @@ lua_lua.o: $(srcdir)/../../lib/lua/src/lua.c $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/../../lib/lua/src/lua.c +lua_lua_cjson.o: $(srcdir)/../../lib/lua/src/lua_cjson.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/../../lib/lua/src/lua_cjson.c + lua_luac.o: $(srcdir)/../../lib/lua/src/luac.c $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/../../lib/lua/src/luac.c @@ -373,6 +387,9 @@ lua_lzio.o: $(srcdir)/../../lib/lua/src/lzio.c $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/../../lib/lua/src/lzio.c +lua_strbuf.o: $(srcdir)/../../lib/lua/src/strbuf.c + $(CCC) -c -o $@ $(LUA_CFLAGS) $(srcdir)/../../lib/lua/src/strbuf.c + UnitTestPP_AssertException.o: $(srcdir)/../../lib/UnitTest++/AssertException.cpp $(CXXC) -c -o $@ $(UNITTESTPP_CXXFLAGS) $(srcdir)/../../lib/UnitTest++/AssertException.cpp @@ -707,7 +724,7 @@ $(CXXC) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(srcdir)/../../src/tests/util_test.cpp mmex_tests_mmex_tests_rc.o: $(srcdir)/../../src/tests/mmex_tests.rc - $(WX_RESCOMP) -i$< -o$@ --include-dir $(srcdir)/../../lib/sqlite --include-dir $(srcdir)/../../lib/wxsqlite --include-dir $(srcdir)/../../lib/lua/src --define NOPCH --include-dir $(srcdir)/../../src --include-dir $(srcdir)/../../lib/UnitTest++ + $(WX_RESCOMP) -i$< -o$@ --include-dir $(srcdir)/../../lib/sqlite --include-dir $(srcdir)/../../lib/wxsqlite --include-dir $(srcdir)/../../lib/lua/src --include-dir $(srcdir)/../../lib --define NOPCH --include-dir $(srcdir)/../../src --include-dir $(srcdir)/../../lib/UnitTest++ # Include dependency info, if present: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2013-06-26 14:48:13
|
Revision: 4191 http://sourceforge.net/p/moneymanagerex/code/4191 Author: vomikan Date: 2013-06-26 14:48:10 +0000 (Wed, 26 Jun 2013) Log Message: ----------- revert previous changes and VS config fix Modified Paths: -------------- trunk/build/msw-vc-2012e/mmex_mmex.vcxproj trunk/src/db/assets.cpp trunk/src/db/entry_base.h Modified: trunk/build/msw-vc-2012e/mmex_mmex.vcxproj =================================================================== --- trunk/build/msw-vc-2012e/mmex_mmex.vcxproj 2013-06-26 14:47:48 UTC (rev 4190) +++ trunk/build/msw-vc-2012e/mmex_mmex.vcxproj 2013-06-26 14:48:10 UTC (rev 4191) @@ -82,7 +82,7 @@ <ClCompile> <AdditionalOptions>/Zi %(AdditionalOptions)</AdditionalOptions> <Optimization>MaxSpeed</Optimization> - <AdditionalIncludeDirectories>$(WXWIN)\lib\vc_lib\mswu;$(WXWIN)\include;..\..\lib\sqlite;..\..\lib\wxsqlite;..\..\lib\lua\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>$(WXWIN)\lib\vc_lib\mswu;$(WXWIN)\include;..\..\lib;..\..\lib\sqlite;..\..\lib\wxsqlite;..\..\lib\lua\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;_UNICODE;__WXMSW__;NDEBUG;NOPCH;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <ExceptionHandling>Sync</ExceptionHandling> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> Modified: trunk/src/db/assets.cpp =================================================================== --- trunk/src/db/assets.cpp 2013-06-26 14:47:48 UTC (rev 4190) +++ trunk/src/db/assets.cpp 2013-06-26 14:48:10 UTC (rev 4191) @@ -21,8 +21,8 @@ #include <sstream> #include "assets.h" #include "../mmCurrencyFormatter.h" -#include "../cajun/json/reader.h" -#include "../cajun/json/writer.h" +#include "cajun/json/reader.h" +#include "cajun/json/writer.h" /************************************************************************************ TAssetEntry Methods Modified: trunk/src/db/entry_base.h =================================================================== --- trunk/src/db/entry_base.h 2013-06-26 14:47:48 UTC (rev 4190) +++ trunk/src/db/entry_base.h 2013-06-26 14:48:10 UTC (rev 4191) @@ -22,7 +22,7 @@ #include "../defs.h" #include "../util.h" -#include "../cajun/json/elements.h" +#include "cajun/json/elements.h" /************************************************************************************ Class TEntryBase This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2013-07-01 05:36:58
|
Revision: 4214 http://sourceforge.net/p/moneymanagerex/code/4214 Author: vomikan Date: 2013-07-01 05:36:55 +0000 (Mon, 01 Jul 2013) Log Message: ----------- currency seeds csv file deprecated Modified Paths: -------------- trunk/src/dbwrapper.cpp trunk/src/mmcurrency.cpp trunk/src/paths.cpp trunk/src/paths.h Removed Paths: ------------- trunk/resources/currency_seed.csv Deleted: trunk/resources/currency_seed.csv =================================================================== --- trunk/resources/currency_seed.csv 2013-07-01 05:35:53 UTC (rev 4213) +++ trunk/resources/currency_seed.csv 2013-07-01 05:36:55 UTC (rev 4214) @@ -1,7 +0,0 @@ -UK Pound ;£;;.;,;Pound;Pence;100;1;GBP -Russian Ruble ;; р.;,;;р.;к.;100;1;RUB -Indian Rupee ;;₹;,;;rupee;;100;1;INR -New Taiwan Dollar ;NT$;;,;.;dollar;;100;1;TWD -Ukraine Hryvna ;;₴;;,;Грн.;к.;100;1;UAH -Swiss Franc ;;Fr.;.;,;franc;centimes;100;1;CHF -East Caribbean Dollars;EC$;;.;,;dollar;cents;100;1;XCD Modified: trunk/src/dbwrapper.cpp =================================================================== --- trunk/src/dbwrapper.cpp 2013-07-01 05:35:53 UTC (rev 4213) +++ trunk/src/dbwrapper.cpp 2013-07-01 05:36:55 UTC (rev 4214) @@ -22,6 +22,7 @@ #include "mmOption.h" #include "paths.h" #include "constants.h" +#include "mmcurrency.h" //---------------------------------------------------------------------------- #include <sqlite3.h> //---------------------------------------------------------------------------- @@ -194,56 +195,30 @@ bool mmDBWrapper::initCurrencyV1Table(wxSQLite3Database* db) { bool result = true; - /* Load Default Currencies */ - wxSortedArrayString currencies; - currencies.Add("US Dollar ;$;;.;,;dollar;cents;100;1;USD"); - // currencies.Add("EURO;€;;.;,;euro;cent;100;1;EUR"); - // Euro symbol € incorrectly displayed in windows. Correct when using \u20ac equivalent. - // MS-VC++ 2010: Ignore warning C4428: universal-character-name encountered in source - #pragma warning( push ) - #pragma warning( disable : 4428 ) - currencies.Add("EURO;\u20ac;;.;,;euro;cent;100;1;EUR"); - #pragma warning( pop ) - wxString fileName = mmex::getPathResource(mmex::CURRENCY_DB_SEED); - if (!fileName.empty()) + mmCurrency* mm_curr; + for (const auto& i : mm_curr->currency_map()) { - wxTextFile tFile(fileName); - if (tFile.Open()) + if (wxString("USD EUR GBP RUB INR TWD UAH CHF XCD").Contains(i.second.currencySymbol_)) { - wxString str; - for (str = tFile.GetFirstLine(); !tFile.Eof(); str = tFile.GetNextLine()) - { - currencies.Add(str); - } + std::vector<wxString> data; + data.push_back(i.second.currencyName_); + data.push_back(i.second.pfxSymbol_); + data.push_back(i.second.sfxSymbol_); + data.push_back(i.second.dec_); + data.push_back(i.second.grp_); + data.push_back(i.second.unit_); + data.push_back(i.second.cent_); + data.push_back(wxString() << i.second.scaleDl_); + data.push_back(wxString() << i.second.baseConv_); + data.push_back(i.second.currencySymbol_); + + long lLastRowId; + wxString sql = wxString::FromUTF8(INSERT_INTO_CURRENCYFORMATS_V1); + int err = mmSQLiteExecuteUpdate(db, data, sql, lLastRowId); + result = (err == 0); } - else - { - wxMessageBox(_("Unable to open file."), _("Currency Manager"), wxOK|wxICON_WARNING); - } } - - for (size_t i = 0; i < currencies.Count(); ++i) - { - wxStringTokenizer tk(currencies[i], ";"); - - std::vector<wxString> data; - data.push_back(tk.GetNextToken().Trim()); - data.push_back(tk.GetNextToken()); - data.push_back(tk.GetNextToken()); - data.push_back(tk.GetNextToken()); - data.push_back(tk.GetNextToken()); - data.push_back(tk.GetNextToken()); - data.push_back(tk.GetNextToken()); - data.push_back(tk.GetNextToken()); - data.push_back(tk.GetNextToken()); - data.push_back(tk.GetNextToken()); - - long lLastRowId; - wxString sql = wxString::FromUTF8(INSERT_INTO_CURRENCYFORMATS_V1); - int err = mmSQLiteExecuteUpdate(db, data, sql, lLastRowId); - result = (err == 0); - } return result; } Modified: trunk/src/mmcurrency.cpp =================================================================== --- trunk/src/mmcurrency.cpp 2013-07-01 05:35:53 UTC (rev 4213) +++ trunk/src/mmcurrency.cpp 2013-07-01 05:36:55 UTC (rev 4214) @@ -367,10 +367,10 @@ { if (currency_data.find(currency_symbol) != currency_data.end()) { + currency->baseConv_ = currency_data[currency_symbol].first; if (base_symbol == currency_symbol) currency->baseConv_ = 1; msg << wxString::Format(_("%s\t: %0.4f -> %0.4f\n"), - currency_symbol, currency->baseConv_, currency_data[currency_symbol].first); - currency->baseConv_ = currency_data[currency_symbol].first; + currency_symbol, currency->baseConv_, currency->baseConv_); UpdateCurrency(currency); } else Modified: trunk/src/paths.cpp =================================================================== --- trunk/src/paths.cpp 2013-07-01 05:35:53 UTC (rev 4213) +++ trunk/src/paths.cpp 2013-07-01 05:36:55 UTC (rev 4214) @@ -147,8 +147,7 @@ { static const wxString files[RES_FILES_MAX] = { "mmex.ico", - "kaching.wav", - "currency_seed.csv" + "kaching.wav" }; wxASSERT(f >= 0 && f < RES_FILES_MAX); Modified: trunk/src/paths.h =================================================================== --- trunk/src/paths.h 2013-07-01 05:35:53 UTC (rev 4213) +++ trunk/src/paths.h 2013-07-01 05:36:55 UTC (rev 4214) @@ -34,7 +34,7 @@ enum EDocFile { F_README = 0, F_CONTRIB, F_LICENSE, F_VERSION, HTML_INDEX, HTML_CUSTOM_SQL, HTML_INVESTMENT, HTML_BUDGET, DOC_FILES_MAX }; wxString getPathDoc(const EDocFile& f); -enum EResFile { PROGRAM_ICON = 0, TRANS_SOUND, CURRENCY_DB_SEED, RES_FILES_MAX }; +enum EResFile { PROGRAM_ICON = 0, TRANS_SOUND, RES_FILES_MAX }; wxString getPathResource(EResFile f); // use instead of getPathResource(PROGRAM_ICON) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2013-07-01 06:07:39
|
Revision: 4217 http://sourceforge.net/p/moneymanagerex/code/4217 Author: guanlisheng Date: 2013-07-01 06:07:34 +0000 (Mon, 01 Jul 2013) Log Message: ----------- remove currency_seed.csv Modified Paths: -------------- trunk/build/bakefiles/mmex.bkl trunk/build/bakefiles/mmex_tests.bkl trunk/build/msw/makefile.gcc trunk/build/msw/makefile.vc trunk/build/msw/tests/makefile.gcc trunk/build/msw/tests/makefile.vc trunk/src/tests/Makefile.in Modified: trunk/build/bakefiles/mmex.bkl =================================================================== --- trunk/build/bakefiles/mmex.bkl 2013-07-01 06:00:22 UTC (rev 4216) +++ trunk/build/bakefiles/mmex.bkl 2013-07-01 06:07:34 UTC (rev 4217) @@ -47,7 +47,7 @@ <data-files> <install-to>$(DATADIR)/mmex/res</install-to> <srcdir>$(SRCDIR)/resources</srcdir> - <files>kaching.wav mmex.ico currency_seed.csv</files> + <files>kaching.wav mmex.ico</files> </data-files> <data-files> @@ -134,12 +134,6 @@ <files>*.txt</files> </data-files> - <data-files> - <install-to>$(PREFIX)/mmex/res</install-to> - <srcdir>$(SRCDIR)/resources</srcdir> - <files>currency_seed.csv</files> - </data-files> - <data-files> <install-to>$(PREFIX)/mmex/res</install-to> <srcdir>$(SRCDIR)/resources</srcdir> Modified: trunk/build/bakefiles/mmex_tests.bkl =================================================================== --- trunk/build/bakefiles/mmex_tests.bkl 2013-07-01 06:00:22 UTC (rev 4216) +++ trunk/build/bakefiles/mmex_tests.bkl 2013-07-01 06:07:34 UTC (rev 4217) @@ -80,21 +80,14 @@ <if cond="FORMAT=='autoconf'">$(BUILDDIR)/share/mmex/res</if> </set> - <command> - -$(MKDIR) $(nativePaths(RES_DIR)) - $(COPY) $(nativePaths(SRCDIR + '/resources/currency_seed.csv')) $(nativePaths(RES_DIR)) - </command> - <command cond="FORMAT!='autoconf'"> $(nativePaths(BUILDDIR + '/mmex_tests' + EXEEXT)) </command> <command cond="FORMAT=='autoconf'"> ./mmex_tests - </command> + </command> - <clean-files>$(RES_DIR)/currency_seed.csv</clean-files> - </action> Modified: trunk/build/msw/makefile.gcc =================================================================== --- trunk/build/msw/makefile.gcc 2013-07-01 06:00:22 UTC (rev 4216) +++ trunk/build/msw/makefile.gcc 2013-07-01 06:07:34 UTC (rev 4217) @@ -318,8 +318,6 @@ -mkdir $(PREFIX)\mmex ( cd ..\..\doc && copy /Y *.txt $(PREFIX)\mmex ) -mkdir $(PREFIX)\mmex\res - ( cd ..\..\resources && copy /Y currency_seed.csv $(PREFIX)\mmex\res ) - -mkdir $(PREFIX)\mmex\res ( cd ..\..\resources && copy /Y mmex.ico $(PREFIX)\mmex\res ) -mkdir $(PREFIX)\mmex\res ( cd ..\..\resources && copy /Y kaching.wav $(PREFIX)\mmex\res ) @@ -332,7 +330,6 @@ uninstall: uninstall_mmex -if exist $(PREFIX)\mmex\*.txt -del *.txt - -if exist $(PREFIX)\mmex\res\currency_seed.csv -del currency_seed.csv -if exist $(PREFIX)\mmex\res\mmex.ico -del mmex.ico -if exist $(PREFIX)\mmex\res\kaching.wav -del kaching.wav -if exist $(PREFIX)\mmex\help\*.html -del *.html Modified: trunk/build/msw/makefile.vc =================================================================== --- trunk/build/msw/makefile.vc 2013-07-01 06:00:22 UTC (rev 4216) +++ trunk/build/msw/makefile.vc 2013-07-01 06:07:34 UTC (rev 4217) @@ -430,8 +430,6 @@ -mkdir $(PREFIX)\mmex ( cd ..\..\doc && copy /Y *.txt $(PREFIX)\mmex ) -mkdir $(PREFIX)\mmex\res - ( cd ..\..\resources && copy /Y currency_seed.csv $(PREFIX)\mmex\res ) - -mkdir $(PREFIX)\mmex\res ( cd ..\..\resources && copy /Y mmex.ico $(PREFIX)\mmex\res ) -mkdir $(PREFIX)\mmex\res ( cd ..\..\resources && copy /Y kaching.wav $(PREFIX)\mmex\res ) @@ -444,7 +442,6 @@ uninstall: uninstall_mmex -if exist $(PREFIX)\mmex\*.txt -del *.txt - -if exist $(PREFIX)\mmex\res\currency_seed.csv -del currency_seed.csv -if exist $(PREFIX)\mmex\res\mmex.ico -del mmex.ico -if exist $(PREFIX)\mmex\res\kaching.wav -del kaching.wav -if exist $(PREFIX)\mmex\help\*.html -del *.html Modified: trunk/build/msw/tests/makefile.gcc =================================================================== --- trunk/build/msw/tests/makefile.gcc 2013-07-01 06:00:22 UTC (rev 4216) +++ trunk/build/msw/tests/makefile.gcc 2013-07-01 06:07:34 UTC (rev 4217) @@ -316,7 +316,6 @@ -if exist liblua.a del liblua.a -if exist libUnitTestPP.a del libUnitTestPP.a -if exist mmex_tests.exe del mmex_tests.exe - -if exist ./res/currency_seed.csv del ./res/currency_seed.csv test_for_selected_wxbuild: @if not exist $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX)\wx\setup.h \ @@ -354,8 +353,6 @@ $(CXX) -o $@ $(MMEX_TESTS_OBJECTS) -L$(WX_DIR)\lib\gcc$(____mmex_tests_LIB_SUF_FILENAMES) -mthreads -L$(WX_DIR)$(WXLIBPATH) -mthreads $(__DEBUGINFO) $(LDFLAGS) libwxsqlite.a libsqlite.a liblua.a $(__WXLIB_CORE_NAME_p) $(__WXLIB_QA_NAME_p) $(__WXLIB_NET_NAME_p) $(__WXLIB_HTML_NAME_p) $(__WXLIB_XML_NAME_p) $(__WXLIB_AUI_NAME_p) $(__WXLIB_ADV_NAME_p) $(__WXLIB_BASE_NAME_p) -lwxtiff$(WX3RDPARTYLIBPOSTFIX) -lwxjpeg$(WX3RDPARTYLIBPOSTFIX) -lwxpng$(WX3RDPARTYLIBPOSTFIX) -lwxzlib$(WX3RDPARTYLIBPOSTFIX) -lwxregex$(WXLIBPOSTFIX) -lwxexpat$(WX3RDPARTYLIBPOSTFIX) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 libUnitTestPP.a check: all - -mkdir .\res - copy /Y ..\..\..\resources\currency_seed.csv .\res .\mmex_tests.exe wxsqlite_wxsqlite3.o: ../../../lib/wxsqlite/wxsqlite3.cpp Modified: trunk/build/msw/tests/makefile.vc =================================================================== --- trunk/build/msw/tests/makefile.vc 2013-07-01 06:00:22 UTC (rev 4216) +++ trunk/build/msw/tests/makefile.vc 2013-07-01 06:07:34 UTC (rev 4217) @@ -400,7 +400,6 @@ -if exist mmex_tests.exe del mmex_tests.exe -if exist mmex_tests.ilk del mmex_tests.ilk -if exist mmex_tests.pdb del mmex_tests.pdb - -if exist ./res/currency_seed.csv del ./res/currency_seed.csv test_for_selected_wxbuild: @if not exist $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX)\wx\setup.h \ @@ -445,8 +444,6 @@ mt.exe -manifest ".\mmex_tests.exe.manifest" -outputresource:".\mmex_tests.exe";1 check: all - -mkdir .\res - copy /Y ..\..\..\resources\currency_seed.csv .\res .\mmex_tests.exe wxsqlite_wxsqlite3.obj: ..\..\..\lib\wxsqlite\wxsqlite3.cpp Modified: trunk/src/tests/Makefile.in =================================================================== --- trunk/src/tests/Makefile.in 2013-07-01 06:00:22 UTC (rev 4216) +++ trunk/src/tests/Makefile.in 2013-07-01 06:07:34 UTC (rev 4217) @@ -235,7 +235,6 @@ rm -f $(LIBPREFIX)lua$(LIBEXT) rm -f $(LIBPREFIX)UnitTestPP$(LIBEXT) rm -f mmex_tests$(EXEEXT) - rm -f ./share/mmex/res/currency_seed.csv distclean: clean rm -f config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile @@ -266,8 +265,6 @@ $(__mmex_tests___mac_setfilecmd) check: all - -mkdir -p ./share/mmex/res - cp $(srcdir)/../../resources/currency_seed.csv ./share/mmex/res ./mmex_tests wxsqlite_wxsqlite3.o: $(srcdir)/../../lib/wxsqlite/wxsqlite3.cpp This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2013-07-01 12:43:32
|
Revision: 4225 http://sourceforge.net/p/moneymanagerex/code/4225 Author: vomikan Date: 2013-07-01 12:43:28 +0000 (Mon, 01 Jul 2013) Log Message: ----------- separate folder for impoer and export files Modified Paths: -------------- trunk/build/bakefiles/common.bkl trunk/build/msw/makefile.gcc trunk/build/msw/makefile.vc trunk/build/msw/tests/makefile.gcc trunk/build/msw/tests/makefile.vc trunk/src/mmOption.cpp trunk/src/mmex.cpp trunk/src/tests/Makefile.in trunk/src/util.cpp Added Paths: ----------- trunk/src/import_export/ trunk/src/import_export/ofximport.cpp.new trunk/src/import_export/ofximport.h.new trunk/src/import_export/qif_export.cpp trunk/src/import_export/qif_export.h trunk/src/import_export/qif_import.cpp trunk/src/import_export/qif_import.h trunk/src/import_export/univcsvdialog.cpp trunk/src/import_export/univcsvdialog.h Removed Paths: ------------- trunk/src/ofximport.cpp.new trunk/src/ofximport.h.new trunk/src/qif_export.cpp trunk/src/qif_export.h trunk/src/qif_import.cpp trunk/src/qif_import.h trunk/src/univcsvdialog.cpp trunk/src/univcsvdialog.h Modified: trunk/build/bakefiles/common.bkl =================================================================== --- trunk/build/bakefiles/common.bkl 2013-07-01 10:48:53 UTC (rev 4224) +++ trunk/build/bakefiles/common.bkl 2013-07-01 12:43:28 UTC (rev 4225) @@ -186,8 +186,8 @@ <if cond="1">/mac</if> </set> - <headers>$(fileList( [ 'src/*.h', 'src/reports/*.h', 'src/db/*.h' ] ))</headers> - <sources>$(fileList( [ 'src/*.cpp', 'src/reports/*.cpp', 'src/db/*.cpp', 'src/' + PLATF_DIR + '/*.cpp' ] ))</sources> + <headers>$(fileList( [ 'src/*.h', 'src/reports/*.h', 'src/db/*.h', 'src/import_export/*.h' ] ))</headers> + <sources>$(fileList( [ 'src/*.cpp', 'src/reports/*.cpp', 'src/db/*.cpp', 'src/' + PLATF_DIR + '/*.cpp', 'src/import_export/*.cpp' ] ))</sources> <!-- Microsoft compilers only, enable PDB for Release build --> Modified: trunk/build/msw/makefile.gcc =================================================================== --- trunk/build/msw/makefile.gcc 2013-07-01 10:48:53 UTC (rev 4224) +++ trunk/build/msw/makefile.gcc 2013-07-01 12:43:28 UTC (rev 4225) @@ -142,8 +142,6 @@ mmex_optionsdialog.o \ mmex_paths.o \ mmex_payeedialog.o \ - mmex_qif_export.o \ - mmex_qif_import.o \ mmex_recentfiles.o \ mmex_relocatecategorydialog.o \ mmex_relocatepayeedialog.o \ @@ -152,7 +150,6 @@ mmex_stockdialog.o \ mmex_stockspanel.o \ mmex_transdialog.o \ - mmex_univcsvdialog.o \ mmex_util.o \ mmex_budget.o \ mmex_budgetcategorysummary.o \ @@ -184,6 +181,9 @@ mmex_transaction.o \ mmex_transactionbill.o \ mmex_platfdep.o \ + mmex_qif_export.o \ + mmex_qif_import.o \ + mmex_univcsvdialog.o \ mmex_resources_mmex_rc.o ### Conditionally set variables: ### @@ -648,12 +648,6 @@ mmex_payeedialog.o: ../../src/payeedialog.cpp $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< -mmex_qif_export.o: ../../src/qif_export.cpp - $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< - -mmex_qif_import.o: ../../src/qif_import.cpp - $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< - mmex_recentfiles.o: ../../src/recentfiles.cpp $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< @@ -678,9 +672,6 @@ mmex_transdialog.o: ../../src/transdialog.cpp $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< -mmex_univcsvdialog.o: ../../src/univcsvdialog.cpp - $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< - mmex_util.o: ../../src/util.cpp $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< @@ -774,6 +765,15 @@ mmex_platfdep.o: ../../src/win/platfdep.cpp $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< +mmex_qif_export.o: ../../src/import_export/qif_export.cpp + $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< + +mmex_qif_import.o: ../../src/import_export/qif_import.cpp + $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< + +mmex_univcsvdialog.o: ../../src/import_export/univcsvdialog.cpp + $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< + mmex_resources_mmex_rc.o: ../../resources/mmex.rc windres --use-temp-file -i$< -o$@ --define HAVE_W32API_H $(____WX_SHARED_26_p_1) $(__WXUNICODE_DEFINE_p_2) $(__WXDEBUG_DEFINE_p_2) --define __WXMSW__ --include-dir $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX) --include-dir $(WX_DIR)/include $(__DEBUG_DEFINE_p_4) --include-dir ../../lib/sqlite --include-dir ../../lib/wxsqlite --include-dir ../../lib/lua/src --include-dir ../../lib --define NOPCH Modified: trunk/build/msw/makefile.vc =================================================================== --- trunk/build/msw/makefile.vc 2013-07-01 10:48:53 UTC (rev 4224) +++ trunk/build/msw/makefile.vc 2013-07-01 12:43:28 UTC (rev 4225) @@ -143,8 +143,6 @@ mmex_optionsdialog.obj \ mmex_paths.obj \ mmex_payeedialog.obj \ - mmex_qif_export.obj \ - mmex_qif_import.obj \ mmex_recentfiles.obj \ mmex_relocatecategorydialog.obj \ mmex_relocatepayeedialog.obj \ @@ -153,7 +151,6 @@ mmex_stockdialog.obj \ mmex_stockspanel.obj \ mmex_transdialog.obj \ - mmex_univcsvdialog.obj \ mmex_util.obj \ mmex_budget.obj \ mmex_budgetcategorysummary.obj \ @@ -184,7 +181,10 @@ mmex_subcategory.obj \ mmex_transaction.obj \ mmex_transactionbill.obj \ - mmex_platfdep.obj + mmex_platfdep.obj \ + mmex_qif_export.obj \ + mmex_qif_import.obj \ + mmex_univcsvdialog.obj MMEX_RESOURCES = \ mmex_resources_mmex.res @@ -781,12 +781,6 @@ mmex_payeedialog.obj: ..\..\src\payeedialog.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\payeedialog.cpp -mmex_qif_export.obj: ..\..\src\qif_export.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\qif_export.cpp - -mmex_qif_import.obj: ..\..\src\qif_import.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\qif_import.cpp - mmex_recentfiles.obj: ..\..\src\recentfiles.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\recentfiles.cpp @@ -811,9 +805,6 @@ mmex_transdialog.obj: ..\..\src\transdialog.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\transdialog.cpp -mmex_univcsvdialog.obj: ..\..\src\univcsvdialog.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\univcsvdialog.cpp - mmex_util.obj: ..\..\src\util.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\util.cpp @@ -907,6 +898,15 @@ mmex_platfdep.obj: ..\..\src\win\platfdep.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\win\platfdep.cpp +mmex_qif_export.obj: ..\..\src\import_export\qif_export.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\import_export\qif_export.cpp + +mmex_qif_import.obj: ..\..\src\import_export\qif_import.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\import_export\qif_import.cpp + +mmex_univcsvdialog.obj: ..\..\src\import_export\univcsvdialog.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\import_export\univcsvdialog.cpp + mmex_resources_mmex.res: ..\..\resources\mmex.rc rc /fo$@ /d WIN32 $(____WX_SHARED_46_p_1) $(__WXUNICODE_DEFINE_p_2) $(__WXDEBUG_DEFINE_p_2) /d __WXMSW__ /i $(WX_DIR)$(__WXLIBPATH_FILENAMES_2)\msw$(WXLIBPOSTFIX) /i $(WX_DIR)\include $(____DEBUGINFO_55_p_1) $(__DEBUG_DEFINE_p_4) /i ..\..\lib\sqlite /i ..\..\lib\wxsqlite /i ..\..\lib\lua\src /i ..\..\lib /d NOPCH /d _WINDOWS ..\..\resources\mmex.rc Modified: trunk/build/msw/tests/makefile.gcc =================================================================== --- trunk/build/msw/tests/makefile.gcc 2013-07-01 10:48:53 UTC (rev 4224) +++ trunk/build/msw/tests/makefile.gcc 2013-07-01 12:43:28 UTC (rev 4225) @@ -141,8 +141,6 @@ mmex_tests_optionsdialog.o \ mmex_tests_paths.o \ mmex_tests_payeedialog.o \ - mmex_tests_qif_export.o \ - mmex_tests_qif_import.o \ mmex_tests_recentfiles.o \ mmex_tests_relocatecategorydialog.o \ mmex_tests_relocatepayeedialog.o \ @@ -151,7 +149,6 @@ mmex_tests_stockdialog.o \ mmex_tests_stockspanel.o \ mmex_tests_transdialog.o \ - mmex_tests_univcsvdialog.o \ mmex_tests_util.o \ mmex_tests_budget.o \ mmex_tests_budgetcategorysummary.o \ @@ -183,6 +180,9 @@ mmex_tests_transaction.o \ mmex_tests_transactionbill.o \ mmex_tests_platfdep.o \ + mmex_tests_qif_export.o \ + mmex_tests_qif_import.o \ + mmex_tests_univcsvdialog.o \ mmex_tests_dbwrapper_test.o \ mmex_tests_mmex_lua_test.o \ mmex_tests_mmex_tests.o \ @@ -661,12 +661,6 @@ mmex_tests_payeedialog.o: ../../../src/payeedialog.cpp $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< -mmex_tests_qif_export.o: ../../../src/qif_export.cpp - $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< - -mmex_tests_qif_import.o: ../../../src/qif_import.cpp - $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< - mmex_tests_recentfiles.o: ../../../src/recentfiles.cpp $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< @@ -691,9 +685,6 @@ mmex_tests_transdialog.o: ../../../src/transdialog.cpp $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< -mmex_tests_univcsvdialog.o: ../../../src/univcsvdialog.cpp - $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< - mmex_tests_util.o: ../../../src/util.cpp $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< @@ -787,6 +778,15 @@ mmex_tests_platfdep.o: ../../../src/win/platfdep.cpp $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< +mmex_tests_qif_export.o: ../../../src/import_export/qif_export.cpp + $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< + +mmex_tests_qif_import.o: ../../../src/import_export/qif_import.cpp + $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< + +mmex_tests_univcsvdialog.o: ../../../src/import_export/univcsvdialog.cpp + $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< + mmex_tests_dbwrapper_test.o: ../../../src/tests/dbwrapper_test.cpp $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< Modified: trunk/build/msw/tests/makefile.vc =================================================================== --- trunk/build/msw/tests/makefile.vc 2013-07-01 10:48:53 UTC (rev 4224) +++ trunk/build/msw/tests/makefile.vc 2013-07-01 12:43:28 UTC (rev 4225) @@ -143,8 +143,6 @@ mmex_tests_optionsdialog.obj \ mmex_tests_paths.obj \ mmex_tests_payeedialog.obj \ - mmex_tests_qif_export.obj \ - mmex_tests_qif_import.obj \ mmex_tests_recentfiles.obj \ mmex_tests_relocatecategorydialog.obj \ mmex_tests_relocatepayeedialog.obj \ @@ -153,7 +151,6 @@ mmex_tests_stockdialog.obj \ mmex_tests_stockspanel.obj \ mmex_tests_transdialog.obj \ - mmex_tests_univcsvdialog.obj \ mmex_tests_util.obj \ mmex_tests_budget.obj \ mmex_tests_budgetcategorysummary.obj \ @@ -185,6 +182,9 @@ mmex_tests_transaction.obj \ mmex_tests_transactionbill.obj \ mmex_tests_platfdep.obj \ + mmex_tests_qif_export.obj \ + mmex_tests_qif_import.obj \ + mmex_tests_univcsvdialog.obj \ mmex_tests_dbwrapper_test.obj \ mmex_tests_mmex_lua_test.obj \ mmex_tests_mmex_tests.obj \ @@ -752,12 +752,6 @@ mmex_tests_payeedialog.obj: ..\..\..\src\payeedialog.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\payeedialog.cpp -mmex_tests_qif_export.obj: ..\..\..\src\qif_export.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\qif_export.cpp - -mmex_tests_qif_import.obj: ..\..\..\src\qif_import.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\qif_import.cpp - mmex_tests_recentfiles.obj: ..\..\..\src\recentfiles.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\recentfiles.cpp @@ -782,9 +776,6 @@ mmex_tests_transdialog.obj: ..\..\..\src\transdialog.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\transdialog.cpp -mmex_tests_univcsvdialog.obj: ..\..\..\src\univcsvdialog.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\univcsvdialog.cpp - mmex_tests_util.obj: ..\..\..\src\util.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\util.cpp @@ -878,6 +869,15 @@ mmex_tests_platfdep.obj: ..\..\..\src\win\platfdep.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\win\platfdep.cpp +mmex_tests_qif_export.obj: ..\..\..\src\import_export\qif_export.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\import_export\qif_export.cpp + +mmex_tests_qif_import.obj: ..\..\..\src\import_export\qif_import.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\import_export\qif_import.cpp + +mmex_tests_univcsvdialog.obj: ..\..\..\src\import_export\univcsvdialog.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\import_export\univcsvdialog.cpp + mmex_tests_dbwrapper_test.obj: ..\..\..\src\tests\dbwrapper_test.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\tests\dbwrapper_test.cpp Added: trunk/src/import_export/ofximport.cpp.new =================================================================== --- trunk/src/import_export/ofximport.cpp.new (rev 0) +++ trunk/src/import_export/ofximport.cpp.new 2013-07-01 12:43:28 UTC (rev 4225) @@ -0,0 +1,758 @@ +/*******************************************************************\ + * ofximport.cpp * + * moneymanagerex * + * * + * Adapted from gnucash source, many thanks to the gnucash team. * + * Adapted by Wesley Ellis on 11/12/09. * + * * + * * + * 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 gn...@gn... * + \*******************************************************************/ + +#include "ofximport.h" +#include <libofx/libofx.h> +#include "util.h" +#include "dbwrapper.h" +#include "guiid.h" +#include "fileviewerdialog.h" +#include "mmex.h" +#include "mmcoredb.h" + +//Instantiate Import Log here + +/********************************************************************\ + * mmOfxImport + * Entry point + \********************************************************************/ + +//mmImportMatcher *mmImportMatcherGui = NULL; + +/* + int ofx_proc_status_cb(struct OfxStatusData data) + { + return 0; + } + */ + +int ofx_proc_security_cb(const struct OfxSecurityData data, void * security_user_data); +int ofx_proc_transaction_cb(struct OfxTransactionData data, void * transaction_user_data); +int ofx_proc_account_cb(struct OfxAccountData data, void * account_user_data); + +int ofx_proc_security_cb(const struct OfxSecurityData data, void * security_user_data) +{ + wxChar * tmp_cusip=NULL; + wxChar * tmp_default_fullname=NULL; + wxChar * tmp_default_mnemonic=NULL; + double * tmp_unitprice=NULL; + wxChar * tmp_notes=NULL; + wxDateTime * tmp_pdate=NULL; + //wxChar * tmp_currency=NULL; + + mmStockDialog::OnAccountButton + + if(data.unique_id_valid==true) + { + tmp_cusip=(wxChar *)data.unique_id; + } + if(data.secname_valid==true) + { + tmp_default_fullname=(wxChar *)data.secname; + } + if(data.ticker_valid==true) + { + tmp_default_symbol=(wxChar *)data.ticker; + } + if(data.unitprice_valid==true) + { + tmp_unitprice = (double *)data.unitprice; + } + if(data.memo_valid==true) + { + tmp_notes = (wxChar *)data.memo; + } + if(data.date_unitprice_valid==true) + { + tmp_pdate=(wxDateTime *)data.memo; + } + //Currency to be used once we sort out how to convert to the currency used by the database + /*if(data.currency_valid==true) + { + tmp_currency=(wxChar *)data.currency; + }*/ + + static const char sql[] = + "insert into STOCK_V1 ( " + "HELDAT, PURCHASEDATE, STOCKNAME, SYMBOL, " + "NUMSHARES, PURCHASEPRICE, NOTES, CURRENTPRICE, " + "VALUE, COMMISSION " + " ) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; + + wxSQLite3Statement st = db_->PrepareStatement(sql); + + int i = 0; + st.Bind(++i, accountID_); + st.Bind(++i, tmp_pdate); + st.Bind(++i, tmp_default_fullname); + st.Bind(++i, tmp_default_symbol); + st.Bind(++i, numShares); + st.Bind(++i, tmp_unitprice); + st.Bind(++i, tmp_notes); + st.Bind(++i, "cPrice"); + st.Bind(++i, "cValue"); + st.Bind(++i, "commission"); + + wxASSERT(st.GetParamCount() == i); + + st.ExecuteUpdate(); + st.Finalize(); + + return 0; +} + +int ofx_proc_transaction_cb(struct OfxTransactionData data, void * transaction_user_data) +{ + wxChar dest_string[255]; + wxDateTime current_time; + mmAccount *account; + mmAccount *investment_account=NULL; + mmAccount *income_account=NULL; + kvp_frame * acc_frame; + kvp_value * kvp_val; + const GUID * income_acc_guid; + wxChar *investment_account_text; + gnc_commodity *currency=NULL; + gnc_commodity *investment_commodity=NULL; + gnc_numeric gnc_amount, gnc_units; + GNCBook *book; + Transaction *transaction; + Split *split; + gchar *notes, *tmp; + + g_assert(gnc_ofx_importer_gui); + + if(data.account_id_valid==true){ + //Check to see if account alredy exists based on the account number. + + + //If account does not match account number of any account, wxDialog to select the account or create a new one. + wxArrayString as; + int importAccountID = -1; + + wxSQLite3ResultSet q1 = db_->ExecuteQuery(g_AccountNameSQL); + while (q1.NextRow()) + { + as.Add(q1.GetString("ACCOUNTNAME")); + } + q1.Finalize(); + + wxSingleChoiceDialog* scd = new wxSingleChoiceDialog(0, _("Choose Account to import to:"), + _("OFX Import"), as); + if (scd->ShowModal() != wxID_OK) + return -1; + + wxString acctName = scd->GetStringSelection(); + importAccountID = mmDBWrapper::getAccountID(db_, acctName); + + if(importAccountID!=NULL) + { + /********** Create the transaction and setup transaction data ************/ + boost::shared_ptr<mmBankTransaction> pTransaction(new mmBankTransaction(core->db_)); + book = gnc_account_get_book(account); + transaction = xaccMallocTransaction(book); + xaccTransBeginEdit(transaction); + + // fi_id can be used to identify duplicate downloads/imports + /*if(data.fi_id_valid==true){ + pTransaction->fi_id_ = data.fi_id); + }*/ + + // This could be useful. + /*if(data.date_initiated_valid==true){ + pTransaction->date_transaction = data.date_initiated; + } + else if(data.date_posted_valid==true){ + pTransaction->date_transaction = data.date_posted; + }*/ + + // We will use the posted date as the date of the transaction + if(data.date_posted_valid==true){ + pTransaction->date_ = data.date_posted); + } + + //Enter the check number of the transaction + /* + if(data.check_number_valid==true){ + pTransaction->?? = data.check_number); + }*/ + // Might present in addition to or instead of a check_number. Not necessarily a number + /*else if(data.reference_number_valid==true){ + pTransaction->?? = data.reference_number); + }*/ + + // Put transaction name in Description, or memo if name unavailable + /*if(data.name_valid==true){ + pTransaction->??? = data.name); + } + else if(data.memo_valid==true){ + pTransaction->notes_ = data.memo); + }*/ + + /* Put everything else in the Notes field */ + wxString notes_str; + + if(data.transactiontype_valid==true){ + switch(data.transactiontype){ + case OFX_CREDIT: notes_str = "Generic credit"; + break; + case OFX_DEBIT: notes_str = "Generic debit"; + break; + case OFX_INT: notes_str = "Interest earned or paid (Note: Depends on signage of amount)"; + break; + case OFX_DIV: notes_str = "Dividend"; + break; + case OFX_FEE: notes_str = "FI fee"; + break; + case OFX_SRVCHG: notes_str = "Service charge"; + break; + case OFX_DEP: notes_str = "Deposit"; + break; + case OFX_ATM: notes_str = "ATM debit or credit (Note: Depends on signage of amount)"; + break; + case OFX_POS: notes_str = "Point of sale debit or credit (Note: Depends on signage of amount)"; + break; + case OFX_XFER: notes_str = "Transfer"; + break; + case OFX_CHECK: notes_str = "Check"; + break; + case OFX_PAYMENT: notes_str = "Electronic payment"; + break; + case OFX_CASH: notes_str = "Cash withdrawal"; + break; + case OFX_DIRECTDEP: notes_str = "Direct deposit"; + break; + case OFX_DIRECTDEBIT: notes_str = "Merchant initiated debit"; + break; + case OFX_REPEATPMT: notes_str = "Repeating payment/standing order"; + break; + case OFX_OTHER: notes_str = "Other"; + break; + default : notes_str = "Unknown transaction type"; + break; + } + pTransaction->notes_ = notes_str; + } + + //Not using this as of yet + /*if(data.invtransactiontype_valid==true){ + switch(data.invtransactiontype){ + case OFX_BUYDEBT: strncpy(dest_string, "BUYDEBT (Buy debt security)", sizeof(dest_string)); + break; + case OFX_BUYMF: strncpy(dest_string, "BUYMF (Buy mutual fund)", sizeof(dest_string)); + break; + case OFX_BUYOPT: strncpy(dest_string, "BUYOPT (Buy option)", sizeof(dest_string)); + break; + case OFX_BUYOTHER: strncpy(dest_string, "BUYOTHER (Buy other security type)", sizeof(dest_string)); + break; + case OFX_BUYSTOCK: strncpy(dest_string, "BUYSTOCK (Buy stock))", sizeof(dest_string)); + break; + case OFX_CLOSUREOPT: strncpy(dest_string, "CLOSUREOPT (Close a position for an option)", sizeof(dest_string)); + break; + case OFX_INCOME: strncpy(dest_string, "INCOME (Investment income is realized as cash into the investment account)", sizeof(dest_string)); + break; + case OFX_INVEXPENSE: strncpy(dest_string, "INVEXPENSE (Misc investment expense that is associated with a specific security)", sizeof(dest_string)); + break; + case OFX_JRNLFUND: strncpy(dest_string, "JRNLFUND (Journaling cash holdings between subaccounts within the same investment account)", sizeof(dest_string)); + break; + case OFX_MARGININTEREST: strncpy(dest_string, "MARGININTEREST (Margin interest expense)", sizeof(dest_string)); + break; + case OFX_REINVEST: strncpy(dest_string, "REINVEST (Reinvestment of income)", sizeof(dest_string)); + break; + case OFX_RETOFCAP: strncpy(dest_string, "RETOFCAP (Return of capital)", sizeof(dest_string)); + break; + case OFX_SELLDEBT: strncpy(dest_string, "SELLDEBT (Sell debt security. Used when debt is sold, called, or reached maturity)", sizeof(dest_string)); + break; + case OFX_SELLMF: strncpy(dest_string, "SELLMF (Sell mutual fund)", sizeof(dest_string)); + break; + case OFX_SELLOPT: strncpy(dest_string, "SELLOPT (Sell option)", sizeof(dest_string)); + break; + case OFX_SELLOTHER: strncpy(dest_string, "SELLOTHER (Sell other type of security)", sizeof(dest_string)); + break; + case OFX_SELLSTOCK: strncpy(dest_string, "SELLSTOCK (Sell stock)", sizeof(dest_string)); + break; + case OFX_SPLIT: strncpy(dest_string, "SPLIT (Stock or mutial fund split)", sizeof(dest_string)); + break; + case OFX_TRANSFER: strncpy(dest_string, "TRANSFER (Transfer holdings in and out of the investment account)", sizeof(dest_string)); + break; + default: strncpy(dest_string, "ERROR, this investment transaction type is unknown. This is a bug in ofxdump", sizeof(dest_string)); + break; + } + tmp=notes; + notes=g_strdup_printf("%s%s%s",tmp,"|Investment Trans type:", dest_string); + g_free(tmp); + }*/ + + //Append to the Notes filed + if(data.memo_valid){ + wxString notes_memo = pTransaction.notes_& Append(data.memo); + pTransaction-> notes_ = notes_memo; + } + // Not using this + /* + if(data.date_funds_available_valid==true){ + Timespec ts; + timespecFromTime_t(&ts, data.date_funds_available); + gnc_timespec_to_iso8601_buff (ts, dest_string); + tmp=notes; + notes=g_strdup_printf("%s%s%s",tmp,"|Date funds available:", dest_string); + g_free(tmp); + } + // Not using this + if(data.server_transaction_id_valid==true){ + tmp=notes; + notes=g_strdup_printf("%s%s%s",tmp, "|Server trans ID (conf. number):", data.server_transaction_id); + g_free(tmp); + } + // Not using this + if(data.standard_industrial_code_valid==true){ + tmp=notes; + notes=g_strdup_printf("%s%s%ld",tmp, "|Standard Industrial Code:",data.standard_industrial_code); + g_free(tmp); + + }*/ + + //Add the payee + if(data.payee_id_valid==true){ + wxSting payee = data.payee_id; + if (payee.Trim().IsEmpty()) + { + payee = "Unknown"; + } + + if (!core->payeeList_.payeeExists(payee)) + { + log << _("Adding payee ") << payee << endl; + payeeID = core->payeeList_.addPayee(payee); + } + else + payeeID = core->payeeList_.getPayeeID(payee); + pTransaction->payee_ = payeeList_.getPayeeSharedPtr(payeeID); + } + + + if ( data.account_ptr && data.account_ptr->currency_valid ) + { + DEBUG("Currency from libofx: %s",data.account_ptr->currency); + currency = gnc_commodity_table_lookup( gnc_get_current_commodities (), + GNC_COMMODITY_NS_CURRENCY, + data.account_ptr->currency); + } + else + { + DEBUG("Currency from libofx unavailable, defaulting to account's default"); + currency = xaccAccountGetCommodity(account); + } + + xaccTransSetCurrency(transaction,currency); + if(data.amount_valid==true) + { + if(data.invtransactiontype_valid==false) + { + /*************Process a normal transaction ***************************/ + DEBUG("Adding split; Ordinary banking transaction, money flows from or into the source account"); + split=xaccMallocSplit(book); + xaccTransAppendSplit(transaction,split); + xaccAccountInsertSplit(account,split); + + gnc_amount = double_to_gnc_numeric (data.amount, + gnc_commodity_get_fraction(xaccTransGetCurrency(transaction)), + GNC_RND_ROUND); + xaccSplitSetBaseValue(split, gnc_amount, xaccTransGetCurrency(transaction)); + + /* Also put the ofx transaction's memo in the split's memo field */ + if(data.memo_valid==true){ + xaccSplitSetMemo(split, data.memo); + } + } + else if(data.unique_id_valid == true + && data.security_data_valid + && data.security_data_ptr != NULL + && data.security_data_ptr->secname_valid == true) + { + /************************ Process an investment transaction ******************************/ + /* Note that the ACCT_TYPE_STOCK account type should be replaced with something + derived from data.invtranstype*/ + investment_commodity = gnc_import_select_commodity(data.unique_id, + 0, + NULL, + NULL); + if(investment_commodity!=NULL) + { + investment_account_text = g_strdup_printf( /* This string is a default account + name. It MUST NOT contain the + character ':' anywhere in it or + in any translations. */ + _("Stock account for security \"%s\""), + data.security_data_ptr->secname); + investment_account = gnc_import_select_account(NULL, + data.unique_id, + 1, + investment_account_text, + investment_commodity, + ACCT_TYPE_STOCK, + NULL, + NULL); + g_free (investment_account_text); + investment_account_text = NULL; + if(investment_account!=NULL&& + data.unitprice_valid==true&& + data.units_valid==true&& + ( data.invtransactiontype!=OFX_INCOME ) ) + { + DEBUG("Adding investment split; Money flows from or into the stock account"); + split=xaccMallocSplit(book); + xaccTransAppendSplit(transaction,split); + xaccAccountInsertSplit(investment_account,split); + + gnc_amount = double_to_gnc_numeric (-(data.amount), + gnc_commodity_get_fraction(investment_commodity), + GNC_RND_ROUND); + gnc_units = double_to_gnc_numeric (data.units, + gnc_commodity_get_fraction(investment_commodity), + GNC_RND_ROUND); + xaccSplitSetAmount(split, gnc_units); + xaccSplitSetValue(split, gnc_amount); + + if(data.security_data_ptr->memo_valid==true) + { + xaccSplitSetMemo(split, data.security_data_ptr->memo); + } + } + else + { + PERR("The investment account, units or unitprice was not found for the investment transaction"); + } + } + else + { + PERR("Commodity not found for the investment transaction"); + } + + if(data.invtransactiontype_valid==true) + { + if(data.invtransactiontype==OFX_REINVEST||data.invtransactiontype==OFX_INCOME) + { + DEBUG("Now let's find an account for the destination split"); + + acc_frame=xaccAccountGetSlots(investment_account); + kvp_val = kvp_frame_get_slot(acc_frame, + "ofx/associated-income-account"); + if (kvp_val != NULL) + { + income_account = xaccAccountLookup(kvp_value_get_guid(kvp_val),book); + } + if(income_account==NULL) + { + DEBUG("Couldn't find an associated income account"); + investment_account_text = g_strdup_printf( /* This string is a default account + name. It MUST NOT contain the + character ':' anywhere in it or + in any translations. */ + _("Income account for security \"%s\""), + data.security_data_ptr->secname); + income_account=gnc_import_select_account(NULL, + NULL, + 1, + investment_account_text, + currency, + ACCT_TYPE_INCOME, + NULL, + NULL); + income_acc_guid = xaccAccountGetGUID(income_account); + kvp_val = kvp_value_new_guid(income_acc_guid); + if( acc_frame==NULL) + { + DEBUG("The kvp_frame was NULL, allocating new one"); + acc_frame = kvp_frame_new(); + } + kvp_frame_set_slot_nc(acc_frame, "ofx/associated-income-account", + kvp_val); + DEBUG("KVP written"); + + } + else + { + DEBUG("Found at least one associated income account"); + } + } + if(income_account!=NULL&& + data.invtransactiontype==OFX_REINVEST) + { + DEBUG("Adding investment split; Money flows from the income account"); + split=xaccMallocSplit(book); + xaccTransAppendSplit(transaction,split); + xaccAccountInsertSplit(income_account,split); + + gnc_amount = double_to_gnc_numeric (data.amount, + gnc_commodity_get_fraction(xaccTransGetCurrency(transaction)), + GNC_RND_ROUND); + xaccSplitSetBaseValue(split, gnc_amount, xaccTransGetCurrency(transaction)); + + /* Also put the ofx transaction name in the splits memo field, or ofx memo if name is unavailable */ + if(data.name_valid==true){ + xaccSplitSetMemo(split, data.name); + } + else if(data.memo_valid==true){ + xaccSplitSetMemo(split, data.memo); + } + } + if(income_account!=NULL&& + data.invtransactiontype==OFX_INCOME) + { + DEBUG("Adding investment split; Money flows from the income account"); + split=xaccMallocSplit(book); + xaccTransAppendSplit(transaction,split); + xaccAccountInsertSplit(income_account,split); + + gnc_amount = double_to_gnc_numeric (-data.amount,/*OFX_INCOME amounts come in as positive numbers*/ + gnc_commodity_get_fraction(xaccTransGetCurrency(transaction)), + GNC_RND_ROUND); + xaccSplitSetBaseValue(split, gnc_amount, xaccTransGetCurrency(transaction)); + + /* Also put the ofx transaction name in the splits memo field, or ofx memo if name is unavailable */ + if(data.name_valid==true){ + xaccSplitSetMemo(split, data.name); + } + else if(data.memo_valid==true){ + xaccSplitSetMemo(split, data.memo); + } + } + + + if(data.invtransactiontype!=OFX_REINVEST) + { + DEBUG("Adding investment split; Money flows from or to the cash account"); + split=xaccMallocSplit(book); + xaccTransAppendSplit(transaction,split); + xaccAccountInsertSplit(account,split); + + gnc_amount = double_to_gnc_numeric (data.amount, + gnc_commodity_get_fraction(xaccTransGetCurrency(transaction)), + GNC_RND_ROUND); + xaccSplitSetBaseValue(split, gnc_amount, xaccTransGetCurrency(transaction)); + + /* Also put the ofx transaction name in the splits memo field, or ofx memo if name is unavailable */ + if(data.name_valid==true){ + xaccSplitSetMemo(split, data.name); + } + else if(data.memo_valid==true){ + xaccSplitSetMemo(split, data.memo); + } + + } + } + } + + /* Use new importer GUI. */ + DEBUG("%d splits sent to the importer gui",xaccTransCountSplits(transaction)); + gnc_gen_trans_list_add_trans (gnc_ofx_importer_gui, transaction); + } + else + { + PERR("The transaction doesn't have a valid amount"); + xaccTransDestroy(transaction); + xaccTransCommitEdit(transaction); + } + + } + else + { + PERR("Unable to find the account!"); + } + } + else + { + PERR("account ID for this transaction is unavailable!"); + } + + core->bTransactionList_.addTransaction(core, pTransaction); + + return 0; +}//end ofx_proc_transaction() + +/* + int ofx_proc_statement_cb(struct OfxStatementData data, void * statement_user_data) + { + return 0; + }//end ofx_proc_statement() + */ + +int ofx_proc_account_cb(struct OfxAccountData data, /*void * account_user_data*/) +{ + Account *selected_account; + gnc_commodity_table * commodity_table; + gnc_commodity * default_commodity; + GNCAccountType default_type=ACCT_TYPE_NONE; + gchar * account_description; + gchar * account_type_name = NULL; + + + //Find out if account data is valid + if(data.account_id_valid==true){ + + //Check to see if account exists + //If account exists load account + //Else set default for new account wizzard to account + //If select account, load that account + //Else, create a new account by running the new account wizzard with the account number filled in and not modifiable + + //Check to see if the currency is valid + if( data.currency_valid == true) + { + //Log the currency + DEBUG("Currency from libofx: %s",data.currency); + //Set the currency for the account to data.currency + default_commodity = gnc_commodity_table_lookup(commodity_table, + GNC_COMMODITY_NS_CURRENCY, + data.currency); + } + else + { + default_commodity = NULL; + } + + //Make sure the account type is valid + if(data.account_type_valid==true){ + switch(data.account_type){ + case OFX_CHECKING : + //Set the default for the new account wizzard to Checking/Savings + default_type=ACCT_TYPE_BANK; + account_type_name = g_strdup_printf(_("Unknown OFX checking account")); + break; + case OFX_SAVINGS : + default_type=ACCT_TYPE_BANK; + account_type_name = g_strdup_printf(_("Unknown OFX savings account")); + break; + case OFX_MONEYMRKT : + default_type=ACCT_TYPE_MONEYMRKT; + account_type_name = g_strdup_printf(_("Unknown OFX money market account")); + break; + case OFX_CREDITLINE : + default_type=ACCT_TYPE_CREDITLINE; + account_type_name = g_strdup_printf(_("Unknown OFX credit line account")); + break; + case OFX_CMA : + default_type=ACCT_TYPE_NONE; + account_type_name = g_strdup_printf(_("Unknown OFX CMA account")); + break; + case OFX_CREDITCARD : + default_type=ACCT_TYPE_CREDIT; + account_type_name = g_strdup_printf(_("Unknown OFX credit card account")); + break; + case OFX_INVESTMENT : + default_type=ACCT_TYPE_BANK; + account_type_name = g_strdup_printf(_("Unknown OFX investment account")); + break; + default: PERR("WRITEME: ofx_proc_account() This is an unknown account type!"); + } + } + + gnc_utf8_strip_invalid(data.account_name); + account_description = g_strdup_printf( /* This string is a default account + name. It MUST NOT contain the + character ':' anywhere in it or + in any translation. */ + "%s \"%s\"", + account_type_name, + data.account_name); + selected_account = gnc_import_select_account(NULL, + data.account_id, 1, + account_description, default_commodity, + default_type, NULL, NULL); + g_free(account_description); + g_free(account_type_name); + } + else + { + PERR("account online ID not available"); + } + + return 0; +} + +void mmOfxImport () +{ + extern int ofx_PARSER_msg; + extern int ofx_DEBUG_msg; + extern int ofx_WARNING_msg; + extern int ofx_ERROR_msg; + extern int ofx_INFO_msg; + extern int ofx_STATUS_msg; + char *selected_filename; + char *default_dir; + LibofxContextPtr libofx_context = libofx_get_new_context(); + + ofx_PARSER_msg = false; + ofx_DEBUG_msg = false; + ofx_WARNING_msg = true; + ofx_ERROR_msg = true; + ofx_INFO_msg = true; + ofx_STATUS_msg = false; + + DEBUG("gnc_file_ofx_import(): Begin...\n"); + + default_dir = gnc_get_default_directory(GCONF_SECTION); + selected_filename = gnc_file_dialog(_("Select an OFX/QFX file to process"), + NULL, + default_dir, + GNC_FILE_DIALOG_IMPORT); + g_free(default_dir); + + if(selected_filename!=NULL) + { + + + /* Remember the directory as the default. */ + default_dir = g_path_get_dirname(selected_filename); + gnc_set_default_directory(GCONF_SECTION, default_dir); + g_free(default_dir); + + /*strncpy(file,selected_filename, 255);*/ + DEBUG("Filename found: %s",selected_filename); + + /* Create the Generic transaction importer GUI. */ + gnc_ofx_importer_gui = gnc_gen_trans_list_new(NULL, NULL, FALSE, 42); + + /* Initialize libofx */ + + /*ofx_set_statement_cb(libofx_context, ofx_proc_statement_cb, 0);*/ + ofx_set_account_cb(libofx_context, ofx_proc_account_cb, 0); + ofx_set_transaction_cb(libofx_context, ofx_proc_transaction_cb, 0); + ofx_set_security_cb(libofx_context, ofx_proc_security_cb, 0); + /*ofx_set_status_cb(libofx_context, ofx_proc_status_cb, 0);*/ + + + + DEBUG("Opening selected file"); + libofx_proc_file(libofx_context, selected_filename, AUTODETECT); + free(selected_filename); + } + +} + + + Added: trunk/src/import_export/ofximport.h.new =================================================================== --- trunk/src/import_export/ofximport.h.new (rev 0) +++ trunk/src/import_export/ofximport.h.new 2013-07-01 12:43:28 UTC (rev 4225) @@ -0,0 +1,15 @@ +/* + * ofximport.h + * moneymanagerex + * + * Created by Wesley Ellis on 11/12/09. + * Copyright 2009 __MyCompanyName__. All rights reserved. + * + */ + +#ifndef OFX_IMPORT_H +#define OFX_IMPORT_H + + +void mmOfxImport(); +#endif Added: trunk/src/import_export/qif_export.cpp =================================================================== --- trunk/src/import_export/qif_export.cpp (rev 0) +++ trunk/src/import_export/qif_export.cpp 2013-07-01 12:43:28 UTC (rev 4225) @@ -0,0 +1,558 @@ +/******************************************************* + ********************************************************/ +#include "../constants.h" +#include "qif_export.h" +#include "../util.h" +#include "../paths.h" + +IMPLEMENT_DYNAMIC_CLASS( mmQIFExportDialog, wxDialog ) + +BEGIN_EVENT_TABLE( mmQIFExportDialog, wxDialog ) + EVT_CHECKBOX(wxID_ANY, mmQIFExportDialog::OnCheckboxClick ) + EVT_BUTTON(wxID_OK, mmQIFExportDialog::OnOk) + EVT_BUTTON(wxID_CANCEL, mmQIFExportDialog::OnCancel) + EVT_CLOSE(mmQIFExportDialog::OnQuit) +END_EVENT_TABLE() + +mmQIFExportDialog::mmQIFExportDialog( + mmCoreDB* core, + wxWindow* parent, wxWindowID id, + const wxString& caption, const wxPoint& pos, + const wxSize& size, long style +) : + core_(core), + parent_(parent) +{ + Create(parent, id, caption, pos, size, style); +} + +bool mmQIFExportDialog::Create( wxWindow* parent, wxWindowID id, const wxString& caption, + const wxPoint& pos, const wxSize& size, long style ) +{ + SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS); + wxDialog::Create( parent, id, caption, pos, size, style ); + + CreateControls(); + GetSizer()->Fit(this); + GetSizer()->SetSizeHints(this); + SetIcon(mmex::getProgramIcon()); + Centre(); + Fit(); + + fillControls(); + + return TRUE; +} + +void mmQIFExportDialog::fillControls() +{ + wxArrayString accounts_type; + accounts_type.Add(ACCOUNT_TYPE_BANK); + accounts_type.Add(ACCOUNT_TYPE_TERM); + accounts_id_ = core_->accountList_.getAccountsID(accounts_type); + + for (size_t i = 0; i < accounts_id_.Count(); ++i) + { + accounts_name_.Add(core_->accountList_.GetAccountName(accounts_id_[i])); + items_index_.Add(i); + } +} + +void mmQIFExportDialog::CreateControls() +{ + int border = 5; + int fieldWidth = 180; + wxSizerFlags flags, flagsExpand; + flags.Align(wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL).Border(wxALL, border); + flagsExpand.Align(wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL).Border(wxALL, border).Expand().Proportion(1); + + wxBoxSizer* main_sizer = new wxBoxSizer(wxVERTICAL); + this->SetSizer(main_sizer); + wxBoxSizer* box_sizer1 = new wxBoxSizer(wxVERTICAL); + main_sizer->Add(box_sizer1, flagsExpand); + + wxNotebook* export_notebook = new wxNotebook(this, + wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_MULTILINE ); + wxPanel* main_tab = new wxPanel(export_notebook, wxID_ANY); + export_notebook->AddPage(main_tab, _("Parameters")); + wxBoxSizer *tab1_sizer = new wxBoxSizer(wxVERTICAL); + main_tab->SetSizer(tab1_sizer); + + wxPanel* log_tab = new wxPanel(export_notebook, wxID_ANY); + export_notebook->AddPage(log_tab, _("Log")); + wxBoxSizer *tab2_sizer = new wxBoxSizer(wxVERTICAL); + log_tab->SetSizer(tab2_sizer); + + box_sizer1->Add(export_notebook, flagsExpand); + + // + wxString choices[] = { _("QIF"), _("CSV")}; + int num = sizeof(choices) / sizeof(wxString); + m_radio_box_ = new wxRadioBox(main_tab, wxID_ANY, "" + , wxDefaultPosition, wxDefaultSize, num, choices, 2, wxRA_SPECIFY_COLS); + tab1_sizer->Add(m_radio_box_, flags.Center()); + + wxFlexGridSizer* flex_sizer = new wxFlexGridSizer(0, 2, 0, 0); + tab1_sizer->Add(flex_sizer, flags.Left()); + + // Categories ------------------------------------------------- + cCategs_ = new wxCheckBox(main_tab, wxID_ANY, + _("Categories"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); + cCategs_->SetValue(FALSE); + flex_sizer->Add(cCategs_, flags); + flex_sizer->AddSpacer(1); + + // Accounts -------------------------------------------- + accountsCheckBox_ = new wxCheckBox( main_tab, wxID_ANY, _("Accounts") + , wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); + bSelectedAccounts_ = new wxButton(main_tab, wxID_STATIC, _("All") + , wxDefaultPosition, wxSize(fieldWidth,-1)); + bSelectedAccounts_ -> Connect(wxID_ANY, + wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(mmQIFExportDialog::OnAccountsButton), NULL, this); + accountsCheckBox_->SetValue(true); + flex_sizer->Add(accountsCheckBox_, flags); + flex_sizer->Add(bSelectedAccounts_, flags); + + // From Date -------------------------------------------- + dateFromCheckBox_ = new wxCheckBox( main_tab, wxID_ANY, _("From Date") + , wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); + fromDateCtrl_ = new wxDatePickerCtrl( main_tab, wxID_STATIC, wxDefaultDateTime + , wxDefaultPosition, wxSize(fieldWidth,-1), wxDP_DROPDOWN); + fromDateCtrl_->Enable(false); + flex_sizer->Add(dateFromCheckBox_, flags); + flex_sizer->Add(fromDateCtrl_, flags); + + // To Date -------------------------------------------- + dateToCheckBox_ = new wxCheckBox( main_tab, wxID_ANY, _("To Date") + , wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); + toDateCtrl_ = new wxDatePickerCtrl( main_tab, wxID_STATIC, wxDefaultDateTime + , wxDefaultPosition, wxSize(fieldWidth,-1), wxDP_DROPDOWN); + toDateCtrl_->Enable(false); + flex_sizer->Add(dateToCheckBox_, flags); + flex_sizer->Add(toDateCtrl_, flags); + + // Encoding -------------------------------------------- + + // File Name -------------------------------------------- + toFileCheckBox_ = new wxCheckBox( main_tab, wxID_ANY, _("Write to File") + , wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); + toFileCheckBox_->SetValue(true); + file_name_label_ = new wxStaticText(main_tab, wxID_ANY, _("File Name:")); + button_search_ = new wxButton(main_tab, wxID_SAVE, _("Choose &file")); + button_search_->Connect(wxID_SAVE, wxEVT_COMMAND_BUTTON_CLICKED + , wxCommandEventHandler(mmQIFExportDialog::OnFileSearch), NULL, this); + + m_text_ctrl_ = new wxTextCtrl(main_tab, wxID_FILE, wxEmptyString, + wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); + m_text_ctrl_->Connect(wxID_FILE, wxEVT_COMMAND_TEXT_UPDATED + , wxCommandEventHandler(mmQIFExportDialog::OnFileNameChanged), NULL, this); + m_text_ctrl_->Connect(wxID_FILE, wxEVT_COMMAND_TEXT_ENTER + , wxCommandEventHandler(mmQIFExportDialog::OnFileNameEntered), NULL, this); + + flex_sizer->Add(toFileCheckBox_, flags); + flex_sizer->AddSpacer(1); + flex_sizer->Add(file_name_label_, flags); + flex_sizer->Add(button_search_, flags); + tab1_sizer->Add(m_text_ctrl_, 0, wxALL|wxGROW, border); + + //Log viewer + log_field_ = new wxTextCtrl( log_tab, wxID_ANY, "" + , wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxHSCROLL ); + tab2_sizer->Add(log_field_, 1, wxGROW|wxALL, border); + + wxButton* itemClearButton = new wxButton(log_tab, wxID_CLEAR, _("Clear")); + tab2_sizer->Add(itemClearButton, flags.Center()); + itemClearButton->Connect(wxID_CLEAR, wxEVT_COMMAND_BUTTON_CLICKED + , wxCommandEventHandler(mmQIFExportDialog::OnButtonClear), NULL, this); + + /********************************************************************************************** + Button Panel with OK and Cancel Buttons + ***********************************************************************************************/ + wxPanel* buttons_panel = new wxPanel(this, wxID_ANY); + main_sizer->Add(buttons_panel, flags.Center().Border(wxALL, 0)); + + wxStdDialogButtonSizer* buttons_sizer = new wxStdDialogButtonSizer; + buttons_panel->SetSizer(buttons_sizer); + + wxButton* itemButtonOK = new wxButton( buttons_panel, wxID_OK, _("&OK")); + wxButton* itemButtonCancel_ = new wxButton( buttons_panel, wxID_CANCEL, _("&Cancel")); + itemButtonOK->Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED + , wxCommandEventHandler(mmQIFExportDialog::OnOk), NULL, this); + + buttons_sizer->Add(itemButtonOK, flags.Border(wxBOTTOM|wxRIGHT, 10)); + buttons_sizer->Add(itemButtonCancel_, flags); + + buttons_sizer->Realize(); + +} + +void mmQIFExportDialog::OnButtonClear(wxCommandEvent& /*event*/) +{ + log_field_->Clear(); +} + +void mmQIFExportDialog::OnAccountsButton(wxCommandEvent& /*event*/) +{ + items_index_.clear(); + wxMultiChoiceDialog s_acc(this, _("Choose Account to Export from:") + , _("QIF Export"), accounts_name_); + if (s_acc.ShowModal() == wxID_OK) + items_index_ = s_acc.GetSelections(); + if (items_index_.GetCount() == 1) + { + bSelectedAccounts_->SetLabel(core_->accountList_.GetAccountName(accounts_id_[items_index_[0]])); + } + else if (items_index_.GetCount() > 1) + { + bSelectedAccounts_->SetLabel("..."); + } + for (size_t i = 0; i < items_index_.GetCount(); ++i) + { + *log_field_ << (core_->accountList_.GetAccountName(accounts_id_[items_index_[i]])); + *log_field_ << "\n"; + } +} + +void mmQIFExportDialog::OnFileSearch(wxCommandEvent& /*event*/) +{ + wxString fileName = m_text_ctrl_->GetValue(); + const bool qif_csv = m_radio_box_->GetSelection() == 0; + + const wxString choose_ext = qif_csv ? _("QIF Files") : _("CSV Files"); + fileName = wxFileSelector(qif_csv + ? _("Choose QIF data file to Export") + : _("Choose CSV data file to Export"), + wxEmptyString, fileName, wxEmptyString, + choose_ext + (qif_csv ? " (*.qif)|*.qif;*.QIF" : " (*.csv)|*.csv;*.CSV") + , wxFD_SAVE | wxFD_OVERWRITE_PROMPT); + + if (!fileName.IsEmpty()) + correctEmptyFileExt(qif_csv ? "qif":"csv" , fileName); + m_text_ctrl_->SetValue(fileName); +} + +void mmQIFExportDialog::OnOk(wxCommandEvent& /*event*/) +{ + bool bCorrect = false; + wxString sErrorMsg = ""; + if (core_->accountList_.getNumAccounts() == 0 && accountsCheckBox_->GetValue()) + { + sErrorMsg =_("No Account available for export"); + } + else if (items_index_.Count() < 1 && accountsCheckBox_->GetValue()) + { + sErrorMsg =_("No Accounts selected for export"); + } + else if (toFileCheckBox_->GetValue() && m_text_ctrl_->GetValue().IsEmpty()) + { + sErrorMsg =_("File name is empty"); + } + else if (dateToCheckBox_->GetValue() && dateFromCheckBox_->GetValue() && fromDateCtrl_->GetValue() > toDateCtrl_->GetValue()) + { + sErrorMsg =_("To Date less than From Date"); + } + else + bCorrect = true; + + if (bCorrect) + mmExportQIF(); + else + wxMessageBox(sErrorMsg, _("QIF Export"), wxOK|wxICON_WARNING); +} + +void mmQIFExportDialog::OnCancel(wxCommandEvent& /*event*/) +{ + + EndModal(wxID_CANCEL); +} + +void mmQIFExportDialog::OnQuit(wxCloseEvent& /*event*/) +{ + EndModal(wxID_CANCEL); +} +void mmQIFExportDialog::OnCheckboxClick( wxCommandEvent& /*event*/ ) +{ + bSelectedAccounts_->Enable(accountsCheckBox_->GetValue()); + if (dateFromCheckBox_->GetValue()) dateFromCheckBox_->SetValue(accountsCheckBox_->GetValue()); + if (dateToCheckBox_->GetValue()) dateToCheckBox_->SetValue(accountsCheckBox_->GetValue()); + fromDateCtrl_->Enable(dateFromCheckBox_->GetValue()); + toDateCtrl_->Enable(dateToCheckBox_->GetValue()); + button_search_->Enable(toFileCheckBox_->GetValue()); + file_name_label_->Enable(toFileCheckBox_->GetValue()); + m_text_ctrl_->Enable(toFileCheckBox_->GetValue()); + +} + +void mmQIFExportDialog::OnFileNameChanged(wxCommandEvent& event) +{ + wxString file_name = m_text_ctrl_->GetValue(); + if (file_name.Contains("\n") || file_name.Contains("file://")) + { + + file_name.Replace("\n", ""); +#ifdef __WXGTK__ + file_name.Replace("file://", ""); + file_name.Trim(); +#endif + m_text_ctrl_->SetEvtHandlerEnabled(false); + m_text_ctrl_->SetValue(file_name); + m_text_ctrl_->SetEvtHandlerEnabled(true); + } + event.Skip(); + + wxFileName csv_file(file_name); + +} +void mmQIFExportDialog::OnFileNameEntered(wxCommandEvent& event) +{ + wxString file_name = m_text_ctrl_->GetValue(); + file_name.Trim(); + + event.Skip(); + wxCommandEvent evt(wxEVT_COMMAND_BUTTON_CLICKED, wxID_SAVE); + this->GetEventHandler()->AddPendingEvent(evt); +} + +wxString mmQIFExportDialog::writeAccHeader(int accountID, bool qif) +{ + wxString buffer = ""; + if (qif) + { + mmAccount* pAccount = core_->accountList_.GetAccountSharedPtr(accountID); + wxASSERT(pAccount); + mmCurrency* pCurrency = pAccount->currency_; + wxASSERT(pCurrency); + + const wxString sAccName = core_->accountList_.GetAccountName(accountID); + double dInitBalance = pAccount->initialBalance_; + const wxString sInitBalance = wxString::Format("%f", dInitBalance); + const wxString sCurrencyCode = "[" + pCurrency->currencySymbol_ + "]"; + + buffer = wxString("!Account") << "\n" + << "N" << sAccName << "\n" + << "TBank" << "\n" + << "D" << sCurrencyCode << "\n" + << (dInitBalance != 0 ? wxString("$") << sInitBalance << "\n" : "") + << "^" << "\n" + << "!Type:Cash" << "\n"; + } + return buffer; +} + +wxString mmQIFExportDialog::exportCategories(bool qif) +{ + wxString buffer_qif, buffer_csv; + + buffer_qif << "!Type:Cat" << "\n"; + for (const auto& category: core_->categoryList_.entries_) + { + const wxString categ_name = category->categName_; + bool bIncome = false; + core_->bTransactionList_.IsCategoryUsed(category->categID_ + , -1, bIncome, false); + buffer_qif << "N" << categ_name << "\n" + << (bIncome ? "I" : "E") << "\n" + << "^" << "\n"; + buffer_csv << categ_name << delimit_ << "\n"; + + for (const auto& sub_category: category->children_) + { + bIncome = false; + bool bSubcateg = sub_category->categID_ != -1; + core_->bTransactionList_.IsCategoryUsed(category->categID_ + , sub_category->categID_, bIncome, false); + wxString full_categ_name = wxString() + << categ_name << (qif ? (bSubcateg ? wxString()<<":" : wxString()<<"") : delimit_) + << sub_category->categName_; + buffer_qif << "N" << full_categ_name << "\n" + << (bIncome ? "I" : "E") << "\n" + << "^" << "\n"; + buffer_csv << full_categ_name << "\n"; + } + } + return qif ? buffer_qif : buffer_csv; +} + +void mmQIFExportDialog::mmExportQIF() +{ + const bool qif_csv = m_radio_box_->GetSelection() == 0; + const bool exp_categ = cCategs_->GetValue(); + const bool exp_transactions = (accountsCheckBox_->GetValue() && items_index_.GetCount()>0); + const bool write_to_file = toFileCheckBox_->GetValue(); + wxString sErrorMsg; + wxString buffer; + delimit_ = core_->dbInfoSettings_->GetStringSetting("DELIMITER", mmex::DEFDELIMTER); + long numRecords = 0; + + //Export categories + if (exp_categ) + { + buffer << exportCategories(qif_csv); + sErrorMsg << _("Categories exported") << "\n"; + } + + //Export transactions + numRecords = 0; + wxArrayInt transferTrxId; + + if (exp_transactions) + { + wxArrayInt selected_accounts_id; + for (size_t a = 0; a < items_index_.Count() ; ++a) + { + selected_accounts_id.Add(accounts_id_[items_index_[a]]); + } + + for (size_t a = 0; a < selected_accounts_id.Count(); ++a) + { + int fromAccountID = selected_accounts_id[a]; + wxString acctName = core_->accountList_.GetAccountName(fromAccountID); + + buffer << writeAccHeader(fromAccountID, qif_csv); + + for (const auto& pBankTransaction : core_->bTransactionList_.transactions_) + { + if ((pBankTransaction->accountID_ != fromAccountID) && (pBankTransaction->toAccountID_ != fromAccountID)) + continue; + + if (dateFromCheckBox_->GetValue() && pBankTransaction->date_ < fromDateCtrl_->GetValue() ) + continue; + if (dateToCheckBox_->GetValue() && pBankTransaction->date_ > toDateCtrl_->GetValue() ) + continue; + + wxDateTime dtdt = pBankTransaction->date_; + wxString dateString = mmGetDateForDisplay(dtdt); + + wxString payee = core_->payeeList_.GetPayeeName(pBankTransaction->payeeID_); + wxString type = pBankTransaction->transType_; + + int trans_id = pBankTransaction->transactionID(); + int fAccountID = pBankTransaction->accountID_; + const wxString fromAccount = core_->accountList_.GetAccountName(fAccountID); + int tAccountID = pBankTransaction->toAccountID_; + + wxString transNum = pBankTransaction->transNum_; + wxString categ = ""; + if (pBankTransaction->categID_ != -1) + categ = pBankTransaction->fullCatStr_; + wxString notes = (pBankTransaction->notes_); + notes.Replace("''", "'"); + notes.Replace("\n", " "); + + double value = pBankTransaction->amt_; + wxString amount = /*adjustedExportAmount(amtSeparator,*/ wxString()<<value/*)*/; + wxString toamount; + + if (transferTrxId.Index(trans_id) == wxNOT_FOUND) + numRecords++; + if (type == "Transfer") + { + const wxString toAccount = core_->accountList_.GetAccountName(tAccountID); + double tovalue = pBankTransaction->toAmt_; + toamount = /*adjustedExportAmount(amtSeparator,*/ wxString()<<tovalue/*)*/; + wxString amount_temp = amount; + + if (tAccountID == fromAccountID) { + categ = wxString::Format("[%s]", fromAccount); + amount = toamount; + toamount = amount_temp; + toamount.Prepend("-"); + } else if (fAccountID == fromAccountID) { + categ = wxString::Format("[%s]", toAccount); + amount.Prepend("-"); + } + if (selected_accounts_id.Index(tAccountID) == wxNOT_FOUND) + transferTrxId.Add(trans_id); + //Transaction number used to make transaction unique + // to proper merge transfer records + if (transNum.IsEmpty() && notes.IsEmpty()) + transNum = wxString::Format("#%ld", trans_id); + } + else if (type == "Withdrawal") + amount.Prepend("-"); + + if (qif_csv) + { + buffer << "D" << dateString << "\n"; + buffer << "T" << amount << "\n"; + if (!payee.IsEmpty()) + buffer << "P" << payee << "\n"; + if (!transNum.IsEmpty()) + buffer << "N" << transNum << "\n"; + if (!categ.IsEmpty()) + buffer << "L" << categ << "\n"; + if (!notes.IsEmpty()) + buffer << "M" << notes << "\n"; + } + + //if categ id is empty that mean this is split transaction + if (pBankTransaction->categID_ == -1) + { + mmSplitTransactionEntries* splits = pBankTransaction->splitEntries_; + pBankTransaction->getSplitTransactions(splits); + + for (int i = 0; i < (int)splits->entries_.size(); ++i) + { + value = splits->entries_[i]->splitAmount_; + if (type == "Withdraw... [truncated message content] |
From: <vo...@us...> - 2013-07-02 03:06:23
|
Revision: 4229 http://sourceforge.net/p/moneymanagerex/code/4229 Author: vomikan Date: 2013-07-02 03:06:18 +0000 (Tue, 02 Jul 2013) Log Message: ----------- reports files moved to proper folder Modified Paths: -------------- trunk/build/msw/makefile.gcc trunk/build/msw/makefile.vc trunk/build/msw/tests/makefile.gcc trunk/build/msw/tests/makefile.vc trunk/src/aboutdialog.cpp trunk/src/customreportdisplay.h trunk/src/lua_interface.cpp trunk/src/lua_interface.h trunk/src/mmex.cpp trunk/src/mmreportspanel.cpp trunk/src/mmreportspanel.h trunk/src/optionsdialog.cpp trunk/src/reports/budget.cpp trunk/src/reports/budget.h trunk/src/reports/budgetcategorysummary.cpp trunk/src/reports/budgetingperf.cpp trunk/src/reports/cashflow.cpp trunk/src/reports/cashflow.h trunk/src/reports/categexp.cpp trunk/src/reports/categexp.h trunk/src/reports/categovertimeperf.cpp trunk/src/reports/categovertimeperf.h trunk/src/reports/incexpenses.cpp trunk/src/reports/incexpenses.h trunk/src/reports/mmRepeat.cpp trunk/src/reports/mmRepeat.h trunk/src/reports/payee.cpp trunk/src/reports/payee.h trunk/src/reports/summary.cpp trunk/src/reports/summary.h trunk/src/reports/summaryassets.cpp trunk/src/reports/summaryassets.h trunk/src/reports/summarystocks.cpp trunk/src/reports/summarystocks.h trunk/src/reports/transactions.cpp trunk/src/reports/transactions.h trunk/src/reports/trx_stats.cpp trunk/src/reports/trx_stats.h trunk/src/tests/Makefile.in trunk/src/util.h Added Paths: ----------- trunk/src/reports/chart.cpp trunk/src/reports/chart.h trunk/src/reports/htmlbuilder.cpp trunk/src/reports/htmlbuilder.h trunk/src/reports/mmgraphgenerator.cpp trunk/src/reports/mmgraphgenerator.h trunk/src/reports/mmgraphincexpensesmonth.cpp trunk/src/reports/mmgraphincexpensesmonth.h trunk/src/reports/mmgraphpie.cpp trunk/src/reports/mmgraphpie.h trunk/src/reports/mmgraphtopcategories.cpp trunk/src/reports/mmgraphtopcategories.h trunk/src/reports/mmhomepagepanel.cpp trunk/src/reports/mmhomepagepanel.h trunk/src/reports/reportbase.h Removed Paths: ------------- trunk/src/chart.cpp trunk/src/chart.h trunk/src/htmlbuilder.cpp trunk/src/htmlbuilder.h trunk/src/mmgraphgenerator.cpp trunk/src/mmgraphgenerator.h trunk/src/mmgraphincexpensesmonth.cpp trunk/src/mmgraphincexpensesmonth.h trunk/src/mmgraphpie.cpp trunk/src/mmgraphpie.h trunk/src/mmgraphtopcategories.cpp trunk/src/mmgraphtopcategories.h trunk/src/mmhomepagepanel.cpp trunk/src/mmhomepagepanel.h trunk/src/reportbase.h Modified: trunk/build/msw/makefile.gcc =================================================================== --- trunk/build/msw/makefile.gcc 2013-07-02 02:18:54 UTC (rev 4228) +++ trunk/build/msw/makefile.gcc 2013-07-02 03:06:18 UTC (rev 4229) @@ -108,7 +108,6 @@ mmex_budgetyeardialog.o \ mmex_budgetyearentrydialog.o \ mmex_categdialog.o \ - mmex_chart.o \ mmex_constants.o \ mmex_currencydialog.o \ mmex_customreportdialog.o \ @@ -117,7 +116,6 @@ mmex_dbwrapper.o \ mmex_fileviewerdialog.o \ mmex_filtertransdialog.o \ - mmex_htmlbuilder.o \ mmex_lua_interface.o \ mmex_maincurrencydialog.o \ mmex_mmCurrencyFormatter.o \ @@ -129,12 +127,7 @@ mmex_mmcurrency.o \ mmex_mmex.o \ mmex_mmex_settings.o \ - mmex_mmgraphgenerator.o \ - mmex_mmgraphincexpensesmonth.o \ - mmex_mmgraphpie.o \ - mmex_mmgraphtopcategories.o \ mmex_mmhelppanel.o \ - mmex_mmhomepagepanel.o \ mmex_mmpayee.o \ mmex_mmreportspanel.o \ mmex_mmtransaction.o \ @@ -157,9 +150,16 @@ mmex_cashflow.o \ mmex_categexp.o \ mmex_categovertimeperf.o \ + mmex_chart.o \ + mmex_htmlbuilder.o \ mmex_incexpenses.o \ mmex_mmDateRange.o \ mmex_mmRepeat.o \ + mmex_mmgraphgenerator.o \ + mmex_mmgraphincexpensesmonth.o \ + mmex_mmgraphpie.o \ + mmex_mmgraphtopcategories.o \ + mmex_mmhomepagepanel.o \ mmex_payee.o \ mmex_summary.o \ mmex_summaryassets.o \ @@ -546,9 +546,6 @@ mmex_categdialog.o: ../../src/categdialog.cpp $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< -mmex_chart.o: ../../src/chart.cpp - $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< - mmex_constants.o: ../../src/constants.cpp $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< @@ -573,9 +570,6 @@ mmex_filtertransdialog.o: ../../src/filtertransdialog.cpp $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< -mmex_htmlbuilder.o: ../../src/htmlbuilder.cpp - $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< - mmex_lua_interface.o: ../../src/lua_interface.cpp $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< @@ -609,24 +603,9 @@ mmex_mmex_settings.o: ../../src/mmex_settings.cpp $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< -mmex_mmgraphgenerator.o: ../../src/mmgraphgenerator.cpp - $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< - -mmex_mmgraphincexpensesmonth.o: ../../src/mmgraphincexpensesmonth.cpp - $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< - -mmex_mmgraphpie.o: ../../src/mmgraphpie.cpp - $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< - -mmex_mmgraphtopcategories.o: ../../src/mmgraphtopcategories.cpp - $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< - mmex_mmhelppanel.o: ../../src/mmhelppanel.cpp $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< -mmex_mmhomepagepanel.o: ../../src/mmhomepagepanel.cpp - $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< - mmex_mmpayee.o: ../../src/mmpayee.cpp $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< @@ -693,6 +672,12 @@ mmex_categovertimeperf.o: ../../src/reports/categovertimeperf.cpp $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< +mmex_chart.o: ../../src/reports/chart.cpp + $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< + +mmex_htmlbuilder.o: ../../src/reports/htmlbuilder.cpp + $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< + mmex_incexpenses.o: ../../src/reports/incexpenses.cpp $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< @@ -702,6 +687,21 @@ mmex_mmRepeat.o: ../../src/reports/mmRepeat.cpp $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< +mmex_mmgraphgenerator.o: ../../src/reports/mmgraphgenerator.cpp + $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< + +mmex_mmgraphincexpensesmonth.o: ../../src/reports/mmgraphincexpensesmonth.cpp + $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< + +mmex_mmgraphpie.o: ../../src/reports/mmgraphpie.cpp + $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< + +mmex_mmgraphtopcategories.o: ../../src/reports/mmgraphtopcategories.cpp + $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< + +mmex_mmhomepagepanel.o: ../../src/reports/mmhomepagepanel.cpp + $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< + mmex_payee.o: ../../src/reports/payee.cpp $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< Modified: trunk/build/msw/makefile.vc =================================================================== --- trunk/build/msw/makefile.vc 2013-07-02 02:18:54 UTC (rev 4228) +++ trunk/build/msw/makefile.vc 2013-07-02 03:06:18 UTC (rev 4229) @@ -109,7 +109,6 @@ mmex_budgetyeardialog.obj \ mmex_budgetyearentrydialog.obj \ mmex_categdialog.obj \ - mmex_chart.obj \ mmex_constants.obj \ mmex_currencydialog.obj \ mmex_customreportdialog.obj \ @@ -118,7 +117,6 @@ mmex_dbwrapper.obj \ mmex_fileviewerdialog.obj \ mmex_filtertransdialog.obj \ - mmex_htmlbuilder.obj \ mmex_lua_interface.obj \ mmex_maincurrencydialog.obj \ mmex_mmCurrencyFormatter.obj \ @@ -130,12 +128,7 @@ mmex_mmcurrency.obj \ mmex_mmex.obj \ mmex_mmex_settings.obj \ - mmex_mmgraphgenerator.obj \ - mmex_mmgraphincexpensesmonth.obj \ - mmex_mmgraphpie.obj \ - mmex_mmgraphtopcategories.obj \ mmex_mmhelppanel.obj \ - mmex_mmhomepagepanel.obj \ mmex_mmpayee.obj \ mmex_mmreportspanel.obj \ mmex_mmtransaction.obj \ @@ -158,9 +151,16 @@ mmex_cashflow.obj \ mmex_categexp.obj \ mmex_categovertimeperf.obj \ + mmex_chart.obj \ + mmex_htmlbuilder.obj \ mmex_incexpenses.obj \ mmex_mmDateRange.obj \ mmex_mmRepeat.obj \ + mmex_mmgraphgenerator.obj \ + mmex_mmgraphincexpensesmonth.obj \ + mmex_mmgraphpie.obj \ + mmex_mmgraphtopcategories.obj \ + mmex_mmhomepagepanel.obj \ mmex_payee.obj \ mmex_summary.obj \ mmex_summaryassets.obj \ @@ -679,9 +679,6 @@ mmex_categdialog.obj: ..\..\src\categdialog.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\categdialog.cpp -mmex_chart.obj: ..\..\src\chart.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\chart.cpp - mmex_constants.obj: ..\..\src\constants.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\constants.cpp @@ -706,9 +703,6 @@ mmex_filtertransdialog.obj: ..\..\src\filtertransdialog.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\filtertransdialog.cpp -mmex_htmlbuilder.obj: ..\..\src\htmlbuilder.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\htmlbuilder.cpp - mmex_lua_interface.obj: ..\..\src\lua_interface.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\lua_interface.cpp @@ -742,24 +736,9 @@ mmex_mmex_settings.obj: ..\..\src\mmex_settings.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\mmex_settings.cpp -mmex_mmgraphgenerator.obj: ..\..\src\mmgraphgenerator.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\mmgraphgenerator.cpp - -mmex_mmgraphincexpensesmonth.obj: ..\..\src\mmgraphincexpensesmonth.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\mmgraphincexpensesmonth.cpp - -mmex_mmgraphpie.obj: ..\..\src\mmgraphpie.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\mmgraphpie.cpp - -mmex_mmgraphtopcategories.obj: ..\..\src\mmgraphtopcategories.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\mmgraphtopcategories.cpp - mmex_mmhelppanel.obj: ..\..\src\mmhelppanel.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\mmhelppanel.cpp -mmex_mmhomepagepanel.obj: ..\..\src\mmhomepagepanel.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\mmhomepagepanel.cpp - mmex_mmpayee.obj: ..\..\src\mmpayee.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\mmpayee.cpp @@ -826,6 +805,12 @@ mmex_categovertimeperf.obj: ..\..\src\reports\categovertimeperf.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\reports\categovertimeperf.cpp +mmex_chart.obj: ..\..\src\reports\chart.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\reports\chart.cpp + +mmex_htmlbuilder.obj: ..\..\src\reports\htmlbuilder.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\reports\htmlbuilder.cpp + mmex_incexpenses.obj: ..\..\src\reports\incexpenses.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\reports\incexpenses.cpp @@ -835,6 +820,21 @@ mmex_mmRepeat.obj: ..\..\src\reports\mmRepeat.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\reports\mmRepeat.cpp +mmex_mmgraphgenerator.obj: ..\..\src\reports\mmgraphgenerator.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\reports\mmgraphgenerator.cpp + +mmex_mmgraphincexpensesmonth.obj: ..\..\src\reports\mmgraphincexpensesmonth.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\reports\mmgraphincexpensesmonth.cpp + +mmex_mmgraphpie.obj: ..\..\src\reports\mmgraphpie.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\reports\mmgraphpie.cpp + +mmex_mmgraphtopcategories.obj: ..\..\src\reports\mmgraphtopcategories.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\reports\mmgraphtopcategories.cpp + +mmex_mmhomepagepanel.obj: ..\..\src\reports\mmhomepagepanel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\reports\mmhomepagepanel.cpp + mmex_payee.obj: ..\..\src\reports\payee.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\reports\payee.cpp Modified: trunk/build/msw/tests/makefile.gcc =================================================================== --- trunk/build/msw/tests/makefile.gcc 2013-07-02 02:18:54 UTC (rev 4228) +++ trunk/build/msw/tests/makefile.gcc 2013-07-02 03:06:18 UTC (rev 4229) @@ -107,7 +107,6 @@ mmex_tests_budgetyeardialog.o \ mmex_tests_budgetyearentrydialog.o \ mmex_tests_categdialog.o \ - mmex_tests_chart.o \ mmex_tests_constants.o \ mmex_tests_currencydialog.o \ mmex_tests_customreportdialog.o \ @@ -116,7 +115,6 @@ mmex_tests_dbwrapper.o \ mmex_tests_fileviewerdialog.o \ mmex_tests_filtertransdialog.o \ - mmex_tests_htmlbuilder.o \ mmex_tests_lua_interface.o \ mmex_tests_maincurrencydialog.o \ mmex_tests_mmCurrencyFormatter.o \ @@ -128,12 +126,7 @@ mmex_tests_mmcurrency.o \ mmex_tests_mmex.o \ mmex_tests_mmex_settings.o \ - mmex_tests_mmgraphgenerator.o \ - mmex_tests_mmgraphincexpensesmonth.o \ - mmex_tests_mmgraphpie.o \ - mmex_tests_mmgraphtopcategories.o \ mmex_tests_mmhelppanel.o \ - mmex_tests_mmhomepagepanel.o \ mmex_tests_mmpayee.o \ mmex_tests_mmreportspanel.o \ mmex_tests_mmtransaction.o \ @@ -156,9 +149,16 @@ mmex_tests_cashflow.o \ mmex_tests_categexp.o \ mmex_tests_categovertimeperf.o \ + mmex_tests_chart.o \ + mmex_tests_htmlbuilder.o \ mmex_tests_incexpenses.o \ mmex_tests_mmDateRange.o \ mmex_tests_mmRepeat.o \ + mmex_tests_mmgraphgenerator.o \ + mmex_tests_mmgraphincexpensesmonth.o \ + mmex_tests_mmgraphpie.o \ + mmex_tests_mmgraphtopcategories.o \ + mmex_tests_mmhomepagepanel.o \ mmex_tests_payee.o \ mmex_tests_summary.o \ mmex_tests_summaryassets.o \ @@ -559,9 +559,6 @@ mmex_tests_categdialog.o: ../../../src/categdialog.cpp $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< -mmex_tests_chart.o: ../../../src/chart.cpp - $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< - mmex_tests_constants.o: ../../../src/constants.cpp $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< @@ -586,9 +583,6 @@ mmex_tests_filtertransdialog.o: ../../../src/filtertransdialog.cpp $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< -mmex_tests_htmlbuilder.o: ../../../src/htmlbuilder.cpp - $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< - mmex_tests_lua_interface.o: ../../../src/lua_interface.cpp $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< @@ -622,24 +616,9 @@ mmex_tests_mmex_settings.o: ../../../src/mmex_settings.cpp $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< -mmex_tests_mmgraphgenerator.o: ../../../src/mmgraphgenerator.cpp - $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< - -mmex_tests_mmgraphincexpensesmonth.o: ../../../src/mmgraphincexpensesmonth.cpp - $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< - -mmex_tests_mmgraphpie.o: ../../../src/mmgraphpie.cpp - $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< - -mmex_tests_mmgraphtopcategories.o: ../../../src/mmgraphtopcategories.cpp - $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< - mmex_tests_mmhelppanel.o: ../../../src/mmhelppanel.cpp $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< -mmex_tests_mmhomepagepanel.o: ../../../src/mmhomepagepanel.cpp - $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< - mmex_tests_mmpayee.o: ../../../src/mmpayee.cpp $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< @@ -706,6 +685,12 @@ mmex_tests_categovertimeperf.o: ../../../src/reports/categovertimeperf.cpp $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< +mmex_tests_chart.o: ../../../src/reports/chart.cpp + $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< + +mmex_tests_htmlbuilder.o: ../../../src/reports/htmlbuilder.cpp + $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< + mmex_tests_incexpenses.o: ../../../src/reports/incexpenses.cpp $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< @@ -715,6 +700,21 @@ mmex_tests_mmRepeat.o: ../../../src/reports/mmRepeat.cpp $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< +mmex_tests_mmgraphgenerator.o: ../../../src/reports/mmgraphgenerator.cpp + $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< + +mmex_tests_mmgraphincexpensesmonth.o: ../../../src/reports/mmgraphincexpensesmonth.cpp + $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< + +mmex_tests_mmgraphpie.o: ../../../src/reports/mmgraphpie.cpp + $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< + +mmex_tests_mmgraphtopcategories.o: ../../../src/reports/mmgraphtopcategories.cpp + $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< + +mmex_tests_mmhomepagepanel.o: ../../../src/reports/mmhomepagepanel.cpp + $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< + mmex_tests_payee.o: ../../../src/reports/payee.cpp $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< Modified: trunk/build/msw/tests/makefile.vc =================================================================== --- trunk/build/msw/tests/makefile.vc 2013-07-02 02:18:54 UTC (rev 4228) +++ trunk/build/msw/tests/makefile.vc 2013-07-02 03:06:18 UTC (rev 4229) @@ -109,7 +109,6 @@ mmex_tests_budgetyeardialog.obj \ mmex_tests_budgetyearentrydialog.obj \ mmex_tests_categdialog.obj \ - mmex_tests_chart.obj \ mmex_tests_constants.obj \ mmex_tests_currencydialog.obj \ mmex_tests_customreportdialog.obj \ @@ -118,7 +117,6 @@ mmex_tests_dbwrapper.obj \ mmex_tests_fileviewerdialog.obj \ mmex_tests_filtertransdialog.obj \ - mmex_tests_htmlbuilder.obj \ mmex_tests_lua_interface.obj \ mmex_tests_maincurrencydialog.obj \ mmex_tests_mmCurrencyFormatter.obj \ @@ -130,12 +128,7 @@ mmex_tests_mmcurrency.obj \ mmex_tests_mmex.obj \ mmex_tests_mmex_settings.obj \ - mmex_tests_mmgraphgenerator.obj \ - mmex_tests_mmgraphincexpensesmonth.obj \ - mmex_tests_mmgraphpie.obj \ - mmex_tests_mmgraphtopcategories.obj \ mmex_tests_mmhelppanel.obj \ - mmex_tests_mmhomepagepanel.obj \ mmex_tests_mmpayee.obj \ mmex_tests_mmreportspanel.obj \ mmex_tests_mmtransaction.obj \ @@ -158,9 +151,16 @@ mmex_tests_cashflow.obj \ mmex_tests_categexp.obj \ mmex_tests_categovertimeperf.obj \ + mmex_tests_chart.obj \ + mmex_tests_htmlbuilder.obj \ mmex_tests_incexpenses.obj \ mmex_tests_mmDateRange.obj \ mmex_tests_mmRepeat.obj \ + mmex_tests_mmgraphgenerator.obj \ + mmex_tests_mmgraphincexpensesmonth.obj \ + mmex_tests_mmgraphpie.obj \ + mmex_tests_mmgraphtopcategories.obj \ + mmex_tests_mmhomepagepanel.obj \ mmex_tests_payee.obj \ mmex_tests_summary.obj \ mmex_tests_summaryassets.obj \ @@ -650,9 +650,6 @@ mmex_tests_categdialog.obj: ..\..\..\src\categdialog.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\categdialog.cpp -mmex_tests_chart.obj: ..\..\..\src\chart.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\chart.cpp - mmex_tests_constants.obj: ..\..\..\src\constants.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\constants.cpp @@ -677,9 +674,6 @@ mmex_tests_filtertransdialog.obj: ..\..\..\src\filtertransdialog.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\filtertransdialog.cpp -mmex_tests_htmlbuilder.obj: ..\..\..\src\htmlbuilder.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\htmlbuilder.cpp - mmex_tests_lua_interface.obj: ..\..\..\src\lua_interface.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\lua_interface.cpp @@ -713,24 +707,9 @@ mmex_tests_mmex_settings.obj: ..\..\..\src\mmex_settings.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\mmex_settings.cpp -mmex_tests_mmgraphgenerator.obj: ..\..\..\src\mmgraphgenerator.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\mmgraphgenerator.cpp - -mmex_tests_mmgraphincexpensesmonth.obj: ..\..\..\src\mmgraphincexpensesmonth.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\mmgraphincexpensesmonth.cpp - -mmex_tests_mmgraphpie.obj: ..\..\..\src\mmgraphpie.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\mmgraphpie.cpp - -mmex_tests_mmgraphtopcategories.obj: ..\..\..\src\mmgraphtopcategories.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\mmgraphtopcategories.cpp - mmex_tests_mmhelppanel.obj: ..\..\..\src\mmhelppanel.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\mmhelppanel.cpp -mmex_tests_mmhomepagepanel.obj: ..\..\..\src\mmhomepagepanel.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\mmhomepagepanel.cpp - mmex_tests_mmpayee.obj: ..\..\..\src\mmpayee.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\mmpayee.cpp @@ -797,6 +776,12 @@ mmex_tests_categovertimeperf.obj: ..\..\..\src\reports\categovertimeperf.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\reports\categovertimeperf.cpp +mmex_tests_chart.obj: ..\..\..\src\reports\chart.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\reports\chart.cpp + +mmex_tests_htmlbuilder.obj: ..\..\..\src\reports\htmlbuilder.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\reports\htmlbuilder.cpp + mmex_tests_incexpenses.obj: ..\..\..\src\reports\incexpenses.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\reports\incexpenses.cpp @@ -806,6 +791,21 @@ mmex_tests_mmRepeat.obj: ..\..\..\src\reports\mmRepeat.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\reports\mmRepeat.cpp +mmex_tests_mmgraphgenerator.obj: ..\..\..\src\reports\mmgraphgenerator.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\reports\mmgraphgenerator.cpp + +mmex_tests_mmgraphincexpensesmonth.obj: ..\..\..\src\reports\mmgraphincexpensesmonth.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\reports\mmgraphincexpensesmonth.cpp + +mmex_tests_mmgraphpie.obj: ..\..\..\src\reports\mmgraphpie.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\reports\mmgraphpie.cpp + +mmex_tests_mmgraphtopcategories.obj: ..\..\..\src\reports\mmgraphtopcategories.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\reports\mmgraphtopcategories.cpp + +mmex_tests_mmhomepagepanel.obj: ..\..\..\src\reports\mmhomepagepanel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\reports\mmhomepagepanel.cpp + mmex_tests_payee.obj: ..\..\..\src\reports\payee.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\reports\payee.cpp Modified: trunk/src/aboutdialog.cpp =================================================================== --- trunk/src/aboutdialog.cpp 2013-07-02 02:18:54 UTC (rev 4228) +++ trunk/src/aboutdialog.cpp 2013-07-02 03:06:18 UTC (rev 4229) @@ -17,7 +17,7 @@ *******************************************************/ #include "aboutdialog.h" #include "constants.h" -#include "htmlbuilder.h" +#include "reports/htmlbuilder.h" #include "fileviewerdialog.h" #include "paths.h" /*******************************************************/ Deleted: trunk/src/chart.cpp =================================================================== --- trunk/src/chart.cpp 2013-07-02 02:18:54 UTC (rev 4228) +++ trunk/src/chart.cpp 2013-07-02 03:06:18 UTC (rev 4229) @@ -1,694 +0,0 @@ -//---------------------------------------------------------------------------- -#include <limits> -#include <algorithm> // min, max -#include <math.h> -//---------------------------------------------------------------------------- -#include "chart.h" -//---------------------------------------------------------------------------- - -namespace -{ - -int ROUND( double x ) -{ - double res = floor( x + 0.5 ); - return static_cast<int>( res ); // (int)(x + 0.5) -} -//---------------------------------------------------------------------------- - -float getFrequency(float vmax) -{ - int max_steps = 5; - float step = vmax/max_steps; - - const float base = 10; - int y = 0; - - while ( pow(base, ++y) < step ); - float new_step = pow(base, --y); - - if (step > new_step) - { - size_t cnt = floor(step/new_step + 0.5f); - if (cnt > 1) - new_step *= cnt; - } - - return new_step; -} -//---------------------------------------------------------------------------- - -} // namespace - -//---------------------------------------------------------------------------- - -ChartData::ChartData( const wxString &aKey, float aVal ) : - key( aKey ), - val( aVal ), - aval( aVal ) -{ -} -//---------------------------------------------------------------------------- - -ChartData::ChartData( const wxString &aKey, const std::vector<float> &aSerie ) : - key( aKey ), - val(), - aval(), - serie( aSerie ) -{ -} -//---------------------------------------------------------------------------- - -AbstractChart::AbstractChart( int aWidth, int aHeight ) : - width_( aWidth ), - height_( aHeight ) -{ - int i = -1; - palete[++i] = wxColour( 0x00, 0x79, 0xEA ); - palete[++i] = wxColour( 0xee, 0x2A, 0x00 ); - palete[++i] = wxColour( 0xF7, 0x97, 0x31 ); - palete[++i] = wxColour( 0xBD, 0x7F, 0xAE ); - palete[++i] = wxColour( 0xFF, 0xF3, 0xAB ); - palete[++i] = wxColour( 0x66, 0xAE, 0x3F ); - palete[++i] = wxColour( 0xBB, 0x7F, 0xB8 ); - palete[++i] = wxColour( 0x64, 0x91, 0xAA ); - palete[++i] = wxColour( 0xE8, 0xC1, 0x45 ); - palete[++i] = wxColour( 0x2B, 0x96, 0xE7 ); - palete[++i] = wxColour( 0xD2, 0x9A, 0xf7 ); - palete[++i] = wxColour( 0x8F, 0xEA, 0x7B ); - palete[++i] = wxColour( 0xFF, 0xFF, 0x3B ); - palete[++i] = wxColour( 0x58, 0xCC, 0xCC ); - palete[++i] = wxColour( 0x7A, 0xB3, 0x3E ); - palete[++i] = wxColour( 0x42, 0x44, 0x3F ); - palete[++i] = wxColour( 0xFC, 0xAC, 0x00 ); - palete[++i] = wxColour( 0xA2, 0xE1, 0x4A ); - palete[++i] = wxColour( 0xa8, 0x62, 0x16 ); - palete[++i] = wxColour( 0xC3, 0xD9, 0xFF ); - palete[++i] = wxColour( 0xC7, 0x98, 0x10 ); - palete[++i] = wxColour( 0x6B, 0xBA, 0x70 ); - palete[++i] = wxColour( 0xCD, 0xEB, 0x8B ); - palete[++i] = wxColour( 0xD0, 0x1F, 0x3C ); - - wxASSERT( ++i == PAL_MAX ); - - image_ = wxBitmap( width_, height_ ); - dc_.SelectObject( image_ ); - - ClearFillColour(); - ClearStrokeColour(); - - plainFont = wxFont( 8, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL ); - boldFont = wxFont( 8, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD ); -} -//---------------------------------------------------------------------------- - -void AbstractChart::SetBackground( const wxColour& colour ) -{ - ClearStrokeColour(); - SetFillColour( colour ); - dc_.Clear(); -} -//---------------------------------------------------------------------------- - -void AbstractChart::SetFillColour( const wxColour& colour, int style ) -{ - wxBrush brush = wxBrush( colour, style ); - dc_.SetBrush( brush ); -} -//---------------------------------------------------------------------------- - -void AbstractChart::SetStrokeColour( const wxColour& colour, int width, int style ) -{ - wxPen pen = wxPen( colour, width, style ); - dc_.SetPen( pen ); -} -//---------------------------------------------------------------------------- - -void AbstractChart::ClearFillColour() -{ - dc_.SetBrush( *wxTRANSPARENT_BRUSH ); -} -//---------------------------------------------------------------------------- - -void AbstractChart::ClearStrokeColour() -{ - dc_.SetPen( *wxTRANSPARENT_PEN ); -} -//---------------------------------------------------------------------------- - -bool AbstractChart::Save( const wxString& file ) -{ - wxImage pic = image_.ConvertToImage(); - pic.SetMaskColour(255,255,255); - pic.SaveFile( file, wxBITMAP_TYPE_PNG ); - return true; -} - -bool AbstractChart::Save(wxMemoryOutputStream& stream) -{ - wxImage pic = image_.ConvertToImage(); - pic.SetMaskColour(255,255,255); - pic.SaveFile(stream, wxBITMAP_TYPE_PNG ); - return true; -} -//---------------------------------------------------------------------------- - -void AbstractChart::SetData( const std::vector<ChartData> &aData, bool simpleValue ) -{ - data = aData; - - if ( !simpleValue ) return; - - float vtotal = 0; - - for ( size_t i = 0; i < data.size(); ++i ) - vtotal += fabs( data[i].val ); - - // normalize 0..100 for percentage charts - for ( size_t i = 0; i < data.size(); ++i ) - data[i].val = fabs( data[i].val ) * 100.0 / vtotal; -} -//---------------------------------------------------------------------------- - -void AbstractChart::SetData( const std::vector<ChartData> &aData, const std::vector<wxString> &aSerieLabel ) -{ - SetData( aData, false ); - serieLabel = aSerieLabel; -} -//---------------------------------------------------------------------------- -//---------------------------------------------------------------------------- - -PieChart::PieChart( int aWidth, int aHeight ) : AbstractChart( aWidth, aHeight ) -{ -} -//---------------------------------------------------------------------------- - -void PieChart::Init( int aChartsize, EChartLegend aLegendMode, EPieChartStyle aPieMode ) -{ - csize = aChartsize; - keymode = aLegendMode; - mode = aPieMode; - - SetBackground( *wxWHITE ); -} -//---------------------------------------------------------------------------- - -bool PieChart::Render( const wxString& title ) -{ - if ( data.empty() ) return false; - - if ( !title.empty() ) - { - SetStrokeColour( *wxBLACK ); - ClearFillColour(); - - dc_.SetFont( boldFont ); - dc_.DrawText( title, 10, 20 - dc_.GetTextExtent( title ).GetHeight() ); - } - - // where to start drawing from - int originLeft = 0; - - if ( keymode == CHART_LEGEND_FIXED ) - originLeft = 10; - else - originLeft = ( width_ - csize ) / 2; - - ClearStrokeColour(); - SetFillColour( *wxBLACK ); - - // background - dc_.DrawEllipse( originLeft - 2, ROUND( ( ( height_ - 12 ) / 2 ) - csize / 2.0 ) + 12, csize + 4, csize + 4 ); - - if ( keymode == CHART_LEGEND_FIXED ) - { - SetStrokeColour( *wxBLACK ); - ClearFillColour(); - - dc_.SetFont( boldFont ); - wxString legend = _( "Legend:" ); - dc_.DrawText( legend, csize + 23, 25 - dc_.GetTextExtent( legend ).GetHeight() ); - - dc_.SetFont( plainFont ); - - for ( size_t i = 0; i < data.size(); ++i ) - { - if ( mode == PIE_CHART_PERCENT ) - dc_.DrawText( - data[i].key + " (" + wxString::Format( "%.2f" , data[i].val ) + "%)" , - csize + 37, - 40 + i * 18 - 11 ); - else - dc_.DrawText( - data[i].key, // + " (" + wxString::Format("%.2f", data[i].aval) + ")" - csize + 37, - 40 + i * 18 - 11 ); - } - - dc_.DrawRectangle( - csize + 18, - 10, - ( width_ - ( csize + 18 ) - 10 ), - ( int ) ( 20 + data.size() * 18 ) ); - } - else - { - int l = originLeft + ROUND( csize / 2.0 ); - int i1 = ROUND( ( height_ - 12 ) / 2 ) + 12; - - float f1 = csize / 2.0 + 6.0; // offset of the label to the pie - float f2 = 0.0; - - for ( size_t j = 0; j < data.size(); ++j ) - { - float f3 = ( f2 + data[j].val / 2.0 ) - 25.0; - int j1 = l + ( int ) ( f1 * cos( f3 * 0.062831799999999993 ) ); - int k1 = i1 + ( int ) ( f1 * sin( f3 * 0.062831799999999993 ) ); - - dc_.DrawLine( l, i1, j1, k1 ); - dc_.DrawLine( j1, k1, j1 + 6 * ( ( j1 > l ) ? 1 : -1 ), k1 ); - - dc_.SetFont( plainFont ); - wxString s; - - if ( mode == PIE_CHART_PERCENT ) - s = data[j].key + " (" + wxString::Format( "%.2f" , data[j].val ) + "%)" ; - else - s = data[j].key; // + " (" + wxString::Format("%.2f", data[j].aval) + ")" - - int l1; - - if ( j1 > l ) - l1 = j1 + 6 + 1; - else - l1 = j1 - 6 - ( dc_.GetTextExtent( s ).GetWidth() + 1 ); - - int i2 = k1 + 6; - dc_.DrawText( s, l1, i2 - dc_.GetTextExtent( s ).GetHeight() ); - f2 += data[j].val; - } - } - - float f = 25.0; - - for ( size_t k = 0; k < data.size(); ++k ) - { - ClearStrokeColour(); - SetFillColour( palete[k % PAL_MAX] ); - - if ( keymode == CHART_LEGEND_FIXED ) - dc_.DrawRectangle( csize + 23, 30 + k * 18, 12, 12 ); - - dc_.DrawEllipticArc( - originLeft, - ROUND( ( ( height_ - 12 ) / 2 ) - csize / 2.0 ) + 12, - csize, - csize, - ROUND( f * 3.6 ) + ceil( data[k].val * 3.6 ) * -1, - ROUND( f * 3.6 ) ); - f -= data[k].val; - - if ( f < 0.0 ) - f += 100; - } - - return true; -} -//---------------------------------------------------------------------------- -//---------------------------------------------------------------------------- - -BarChart::BarChart( int aWidth, int aHeight ) : AbstractChart( aWidth, aHeight ) -{ -} -//---------------------------------------------------------------------------- - -void BarChart::Init( int aChartsize, EChartLegend aLegendMode, EBarChartStyle aMode ) -{ - csize = aChartsize; - keymode = aLegendMode; - mode = aMode; - - SetBackground( *wxWHITE ); -} -//---------------------------------------------------------------------------- - -bool BarChart::Render( const wxString& title ) -{ - if ( data.empty() ) return false; - - // calculate min/max value (boundaries) - float min = 0; - float max = 0; - - if ( mode == BAR_CHART_SIMPLE ) - { - // this forces the chart to start from 0 if values are all greater than 0 - min = 0; - max = data[0].aval; - - for ( size_t i = 0; i < data.size(); ++i ) - { - min = std::min( min, data[i].aval ); - max = std::max( max, data[i].aval ); - } - } - else - { - // this forces the chart to start from 0 if values are all greater than 0 - min = 0; - max = data[0].serie[0]; - - for ( size_t i = 0; i < data.size(); ++i ) - { - for ( size_t j = 0; j < data[i].serie.size(); ++j ) - { - min = std::min( min, data[i].serie[j] ); - max = std::max( max, data[i].serie[j] ); - } - } - } - - // avoid out of scale for empty data sets - if ( min == max ) max = 1; - - const float freq = getFrequency( fabs(min) + fabs(max) ); - - if ( !title.empty() ) - { - SetStrokeColour( *wxBLACK ); - ClearFillColour(); - - dc_.SetFont( boldFont ); - dc_.DrawText( title, 10, 20 - dc_.GetTextExtent( title ).GetHeight() ); - } - - // where to start drawing from - int originLeft = 1; - - while ( max > pow( 10.0f, originLeft++ ) ); - - originLeft *= 7; - - int gap = 5; - - int barwidth; - - if ( mode == BAR_CHART_SIMPLE ) - { - if ( keymode == CHART_LEGEND_FIXED ) - { - barwidth = ( int ) ( ( csize - gap * data.size() ) / data.size() ); - } - else - { - barwidth = ( int ) ( ( width_ - originLeft - gap * data.size() - 10 ) / data.size() ); - } - } - else - { - if ( keymode == CHART_LEGEND_FIXED ) - { - barwidth = ( int ) ( ( csize - gap * data.size() ) / ( data.size() * serieLabel.size() ) ); - } - else - { - barwidth = ( int ) ( ( width_ - originLeft - gap * data.size() - 10 ) / ( data.size() * serieLabel.size() ) ); - } - } - - // draw the legend/key of the chart - if ( keymode == CHART_LEGEND_FIXED ) - { - SetStrokeColour( *wxBLACK ); - ClearFillColour(); - - dc_.SetFont( boldFont ); - wxString legend = _( "Legend:" ); - dc_.DrawText( legend, originLeft + csize + 15, 25 - dc_.GetTextExtent( legend ).GetHeight() ); - - dc_.SetFont( plainFont ); - - if ( mode == BAR_CHART_SIMPLE ) - { - for ( size_t i = 0; i < data.size(); ++i ) - { - dc_.DrawText( - data[i].key /* + " (" + wxString::Format("%.2f", data[i].aval) + ")" */, - originLeft + csize + 30, - 43 + i * 18 - dc_.GetTextExtent( legend ).GetHeight() ); - } - } - else - { - for ( size_t i = 0; i < serieLabel.size(); ++i ) - { - dc_.DrawText( - serieLabel[i] /* + " (" + wxString::Format("%.2f", data[i].aval) + ")" */, - originLeft + csize + 30, - 43 + i * 18 - dc_.GetTextExtent( legend ).GetHeight() ); - } - } - - if ( mode == BAR_CHART_SIMPLE ) - { - dc_.DrawRectangle( - originLeft + csize + 10, - 10, - width_ - ( originLeft + csize + 15 ), - ( int ) ( 20 + data.size() * 18 ) ); - } - else - { - dc_.DrawRectangle( - originLeft + csize + 10, - 10, - width_ - ( originLeft + csize + 15 ), - ( int ) ( 20 + serieLabel.size() * 18 ) ); - } - - // draw axis - dc_.DrawLine( originLeft - 3, height_ - 25, originLeft + csize + 3, height_ - 25 ); - dc_.DrawLine( originLeft, height_ - 22, originLeft, 22 ); - // vertical axis labels - int y = height_ - 25; - int step = static_cast<int>( ( height_ - 50 ) / ( ( fabs( min ) + fabs( max ) ) / freq ) ); - - for ( float fi = min; fi <= max; fi += freq ) - { - // draw the label - ClearFillColour(); - SetStrokeColour( *wxBLACK ); - - wxString label = wxString::Format( "%.0f" , fi ); - dc_.DrawText( label, 3, y - dc_.GetTextExtent( label ).GetHeight() ); - - // 1st entry skip grid, otherwise axis is overriden - if ( fi != min ) - { - // draw grid - ClearFillColour(); - SetStrokeColour( *wxLIGHT_GREY ); - - dc_.DrawLine( originLeft + 3, y, originLeft + csize - 3, y ); - } - - y -= step; - } - - - if ( mode == BAR_CHART_SERIES ) - { - int labelOffset = ( int ) ( ( ( barwidth * serieLabel.size() ) + gap ) / 2 ); - - SetStrokeColour( *wxBLACK ); - ClearFillColour(); - - for ( int i = 0; i < static_cast<int>( data.size() ); ++i ) - { - wxString key = data[i].key /* + " (" + wxString::Format("%.2f", data[i].aval) + ")" */; - wxCoord x = originLeft + i * ( barwidth * static_cast<int>( serieLabel.size() ) ) + ( i + 1 ) * gap + labelOffset - ( dc_.GetTextExtent( key ).GetWidth() / 2 ); - wxCoord y = height_ - 10 - dc_.GetTextExtent( key ).GetHeight(); - dc_.DrawText( key, x, y ); - } - } - } - else - { - SetStrokeColour( *wxBLACK ); - ClearFillColour(); - - // draw axis - dc_.DrawLine( originLeft - 3, height_ - 25, width_ - 5, height_ - 25 ); - dc_.DrawLine( originLeft, height_ - 22, originLeft, 22 ); - - dc_.SetFont( plainFont ); - - int y = height_ - 25; - int step = static_cast<int>( ( height_ - 50 ) / ( ( fabs( min ) + fabs( max ) ) / freq ) ); - - // horiz axis labels - if ( mode == BAR_CHART_SIMPLE ) - { - int labelOffset = ( barwidth + gap ) / 2; - labelOffset -= 20; - - for ( size_t i = 0; i < data.size(); ++i ) - { - wxString key = data[i].key /* + " (" + wxString::Format("%.2f", data[i].aval) + ")" */; - dc_.DrawText( - key, - originLeft + i*barwidth + ( i + 1 )*gap + labelOffset /* - (dc_.GetTextExtent(key).GetLength() / 2) */, - height_ - 10 - dc_.GetTextExtent( key ).GetHeight() ); - } - } - - // vertical axis labels - for ( float fi = min; fi <= max; fi += freq ) - { - // draw the label - ClearFillColour(); - SetStrokeColour( *wxBLACK ); - - wxString label = wxString::Format( "%.0f" , fi ); - dc_.DrawText( label, 3, y - dc_.GetTextExtent( label ).GetHeight() ); - - // 1st entry skip grid, otherwise axis is overriden - if ( fi != min ) - { - // draw grid - ClearFillColour(); - SetStrokeColour( *wxLIGHT_GREY ); - - dc_.DrawLine( originLeft + 3, y, width_ - 8, y ); - } - - y -= step; - } - - if ( mode == BAR_CHART_SERIES ) - { - int labelOffset = ( int ) ( ( ( barwidth * serieLabel.size() ) + gap ) / 2 ); - - SetStrokeColour( *wxBLACK ); - ClearFillColour(); - - for ( int i = 0; i < static_cast<int>( data.size() ); ++i ) - { - wxString key = data[i].key /* + " (" + wxString::Format("%.2f", data[i].aval) + ")" */; - wxCoord x = originLeft + i * ( barwidth * static_cast<int>( serieLabel.size() ) ) + ( i + 1 ) * gap + labelOffset /* - (dc_.GetTextExtent(key).GetLength() / 2) */; - wxCoord y = height_ - 10 - dc_.GetTextExtent( key ).GetHeight(); - dc_.DrawText( key, x, y ); - } - } - } - - // draw the bars - if ( mode == BAR_CHART_SIMPLE ) - { - int zero = ( int ) ( min * ( height_ - 50 ) / ( max - min ) ); - - for ( size_t k = 0; k < data.size(); ++k ) - { - ClearStrokeColour(); - SetFillColour( palete[k % PAL_MAX] ); - - int h = static_cast<int>( data[k].aval * ( height_ - 50 ) / ( max - min ) ); - - if ( h == 0 ) - { - if ( data[k].aval > 0 ) - { - h = 1; - } - else if ( data[k].aval < 0 ) - { - h = -1; - } - } - - if ( data[k].aval >= 0 ) - { - dc_.DrawRectangle( - originLeft + k * barwidth + ( k + 1 ) * gap, - ( height_ - 25 ) + zero - h, - barwidth, - h ); - } - else - { - dc_.DrawRectangle( - originLeft + k * barwidth + ( k + 1 ) * gap, - ( height_ - 25 ) + zero, - barwidth, - -h ); - } - - // key tag - if ( keymode == CHART_LEGEND_FIXED ) - { - dc_.DrawRectangle( - originLeft + csize + 15, - 33 + k * 18, - 10, - 10 ); - } - } - } - else - { - int zero = ( int ) ( min * ( height_ - 50 ) / ( max - min ) ); - - for ( size_t k = 0; k < data.size(); ++k ) - { - for ( size_t j = 0; j < serieLabel.size(); ++j ) - { - ClearStrokeColour(); - SetFillColour( palete[j % PAL_MAX] ); - - int h = ( int ) ( data[k].serie[j] * ( height_ - 50 ) / ( max - min ) ); - - if ( h == 0 ) - { - if ( data[k].aval > 0 ) - { - h = 1; - } - else if ( data[k].aval < 0 ) - { - h = -1; - } - } - - if ( data[k].serie[j] >= 0 ) - { - wxCoord x = originLeft + ( k * static_cast<int>( serieLabel.size() ) + j ) * barwidth + ( k + 1 ) * gap; - wxCoord y = ( height_ - 25 ) + zero - h; - dc_.DrawRectangle( x, y, barwidth, h ); - } - else - { - wxCoord x = originLeft + ( k * static_cast<int>( serieLabel.size() ) + j ) * barwidth + ( k + 1 ) * gap; - wxCoord y = ( height_ - 25 ) + zero; - dc_.DrawRectangle( x, y, barwidth, -h ); - } - - // key tag - if ( keymode == CHART_LEGEND_FIXED ) - { - // only once - if ( k == 0 ) - { - dc_.DrawRectangle( - originLeft + csize + 15, - 33 + j * 18, - 10, - 10 ); - } - } - } - } - } - - return true; -} -//---------------------------------------------------------------------------- Deleted: trunk/src/chart.h =================================================================== --- trunk/src/chart.h 2013-07-02 02:18:54 UTC (rev 4228) +++ trunk/src/chart.h 2013-07-02 03:06:18 UTC (rev 4229) @@ -1,105 +0,0 @@ -//---------------------------------------------------------------------------- -#ifndef _MM_EX_CHART_H_ -#define _MM_EX_CHART_H_ -//---------------------------------------------------------------------------- -#include "defs.h" -#include <vector> -#include <wx/mstream.h> -//---------------------------------------------------------------------------- - -class ChartData -{ -public: - ChartData( const wxString &aKey, float aVal = 0 ); - ChartData( const wxString &aKey, const std::vector<float> &aSerie ); - - wxString key; - - // normalized val - float val; - // real val - float aval; - - std::vector<float> serie; -}; -//---------------------------------------------------------------------------- -enum EChartLegend { CHART_LEGEND_FIXED, CHART_LEGEND_FLOAT }; -//---------------------------------------------------------------------------- - -class AbstractChart -{ -public: - AbstractChart( int aWidth, int aHeight ); - virtual ~AbstractChart() {} - - void SetBackground( const wxColour& colour ); - void SetFillColour( const wxColour& colour, int style = wxSOLID ); - void SetStrokeColour( const wxColour& colour, int width = 1, int style = wxSOLID ); - - void ClearFillColour(); - void ClearStrokeColour(); - - bool Save( const wxString& file ); - bool Save(wxMemoryOutputStream& stream); - - void SetData( const std::vector<ChartData> &aData, bool simpleValue = true ); - void SetData( const std::vector<ChartData> &aData, const std::vector<wxString> &aSerieLabel ); - - virtual bool Render( const wxString& title ) = 0; - -protected: - - std::vector<ChartData> data; - std::vector<wxString> serieLabel; - - enum { PAL_MAX = 24 }; - wxColour palete[PAL_MAX]; - - wxMemoryDC dc_; - int width_; - int height_; - - wxFont plainFont; - wxFont boldFont; - -private: - wxBitmap image_; -}; -//---------------------------------------------------------------------------- -enum EPieChartStyle { PIE_CHART_PERCENT, PIE_CHART_ABSOLUT }; -//---------------------------------------------------------------------------- - -class PieChart : public AbstractChart -{ -public: - PieChart( int aWidth, int aHeight ); - - void Init( int aChartsize, EChartLegend aLegendMode = CHART_LEGEND_FIXED, EPieChartStyle aPieMode = PIE_CHART_PERCENT ); - bool Render( const wxString& title = "" ); - -private: - int csize; - int keymode; - int mode; -}; -//---------------------------------------------------------------------------- -enum EBarChartStyle { BAR_CHART_SIMPLE, BAR_CHART_SERIES }; -//---------------------------------------------------------------------------- - -class BarChart : public AbstractChart -{ -public: - BarChart( int aWidth, int aHeight ); - - void Init( int aChartsize, EChartLegend aLegendMode = CHART_LEGEND_FIXED, EBarChartStyle aMode = BAR_CHART_SIMPLE ); - bool Render( const wxString& title = "" ); - -private: - int csize; - int keymode; - int mode; -}; -//---------------------------------------------------------------------------- -#endif // _MM_EX_CHART_H_ -//---------------------------------------------------------------------------- - Modified: trunk/src/customreportdisplay.h =================================================================== --- trunk/src/customreportdisplay.h 2013-07-02 02:18:54 UTC (rev 4228) +++ trunk/src/customreportdisplay.h 2013-07-02 03:06:18 UTC (rev 4229) @@ -18,8 +18,8 @@ #ifndef _MM_EX_CUSTOMREPORTDISPLAY_H_ #define _MM_EX_CUSTOMREPORTDISPLAY_H_ -#include "reportbase.h" -#include "htmlbuilder.h" +#include "reports/reportbase.h" +#include "reports/htmlbuilder.h" class mmCustomReport : public mmPrintableBase { Deleted: trunk/src/htmlbuilder.cpp =================================================================== --- trunk/src/htmlbuilder.cpp 2013-07-02 02:18:54 UTC (rev 4228) +++ trunk/src/htmlbuilder.cpp 2013-07-02 03:06:18 UTC (rev 4229) @@ -1,316 +0,0 @@ -/******************************************************* - Copyright (C) 2006 Madhan Kanagavel, Paulo Lopes - - 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, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - ********************************************************/ - -#include "htmlbuilder.h" -#include "util.h" -#include "mmCurrencyFormatter.h" -#include "mmOption.h" -#include "constants.h" - -mmHTMLBuilder::mmHTMLBuilder() -{ - // init colors from config - color_.color1 = mmColors::listAlternativeColor0.GetAsString(wxC2S_HTML_SYNTAX); - color_.color0 = mmColors::listBackColor.GetAsString(wxC2S_HTML_SYNTAX); - color_.bgcolor = mmColors::listBackColor.GetAsString(wxC2S_HTML_SYNTAX); - color_.text = mmColors::listBorderColor.GetAsString(wxC2S_HTML_SYNTAX); - color_.link = "#0000cc"; - color_.vlink = "#551a8b"; - color_.alink = "#ff0000"; - color_.table_header = "#d5d6de"; - // init font size from config - font_size_ = mmIniOptions::instance().html_font_size_; - - today_.date = wxDateTime::Now().GetDateOnly(); - today_.date_str = today_.date.FormatDate(); - today_.todays_date = wxString::Format(_("Today's Date: %s"), today_.date_str); -} - -void mmHTMLBuilder::init() -{ - color_.bgswitch = true; - html_ = wxString::Format(wxString::FromUTF8(tags::HTML) - , mmex::getProgramName() - , color_.bgcolor - , color_.text - , color_.link - , color_.vlink - , color_.alink - ); - - //Show user name if provided - if (mmOptions::instance().userNameString_ != "") - { - startTable("100%"); - startTableRow(); - if (mmIniOptions::instance().enableCustomLogo_) - { - startTableCell(); - addImage(mmIniOptions::instance().logoName_); - endTableCell(); - } - startTableCell(); - addHeader(2, mmOptions::instance().userNameString_); - endTableCell(); - endTableRow(); - endTable(); - addHorizontalLine(2); - } -} - -void mmHTMLBuilder::addHeader(int level, const wxString& header) -{ - int header_font_size = level + font_size_; - if (header_font_size > 7) header_font_size = 7; - html_+= wxString::Format(tags::HEADER, header_font_size, header); -} - -void mmHTMLBuilder::addHeaderItalic(int level, const wxString& header) -{ - int header_font_size = level + font_size_; - if (header_font_size > 7) header_font_size = 7; - html_+= wxString::Format(tags::HEADER_ITALIC, header_font_size, header); -} - -void mmHTMLBuilder::addDateNow() -{ - addHeaderItalic(1, today_.todays_date); - addLineBreak(); -} - -void mmHTMLBuilder::addImage(const wxString& src) -{ - if(!src.empty()) - html_+= wxString::Format(tags::IMAGE, src); -} - -void mmHTMLBuilder::startTable(const wxString& width - , const wxString& valign, const wxString& border) -{ - html_+= wxString::Format(tags::TABLE_START - , color_.bgcolor - , width, valign, border); - color_.bgswitch = true; -} - -void mmHTMLBuilder::addRowSeparator(int cols) -{ - color_.bgswitch = true; - - if (cols > 0) - { - startTableRow(); - html_+= wxString::Format(tags::TABLE_CELL_SPAN, cols); - startTable("100%", "top", "1"); - endTable(); - endTableCell(); - endTableRow(); - color_.bgswitch = true; - } -} - -void mmHTMLBuilder::addTotalRow(const wxString& caption - , int cols, const wxString& value) -{ - this->startTableRow(color_.bgcolor); - html_+= wxString::Format(tags::TABLE_CELL_SPAN, cols - 1); - this->font_settings(font_size_); - this->bold_italic(tags::NBSP + tags::NBSP + caption); - this->font_end(); - this->endTableCell(); - this->addTableCellRightBI(value); - this->endTableRow(); -} - -void mmHTMLBuilder::addTotalRow(const wxString& caption, int cols, double value) -{ - this->addTotalRow(caption, cols, CurrencyFormatter::float2Money(value)); -} - -void mmHTMLBuilder::addTotalRow(const wxString& caption, int cols - , const std::vector<wxString>& data) -{ - html_+= wxString::Format(tags::TABLE_ROW, color_.bgcolor); - html_+= wxString::Format(tags::TABLE_CELL_SPAN, cols - (int)data.size()); - this->font_settings(font_size_); - this->bold_italic(tags::NBSP + tags::NBSP + caption); - this->font_end(); - - for (unsigned long idx = 0; idx < data.size(); idx++) - { - this->endTableCell(); - html_+= wxString::Format(tags::TABLE_CELL_RIGHT); - this->font_settings(font_size_); - this->bold_italic(data[idx]); - this->font_end(); - } - this->endTableCell(); - this->endTableRow(); -} - -void mmHTMLBuilder::addTotalRow(const wxString& caption, int cols, const std::vector<double>& data) -{ - std::vector<wxString> data_str; - for (const auto& value: data) - { - data_str.push_back(CurrencyFormatter::float2Money(value)); - } - this->addTotalRow(caption, cols, data_str); -} - -void mmHTMLBuilder::addTableHeaderRow(const wxString& value, int cols) -{ - html_+= wxString::Format(tags::TABLE_ROW, color_.bgcolor); - html_+= wxString::Format(tags::TABLE_HEADER, "left", color_.table_header, cols); - this->font_settings(font_size_); - this->bold(tags::NBSP + value); - this->font_end(); - html_+= tags::TABLE_HEADER_END; - this->endTableRow(); - color_.bgswitch = true; -} - -void mmHTMLBuilder::addTableHeaderCell(const wxString& value, const bool& numeric) -{ - wxString align = numeric ? "right" : "left"; - html_+= wxString::Format(tags::TABLE_HEADER, align, color_.table_header, 0); - this->font_settings(font_size_); - this->bold(value); - this->font_end(); - html_+= tags::TABLE_HEADER_END; - color_.bgswitch = false; -} - -void mmHTMLBuilder::addMoneyCell(double amount, bool color) -{ - wxString balance = CurrencyFormatter::float2Money(amount); - this->addTableCell(balance, true, true, true, (amount < 0 && color) ? "RED": ""); -} - -void mmHTMLBuilder::addMoneyCell(double amount, const wxString& color) -{ - wxString balance = CurrencyFormatter::float2Money(amount); - this->addTableCell(balance, true, true, true, color); -} - -void mmHTMLBuilder::addTableCell(const wxDateTime& date) -{ - wxString date_str = mmGetDateForDisplay(date); - this->addTableCell(date_str, false); -} - -void mmHTMLBuilder::addTableCell(const wxString& value - , const bool& numeric, const bool& italic, const bool& bold, const wxString& fontColor) -{ - html_<< wxString::Format(tags::TABLE_CELL , (numeric ? "0%\" align=\"right" : "0%")); - - this->font_settings(font_size_, fontColor); - - if (!bold && !italic) html_+= value; - else if (bold && italic) this->bold_italic(value); - else if (bold) this->bold(value); - else if (italic) this->italic(value); - - this->font_end(); - this->endTableCell(); -} - -void mmHTMLBuilder::addTableCellMonth(int month) -{ - if (month >= 0 && month < 12) - this->addTableCell(wxGetTranslation(wxDateTime::GetMonthName((wxDateTime::Month)month))); - else - this->addTableCell(""); -} - -void mmHTMLBuilder::addTableCellLink(const wxString& href - , const wxString& value, const bool& numeric - , const bool& italic, const bool& bold, const wxString& fontColor) -{ - addTableCell(wxString::Format(tags::TABLE_CELL_LINK, href, value ) - , numeric, italic, bold, fontColor); -} - -void mmHTMLBuilder::addTableHeaderCellLink(const wxString& href, const wxString& value) -{ - addTableHeaderCell(wxString::Format(tags::LINK, href, value ), false); -} - -void mmHTMLBuilder::addTableHeaderRowLink(const wxString& href - , const wxString& value, int cols) -{ - addTableHeaderRow(wxString::Format(tags::LINK, href, value ), cols); -} - -void mmHTMLBuilder::DisplayDateHeading(const wxDateTime& startYear, const wxDateTime& endYear, bool withDateRange) -{ - - wxString todaysDate = ""; - if (withDateRange) - { - todaysDate << today_.todays_date << tags::BR << tags::BR - << wxString::Format(_("From %s till %s") - , mmGetNiceDateSimpleString(startYear).Prepend("<b>").Append("</b> ") - , mmGetNiceDateSimpleString(endYear).Prepend("<b>").Append("</b> ")); - } - else - { - todaysDate << _("Over Time"); - } - this->addHeaderItalic(1, todaysDate); - this->addLineBreak(); - this->addLineBreak(); -} - -wxString mmHTMLBuilder::getHTMLinTableWraper(bool indent) -{ - wxString html = this->getHTMLText(); - html_.clear(); - if (indent) - { - startTable("100%", "", "0"); - startTableRow(); - addTableCell(""); - endTableRow(); - endTable(); - } - startTable("100%", "", "1"); - startTableRow(); - startTableCell(); - addText(html); - endTableCell(); - endTableRow(); - endTable(); - - return this->getHTMLText(); -} - -void mmHTMLBuilder::addTableRow(const wxString& label, double data) -{ - this->startTableRow(); - this->addTableCell(label, false, true); - this->addMoneyCell(data); - this->endTableRow(); -} -void mmHTMLBuilder::addTableRowBold(const wxString& label, double data) -{ - this->startTableRow(); - this->addTableCell(label, false, true, true); - this->addMoneyCell(data); - this->endTableRow(); -} Deleted: trunk/src/htmlbuilder.h =================================================================== --- trunk/src/htmlbuilder.h 2013-07-02 02:18:54 UTC (rev 4228) +++ trunk/src/htmlbuilder.h 2013-07-02 03:06:18 UTC (rev 4229) @@ -1,261 +0,0 @@ -/******************************************************* - Copyright (C) 2006 Madhan Kanagavel - - 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, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - ********************************************************/ - -#ifndef _MM_EX_HTMLBUILD... [truncated message content] |
From: <gua...@us...> - 2013-07-03 10:18:07
|
Revision: 4247 http://sourceforge.net/p/moneymanagerex/code/4247 Author: guanlisheng Date: 2013-07-03 10:18:02 +0000 (Wed, 03 Jul 2013) Log Message: ----------- more source files Modified Paths: -------------- trunk/build/msw/makefile.gcc trunk/build/msw/makefile.vc trunk/build/msw/tests/makefile.gcc trunk/build/msw/tests/makefile.vc trunk/src/tests/Makefile.in Modified: trunk/build/msw/makefile.gcc =================================================================== --- trunk/build/msw/makefile.gcc 2013-07-03 10:02:09 UTC (rev 4246) +++ trunk/build/msw/makefile.gcc 2013-07-03 10:18:02 UTC (rev 4247) @@ -151,6 +151,7 @@ mmex_categexp.o \ mmex_categovertimeperf.o \ mmex_chart.o \ + mmex_html_widget_top_categories.o \ mmex_htmlbuilder.o \ mmex_incexpenses.o \ mmex_mmDateRange.o \ @@ -675,6 +676,9 @@ mmex_chart.o: ../../src/reports/chart.cpp $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< +mmex_html_widget_top_categories.o: ../../src/reports/html_widget_top_categories.cpp + $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< + mmex_htmlbuilder.o: ../../src/reports/htmlbuilder.cpp $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< Modified: trunk/build/msw/makefile.vc =================================================================== --- trunk/build/msw/makefile.vc 2013-07-03 10:02:09 UTC (rev 4246) +++ trunk/build/msw/makefile.vc 2013-07-03 10:18:02 UTC (rev 4247) @@ -152,6 +152,7 @@ mmex_categexp.obj \ mmex_categovertimeperf.obj \ mmex_chart.obj \ + mmex_html_widget_top_categories.obj \ mmex_htmlbuilder.obj \ mmex_incexpenses.obj \ mmex_mmDateRange.obj \ @@ -808,6 +809,9 @@ mmex_chart.obj: ..\..\src\reports\chart.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\reports\chart.cpp +mmex_html_widget_top_categories.obj: ..\..\src\reports\html_widget_top_categories.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\reports\html_widget_top_categories.cpp + mmex_htmlbuilder.obj: ..\..\src\reports\htmlbuilder.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\reports\htmlbuilder.cpp Modified: trunk/build/msw/tests/makefile.gcc =================================================================== --- trunk/build/msw/tests/makefile.gcc 2013-07-03 10:02:09 UTC (rev 4246) +++ trunk/build/msw/tests/makefile.gcc 2013-07-03 10:18:02 UTC (rev 4247) @@ -150,6 +150,7 @@ mmex_tests_categexp.o \ mmex_tests_categovertimeperf.o \ mmex_tests_chart.o \ + mmex_tests_html_widget_top_categories.o \ mmex_tests_htmlbuilder.o \ mmex_tests_incexpenses.o \ mmex_tests_mmDateRange.o \ @@ -688,6 +689,9 @@ mmex_tests_chart.o: ../../../src/reports/chart.cpp $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< +mmex_tests_html_widget_top_categories.o: ../../../src/reports/html_widget_top_categories.cpp + $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< + mmex_tests_htmlbuilder.o: ../../../src/reports/htmlbuilder.cpp $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< Modified: trunk/build/msw/tests/makefile.vc =================================================================== --- trunk/build/msw/tests/makefile.vc 2013-07-03 10:02:09 UTC (rev 4246) +++ trunk/build/msw/tests/makefile.vc 2013-07-03 10:18:02 UTC (rev 4247) @@ -152,6 +152,7 @@ mmex_tests_categexp.obj \ mmex_tests_categovertimeperf.obj \ mmex_tests_chart.obj \ + mmex_tests_html_widget_top_categories.obj \ mmex_tests_htmlbuilder.obj \ mmex_tests_incexpenses.obj \ mmex_tests_mmDateRange.obj \ @@ -779,6 +780,9 @@ mmex_tests_chart.obj: ..\..\..\src\reports\chart.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\reports\chart.cpp +mmex_tests_html_widget_top_categories.obj: ..\..\..\src\reports\html_widget_top_categories.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\reports\html_widget_top_categories.cpp + mmex_tests_htmlbuilder.obj: ..\..\..\src\reports\htmlbuilder.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\reports\htmlbuilder.cpp Modified: trunk/src/tests/Makefile.in =================================================================== --- trunk/src/tests/Makefile.in 2013-07-03 10:02:09 UTC (rev 4246) +++ trunk/src/tests/Makefile.in 2013-07-03 10:18:02 UTC (rev 4247) @@ -165,6 +165,7 @@ mmex_tests_categexp.o \ mmex_tests_categovertimeperf.o \ mmex_tests_chart.o \ + mmex_tests_html_widget_top_categories.o \ mmex_tests_htmlbuilder.o \ mmex_tests_incexpenses.o \ mmex_tests_mmDateRange.o \ @@ -603,6 +604,9 @@ mmex_tests_chart.o: $(srcdir)/../../src/reports/chart.cpp $(CXXC) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(srcdir)/../../src/reports/chart.cpp +mmex_tests_html_widget_top_categories.o: $(srcdir)/../../src/reports/html_widget_top_categories.cpp + $(CXXC) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(srcdir)/../../src/reports/html_widget_top_categories.cpp + mmex_tests_htmlbuilder.o: $(srcdir)/../../src/reports/htmlbuilder.cpp $(CXXC) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(srcdir)/../../src/reports/htmlbuilder.cpp This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2013-07-03 10:31:15
|
Revision: 4248 http://sourceforge.net/p/moneymanagerex/code/4248 Author: guanlisheng Date: 2013-07-03 10:31:11 +0000 (Wed, 03 Jul 2013) Log Message: ----------- remove db/settings.cpp & db/settings.h since it is just the copy of existing files Modified Paths: -------------- trunk/build/msw/makefile.gcc trunk/build/msw/makefile.vc trunk/build/msw/tests/makefile.gcc trunk/build/msw/tests/makefile.vc trunk/src/tests/Makefile.in Removed Paths: ------------- trunk/src/db/settings.cpp trunk/src/db/settings.h Modified: trunk/build/msw/makefile.gcc =================================================================== --- trunk/build/msw/makefile.gcc 2013-07-03 10:18:02 UTC (rev 4247) +++ trunk/build/msw/makefile.gcc 2013-07-03 10:31:11 UTC (rev 4248) @@ -175,7 +175,6 @@ mmex_currency.o \ mmex_entry_base.o \ mmex_payee_table.o \ - mmex_settings.o \ mmex_splittransaction.o \ mmex_stocks.o \ mmex_subcategory.o \ @@ -748,9 +747,6 @@ mmex_payee_table.o: ../../src/db/payee_table.cpp $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< -mmex_settings.o: ../../src/db/settings.cpp - $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< - mmex_splittransaction.o: ../../src/db/splittransaction.cpp $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< Modified: trunk/build/msw/makefile.vc =================================================================== --- trunk/build/msw/makefile.vc 2013-07-03 10:18:02 UTC (rev 4247) +++ trunk/build/msw/makefile.vc 2013-07-03 10:31:11 UTC (rev 4248) @@ -176,7 +176,6 @@ mmex_currency.obj \ mmex_entry_base.obj \ mmex_payee_table.obj \ - mmex_settings.obj \ mmex_splittransaction.obj \ mmex_stocks.obj \ mmex_subcategory.obj \ @@ -881,9 +880,6 @@ mmex_payee_table.obj: ..\..\src\db\payee_table.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\db\payee_table.cpp -mmex_settings.obj: ..\..\src\db\settings.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\db\settings.cpp - mmex_splittransaction.obj: ..\..\src\db\splittransaction.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\db\splittransaction.cpp Modified: trunk/build/msw/tests/makefile.gcc =================================================================== --- trunk/build/msw/tests/makefile.gcc 2013-07-03 10:18:02 UTC (rev 4247) +++ trunk/build/msw/tests/makefile.gcc 2013-07-03 10:31:11 UTC (rev 4248) @@ -174,7 +174,6 @@ mmex_tests_currency.o \ mmex_tests_entry_base.o \ mmex_tests_payee_table.o \ - mmex_tests_settings.o \ mmex_tests_splittransaction.o \ mmex_tests_stocks.o \ mmex_tests_subcategory.o \ @@ -761,9 +760,6 @@ mmex_tests_payee_table.o: ../../../src/db/payee_table.cpp $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< -mmex_tests_settings.o: ../../../src/db/settings.cpp - $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< - mmex_tests_splittransaction.o: ../../../src/db/splittransaction.cpp $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< Modified: trunk/build/msw/tests/makefile.vc =================================================================== --- trunk/build/msw/tests/makefile.vc 2013-07-03 10:18:02 UTC (rev 4247) +++ trunk/build/msw/tests/makefile.vc 2013-07-03 10:31:11 UTC (rev 4248) @@ -176,7 +176,6 @@ mmex_tests_currency.obj \ mmex_tests_entry_base.obj \ mmex_tests_payee_table.obj \ - mmex_tests_settings.obj \ mmex_tests_splittransaction.obj \ mmex_tests_stocks.obj \ mmex_tests_subcategory.obj \ @@ -852,9 +851,6 @@ mmex_tests_payee_table.obj: ..\..\..\src\db\payee_table.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\db\payee_table.cpp -mmex_tests_settings.obj: ..\..\..\src\db\settings.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\db\settings.cpp - mmex_tests_splittransaction.obj: ..\..\..\src\db\splittransaction.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\db\splittransaction.cpp Deleted: trunk/src/db/settings.cpp =================================================================== --- trunk/src/db/settings.cpp 2013-07-03 10:18:02 UTC (rev 4247) +++ trunk/src/db/settings.cpp 2013-07-03 10:31:11 UTC (rev 4248) @@ -1,264 +0,0 @@ -/**************************************************************************** - Copyright (C) 2012 Stefano Giorgio - - 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, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - ****************************************************************************/ - -#include "settings.h" - -const wxString INI_TABLE_NAME = "SETTING_V1"; -const char CREATE_INI_TABLE[] = - "create table SETTING_V1 (" - "SETTINGID integer not null primary key, " - "SETTINGNAME TEXT NOT NULL UNIQUE, " - "SETTINGVALUE TEXT)"; - -const char UPDATE_INI_RECORD[] = "update SETTING_V1 set SETTINGVALUE = ? where SETTINGNAME = ?"; -const char INSERT_INI_RECORD[] = "insert into SETTING_V1 (SETTINGNAME, SETTINGVALUE) values (?, ?)"; -const char SELECT_INI_RECORD[] = "select * from SETTING_V1"; - -//--------------------------------------------------------------------------- -const wxString INFO_TABLE_NAME = "INFOTABLE_V1"; -const char CREATE_INFO_TABLE[] = - "create table INFOTABLE_V1 (" - "INFOID integer not null primary key, " - "INFONAME TEXT NOT NULL UNIQUE, " - "INFOVALUE TEXT)"; - -const char UPDATE_INFO_RECORD[] = "update INFOTABLE_V1 set INFOVALUE = ? where INFONAME = ?"; -const char INSERT_INFO_RECORD[] = "insert into INFOTABLE_V1 (INFONAME, INFOVALUE) values (?, ?)"; -const char SELECT_INFO_RECORD[] = "select * from INFOTABLE_V1"; - -/**************************************************************************** - TSettingsEntry Class methods - ****************************************************************************/ -TSettingsEntry::TSettingsEntry(bool main_db, wxString name) -: TEntryBase() -, main_db_(main_db) -, name_(name) -{} - -TSettingsEntry::TSettingsEntry(bool main_db, wxSQLite3ResultSet& q1) -: TEntryBase() -, main_db_(main_db) -{ - if (main_db) - { - id_ = q1.GetInt("INFOID"); - name_ = q1.GetString("INFONAME"); - value_ = q1.GetString("INFOVALUE"); - } - else - { - id_ = q1.GetInt("SETTINGID"); - name_ = q1.GetString("SETTINGNAME"); - value_ = q1.GetString("SETTINGVALUE"); - } -} - -wxString TSettingsEntry::Name() -{ - return name_; -} - -wxString TSettingsEntry::Value() -{ - return value_; -} - -void TSettingsEntry::SetValue(const wxString& value) -{ - value_ = value; -} - -void TSettingsEntry::Save(wxSQLite3Database* db) -{ - try - { - wxSQLite3Statement st; - if (main_db_) st = db->PrepareStatement(UPDATE_INFO_RECORD); - else st = db->PrepareStatement(UPDATE_INI_RECORD); - st.Bind(1, value_); - st.Bind(2, name_); - - int rows_affected = st.ExecuteUpdate(); - st.Finalize(); - - if (!rows_affected) - { - if (main_db_) st = db->PrepareStatement(INSERT_INFO_RECORD); - else st = db->PrepareStatement(INSERT_INI_RECORD); - st.Bind(1, name_); - st.Bind(2, value_); - - rows_affected = st.ExecuteUpdate(); - st.Finalize(); - } - wxASSERT(rows_affected == 1); - } - catch (const wxSQLite3Exception& e) - { - wxLogError("TSettingsEntry:Save: %s", e.GetMessage().c_str()); - } -} -/****************************************************************************/ - -/**************************************************************************** - TSettingsList Class methods - ****************************************************************************/ -TSettingsList::TSettingsList(wxSQLite3Database* db, bool main_db) -: TListBase(db) -, main_db_(main_db) -{ - try - { - wxString table_name = INI_TABLE_NAME; - if (main_db_) - { - table_name = INFO_TABLE_NAME; - } - if (!db->TableExists(table_name)) - { - if (main_db_) db->ExecuteUpdate(CREATE_INFO_TABLE); - else db->ExecuteUpdate(CREATE_INI_TABLE); - } - Load(); - } - catch (const wxSQLite3Exception& e) - { - wxLogError("TSettingsList Constructor: %s", e.GetMessage().c_str()); - } -} - -TSettingsList::~TSettingsList() -{ - Save(); -} - -void TSettingsList::Load() -{ - wxSQLite3ResultSet q1; - if (main_db_) q1 = ListDatabase()->ExecuteQuery(SELECT_INFO_RECORD); - else q1 = ListDatabase()->ExecuteQuery(SELECT_INI_RECORD); - while (q1.NextRow()) - { - std::shared_ptr<TSettingsEntry> pRecord(new TSettingsEntry(main_db_, q1)); - ini_records_.push_back(pRecord); - } - q1.Finalize(); -} - -void TSettingsList::Save() -{ - size_t list_size = ini_records_.size(); - size_t element = 0; - - ListDatabase()->Begin(); - while (element < list_size) - { - ini_records_[element]->Save(ListDatabase()); - ++ element; - } - ListDatabase()->Commit(); -} - -TSettingsEntry* TSettingsList::GetRecord(const wxString& name) -{ - TSettingsEntry* pRecord = 0; - size_t list_size = ini_records_.size(); - size_t element = 0; - - while (element < list_size) - { - if (ini_records_[element]->Name() == name) - { - pRecord = ini_records_[element].get(); - break; - } - ++ element; - } - return pRecord; -} - -bool TSettingsList::GetBoolSetting(const wxString& name, bool default_value) -{ - TSettingsEntry* pRecord = GetRecord(name); - if (pRecord) - { - if (pRecord->Value() == "TRUE") return true; - else return false; - } - return default_value; -} - -int TSettingsList::GetIntSetting(const wxString& name, int default_value) -{ - TSettingsEntry* pRecord = GetRecord(name); - if (pRecord) return wxAtoi(pRecord->Value()); - return default_value; -} - -wxString TSettingsList::GetStringSetting(const wxString& name, const wxString& default_value) -{ - TSettingsEntry* pRecord = GetRecord(name); - if (pRecord) return pRecord->Value(); - return default_value; -} - -void TSettingsList::SetBoolSetting(const wxString& name, bool value) -{ - TSettingsEntry* pExistingRecord = GetRecord(name); - if (!pExistingRecord) - { - std::shared_ptr<TSettingsEntry> pNewRecord(new TSettingsEntry(main_db_, name)); - ini_records_.push_back(pNewRecord); - pExistingRecord = pNewRecord.get(); - } - if (value) pExistingRecord->SetValue("TRUE"); - else pExistingRecord->SetValue("FALSE"); -} - -void TSettingsList::SetIntSetting(const wxString& name, int value) -{ - TSettingsEntry* pExistingRecord = GetRecord(name); - if (!pExistingRecord) - { - std::shared_ptr<TSettingsEntry> pNewRecord(new TSettingsEntry(main_db_, name)); - ini_records_.push_back(pNewRecord); - pExistingRecord = pNewRecord.get(); - } - pExistingRecord->SetValue(wxString() << value); -} - -void TSettingsList::SetStringSetting(const wxString& name, const wxString& value) -{ - TSettingsEntry* pExistingRecord = GetRecord(name); - if (!pExistingRecord) - { - std::shared_ptr<TSettingsEntry> pNewRecord(new TSettingsEntry(main_db_, name)); - ini_records_.push_back(pNewRecord); - pExistingRecord = pNewRecord.get(); - } - pExistingRecord->SetValue(value); -} - -bool TSettingsList::Exists(const wxString& name) -{ - TSettingsEntry* pRecord = GetRecord(name); - if(pRecord) return true; - return false; -} - -/****************************************************************************/ Deleted: trunk/src/db/settings.h =================================================================== --- trunk/src/db/settings.h 2013-07-03 10:18:02 UTC (rev 4247) +++ trunk/src/db/settings.h 2013-07-03 10:31:11 UTC (rev 4248) @@ -1,77 +0,0 @@ -/**************************************************************************** - Copyright (C) 2012 Stefano Giorgio - - 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, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - ****************************************************************************/ - -#pragma once -#include "entry_base.h" - -/**************************************************************************** - TSettingsEntry Class - - This class holds a single record for the Initalization database - ****************************************************************************/ -class TSettingsEntry : public TEntryBase -{ -public: - /// Create a new record setting. - TSettingsEntry(bool main_db, wxString name); - - /// Create an existing record setting. - TSettingsEntry(bool main_db, wxSQLite3ResultSet& q1); - - /// Set the value of the record - void SetValue(const wxString& value); - void Save(wxSQLite3Database* db); - wxString Name(); - wxString Value(); - -private: - bool main_db_; - wxString name_; - wxString value_; -}; - -/**************************************************************************** - TSettingsList Class - - This class holds all the records for the Initalization database - ****************************************************************************/ -class TSettingsList : public TListBase -{ -public: - /// Constructor - TSettingsList(wxSQLite3Database* db, bool main_db = false); - ~TSettingsList(); - - bool GetBoolSetting(const wxString& name, bool default_value); - int GetIntSetting(const wxString& name, int default_value); - wxString GetStringSetting(const wxString& name, const wxString& default_value); - - /// Save to existing value - void SetBoolSetting(const wxString& name, bool value); - void SetIntSetting(const wxString& name, int value); - void SetStringSetting(const wxString& name, const wxString& value); - - bool Exists(const wxString& name); - void Load(); - void Save(); -private: - bool main_db_; - std::vector< std::shared_ptr<TSettingsEntry> > ini_records_; - - TSettingsEntry* GetRecord(const wxString& name); -}; Modified: trunk/src/tests/Makefile.in =================================================================== --- trunk/src/tests/Makefile.in 2013-07-03 10:18:02 UTC (rev 4247) +++ trunk/src/tests/Makefile.in 2013-07-03 10:31:11 UTC (rev 4248) @@ -189,7 +189,6 @@ mmex_tests_currency.o \ mmex_tests_entry_base.o \ mmex_tests_payee_table.o \ - mmex_tests_settings.o \ mmex_tests_splittransaction.o \ mmex_tests_stocks.o \ mmex_tests_subcategory.o \ @@ -676,9 +675,6 @@ mmex_tests_payee_table.o: $(srcdir)/../../src/db/payee_table.cpp $(CXXC) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(srcdir)/../../src/db/payee_table.cpp -mmex_tests_settings.o: $(srcdir)/../../src/db/settings.cpp - $(CXXC) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(srcdir)/../../src/db/settings.cpp - mmex_tests_splittransaction.o: $(srcdir)/../../src/db/splittransaction.cpp $(CXXC) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(srcdir)/../../src/db/splittransaction.cpp This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2013-07-03 20:29:49
|
Revision: 4254 http://sourceforge.net/p/moneymanagerex/code/4254 Author: vomikan Date: 2013-07-03 20:29:47 +0000 (Wed, 03 Jul 2013) Log Message: ----------- make files update Modified Paths: -------------- trunk/build/msw/makefile.gcc trunk/build/msw/makefile.vc trunk/build/msw/tests/makefile.gcc trunk/build/msw/tests/makefile.vc trunk/src/tests/Makefile.in Modified: trunk/build/msw/makefile.gcc =================================================================== --- trunk/build/msw/makefile.gcc 2013-07-03 15:34:30 UTC (rev 4253) +++ trunk/build/msw/makefile.gcc 2013-07-03 20:29:47 UTC (rev 4254) @@ -95,7 +95,7 @@ -I$(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX) -I$(WX_DIR)\include -mthreads -W \ -Wall $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__DEBUG_DEFINE_p) \ -I..\..\lib\sqlite -I..\..\lib\wxsqlite -I..\..\lib\lua\src -I..\..\lib \ - -DNOPCH $(CPPFLAGS) $(CXXFLAGS) + -I..\..\src -DNOPCH $(CPPFLAGS) $(CXXFLAGS) MMEX_OBJECTS = \ mmex_aboutdialog.o \ mmex_appstartdialog.o \ @@ -775,7 +775,7 @@ $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< mmex_resources_mmex_rc.o: ../../resources/mmex.rc - windres --use-temp-file -i$< -o$@ --define HAVE_W32API_H $(____WX_SHARED_26_p_1) $(__WXUNICODE_DEFINE_p_2) $(__WXDEBUG_DEFINE_p_2) --define __WXMSW__ --include-dir $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX) --include-dir $(WX_DIR)/include $(__DEBUG_DEFINE_p_4) --include-dir ../../lib/sqlite --include-dir ../../lib/wxsqlite --include-dir ../../lib/lua/src --include-dir ../../lib --define NOPCH + windres --use-temp-file -i$< -o$@ --define HAVE_W32API_H $(____WX_SHARED_26_p_1) $(__WXUNICODE_DEFINE_p_2) $(__WXDEBUG_DEFINE_p_2) --define __WXMSW__ --include-dir $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX) --include-dir $(WX_DIR)/include $(__DEBUG_DEFINE_p_4) --include-dir ../../lib/sqlite --include-dir ../../lib/wxsqlite --include-dir ../../lib/lua/src --include-dir ../../lib --include-dir ../../src --define NOPCH .PHONY: all install uninstall clean install_mmex uninstall_mmex po setup check Modified: trunk/build/msw/makefile.vc =================================================================== --- trunk/build/msw/makefile.vc 2013-07-03 15:34:30 UTC (rev 4253) +++ trunk/build/msw/makefile.vc 2013-07-03 20:29:47 UTC (rev 4254) @@ -95,8 +95,8 @@ /I$(WX_DIR)$(__WXLIBPATH_FILENAMES_1)\msw$(WXLIBPOSTFIX) \ /I$(WX_DIR)\include /W4 $(__DEBUGINFO) $(____DEBUGINFO) /Fdmmex.pdb \ $(__OPTIMIZEFLAG) $(__DEBUG_DEFINE_p) /I..\..\lib\sqlite \ - /I..\..\lib\wxsqlite /I..\..\lib\lua\src /I..\..\lib /DNOPCH /D_WINDOWS /EHsc \ - /GR $(__mmex_CL_FLAGS) $(CPPFLAGS) $(CXXFLAGS) + /I..\..\lib\wxsqlite /I..\..\lib\lua\src /I..\..\lib /I..\..\src /DNOPCH \ + /D_WINDOWS /EHsc /GR $(__mmex_CL_FLAGS) $(CPPFLAGS) $(CXXFLAGS) MMEX_OBJECTS = \ mmex_aboutdialog.obj \ mmex_appstartdialog.obj \ @@ -908,5 +908,5 @@ $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\import_export\univcsvdialog.cpp mmex_resources_mmex.res: ..\..\resources\mmex.rc - rc /fo$@ /d WIN32 $(____WX_SHARED_46_p_1) $(__WXUNICODE_DEFINE_p_2) $(__WXDEBUG_DEFINE_p_2) /d __WXMSW__ /i $(WX_DIR)$(__WXLIBPATH_FILENAMES_2)\msw$(WXLIBPOSTFIX) /i $(WX_DIR)\include $(____DEBUGINFO_55_p_1) $(__DEBUG_DEFINE_p_4) /i ..\..\lib\sqlite /i ..\..\lib\wxsqlite /i ..\..\lib\lua\src /i ..\..\lib /d NOPCH /d _WINDOWS ..\..\resources\mmex.rc + rc /fo$@ /d WIN32 $(____WX_SHARED_46_p_1) $(__WXUNICODE_DEFINE_p_2) $(__WXDEBUG_DEFINE_p_2) /d __WXMSW__ /i $(WX_DIR)$(__WXLIBPATH_FILENAMES_2)\msw$(WXLIBPOSTFIX) /i $(WX_DIR)\include $(____DEBUGINFO_55_p_1) $(__DEBUG_DEFINE_p_4) /i ..\..\lib\sqlite /i ..\..\lib\wxsqlite /i ..\..\lib\lua\src /i ..\..\lib /i ..\..\src /d NOPCH /d _WINDOWS ..\..\resources\mmex.rc Modified: trunk/build/msw/tests/makefile.gcc =================================================================== --- trunk/build/msw/tests/makefile.gcc 2013-07-03 15:34:30 UTC (rev 4253) +++ trunk/build/msw/tests/makefile.gcc 2013-07-03 20:29:47 UTC (rev 4254) @@ -93,8 +93,8 @@ -I$(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX) -I$(WX_DIR)\include -mthreads -W \ -Wall $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__DEBUG_DEFINE_p) \ -I..\..\..\lib\sqlite -I..\..\..\lib\wxsqlite -I..\..\..\lib\lua\src \ - -I..\..\..\lib -DNOPCH -I..\..\..\src -I..\..\..\lib\UnitTest++ $(CPPFLAGS) \ - $(CXXFLAGS) + -I..\..\..\lib -I..\..\..\src -DNOPCH -I..\..\..\src \ + -I..\..\..\lib\UnitTest++ $(CPPFLAGS) $(CXXFLAGS) MMEX_TESTS_OBJECTS = \ mmex_tests_aboutdialog.o \ mmex_tests_appstartdialog.o \ @@ -806,7 +806,7 @@ $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< mmex_tests_mmex_tests_rc.o: ../../../src/tests/mmex_tests.rc - windres --use-temp-file -i$< -o$@ --define HAVE_W32API_H $(____WX_SHARED_35_p_1) $(__WXUNICODE_DEFINE_p_2) $(__WXDEBUG_DEFINE_p_2) --define __WXMSW__ --include-dir $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX) --include-dir $(WX_DIR)/include $(__DEBUG_DEFINE_p_5) --include-dir ../../../lib/sqlite --include-dir ../../../lib/wxsqlite --include-dir ../../../lib/lua/src --include-dir ../../../lib --define NOPCH --include-dir ../../../src --include-dir ../../../lib/UnitTest++ + windres --use-temp-file -i$< -o$@ --define HAVE_W32API_H $(____WX_SHARED_35_p_1) $(__WXUNICODE_DEFINE_p_2) $(__WXDEBUG_DEFINE_p_2) --define __WXMSW__ --include-dir $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX) --include-dir $(WX_DIR)/include $(__DEBUG_DEFINE_p_5) --include-dir ../../../lib/sqlite --include-dir ../../../lib/wxsqlite --include-dir ../../../lib/lua/src --include-dir ../../../lib --include-dir ../../../src --define NOPCH --include-dir ../../../src --include-dir ../../../lib/UnitTest++ .PHONY: all install uninstall clean check Modified: trunk/build/msw/tests/makefile.vc =================================================================== --- trunk/build/msw/tests/makefile.vc 2013-07-03 15:34:30 UTC (rev 4253) +++ trunk/build/msw/tests/makefile.vc 2013-07-03 20:29:47 UTC (rev 4254) @@ -94,9 +94,9 @@ /I$(WX_DIR)$(__WXLIBPATH_FILENAMES_1)\msw$(WXLIBPOSTFIX) \ /I$(WX_DIR)\include /W4 $(__DEBUGINFO) $(____DEBUGINFO) /Fdmmex_tests.pdb \ $(__OPTIMIZEFLAG) $(__DEBUG_DEFINE_p) /I..\..\..\lib\sqlite \ - /I..\..\..\lib\wxsqlite /I..\..\..\lib\lua\src /I..\..\..\lib /DNOPCH \ - /D_CONSOLE /I..\..\..\src /I..\..\..\lib\UnitTest++ /EHsc /GR \ - $(__mmex_tests_CL_FLAGS) $(CPPFLAGS) $(CXXFLAGS) + /I..\..\..\lib\wxsqlite /I..\..\..\lib\lua\src /I..\..\..\lib \ + /I..\..\..\src /DNOPCH /D_CONSOLE /I..\..\..\src /I..\..\..\lib\UnitTest++ \ + /EHsc /GR $(__mmex_tests_CL_FLAGS) $(CPPFLAGS) $(CXXFLAGS) MMEX_TESTS_OBJECTS = \ mmex_tests_aboutdialog.obj \ mmex_tests_appstartdialog.obj \ @@ -897,5 +897,5 @@ $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\tests\util_test.cpp mmex_tests_mmex_tests.res: ..\..\..\src\tests\mmex_tests.rc - rc /fo$@ /d WIN32 $(____WX_SHARED_61_p_1) $(__WXUNICODE_DEFINE_p_2) $(__WXDEBUG_DEFINE_p_2) /d __WXMSW__ /i $(WX_DIR)$(__WXLIBPATH_FILENAMES_2)\msw$(WXLIBPOSTFIX) /i $(WX_DIR)\include $(____DEBUGINFO_70_p_1) $(__DEBUG_DEFINE_p_5) /i ..\..\..\lib\sqlite /i ..\..\..\lib\wxsqlite /i ..\..\..\lib\lua\src /i ..\..\..\lib /d NOPCH /d _CONSOLE /i ..\..\..\src /i ..\..\..\lib\UnitTest++ ..\..\..\src\tests\mmex_tests.rc + rc /fo$@ /d WIN32 $(____WX_SHARED_61_p_1) $(__WXUNICODE_DEFINE_p_2) $(__WXDEBUG_DEFINE_p_2) /d __WXMSW__ /i $(WX_DIR)$(__WXLIBPATH_FILENAMES_2)\msw$(WXLIBPOSTFIX) /i $(WX_DIR)\include $(____DEBUGINFO_70_p_1) $(__DEBUG_DEFINE_p_5) /i ..\..\..\lib\sqlite /i ..\..\..\lib\wxsqlite /i ..\..\..\lib\lua\src /i ..\..\..\lib /i ..\..\..\src /d NOPCH /d _CONSOLE /i ..\..\..\src /i ..\..\..\lib\UnitTest++ ..\..\..\src\tests\mmex_tests.rc Modified: trunk/src/tests/Makefile.in =================================================================== --- trunk/src/tests/Makefile.in 2013-07-03 15:34:30 UTC (rev 4253) +++ trunk/src/tests/Makefile.in 2013-07-03 20:29:47 UTC (rev 4254) @@ -107,7 +107,7 @@ UnitTestPP_TimeHelpers.o MMEX_TESTS_CXXFLAGS = -I$(srcdir)/../../lib/sqlite \ -I$(srcdir)/../../lib/wxsqlite -I$(srcdir)/../../lib/lua/src \ - -I$(srcdir)/../../lib -DNOPCH -I$(srcdir)/../../src \ + -I$(srcdir)/../../lib -I$(srcdir)/../../src -DNOPCH -I$(srcdir)/../../src \ -I$(srcdir)/../../lib/UnitTest++ $(WX_CXXFLAGS) $(PIC_FLAG) $(CPPFLAGS) \ $(CXXFLAGS) MMEX_TESTS_OBJECTS = \ @@ -721,7 +721,7 @@ $(CXXC) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(srcdir)/../../src/tests/util_test.cpp mmex_tests_mmex_tests_rc.o: $(srcdir)/../../src/tests/mmex_tests.rc - $(WX_RESCOMP) -i$< -o$@ --include-dir $(srcdir)/../../lib/sqlite --include-dir $(srcdir)/../../lib/wxsqlite --include-dir $(srcdir)/../../lib/lua/src --include-dir $(srcdir)/../../lib --define NOPCH --include-dir $(srcdir)/../../src --include-dir $(srcdir)/../../lib/UnitTest++ + $(WX_RESCOMP) -i$< -o$@ --include-dir $(srcdir)/../../lib/sqlite --include-dir $(srcdir)/../../lib/wxsqlite --include-dir $(srcdir)/../../lib/lua/src --include-dir $(srcdir)/../../lib --include-dir $(srcdir)/../../src --define NOPCH --include-dir $(srcdir)/../../src --include-dir $(srcdir)/../../lib/UnitTest++ # Include dependency info, if present: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2013-07-06 07:42:18
|
Revision: 4281 http://sourceforge.net/p/moneymanagerex/code/4281 Author: vomikan Date: 2013-07-06 07:42:12 +0000 (Sat, 06 Jul 2013) Log Message: ----------- Home Page Panel moved back Modified Paths: -------------- trunk/build/bakefiles/common.bkl trunk/build/msw/makefile.gcc trunk/build/msw/makefile.vc trunk/build/msw/tests/makefile.gcc trunk/build/msw/tests/makefile.vc trunk/src/mmex.cpp trunk/src/tests/Makefile.in Added Paths: ----------- trunk/src/mmhomepagepanel.cpp trunk/src/mmhomepagepanel.h Removed Paths: ------------- trunk/src/reports/mmhomepagepanel.cpp trunk/src/reports/mmhomepagepanel.h Modified: trunk/build/bakefiles/common.bkl =================================================================== --- trunk/build/bakefiles/common.bkl 2013-07-06 07:25:41 UTC (rev 4280) +++ trunk/build/bakefiles/common.bkl 2013-07-06 07:42:12 UTC (rev 4281) @@ -187,7 +187,7 @@ <if cond="1">/mac</if> </set> - <headers>$(fileList( [ 'src/*.h', 'src/reports/*.h', 'src/db/*.h', 'src/import_export/*.h' ] ))</headers> + <headers>$(fileList( [ 'src/*.h', 'src/reports/*.h', 'src/db/*.h', 'src/import_export/*.h', 'src/model/*.h' ] ))</headers> <sources>$(fileList( [ 'src/*.cpp', 'src/reports/*.cpp', 'src/db/*.cpp', 'src/' + PLATF_DIR + '/*.cpp', 'src/import_export/*.cpp' ] ))</sources> Modified: trunk/build/msw/makefile.gcc =================================================================== --- trunk/build/msw/makefile.gcc 2013-07-06 07:25:41 UTC (rev 4280) +++ trunk/build/msw/makefile.gcc 2013-07-06 07:42:12 UTC (rev 4281) @@ -128,6 +128,7 @@ mmex_mmex.o \ mmex_mmex_settings.o \ mmex_mmhelppanel.o \ + mmex_mmhomepagepanel.o \ mmex_mmpayee.o \ mmex_mmreportspanel.o \ mmex_mmtransaction.o \ @@ -160,7 +161,6 @@ mmex_mmgraphincexpensesmonth.o \ mmex_mmgraphpie.o \ mmex_mmgraphtopcategories.o \ - mmex_mmhomepagepanel.o \ mmex_payee.o \ mmex_summary.o \ mmex_summaryassets.o \ @@ -606,6 +606,9 @@ mmex_mmhelppanel.o: ../../src/mmhelppanel.cpp $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< +mmex_mmhomepagepanel.o: ../../src/mmhomepagepanel.cpp + $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< + mmex_mmpayee.o: ../../src/mmpayee.cpp $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< @@ -702,9 +705,6 @@ mmex_mmgraphtopcategories.o: ../../src/reports/mmgraphtopcategories.cpp $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< -mmex_mmhomepagepanel.o: ../../src/reports/mmhomepagepanel.cpp - $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< - mmex_payee.o: ../../src/reports/payee.cpp $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< Modified: trunk/build/msw/makefile.vc =================================================================== --- trunk/build/msw/makefile.vc 2013-07-06 07:25:41 UTC (rev 4280) +++ trunk/build/msw/makefile.vc 2013-07-06 07:42:12 UTC (rev 4281) @@ -129,6 +129,7 @@ mmex_mmex.obj \ mmex_mmex_settings.obj \ mmex_mmhelppanel.obj \ + mmex_mmhomepagepanel.obj \ mmex_mmpayee.obj \ mmex_mmreportspanel.obj \ mmex_mmtransaction.obj \ @@ -161,7 +162,6 @@ mmex_mmgraphincexpensesmonth.obj \ mmex_mmgraphpie.obj \ mmex_mmgraphtopcategories.obj \ - mmex_mmhomepagepanel.obj \ mmex_payee.obj \ mmex_summary.obj \ mmex_summaryassets.obj \ @@ -739,6 +739,9 @@ mmex_mmhelppanel.obj: ..\..\src\mmhelppanel.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\mmhelppanel.cpp +mmex_mmhomepagepanel.obj: ..\..\src\mmhomepagepanel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\mmhomepagepanel.cpp + mmex_mmpayee.obj: ..\..\src\mmpayee.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\mmpayee.cpp @@ -835,9 +838,6 @@ mmex_mmgraphtopcategories.obj: ..\..\src\reports\mmgraphtopcategories.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\reports\mmgraphtopcategories.cpp -mmex_mmhomepagepanel.obj: ..\..\src\reports\mmhomepagepanel.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\reports\mmhomepagepanel.cpp - mmex_payee.obj: ..\..\src\reports\payee.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\reports\payee.cpp Modified: trunk/build/msw/tests/makefile.gcc =================================================================== --- trunk/build/msw/tests/makefile.gcc 2013-07-06 07:25:41 UTC (rev 4280) +++ trunk/build/msw/tests/makefile.gcc 2013-07-06 07:42:12 UTC (rev 4281) @@ -127,6 +127,7 @@ mmex_tests_mmex.o \ mmex_tests_mmex_settings.o \ mmex_tests_mmhelppanel.o \ + mmex_tests_mmhomepagepanel.o \ mmex_tests_mmpayee.o \ mmex_tests_mmreportspanel.o \ mmex_tests_mmtransaction.o \ @@ -159,7 +160,6 @@ mmex_tests_mmgraphincexpensesmonth.o \ mmex_tests_mmgraphpie.o \ mmex_tests_mmgraphtopcategories.o \ - mmex_tests_mmhomepagepanel.o \ mmex_tests_payee.o \ mmex_tests_summary.o \ mmex_tests_summaryassets.o \ @@ -619,6 +619,9 @@ mmex_tests_mmhelppanel.o: ../../../src/mmhelppanel.cpp $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< +mmex_tests_mmhomepagepanel.o: ../../../src/mmhomepagepanel.cpp + $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< + mmex_tests_mmpayee.o: ../../../src/mmpayee.cpp $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< @@ -715,9 +718,6 @@ mmex_tests_mmgraphtopcategories.o: ../../../src/reports/mmgraphtopcategories.cpp $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< -mmex_tests_mmhomepagepanel.o: ../../../src/reports/mmhomepagepanel.cpp - $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< - mmex_tests_payee.o: ../../../src/reports/payee.cpp $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< Modified: trunk/build/msw/tests/makefile.vc =================================================================== --- trunk/build/msw/tests/makefile.vc 2013-07-06 07:25:41 UTC (rev 4280) +++ trunk/build/msw/tests/makefile.vc 2013-07-06 07:42:12 UTC (rev 4281) @@ -129,6 +129,7 @@ mmex_tests_mmex.obj \ mmex_tests_mmex_settings.obj \ mmex_tests_mmhelppanel.obj \ + mmex_tests_mmhomepagepanel.obj \ mmex_tests_mmpayee.obj \ mmex_tests_mmreportspanel.obj \ mmex_tests_mmtransaction.obj \ @@ -161,7 +162,6 @@ mmex_tests_mmgraphincexpensesmonth.obj \ mmex_tests_mmgraphpie.obj \ mmex_tests_mmgraphtopcategories.obj \ - mmex_tests_mmhomepagepanel.obj \ mmex_tests_payee.obj \ mmex_tests_summary.obj \ mmex_tests_summaryassets.obj \ @@ -710,6 +710,9 @@ mmex_tests_mmhelppanel.obj: ..\..\..\src\mmhelppanel.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\mmhelppanel.cpp +mmex_tests_mmhomepagepanel.obj: ..\..\..\src\mmhomepagepanel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\mmhomepagepanel.cpp + mmex_tests_mmpayee.obj: ..\..\..\src\mmpayee.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\mmpayee.cpp @@ -806,9 +809,6 @@ mmex_tests_mmgraphtopcategories.obj: ..\..\..\src\reports\mmgraphtopcategories.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\reports\mmgraphtopcategories.cpp -mmex_tests_mmhomepagepanel.obj: ..\..\..\src\reports\mmhomepagepanel.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\reports\mmhomepagepanel.cpp - mmex_tests_payee.obj: ..\..\..\src\reports\payee.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\reports\payee.cpp Modified: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-07-06 07:25:41 UTC (rev 4280) +++ trunk/src/mmex.cpp 2013-07-06 07:42:12 UTC (rev 4281) @@ -34,6 +34,7 @@ #include "mmcheckingpanel.h" #include "mmCurrencyFormatter.h" #include "mmhelppanel.h" +#include "mmhomepagepanel.h" #include "mmreportspanel.h" #include "newacctdialog.h" #include "optionsdialog.h" @@ -52,7 +53,6 @@ #include "reports/categovertimeperf.h" #include "reports/incexpenses.h" //#include "reports/mmgraphtopcategories.h" -#include "reports/mmhomepagepanel.h" #include "reports/htmlbuilder.h" #include "reports/payee.h" #include "reports/summary.h" Copied: trunk/src/mmhomepagepanel.cpp (from rev 4279, trunk/src/reports/mmhomepagepanel.cpp) =================================================================== --- trunk/src/mmhomepagepanel.cpp (rev 0) +++ trunk/src/mmhomepagepanel.cpp 2013-07-06 07:42:12 UTC (rev 4281) @@ -0,0 +1,771 @@ +/******************************************************* + Copyright (C) 2006 Madhan Kanagavel + + 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, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + ********************************************************/ + +#include "mmhomepagepanel.h" +#include "reports/html_widget_top_categories.h" +#include "mmex.h" + +#include "reports/htmlbuilder.h" +#include "billsdepositspanel.h" +#include "reports/mmgraphincexpensesmonth.h" +#include "mmCurrencyFormatter.h" +#include "db/assets.h" +#include <algorithm> + + +BEGIN_EVENT_TABLE( mmHomePagePanel, wxPanel ) +END_EVENT_TABLE() + +BEGIN_EVENT_TABLE(mmHtmlWindow, wxHtmlWindow) +END_EVENT_TABLE() + +mmHomePagePanel::mmHomePagePanel(mmGUIFrame* frame, + mmCoreDB* core, + wxWindow *parent, + wxWindowID winid, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name ) + : mmPanelBase(core) + , frame_(frame) +{ + //FIXME: this runs twice + Create(parent, winid, pos, size, style, name); + frame_->setHomePageActive(); + frame_->menuPrintingEnable(true); +} + +mmHomePagePanel::~mmHomePagePanel() +{ + frame_->setHomePageActive(false); + frame_->menuPrintingEnable(false); +} + +wxString mmHomePagePanel::GetHomePageText() +{ + return html_text_; +} + +bool mmHomePagePanel::Create( wxWindow *parent, + wxWindowID winid, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name ) +{ + SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS); + wxPanel::Create(parent, winid, pos, size, style, name); + + CreateControls(); + GetSizer()->Fit(this); + GetSizer()->SetSizeHints(this); + + createFrames(); + + + return TRUE; +} + +void mmHomePagePanel::createFrames() +{ + if (!core_->db_.get()) return; + + if (mmIniOptions::instance().ignoreFutureTransactions_) + date_range_ = new mmCurrentMonthToDate; + else + date_range_ = new mmCurrentMonth; + vAccts_ = core_->iniSettings_->GetStringSetting("VIEWACCOUNTS", VIEW_ACCOUNTS_ALL_STR); + + + double tBalance = 0.0, termBalance = 0.0; + wxString acc, term ="", stocks="", assets="", grand_total="", curr="", top="", leftFrame="", rightFrame=""; + + acc = displayAccounts(tBalance); + + if ( frame_->hasActiveTermAccounts()) + { + term = displayAccounts(termBalance, ACCOUNT_TYPE_TERM); + tBalance += termBalance; + } + + if (core_->accountList_.has_stock_account()) + stocks = displayStocks(tBalance); + + leftFrame << acc << term << stocks; + leftFrame << displayAssets(tBalance); + leftFrame << displayGrandTotals(tBalance); + curr = displayCurrencies(); + leftFrame << displayCurrencies(); + + htmlWidgetTop7Categories top_trx(core_); + leftFrame += top_trx.getHTMLText(); + + //Also displays the Income vs Expenses graph. + rightFrame << displayIncomeVsExpenses(); + rightFrame << displayBillsAndDeposits(); + rightFrame << getStatWidget(); + + wxString pageHTML = prepareTemplate(leftFrame, rightFrame); + htmlWindow_->SetPage(pageHTML); + +} + +wxString mmHomePagePanel::prepareTemplate(const wxString& left, const wxString& right) +{ + mmHTMLBuilder hb; + hb.init(); + hb.startCenter(); + + hb.startTable("100%", "top"); + hb.startTableRow(); + hb.startTableCell("100%\" colspan=\"2\" valign=\"middle\" align=\"center"); + hb.addText(getCalendarWidget()); + hb.endTableCell(); + hb.endTableRow(); + + hb.startTableRow(); + hb.endTableRow(); + hb.startTableRow(); + + hb.startTableCell("50%\" valign=\"top\" align=\"center"); + + hb.addText(left); + + hb.endTableCell(); + hb.startTableCell("50%\" valign=\"top\" align=\"center"); + + hb.addText(right); + + hb.endTableCell(); + hb.endTableRow(); + hb.endTable(); + hb.end(); + return hb.getHTMLText(); +} + +wxString mmHomePagePanel::displaySummaryHeader(const wxString& summaryTitle) +{ + mmHTMLBuilder hb; + hb.startTableRow(); + hb.addTableHeaderCell(summaryTitle, false); + hb.addTableHeaderCell(_("Reconciled"), true); + hb.addTableHeaderCell(_("Balance"), true); + hb.endTableRow(); + return hb.getHTMLText(); +} + +wxString mmHomePagePanel::displaySectionTotal(const wxString& totalsTitle, double tRecBalance, double& tBalance) +{ + mmHTMLBuilder hb; + // format the totals for display + core_->currencyList_.LoadBaseCurrencySettings(); + + std::vector<double> data; + data.push_back(tRecBalance); + data.push_back(tBalance); + + hb.startTableRow(); + hb.addTotalRow(totalsTitle, 3, data); + hb.endTableRow(); + return hb.getHTMLText(); +} + +/* Accounts */ +wxString mmHomePagePanel::displayAccounts(double& tBalance, const wxString& type) +{ + bool type_is_bank = type == ACCOUNT_TYPE_BANK; + double tRecBalance = 0.0; + + mmHTMLBuilder hb; + hb.startTable("100%"); + // Only Show the account titles if we want to display Bank accounts. + if ( frame_->expandedBankAccounts() && type_is_bank) + hb.addText(displaySummaryHeader(_("Bank Account"))); + else if (frame_->expandedTermAccounts() && !type_is_bank) + hb.addText(displaySummaryHeader(_("Term account"))); + + // Get account balances and display accounts if we want them displayed + for (const auto& account: core_->accountList_.accounts_) + { + if (account->acctType_ != type || account->status_ == mmAccount::MMEX_Closed) continue; + + mmCurrency* pCurrencyPtr = core_->accountList_.getCurrencySharedPtr(account->id_); + wxASSERT(pCurrencyPtr); + CurrencyFormatter::instance().loadSettings(*pCurrencyPtr); + + double bal = account->initialBalance_ + core_->bTransactionList_.getBalance(account->id_ + , mmIniOptions::instance().ignoreFutureTransactions_); + double reconciledBal = account->initialBalance_ + core_->bTransactionList_.getReconciledBalance(account->id_ + , mmIniOptions::instance().ignoreFutureTransactions_); + double rate = pCurrencyPtr->baseConv_; + tBalance += bal * rate; // actual amount in that account in the original rate + tRecBalance += reconciledBal * rate; + + // Display the individual account links if we want to display them + if ( ((type_is_bank) ? frame_->expandedBankAccounts() : frame_->expandedTermAccounts()) + || (!frame_->expandedBankAccounts() && !frame_->expandedTermAccounts()) ) + { + + // show the actual amount in that account + if (((vAccts_ == "Open" && account->status_ == mmAccount::MMEX_Open) || + (vAccts_ == "Favorites" && account->favoriteAcct_) || + (vAccts_ == VIEW_ACCOUNTS_ALL_STR)) + && ((type_is_bank) ? frame_->expandedBankAccounts() : frame_->expandedTermAccounts())) + { + hb.startTableRow(); + hb.addTableCellLink(wxString::Format("ACCT:%d", account->id_), account->name_, false, true); + hb.addMoneyCell(reconciledBal, true); + hb.addMoneyCell(bal); + hb.endTableRow(); + } + } + } + const wxString totalStr = (type_is_bank) ? _("Bank Accounts Total:") : _("Term Accounts Total:"); + hb.addText(displaySectionTotal(totalStr, tRecBalance, tBalance)); + hb.endTable(); + + return hb.getHTMLinTableWraper(); +} + +//* Stocks *// +wxString mmHomePagePanel::displayStocks(double& tBalance /*, double& tIncome, double& tExpenses */) +{ + mmHTMLBuilder hb; + double stTotalBalance = 0.0, stTotalGain = 0.0; + wxString tBalanceStr, tGainStr; + + hb.startTable("100%"); + if (frame_->expandedStockAccounts()) + { + hb.startTableRow(); + hb.addTableHeaderCell(_("Stocks"), false); + hb.addTableHeaderCell(_("Gain/Loss"), true); + hb.addTableHeaderCell(_("Total"), true); + hb.endTableRow(); + } + + static const char sql[] = + "select " + "c.BASECONVRATE, " + "st.heldat as ACCOUNTID, a.accountname as ACCOUNTNAME, " + "a.initialbal + " + "total((st.CURRENTPRICE)*st.NUMSHARES) as BALANCE, " + "total ((st.CURRENTPRICE-st.PURCHASEPRICE)*st.NUMSHARES-st.COMMISSION) as GAIN " + "from stock_v1 st " + "left join accountlist_v1 a on a.accountid=st.heldat " + "left join currencyformats_v1 c on c.currencyid=a.currencyid " + " where st.purchasedate<=date ('now','localtime') " + "and a.status='Open' " + "group by st.heldat "; + + wxSQLite3ResultSet q1 = core_->db_.get()->ExecuteQuery(sql); + while(q1.NextRow()) + { + int stockaccountId = q1.GetInt("ACCOUNTID"); + double stockBalance = q1.GetDouble("BALANCE"); + wxString stocknameStr = q1.GetString("ACCOUNTNAME"); + //double income = q1.GetDouble("INCOME"); + //double expenses = q1.GetDouble("EXPENCES"); + double baseconvrate = q1.GetDouble("BASECONVRATE"); + double stockGain = q1.GetDouble("GAIN"); + + mmCurrency* pCurrencyPtr = core_->accountList_.getCurrencySharedPtr(stockaccountId); + wxASSERT(pCurrencyPtr); + CurrencyFormatter::instance().loadSettings(*pCurrencyPtr); + + // if Stock accounts being displayed, include income/expense totals on home page. + //tIncome += income * baseconvrate; + //tExpenses += expenses * baseconvrate; + stTotalBalance += stockBalance * baseconvrate; + stTotalGain += stockGain * baseconvrate; + //We can hide or show Stocks on Home Page + if (frame_->expandedStockAccounts()) + { + hb.startTableRow(); + ////// + //hb.addTableCell(stocknameStr, false,true); + hb.addTableCellLink(wxString::Format("STOCK:%d" + , stockaccountId), stocknameStr, false, true); + hb.addMoneyCell(stockGain, true); + hb.addMoneyCell(stockBalance, true); + hb.endTableRow(); + } + } + q1.Finalize(); + + hb.addText(displaySectionTotal(_("Stocks Total:"), stTotalGain, stTotalBalance)); + hb.endTable(); + + // Add Stock balance to Grand Total balance + tBalance += stTotalBalance; + return hb.getHTMLinTableWraper(); +} + +//* Assets *// +wxString mmHomePagePanel::displayAssets(double& tBalance) +{ + mmHTMLBuilder hb; + core_->currencyList_.LoadBaseCurrencySettings(); + TAssetList asset_list(core_->db_.get()); + + if (mmIniOptions::instance().enableAssets_) + { + hb.startTable("100%"); + hb.startTableRow(); + hb.addTableCellLink("Assets", _("Assets"), false, true); + hb.addTableCell("", true); + hb.addTableCell(asset_list.GetAssetBalanceCurrencyFormat(), true, true, true); + hb.endTableRow(); + hb.endTable(); + + } + tBalance += asset_list.GetAssetBalance(); + return hb.getHTMLinTableWraper(); +} + +//* Currencies *// +wxString mmHomePagePanel::displayCurrencies() +{ + static const char sql[] = + "select ACCOUNTID, CURRENCYNAME, BALANCE, BASECONVRATE from ( " + "select t.accountid as ACCOUNTID, c.currencyname as CURRENCYNAME, " + "total (t.BALANCE) as BALANCE, " + "c.BASECONVRATE as BASECONVRATE " + "from ( " + "select acc.accountid as ACCOUNTID, acc.INITIALBAL as BALANCE " + "from ACCOUNTLIST_V1 ACC " + "where ACC.STATUS='Open' " + "group by acc.accountid " + "union all " + "select " + "st.heldat as ACCOUNTID, " + "total((st.CURRENTPRICE)*st.NUMSHARES-st.COMMISSION) as BALANCE " + "from stock_v1 st " + "where st.purchasedate<=date ('now','localtime') " + "group by st.heldat " + "union all " + "select ca.toaccountid, total(ca.totransamount) " + "from checkingaccount_v1 ca " + "where ca.transcode ='Transfer' and ca.STATUS<>'V' and ca.transdate<=date ('now','localtime') " + "group by ca.toaccountid " + "union all " + "select ca.accountid, total(case ca.transcode when 'Deposit' then ca.transamount else -ca.transamount end) " + "from checkingaccount_v1 ca " + "where ca.STATUS<>'V' and ca.transdate<=date ('now','localtime') " + "group by ca.accountid) t " + "left join accountlist_v1 a on a.accountid=t.accountid " + "left join currencyformats_v1 c on c.currencyid=a.currencyid " + "where a.status='Open' and balance<>0 " + "group by c.currencyid) order by CURRENCYNAME "; + + wxSQLite3ResultSet q1 = core_->db_.get()->ExecuteQuery(sql); + q1 = core_->db_.get()->ExecuteQuery(sql); + + //Determine how many currencies used + int curnumber = 0; + while(q1.NextRow()) + curnumber+=1; + + mmHTMLBuilder hb; + if (curnumber > 1 ) + { + // display the currency header + hb.startTable("100%"); + hb.startTableRow(); + hb.addTableHeaderCell(_("Currency"), false); + hb.addTableHeaderCell(_("Base Rate"), true); + hb.addTableHeaderCell(_("Summary"), true); + hb.endTableRow(); + + // display the totals for each currency value + while(q1.NextRow()) + { + int accountId = q1.GetInt("ACCOUNTID"); + double currBalance = q1.GetDouble("BALANCE"); + wxString currencyStr = q1.GetString("CURRENCYNAME"); + double convRate = q1.GetDouble("BASECONVRATE"); + wxString convRateStr; + + mmCurrency* pCurrencyPtr = core_->accountList_.getCurrencySharedPtr(accountId); + wxASSERT(pCurrencyPtr); + + wxString tBalanceStr; + CurrencyFormatter::instance().loadSettings(*pCurrencyPtr); + + hb.startTableRow(); + hb.addTableCell(currencyStr, false, false, true); + hb.addTableCell(CurrencyFormatter::float2String(convRate), true); + hb.addMoneyCell(currBalance); + hb.endTableRow(); + } + hb.endTable(); + q1.Finalize(); + } + + return hb.getHTMLinTableWraper(true); +} + +//* Income vs Expenses *// +wxString mmHomePagePanel::displayIncomeVsExpenses() +{ + bool group_by_account = true; + double tIncome = 0.0, tExpenses = 0.0; + std::map<int, std::pair<double, double> > incomeExpensesStats; + core_->bTransactionList_.getExpensesIncomeStats(incomeExpensesStats + , date_range_ + , -1 + , group_by_account + ); + core_->currencyList_.LoadBaseCurrencySettings(); + + bool show_nothing = !frame_->expandedBankAccounts() && !frame_->expandedTermAccounts(); + bool show_all = (frame_->expandedBankAccounts() && frame_->expandedTermAccounts()) || show_nothing; + bool show_bank = frame_->expandedBankAccounts(); + for (const auto& account: core_->accountList_.accounts_) + { + //if (account->status_ == mmAccount::MMEX_Closed && vAccts_ == VIEW_ACCOUNTS_OPEN_STR) continue; + //if (!account->favoriteAcct_ && vAccts_ == VIEW_ACCOUNTS_FAVORITES_STR) continue; + if (!show_all) + { + if (show_bank && account->acctType_ != ACCOUNT_TYPE_BANK) continue; + if (frame_->expandedTermAccounts() && account->acctType_ != ACCOUNT_TYPE_TERM) continue; + } + int idx = group_by_account ? (1000000 * account->id_) : 0; + tIncome += incomeExpensesStats[idx].first; + tExpenses += incomeExpensesStats[idx].second; + if (!group_by_account) break; + } + + mmHTMLBuilder hb; + + mmGraphIncExpensesMonth gg; + gg.init(tIncome, tExpenses); + gg.Generate(""); + + wxString monthHeading = date_range_->title(); + hb.startTable("100%"); + hb.addTableHeaderRow(wxString::Format(_("Income vs Expenses: %s"), monthHeading), 2); + + hb.startTableRow(); + hb.startTableCell(); + hb.addImage(gg.getOutputFileName()); + hb.endTableCell(); + + hb.startTableCell(); + + hb.startCenter(); + hb.startTable(); + hb.startTableRow(); + hb.addTableHeaderCell(_("Type")); + hb.addTableHeaderCell(_("Amount"), true); + hb.endTableRow(); + + hb.startTableRow(); + hb.addTableCell(_("Income:"), false, true); + hb.addMoneyCell(tIncome); + hb.endTableRow(); + + hb.startTableRow(); + hb.addTableCell(_("Expenses:"), false, true); + hb.addMoneyCell(tExpenses); + hb.endTableRow(); + + hb.addRowSeparator(2); + hb.startTableRow(); + hb.addTableCell(_("Difference:"), false, true, true); + hb.addMoneyCell(tIncome - tExpenses); + hb.endTableRow(); + + if (!show_all) + { + wxString accounts_type = show_bank ? _("Bank Accounts") : _("Term Accounts"); + hb.addRowSeparator(2); + hb.startTableRow(); + hb.addTableCell(_("Accounts: "), false, true, false); + hb.addTableCell(accounts_type, false, true, false); + hb.endTableRow(); + } + hb.endTable(); + hb.endCenter(); + + hb.endTableCell(); + hb.endTableRow(); + hb.endTable(); + + return hb.getHTMLinTableWraper(); +} + +//* bills & deposits *// +wxString mmHomePagePanel::displayBillsAndDeposits() +{ + mmHTMLBuilder hb; + std::vector<mmBDTransactionHolder> trans_; + wxSQLite3ResultSet q1 = core_->db_.get()->ExecuteQuery( + "select BDID, NEXTOCCURRENCEDATE, NUMOCCURRENCES, REPEATS, PAYEEID, TRANSCODE, ACCOUNTID, TOACCOUNTID, TRANSAMOUNT, TOTRANSAMOUNT from BILLSDEPOSITS_V1"); + + const wxDateTime &today = date_range_->today(); + bool visibleEntries = false; + while (q1.NextRow()) + { + mmBDTransactionHolder th; + + th.id_ = q1.GetInt("BDID"); + th.nextOccurDate_ = q1.GetDate("NEXTOCCURRENCEDATE"); + th.nextOccurStr_ = mmGetDateForDisplay(th.nextOccurDate_); + int numRepeats = q1.GetInt("NUMOCCURRENCES"); + + int repeats = q1.GetInt("REPEATS"); + // DeMultiplex the Auto Executable fields. + if (repeats >= BD_REPEATS_MULTIPLEX_BASE) // Auto Execute User Acknowlegement required + repeats -= BD_REPEATS_MULTIPLEX_BASE; + + if (repeats >= BD_REPEATS_MULTIPLEX_BASE) // Auto Execute Silent mode + repeats -= BD_REPEATS_MULTIPLEX_BASE; + + wxTimeSpan ts = th.nextOccurDate_.Subtract(today); + th.daysRemaining_ = ts.GetDays(); + int minutesRemaining_ = ts.GetMinutes(); + + if (minutesRemaining_ > 0) + th.daysRemaining_ += 1; + + th.daysRemainingStr_ = wxString::Format("%d", th.daysRemaining_) + _(" days remaining"); + + if (th.daysRemaining_ == 0) + { + if ( ((repeats > 10) && (repeats < 15)) && (numRepeats < 0) ) + th.daysRemainingStr_ = _("Inactive"); + } + + if (th.daysRemaining_ < 0) + { + th.daysRemainingStr_ = wxString::Format("%d", abs(th.daysRemaining_)) + _(" days overdue!"); + if ( ((repeats > 10) && (repeats < 15)) && (numRepeats < 0) ) + th.daysRemainingStr_ = _("Inactive"); + } + + th.payeeID_ = q1.GetInt("PAYEEID"); + th.transType_ = q1.GetString("TRANSCODE"); + th.accountID_ = q1.GetInt("ACCOUNTID"); + th.toAccountID_ = q1.GetInt("TOACCOUNTID"); + + th.amt_ = q1.GetDouble("TRANSAMOUNT"); + th.toAmt_ = q1.GetDouble("TOTRANSAMOUNT"); + + th.transAmtString_ = CurrencyFormatter::float2String(th.amt_); + //for Withdrawal amount should be negative + if (th.transType_== TRANS_TYPE_WITHDRAWAL_STR) + { + th.transAmtString_= "-" + th.transAmtString_; + th.amt_ = -th.amt_; + } + + th.transToAmtString_ = CurrencyFormatter::float2String(th.toAmt_); + + th.payeeStr_ = core_->payeeList_.GetPayeeName(th.payeeID_); + + if (th.transType_ == TRANS_TYPE_TRANSFER_STR) + { + wxString fromAccount = core_->accountList_.GetAccountName(th.accountID_); + wxString toAccount = core_->accountList_.GetAccountName(th.toAccountID_ ); + + th.payeeStr_ = toAccount; + } + + if (th.daysRemaining_ <= 14) + visibleEntries = true; + + trans_.push_back(th); + } + q1.Finalize(); + std::sort(trans_.begin(), trans_.end(), + [](const mmBDTransactionHolder& x, const mmBDTransactionHolder& y){ return x.daysRemaining_ < y.daysRemaining_; }); + + //////////////////////////////////// + if ( visibleEntries ) + { + wxString colorStr; + + hb.startTable("100%"); + hb.addTableHeaderRowLink("billsdeposits", _("Upcoming Transactions"), 3); + + std::vector<wxString> data4; + for (size_t bdidx = 0; bdidx < trans_.size(); ++bdidx) + { + data4.clear(); + wxTimeSpan ts = trans_[bdidx].nextOccurDate_.Subtract(today); + //int hoursRemaining_ = ts.GetHours(); + + if (trans_[bdidx].daysRemaining_ <= 14) + { + wxString daysRemainingStr; + colorStr = "#9999FF"; + + daysRemainingStr = trans_[bdidx].daysRemainingStr_; + if (trans_[bdidx].daysRemaining_ < 0) + colorStr = "#FF6600"; + + // Load the currency for this BD + mmCurrency* pCurrency = core_->accountList_.getCurrencySharedPtr(trans_[bdidx].accountID_); + wxASSERT(pCurrency); + if (pCurrency) + pCurrency->loadCurrencySettings(); + + hb.startTableRow(); + hb.addTableCell(trans_[bdidx].payeeStr_, false, true); + hb.addTableCell(CurrencyFormatter::float2Money(trans_[bdidx].amt_), true); + //Draw it as numeric that mean align right + hb.addTableCell(daysRemainingStr, true, false, false, colorStr); + hb.endTableRow(); + } + } + hb.endTable(); + } + return hb.getHTMLinTableWraper(true); +} + +wxString mmHomePagePanel::getCalendarWidget() +{ + const wxDateTime &today = date_range_->today(); + mmHTMLBuilder hb; + hb.startTable("100%", "left\" cellpadding=\"1\" cellspacing=\"0", "0"); + hb.startTableRow(); + hb.startTableCell(); + hb.font_settings(hb.font_size()); + hb.bold(wxGetTranslation(wxDateTime::GetEnglishMonthName(today.GetMonth()))); + hb.font_end(); + hb.endTableCell(); + hb.addTableCell(""); + wxDateTime selectedMonthDay = date_range_->start_date(); + for (int d = 1; d <= selectedMonthDay.GetLastMonthDay().GetDay(); d++) + { + selectedMonthDay.SetDay(d); + wxString sColor = "", sBgColor = ""; + if (d == today.GetDay()) sBgColor = "YELLOW"; + hb.startTableCell(wxString::Format("0\" bgcolor=\"%s", sBgColor)); + if (wxDateTime::GetWeekDayName(selectedMonthDay.GetWeekDay())=="Sunday") sColor = "#FF0000"; + else if (wxDateTime::GetWeekDayName(selectedMonthDay.GetWeekDay())=="Saturday") sColor = "#FF0000"; + hb.font_settings(hb.font_size(), sColor); + hb.addText(wxString()<<d); + hb.font_end(); + + hb.endTableCell(); + } + hb.addTableCell(wxString::Format(_("Week#%d") + , today.GetWeekOfYear()) + , false, false, true); + hb.addTableCell(wxString()<<wxDateTime::Now().GetYear(), false, false, true); + + hb.endTableRow(); + hb.endTable(); + + return hb.getHTMLinTableWraper(); +} + +wxString mmHomePagePanel::getStatWidget() +{ + mmHTMLBuilder hb; + int countFollowUp = core_->bTransactionList_.countFollowupTransactions(); + + hb.startTable("100%"); + hb.addTableHeaderRow(_("Transaction Statistics"), 2); + + if (countFollowUp > 0) + { + hb.startTableRow(); + hb.addTableCell(_("Follow Up On Transactions: ")); + hb.addTableCell(wxString::Format("%d", countFollowUp), true, true, true); + hb.endTableRow(); + } + + hb.startTableRow(); + hb.addTableCell( _("Total Transactions: ")); + hb.addTableCell(wxString::Format("%ld", core_->bTransactionList_.transactions_.size()), true, true, true); + hb.endTableRow(); + hb.endTable(); + + return hb.getHTMLinTableWraper(true); +} + +wxString mmHomePagePanel::displayGrandTotals(double& tBalance) +{ + mmHTMLBuilder hb; + // Display the grand total from all sections + wxString tBalanceStr; + core_->currencyList_.LoadBaseCurrencySettings(); + tBalanceStr = CurrencyFormatter::float2Money(tBalance); + + hb.startTable("100%"); + hb.addTotalRow(_("Grand Total:"), 2, tBalanceStr); + hb.endTable(); + + return hb.getHTMLinTableWraper(); +} + +void mmHomePagePanel::CreateControls() +{ + wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL); + this->SetSizer(itemBoxSizer2); + + htmlWindow_ = new mmHtmlWindow( this, frame_, core_, + ID_PANEL_HOMEPAGE_HTMLWINDOW, + wxDefaultPosition, wxDefaultSize, + wxHW_SCROLLBAR_AUTO|wxSUNKEN_BORDER|wxHSCROLL|wxVSCROLL ); + itemBoxSizer2->Add(htmlWindow_, 1, wxGROW|wxALL, 0); +} + +void mmHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) +{ + wxString href = link.GetHref(); + wxString number; + bool isAcct = href.StartsWith("ACCT:", &number); + bool isStock = href.StartsWith("STOCK:", &number); + if (href == "billsdeposits") + { + frame_->setNavTreeSection(_("Repeating Transactions")); + wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, MENU_BILLSDEPOSITS); + frame_->GetEventHandler()->AddPendingEvent(evt); + } + else if (href == "Assets") + { + frame_->setNavTreeSection(_("Assets")); + wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, MENU_ASSETS); + frame_->GetEventHandler()->AddPendingEvent(evt); + } + else if (isAcct) + { + long id = -1; + number.ToLong(&id); + frame_->setGotoAccountID(id); + frame_->setAccountNavTreeSection(core_->accountList_.GetAccountName(id)); + wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, MENU_GOTOACCOUNT); + frame_->GetEventHandler()->AddPendingEvent(evt); + } + else if (isStock) + { + long id = -1; + number.ToLong(&id); + frame_->setGotoAccountID(id); + frame_->setAccountNavTreeSection(core_->accountList_.GetAccountName(id)); + wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, MENU_STOCKS); + frame_->GetEventHandler()->AddPendingEvent(evt); + } +} + +//---------------------------------------------------------------------------- Copied: trunk/src/mmhomepagepanel.h (from rev 4279, trunk/src/reports/mmhomepagepanel.h) =================================================================== --- trunk/src/mmhomepagepanel.h (rev 0) +++ trunk/src/mmhomepagepanel.h 2013-07-06 07:42:12 UTC (rev 4281) @@ -0,0 +1,100 @@ +/******************************************************* + Copyright (C) 2006 Madhan Kanagavel + + 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, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + ********************************************************/ + +#ifndef _MM_EX_HOMEPAGEPANEL_H_ +#define _MM_EX_HOMEPAGEPANEL_H_ + +#include "mmpanelbase.h" +#include "constants.h" +#include "reports/mmDateRange.h" + +class mmGUIFrame; +class mmHTMLBuilder; +class mmDateRange; + +class mmHtmlWindow: public wxHtmlWindow +{ + DECLARE_NO_COPY_CLASS(mmHtmlWindow) + DECLARE_EVENT_TABLE() + +public: + mmHtmlWindow(wxWindow *parent, mmGUIFrame* frame, mmCoreDB* core, + const wxWindowID id, const wxPoint& pos, + const wxSize& size, long style) + : wxHtmlWindow(parent, id, pos, size, style), + frame_(frame), core_(core) + {} + +public: + /* required overrides for virtual style list control */ + virtual void OnLinkClicked(const wxHtmlLinkInfo& link); + +private: + mmGUIFrame* frame_; + mmCoreDB* core_; +}; + +class mmHomePagePanel : public mmPanelBase +{ + DECLARE_EVENT_TABLE() + +public: + mmHomePagePanel( mmGUIFrame* frame, + mmCoreDB* core_, + wxWindow *parent, + wxWindowID winid = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTAB_TRAVERSAL | wxNO_BORDER, + const wxString& name = wxPanelNameStr ); + + bool Create( wxWindow *parent, wxWindowID winid, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTAB_TRAVERSAL | wxNO_BORDER, + const wxString& name = wxPanelNameStr); + + ~mmHomePagePanel(); + + wxString GetHomePageText(); + +private: + mmGUIFrame* frame_; + mmHtmlWindow* htmlWindow_; + mmDateRange* date_range_; + void CreateControls(); + void createFrames(); + wxString prepareTemplate(const wxString& left, const wxString& right); + wxString html_text_; + wxString vAccts_; + + wxString displaySummaryHeader(const wxString& summaryTitle ); + wxString displaySectionTotal(const wxString& totalsTitle, double tRecBalance, double& tBalance); + + wxString displayAccounts(double& tBalance, const wxString& type = ACCOUNT_TYPE_BANK); + wxString displayStocks(double& tBalance /*, double& tIncome, double& tExpenses */); + wxString displayAssets(double& tBalance); + wxString displayCurrencies(); + wxString displayIncomeVsExpenses(); + wxString displayBillsAndDeposits(); + wxString getStatWidget(); + wxString getCalendarWidget(); + wxString displayGrandTotals(double& tBalance); +}; + +#endif Deleted: trunk/src/reports/mmhomepagepanel.cpp =================================================================== --- trunk/src/reports/mmhomepagepanel.cpp 2013-07-06 07:25:41 UTC (rev 4280) +++ trunk/src/reports/mmhomepagepanel.cpp 2013-07-06 07:42:12 UTC (rev 4281) @@ -1,771 +0,0 @@ -/******************************************************* - Copyright (C) 2006 Madhan Kanagavel - - 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, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - ********************************************************/ - -#include "mmhomepagepanel.h" -#include "html_widget_top_categories.h" -#include "../mmex.h" - -#include "htmlbuilder.h" -#include "../billsdepositspanel.h" -#include "mmgraphincexpensesmonth.h" -#include "../mmCurrencyFormatter.h" -#include "../db/assets.h" -#include <algorithm> - - -BEGIN_EVENT_TABLE( mmHomePagePanel, wxPanel ) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(mmHtmlWindow, wxHtmlWindow) -END_EVENT_TABLE() - -mmHomePagePanel::mmHomePagePanel(mmGUIFrame* frame, - mmCoreDB* core, - wxWindow *parent, - wxWindowID winid, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name ) - : mmPanelBase(core) - , frame_(frame) -{ - //FIXME: this runs twice - Create(parent, winid, pos, size, style, name); - frame_->setHomePageActive(); - frame_->menuPrintingEnable(true); -} - -mmHomePagePanel::~mmHomePagePanel() -{ - frame_->setHomePageActive(false); - frame_->menuPrintingEnable(false); -} - -wxString mmHomePagePanel::GetHomePageText() -{ - return html_text_; -} - -bool mmHomePagePanel::Create( wxWindow *parent, - wxWindowID winid, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name ) -{ - SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS); - wxPanel::Create(parent, winid, pos, size, style, name); - - CreateControls(); - GetSizer()->Fit(this); - GetSizer()->SetSizeHints(this); - - createFrames(); - - - return TRUE; -} - -void mmHomePagePanel::createFrames() -{ - if (!core_->db_.get()) return; - - if (mmIniOptions::instance().ignoreFutureTransactions_) - date_range_ = new mmCurrentMonthToDate; - else - date_range_ = new mmCurrentMonth; - vAccts_ = core_->iniSettings_->GetStringSetting("VIEWACCOUNTS", VIEW_ACCOUNTS_ALL_STR); - - - double tBalance = 0.0, termBalance = 0.0; - wxString acc, term ="", stocks="", assets="", grand_total="", curr="", top="", leftFrame="", rightFrame=""; - - acc = displayAccounts(tBalance); - - if ( frame_->hasActiveTermAccounts()) - { - term = displayAccounts(termBalance, ACCOUNT_TYPE_TERM); - tBalance += termBalance; - } - - if (core_->accountList_.has_stock_account()) - stocks = displayStocks(tBalance); - - leftFrame << acc << term << stocks; - leftFrame << displayAssets(tBalance); - leftFrame << displayGrandTotals(tBalance); - curr = displayCurrencies(); - leftFrame << displayCurrencies(); - - htmlWidgetTop7Categories top_trx(core_); - leftFrame += top_trx.getHTMLText(); - - //Also displays the Income vs Expenses graph. - rightFrame << displayIncomeVsExpenses(); - rightFrame << displayBillsAndDeposits(); - rightFrame << getStatWidget(); - - wxString pageHTML = prepareTemplate(leftFrame, rightFrame); - htmlWindow_->SetPage(pageHTML); - -} - -wxString mmHomePagePanel::prepareTemplate(const wxString& left, const wxString& right) -{ - mmHTMLBuilder hb; - hb.init(); - hb.startCenter(); - - hb.startTable("100%", "top"); - hb.startTableRow(); - hb.startTableCell("100%\" colspan=\"2\" valign=\"middle\" align=\"center"); - hb.addText(getCalendarWidget()); - hb.endTableCell(); - hb.endTableRow(); - - hb.startTableRow(); - hb.endTableRow(); - hb.startTableRow(); - - hb.startTableCell("50%\" valign=\"top\" align=\"center"); - - hb.addText(left); - - hb.endTableCell(); - hb.startTableCell("50%\" valign=\"top\" align=\"center"); - - hb.addText(right); - - hb.endTableCell(); - hb.endTableRow(); - hb.endTable(); - hb.end(); - return hb.getHTMLText(); -} - -wxString mmHomePagePanel::displaySummaryHeader(const wxString& summaryTitle) -{ - mmHTMLBuilder hb; - hb.startTableRow(); - hb.addTableHeaderCell(summaryTitle, false); - hb.addTableHeaderCell(_("Reconciled"), true); - hb.addTableHeaderCell(_("Balance"), true); - hb.endTableRow(); - return hb.getHTMLText(); -} - -wxString mmHomePagePanel::displaySectionTotal(const wxString& totalsTitle, double tRecBalance, double& tBalance) -{ - mmHTMLBuilder hb; - // format the totals for display - core_->currencyList_.LoadBaseCurrencySettings(); - - std::vector<double> data; - data.push_back(tRecBalance); - data.push_back(tBalance); - - hb.startTableRow(); - hb.addTotalRow(totalsTitle, 3, data); - hb.endTableRow(); - return hb.getHTMLText(); -} - -/* Accounts */ -wxString mmHomePagePanel::displayAccounts(double& tBalance, const wxString& type) -{ - bool type_is_bank = type == ACCOUNT_TYPE_BANK; - double tRecBalance = 0.0; - - mmHTMLBuilder hb; - hb.startTable("100%"); - // Only Show the account titles if we want to display Bank accounts. - if ( frame_->expandedBankAccounts() && type_is_bank) - hb.addText(displaySummaryHeader(_("Bank Account"))); - else if (frame_->expandedTermAccounts() && !type_is_bank) - hb.addText(displaySummaryHeader(_("Term account"))); - - // Get account balances and display accounts if we want them displayed - for (const auto& account: core_->accountList_.accounts_) - { - if (account->acctType_ != type || account->status_ == mmAccount::MMEX_Closed) continue; - - mmCurrency* pCurrencyPtr = core_->accountList_.getCurrencySharedPtr(account->id_); - wxASSERT(pCurrencyPtr); - CurrencyFormatter::instance().loadSettings(*pCurrencyPtr); - - double bal = account->initialBalance_ + core_->bTransactionList_.getBalance(account->id_ - , mmIniOptions::instance().ignoreFutureTransactions_); - double reconciledBal = account->initialBalance_ + core_->bTransactionList_.getReconciledBalance(account->id_ - , mmIniOptions::instance().ignoreFutureTransactions_); - double rate = pCurrencyPtr->baseConv_; - tBalance += bal * rate; // actual amount in that account in the original rate - tRecBalance += reconciledBal * rate; - - // Display the individual account links if we want to display them - if ( ((type_is_bank) ? frame_->expandedBankAccounts() : frame_->expandedTermAccounts()) - || (!frame_->expandedBankAccounts() && !frame_->expandedTermAccounts()) ) - { - - // show the actual amount in that account - if (((vAccts_ == "Open" && account->status_ == mmAccount::MMEX_Open) || - (vAccts_ == "Favorites" && account->favoriteAcct_) || - (vAccts_ == VIEW_ACCOUNTS_ALL_STR)) - && ((type_is_bank) ? frame_->expandedBankAccounts() : frame_->expandedTermAccounts())) - { - hb.startTableRow(); - hb.addTableCellLink(wxString::Format("ACCT:%d", account->id_), account->name_, false, true); - hb.addMoneyCell(reconciledBal, true); - hb.addMoneyCell(bal); - hb.endTableRow(); - } - } - } - const wxString totalStr = (type_is_bank) ? _("Bank Accounts Total:") : _("Term Accounts Total:"); - hb.addText(displaySectionTotal(totalStr, tRecBalance, tBalance)); - hb.endTable(); - - return hb.getHTMLinTableWraper(); -} - -//* Stocks *// -wxString mmHomePagePanel::displayStocks(double& tBalance /*, double& tIncome, double& tExpenses */) -{ - mmHTMLBuilder hb; - double stTotalBalance = 0.0, stTotalGain = 0.0; - wxString tBalanceStr, tGainStr; - - hb.startTable("100%"); - if (frame_->expandedStockAccounts()) - { - hb.startTableRow(); - hb.addTableHeaderCell(_("Stocks"), false); - hb.addTableHeaderCell(_("Gain/Loss"), true); - hb.addTableHeaderCell(_("Total"), true); - hb.endTableRow(); - } - - static const char sql[] = - "select " - "c.BASECONVRATE, " - "st.heldat as ACCOUNTID, a.accountname as ACCOUNTNAME, " - "a.initialbal + " - "total((st.CURRENTPRICE)*st.NUMSHARES) as BALANCE, " - "total ((st.CURRENTPRICE-st.PURCHASEPRICE)*st.NUMSHARES-st.COMMISSION) as GAIN " - "from stock_v1 st " - "left join accountlist_v1 a on a.accountid=st.heldat " - "left join currencyformats_v1 c on c.currencyid=a.currencyid " - " where st.purchasedate<=date ('now','localtime') " - "and a.status='Open' " - "group by st.heldat "; - - wxSQLite3ResultSet q1 = core_->db_.get()->ExecuteQuery(sql); - while(q1.NextRow()) - { - int stockaccountId = q1.GetInt("ACCOUNTID"); - double stockBalance = q1.GetDouble("BALANCE"); - wxString stocknameStr = q1.GetString("ACCOUNTNAME"); - //double income = q1.GetDouble("INCOME"); - //double expenses = q1.GetDouble("EXPENCES"); - double baseconvrate = q1.GetDouble("BASECONVRATE"); - double stockGain = q1.GetDouble("GAIN"); - - mmCurrency* pCurrencyPtr = core_->accountList_.getCurrencySharedPtr(stockaccountId); - wxASSERT(pCurrencyPtr); - CurrencyFormatter::instance().loadSettings(*pCurrencyPtr); - - // if Stock accounts being displayed, include income/expense totals on home page. - //tIncome += income * baseconvrate; - //tExpenses += expenses * baseconvrate; - stTotalBalance += stockBalance * baseconvrate; - stTotalGain += stockGain * baseconvrate; - //We can hide or show Stocks on Home Page - if (frame_->expandedStockAccounts()) - { - hb.startTableRow(); - ////// - //hb.addTableCell(stocknameStr, false,true); - hb.addTableCellLink(wxString::Format("STOCK:%d" - , stockaccountId), stocknameStr, false, true); - hb.addMoneyCell(stockGain, true); - hb.addMoneyCell(stockBalance, true); - hb.endTableRow(); - } - } - q1.Finalize(); - - hb.addText(displaySectionTotal(_("Stocks Total:"), stTotalGain, stTotalBalance)); - hb.endTable(); - - // Add Stock balance to Grand Total balance - tBalance += stTotalBalance; - return hb.getHTMLinTableWraper(); -} - -//* Assets *// -wxString mmHomePagePanel::displayAssets(double& tBalance) -{ - mmHTMLBuilder hb; - core_->currencyList_.LoadBaseCurrencySettings(); - TAssetList asset_list(core_->db_.get()); - - if (mmIniOptions::instance().enableAssets_) - { - hb.startTable("100%"); - hb.startTableRow(); - hb.addTableCellLink("Assets", _("Assets"), false, true); - hb.addTableCell("", true); - hb.addTableCell(asset_list.GetAssetBalanceCurrencyFormat(), true, true, true); - hb.endTableRow(); - hb.endTable(); - - } - tBalance += asset_list.GetAssetBalance(); - return hb.getHTMLinTableWraper(); -} - -//* Currencies *// -wxString mmHomePagePanel::displayCurrencies() -{ - static const char sql[] = - "select ACCOUNTID, CURRENCYNAME, BALANCE, BASECONVRATE from ( " - "select t.accountid as ACCOUNTID, c.currencyname as CURRENCYNAME, " - "total (t.BALANCE) as BALANCE, " - "c.BASECONVRATE as BASECONVRATE " - "from ( " - "select acc.accountid as ACCOUNTID, acc.INITIALBAL as BALANCE " - "from ACCOUNTLIST_V1 ACC " - "where ACC.STATUS='Open' " - "group by acc.accountid " - "union all " - "select " - "st.heldat as ACCOUNTID, " - "total((st.CURRENTPRICE)*st.NUMSHARES-st.COMMISSION) as BALANCE " - "from stock_v1 st " - "where st.purchasedate<=date ('now','localtime') " - "group by st.heldat " - "union all " - "select ca.toaccountid, total(ca.totransamount) " - "from checkingaccount_v1 ca " - "where ca.transcode ='Transfer' and ca.STATUS<>'V' and ca.transdate<=date ('now','localtime') " - "group by ca.toaccountid " - "union all " - "select ca.accountid, total(case ca.transcode when 'Deposit' then ca.transamount else -ca.transamount end) " - "from checkingaccount_v1 ca " - "where ca.STATUS<>'V' and ca.transdate<=date ('now','localtime') " - "group by ca.accountid) t " - "left join accountlist_v1 a on a.accountid=t.accountid " - "left join currencyformats_v1 c on c.currencyid=a.currencyid " - "where a.status='Open' and balance<>0 " - "group by c.currencyid) order by CURRENCYNAME "; - - wxSQLite3ResultSet q1 = core_->db_.get()->ExecuteQuery(sql); - q1 = core_->db_.get()->ExecuteQuery(sql); - - //Determine how many currencies used - int curnumber = 0; - while(q1.NextRow()) - curnumber+=1; - - mmHTMLBuilder hb; - if (curnumber > 1 ) - { - // display the currency header - hb.startTable("100%"); - hb.startTableRow(); - hb.addTableHeaderCell(_("Currency"), false); - hb.addTableHeaderCell(_("Base Rate"), true); - hb.addTableHeaderCell(_("Summary"), true); - hb.endTableRow(); - - // display the totals for each currency value - while(q1.NextRow()) - { - int accountId = q1.GetInt("ACCOUNTID"); - double currBalance = q1.GetDouble("BALANCE"); - wxString currencyStr = q1.GetString("CURRENCYNAME"); - double convRate = q1.GetDouble("BASECONVRATE"); - wxString convRateStr; - - mmCurrency* pCurrencyPtr = core_->accountList_.getCurrencySharedPtr(accountId); - wxASSERT(pCurrencyPtr); - - wxString tBalanceStr; - CurrencyFormatter::instance().loadSettings(*pCurrencyPtr); - - hb.startTableRow(); - hb.addTableCell(currencyStr, false, false, true); - hb.addTableCell(CurrencyFormatter::float2String(convRate), true); - hb.addMoneyCell(currBalance); - hb.endTableRow(); - } - hb.endTable(); - q1.Finalize(); - } - - return hb.getHTMLinTableWraper(true); -} - -//* Income vs Expenses *// -wxString mmHomePagePanel::displayIncomeVsExpenses() -{ - bool group_by_account = true; - double tIncome = 0.0, tExpenses = 0.0; - std::map<int, std::pair<double, double> > incomeExpensesStats; - core_->bTransactionList_.getExpensesIncomeStats(incomeExpensesStats - , date_range_ - , -1 - , group_by_account - ); - core_->currencyList_.LoadBaseCurrencySettings(); - - bool show_nothing = !frame_->expandedBankAccounts() && !frame_->expandedTermAccounts(); - bool show_all = (frame_->expandedBankAccounts() && frame_->expandedTermAccounts()) || show_nothing; - bool show_bank = frame_->expandedBankAccounts(); - for (const auto& account: core_->accountList_.accounts_) - { - //if (account->status_ == mmAccount::MMEX_Closed && vAccts_ == VIEW_ACCOUNTS_OPEN_STR) continue; - //if (!account->favoriteAcct_ && vAccts_ == VIEW_ACCOUNTS_FAVORITES_STR) continue; - if (!show_all) - { - if (show_bank && account->acctType_ != ACCOUNT_TYPE_BANK) continue; - if (frame_->expandedTermAccounts() && account->acctType_ != ACCOUNT_TYPE_TERM) continue; - } - int idx = group_by_account ? (1000000 * account->id_) : 0; - tIncome += incomeExpensesStats[idx].first; - tExpenses += incomeExpensesStats[idx].second; - if (!group_by_account) break; - } - - mmHTMLBuilder hb; - - mmGraphIncExpensesMonth gg; - gg.init(tIncome, tExpenses); - gg.Generate(""); - - wxString monthHeading = date_range_->title(); - hb.startTable("100%"); - hb.addTableHeaderRow(wxString::Format(_("Income vs Expenses: %s"), monthHeading), 2); - - hb.startTableRow(); - hb.startTableCell(); - hb.addImage(gg.getOutputFileName()); - hb.endTableCell(); - - hb.startTableCell(); - - hb.startCenter(); - hb.startTable(); - hb.startTableRow(); - hb.addTableHeaderCell(_("Type")); - hb.addTableHeaderCell(_("Amount"), true); - hb.endTableRow(); - - hb.startTableRow(); - hb.addTableCell(_("Income:"), false, true); - hb.addMoneyCell(tIncome); - hb.endTableRow(); - - hb.startTableRow(); - hb.addTableCell(_("Expenses:"), false, true); - hb.addMoneyCell(tExpenses); - hb.endTableRow(); - - hb.addRowSeparator(2); - hb.startTableRow(); - hb.addTableCell(_("Difference:"), false, true, true); - hb.addMoneyCell(tIncome - tExpenses); - hb.endTableRow(); - - if (!show_all) - { - wxString accounts_type = show_bank ? _("Bank Accounts") : _("Term Accounts"); - hb.addRowSeparator(2); - hb.startTableRow(); - hb.addTableCell(_("Accounts: "), false, true, false); - hb.addTableCell(accounts_type, false, true, false); - hb.endTableRow(); - } - hb.endTable(); - hb.endCenter(); - - hb.endTableCell(); - hb.endTableRow(); - hb.endTable(); - - return hb.getHTMLinTableWraper(); -} - -//* bills & deposits *// -wxString mmHomePagePanel::displayBillsAndDeposits() -{ - mmHTMLBuilder hb; - std::vector<mmBDTransactionHolder> trans_; - wxSQLite3ResultSet q1 = core_->db_.get()->ExecuteQuery( - "select BDID, NEXTOCCURRENCEDATE, NUMOCCURRENCES, REPEATS, PAYEEID, TRANSCODE, ACCOUNTID, TOACCOUNTID, TRANSAMOUNT, TOTRANSAMOUNT from BILLSDEPOSITS_V1"); - - const wxDateTime &today = date_range_->today(); - bool visibleEntries = false; - while (q1.NextRow()) - { - mmBDTransactionHolder th; - - th.id_ = q1.GetInt("BDID"); - th.nextOccurDate_ = q1.GetDate("NEXTOCCURRENCEDATE"); - th.nextOccurStr_ = mmGetDateForDisplay(th.nextOccurDate_); - int numRepeats = q1.GetInt("NUMOCCURRENCES"); - - int repeats = q1.GetInt("REPEATS"); - // DeMultiplex the Auto Executable fields. - if (repeats >= BD_REPEATS_MULTIPLEX_BASE) // Auto Execute User Acknowlegement required - repeats -= BD_REPEATS_MULTIPLEX_BASE; - - if (repeats >= BD_REPEATS_MULTIPLEX_BASE) // Auto Execute Silent mode - repeats -= BD_REPEATS_MULTIPLEX_BASE; - - wxTimeSpan ts = th.nextOccurDate_.Subtract(today); - th.daysRemaining_ = ts.GetDays(); - int minutesRemaining_ = ts.GetMinutes(); - - if (minutesRemaining_ > 0) - th.daysRemaining_ += 1; - - th.daysRemainingStr_ = wxString::Format("%d", th.daysRemaining_) + _(" days remaining"); - - if (th.daysRemaining_ == 0) - { - if ( ((repeats > 10) && (repeats < 15)) && (numRepeats < 0) ) - th.daysRemainingStr_ = _("Inactive"); - } - - if (th.daysRemaining_ < 0) - { - th.daysRemainingStr_ = wxString::Format("%d", abs(th.daysRemaining_)) + _(" days overdue!"); - if ( ((repeats > 10) && (repeats < 15)) && (numRepeats < 0) ) - th.daysRemainingStr_ = _("Inactive"); - } - - th.payeeID_ = q1.GetInt("PAYEEID"); - th.transType_ = q1.GetString("TRANSCODE"); - th.accountID_ = q1.GetInt("ACCOUNTID"); - th.toAccountID_ = q1.GetInt("TOACCOUNTID"); - - th.amt_ = q1.GetDouble("TRANSAMOUNT"); - th.toAmt_ = q1.GetDouble("TOTRANSAMOUNT"); - - th.transAmtString_ = CurrencyFormatter::float2String(th.amt_); - //for Withdrawal amount should be negative - if (th.transType_== TRANS_TYPE_WITHDRAWAL_STR) - { - th.transAmtString_= "-" + th.transAmtString_; - th.amt_ = -th.amt_; - } - - th.transToAmtString_ = CurrencyFo... [truncated message content] |
From: <gua...@us...> - 2013-07-07 07:58:54
|
Revision: 4312 http://sourceforge.net/p/moneymanagerex/code/4312 Author: guanlisheng Date: 2013-07-07 07:58:51 +0000 (Sun, 07 Jul 2013) Log Message: ----------- cleanup Modified Paths: -------------- trunk/build/msw/makefile.gcc trunk/build/msw/makefile.vc trunk/build/msw/tests/makefile.gcc trunk/build/msw/tests/makefile.vc trunk/src/mmex.cpp trunk/src/model/Model_Stock.h Modified: trunk/build/msw/makefile.gcc =================================================================== --- trunk/build/msw/makefile.gcc 2013-07-07 07:50:38 UTC (rev 4311) +++ trunk/build/msw/makefile.gcc 2013-07-07 07:58:51 UTC (rev 4312) @@ -170,7 +170,6 @@ mmex_account.o \ mmex_assets.o \ mmex_budget_table.o \ - mmex_budget_year.o \ mmex_category.o \ mmex_currency.o \ mmex_entry_base.o \ @@ -732,9 +731,6 @@ mmex_budget_table.o: ../../src/db/budget_table.cpp $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< -mmex_budget_year.o: ../../src/db/budget_year.cpp - $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< - mmex_category.o: ../../src/db/category.cpp $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< Modified: trunk/build/msw/makefile.vc =================================================================== --- trunk/build/msw/makefile.vc 2013-07-07 07:50:38 UTC (rev 4311) +++ trunk/build/msw/makefile.vc 2013-07-07 07:58:51 UTC (rev 4312) @@ -171,7 +171,6 @@ mmex_account.obj \ mmex_assets.obj \ mmex_budget_table.obj \ - mmex_budget_year.obj \ mmex_category.obj \ mmex_currency.obj \ mmex_entry_base.obj \ @@ -865,9 +864,6 @@ mmex_budget_table.obj: ..\..\src\db\budget_table.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\db\budget_table.cpp -mmex_budget_year.obj: ..\..\src\db\budget_year.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\db\budget_year.cpp - mmex_category.obj: ..\..\src\db\category.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\db\category.cpp Modified: trunk/build/msw/tests/makefile.gcc =================================================================== --- trunk/build/msw/tests/makefile.gcc 2013-07-07 07:50:38 UTC (rev 4311) +++ trunk/build/msw/tests/makefile.gcc 2013-07-07 07:58:51 UTC (rev 4312) @@ -169,7 +169,6 @@ mmex_tests_account.o \ mmex_tests_assets.o \ mmex_tests_budget_table.o \ - mmex_tests_budget_year.o \ mmex_tests_category.o \ mmex_tests_currency.o \ mmex_tests_entry_base.o \ @@ -745,9 +744,6 @@ mmex_tests_budget_table.o: ../../../src/db/budget_table.cpp $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< -mmex_tests_budget_year.o: ../../../src/db/budget_year.cpp - $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< - mmex_tests_category.o: ../../../src/db/category.cpp $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< Modified: trunk/build/msw/tests/makefile.vc =================================================================== --- trunk/build/msw/tests/makefile.vc 2013-07-07 07:50:38 UTC (rev 4311) +++ trunk/build/msw/tests/makefile.vc 2013-07-07 07:58:51 UTC (rev 4312) @@ -171,7 +171,6 @@ mmex_tests_account.obj \ mmex_tests_assets.obj \ mmex_tests_budget_table.obj \ - mmex_tests_budget_year.obj \ mmex_tests_category.obj \ mmex_tests_currency.obj \ mmex_tests_entry_base.obj \ @@ -836,9 +835,6 @@ mmex_tests_budget_table.obj: ..\..\..\src\db\budget_table.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\db\budget_table.cpp -mmex_tests_budget_year.obj: ..\..\..\src\db\budget_year.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\db\budget_year.cpp - mmex_tests_category.obj: ..\..\..\src\db\category.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\db\category.cpp Modified: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-07-07 07:50:38 UTC (rev 4311) +++ trunk/src/mmex.cpp 2013-07-07 07:58:51 UTC (rev 4312) @@ -66,6 +66,7 @@ #include "db/transactionbill.h" #include "mmex_settings.h" #include "model/Model_Asset.h" +#include "model/Model_Stock.h" #include "model/Model_Infotable.h" #include "model/Model_Setting.h" #include "model/Model_Budgetyear.h" @@ -2637,6 +2638,7 @@ // if the database pointer has been reset, the password is possibly incorrect if (!m_db) return false; Model_Asset::instance(m_db.get()); + Model_Stock::instance(m_db.get()); Model_Budgetyear::instance().db_ = m_db.get(); Model_Infotable::instance().db_ = m_db.get(); // we need to check the db whether it is the right version Modified: trunk/src/model/Model_Stock.h =================================================================== --- trunk/src/model/Model_Stock.h 2013-07-07 07:50:38 UTC (rev 4311) +++ trunk/src/model/Model_Stock.h 2013-07-07 07:58:51 UTC (rev 4312) @@ -34,7 +34,12 @@ { return Singleton<Model_Stock>::instance(); } - + static Model_Stock& instance(wxSQLite3Database* db) + { + Model_Stock& ins = Singleton<Model_Stock>::instance(); + ins.db_ = db; + return ins; + } public: Data_Set all(COLUMN col = COLUMN(0), bool asc = true) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2013-07-07 08:00:20
|
Revision: 4313 http://sourceforge.net/p/moneymanagerex/code/4313 Author: guanlisheng Date: 2013-07-07 08:00:17 +0000 (Sun, 07 Jul 2013) Log Message: ----------- cleanup Modified Paths: -------------- trunk/build/msw/makefile.gcc trunk/build/msw/makefile.vc trunk/build/msw/tests/makefile.gcc trunk/build/msw/tests/makefile.vc trunk/src/tests/Makefile.in Removed Paths: ------------- trunk/src/db/stocks.cpp trunk/src/db/stocks.h Modified: trunk/build/msw/makefile.gcc =================================================================== --- trunk/build/msw/makefile.gcc 2013-07-07 07:58:51 UTC (rev 4312) +++ trunk/build/msw/makefile.gcc 2013-07-07 08:00:17 UTC (rev 4313) @@ -175,7 +175,6 @@ mmex_entry_base.o \ mmex_payee_table.o \ mmex_splittransaction.o \ - mmex_stocks.o \ mmex_subcategory.o \ mmex_transaction.o \ mmex_transactionbill.o \ @@ -746,9 +745,6 @@ mmex_splittransaction.o: ../../src/db/splittransaction.cpp $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< -mmex_stocks.o: ../../src/db/stocks.cpp - $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< - mmex_subcategory.o: ../../src/db/subcategory.cpp $(CXX) -c -o $@ $(MMEX_CXXFLAGS) $(CPPDEPS) $< Modified: trunk/build/msw/makefile.vc =================================================================== --- trunk/build/msw/makefile.vc 2013-07-07 07:58:51 UTC (rev 4312) +++ trunk/build/msw/makefile.vc 2013-07-07 08:00:17 UTC (rev 4313) @@ -176,7 +176,6 @@ mmex_entry_base.obj \ mmex_payee_table.obj \ mmex_splittransaction.obj \ - mmex_stocks.obj \ mmex_subcategory.obj \ mmex_transaction.obj \ mmex_transactionbill.obj \ @@ -879,9 +878,6 @@ mmex_splittransaction.obj: ..\..\src\db\splittransaction.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\db\splittransaction.cpp -mmex_stocks.obj: ..\..\src\db\stocks.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\db\stocks.cpp - mmex_subcategory.obj: ..\..\src\db\subcategory.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_CXXFLAGS) ..\..\src\db\subcategory.cpp Modified: trunk/build/msw/tests/makefile.gcc =================================================================== --- trunk/build/msw/tests/makefile.gcc 2013-07-07 07:58:51 UTC (rev 4312) +++ trunk/build/msw/tests/makefile.gcc 2013-07-07 08:00:17 UTC (rev 4313) @@ -174,7 +174,6 @@ mmex_tests_entry_base.o \ mmex_tests_payee_table.o \ mmex_tests_splittransaction.o \ - mmex_tests_stocks.o \ mmex_tests_subcategory.o \ mmex_tests_transaction.o \ mmex_tests_transactionbill.o \ @@ -759,9 +758,6 @@ mmex_tests_splittransaction.o: ../../../src/db/splittransaction.cpp $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< -mmex_tests_stocks.o: ../../../src/db/stocks.cpp - $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< - mmex_tests_subcategory.o: ../../../src/db/subcategory.cpp $(CXX) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(CPPDEPS) $< Modified: trunk/build/msw/tests/makefile.vc =================================================================== --- trunk/build/msw/tests/makefile.vc 2013-07-07 07:58:51 UTC (rev 4312) +++ trunk/build/msw/tests/makefile.vc 2013-07-07 08:00:17 UTC (rev 4313) @@ -176,7 +176,6 @@ mmex_tests_entry_base.obj \ mmex_tests_payee_table.obj \ mmex_tests_splittransaction.obj \ - mmex_tests_stocks.obj \ mmex_tests_subcategory.obj \ mmex_tests_transaction.obj \ mmex_tests_transactionbill.obj \ @@ -850,9 +849,6 @@ mmex_tests_splittransaction.obj: ..\..\..\src\db\splittransaction.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\db\splittransaction.cpp -mmex_tests_stocks.obj: ..\..\..\src\db\stocks.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\db\stocks.cpp - mmex_tests_subcategory.obj: ..\..\..\src\db\subcategory.cpp $(CXX) /c /nologo /TP /Fo$@ $(MMEX_TESTS_CXXFLAGS) ..\..\..\src\db\subcategory.cpp Deleted: trunk/src/db/stocks.cpp =================================================================== --- trunk/src/db/stocks.cpp 2013-07-07 07:58:51 UTC (rev 4312) +++ trunk/src/db/stocks.cpp 2013-07-07 08:00:17 UTC (rev 4313) @@ -1,306 +0,0 @@ -/******************************************************* - Copyright (C) 2013 Stefano Giorgio - - 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, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - ********************************************************/ - -#include <numeric> -#include "stocks.h" -#include "../mmCurrencyFormatter.h" - -/************************************************************************************ - TStockEntry Methods - ***********************************************************************************/ -/// Constructor used when loading stocks from the database -TStockEntry::TStockEntry(wxSQLite3ResultSet& q1) -: TEntryBase() -{ - id_ = q1.GetInt("STOCKID"); - heldat_ = q1.GetInt("HELDAT"); - pur_date_ = q1.GetDate("PURCHASEDATE"); - name_ = q1.GetString("STOCKNAME"); - symbol_ = q1.GetString("SYMBOL"); - num_shares_ = q1.GetDouble("NUMSHARES"); - pur_price_ = q1.GetDouble("PURCHASEPRICE"); - notes_ = q1.GetString("NOTES"); - cur_price_ = q1.GetDouble("CURRENTPRICE"); - value_ = q1.GetDouble("VALUE"); - commission_ = q1.GetDouble("COMMISSION"); -} - -/// Copy constructor using a pointer -TStockEntry::TStockEntry(TStockEntry* pEntry) -: TEntryBase() -{ - heldat_ = pEntry->heldat_; - pur_date_ = pEntry->pur_date_; - name_ = pEntry->name_; - symbol_ = pEntry->symbol_; - num_shares_ = pEntry->num_shares_; - pur_price_ = pEntry->pur_price_; - notes_ = pEntry->notes_; - cur_price_ = pEntry->cur_price_; - value_ = pEntry->value_; - commission_ = pEntry->commission_; -} - -void TStockEntry::SetDatabaseValues(wxSQLite3Statement& st, int& db_index) -{ - st.Bind(++db_index, heldat_); // "HELDAT" - st.BindDate(++db_index, pur_date_); // "PURCHASEDATE" - st.Bind(++db_index, name_); // "STOCKNAME" - st.Bind(++db_index, symbol_); // "SYMBOL" - st.Bind(++db_index, num_shares_); // "NUMSHARES" - st.Bind(++db_index, pur_price_); // "PURCHASEPRICE" - st.Bind(++db_index, notes_); // "NOTES" - st.Bind(++db_index, cur_price_); // "CURRENTPRICE" - st.Bind(++db_index, value_); // "VALUE" - st.Bind(++db_index, commission_); // "COMMISSION" -} - -/// Constructor for creating a new stock entry. -TStockEntry::TStockEntry() -: TEntryBase() -, heldat_(-1) -, num_shares_(0.0) -, pur_price_(0.0) -, cur_price_(0.0) -, value_(0.0) -, commission_(0.0) -{} - -int TStockEntry::Add(wxSQLite3Database* db) -{ - const char ADD_STOCK_V1_ROW[] = - "insert into STOCK_V1 " - " (HELDAT, PURCHASEDATE, STOCKNAME, SYMBOL, NUMSHARES," - " PURCHASEPRICE, NOTES, CURRENTPRICE, VALUE, COMMISSION)" - " values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; - - wxSQLite3Statement st = db->PrepareStatement(ADD_STOCK_V1_ROW); - int db_index = 0; - SetDatabaseValues(st, db_index); - - FinaliseAdd(db, st); - - return id_; -} - -void TStockEntry::Delete(wxSQLite3Database* db) -{ - DeleteEntry(db, "delete from STOCK_V1 where STOCKID = ?"); -} - -void TStockEntry::Update(wxSQLite3Database* db) -{ - try - { - const char SQL_STATEMENT[] = - "update STOCK_V1 set" - " HELDAT = ?, PURCHASEDATE = ?, STOCKNAME = ?, SYMBOL = ?, NUMSHARES = ?," - " PURCHASEPRICE = ?, NOTES = ?, CURRENTPRICE = ?, VALUE = ?, COMMISSION = ? " - "where STOCKID = ?"; - - wxSQLite3Statement st = db->PrepareStatement(SQL_STATEMENT); - int db_index = 0; - SetDatabaseValues(st, db_index); - st.Bind(++db_index, id_); - - FinaliseStatement(st); - } - catch(const wxSQLite3Exception& e) - { - wxLogError("TStockEntry:Update: %s", e.GetMessage().c_str()); - } -} - -wxString TStockEntry::DisplayDate() -{ - return mmGetDateForDisplay(pur_date_); -} - -wxString TStockEntry::NumberOfShares(bool whole_num) -{ - wxString format = "%.4f"; - if (whole_num) - { - format = "%.0f"; - } - return wxString::Format(format, num_shares_); -} - -wxString TStockEntry::CurrentPrice() -{ - return wxString::Format("%.4f", cur_price_); -} - -double TStockEntry::GetValue() -{ - return (cur_price_ * num_shares_) - commission_; -} - -wxString TStockEntry::GetValueCurrencyEditFormat(bool initial_value) -{ - wxString formatted_value; - if (initial_value) formatted_value = CurrencyFormatter::float2String(value_); - else formatted_value = CurrencyFormatter::float2String(GetValue()); - - return formatted_value; -} - -wxString TStockEntry::CommissionCurrencyEditFormat() -{ - wxString formatted_value = CurrencyFormatter::float2String(value_); - return formatted_value; -} - -/************************************************************************************ - TStockList Methods - ***********************************************************************************/ -/// Constructor -TStockList::TStockList(wxSQLite3Database* db, bool load_entries) -: TListBase(db) -{ - LoadEntries(load_entries); -} - -TStockList::~TStockList() -{ - DestroyEntryList(); -} - -void TStockList::LoadEntries(bool load_entries) -{ - try - { - if (!ListDatabase()->TableExists("STOCK_V1")) - { - const char CREATE_TABLE_STOCK_V1[] = - "CREATE TABLE STOCK_V1(STOCKID integer primary key, " - "HELDAT numeric, PURCHASEDATE TEXT NOT NULL, STOCKNAME TEXT, SYMBOL TEXT, " - "NUMSHARES numeric, PURCHASEPRICE numeric NOT NULL, NOTES TEXT, CURRENTPRICE numeric NOT NULL, " - "VALUE numeric, COMMISSION numeric)"; - - ListDatabase()->ExecuteUpdate(CREATE_TABLE_STOCK_V1); - } - - if (load_entries) - { - LoadEntriesUsing("select * from STOCK_V1"); - } - } - catch (const wxSQLite3Exception& e) - { - wxLogError("TStockList::LoadEntries: %s", e.GetMessage().c_str()); - } -} - -void TStockList::LoadEntriesUsing(const wxString& sql_statement) -{ - try - { - DestroyEntryList(); - wxSQLite3ResultSet q1 = ListDatabase()->ExecuteQuery(sql_statement); - while (q1.NextRow()) - { - entrylist_.push_back(new TStockEntry(q1)); - } - q1.Finalize(); - } - catch (const wxSQLite3Exception& e) - { - wxLogError("TStockList::LoadEntriesUsing: %s", e.GetMessage().c_str()); - } -} - -void TStockList::DestroyEntryList() -{ - for (size_t i = 0; i < entrylist_.size(); ++i) - { - delete entrylist_[i]; - } - entrylist_.clear(); -} - -int TStockList::AddEntry(TStockEntry* pEntry) -{ - pEntry->Add(ListDatabase()); - entrylist_.push_back(pEntry); - - return pEntry->id_; -} - -void TStockList::DeleteEntry(int stock_id) -{ - TStockEntry* pEntry = GetEntryPtr(stock_id); - if (pEntry) - { - pEntry->Delete(ListDatabase()); - entrylist_.erase(entrylist_.begin() + current_index_); - delete pEntry; - } -} - -TStockEntry* TStockList::GetEntryPtr(int stock_id) -{ - TStockEntry* pEntry = 0; - size_t index = 0; - - while (index < entrylist_.size()) - { - if (entrylist_[index]->id_ == stock_id) - { - pEntry = entrylist_[index]; - current_index_ = index; - break; - } - ++ index; - } - - return pEntry; -} - -TStockEntry* TStockList::GetIndexedEntryPtr(unsigned int list_index) -{ - TStockEntry* pEntry = 0; - if (list_index < entrylist_.size()) - { - pEntry = entrylist_[list_index]; - } - - return pEntry; -} - -int TStockList::CurrentListSize() -{ - return entrylist_.size(); -} - -double TStockList::GetStockBalance() -{ - double total_value = 0.0; - for (const auto& entry : entrylist_) total_value += entry->value_; - return total_value; -} - -wxString TStockList::GetStockBalanceCurrencyFormat() -{ - return CurrencyFormatter::float2Money(GetStockBalance()); -} - -wxString TStockList::GetStockBalanceCurrencyEditFormat() -{ - return CurrencyFormatter::float2String(GetStockBalance()); -} Deleted: trunk/src/db/stocks.h =================================================================== --- trunk/src/db/stocks.h 2013-07-07 07:58:51 UTC (rev 4312) +++ trunk/src/db/stocks.h 2013-07-07 08:00:17 UTC (rev 4313) @@ -1,98 +0,0 @@ -/******************************************************* - Copyright (C) 2013 Stefano Giorgio - - 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, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - ********************************************************/ - -#pragma once -#include "entry_base.h" - -/************************************************************************************ - Class TStockEntry - ***********************************************************************************/ -class TStockEntry : public TEntryBase -{ -private: - friend class TStockList; // Allows TStockList access to private members - - int Add(wxSQLite3Database* db); - void Delete(wxSQLite3Database* db); - void SetDatabaseValues(wxSQLite3Statement& st, int& db_index); - -public: - int heldat_; // "HELDAT" - wxDateTime pur_date_; // "PURCHASEDATE" - wxString name_; // "STOCKNAME" - wxString symbol_; // "SYMBOL" - double num_shares_; // "NUMSHARES" - double pur_price_; // "PURCHASEPRICE" - wxString notes_; // "NOTES" - double cur_price_; // "CURRENTPRICE" - double value_; // "VALUE" - double commission_; // "COMMISSION" - - /* Constructor used when loading stocks from the database. */ - TStockEntry(wxSQLite3ResultSet& q1); - /* Copy constructor using a pointer */ - TStockEntry(TStockEntry* pEntry); - /* Constructor for creating a new stock entry. */ - TStockEntry(); - - // Updates the existing data to the SQL file. Add to list first. - void Update(wxSQLite3Database* db); - // returns date formated to user requirements. - wxString DisplayDate(); - // returns number of shares formated to 4 decimal places or whole number. - wxString NumberOfShares(bool whole_num = true); - // returns current share price formated to 4 decimal places - wxString CurrentPrice(); - // returns the value based on share price and number of shares - double GetValue(); - wxString GetValueCurrencyEditFormat(bool initial_value = false); - // returns formatted commission value - wxString CommissionCurrencyEditFormat(); -}; - -/************************************************************************************ - Class TStockList - ***********************************************************************************/ -class TStockList : public TListBase -{ -private: - void LoadEntries(bool load_entries = true); - // delete all the objects in the list and clear the list. - void DestroyEntryList(); - -public: - std::vector<TStockEntry*> entrylist_; - - TStockList(wxSQLite3Database* db, bool load_entries = true); - ~TStockList(); - - // Allows specialised list loading provided by SQL statement - void LoadEntriesUsing(const wxString& sql_statement); - - int AddEntry(TStockEntry* pEntry); - void DeleteEntry(int stock_id); - - TStockEntry* GetEntryPtr(int stock_id); - TStockEntry* GetIndexedEntryPtr(unsigned int list_index); - - int CurrentListSize(); - /// return the balance of all the stocks in the list. - double GetStockBalance(); - wxString GetStockBalanceCurrencyFormat(); - wxString GetStockBalanceCurrencyEditFormat(); -}; Modified: trunk/src/tests/Makefile.in =================================================================== --- trunk/src/tests/Makefile.in 2013-07-07 07:58:51 UTC (rev 4312) +++ trunk/src/tests/Makefile.in 2013-07-07 08:00:17 UTC (rev 4313) @@ -189,7 +189,6 @@ mmex_tests_entry_base.o \ mmex_tests_payee_table.o \ mmex_tests_splittransaction.o \ - mmex_tests_stocks.o \ mmex_tests_subcategory.o \ mmex_tests_transaction.o \ mmex_tests_transactionbill.o \ @@ -674,9 +673,6 @@ mmex_tests_splittransaction.o: $(srcdir)/../../src/db/splittransaction.cpp $(CXXC) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(srcdir)/../../src/db/splittransaction.cpp -mmex_tests_stocks.o: $(srcdir)/../../src/db/stocks.cpp - $(CXXC) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(srcdir)/../../src/db/stocks.cpp - mmex_tests_subcategory.o: $(srcdir)/../../src/db/subcategory.cpp $(CXXC) -c -o $@ $(MMEX_TESTS_CXXFLAGS) $(srcdir)/../../src/db/subcategory.cpp This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2013-07-07 12:31:12
|
Revision: 4315 http://sourceforge.net/p/moneymanagerex/code/4315 Author: guanlisheng Date: 2013-07-07 12:31:06 +0000 (Sun, 07 Jul 2013) Log Message: ----------- move python script to uitl Added Paths: ----------- trunk/util/ trunk/util/sqlite2cpp.py Removed Paths: ------------- trunk/src/scripts/sqlite2cpp.py Deleted: trunk/src/scripts/sqlite2cpp.py =================================================================== --- trunk/src/scripts/sqlite2cpp.py 2013-07-07 08:26:13 UTC (rev 4314) +++ trunk/src/scripts/sqlite2cpp.py 2013-07-07 12:31:06 UTC (rev 4315) @@ -1,615 +0,0 @@ -#!/usr/bin/env python -# vi:tabstop=4:expandtab:shiftwidth=4:softtabstop=4:autoindent:smarttab -''' -Usage: python sqlite2cpp.py path_to_sql_file -''' - -import sys -import os -import datetime -import sqlite3 - -# https://github.com/django/django/blob/master/django/db/backends/sqlite3/introspection.py -def get_table_list(cursor): - "Returns a list of table names in the current database." - # Skip the sqlite_sequence system table used for autoincrement key - # generation. - cursor.execute(""" - SELECT name, sql FROM sqlite_master - WHERE type='table' AND NOT name='sqlite_sequence' - ORDER BY name""") - return [(row[0], row[1]) for row in cursor.fetchall()] - - -def _table_info(cursor, name): - cursor.execute('PRAGMA table_info(%s)' % name) - # cid, name, type, notnull, dflt_value, pk - return [{'name': field[1], - 'type': field[2].upper(), - 'null_ok': not field[3], - 'pk': field[5] # undocumented - } for field in cursor.fetchall()] - -base_data_types_reverse = { - 'TEXT': 'wxString', - 'NUMERIC': 'double', - 'INTEGER': 'int', - 'REAL': 'double', - 'BLOB': 'wxString', - 'DATE': 'wxDateTime', -} - -base_data_types_function = { - 'TEXT': 'GetString', - 'NUMERIC': 'GetDouble', - 'INTEGER': 'GetInt', - 'REAL': 'GetDouble', -} - -class DB_Table: - def __init__(self, table, fields): - self._table = table - self._fields = fields - self._primay_key = [field['name'] for field in self._fields if field['pk']][0] - - def generate_class(self, header, sql): - fp = open('DB_Table_' + self._table.title() + '.h', 'w') - fp.write(header + self.to_string(sql)) - fp.close() - - def to_string(self, sql = None): - - s = ''' -#ifndef DB_TABLE_%s_H -#define DB_TABLE_%s_H - -#include "DB_Table.h" - -struct DB_Table_%s : public DB_Table -{ - struct Data; - typedef DB_Table_%s Self; - typedef std::vector<Self::Data> Data_Set; - typedef std::vector<Self::Data*> Cache; - Cache cache_; - ~DB_Table_%s() - { - std::for_each(cache_.begin(), cache_.end(), std::mem_fun(&Data::destroy)); - } -''' % (self._table.upper(), self._table.upper(), self._table, self._table, self._table) - - s += ''' - bool ensure(wxSQLite3Database* db) const - { - if (exists(db)) return true; - - try - { - db->ExecuteUpdate("%s"); - } - catch(const wxSQLite3Exception &e) - { - wxLogError("%s: Exception %%s", e.GetMessage().c_str()); - return false; - } - - return true; - } -''' % (sql.replace('\n', ''), self._table) - - for field in self._fields: - s += ''' - struct %s { wxString name() const { return "%s"; } };''' % (field['name'], field['name']) - - s += ''' - typedef %s PRIMARY;''' % self._primay_key - - s += ''' - enum COLUMN - { - COL_%s = 0''' % self._primay_key.upper() - - for index, name in enumerate([field['name'] for field in self._fields if not field['pk']]): - s += ''' - , COL_%s = %d''' % (name.upper(), index +1) - - s +=''' - }; -''' - s += ''' - std::vector<COLUMN> all_columns() const - { - std::vector<COLUMN> result; - result.push_back(COL_%s);'''% self._primay_key.upper(); - for index, name in enumerate([field['name'] for field in self._fields if not field['pk']]): - s += ''' - result.push_back(COL_%s);''' % name.upper() - - s += ''' - return result; - } -''' - s += ''' - wxString column_to_name(COLUMN col) const - { - switch(col) - { - case COL_%s: return "%s";''' % (self._primay_key.upper(), self._primay_key) - - for index, name in enumerate([field['name'] for field in self._fields if not field['pk']]): - s += ''' - case COL_%s: return "%s";''' %(name.upper(), name) - s +=''' - default: break; - } - - return "UNKNOWN"; - } -''' - s +=''' - COLUMN name_to_column(const wxString& name) const - { - if ("%s" == name) return COL_%s;''' % (self._primay_key, self._primay_key.upper()) - - for index, name in enumerate([field['name'] for field in self._fields if not field['pk']]): - s += ''' - else if ("%s" == name) return COL_%s;''' %(name, name.upper()) - - s += ''' - - return COLUMN(-1); - } - ''' - s += ''' - struct Data - { - Self* view_; - ''' - for field in self._fields: - s += ''' - %s %s;%s''' % (base_data_types_reverse[field['type']], field['name'], field['pk'] and '// primay key' or '') - - s +=''' - int id() const { return %s; } - void id(int id) { %s = id; } -''' % (self._primay_key, self._primay_key) - - s += ''' - Data(Self* view = 0) - { - view_ = view; - ''' - - for field in self._fields: - type = base_data_types_reverse[field['type']] - if type == 'wxString': - continue - elif type == 'double': - s += ''' - %s = 0.0;''' % field['name'] - elif type == 'int': - s += ''' - %s = -1;''' % field['name'] - - - s += ''' - } - - Data(wxSQLite3ResultSet& q, Self* view = 0) - { - view_ = view; - ''' - for field in self._fields: - func = base_data_types_function[field['type']] - s += ''' - %s = q.%s("%s");''' % (field['name'], func, field['name']) - - s += ''' - } -''' - s +=''' - wxString to_string(COLUMN col) const - { - wxString ret = wxEmptyString; - switch(col) - { - case COL_%s: ret << %s; break;''' % (self._primay_key.upper(), self._primay_key) - - for index, name in enumerate([field['name'] for field in self._fields if not field['pk']]): - s += ''' - case COL_%s: ret << %s; break;''' %(name.upper(), name) - s +=''' - default: break; - } - - return ret; - } -''' - s +=''' - wxString to_string(std::vector<COLUMN> columns, const wxString& delimiter = ",") const - { - wxString ret = wxEmptyString; - std::vector<COLUMN>::const_iterator it = columns.begin(); - if (it != columns.end()) ret << to_string(*it); - for ( ; it != columns.end(); ++ it) ret << delimiter << to_string(*it); - - return ret; - } -''' - s += ''' - wxString to_string(const wxString& delimiter = ",") const - { - wxString ret = wxEmptyString; - ret << %s;''' % self._primay_key - - for index, name in enumerate([field['name'] for field in self._fields if not field['pk']]): - s += ''' - ret << delimiter << %s;''' % name - - s +=''' - return ret; - } -''' - s += ''' - bool save(wxSQLite3Database* db) - { - if (!view_ || !db) - { - wxLogError("can not save"); - return false; - } - - return view_->save(this, db); - } - - bool remove(wxSQLite3Database* db) - { - if (!view_ || !db) - { - wxLogError("can not remove"); - return false; - } - - return view_->remove(this, db); - } - - void destroy() { delete this; } - }; -''' - s +=''' - enum - { - NUM_COLUMNS = %d - }; - - size_t num_columns() const { return NUM_COLUMNS; } -''' % len(self._fields) - - s += ''' - wxString name() const { return "%s"; } -''' % self._table - - s +=''' - DB_Table_%s() - { - query_ = "SELECT %s FROM %s "; - } -''' % (self._table, ', '.join([field['name'] for field in self._fields]), self._table) - - s +=''' - Self::Data* create() - { - Self::Data* entity = new Self::Data(this); - cache_.push_back(entity); - return entity; - } -''' - s +=''' - bool save(Self::Data* entity, wxSQLite3Database* db) - { - wxString sql = wxEmptyString; - if (entity->id() < 0) // new & insert - { - sql = "INSERT INTO %s(%s) VALUES(%s)"; - }''' % (self._table, ', '.join([field['name'] for field in self._fields if not field['pk']]), ', '.join(['?' for field in self._fields if not field['pk']])) - - s +=''' - else - { - sql = "UPDATE %s SET %s WHERE %s = ?"; - } - - try - { - wxSQLite3Statement stmt = db->PrepareStatement(sql); -''' % (self._table, ', '.join([field['name'] + ' = ?' for field in self._fields if not field['pk']]), self._primay_key) - - for index, name in enumerate([field['name'] for field in self._fields if not field['pk']]): - s +=''' - stmt.Bind(%d, entity->%s);'''% (index + 1, name) - - - s +=''' - if (entity->id() > 0) - stmt.Bind(%d, entity->%s); - - stmt.ExecuteUpdate(); - stmt.Finalize(); - } - catch(const wxSQLite3Exception &e) - { - wxLogError("%s: Exception %%s", e.GetMessage().c_str()); - return false; - } - - if (entity->id() < 0) entity->id((db->GetLastRowId()).ToLong()); - return true; - } -''' % (len(self._fields), self._primay_key, self._table) - s +=''' - - bool remove(int id, wxSQLite3Database* db) - { - try - { - wxString sql = "DELETE FROM %s WHERE %s = ?"; - wxSQLite3Statement stmt = db->PrepareStatement(sql); - stmt.Bind(1, id); - stmt.ExecuteUpdate(); - stmt.Finalize(); - - Cache c; - for(Cache::iterator it = cache_.begin(); it != cache_.end(); ++ it) - { - Self::Data* entity = *it; - if (entity->id() == id) - delete entity; - else - c.push_back(entity); - } - cache_.clear(); - cache_.swap(c); - } - catch(const wxSQLite3Exception &e) - { - wxLogError("%s: Exception %%s", e.GetMessage().c_str()); - return false; - } - - return true; - } - - bool remove(Self::Data* entity, wxSQLite3Database* db) - { - if (remove(entity->id(), db)) - { - entity->id(-1); - return true; - } - - return false; - } -''' % (self._table, self._primay_key, self._table) - - s +=''' - - Self::Data* get(int id, wxSQLite3Database* db) - { - for(Cache::iterator it = cache_.begin(); it != cache_.end(); ++ it) - { - Self::Data* entity = *it; - if (entity->id() == id) - return entity; - } - - Self::Data* entity = 0; - wxString where = wxString::Format(" WHERE %s = ?"); - try - { - wxSQLite3Statement stmt = db->PrepareStatement(this->query() + where); - stmt.Bind(1, id); - - wxSQLite3ResultSet q = stmt.ExecuteQuery(); - if(q.NextRow()) - { - entity = new Self::Data(q, this); - cache_.push_back(entity); - } - stmt.Finalize(); - } - catch(const wxSQLite3Exception &e) - { - wxLogError("%s: Exception %%s", e.GetMessage().c_str()); - } - - return entity; - } -''' % (self._primay_key, self._table) - - s +=''' - template<class V> - Data_Set find(wxSQLite3Database* db, COLUMN col, const V& v) - { - Data_Set result; - try - { - wxSQLite3Statement stmt = db->PrepareStatement(this->query() + " WHERE " - + column_to_name(col) + " = ?" - + " ORDER BY " + column_to_name(col) - ); - stmt.Bind(1, v); - wxSQLite3ResultSet q = stmt.ExecuteQuery(); - - while(q.NextRow()) - { - Self::Data entity(q, this); - result.push_back(entity); - } - - q.Finalize(); - } - catch(const wxSQLite3Exception &e) - { - wxLogError("%s: Exception %%s", e.GetMessage().c_str()); - } - - return result; - } -''' % self._table - - s +=''' - template<class V1, class V2> - Data_Set find(wxSQLite3Database* db, COLUMN col1, const V1& v1, COLUMN col2, const V2& v2, bool op_and = true) - { - Data_Set result; - try - { - wxSQLite3Statement stmt = db->PrepareStatement(this->query() + " WHERE " - + column_to_name(col1) + " = ? " - + (op_and ? " AND " : " OR ") - + column_to_name(col2) + " = ?" - + " ORDER BY " + column_to_name(col1) - + "," + column_to_name(col2) - ); - stmt.Bind(1, v1); - stmt.Bind(2, v2); - wxSQLite3ResultSet q = stmt.ExecuteQuery(); - - while(q.NextRow()) - { - Self::Data entity(q, this); - result.push_back(entity); - } - - q.Finalize(); - } - catch(const wxSQLite3Exception &e) - { - wxLogError("%s: Exception %%s", e.GetMessage().c_str()); - } - - return result; - } -''' % self._table - - s +=''' - Data_Set all(wxSQLite3Database* db, COLUMN col = COLUMN(0), bool asc = true) - { - Data_Set result; - PRIMARY primay; - try - { - wxSQLite3ResultSet q = db->ExecuteQuery(this->query() + " ORDER BY " + column_to_name(col) + (asc ? " ASC " : " DESC ") - + "," + primay.name()); - - while(q.NextRow()) - { - Self::Data entity(q, this); - result.push_back(entity); - } - - q.Finalize(); - } - catch(const wxSQLite3Exception &e) - { - wxLogError("%s: Exception %%s", e.GetMessage().c_str()); - } - - return result; - } -''' % self._table - - - s += ''' -}; -#endif // -''' - return s - -def generate_base_class(header): - fp = open('DB_Table.h', 'w') - code = header + ''' -#ifndef DB_TABLE_H -#define DB_TABLE_H - -#include <vector> -#include <map> -#include <algorithm> -#include <functional> -#include <wx/wxsqlite3.h> - -class wxString; - -struct DB_Table -{ - DB_Table() {}; - virtual ~DB_Table() {}; - wxString query_; - virtual wxString query() const { return this->query_; } - virtual size_t num_columns() const = 0; - virtual wxString name() const = 0; - - bool exists(wxSQLite3Database* db) const - { - return db->TableExists(this->name()); - } - - virtual void begin(wxSQLite3Database* db) const - { - db->Begin(); - } - - virtual void commit(wxSQLite3Database* db) const - { - db->Commit(); - } -}; -#endif // -''' - fp = open('db_table.h', 'w') - fp.write(code) - fp.close - -if __name__ == '__main__': - header = '''// -*- C++ -*- -//============================================================================= -/** - * Copyright (c) 2013 Guan Lisheng (gua...@gm...) - * - * @file - * - * @author [%s] - * - * @brief - * - * Revision History: - * AUTO GENERATED at %s. - * DO NOT EDIT! - */ -//============================================================================= -'''% (os.path.basename(__file__), str(datetime.datetime.now())) - - generate_base_class(header) - conn, cur, sql_file = None, None, None - try: - sql_file = sys.argv[1] - conn = sqlite3.connect(":memory:") - conn.row_factory = sqlite3.Row - cur = conn.cursor() - except: - print __doc__ - sys.exit(1) - - sql = "" - for line in open(sql_file, 'rb'): - sql = sql + line; - - cur.executescript(sql) - - for table, sql in get_table_list(cur): - fields = _table_info(cur, table) - view = DB_Table(table, fields) - view.generate_class(header, sql) - - conn.close() - Copied: trunk/util/sqlite2cpp.py (from rev 4314, trunk/src/scripts/sqlite2cpp.py) =================================================================== --- trunk/util/sqlite2cpp.py (rev 0) +++ trunk/util/sqlite2cpp.py 2013-07-07 12:31:06 UTC (rev 4315) @@ -0,0 +1,615 @@ +#!/usr/bin/env python +# vi:tabstop=4:expandtab:shiftwidth=4:softtabstop=4:autoindent:smarttab +''' +Usage: python sqlite2cpp.py path_to_sql_file +''' + +import sys +import os +import datetime +import sqlite3 + +# https://github.com/django/django/blob/master/django/db/backends/sqlite3/introspection.py +def get_table_list(cursor): + "Returns a list of table names in the current database." + # Skip the sqlite_sequence system table used for autoincrement key + # generation. + cursor.execute(""" + SELECT name, sql FROM sqlite_master + WHERE type='table' AND NOT name='sqlite_sequence' + ORDER BY name""") + return [(row[0], row[1]) for row in cursor.fetchall()] + + +def _table_info(cursor, name): + cursor.execute('PRAGMA table_info(%s)' % name) + # cid, name, type, notnull, dflt_value, pk + return [{'name': field[1], + 'type': field[2].upper(), + 'null_ok': not field[3], + 'pk': field[5] # undocumented + } for field in cursor.fetchall()] + +base_data_types_reverse = { + 'TEXT': 'wxString', + 'NUMERIC': 'double', + 'INTEGER': 'int', + 'REAL': 'double', + 'BLOB': 'wxString', + 'DATE': 'wxDateTime', +} + +base_data_types_function = { + 'TEXT': 'GetString', + 'NUMERIC': 'GetDouble', + 'INTEGER': 'GetInt', + 'REAL': 'GetDouble', +} + +class DB_Table: + def __init__(self, table, fields): + self._table = table + self._fields = fields + self._primay_key = [field['name'] for field in self._fields if field['pk']][0] + + def generate_class(self, header, sql): + fp = open('DB_Table_' + self._table.title() + '.h', 'w') + fp.write(header + self.to_string(sql)) + fp.close() + + def to_string(self, sql = None): + + s = ''' +#ifndef DB_TABLE_%s_H +#define DB_TABLE_%s_H + +#include "DB_Table.h" + +struct DB_Table_%s : public DB_Table +{ + struct Data; + typedef DB_Table_%s Self; + typedef std::vector<Self::Data> Data_Set; + typedef std::vector<Self::Data*> Cache; + Cache cache_; + ~DB_Table_%s() + { + std::for_each(cache_.begin(), cache_.end(), std::mem_fun(&Data::destroy)); + } +''' % (self._table.upper(), self._table.upper(), self._table, self._table, self._table) + + s += ''' + bool ensure(wxSQLite3Database* db) const + { + if (exists(db)) return true; + + try + { + db->ExecuteUpdate("%s"); + } + catch(const wxSQLite3Exception &e) + { + wxLogError("%s: Exception %%s", e.GetMessage().c_str()); + return false; + } + + return true; + } +''' % (sql.replace('\n', ''), self._table) + + for field in self._fields: + s += ''' + struct %s { wxString name() const { return "%s"; } };''' % (field['name'], field['name']) + + s += ''' + typedef %s PRIMARY;''' % self._primay_key + + s += ''' + enum COLUMN + { + COL_%s = 0''' % self._primay_key.upper() + + for index, name in enumerate([field['name'] for field in self._fields if not field['pk']]): + s += ''' + , COL_%s = %d''' % (name.upper(), index +1) + + s +=''' + }; +''' + s += ''' + std::vector<COLUMN> all_columns() const + { + std::vector<COLUMN> result; + result.push_back(COL_%s);'''% self._primay_key.upper(); + for index, name in enumerate([field['name'] for field in self._fields if not field['pk']]): + s += ''' + result.push_back(COL_%s);''' % name.upper() + + s += ''' + return result; + } +''' + s += ''' + wxString column_to_name(COLUMN col) const + { + switch(col) + { + case COL_%s: return "%s";''' % (self._primay_key.upper(), self._primay_key) + + for index, name in enumerate([field['name'] for field in self._fields if not field['pk']]): + s += ''' + case COL_%s: return "%s";''' %(name.upper(), name) + s +=''' + default: break; + } + + return "UNKNOWN"; + } +''' + s +=''' + COLUMN name_to_column(const wxString& name) const + { + if ("%s" == name) return COL_%s;''' % (self._primay_key, self._primay_key.upper()) + + for index, name in enumerate([field['name'] for field in self._fields if not field['pk']]): + s += ''' + else if ("%s" == name) return COL_%s;''' %(name, name.upper()) + + s += ''' + + return COLUMN(-1); + } + ''' + s += ''' + struct Data + { + Self* view_; + ''' + for field in self._fields: + s += ''' + %s %s;%s''' % (base_data_types_reverse[field['type']], field['name'], field['pk'] and '// primay key' or '') + + s +=''' + int id() const { return %s; } + void id(int id) { %s = id; } +''' % (self._primay_key, self._primay_key) + + s += ''' + Data(Self* view = 0) + { + view_ = view; + ''' + + for field in self._fields: + type = base_data_types_reverse[field['type']] + if type == 'wxString': + continue + elif type == 'double': + s += ''' + %s = 0.0;''' % field['name'] + elif type == 'int': + s += ''' + %s = -1;''' % field['name'] + + + s += ''' + } + + Data(wxSQLite3ResultSet& q, Self* view = 0) + { + view_ = view; + ''' + for field in self._fields: + func = base_data_types_function[field['type']] + s += ''' + %s = q.%s("%s");''' % (field['name'], func, field['name']) + + s += ''' + } +''' + s +=''' + wxString to_string(COLUMN col) const + { + wxString ret = wxEmptyString; + switch(col) + { + case COL_%s: ret << %s; break;''' % (self._primay_key.upper(), self._primay_key) + + for index, name in enumerate([field['name'] for field in self._fields if not field['pk']]): + s += ''' + case COL_%s: ret << %s; break;''' %(name.upper(), name) + s +=''' + default: break; + } + + return ret; + } +''' + s +=''' + wxString to_string(std::vector<COLUMN> columns, const wxString& delimiter = ",") const + { + wxString ret = wxEmptyString; + std::vector<COLUMN>::const_iterator it = columns.begin(); + if (it != columns.end()) ret << to_string(*it); + for ( ; it != columns.end(); ++ it) ret << delimiter << to_string(*it); + + return ret; + } +''' + s += ''' + wxString to_string(const wxString& delimiter = ",") const + { + wxString ret = wxEmptyString; + ret << %s;''' % self._primay_key + + for index, name in enumerate([field['name'] for field in self._fields if not field['pk']]): + s += ''' + ret << delimiter << %s;''' % name + + s +=''' + return ret; + } +''' + s += ''' + bool save(wxSQLite3Database* db) + { + if (!view_ || !db) + { + wxLogError("can not save"); + return false; + } + + return view_->save(this, db); + } + + bool remove(wxSQLite3Database* db) + { + if (!view_ || !db) + { + wxLogError("can not remove"); + return false; + } + + return view_->remove(this, db); + } + + void destroy() { delete this; } + }; +''' + s +=''' + enum + { + NUM_COLUMNS = %d + }; + + size_t num_columns() const { return NUM_COLUMNS; } +''' % len(self._fields) + + s += ''' + wxString name() const { return "%s"; } +''' % self._table + + s +=''' + DB_Table_%s() + { + query_ = "SELECT %s FROM %s "; + } +''' % (self._table, ', '.join([field['name'] for field in self._fields]), self._table) + + s +=''' + Self::Data* create() + { + Self::Data* entity = new Self::Data(this); + cache_.push_back(entity); + return entity; + } +''' + s +=''' + bool save(Self::Data* entity, wxSQLite3Database* db) + { + wxString sql = wxEmptyString; + if (entity->id() < 0) // new & insert + { + sql = "INSERT INTO %s(%s) VALUES(%s)"; + }''' % (self._table, ', '.join([field['name'] for field in self._fields if not field['pk']]), ', '.join(['?' for field in self._fields if not field['pk']])) + + s +=''' + else + { + sql = "UPDATE %s SET %s WHERE %s = ?"; + } + + try + { + wxSQLite3Statement stmt = db->PrepareStatement(sql); +''' % (self._table, ', '.join([field['name'] + ' = ?' for field in self._fields if not field['pk']]), self._primay_key) + + for index, name in enumerate([field['name'] for field in self._fields if not field['pk']]): + s +=''' + stmt.Bind(%d, entity->%s);'''% (index + 1, name) + + + s +=''' + if (entity->id() > 0) + stmt.Bind(%d, entity->%s); + + stmt.ExecuteUpdate(); + stmt.Finalize(); + } + catch(const wxSQLite3Exception &e) + { + wxLogError("%s: Exception %%s", e.GetMessage().c_str()); + return false; + } + + if (entity->id() < 0) entity->id((db->GetLastRowId()).ToLong()); + return true; + } +''' % (len(self._fields), self._primay_key, self._table) + s +=''' + + bool remove(int id, wxSQLite3Database* db) + { + try + { + wxString sql = "DELETE FROM %s WHERE %s = ?"; + wxSQLite3Statement stmt = db->PrepareStatement(sql); + stmt.Bind(1, id); + stmt.ExecuteUpdate(); + stmt.Finalize(); + + Cache c; + for(Cache::iterator it = cache_.begin(); it != cache_.end(); ++ it) + { + Self::Data* entity = *it; + if (entity->id() == id) + delete entity; + else + c.push_back(entity); + } + cache_.clear(); + cache_.swap(c); + } + catch(const wxSQLite3Exception &e) + { + wxLogError("%s: Exception %%s", e.GetMessage().c_str()); + return false; + } + + return true; + } + + bool remove(Self::Data* entity, wxSQLite3Database* db) + { + if (remove(entity->id(), db)) + { + entity->id(-1); + return true; + } + + return false; + } +''' % (self._table, self._primay_key, self._table) + + s +=''' + + Self::Data* get(int id, wxSQLite3Database* db) + { + for(Cache::iterator it = cache_.begin(); it != cache_.end(); ++ it) + { + Self::Data* entity = *it; + if (entity->id() == id) + return entity; + } + + Self::Data* entity = 0; + wxString where = wxString::Format(" WHERE %s = ?"); + try + { + wxSQLite3Statement stmt = db->PrepareStatement(this->query() + where); + stmt.Bind(1, id); + + wxSQLite3ResultSet q = stmt.ExecuteQuery(); + if(q.NextRow()) + { + entity = new Self::Data(q, this); + cache_.push_back(entity); + } + stmt.Finalize(); + } + catch(const wxSQLite3Exception &e) + { + wxLogError("%s: Exception %%s", e.GetMessage().c_str()); + } + + return entity; + } +''' % (self._primay_key, self._table) + + s +=''' + template<class V> + Data_Set find(wxSQLite3Database* db, COLUMN col, const V& v) + { + Data_Set result; + try + { + wxSQLite3Statement stmt = db->PrepareStatement(this->query() + " WHERE " + + column_to_name(col) + " = ?" + + " ORDER BY " + column_to_name(col) + ); + stmt.Bind(1, v); + wxSQLite3ResultSet q = stmt.ExecuteQuery(); + + while(q.NextRow()) + { + Self::Data entity(q, this); + result.push_back(entity); + } + + q.Finalize(); + } + catch(const wxSQLite3Exception &e) + { + wxLogError("%s: Exception %%s", e.GetMessage().c_str()); + } + + return result; + } +''' % self._table + + s +=''' + template<class V1, class V2> + Data_Set find(wxSQLite3Database* db, COLUMN col1, const V1& v1, COLUMN col2, const V2& v2, bool op_and = true) + { + Data_Set result; + try + { + wxSQLite3Statement stmt = db->PrepareStatement(this->query() + " WHERE " + + column_to_name(col1) + " = ? " + + (op_and ? " AND " : " OR ") + + column_to_name(col2) + " = ?" + + " ORDER BY " + column_to_name(col1) + + "," + column_to_name(col2) + ); + stmt.Bind(1, v1); + stmt.Bind(2, v2); + wxSQLite3ResultSet q = stmt.ExecuteQuery(); + + while(q.NextRow()) + { + Self::Data entity(q, this); + result.push_back(entity); + } + + q.Finalize(); + } + catch(const wxSQLite3Exception &e) + { + wxLogError("%s: Exception %%s", e.GetMessage().c_str()); + } + + return result; + } +''' % self._table + + s +=''' + Data_Set all(wxSQLite3Database* db, COLUMN col = COLUMN(0), bool asc = true) + { + Data_Set result; + PRIMARY primay; + try + { + wxSQLite3ResultSet q = db->ExecuteQuery(this->query() + " ORDER BY " + column_to_name(col) + (asc ? " ASC " : " DESC ") + + "," + primay.name()); + + while(q.NextRow()) + { + Self::Data entity(q, this); + result.push_back(entity); + } + + q.Finalize(); + } + catch(const wxSQLite3Exception &e) + { + wxLogError("%s: Exception %%s", e.GetMessage().c_str()); + } + + return result; + } +''' % self._table + + + s += ''' +}; +#endif // +''' + return s + +def generate_base_class(header): + fp = open('DB_Table.h', 'w') + code = header + ''' +#ifndef DB_TABLE_H +#define DB_TABLE_H + +#include <vector> +#include <map> +#include <algorithm> +#include <functional> +#include <wx/wxsqlite3.h> + +class wxString; + +struct DB_Table +{ + DB_Table() {}; + virtual ~DB_Table() {}; + wxString query_; + virtual wxString query() const { return this->query_; } + virtual size_t num_columns() const = 0; + virtual wxString name() const = 0; + + bool exists(wxSQLite3Database* db) const + { + return db->TableExists(this->name()); + } + + virtual void begin(wxSQLite3Database* db) const + { + db->Begin(); + } + + virtual void commit(wxSQLite3Database* db) const + { + db->Commit(); + } +}; +#endif // +''' + fp = open('db_table.h', 'w') + fp.write(code) + fp.close + +if __name__ == '__main__': + header = '''// -*- C++ -*- +//============================================================================= +/** + * Copyright (c) 2013 Guan Lisheng (gua...@gm...) + * + * @file + * + * @author [%s] + * + * @brief + * + * Revision History: + * AUTO GENERATED at %s. + * DO NOT EDIT! + */ +//============================================================================= +'''% (os.path.basename(__file__), str(datetime.datetime.now())) + + generate_base_class(header) + conn, cur, sql_file = None, None, None + try: + sql_file = sys.argv[1] + conn = sqlite3.connect(":memory:") + conn.row_factory = sqlite3.Row + cur = conn.cursor() + except: + print __doc__ + sys.exit(1) + + sql = "" + for line in open(sql_file, 'rb'): + sql = sql + line; + + cur.executescript(sql) + + for table, sql in get_table_list(cur): + fields = _table_info(cur, table) + view = DB_Table(table, fields) + view.generate_class(header, sql) + + conn.close() + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |