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

Author Topic: .app not running on mac  (Read 1195 times)

0 Members and 1 Guest are viewing this topic.

www

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
.app not running on mac
« on: January 02, 2017, 11:54:41 pm »
I've been working through the SFML game development book and I've run into a problem- I have a program that runs fine in Xcode, but the .app file doesn't run. In the book, it has all the resources sorted into different folders, and they are referenced like Media/Textures/Buttons.png
which breaks in Xcode because when it is run, it copies each individual file into the Resources folder in the .app file, and the prefixes mess it up. So, I changed the working directory from .../Xcode/DerivedData/.../Build/Products/Debug/Resources to the same folder that has my .xcodeproj file (/Users/Documents/projectname/projectname) and now it runs fine when I hit run in Xcode- but the .app file immediately closes.

Am I supposed to fix this by changing the working directory back to .../Build/Products/Debug/Resources and deleting all the prefixes from the filenames in the code?

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: .app not running on mac
« Reply #1 on: January 03, 2017, 06:02:07 pm »
Please refer to http://www.sfml-dev.org/tutorials/2.4/start-osx.php#create-your-first-sfml-program and the links it provides to understand how app bundles work w.r.t. resource files and paths. I don't expect books to speak about such OS-specific stuff.

If you have specific question after reading this material, ask.
SFML / OS X developer