Systeme D

14 November 2004

Ming, Mac OS X and Perl

Ming is the smartest piece of technology I've stumbled upon this year. It lets you generate Flash files (SWFs) from within PHP, C++, Perl or Python, roughly in that order of popularity.

Using this, you can generate exceptional quality web mapping. Server-side rasterisation cripples your server and, usually, looks crap. CSS is great for icon placement (cf Geowiki) but can't do much else for maps. SVG is bloated and found on few desktops. Flash solves all these problems.

Installation

During the forthcoming months, I'll be describing some of the work I'm doing with Ming. But the first hurdle is to install it.

Most Ming users seem to be using PHP and Linux. I'm using Perl and Darwin (Mac OS X). I've posted the solutions I eventually found to the Ming wiki, but in essence:

  • export MACOSX_DEPLOYMENT_TARGET="10.3" . This is an omission in Panther and needs fixing before you start installing stuff. (Google it if you like - there are any number of references to this all over the web.)
  • Install libungif and libpng. This might be useful for libungif. Use Fink if you like, though personally, I find it easier to build from source than to install and update Fink. (That's not because I'm l337 in a Gentoo-like way. I just don't understand Fink.)
  • Follow these instructions at SourceForge to install the Ming library.
  • cd into perl_ext, and edit the Perl makefile to expressly specify the library paths, as in SourceForge bug 988705. (Bug 1041018 seems similar, though I haven't tried it.)
  • Now sudo make, sudo make test and sudo make install as per usual.

In use

So far, I've not found much missing from Perl Ming. Most PHP source can be very easily adapted - look here for the general principle. The only serious problem I'm currently having is getting setInterval to work.

It took me a long while to realise that you have to expressly import the constants, as well as the module itself. Thus:

use SWF qw(:ALL);
use SWF::Constants qw(:Button :DisplayItem :Text :Fill :Sound);

Remember to run Perl with warnings on (-w) - not that you wouldn't anyway - as the best way of debugging any Mingery you may come up with.

Resources

Four essential resources for Ming users:

  • Subscribe to the ming-users list at SourceForge. Read everything that comes through, even if it doesn't seem directly relevant.
  • Read the ming-devr list when you have a problem.
  • gazb has produced an excellent set of examples. Learn from them.
  • The best paper guide to Ming appears to be O'Reilly's Perl Graphics Programming, and fortunately, their 'free chapter for download' is the one that deals with Ming. The chat server is rather fun.

More to come...


Comments

And once you've done that, here's how to get it to compile on PHP (if you have to...):

http://sourceforge.net/mailarchive/message.php?msg_id=8828205

Posted by Richard on 6.1.05 16:26

Hi. I am using OS X Tiger -- I've followed the steps you've provided but...

0) I have to "make static" in order to compile ming
1) perl Makefile.PL says No library found for -lpng (and -lungif), as well as
2) when I run "make test" in the perl_ext/ directory i get 20/20 subtests failed :(

Please help me :-)

Posted by Tzvetan Ivanov on 19.8.05 16:15

Hi there,

I'm searching for a pre-built binary of MING for OS/X, and found your site ( http://www.systemed.net/blog/entry041114172430.html ).

Do you have a pre-compiled version that you could send to me ( which would be very much appreciated ), or do you know where I can download one?

Many thanks...
Mal

Posted by Mal Duffin on 17.12.05 23:32

uPlc4z dfv814t4fdfvmlfn093fvgbos

Posted by nansey on 24.6.08 01:24

AYXD52 fv9db5dgbn3207vybfv5

Posted by abraham on 28.6.08 00:18

very best job juhu cheap hotels cheap 2 star hotels in manachester xki

Posted by Rqmvestk on 1.7.08 14:00

good material thanks hotels in bristol cheap hotel in harrow =DDD

Posted by Ctuspnpz on 1.7.08 14:25

Gloomy tales discounts cheaphotels %-[[

Posted by Izroqyby on 1.7.08 15:47

Thanks funny site goldsboro cheap hotels north las vegas 093859

Posted by Ljwqnrtu on 1.7.08 16:28

Very funny pictures hotel travel cheap maui hotel rental with car rental package =-PPP

Posted by Sormders on 1.7.08 17:29

Thanks funny site manila hotels cheap hotel courtyard marriot hickory sioed

Posted by Qyjthrsz on 1.7.08 18:29

This site is crazy :) flights hotel packges to new york from the uk cheap hotel tallinn cruklq

Posted by Owmmumie on 1.7.08 19:11

Hello good day hotels in silom lasvegas cheap hotel 2777

Posted by Kdxnxndj on 1.7.08 20:32

Very interesting tale hotel airfare to las vegas nice cheap new

kxntcd

Posted by Sfnvrxvq on 1.7.08 20:53

Hello good day flights and hotels europe cheap tickets miami air and hotel iljev

Posted by Pldaffbe on 1.7.08 22:34

city passenger ship terminal bath and cheap hotel rczeed

Posted by Nalddexk on 1.7.08 22:37

search wynn hotel las vegas cheap ticket opbqj

Posted by Kxudmuql on 2.7.08 00:13

real beauty page york hotel rate cheapest hotel or casino in laughlin nevada 751

Posted by Srakiyfz on 2.7.08 00:43

Excellent work, Nice Design in melbourne aus discount hotel rate beirut tyre cheap hotel cheaph 8)

Posted by Otnmbnbf on 2.7.08 01:53

very best job city centre cheap hotels hongkonf 7923

Posted by Ipctyqug on 2.7.08 02:46

very best job and cheap hotels boise cheap hotel =)))

Posted by Pwmvrhmy on 2.7.08 03:33

i'm fine good work hotels cheap hotels eastern long island fgomb

Posted by Ueqktubl on 2.7.08 04:52

Jonny was here discount rooms hot tampa cheap

:-PPP

Posted by Mehsufdn on 2.7.08 05:13

this is be cool 8) in honolulu cheap hotels breckenridge mn 68281

Posted by Uvurlafj on 2.7.08 06:53

this is be cool 8) seattle naples

:(

Posted by Hrksfwxa on 2.7.08 06:57

Thanks funny site flight packages find hotel cheap deal 273

Posted by Yfgpvfyl on 2.7.08 08:33

Best Site Good Work hotels la airport cheap hotels with kitchenette in new york 26615

Posted by Efcatyjg on 2.7.08 09:04

I love this site hotel and airfare packages cheap hotels charleston sc :-)))

Posted by Qaiglcgb on 2.7.08 10:18

Good crew it's cool :) hotels near olimpico stadium in rome cheap vancouver bc hotel %[[

Posted by Xuueqveh on 2.7.08 12:02

Hello good day hawaii cheap hotel packages in reno nevada =]]

Posted by Lbnfwtsg on 2.7.08 13:14

magic story very thanks edinburgh cheap hotels bend oregon 3582

Posted by Ikplpgli on 2.7.08 13:51

It's funny goodluck shanghai san fransisco and cheap hotels mrd

Posted by Jcesciwo on 2.7.08 15:23

magic story very thanks seattle cheap hotels albuquerque 50873

Posted by Dwgxzxlm on 2.7.08 15:42

perfect design thanks frankenmuth michigan cheap hotels granbury texas 5069

Posted by Glkftbzx on 2.7.08 17:28

magic story very thanks in orange beach cheap hotels in cnetral london lyhfn

Posted by Zulyogsf on 2.7.08 17:32

Punk not dead atlanta ga cheap last minute air

440262

Posted by Vbjasnxg on 2.7.08 19:12

Thanks funny site stockport dirt cheap and affordable hotels in new york 294

Posted by Rfbdyhut on 2.7.08 19:39

i'm fine good work a href=" hardcore porno "asian sex hardcore porn/a jwaq a href=" porno "disney aladdin porn/a thz

Posted by Xlqgbzqs on 6.7.08 08:23

Good crew it's cool :) a href=" peludas "wrestling male pornstars/a :[[ a href=" trailers to watch "girlporn/a 641108

Posted by Yabkryrb on 6.7.08 09:10

I'm happy very good site a href=" woman "porn inspector/a =-OOO a href=" porn "lee stone male porn

/a yvf

Posted by Vjujxnjm on 6.7.08 10:29

It's funny goodluck a href=" site free "snoop dogg dvd porn/a 8((( a href=" porn "pornstars of the 80's/a :(

Posted by Zivldoxd on 6.7.08 11:06

Jonny was here a href=" porn "fre hadcore gay porn/a btpe a href=" star "free gay porn for men/a kkgpv

Posted by Wrqfwxdk on 6.7.08 13:03

this is be cool 8) a href=" porn "male pornography/a 127099 a href=" porn "porn tiny little girls/a bubsw

Posted by Vzxmjhoi on 6.7.08 14:44

Punk not dead a href=" porn "julian porn star/a cbhcb a href=" sites "amature porn reveiw/a 394

Posted by Vpcnkbrx on 6.7.08 15:03

Punk not dead a href=" streaming "tom byron porn on dvd/a lksi a href=" you "porno fat/a gfkt

Posted by Rzaiypgo on 6.7.08 16:52

this is be cool 8) a href=" porn "free jetson cartoon porn videos
/a ditfe a href=" porn "mom pay porn sites/a 197498

Posted by Bwfepbqc on 6.7.08 17:10

i'm fine good work a href=" underage girl porn "nudeporn/a rcbbr a href=" porn "jenna jameson porn
/a 8-[[

Posted by Hyyiltih on 6.7.08 18:58

perfect design thanks a href=" star "boyporn/a %]] a href=" porn tape "pornstar mary carie/a sgzvvg

Posted by Xxycdqgw on 6.7.08 19:11

Very interesting tale a href=" porno "3d cartoon porn/a 4460 a href=" fucking animals "gay porn free/a 4625

Posted by Yegnhdjl on 6.7.08 21:07

Best Site Good Work a href=" girlsporn "free porn video clips/a 1218 a href=" videos "pornstarmoviezone/a :]

Posted by Pdlbspwm on 6.7.08 21:08

Best Site good looking a href=" 20videos "gyno porn/a :OO a href=" webcam "preteen girls porn/a 630

Posted by Aucpajhr on 6.7.08 23:03

magic story very thanks a href=" porn "porncity/a 526202 a href=" porn "jenny's porn

/a 8P

Posted by Fgnchnoi on 6.7.08 23:13

very best job a href=" gallery "child porn lolita/a lbjli a href=" lolita nude porn "lolita underage porn/a :-D

Posted by Scrbvmtk on 7.7.08 01:20

a href=" star "sexo y porno gratis nuevo/a 0629 a href=" gay porn movies "gay

/a 8831

Posted by Qnaxgyje on 7.7.08 03:02

very best job a href=" children "lolita

/a drdri a href=" teens "amatureporn/a =[[[

Posted by Jvjiewzk on 7.7.08 03:28

free preteen nude pics and videos

Posted by osher on 7.7.08 07:59

this post is fantastic a href=" teenagers "pcos teens/a vtyed a href=" teens "blue-teen link/a 777

Posted by Wwcepjke on 8.7.08 04:55

This site is crazy :) a href=" free "christian resources for teens/a onow a href=" statistics recent "cute shaven teens with braces/a qgxeua

Posted by Akrlmwcv on 8.7.08 06:54

I'm happy very good site a href=" actresses "poetry for teens/a smj a href=" pictures "teen boys model/a 8(((

Posted by Damdnmwj on 8.7.08 08:53

Punk not dead a href=" killing "contact dr westina matthews shatteen/a 32908 a href=" latinas "niteen sharma/a 0564

Posted by Egdkimhd on 8.7.08 10:54

Cool site goodluck :) a href=" accessories "young teen whore/a 362231 a href=" oklahoma's outstanding teen "justin lo juk teen/a hzubah

Posted by Lekscmhy on 8.7.08 12:58

Very funny pictures a href=" themes "preteen ddd/a gtch a href=" pics "raising teens/a 8-D

Posted by Qwnqynvr on 8.7.08 15:03

Gloomy tales a href=" virgins "teens and tattoos/a qflv a href=" teen "teen naturists/a hhmr

Posted by Ydfydvxj on 8.7.08 17:01

Jonny was here a href=" parents "teen bed set vibrant color/a ccq a href=" model "first time teen virgins/a :-)

Posted by Huxkiael on 8.7.08 19:01

Excellent work, Nice Design a href=" advice "teens and aids/a :[[ a href=" orgy "teen pictures/a :P

Posted by Cuttyrjw on 8.7.08 20:46

This site is crazy :) a href=" bedrooms "teen relationshipgames/a =[[[ a href=" teens galleries "teenager pregnancy/a odeb

Posted by Ubuphnho on 8.7.08 20:53

real beauty page a href=" preteen "seventeen prom/a jyfpx a href=" choosing where to live "consequences for teens cutting school/a nmthto

Posted by Hissxtmv on 8.7.08 22:47

Punk not dead

Posted by Ewdannhy on 11.7.08 19:38

good material thanks

Posted by Gluaigdm on 14.7.08 16:46


Add a comment

Your name:

E-mail address: 

Comment:

your comment. (E-mail addresses will not be visible, but a server-based mail link will be provided.)