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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Gan

Pages: 1 [2] 3 4 ... 7
16
There is a link to the «Bundle Programming Guide», follow it.
Please don't respond unless you can be helpful.


So I managed to make a bundle that can be shared(ran on other computers). I created a Folder, gave it a .app extension, copied a Info.plist from another app(edited the plist for my application), added the Resources, MacOS and Frameworks folder, copied the SFML frameworks to the Frameworks folder and boom it now works.

The only problem is now I can't get it to load a font that I place in the Resources folder.

Compiling with DUB produces an Executable file, I managed to hand-make a Application bundle for the Executable file.
To clarify my question:
How do I make my hand crafted Application Bundle load a font from the Resources folder?

17
@Hiura

The tutorial does not explain how to bundle the mac libraries so the SFML application written in D can use them.
Rather, it doesn't explain how to bundle the mac libraries with the executable for outside users to use at all.

@eXpl0it3r

The official tutorial doesn't work:
Quote
clang: error: unknown argument: '-frameworksfml-system'
clang: error: unknown argument: '-frameworksfml-window'
clang: error: unknown argument: '-frameworksfml-graphics'
clang: error: unknown argument: '-frameworksfml-audio'
clang: error: unknown argument: '-frameworksfml-network'


If you guys can prove me wrong by solving my problem, I will gladly eat my words. But at the moment the absolute worst thing(to me) about SFML is how difficult it is to let other people try out your executable.

18
Which one?

19
I'd rather not make an installer, but I wouldn't mind making an Application Bundle.

I'll try to figure out how to make a bundle.

20
Oh. Forgot to mention. My friends and I use Macs.
The program outputs a message on their machine that it can't find the libraries in some obscure place.

Edit:
dyld: Library not loaded: @executable_path/../Frameworks/libdsfml-graphics.2.dylib

21
I can run the executable on my machine but my friends can't run it on theirs.

How can I package it all together so the libraries are in/with the executable?


(I'm using SFML with the DSFML bindings in D language)

22
General / Re: The Beginning of an MMO
« on: January 28, 2015, 08:12:35 am »
You can have a Client-Ready response that the server will reply with map data to. When I made an online platformer game, I wrote out all my server and client packets in a text file to keep the organized and outlined the relationship between packets.

Client sending Login Data packet, server replies with Login State packet, if logged in the server send a Character Data packet, then server proceeds to send all the necessary info for the client to display the game. Map data and such. All players in the vicinity.

Online game networking is a lot of fun. I'm actually making an online space game in SFML.

23
Yay that fixed it.  :D

24
Oh. So I should make the thread sleep if it's going faster than 60fps?

25
No. I have it set up like the example program. A while loop for when the window is open. In that while loop I handle events, logic and drawing the window.

26
I'm running on a Mac and compiled my project using MonoD with D-SFML.

When I have my window completely hidden behind another window, CPU usage goes from 10% to 30%. I noticed it because my laptop's fans started whirring. If the window is slightly visible, CPU is 10%. As soon as I make the window completely not visible, it goes to 30% CPU usage.

It's not a serious problem but it is making my curious. Why does this happen?

27
D / Re: Loving it but a few questions
« on: January 26, 2015, 04:34:33 am »
I'll uh, ignore the issue until my project gets a little further.

28
D / Loving it but a few questions
« on: January 25, 2015, 05:10:20 am »
I'm using D-SFML on a Mac using Xamarin Studio and when I send my executable to another person, they can't run it. They get this error:

Quote
[1/24/15, 8:42:41 PM] Connors: terminal
[1/24/15, 8:42:43 PM] Connors: Last login: Sat Jan 24 19:41:59 on ttys001
/Users/Connor/Downloads/spacecraft ; exit;
Connors-MacBook:~ Connor$ /Users/Connor/Downloads/spacecraft ; exit;
dyld: Library not loaded: @executable_path/../Frameworks/libdsfml-graphics.2.dylib
  Referenced from: /Users/Connor/Downloads/spacecraft
  Reason: image not found
Trace/BPT trap: 5
logout

[Process completed]

How can I include the libraries with the binary?


Thanks,
Gan

29


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

30
General / Re: Pathing issues for resources
« on: February 27, 2013, 03:23:53 pm »
When loading resources on Mac you need to have the ResourcePath class and you pretty much just append the resource path to the file you're looking for.
And to detect version, I think you can use an #ifdef statement.

Pages: 1 [2] 3 4 ... 7
anything