Crystal Space
Welcome, Guest. Please login or register.
October 22, 2014, 05:53:44 am

Login with username, password and session length
Search:     Advanced search
9010 Posts in 2044 Topics by 8784 Members
Latest Member: Beaburleson
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Support
| | |-+  Input focus with Python under MacOSX
« previous next »
Pages: [1] Print
Author Topic: Input focus with Python under MacOSX  (Read 2974 times)
griminventions
Newbie
*
Posts: 33


View Profile
« on: October 20, 2005, 07:30:26 pm »

I have built and installed Crystal Space, and I run the tutorial0.py script.  The window appears and it reports no errors, but there's no dock icon and if I press any keys they show up in the console instead of being captured by the CS window.  It doesn't seem to be able to obtain input focus. Does anyone have an idea of why this would happen?

Edit: I'm using Python 2.4.1 on OSX 10.3 and CS from CVS snapshot 10/18/05.
« Last Edit: October 20, 2005, 08:59:36 pm by griminventions » Logged
sunshine
Administrator
Sr. Member
*****
Posts: 294


View Profile
« Reply #1 on: October 20, 2005, 10:18:44 pm »

Normally, OSX will only allow real Cocoa .app's to gain keyboard focus and have a dock icon. Everything else is considered a background program. To fix this, you could create a Cocoa .app wrapper like the CS demo programs have, including the proper .plist files and whatnot.

It's probably possible to tell Cocoa programmatically that your program is an "interactive" application rather than a background application, but someone will need to research this. If you want to take a look at it to see if you can find out how to do it, then perhaps we can work the solution into CS so that pure-Python CS apps work properly.
Logged
griminventions
Newbie
*
Posts: 33


View Profile
« Reply #2 on: October 20, 2005, 10:45:48 pm »

Thanks for the info.  I'll definitely look into it since I want to use pure Python and my Mac.  Smiley
Logged
griminventions
Newbie
*
Posts: 33


View Profile
« Reply #3 on: October 20, 2005, 11:13:03 pm »

This was a lot simpler than I expected: I just used py2app and it worked fine (so far).  *drool*

Edit: I got happy too soon, but it's a step in the right direction. I don't think it's including everything since it appears to use the software renderer (fps sucks, no texture filtering) and the map was totally black, though particles were showing. If anyone else is attempting this (I have a feeling that sound I hear is a giant whoosh of being on my own) I'd like to collaborate to get this working.

(rant)
This is a really nice engine, but it's _far_ too difficult to build.  This is the second day of solid effort, and I still don't have all the components built (cal3d, ode says it's too old, libjpeg can't be found, sound test crashes, etc).  There would be a lot more activity around this engine if it was made more user friendly.  More contributors, more donations. Wink

Even supplying prebuilt binaries of dependencies for each platform would go a long way.  Assuming that getting the engine built is 90% of the reasons people are not using CS (my guess based on my frustrations while trying), I'm surprised the devs don't do this already.  Why are there no cal3d and ode prebuilts, for instance?  I know they're "optional", but anyone seriously wanting to use the engine will need them so in practical terms they are not optional.

No offense intended to the hard-working devs who have done an incredible job, but I'm very disappointed because this engine looks really powerful but I (and many others, I feel) can't use it because I can't get the engine fully built and working.
(/rant)
« Last Edit: October 21, 2005, 01:14:59 am by griminventions » Logged
dingobloo
Idle Extrordinare.
Global Moderator
Full Member
*****
Posts: 125


View Profile WWW
« Reply #4 on: October 21, 2005, 07:40:19 am »

There are pre-built binaries. but they are for windows. Also, (and no offence) but considering it's only been 2 days using the engine perhaps it would be too hasty to assume that building the engine is the reason that people shy away from crystalspace.
Logged
griminventions
Newbie
*
Posts: 33


View Profile
« Reply #5 on: October 21, 2005, 08:51:35 am »

Also, (and no offence) but considering it's only been 2 days using the engine perhaps it would be too hasty to assume that building the engine is the reason that people shy away from crystalspace.
What is a bigger problem than that for potential users of the engine?

Maybe it's easier on Windows, I haven't tried there yet. But if it doesn't work on my Mac then I won't be using it so I have to get it working there first. So far (>20 hours in) it's not happening.  It frustrates me that it's so difficult, because the engine seems like a great tool but I can't begin to use it because I can't get all the components to build.

*shrugs* Sorry if I stepped on some toes. I just want to make games.....
Logged
sunshine
Administrator
Sr. Member
*****
Posts: 294


View Profile
« Reply #6 on: October 23, 2005, 03:52:27 pm »

It's not clear that pre-built prerequisite packages would make much sense on Mac since most developers are already using Fink or DarwinPorts, both of which automate the installation of these packages. If you are a DarwinPorts user, for instance, getting the prerequisites typically is as simple as:

% sudo port install jpeg
% sudo port install libpng
...
% sudo port install libmng
% sudo port install swig

The other issue is that, if we supply a pre-built package containing all the prerequisites,  users of Fink and DarwinPorts might resent the fact that we are "replacing" or "overriding" packages which they have installed already via one of those package installers. Of course, there are some anomalies: packages which are not available via Fink or DarwinPorts, such as the CVS versions of ODE and cal3d. These might warrant pre-built packages.

It has been my intention to add to the CS documentation a full list of optional packages along with a reference about how to get/install them (such as Fink or DarwinPorts). Unfortunately, however, my time has been severely limited as of late.
Logged
griminventions
Newbie
*
Posts: 33


View Profile
« Reply #7 on: October 23, 2005, 08:20:57 pm »

It's not clear that pre-built prerequisite packages would make much sense on Mac since most developers are already using Fink or DarwinPorts...
That makes sense. Perhaps this should be noted in the docs for Mac?

Quote
It has been my intention to add to the CS documentation...
Can anyone edit the docs? I could update it some once I get everything working and figure out all the pieces.  I would at least be willing to help document Cal3D and ODE since those are currently the hardest to get working and are required for any non-trivial work.
Logged
sunshine
Administrator
Sr. Member
*****
Posts: 294


View Profile
« Reply #8 on: October 23, 2005, 09:42:14 pm »

The MacOS/X documentation for CS already does mention Fink and DarwinPorts.

The documentation for the CS manual is stored in CVS, and thus requires developer write access (which we give out pretty freely if you contribute regularly). We are happy to accept patches to the documentation. You are welcome to amend the documentation to address shortcomings you, as a new user, find in the discussions. You can find the original sources for the documentation at CS/docs/texinfo. The build instructions, in particular are at CS/docs/texinfo/build/platform.
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 8.95 seconds with 17 queries.