Results 1 to 10 of 13

Thread: Proper install and configuration of Lazarus on Mac OS X

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Exclamation Proper install and configuration of Lazarus on Mac OS X

    Hey everyone, I've been trying for ages to get a properly working install of Lazarus on my iMac running Mac OS X Snow Lepoard. Can someone, anyone, everyone with a working install that can compile proper working executable applications help me out here?

    I've tried the last stable version with the installer and for some reason as a default it does not compile a proper executable. So... how did you set yours up? What versions did you use? And what version of Mac OS X do you have?

    I list of steps would be super, but at this point, I'd take any kind of help from someone who has actually successfully gotten Laz working on the Mac. Thanks.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  2. #2
    I have never used Lazarus for GUI projects under MacOS X(only FreePascal and Makefiles for compilation ), but I think Lazarus, in your situation, compile only executable without a bundle. Bundle - it is a directory with special structure inside for executables, icons, resources, frameworks and other stuff. One of solution is copying executable(for example with name MyApp) to this directory:
    MyApp.app\Contents\MacOS\

    Or try to find some option in "Project Options", there must be something for autogeneration a bundle.

  3. #3
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    Quote Originally Posted by Andru View Post
    I have never used Lazarus for GUI projects under MacOS X(only FreePascal and Makefiles for compilation ),
    How do you use/structure your makefiles?
    Jason McMillen
    Pascal Game Development
    Co-Founder





  4. #4
    For example here my universal Makefile for demos(that written for my library) I use it for Linux and MacOS X. But it's hard to describe all of lines in English to me.
    Code:
    FPC     = fpc
    FPC_MAC = /usr/local/bin/ppc
    FLAGS   = -O3 -XsX -CX -Sd
    INCLUDE = -Fu../../../headers/ -Fu../../../src/ -Fu../../../lib/ -Fu../../../lib/PasJPEG
    OUTPUT  = ../bin/
    TMP     = ../tmp/
    UNIT    = demo01.pas
    TARGET  = demo01
    TARGETW = demo01.exe
    TARGETM = demo01
    BUNDLE  = $(OUTPUT)$(TARGETM).app
    
    all: clean
    	$(FPC) $(UNIT) $(INCLUDE) -FE$(OUTPUT) -FU$(TMP) $(FLAGS) -o$(TARGET) -TLINUX
    	strip $(OUTPUT)$(TARGET) --strip-unneeded -R .comment -R .note
    
    win32: clean
    	$(FPC) $(UNIT) $(INCLUDE) -FE$(OUTPUT) -FU$(TMP) $(FLAGS) -o$(TARGETW) -TWIN32 -WG
    
    win64: clean
    	$(FPC) $(UNIT) $(INCLUDE) -FE$(OUTPUT) -FU$(TMP) $(FLAGS) -o$(TARGETW) -TWIN64 -WG
    
    macos: clean
    	rm -Rf $(BUNDLE)
    	mkdir {$(BUNDLE),$(BUNDLE)/{Contents,Contents/{MacOS,Resources,Frameworks}}}
    	$(FPC_MAC)386 $(UNIT) $(INCLUDE) -FE$(OUTPUT) -FU$(TMP) $(FLAGS) -o$(TARGETM)-386
    	$(FPC_MAC)ppc $(UNIT) $(INCLUDE) -FE$(OUTPUT) -FU$(TMP) $(FLAGS) -o$(TARGETM)-ppc
    	lipo -create $(OUTPUT)$(TARGETM)-ppc $(OUTPUT)$(TARGETM)-386 -output $(BUNDLE)/Contents/MacOS/$(TARGETM)
    	rm $(OUTPUT)$(TARGETM)-386 $(OUTPUT)$(TARGETM)-ppc
    
    clean:
    	rm -f *.*~
    	rm -f $(TMP)*.*

  5. #5
    Oh, about using. I put this Makefile to directory with source code of demo. Then in terminal I go to this directory and run command "make macos" But if you use iMac every day this is not a good solution, I think...
    Last edited by Andru; 16-10-2010 at 06:19 AM.

  6. #6
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    Ok, I've installed the 0.9.29.x version (from snapshot) of Lazarus and FPC 2.4.0 and it's source, but I still have remains of the Lazarus configuration files which I need to replace with settings that will work. Why these settings are not updated on installation of a new version is beyond me. Makes for an 'extremely poor' installation practice if you ask me.

    So now I have to find and delete these files, where are they located? I'm still rather new to Mac/Linux so my knowledge is a bit unripened still. OR... can someone give me steps towards changing my configuration to FIND the right file for the 2.4.0 FPC compiler for my new installation of Laz.

    As a side note: I really, really HATE the way that Laz installs on Mac OS X. I would think that with enough people using it that it would be a bit more streamlined of a process. Macs are made to be simple, unlike Linux, however the Mac installers are just as bad as the Linux ones. There is no option to uninstall and the documentation doesn't even properly keep track of all the files that are thrown about my system unkempt. I think the Laz team seriously needs to get their Mac port's house in order here as it's hurting potential users of Lazarus on Mac. Which is such a shame as both the FPC and Laz people have put a lot of time and effort into Mac support.
    Jason McMillen
    Pascal Game Development
    Co-Founder





Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •