Coming changes in trunk

Money Manager Ex Development related posts for both Android and Desktop

Moderator: Renato

Vadim
Super MMEX User
Posts: 142
Joined: Mon Aug 03, 2009 7:35 am
Are you a spam bot?: No

Coming changes in trunk

Post by Vadim »

Hi everyone,
It is time for next portion of changes in sources :-)

First of all I don't like mmex\runtime directory. So, its content will be moved to anothers directories and mmex\runtime will be deleted. I have already moved mmex\runtime\en to mmex\i18n. The same very soon will happen with remaining files. All .txt files go to docs or may be another dir, graphics files to mmex\graphics. I will change InnoSetup script to get these files from its new locations. Mac developers should change theirs scripts accordingly.

The mmex\runtime is obsolete because we have InnoSetup script which can get files from any location and because build scripts now have install\uninstall targets. So, you can do
make
make install
and get cogerent mmex's folder. The mmex\build\msw\config.* scripts have new option "prefix" which default is C:\opt. So, mmex will be installed to C:\opt\mmex. If you type "make install PREFIX=D:\some_folder", the mmex will be installed to D:\some_folder\mmex.


The " make install" supports even on Windows. If you want to debug mmex, you can "make install" once and run mmex from installation dir. Or you can build and run setup and later just copy new executable to this folder before new debug session.
Vadim
Super MMEX User
Posts: 142
Joined: Mon Aug 03, 2009 7:35 am
Are you a spam bot?: No

Re: Coming changes in trunk

Post by Vadim »

But the most important coming thing is change of structure of directories in mmex's installation folder.

I want these folders on Windows:
C:\Program Files\MoneyManagerEx <-- installation dir
bin\mmex.exe, *.dll <-- executable and VC++ or MinGW runtime dll-s will be here
help\ <-- all html help files (no changes here)
resources\ <-- here can be icons and others graphics files
the rest of files (*.txt) can be in root of dir or in the docs\ folder.
mmexini.db3 <-- will be in %APPDATA%\MoneyManagerEx
user's database <-- default will be in %APPDATA%\MoneyManagerEx

On Linux files go to completely different directories.
/usr/bin/mmex <-- executable
/usr/share/doc/mmex-0.X.X <-- all documentation
/usr/lib/mmex/ <-- rest of files
%HOME%/.mmex/mmexini.db3 <-- program's settings
%HOME%/.mmex/database.mmb <-- default for users' data file
Vadim
Super MMEX User
Posts: 142
Joined: Mon Aug 03, 2009 7:35 am
Are you a spam bot?: No

Re: Coming changes in trunk

Post by Vadim »

So, we need new API to get locations of such files as icons, help, mmexini.db3, etc. I will create this API, this is next target of my development efforts. Surely, this API will have common declaration of some functions in .h file and independents implementations in .cpp files for Win, Unix & Mac. No more #ifdef in sources!!!
elliswr
Super MMEX User
Posts: 102
Joined: Tue May 05, 2009 8:21 am
Are you a spam bot?: No
Location: Granbury, TX

Re: Coming changes in trunk

Post by elliswr »

On Mac:
/MMEX.app/Contents/MacOS/mmex <-- executable
/MMEX.app/Contents/doc <-- all documentation
/MMEX.app/Contents/Resources <-- rest of files
%HOME%/Library/Preferences/mmex/mmexini.db3 <-- program's settings
%HOME%/database.mmb <-- default for users' data file
Vadim
Super MMEX User
Posts: 142
Joined: Mon Aug 03, 2009 7:35 am
Are you a spam bot?: No

Re: Coming changes in trunk

Post by Vadim »

The change of installation dirs is absolutely necessary for such task as rpm build on Linux. I have completed spec file (mmex\setup\linux\rpm\mmex.spec) for building mmex's rpm. The right way of distribution of mmex is higly important task for us. The right way is RPM on Fedora, OpenSUSE and some others distributions on Linux, .deb package on Debian systems (Ubuntu, Kubunty, etc). MMEX will never be included in official release of any Linux distribution if we don't release official rpm-s and .deb-s. The our aim is any distribution of Linux should contain mmex among set of software on installation DVD.

So, we can build rpm now. But we have a problem with installation dir. /usr or /usr/local or /opt usually use to install software. So, /usr/lib/mmex. But what with mmexini.db3? User will not have rights to modify this file in /usr/lib/mmex/mmexini.db3. The same thing with database.

The same thing on Windows. We have to install mmex to %USERPROFILE% instead of "C:\Program Files". Thus, the change of structure of installed dirs is necessary.
elliswr
Super MMEX User
Posts: 102
Joined: Tue May 05, 2009 8:21 am
Are you a spam bot?: No
Location: Granbury, TX

Re: Coming changes in trunk

Post by elliswr »

%HOME%/.mmex/mmexini.db3 <-- program's settings
%HOME%/.mmex/database.mmb <-- default for users' data file
Vadim
MMEX Developer

Posts: 126
Joined: Mon Aug 03, 2009 3:35 am
You don't need to put mmexini.db3 in /usr/local or /usr/lib, just put it as above in ~/.mmex/mmexini.db3
Vadim
Super MMEX User
Posts: 142
Joined: Mon Aug 03, 2009 7:35 am
Are you a spam bot?: No

Re: Coming changes in trunk

Post by Vadim »

Surely, but current version of program finds files in its own directory. We must change the program also.
elliswr
Super MMEX User
Posts: 102
Joined: Tue May 05, 2009 8:21 am
Are you a spam bot?: No
Location: Granbury, TX

Re: Coming changes in trunk

Post by elliswr »

Now might be a great time then to look at changing all the filepaths to wxStandardPaths. For mmexini.db3 we could use this:

Code: Select all

wxStandardPaths::GetUserConfigDir
wxString GetUserConfigDir()

Return the directory for the user config files:

Unix: ~ (the home directory)
Windows: C:\Documents and Settings\username
Mac: ~/Library/Preferences
Only use this method if you have a single configuration file to put in this directory, otherwise GetUserDataDir() is more appropriate.
So our program code would change to:

Code: Select all

const wxChar *MMEX_INIDB_FNAME = wxStandardPaths::GetUserConfigDir() + wxT("/mmex/mmexini.db3");
And now the program would expect mmexini.db3 to be in:
~/mmex/mmexini.db3 (Linux)
~/Library/Preferences/mmex (Mac)
C:\Documents and Settings\username\mmex\mmexini.db3 (Win)
elliswr
Super MMEX User
Posts: 102
Joined: Tue May 05, 2009 8:21 am
Are you a spam bot?: No
Location: Granbury, TX

Re: Coming changes in trunk

Post by elliswr »

Quick question in regards to getting MMEX pre-installed on some linux distributions. wxWidgets is an intermediate to gtk right? I mean there is a wxMac, wxMSW, and wxGTK, but there is no wxQt. So mmex can only be built for the Gnome Desktop Environment right?
Vadim
Super MMEX User
Posts: 142
Joined: Mon Aug 03, 2009 7:35 am
Are you a spam bot?: No

Re: Coming changes in trunk

Post by Vadim »

It is requires libgtk-dev to build mmex. But mmex can run if GNOME runtime libraries installed.
Post Reply