1.0.5 for the Mac?

ixokai
Posts: 63
Joined: Fri Dec 25, 2009 7:43 am

1.0.5 for the Mac?

Post by ixokai »

I noticed there's no installer for 1.0.5 installer for the mac yet, and wondered if the reason was if something was wrong on the platform that hadn't been resolved yet in the latest version, or if its a problem of access to mac boxes for you guys such that you haven't gotten around to it yet is all?

If its the latter and you need packaging volunteers, I can probably help. I'm neither a C++ or QT programmer by trade, but I know my way around the system. I managed to get 1.0.5 (git, eww :)) and then to compile it with minimal tweaks (mostly, just adding -lz to the src.pro), and it started up and all. Sure, none of the buttons had text and the .app bundle didn't have the right icon, but I'm sure that's all little details on steps I missed :)

Of course, its a non-fat x86_64 architecture instead of being fat x86_64+i386 and is probably only Leopard+ compatible, so its not useful to most people right now, but I'm sure I could glare the qmake procedure into properly targeting the right architectures with a little effort. It can't be any harder then omniORB. :)

User avatar
Vadi
Posts: 4867
Joined: Sat Mar 14, 2009 3:13 pm

Re: 1.0.5 for the Mac?

Post by Vadi »

You hit the nail on the thread. Mac packagers come and go, and unfortunately current one is ill.

1.0.5 requires qt 4.6, luasql, sqlite3 and lrexlib. If you can get all that into an installer that works on all macs .4+ that'd be grand.

ixokai
Posts: 63
Joined: Fri Dec 25, 2009 7:43 am

Re: 1.0.5 for the Mac?

Post by ixokai »

I'll see what I can do; I'm -pretty- sure I can only target 10.4+ on this machine(Snow Leopard), but I might be able to target 10.3.9. I've got QT4.6 + QScintilla and they're solid. SQLite3 should be no problem.

The "qmake" normal QT-build didn't complain for lack of luasql/lrexlib, so I assume that the makefiles for binding to those are in cmake format. So I guess I have to bite the bullet and learn cmake :)

User avatar
Vadi
Posts: 4867
Joined: Sat Mar 14, 2009 3:13 pm

Re: 1.0.5 for the Mac?

Post by Vadi »

We don't use qscintilla anymore, but feel free to ask for help on others. Lrexlib uses a non-automatic makefile and required even some tinkering on Linux.

ixokai
Posts: 63
Joined: Fri Dec 25, 2009 7:43 am

Re: 1.0.5 for the Mac?

Post by ixokai »

I was gonna say: I -am- pretty familiar with Scintilla (at least the original and GTK ports), and didn't really think I 'felt' it in this app anymore :)

Currently, I'm glaring at the various libraries and pre-requisites to get them into an i386+ppc universal binary (excluding x86_64). Which is tedious but nothing's complicated. I didn't want to use any of my existing-installed libraries (e.g., sqlite) as they have an odd mix of build profiles, and Leopard stuff tends to be incompatible with Tiger stuff unless you set some stuff up just right (Apple apparently changed some fundamental darwin-level API's)

Its mostly just a function of (recorded for posterity):

Code: Select all

export MACOSX_DEPLOYMENT_TARGET="10.4"
export CC="gcc-4.0" # 4.2 is the snow leopard default and is not capable of producing 10.4 binaries
export CFLAGS="-arch ppc -arch i386 -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk"
export CPP="gcc-4.0 -E"

export CXX="g++-4.0"
export CXXCPP="g++-4.0 -E"
export CXXFLAGS="-arch ppc -arch i386 -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk"

export LDFLAGS="-arch ppc -arch i386 -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk"
There's a lot of redundancy there (and the LDFlags in particular is usually entirely redundant) but there's some pretty wide varieties of how properly such standard vars seem to actually be supported in makefiles. Blah.

But! Once this is all done, I should be able to just recompile new versions of MudLet by itself when versions are released, as I'm leaving these 'pre-requsites' in their own special prefix/root so they'll be left alone by my normal nerdy activities.

Does lrexlib require pre-requisite libraries? E.g., pcre / oni / or is it included in it? It LOOKS like it is just a binding so I'll have to build the libraries too. I'm assuming just pcre though.

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: 1.0.5 for the Mac?

Post by Heiko »

To begin with, all help is warmly welcomed. SqlLite3, lregex and luasql are not handled in src.pro because Mudlet itself can run without these libraries, but certain functionality will not be available. At the moment we could live with a 1.0.5.1 installer (=latest git) without lregex, sqllite3 and luasql if you can't build these libs.
The latest lregex depends on libpcre - just like Mudlet. It also supports onig.dll (another regex library), but I haven't included onig.dll in the windows installer either as I didn't have the time to write my own windows makefile because they don't supply one with the source code. Consequently, Mudlet officially only supports the pcre module of lregex.
The fiddly part about the lua modules is that they need to be placed in a directory that Lua is searching for modules - otherwise Lua will not find them and they will fail to load -> this is reported when a profile is being loaded. The best one would be the same directory where Lua itself is located - in the case of the windows and forthcoming GNU/Linux installer this is the installation directory where all Mudlet files are located except the profiles which are not touched by the installer or uninstaller. The user profiles are stored in different places depending on the OS and its specific version, language settings etc.. (->getMudletHomeDir() ) You don't need to worry about this at all as the binary takes care of this.
The current OSX installer still ships a bunch of libraries that are no longer needed because Mudlet doesn't depend on webkit and qscintilla anymore. Webkit had several extra dependencies on MAC. What is needed is QtGui4, QtNetwork4, QtCore4 and libpcre >= 7.6.
The other difficulty seems to be to replace the 3 needed Qt libs with the current versions i.e. replace 4.5 with 4.6. If this isn't done, people will not be able to start Mudlet as it's linked against 4.6. Again, if you fail to remove the 4.5 libs, you can download the old 4.5-SDK from the qt ftp site and use the 4.5 SDK instead of the current 4.6-SDK.

ixokai
Posts: 63
Joined: Fri Dec 25, 2009 7:43 am

Re: 1.0.5 for the Mac?

Post by ixokai »

I'm -- sort of -- starting from scratch; its actually easier for me then to take the 'current' installer and upgrade it, as I'm not sure what's going on with the Dependencies pkg (as opposed to the normal Mac way of including such things directly in the .app bundle where possible).

I have readline, sqlite, lua, luasql and pcre built for 10.4+ fat binaries; lrexlib is giving me headaches but I'm pretty sure how to get around them.

I can't live without lrexlib myself, as I use pcre in several places, so! I shall defeat lrexlib's difficulties. I'll leave out Oni regex though, since its less work (heh) and well, supporting two regex libraries isn't something I quite understand. They differ in syntax and interpretation of patterns subtly, it seems like it'd just confuse people. But if/when the windows port starts supporting it, it should be easy to add in.

Is 1.0.5.1 a 'tag' in git like 1.0.5 was, or is there a certain revision you can name for what the windows installer is? Just wanna make sure that whenever I get this working its the same/latest.

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: 1.0.5 for the Mac?

Post by Heiko »

Latest windows version is 1.0.5.1. It's available on our download site on http://sourceforge.net/projects/mudlet/files/
Latest git adds some more minor features such as being able to use anonymous Lua functions, closures etc. in tempTrigger() etc. and has several bug fixes. If you're going to make a package for 1.0.5, you should always use latest git.
You need to manually edit the lregex Makefile. I can help you with this though.

ixokai
Posts: 63
Joined: Fri Dec 25, 2009 7:43 am

Re: 1.0.5 for the Mac?

Post by ixokai »

I *believe* I have lrexlib conquered, its just painful and very manual because its not at all doing things in nice-standard ways. So I have to run through the entire compile process twice, then manually merge the outputs into a fat binary (which I had to do for sqlite too, really), and then rename various files (as I don't know make syntax enough to figure out how to make the common.mak file name the library properly-- on a mac it should be rex_pcre.2.4.dylib and not rex_pcre.so.2.4). But, that's doable, and I only have to do it once. :)

Um.

I have no idea how to use git; I use svn / bzr at work and have been avoiding git like a plague forever. I think? to update my local repository to the "latest", I should do a 'git pull', right? Not a 'git fetch'. Er.

ixokai
Posts: 63
Joined: Fri Dec 25, 2009 7:43 am

Re: 1.0.5 for the Mac?

Post by ixokai »

OH -- should pcre be built with utf8 support or just ascii?

Post Reply