Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [Mac] Weird problem with running my game on different machines  (Read 3625 times)

0 Members and 1 Guest are viewing this topic.

MarcuzPwnz

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
[Mac] Weird problem with running my game on different machines
« on: February 27, 2013, 07:28:12 am »
Hello there SFML users! Today a friend of mine was going to test one of my games for me, it's a basic game of Pong and it runs fine on my machine, but for some reason it will not work on his or my other Mac.

It's built using SFML 2.0 ("made" using CMake for C++11 )and was compiled in Xcode and distributed as an app that can be downloaded here: http://www.mediafire.com/?ql63pdue2qm85ws

All 3 computers we have tested it on are running Mac 10.7.5 but only mine could run the game, the others got the following error: http://i.imgur.com/utQNsfI.png

Am I missing anything? Was I suppose to include some .dll (or Mac equivalent) files with the .app or something?

Compiler Info:
i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)

Thanks. :)
« Last Edit: February 27, 2013, 07:33:07 am by MarcuzPwnz »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11053
    • View Profile
    • development blog
    • Email
AW: [Mac] Weird problem with running my game on different machines
« Reply #1 on: February 27, 2013, 08:15:20 am »
You also have to distribute the freetype library, at least the app is looking for it, as the error describes it preceisely. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

MarcuzPwnz

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: [Mac] Weird problem with running my game on different machines
« Reply #2 on: February 27, 2013, 09:55:09 am »
Oh, very nice! So should I just get my friend to put the freetype library folder in his /Library/Frameworks directory? :)

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11053
    • View Profile
    • development blog
    • Email
AW: [Mac] Weird problem with running my game on different machines
« Reply #3 on: February 27, 2013, 10:46:48 am »
The error message tells you where the app is looking for the lib.
But I've no idea about Mac... ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Acrobat

  • Full Member
  • ***
  • Posts: 153
    • View Profile
Re: [Mac] Weird problem with running my game on different machines
« Reply #4 on: February 27, 2013, 02:29:29 pm »
Just add post build event to copy freetype to Framework directory

Gan

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Re: [Mac] Weird problem with running my game on different machines
« Reply #5 on: February 27, 2013, 03:22:36 pm »
I had the same problem. Acrobat is correct. Just add a copy build event to copy the frameworks into the Frameworks folder inside the application.
If you don't know how to, I'll take screenshots of the process.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: [Mac] Weird problem with running my game on different machines
« Reply #6 on: February 27, 2013, 05:15:33 pm »
Actually, the lastest version of the templates should do that for you. Make sure you have them and not an older version. (If that's the case, you need to create the project from scratch.)
SFML / OS X developer

MarcuzPwnz

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: [Mac] Weird problem with running my game on different machines
« Reply #7 on: February 27, 2013, 07:03:46 pm »
I had the same problem. Acrobat is correct. Just add a copy build event to copy the frameworks into the Frameworks folder inside the application.
If you don't know how to, I'll take screenshots of the process.

Could you please? That would be very helpful. :)

Gan

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Re: [Mac] Weird problem with running my game on different machines
« Reply #8 on: February 28, 2013, 08:39:14 pm »


Click the button at the bottom right, click Copy Files. Then set it to Frameworks and add the frameworks.

MarcuzPwnz

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: [Mac] Weird problem with running my game on different machines
« Reply #9 on: March 01, 2013, 03:34:40 am »
I ended up just compiling the .app then showing its package contents and adding the freetype library in manually.

Thank you though. :)