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 - esotericsean

Pages: [1] 2
1
Really appreciate it Cornstalks.

I did use Universal and Franeworks when setting up the project.

Opened that .sh file and it opened up in Xcode, here's what's in it:

Quote
#!/bin/sh
# This shell script simply copies required sfml dylibs/frameworks into the application bundle frameworks folder.
# If you're using static libraries (which is not recommended) you should remove this script from your project.

# Are we building a project that uses framework or dylibs ?
case "$SFML_BINARY_TYPE" in
    DYLIBS)
        frameworks="false"
        ;;
    *)
        frameworks="true"
        ;;
esac

# Echoes to stderr
error () # $* message to display
{
    echo $* 1>&2
    exit 2
}

assert () # $1 is a boolean, $2...N is an error message
{
    if [ $# -lt 2 ]
    then
        error "Internal error in assert : not enough args"
    fi

    if [ $1 -ne 0 ]
    then
        shift
        error "$*"
    fi
}

force_remove () # $1 is a path
{
    test $# -eq 1
    assert $? "force_remove() requires one parameter"
    rm -fr "$1"
    assert $? "couldn't remove $1"
}

copy () # $1 is a source, $2 is a destination
{
    test $# -eq 2
    assert $? "copy() requires two parameters"
    ditto "$1" "$2"
    assert $? "couldn't copy $1 to $2"
}

require () # $1 is a SFML module like 'system' or 'audio'
{
    dest="$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.app/Contents/Frameworks"
   
    if [ -z "$1" ]
    then
        error "require() requires one parameter!"
    else
        # clean potentially old stuff
        force_remove "$dest/libsfml-$1.2.dylib"
        force_remove "$dest/libsfml-$1-d.2.dylib"
        force_remove "$dest/sfml-$1.framework"
   
        # copy SFML libraries
        if [ "$frameworks" = "true" ]
        then
            copy "/Library/Frameworks/sfml-$1.framework" "$dest/sfml-$1.framework"
        elif [ $CONFIGURATION = "Debug" ] && [ $SFML_LINK_DYLIBS_SUFFIX_DEBUG != "" ]
        then
            copy "/usr/local/lib/libsfml-$1-d.2.dylib" "$dest/libsfml-$1-d.2.dylib"
        else
            copy "/usr/local/lib/libsfml-$1.2.dylib" "$dest/libsfml-$1.2.dylib"
        fi
       
        if [ "$1" = "audio" ]
        then
            # copy sndfile framework too
            copy "/Library/Frameworks/sndfile.framework" "$dest/sndfile.framework"
        fi

        if [ "$1" = "graphics" ]
        then
            # copy freetype framework too
            copy "/Library/Frameworks/freetype.framework" "$dest/freetype.framework"
        fi
    fi
}

if [ -n "$SFML_SYSTEM" ]
then
    require "system"
fi

if [ -n "$SFML_AUDIO" ]
then
    require "audio"
fi

if [ -n "$SFML_NETWORK" ]
then
    require "network"
fi

if [ -n "$SFML_WINDOW" ]
then
    require "window"
fi

if [ -n "$SFML_GRAPHICS" ]
then
    require "graphics"
fi

SFML_BINARY_TYPE is set to FRAMEWORKS, screenshot: http://i.imgur.com/OXcOQUZ.png

2
Thanks so much, Cornstalks!

Followed your tutorial to the tee, but I'm getting one error: "Shell Script Invocation Error, Command /bin/sh failed with exit code 2"

Here's a screenshot: http://i.imgur.com/LGyLchh.jpg

Any idea what that means? Thanks!

* * *

BTW, Laurent I know it's not your job to help me. Which is why I'm posting in your public forums for help, where hopefully other users can chime in. I understand if you personally don't have time. Appreciate it, though!

3
I'm sorry Hiura, I know you've put in a lot of work on this. I won't give up. :)

I'm not an expert programmer (my main job is video production), so the directions in the tutorial are hard for me to follow because I don't understand what all of it means. I have read it very thoroughly, several times, but I'm still having trouble.

I've tried both the already compiled binaries and also compiling them myself, both times I've run into linker errors. It works for some people, so I know that I'm doing something wrong -- I'm trying to take it step by step and figure it out.

4
I'll keep trying, thanks for your time.

Almost ready to give up on SFML and try something else. It's a shame, I really loved 1.6 and want to try working with 2.0

5
Thanks guys,

I was finally able to successfully compile it using Makefile. But projects still won't run by default in Xcode. Do I need to change the linker settings?

Here are the errors I'm getting: http://i.imgur.com/i6P3OjD.jpg

6
Okay, so I used CMake and checked Unix Makefiles and specified the native compilers for C and C++ (/usr/bin/clang and /usr/bin/clang++, respectively).

This time, it didn't generate a project file for me to compile using Xcode. Instead, it generated a folder that looks like this:



No clue what to do next. Doesn't look like there are any files for me to actually compile.

7
I might have built for Xcode. Let me try that.

8
Hey everyone,

Really appreciate any help with this. I used to have 1.6 running in Code::Blocks back in the day. Now I have a Mac and am learning Xcode. I don't remember SFML being this complicated to install and get running, although I'm not the great programmer. Here is everything I did, please let me know where I went wrong:

1. Downloaded the latest FML 2.0 Source and "compiled" it with CMake and Xcode. Everything looked like it was successful. I used the CMake GUI.

2. Transferred the SFML templates into the correct folder and created a new SFML Project (C++98 with GCC and libstd++ and target 10.5).

3. Try to build and get the following errors:


4. I've messed with build settings, linker settings, etc. but can't seem to figure out what exactly is wrong.

9
Feature requests / SFML for iOS?
« on: April 29, 2011, 09:46:45 pm »
Awesome! I really love SFML, it's enabled me to learn so much about game development without having to focus on learning OpenGL or something overly complex. Excited to see it get bigger and bigger. :)

10
Feature requests / SFML for iOS?
« on: April 29, 2011, 08:57:25 pm »
I'm developing a game on my PC in C++ and SFML. I can use the exact same code on my Mac in Xcode and it runs perfectly.

I'm just curious if there might be support for iOS one day? I know I would still need to learn a little bit of Obj-C to do a port of my game, and converting SFML to OpenGL isn't too complicated. But having a working version of SFML for iOS would be pretty awesome.

Thoughts?

11
Graphics / RenderWindow Not Displaying
« on: April 08, 2011, 08:14:45 am »
Yep, looks like that was it. When I reformatted, I actually switched from an NVIDIA to an ATI card (as well as a couple other upgrades). I downgraded to Catalyst 10.9 and it works!

I must have reinstalled SFML about 10 times trying to get this to work, making sure every file was in the exact place it was supposed to be. So glad it works now. :)

. . .

Does this mean apps written in SFML 1.6 won't run for anyone with an ATI card with the newest display drivers?

12
Graphics / RenderWindow Not Displaying
« on: April 08, 2011, 01:12:07 am »
Hmm, seems like some things do:



But then again, when I try and run an older compiled .exe of the game I was working on, it doesn't run. Just hangs for a while and then the process disappears. (It does run on other computers)

13
Graphics / RenderWindow Not Displaying
« on: April 08, 2011, 12:14:39 am »
Seems to be all normal, but this is what I'm trying to run.

I've tried opening up my game as well and it's doing the same thing, so I'm 99% sure it's something wrong with my setup, installation, build options or something.

When I try to close the console window, it acts like it's going to hang and then (about 5-10 seconds later) finally closes.

14
Graphics / RenderWindow Not Displaying
« on: April 07, 2011, 11:15:22 pm »
I had SFML working perfectly, starting making a game, then I reformatted my computer and re-installed Code::Blocks and SFML and now I can't get it to work correctly.

I'm pretty sure I have it set up correctly. I can create a console window, but not a render window. It just seems to hang.

Any idea what might be causing this?

15
Audio / Having trouble getting sf::Music working in Xcode
« on: January 31, 2011, 05:26:33 pm »
Quote from: "Ceylo"
You're still not linking your app against the sfml-audio framework.


Ohh, now I understand. It wouldn't let me copy it before, so I had to do it manually. Finally works! Thanks so much :)

Pages: [1] 2
anything