Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: MAC Leopard + Lazarus + Dummy = ?LOST?

  1. #11

    MAC Leopard + Lazarus + Dummy = ?LOST?

    Quote Originally Posted by jdarling
    Unfortunately, nothing I build runs properly under Carbon . Command line apps all run ok, but the actual carbon apps just sit their doing nothing .
    As mentioned privately, in order for your application to run properly on Mac OS X you need to make use of Application Bundles.

    Create the following folder hierarchy...
    Code:
    MyApp.app ( then right click on it and select "Show Package Contents" )
      Contents
        MacOS
    Now copy your Mac OS exe into the MacOS sub-directory.

    If you now double click MyApp your application should now work like a normal Carbon application.

    I hope this helps others.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  2. #12

    MAC Leopard + Lazarus + Dummy = ?LOST?

    Quote Originally Posted by Delfi
    Quote Originally Posted by jdarling
    Yes, I'm running the Duo Core Intel MAC and yes I realize its similar to a PC (meaning Windows and Linux standard distros)
    It IS a pc.
    Interesting that Apple invented the PC (personal computer), but we identify as PC the architecture of their enemies, IBM. Ironic :lol:

    EDIT: And now HP tries to identify itself with the PC: "The computer is personal again" :lol:

  3. #13

    MAC Leopard + Lazarus + Dummy = ?LOST?

    Quote Originally Posted by cronodragon
    Quote Originally Posted by Delfi
    Quote Originally Posted by jdarling
    Yes, I'm running the Duo Core Intel MAC and yes I realize its similar to a PC (meaning Windows and Linux standard distros)
    It IS a pc.
    Interesting that Apple invented the PC (personal computer), but we identify as PC the architecture of their enemies, IBM. Ironic :lol:
    And now they use the same "enemy" ibm architecture and call it a "mac"... and fanboys still claim it's better than a pc..
    This is my game project - Top Down City:
    http://www.pascalgamedevelopment.com...y-Topic-Reboot

    My OpenAL audio wrapper with Intelligent Source Manager to use unlimited:
    http://www.pascalgamedevelopment.com...source+manager

  4. #14

    MAC Leopard + Lazarus + Dummy = ?LOST?

    Ok, so back on topic. So far here is what I have found out when dealing with Lazarus on Leopard:

    1) Download an SVN client
    2) Download and install the FPC DMG file
    3) Perform an SVN checkout of the Lazarus Source
    4) Perform "sudo make macosx install" in the trunk folder for Lazarus
    5) Drag the icon to the launch bar
    6) Create a new projects folder
    7) Create a new project and in the options set its output folder to "MyAppName/Components/MacOS/"
    Drop to the shell and create the same folder structure as mentioned in 7
    9) Build the test app and run it

    So far all is good. I'll have to see about putting together better documentation, but thats at least the high level that I've found works thus far.

    PS: Thanks greatly for your info Savage. I still can't get SDL or Lua applications to work, but this is due to it failing during linking. I'm guessing I'm going to have to put the .a or .so files some place everything can find them.

  5. #15

    MAC Leopard + Lazarus + Dummy = ?LOST?

    Jeremy, You didn't tell me you were using SDL as well, otherwise I would have provided more info.

    MacOS has the concept of "Frameworks", which are essentially application bundles for shared libraries. So here is what you need to do ( and has worked for me )...

    1. grab the SDL dmg files from the libsdl.org site and install them. There will install the SDL Framework.

    2. In your Lazarus project options (-k if you are using the command line) on Linking, you need to pass the following...
    Code:
    -framework carbon -framework cocoa -framework sdl
    obviously add similar things for sdl_mixer, sdl_image etc etc.

    3. Again in the Lazarus project options, on the Other tab in the "Custom options" section you need...
    Code:
    -XMSDL_main
    This is required because the SDL Framework requires a C style "main"
    and means you need a file called SDLMain.o which contains a main function called SDL_main. There may be a better way to do this, so if anyone find out how to do it, please let me know.

    4. in your project file you will need
    [pascal]
    {$IFDEF DARWIN}
    {$LINKLIB gcc}
    {$LINKLIB SDLMain}
    {$ENDIF}
    [/pascal]

    So the only thing left now is a missing SDLMain.o file.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  6. #16

    MAC Leopard + Lazarus + Dummy = ?LOST?

    Everyone seems to have missed my earlier post regarding JEDI-SDL and Mac OSX :cry:


    Do check out

    http://www.cerebral-bicycle.co.uk/viewdoc.asp?doc=349

    It's a good article on how to use JEDI-SDL with Mac OS X.
    EDIT: BTW Dom , it might be an idea to include an Intel and PPC SDLMain.o file in the JEDI-SDL release.
    <A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
    <br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
    <br /></A>

  7. #17

    MAC Leopard + Lazarus + Dummy = ?LOST?

    Not a bad idea Dean.

    I wonder if it's possible to create a Universal version of SDLMain.o so that only one file is required.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  8. #18

    MAC Leopard + Lazarus + Dummy = ?LOST?

    Quote Originally Posted by technomage
    Everyone seems to have missed my earlier post regarding JEDI-SDL and Mac OSX :cry:


    Do check out

    http://www.cerebral-bicycle.co.uk/viewdoc.asp?doc=349

    It's a good article on how to use JEDI-SDL with Mac OS X.
    EDIT: BTW Dom , it might be an idea to include an Intel and PPC SDLMain.o file in the JEDI-SDL release.
    I didn't miss it, I just found it difficult to follow . For a geek I'm pretty slow picking up new OS's apparently .

    So, if I have to put all the libs and stuff into the project for SDL apps to work properly will I have to do the same for Lua to work? Basically I've setup two test projects to try and get Lua to link and the other to get SDL to link. Following your directions I got the SDL to link, but I still can't figure out how to link Lua .

  9. #19

    MAC Leopard + Lazarus + Dummy = ?LOST?

    It might be an idea to post any error messages you get while linking.
    Are your Lua headers Mac OS X compatible?
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  10. #20

    MAC Leopard + Lazarus + Dummy = ?LOST?

    The Lua headers are the ones generated when I do a make on the Lua sources so they should be ok. The Lua interpreter doesn't have any problems with them .

    The funny thing is that I don't get any good error messages. It simply says: "ERROR while linking."

    I know it has something to do with the Lua.pas file and I've tracked it down a bit further but can't get enough information to actually do anything useful with it. IE: It has something to do with the LibraryName constant. I've tried everything from liblua to liblua5.1.so (including; liblua5.1.a, liblua.a, liblua.so) all of which exist in the lua frameworks folder . I wonder if I need to tell it where to find the framework folder or if I need to include the framework as you do with SDL.

    PS: Yes I still have my gmail account and check it quite frequently so that would be the best place to send files.

Page 2 of 3 FirstFirst 123 LastLast

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
  •