Results 1 to 10 of 31

Thread: Problem with FreePascal + MacOS

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
    By 'Bundle' I believe that he simply means the way an "App" is packaged...

    All those neat little App-like files that you just drag and drop into your Applications folder are really just fancy folders that contain files, yet act like an executable file. If you hold down the Option button while you right click on an "App" you'll see the option "Show Package Contents" to see the contents. If you select this you can go in and modify the contents. If your case add textures, audio files, etc...
    Jason McMillen
    Pascal Game Development
    Co-Founder





  2. #2
    I found the problem, guys.
    The problem is the unit cmem!
    I included it because I read that when using fpc threads we should include cthreads and cmem units as the first units in the program.
    But this breaks the program everywhere, things like SetLength fail, for example.
    FPC bug, or cmem is not needed anymore, or something else?

  3. #3
    Hm, I never used cmem, and my apps worked fine on Linux and MacOS X But if you need it, maybe you forgot that cmem unit should be the first unit in the uses clause?

  4. #4
    Yes, but do you use TThread?
    I don't really need cmem unit, so if you can use threads without it, better.
    Also, I can't really get a single window application running, APPTYPE seems to don't work in MacOS?
    My application now opens both a Carbon window and a console window, and while the console is useful for printing info, I want to be able to choose between having it or not.
    Any special switch I need to compile?
    (I don't use SDL or anything else, I create my window directly using Carbon, the code was based on a C++ sample I found on the web.)

  5. #5
    Quote Originally Posted by Relfos
    Yes, but do you use TThread?
    For sound streaming I use BeginThread. And I add unit cthreads to my uses clause.

    Quote Originally Posted by Relfos
    APPTYPE seems to don't work in MacOS?
    If you were read FPC documentation, you would know this...

    Quote Originally Posted by Relfos
    Also, I can't really get a single window application running, APPTYPE seems to don't work in MacOS?
    GUI applications under MacOS X are not an one single executable. You must "build" your own Bundle. Simple description "what is Bundle" can sounds like this: "Bundle is a directory with name which contains part "name" and ".app"(for example - MyApp.app). Inside this directory must be another one - Contents. Inside Contest must be directories Frameworks(for your libs/etc.), MacOS(for your executable, which must be with the same name as your bundle, in our case - MyApp) and Resources(where you must put all your resources)".
    Last edited by Andru; 03-02-2011 at 05:48 PM.

  6. #6
    Thank you, so I only need cthreads
    And, if I understood correctly, what I need to hide the console is create a bundle for the application?
    Seems simple, I will try.

  7. #7
    And, if I understood correctly, what I need to hide the console is create a bundle for the application?
    Yes, you need to create your own bundle for application

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
  •