compiling mmex for mac

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

Moderator: Renato

omalleypat
Super MMEX 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 MMEX 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 MMEX 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 MMEX 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 MMEX 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
MMEX 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 MMEX 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 MMEX 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