compiling mmex for mac

MMEX4Desktop, incl. Windows, macOS (10.10 or newer), and Most Unix variants using the GTK+ toolkit

Moderator: Renato

Post Reply
xraynaud
New User
Posts: 15
Joined: Sun Sep 28, 2014 5:25 pm
Are you a spam bot?: No

compiling mmex for mac

Post by xraynaud »

Hello, 
I'm trying to compile mmex from git master repository on my mac. The compilation went well despite a few warning and the program is running. However, the "home page" and reports do not show up (all I have is a white page, with sometimes a menu on top as with the "My Usage" report. If I switch the webserver on and go to 127.0.0.1:8080, I get the "home page" report, as expected, so the html pages seems to be correctly generated, but are not showing up the mmex.

Does anybody has an idea why this doesn't work in mmex ? Are there logs written somewhere ? I cannot find them on my computer. If i launch mmex from the command line, I get a warning I don't understand:

2016-02-17 19:21:57.207 MMEX[64239:1267895] NSDocumentController Info.plist warning: The values of CFBundleTypeRole entries must be 'Editor', 'Viewer', 'None', or 'Shell'.

Thanks.  
Nikolay
Developer
Posts: 1535
Joined: Sat Dec 06, 2008 2:27 pm
Are you a spam bot?: No
Location: Sankt-Petersburg, Russia

Re: compiling mmex for mac

Post by Nikolay »

I don't know how to help here. But in Windows mmex reports rendering depends of Internet Explorer. 
May be in your case son thing wrong with internet browser. Or may be MS Internet Explorer needed.
xraynaud
New User
Posts: 15
Joined: Sun Sep 28, 2014 5:25 pm
Are you a spam bot?: No

Re: compiling mmex for mac

Post by xraynaud »

Thanks for your quick reply, Nikolay, mmex 1.2.5 from github release works without problem on my computer. I wanted to test a few things on the code, that's why I'd like to be able to compile the program.

Do you know if there's a way to make mmex log to a file what's happening while starting up ? 

Thanks, 
Nikolay
Developer
Posts: 1535
Joined: Sat Dec 06, 2008 2:27 pm
Are you a spam bot?: No
Location: Sankt-Petersburg, Russia

Re: compiling mmex for mac

Post by Nikolay »

There are some wxLogDebug in the code for debuting but I don't know how to logging errors. I am using Debug build and breakpoints for debuging.
omalleypat
Super User
Posts: 112
Joined: Tue Jul 28, 2009 10:34 pm
Are you a spam bot?: No
Location: Atchison, KS

Re: compiling mmex for mac

Post by omalleypat »

xraynaud -

Just wanted to make sure you found the mac build wiki page. See especially the mmex configure line since it seems like you got most everything else going.

I'm guessing your app bundle doesn't have the correct folder structure. Mine looks like this:

Code: Select all

mmex.app/
└── Contents
    ├── Info.plist
    ├── MacOS
    │   └── MMEX
    ├── Resources
    │   ├── mmdb.icns
    │   └── mmex.icns
    └── SharedSupport
        ├── applications
        │   └── mmex.desktop
        ├── contrib.txt
        ├── doc
        │   └── mmex
        │       ├── contrib.txt
        │       ├── help
        │       │   ├── GRM.gif
        │       │   ├── btn_donateCC_LG.gif
        │       │   ├── budget.html
        │       │   ├── budget_editor.png
        │       │   ├── budget_entry_details.png
        │       │   ├── budget_grid.png
        │       │   ├── french
        │       │   │   ├── account.jpg
        │       │   │   ├── add_acc_wizard1.jpg
        │       │   │   ├── add_acc_wizard2.jpg
        │       │   │   ├── add_acc_wizard3.jpg
        │       │   │   ├── index.html
        │       │   │   ├── investment.html
        │       │   │   ├── main_screen.jpg
        │       │   │   └── mmex_concept.png
        │       │   ├── general_report_manager.html
        │       │   ├── hungarian
        │       │   │   ├── budget.html
        │       │   │   ├── index.html
        │       │   │   ├── investment.html
        │       │   │   └── mmex_concept_hu.png
        │       │   ├── index.html
        │       │   ├── investment.html
        │       │   ├── italian
        │       │   │   ├── index.html
        │       │   │   ├── investment.html
        │       │   │   ├── mmex_concept.png
        │       │   │   ├── stock_dialog.jpg
        │       │   │   ├── stock_options.jpg
        │       │   │   └── stock_view.jpg
        │       │   ├── mmex_concept.png
        │       │   ├── mmex_db_structure.png
        │       │   ├── polish
        │       │   │   ├── GRM.gif
        │       │   │   ├── btn_donateCC_LG.gif
        │       │   │   ├── budget.html
        │       │   │   ├── budget_editor.png
        │       │   │   ├── budget_entry_details.png
        │       │   │   ├── budget_grid.png
        │       │   │   ├── general_report_manager.html
        │       │   │   ├── index.html
        │       │   │   ├── investment.html
        │       │   │   ├── mmex_concept.png
        │       │   │   ├── mmex_structure.jpg
        │       │   │   ├── stock_dialog.jpg
        │       │   │   ├── stock_options.jpg
        │       │   │   └── stock_view.jpg
        │       │   ├── russian
        │       │   │   ├── index.html
        │       │   │   ├── investment.html
        │       │   │   ├── mmex_concept.png
        │       │   │   └── stock_dialog.png
        │       │   ├── spanish
        │       │   │   ├── budget.html
        │       │   │   ├── index.html
        │       │   │   └── investment.html
        │       │   ├── stock_dialog.png
        │       │   ├── stock_options.png
        │       │   └── stock_view.png
        │       ├── license.txt
        │       └── version.txt
        ├── icons
        │   └── hicolor
        │       └── scalable
        │           └── apps
        │               └── mmex.svg
        ├── license.txt
        ├── man
        │   └── man1
        │       └── mmex.1.gz
        ├── po
        │   └── en
        │       ├── arabic.mo
        │       ├── bulgarian.mo
        │       ├── chinese_chs.mo
        │       ├── chinese_zh.mo
        │       ├── croatian.mo
        │       ├── czech.mo
        │       ├── dutch.mo
        │       ├── dutch_be.mo
        │       ├── english-uk.mo
        │       ├── english.mo
        │       ├── french.mo
        │       ├── german.mo
        │       ├── greek.mo
        │       ├── hebrew.mo
        │       ├── hindi.mo
        │       ├── hungarian.mo
        │       ├── indonesian.mo
        │       ├── italian.mo
        │       ├── latvian.mo
        │       ├── norwegian.mo
        │       ├── polish.mo
        │       ├── portuguese.mo
        │       ├── portuguese_br.mo
        │       ├── portuguese_portugal.mo
        │       ├── romanian.mo
        │       ├── russian.mo
        │       ├── serbian.mo
        │       ├── serbo-croatian.mo
        │       ├── slovak.mo
        │       ├── slovenian.mo
        │       ├── spanish.mo
        │       ├── swedish.mo
        │       ├── tamil.mo
        │       ├── turkish.mo
        │       ├── ukrainian.mo
        │       └── vietnamese.mo
        ├── res
        │   ├── Chart.js
        │   ├── ChartNew.js
        │   ├── home_page.htt
        │   ├── kaching.wav
        │   ├── master.css
        │   ├── mmex.ico
        │   └── sorttable.js
        └── version.txt
The res folder near the end is critical.

Let me know if that helps!

Pat
omalleypat
Super User
Posts: 112
Joined: Tue Jul 28, 2009 10:34 pm
Are you a spam bot?: No
Location: Atchison, KS

Re: compiling mmex for mac

Post by omalleypat »

xraynaud wrote:2016-02-17 19:21:57.207 MMEX[64239:1267895] NSDocumentController Info.plist warning: The values of CFBundleTypeRole entries must be 'Editor', 'Viewer', 'None', or 'Shell'. 
I have seen this before - it is unrelated to the symptoms you are describing.
xraynaud
New User
Posts: 15
Joined: Sun Sep 28, 2014 5:25 pm
Are you a spam bot?: No

Re: compiling mmex for mac

Post by xraynaud »

thanks omaleypat,

I didn't exactly followed the wiki page as I have installed wx with brew, but I have the same configure command line. However, one of the problems is that with this command line, is that when I launch the program after complation, I get an error message: can't open file '/Users/xavier/GitHub/moneymanagerex-1.3/mmex.app/Contents/Resources/home_page.htt' (error 2: No such file or directory)". I am not sure why I get this error as mmex is supposed to look for home_page.htt in the configure script datarootdir, which was set to "mmex.app/Contents/SharedSupport", not Resources. Moving the file to Resources removes the error but I don't get any reports.

I agree that this seems to be a problem with the program finding the files needed to draw the reports (I tested with the GRM manager my own reports and the SQL queries work correctly). However, I don't understand why the program looks for files in places that where not configured at compilation. 
omalleypat
Super User
Posts: 112
Joined: Tue Jul 28, 2009 10:34 pm
Are you a spam bot?: No
Location: Atchison, KS

Re: compiling mmex for mac

Post by omalleypat »

Try to put it in SharedSupport/res like the listing above. That works on my system. I think the Makefile should have put it in there if you run make install when it was configured with the additional options specified on the wiki.

The problem is that the Bakefiles need to be updated. They were made for linux and I've figured out which configure options need to be set to get it to work on the mac (that is what is posted to the wiki). You are right that we should not need to do all that and fixing this has been on my to-do list for some time, but the bakefile version 0.2.9 used by the project is very old and does not work on the current Mac OS. It would require upgrading all the bakefiles to the current version of Bakefile first, then adding the modifications to fix the mac-specific issues. Since there never seemed to be many other interested mac devs, I haven't spent the time to do it since I have it working.

I used the command "tree" to list the folder structure of the app bundle. You can probably get tree from brew. Just make sure the directory structure in your app bundle is the same as the one I posted and I think that should fix your issue. Hope that helps!
omalleypat
Super User
Posts: 112
Joined: Tue Jul 28, 2009 10:34 pm
Are you a spam bot?: No
Location: Atchison, KS

Re: compiling mmex for mac

Post by omalleypat »

You've inspired me to dig a little deeper into the Bakefiles issue. I've got it running on my Mac now and have updated the wiki page with instructions for how to get it to work. I'll look at fixing things some other time.

Pat
omalleypat
Super User
Posts: 112
Joined: Tue Jul 28, 2009 10:34 pm
Are you a spam bot?: No
Location: Atchison, KS

Re: compiling mmex for mac

Post by omalleypat »

xraynaud,

All my earlier comments were based on the branch v1.2.x. I tried compiling master today and am having all kinds of trouble. I'll need time to sort through all the issues there. If you want to try to build v1.2.x, I think you should be able to do it without much difficulty.

Pat
omalleypat
Super User
Posts: 112
Joined: Tue Jul 28, 2009 10:34 pm
Are you a spam bot?: No
Location: Atchison, KS

Re: compiling mmex for mac

Post by omalleypat »

I think I have the bakefiles for master fixed. I'll get a PR out there tomorrow, but others will need to test it before it is merged.
xraynaud
New User
Posts: 15
Joined: Sun Sep 28, 2014 5:25 pm
Are you a spam bot?: No

Re: compiling mmex for mac

Post by xraynaud »

Dear omalleypat, 

Thank you very much for looking into this. I have updated the source files from git today and managed to get it compiled and working now. The program is still looking for the report files in the wrong place but moving them to the directory where it is looking for them did the trick.

It could be a problem with bakefiles as  I can't recreate them (it is a python problem, not related to mmex).

Thanks again.
mrwxyz
New User
Posts: 1
Joined: Thu Dec 15, 2016 9:27 pm
Are you a spam bot?: No

Re: compiling mmex for mac

Post by mrwxyz »

omalleypat wrote:Try to put it in SharedSupport/res like the listing above. That works on my system. I think the Makefile should have put it in there if you run make install when it was configured with the additional options specified on the wiki.

The problem is that the Bakefiles need to be updated. They were made for linux and I've figured out which configure options need to be set to get it to work on the mac (that is what is posted to the wiki). You are right that we should not need to do all that and fixing this has been on my to-do list for some time, but the bakefile version 0.2.9 used by the project is very old and does not work on the current Mac OS. It would require upgrading all the bakefiles to the current version of Bakefile first, then adding the modifications to fix the mac-specific issues. Since there never seemed to be many other interested mac devs, I haven't spent the time to do it since I have it working.

I used the command "tree" to list the folder structure of the app bundle. You can probably get tree from brew. Just make sure the directory structure in your app bundle is the same as the one I posted and I think that should fix your issue. Hope that helps!
It is possible to share the MAC dmg for V1.3.0? I tried and I am not able to build on my own.
omalleypat
Super User
Posts: 112
Joined: Tue Jul 28, 2009 10:34 pm
Are you a spam bot?: No
Location: Atchison, KS

Re: compiling mmex for mac

Post by omalleypat »

It is now up on sourceforge and github
bingalls
New User
Posts: 5
Joined: Sat Apr 08, 2017 3:49 pm
Are you a spam bot?: No

Updated Mac OSX install instructions

Post by bingalls »

First, I apologize for the ugly formatting of this post. After 7 attempts, over 20 minutes of PhpBB repeatedly crashing and/or dropping out vital information, this is the best I could get through

No version of DMG install packages work yet, on a case-sensitive file system. Updates & details at https://github.com/moneymanagerex/money ... ssues/1113

Docker is not straight-forward on Mac OSX. I'll consider docker instructions, if & when they work.
Install instructions at https://sourceforge.net/p/moneymanagere ... %20OS%20X/
are stale. Here are some updates.
You will want to follow the older install instructions, then apply my changes, as you get stuck. Spoiler alert: this new install still fails at the end; hopefully our forum will fix that last step!

Homebrew users will find it easier to install the first packages. See also https://brew.sh/

brew install autoconf automake gettext xz

xz provides lzma.h as requested by wxWidgets, to compress tiff. While the build cannot seem to find lzma.h, fortunately it does not seem to be a requirement.
Next, set some environment variables, for universal instructions. This assumes you are running zsh or the default bash:

export MMEX_ROOT=$HOME/programming# your build folder
export OSX_VER=`sw_vers -productVersion | cut -d. -f # e.g. 12, as in Sierra OSX 10.12.1
mkdir -p $MMEX_ROOT
cd $MMEX_ROOT

This can now update the instructions, as follows

wxWidgets

../configure --enable-unicode --disable-shared --with-osx_cocoa --with-macosx-version-min=10.8
--with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.$OSX_VER.sdk
CC=clang CXX=clang++ CXXFLAGS="-stdlib=libc++ -std=c++11" OBJCXXFLAGS="-stdlib=libc++
-std=c++11" LDFLAGS=-stdlib=libc++ --disable-debug --disable-debug_flag --without-liblzma

This adds the $OSX_VER to xcode, and  --without-liblzma to the end, if your build fails to find lzma.h

Bakefile
No changes

wxsqlite3
This is a new dependency? Note that mmex has its own fork of wxsqlite3.
Look at its readme.md; here is the summary

cd $MMEX_ROOT
git clone https://github.com/utelle/wxsqlite3.git
cd wxsqlite3
autoreconf
chmod +x admin/build-aux/install-sh
mkdir build_cocoa_release
cd build_cocoa_release

# Same call, as for wxWidgets

../configure --enable-unicode --disable-shared --with-osx_cocoa --with-macosx-version-min=10.8
--with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.$OSX_VER.sdk
CC=clang CXX=clang++ CXXFLAGS="-stdlib=libc++ -std=c++11" OBJCXXFLAGS="-stdlib=libc++ -std=c++11"
LDFLAGS=-stdlib=libc++ --disable-debug --disable-debug_flag --without-liblzma

make

Instructions are clear, not to run `make install` for wxWidgets. Not sure, if this applies to wxsqlite3 ?

Mmex

../mmex_src/configure --with-wxdir=$MMEX_ROOT/wxWidgets-3.0.2/build-cocoa-debug prefix=`pwd`
datarootdir='${prefix}/mmex.app/Contents/SharedSupport' bindir='${prefix}/mmex.app/Contents/MacOS'
CC=clang CXX=clang++ CXXFLAGS="-stdlib=libc++ -std=c++11"
OBJCXXFLAGS="-stdlib=libc++ -std=c++11" LDFLAGS=-stdlib=libc++

Unfortunately, after running `make`, I get

make
make: *** No rule to make target `../lib/wxsqlite3/src/wxsqlite3.cpp', needed by `wxsqlite_wxsqlite3.o'. Stop.
Nikolay
Developer
Posts: 1535
Joined: Sat Dec 06, 2008 2:27 pm
Are you a spam bot?: No
Location: Sankt-Petersburg, Russia

Re: compiling mmex for mac

Post by Nikolay »

astern
New User
Posts: 6
Joined: Wed Aug 31, 2016 9:37 pm
Are you a spam bot?: No
Location: Austria

Re: compiling mmex for mac

Post by astern »

Nikolay wrote:Please try this instructions
https://github.com/moneymanagerex/money ... L.macOS.md
sorry, cannot find these instructions, last working url is https://github.com/moneymanagerex/moneymanagerex.

How to access blob/master/doc/INSTALL.macOS.md ?

Thanks in advance
A.
omalleypat
Super User
Posts: 112
Joined: Tue Jul 28, 2009 10:34 pm
Are you a spam bot?: No
Location: Atchison, KS

Re: compiling mmex for mac

Post by omalleypat »

Post Reply