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

Author Topic: Mac OS X port to be continued  (Read 57430 times)

0 Members and 1 Guest are viewing this topic.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Mac OS X port to be continued
« Reply #60 on: July 22, 2010, 12:19:33 pm »
Quote
Currently I'm trying unsuccessfully to find out how to convert an image data (width, height, array of Uint8) to a NSImage to set up the application icon.

The following link should help:
http://stackoverflow.com/questions/2496113/creating-nsimage-from-nsbitmaprep-from-int-using-nsdata
Laurent Gomila - SFML developer

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Mac OS X port to be continued
« Reply #61 on: July 22, 2010, 12:24:49 pm »


I read this method in the doc… Arrrgg

Thank you!
SFML / OS X developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Mac OS X port to be continued
« Reply #62 on: July 22, 2010, 03:05:54 pm »
You should think about whether implementing SetIcon() is useful. The point is the application's icons often appears in the window bar on Windows, but hardly ever on Mac OS X. With the latest, the application icon is only visible in the Dock. The purpose is to keep being consistent with the OS being used.
Want to play movies in your SFML application? Check out sfeMovie!

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Mac OS X port to be continued
« Reply #63 on: July 22, 2010, 03:24:03 pm »
On this point I disagree. Indeed the SetIcon will not behave _exactly_ the same way for end-user experience as it will have on other operating system, that is setting the application icon instead of the window icon which doesn't exist on Mac. But it will (I hope) be appreciate that developers using SFML can modify the application icon to be more into the look-&-feel of Mac, that is having this icon in the dock and when switching from an application to another with cmd-tab.

The only «default» I see will only happen when there are more than one window open AND with different icon : calling SetIcon a second time will erase the first icon.

But it's only my point of view and if some people disagree with me then I will, of course, not implement this feature.  :wink:
SFML / OS X developer

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Mac OS X port to be continued
« Reply #64 on: July 22, 2010, 03:38:41 pm »
Even if it the icon appears only in the dock, why shouldn't we provide the ability to set it? It's still better than a default system icon, right?
Laurent Gomila - SFML developer

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Mac OS X port to be continued
« Reply #65 on: July 22, 2010, 03:40:51 pm »
And I would have displayed a big huge fancy image above for nothing ?  :P
SFML / OS X developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Mac OS X port to be continued
« Reply #66 on: July 22, 2010, 03:51:41 pm »
Quote from: "Hiura"
The only «default» I see will only happen when there are more than one window open AND with different icon : calling SetIcon a second time will erase the first icon.

That “could” be annoying. I dunno how icons are stored on Windows. Are they set programmatically ?

Because on Mac OS X, you put the icon in the application bundle, add the information to the Info.plist file (in the bundle application too), and the icon is set. Thus I wonder what's the best thing to do.
Want to play movies in your SFML application? Check out sfeMovie!

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Mac OS X port to be continued
« Reply #67 on: July 22, 2010, 04:00:08 pm »
If I'm right it's the same system on Windows : you write something into a .rc file at compilation time. But you certainly can do it programmatically, too.

I understand your point of view. It would be annoying if and only if you have such .plist file with icon.

But how many SFML users will have a .rc, a .plist (and some stuff for Unix) ? I don't know. (nor rhetoric and stylistic effect)
SFML / OS X developer

tsiegel

  • Newbie
  • *
  • Posts: 13
    • View Profile
    • http://www.softcon.com/mac/
Mac OS X port to be continued
« Reply #68 on: July 27, 2010, 10:40:09 pm »
Actually, blind folks who need speech already have a screen reader, so it's not really useful in that regard.  I was thinking more along the lines of saving the developer time and trouble, in that they wouldn't need to record sound files for characters talking, they could just generate the speech on the fly, saving both disk space, and memory.  It would also allow developers to get prototype
Quote from: "Laurent"
A text-to-speech API is not really on the todo-list.

It would obviously be helpful for blind people, but what other purpose could it have? Moreover, those system-specific APIs probably use the same voice file format.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Mac OS X port to be continued
« Reply #69 on: July 27, 2010, 10:44:01 pm »
By the way, I meant "those system-specific APIs probably don't use the same voice file format".
Laurent Gomila - SFML developer

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Mac OS X port to be continued
« Reply #70 on: September 30, 2010, 03:49:30 pm »
I'm still looking for the bug in my code (OSX port). I may have read the lines more than once... Maybe some fresh eyes could spot the error... If you have some knowledge of OpenGL, Cocoa and Obj-C please look at this code.

Of course, any comments on the code structure and style is welcome. :wink:

You can download the archive containing the last source here : http://www.mediafire.com/?ru7rw3zv3va0bma
(If you need anything else, please ask!)
SFML / OS X developer

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Mac OS X port to be continued
« Reply #71 on: October 12, 2010, 10:08:57 am »
Anyone?  :(
SFML / OS X developer

automata

  • Newbie
  • *
  • Posts: 8
    • View Profile
Mac OS X port to be continued
« Reply #72 on: October 23, 2010, 10:15:03 pm »
Hiura:

I downloaded the archive you linked to on mediafire. On OSX 10.6.4 with Xcode project file sfml.xcodeproj, set to configuration "dev_10_6":

I get link errors trying to build the window target.

Code: [Select]

Ld ../../lib/sfml2-window-64-dev.framework/Versions/10_6-dev/sfml2-window-64-dev normal x86_64
cd /Users/lew/Desktop/sfml2/build/xcode
setenv MACOSX_DEPLOYMENT_TARGET 10.6
/Developer/usr/bin/g++-4.2 -arch x86_64 -dynamiclib -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/lew/Desktop/sfml2/build/xcode/../../lib -L/Users/lew/Desktop/sfml2/build/xcode/../../extlibs/bin/x86_64 -F/Users/lew/Desktop/sfml2/build/xcode/../../lib -F/Users/lew/Desktop/sfml2/build/xcode/../../lib -filelist /Users/lew/Desktop/sfml2/build/xcode/sfml.build/dev_10_6/window.build/Objects-normal/x86_64/sfml2-window-64-dev.LinkFileList -install_name /Users/lew/Library/Frameworks/sfml2-window-64-dev.framework/Versions/10_6-dev/sfml2-window-64-dev -mmacosx-version-min=10.6 -framework Cocoa -framework OpenGL -framework IOKit -prebind -single_module -o /Users/lew/Desktop/sfml2/build/xcode/../../lib/sfml2-window-64-dev.framework/Versions/10_6-dev/sfml2-window-64-dev

Undefined symbols:
  "sf::GetDefaultLocale()", referenced from:
      sf::priv::WindowImplCocoa::SetTitle(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in WindowImplCocoa.o
  "sf::Clock::GetElapsedTime() const", referenced from:
      sf::Window::Display()    in Window.o
      sf::Window::Display()    in Window.o
  "sf::Clock::Clock()", referenced from:
      sf::Window::Window()in Window.o
      sf::Window::Window(void*, sf::ContextSettings const&)in Window.o
      sf::Window::Window(sf::VideoMode, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long, sf::ContextSettings const&)in Window.o
  "sf::ThreadLocal::~ThreadLocal()", referenced from:
      ___tcf_0 in GlContext.o
  "sf::ThreadLocal::ThreadLocal(void*)", referenced from:
      sf::ThreadLocalPtr<sf::priv::GlContext>::ThreadLocalPtr(sf::priv::GlContext*)in GlContext.o
  "sf::Clock::Reset()", referenced from:
      sf::Window::Display()    in Window.o
      sf::Window::Initialize()     in Window.o
  "sf::Err()", referenced from:
      sf::Window::SetActive(bool) constin Window.o
      sf::Window::Create(sf::VideoMode, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long, sf::ContextSettings const&)in Window.o
      sf::Window::Create(sf::VideoMode, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long, sf::ContextSettings const&)in Window.o
      sf::priv::VideoModeImpl::GetFullscreenModes()     in VideoModeImpl.o
      sf::priv::VideoModeImpl::GetFullscreenModes()     in VideoModeImpl.o
      sf::priv::SFContext::CreateContext(sf::priv::SFContext*, sf::ContextSettings const&, unsigned int)in SFContext.o
      sf::priv::SFContext::CreateContext(sf::priv::SFContext*, sf::ContextSettings const&, unsigned int)in SFContext.o
      sf::priv::WindowImplCocoa::SetIcon(unsigned int, unsigned int, unsigned char const*)in WindowImplCocoa.o
      sf::priv::WindowImplCocoa::ProcessEvents(bool) in WindowImplCocoa.o
      sf::priv::WindowImplCocoa::WindowImplCocoa(void*)in WindowImplCocoa.o
      sf::priv::WindowImplCocoa::WindowImplCocoa(void*)in WindowImplCocoa.o
      sf::priv::WindowImplCocoa::WindowImplCocoa(void*)in WindowImplCocoa.o
  "sf::ThreadLocal::SetValue(void*)", referenced from:
      sf::ThreadLocalPtr<sf::priv::GlContext>::operator=(sf::priv::GlContext*)in GlContext.o
  "sf::Sleep(float)", referenced from:
      sf::Window::Display()    in Window.o
  "sf::ThreadLocal::GetValue() const", referenced from:
      sf::ThreadLocalPtr<sf::priv::GlContext>::operator->() constin GlContext.o
      sf::ThreadLocalPtr<sf::priv::GlContext>::operator sf::priv::GlContext*() constin GlContext.o
ld: symbol(s) not found
collect2: ld returned 1 exit status


Is the project building for you? If so, is there anything special you are doing to get it to build? Am I using the wrong xcode project file?

automata

  • Newbie
  • *
  • Posts: 8
    • View Profile
Mac OS X port to be continued
« Reply #73 on: October 23, 2010, 10:25:57 pm »
Quote from: "Hiura"
I'm still looking for the bug in my code (OSX port).


I couldn't figure out what bug you were referring to by reading the thread. I'm not really proficent with ObjC or Mac programming in general, but I'm willing to give a look if I can know what I am looking for.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Mac OS X port to be continued
« Reply #74 on: October 24, 2010, 01:41:09 pm »
automata,

First I want to thank you for your time!  :)

Try to compile the «all» target. Because window module requires system module which seems not to be built yet the compilation fails.

Second, about «the bug» I may as you say forget to speak about it in this thread. So :

The problem is related to rendering and not to event/...

The SFML window module works fine or at least seems to work fine. OpenGL applications work correctly : they draw in 2D/3D their stuff as they should do.

But the graphics module doesn't work accurately. As soon as I use some graphics component I get either nothing (for example trying to display a sf::Image with a sf::Sprite display nothing onto the screen) or some really
funky stuff like http://hiura.tuxfamily.org/online/other/sfml/sfml_opengl_sample_failure_2010_08_17_21_55.tiff .

Please ask for any further information that seems important.
SFML / OS X developer

 

anything