Coming changes in trunk

20 posts
Coming changes in trunk

Vadim
MMEX Developer

Posts: 159
Joined: Mon Aug 03, 2009 1:35 am
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.
Re: Coming changes in trunk

Vadim
MMEX Developer

Posts: 159
Joined: Mon Aug 03, 2009 1:35 am
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
Re: Coming changes in trunk

Vadim
MMEX Developer

Posts: 159
Joined: Mon Aug 03, 2009 1:35 am
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!!!
Re: Coming changes in trunk

elliswr
MMEX Developer

Posts: 151
Joined: Tue May 05, 2009 2:21 am
Location: Granbury, TX
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
Re: Coming changes in trunk

Vadim
MMEX Developer

Posts: 159
Joined: Mon Aug 03, 2009 1:35 am
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.
Re: Coming changes in trunk

elliswr
MMEX Developer

Posts: 151
Joined: Tue May 05, 2009 2:21 am
Location: Granbury, TX
%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
Re: Coming changes in trunk

Vadim
MMEX Developer

Posts: 159
Joined: Mon Aug 03, 2009 1:35 am
Surely, but current version of program finds files in its own directory. We must change the program also.
Re: Coming changes in trunk

elliswr
MMEX Developer

Posts: 151
Joined: Tue May 05, 2009 2:21 am
Location: Granbury, TX
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)
Re: Coming changes in trunk

elliswr
MMEX Developer

Posts: 151
Joined: Tue May 05, 2009 2:21 am
Location: Granbury, TX
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?
Re: Coming changes in trunk

Vadim
MMEX Developer

Posts: 159
Joined: Mon Aug 03, 2009 1:35 am
It is requires libgtk-dev to build mmex. But mmex can run if GNOME runtime libraries installed.
Who is online

Users browsing this forum: No registered users and 10 guests

cron