PDA

View Full Version : What's happening to Lazarus in Mac?



cronodragon
20-11-2008, 03:17 PM
When I finally buy a Mac to develop, Lazarus is throwing an error whenever I try to define an event for a simple button inside a form :cry: The error is about not having the source code, but I have the sources, I checked the path, are there! :? Googling for that error, there is a bug tracking and they say it's solved, but it's still happening.

I installed the latest version of Lazarus, FPC and it's source. Which version do you Mac guys use??

czar
20-11-2008, 06:01 PM
I had lazarus working fine on my macbook, leopard. Yesterday the harddrive broke so i need to get it fixed.

What I really would love to see is some easy to follow SDL, free pascal and lazarus tutorials and samples for macos.

savage
20-11-2008, 07:16 PM
I use the following shell script to build GameMaker on Mac OS X...



#!/bin/sh

echo "Deleting All objs from previous compilation"
cd ~/alienbrainWork/GameMakerMAC/Game\ Maker\ 7/Mac/YoYo70
cd objs/
rm *
cd ..

Processor="`uname -m`"
Kernel="`uname -s`"

echo "Building for...."
echo "Kernel : $Kernel"
echo "Processor : $Processor"

Target=""

echo "Which Processor would you like to"
read -p "target ( i386/powerpc/arm ) ? " Target

GMode=""

echo "Would you like to compile for"
read -p "2D or 3D mode ( 2/3 ) ? " GMode

case $Kernel in
"Darwin")
case $Processor in
"i386")gui="carbon"; compiledunits="i386-darwin"; linkedfiles="-k-framework -kcarbon -k-framework -kcocoa -k-framework -ksdl -k-framework -ksdl_mixer"; entrypoint="-XMSDL_main"; exepath="./YoYo70"; compilerpath="/usr/local/bin";localshare="local/share";targetunits="$Target-darwin";;

"Power Macintosh")gui="carbon"; compiledunits="powerpc-darwin"; linkedfiles="-k-framework -kcarbon -k-framework -kcocoa -k-framework -ksdl -k-framework -ksdl_mixer"; entrypoint="-XMSDL_main"; exepath="./YoYo70"; compilerpath="/usr/local/bin";localshare="local/share";targetunits="$Target-darwin";;
esac;;

"Linux")
case $Processor in
"i386")gui="gtk"; compiledunits="i386-linux"; linkedfiles="";entrypoint=""; exepath="./YoYo70";compilerpath="/usr/bin";localshare="local/share";targetunits="$Target-darwin";;

"i686")gui="gtk"; compiledunits="i386-linux"; linkedfiles="";entrypoint=""; exepath="./YoYo70";compilerpath="/usr/bin";localshare="local/share";targetunits="$Target-darwin";;
esac;;
esac

case $GMode in
"2")graphicsmode="";;
"3")graphicsmode="OPENGL";;
esac

$compilerpath/fpc YoYo70.lpr -S2dg -Os3 -Xs -XX $linkedfiles -WG -vewnhi -l -Fl/usr/lib/ -Fl/usr/X11R6/lib/ -Fl/sw/lib -Fu/usr/$localshare/lazarus/lcl/units/$compiledunits/ -Fu/usr/$localshare/lazarus/lcl/units/$compiledunits/$gui/ -Fu/usr/$localshare/lazarus/packager/units/$compiledunits/ -Fu. -FUobjs/ -o"$exepath-$Processor" $entrypoint -dLCL -dLCL$gui -dYOYO70 -d$graphicsmode

cd objs/
rm *
cd ..

$compilerpath/fpc YoYo70.lpr -P$Target -S2dg -Os3 -Xs -XX $linkedfiles -WG -vewnhi -l -Fl/usr/lib/ -Fl/usr/X11R6/lib/ -Fl/sw/lib -Fu/usr/$localshare/lazarus/lcl/units/$targetunits/ -Fu/usr/$localshare/lazarus/lcl/units/$targetunits/$gui/ -Fu/usr/$localshare/lazarus/packager/units/$targetunits/ -Fu. -FUobjs/ -o"$exepath-$Target" $entrypoint -dLCL -dLCL$gui -dYOYO70 -d$graphicsmode

case $Kernel in
"Darwin")lipo -create "$exepath-$Processor" "$exepath-$Target" -output "$exepath";;
esac

# cd YoYo70.app/Contents/MacOS/
rm "$exepath-$Processor"
rm "$exepath-$Target"
# cd ../../../

echo "Deleting All objs from previous compilation"
cd objs/
rm *
cd ..


This shell script should also work on Linux as well.

Amend as appropriate and if you have any questions, don't hesitate to ask.

savage
20-11-2008, 07:20 PM
When I finally buy a Mac to develop, Lazarus is throwing an error whenever I try to define an event for a simple button inside a form :cry: The error is about not having the source code, but I have the sources, I checked the path, are there! :? Googling for that error, there is a bug tracking and they say it's solved, but it's still happening.

I installed the latest version of Lazarus, FPC and it's source. Which version do you Mac guys use??

Are you using overnight builds or building it from Trunk?