I'm crossposting this into the OSX perl mailing list as I was basically trying to get ming to work with perl.

Where I left off - stymied at getting the ming lib ( http://www.opaque.net/ming/ ) to compile (original post appended at end of this one), so I went back and read the instructions for the OSX Jaguar patch ( http://www.haque.net/software/ ), which say
"........'zcat ming-0.2a-mhaque-darwin-jaguar.patch.gz | patch -p0' while in the ming directory ...."


Being new to dealing with ports to OSX I had no idea what that meant, so after reading through the man pages for zcat, flex, bison, and patch (old Unix hands no laughing please) I figured out that typing the above line with correct paths in the terminal would actually modify the ming make file.

Make file thus patched, I ran make and, a couple or warnings aside, everything seemed groovey, then make install and lo I now have the following in /usr/lib:

libming.a
libming.dylib
libming.so
libming.so.0
libming.so.0.2

Next I went on to install the perl wrapper which comes wih the distro using the standard proceedure for perl modules
perl Makefile.PL
make
make test
make install



make test output thus:


PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00_basic....ok
t/01_shape....ok
t/03_movie....ok
t/button......ok
t/drag........ok
t/fill........ok
t/filljpeg....Test header seen more than once!
t/filljpeg....FAILED tests 1-2
Failed 2/2 tests, 0.00% okay
t/gradient....ok
t/png.........Test header seen more than once!
t/png.........FAILED test 1
Failed 1/1 tests, 0.00% okay
t/sound.......Test header seen more than once!
t/sound.......FAILED tests 1-3
Failed 3/3 tests, 0.00% okay
t/sprite......ok
Failed Test Stat Wstat Total Fail Failed List of Failed
------------------------------------------------------------------------ -------
t/filljpeg.t 2 2 100.00% 1-2
t/png.t 1 1 100.00% 1
t/sound.t 3 3 100.00% 1-3
Failed 3/11 test scripts, 72.73% okay. 6/26 subtests failed, 76.92% okay.
make: *** [test_dynamic] Error 2



Not knowing if these tests were crucial or not I forced the install



Next I run a test script to see if I have a working distro or not:



#!/usr/bin/perl -w use strict; use SWF qw(:ALL);

my($font,$movie,$text);


SWF::setScale(1.0);


$font = new SWF::Font("/Users/robin/Desktop/serif.fdb");
$text = new SWF::Text();
$text->setFont($font);
$text->moveTo(200, 2400);
$text->setColor(0xff, 0xff, 0x99);
$text->setHeight(1000);
$text->addString("It works!");

$movie = new SWF::Movie();
$movie->setDimension(5400, 3600);

$movie->add($text);

$movie->save("/Users/robin/Desktop/SWFtest.swf");


this failed because there was no .fdb file on my computer, Flash needs a special font definition for each font used apparently, but luckily O'Reilly has a book out about Perl and graphics and the author has a .fdb file on his web site:


http://shawn.apocabilly.org/PGP/examples/serif.fdb

Once I'd downloaded the .fdb, and ammended the script, I got it to run, and I could view the sweat of my labours as it were. So there you go open source flash animations. Oh and just incase you didn't know Quicktime viewer can handle raw SWF files.


I'm hoping to produce animations with sound using ming/perl, anyone interested in knowing how and if the project develops drop me a line off list.




On Friday, December 12, 2003, at 09:52 am, Robin wrote:



I'm attempting to install the ming2.0a lib, there are some errors being thrown up by make (included below) and that's as far as I get.

Digging around on the web I found a Darwin/OSX patch but not instructions on how to use said patch, beyond those on the webpage, and I'm not using fink.

http://www.haque.net/software/

http://www.haque.net/software/patches/ming-0.2a-mhaque-darwin- jaguar.patch.gz



any suggestions/ links welcomed


Robin





Make output:


cd src && make dynamic
gcc -g -Wall -c -o movie.o movie.c
gcc -g -Wall -c -o displaylist.o displaylist.c
gcc -g -Wall -c -o blocklist.o blocklist.c
gcc -g -Wall -c -o position.o position.c
gcc -g -Wall -c -o movieclip.o movieclip.c
gcc -g -Wall -c -o shape_util.o shape_util.c
gcc -g -Wall -c -o shape_cubic.o shape_cubic.c
shape_cubic.c: In function `subdivideCubicLeft':
shape_cubic.c:53: warning: implicit declaration of function `memcpy'
gcc -g -Wall -c -o text_util.o text_util.c
gcc -g -Wall -c -o fill.o fill.c
gcc -g -Wall -c -o ming.o ming.c
cd blocks && make
gcc -g -Wall -c -o output.o output.c
gcc -g -Wall -c -o character.o character.c
gcc -g -Wall -c -o shape.o shape.c
gcc -g -Wall -c -o morph.o morph.c
gcc -g -Wall -c -o fillstyle.o fillstyle.c
gcc -g -Wall -c -o matrix.o matrix.c
gcc -g -Wall -c -o font.o font.c
gcc -g -Wall -c -o block.o block.c
gcc -g -Wall -c -o cxform.o cxform.c
gcc -g -Wall -c -o text.o text.c
gcc -g -Wall -c -o action.o action.c
gcc -g -Wall -c -o button.o button.c
gcc -g -Wall -c -o placeobject.o placeobject.c
gcc -g -Wall -c -o outputblock.o outputblock.c
gcc -g -Wall -c -o method.o method.c
gcc -g -Wall -c -o sprite.o sprite.c
gcc -g -Wall -c -o fontinfo.o fontinfo.c
gcc -g -Wall -c -o loadfont.o loadfont.c
gcc -g -Wall -c -o rect.o rect.c
gcc -g -Wall -c -o jpeg.o jpeg.c
gcc -g -Wall -c -o soundstream.o soundstream.c
gcc -g -Wall -c -o mp3.o mp3.c
gcc -g -Wall -c -o textfield.o textfield.c
gcc -g -Wall -c -o browserfont.o browserfont.c
gcc -g -Wall -c -o dbl.o dbl.c
gcc -g -Wall -c -o linestyle.o linestyle.c
gcc -g -Wall -c -o gradient.o gradient.c
gcc -g -Wall -c -o bitmap.o bitmap.c
gcc -g -Wall -c -o error.o error.c
error.c: In function `error_default':
error.c:23: warning: implicit declaration of function `exit'
gcc -g -Wall -c -o input.o input.c
cd actioncompiler && make
gcc -g -Wall -c -o compile.o compile.c
gcc -g -Wall -c -o listaction.o listaction.c
flex -i -Pswf4 swf4compiler.flex
gcc -g -Wall -c -o lex.swf4.o lex.swf4.c
flex -i -Pswf5 swf5compiler.flex
gcc -g -Wall -c -o lex.swf5.o lex.swf5.c
bison -p swf5 swf5compiler.y
swf5compiler.y contains 26 shift/reduce conflicts and 63 reduce/reduce conflicts.
gcc -g -Wall -c -o swf5compiler.tab.o swf5compiler.tab.c
bison -p swf4 swf4compiler.y
swf4compiler.y contains 49 shift/reduce conflicts and 42 reduce/reduce conflicts.
gcc -g -Wall -c -o swf4compiler.tab.o swf4compiler.tab.c
gcc -g -Wall -c -o assembler.o assembler.c
gcc -g -Wall -c -o compileaction.o compileaction.c
gcc -g -Wall movie.o displaylist.o blocklist.o position.o movieclip.o shape_util.o shape_cubic.o text_util.o fill.o ming.o actioncompiler/compile.o actioncompiler/swf4compiler.tab.o actioncompiler/lex.swf4.o actioncompiler/swf5compiler.tab.o actioncompiler/lex.swf5.o actioncompiler/compileaction.o actioncompiler/assembler.o blocks/*.o -shared -fpic \
-o libming.so
gcc: unrecognized option `-shared'
ld: Undefined symbols:
_main
make[1]: *** [dynamic] Error 1
make: *** [dynamic] Error 2


_______________________________________________
MacOSX-admin mailing list
[EMAIL PROTECTED]
http://www.omnigroup.com/mailman/listinfo/macosx-admin




Reply via email to