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

Author Topic: Help with distribution for macOS (Xcode not working)  (Read 519 times)

0 Members and 1 Guest are viewing this topic.

Unicode

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Help with distribution for macOS (Xcode not working)
« on: December 15, 2023, 08:43:38 pm »
Hi.

I recently had to work with macOS and sfml on it and it was a real pain until now.
My problem is that I have to distribute a macOS version of an sfml project (originally on windows) which I for some reaseon can't get to work at all.
It feels like I've searched the whole internet for a fix or any alternative but nothing seems to work and be assured, I have tried a lot. Searching in every website until google page ~10, asked all youtubers that made a tutorial on it why it won't work (most of them answered), searched through every forum I know of and tried every provided solution that may work and even tried every search engine available in my browser to mabye get some different search results. Nothing seems to fix it or in other words, no one seems to have my problem.

For an easy distribution I wanted to use Xcode, so I exactly followed all the steps on the official tutorial page (using frameworks and the app template) and ticked a checkmark in Build Phases -> Run Script (because everyone was suggesting to do that due to an error). After doing that, it worked for everyone I saw but I just got an error saying the library could not be loaded and there was "no such file" of sfml-system.
Full error (Project name is "Testing"):
(click to show/hide)
I am on a virtual machine with root access running the latest macOS.

At some point I wondered if sfml would even work on this system (I don't know why I had conerns it wouldn't) so I used cmake to generate, in this case, unix makefiles to run a small test program and with that it worked perfectly fine. Since my goal isn't to code on mac but rather just to build an already existing and running project for sending it to other mac useres (at best to be run as an out of the box and ready to use program), it really doesn't matter how I get there as long as I do so. But to ship this cmake project as out of the box, I do not really understand how I can fit the library in there or just link it statically + there are also almost no resources out there (I am kind of a noob when it comes to more advanced command line stuff).

Concluding: All I want is just a way to ship my sfml project as an out of the box application to other mac users. I would prefer Xcode since it's the more mainstream way I think but everything which does the job is perfectly fine as well.

I would really appreciate if anyone could help me out or provide a hint in which direction I could further research.

Thanks :)

fallahn

  • Sr. Member
  • ****
  • Posts: 492
  • Buns.
    • View Profile
    • Trederia
Re: Help with distribution for macOS (Xcode not working)
« Reply #1 on: December 16, 2023, 04:31:53 pm »
To distribute applications on macOS you need to pay Apple $99 a year for a developer license, which lets you sign and notorize your binaries.

Unicode

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: Help with distribution for macOS (Xcode not working)
« Reply #2 on: December 16, 2023, 10:30:45 pm »
Thanks for the reply!

Yes that would be the next step looking into signing and all of that, but for now I would just like to get a simple *working* version which would compile elsewhere.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10820
    • View Profile
    • development blog
    • Email
Re: Help with distribution for macOS (Xcode not working)
« Reply #3 on: December 25, 2023, 09:38:21 pm »
The error message makes it sound like you haven't install SFML in /Library/Frameworks (that's the root-level Library directory which is usually hidden in Finder).
Can you show a screenshot of the folder contents?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Unicode

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: Help with distribution for macOS (Xcode not working)
« Reply #4 on: December 26, 2023, 09:10:50 pm »
Yeah looks like it, but I've done all the tutorial steps over and over again and nothing changed...
Here you go though.

Thanks