Browser plugin nearing completion

Panda3D Forum Index -> Panda Features in Development Post new topic   Reply to topic
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next View previous topic :: View next topic  
Author Message
drwr


Posts: 8006
Location: Glendale, CA

PostPosted: Tue Nov 03, 2009 3:21 pm    Post subject: Reply with quote
I've found out why it doesn't work under Safari in 10.6. It turns out that Apple has removed support for all the QuickDraw interfaces for Safari plugins in 10.6. Plugins now need to use Core Graphics or Cocoa.

I'd be happy to upgrade our drawing interfaces to Core Graphics, but the biggest problem is that I don't know how to get documentation on this API! Clearly I don't know enough about where to find Apple documentation--Google is almost useless in these kinds of searches, turning up just pages of people asking very specific questions and getting very specific answers. Where are the reference manuals? Sure, I found Apple's "Mac OSX Reference Library", which helps; but even that seems to assume that I'll always be using XCode and creating my window with a nib file, which is precisely what we aren't doing.

I'd be happy to spring for a printed book, if that's the Apple way; but what book covers these sorts of questions? There are many books out there, and most of them appear to suffer from the same assumptions made by Apple's reference library.

Any advice for me?

David
astelix


Posts: 851
Location: Milano, ITA

PostPosted: Tue Nov 10, 2009 11:06 am    Post subject: Reply with quote
my 2 cents on this page

* EDIT * not - I see now you already dug it Sad
_________________
My Rig:
P3D 1.7.0@WinXP & Kubuntu 10.04- Athlon 64 5200 X2 ~ Radeon 3200HD (integrated)
KnolanCross


Posts: 29

PostPosted: Fri Dec 04, 2009 8:42 am    Post subject: Reply with quote
Hi, I am using this plug-in in my college project, it is really great.

I am facing a problem with sound, using FMOD and windows 7 32, the sound simply doesn't load, but the program run with no warnings or errors.
Is there any library/OS that is supported?

- Thanks in advance.
drwr


Posts: 8006
Location: Glendale, CA

PostPosted: Fri Dec 04, 2009 10:57 am    Post subject: Reply with quote
Sorry, I didn't build FMod support into my version of the plugin. At the moment, rdb is working on getting the official version of the plugin up-to-speed, and that one will support both FMod and OpenAL.

In fact, you can run your program against rdb's build today, by downloading http://runtime.panda3d.org/packp3d.p3d and using this program, instead of the one linked above, to build a p3d. Specify "-r fmod" (or "-r fmod,cmu_1.7" if that doesn't work) on the packp3d command line to enable FMod in the resulting app.

David
ThomasEgi


Posts: 1812
Location: Germany,Koblenz

PostPosted: Fri Dec 04, 2009 12:42 pm    Post subject: Reply with quote
hm i experienced soudn issues too under linux_64 using rdb's build.
if i had sound playing already it didnt load at all. if there was no sound playing it did load and play sounds nice. but it keept my soundcard locked until i closed firefox again. (closing the tab with the plugin didnt help)
_________________
rig: dell inspiron 1720; ubuntu 9.10_64 ;panda 1.7.0
may a catgirl be with you. nyaan nyan~~ ^.^
KnolanCross


Posts: 29

PostPosted: Thu Dec 10, 2009 7:53 am    Post subject: Reply with quote
Thanks a lot for the answer, I will try asap and give you some feedback.

Also, I am trying to use a plugin (pysqlite) in order to use database connection, but it is not recognizing the plugin. Is there any way to import it?
I need to connect to a database, I read somewhere (I believe in the blog) that I could use javascript with the browser plugin, can you give me some lines on this one (any file would help)?

Thanks a lot (again).
rdb
pro-rsoft

Posts: 5836
Location: Netherlands

PostPosted: Thu Dec 10, 2009 8:15 am    Post subject: Reply with quote
FYI (In case you haven't already seen it), there's a big manual chapter called "Advanced Scripting Techniques", covering JavaScript communication with the browser plugin. Maybe that will help.
drwr


Posts: 8006
Location: Glendale, CA

PostPosted: Thu Dec 10, 2009 11:01 am    Post subject: Reply with quote
KnolanCross wrote:
Also, I am trying to use a plugin (pysqlite) in order to use database connection, but it is not recognizing the plugin. Is there any way to import it?

I'm confused by your terminology. Do you mean you are trying to import the Python module pysqlite into your Panda application, and it doesn't work when you package your application into a p3d file?

In order to bring in a third-party Python module like this, you need two things: (1) you need a copy of the Python module for Python 2.6, and (2) you need to add that copy onto your sys.path when you construct your p3d file.

Future releases of packp3d.p3d will support the -p option to add a Python path to sys.path conveniently. Until rdb has had a chance to build a new release of packp3d, you can also do this same thing with a pdef file you construct and run with ppackage, as described in the stainless thread.

David
rdb
pro-rsoft

Posts: 5836
Location: Netherlands

PostPosted: Thu Dec 10, 2009 11:21 am    Post subject: Reply with quote
drwr wrote:
In order to bring in a third-party Python module like this, you need two things: (1) you need a copy of the Python module for Python 2.6, and (2) you need to add that copy onto your sys.path when you construct your p3d file.

Doesn't that defeat the whole purpose of .p3d: platform independentness?
Maybe we should add more packages (like this) in the rtdist build.

drwr wrote:
Until rdb has had a chance to build a new release of packp3d,

Probably in the weekend.
drwr


Posts: 8006
Location: Glendale, CA

PostPosted: Thu Dec 10, 2009 11:26 am    Post subject: Reply with quote
Quote:
Doesn't that defeat the whole purpose of .p3d: platform independentness?

Yes, it rather does.
Quote:
Maybe we should add more packages (like this) in the rtdist build.

Yes, I think you're right. We should probably add all the likely Python packages we think users might interested in using. This is a good candidate; so is pygame.

We can't possibly add every package that might be useful in practice, though, so there does still need to be a pathway for people to add packages locally that we didn't think of.

David
mavasher


Posts: 265
Location: Texas

PostPosted: Thu Dec 10, 2009 12:05 pm    Post subject: Reply with quote
I think psyco would be a good package for this list however it appears that it doesn't work with any 64-bit system.

http://psyco.sourceforge.net/
_________________
On Panda3DProjects.com:
http://www.p3dp.com/?mavasher
Hypnos


Posts: 546
Location: Zürich, Switzerland

PostPosted: Thu Dec 10, 2009 4:53 pm    Post subject: Reply with quote
would it make sense to integrate egg's (http://pypi.python.org/pypi/setuptools) to the system panda is using?
_________________
http://www.nouser.org/
BA Gamedesign, Zurich University of the Arts
drwr


Posts: 8006
Location: Glendale, CA

PostPosted: Thu Dec 10, 2009 4:59 pm    Post subject: Reply with quote
Hum. Tempting, a little bit, but I'm not sure how to make it work. Setuptools was designed to integrate into an installed Python distribution; whereas the Panda plugin runs in its own little sandbox, with an embedded Python interpreter and no Python directory structure to speak of.

Trying to force setuptools' system to work with Panda's system would be a classic example of squeezing a square peg into a round hole. It's probably possible, but the scars would be epic.

David
lethe


Posts: 466
Location: London, England

PostPosted: Fri Dec 11, 2009 3:20 am    Post subject: Reply with quote
If we are suggesting modules to have by default in the plugin system may I request numpy/scipy? (scipy.org) Slightly esoteric I know as its a scientific computation library, but its got arbitrary dimension arrays and truck loads of optimizers etc. which are really useful for accelerating certain kinds of computation, especially of the parallel kind. Obviously theres a bit of overlap with what Panda already provides, but I can see it being rather useful for DIY particle systems, procedural geometry/textures, and AI. (All of which I would traditionally drop down into c++ to do, but thats a mighty inconvenient option for a browser plugin.) (I've never actually done this with Panda, but use scipy all the time at work for all sorts of far crazier stuff. Admittedly my favorite feature, scipy.weave, would have to be disabled unless you plan to ship an entire c++ compiler into the game system as well, but its really the ability to do repeated large dataset calculation quickly and optimize arbitrary functions that I'm after here.)
Hypnos


Posts: 546
Location: Zürich, Switzerland

PostPosted: Fri Dec 11, 2009 9:44 am    Post subject: Reply with quote
i dont think that it's reasonable that every possible 3th party package is maintained by panda3d. iirc it is possible to add lib's to a p3d package on your own, but to have it platform independant it will need the lib for all platforms included (or (down)-loaded separately). is this correct?

summary of suggestions and other possible libs to include:
- pygame
- scipy/numeric
- panda-physx
- box2d
- PIL
- twisted
- xml
- database connection libs (mysql, , etc.)
- python-opencl
- vtk (http://www.vtk.org/)
- cgal (http://www.cgal.org/)
_________________
http://www.nouser.org/
BA Gamedesign, Zurich University of the Arts
drwr


Posts: 8006
Location: Glendale, CA

PostPosted: Fri Dec 11, 2009 11:19 am    Post subject: Reply with quote
Quote:
i dont think that it's reasonable that every possible 3th party package is maintained by panda3d. iirc it is possible to add lib's to a p3d package on your own, but to have it platform independant it will need the lib for all platforms included (or (down)-loaded separately). is this correct?

Yes, this is correct; and furthermore the user will have to be conscious of the version of Python in use (2.6) and install it properly for all supported platforms.

It is therefore burdensome to the user to have to add a third-party python lib to his p3d package. It also, of course, burdensome to the panda3d maintainer (rdb) to pre-add these third-party python libs, because he has to guess which libraries are needed and install them on each supported platform.

As you point out, it is certainly impossible to support every possible package. But I think it is fair to support a reasonable number of commonly-used packages, to make it easier for 95% of Panda developers. The other 5% can go through the extra effort required to add their desired packages to their p3d files.

David
rdb
pro-rsoft

Posts: 5836
Location: Netherlands

PostPosted: Thu Dec 17, 2009 2:47 pm    Post subject: Reply with quote
I've just put up a new plugin release. Download links:
Windows: http://mac.rdb.name/~rdb/builds/Panda3D-Runtime-0.9.8.exe
Mac OSX: http://mac.rdb.name/~rdb/builds/Panda3D-Runtime-0.9.8.dmg
Ubuntu: https://launchpad.net/~panda3d/+archive/ppa
OpenSUSE: http://packman.links2linux.org/package/panda3d-runtime

I think the OSX build should work on PPC now as well, please test it if you have a ppc mac machine.
Here are some demos: (thanks go to Xidram for building the demo pages)
http://www.panda3d.org/demos/
I have yet to add more of those.

Furthermore, I've added the following extra packages as requested: sqlite, numpy, pygame, twisted, pil, pyopengl, httplib2, pycurl. The last two don't work on Windows yet for some reason.

Please report any problems you might encounter.
drwr


Posts: 8006
Location: Glendale, CA

PostPosted: Thu Dec 17, 2009 4:24 pm    Post subject: Reply with quote
Good stuff! Sadly, it does not run on my PPC mac. It can't even load the plugin itself, nor can it run /usr/bin/panda3d--gcc shows a bus error occurring in NSApplicationLoad, which we do call at static init time. But I haven't seen it crash when this call is made in my own build, so I'm not sure what the problem is.

It might be a version issue, more than an architecture issue: my PPC mac is also running 10.4. Does anyone have a PPC running 10.5?

David
sierracharlie


Posts: 66

PostPosted: Thu Dec 17, 2009 5:46 pm    Post subject: Reply with quote
Has WxPython been added as an extra package?
drwr


Posts: 8006
Location: Glendale, CA

PostPosted: Thu Dec 17, 2009 6:07 pm    Post subject: Reply with quote
wxPython is available, use "-r wx" to the packp3d command line to add it to your p3d file.

However, the wx package only appears to be defined on Windows builds right now. The Linux and Mac builds lack it.

Note that you may need to get a new packp3d file from http://runtime.panda3d.org/packp3d.p3d .

David
KnolanCross


Posts: 29

PostPosted: Fri Dec 18, 2009 11:54 am    Post subject: Reply with quote
My project presentation took place today.
So I am here to thank you for all the support and for this great plug-in. The presentations were very interesting, people used many different IDEs (XNA, irrlitch, ogre and even a group that developed an IDE based on stick draws). My group was the only one using panda 3d...

I fell like I should give you some kind of feedback so here are the problems my group found (I was programming the spell animations so I did not work much on this):
- all the models had to be in the same directory as the code in order to be imported.
- We have no idea where our sql database ended up hosted.
- We could not load txt files together with the p3d file ("solved" since we could just read them from the DB)
- Also there was a model (a big yellow arrow) that wouldn't load in the p3d version of the program.

I guess that is it, thanks for all the Help.
mavasher


Posts: 265
Location: Texas

PostPosted: Sun Jan 03, 2010 7:29 pm    Post subject: Reply with quote
This is probably going to be a really stupid post.

I'm trying to test out putting little demos into the plug-in. The manual entry on this was great for explaining things but I can't find a copy of packp3d.p3d anywhere and my attempts to download it from some of the links result in time-outs or crashes.

I'm assuming that packp3d.p3d will be included in 1.7.0 and that the manual is just writing about the way it will work once it's out.
_________________
On Panda3DProjects.com:
http://www.p3dp.com/?mavasher
drwr


Posts: 8006
Location: Glendale, CA

PostPosted: Mon Jan 04, 2010 12:54 am    Post subject: Reply with quote
You can download the interim version of packp3d.p3d from http://runtime.panda3d.org/packp3d.p3d . But yeah, it will also be part of the 1.7 release.

David
ThomasEgi


Posts: 1812
Location: Germany,Koblenz

PostPosted: Mon Jan 04, 2010 1:55 am    Post subject: Reply with quote
getting a "this application has not been signatured, there is no way of knowing who wrote it- press cancel to not run it" error for asteroid and ball in a maze demo. pluginversino is 0.9.8.
_________________
rig: dell inspiron 1720; ubuntu 9.10_64 ;panda 1.7.0
may a catgirl be with you. nyaan nyan~~ ^.^
rdb
pro-rsoft

Posts: 5836
Location: Netherlands

PostPosted: Mon Jan 04, 2010 3:49 am    Post subject: Reply with quote
Hm. I'm guessing I signed it with my old certificate, that has recently been revoked by Thawte.
I'll resign and upload them soon.

For the record, plugin version 0.9.10 is already in the PPA. Instructions how to install it can be found here:
http://www.panda3d.org/download.php?runtime&platform=ubuntu
And for 64-bits karmic, the buildbot also has daily builds of the plugin.
mavasher


Posts: 265
Location: Texas

PostPosted: Mon Jan 04, 2010 9:48 am    Post subject: Reply with quote
Thanks for the link to packp3d.p3d.

I couldn't get packp3d to actually pack from the commandline like the manual says- I kept getting a Windows pop-up error message that said:
"Runs 3-D games and interactive applets has stopped working..."

I'm having other problems now. I upgraded my plug-in to 0.9.8 for Windows 32 and now it crashes Chrome, Firefox, and IE which I never use.

I previously had 0.9.7 which ran tagger and the demos fine on Chrome and Firefox- don't know about IE, I didn't try. To get 0.9.8 I uninstalled 0.9.7 using the uninstall exe in the panda3d folder then went back into tagger to download the plug-in again.
_________________
On Panda3DProjects.com:
http://www.p3dp.com/?mavasher
rdb
pro-rsoft

Posts: 5836
Location: Netherlands

PostPosted: Mon Jan 04, 2010 1:36 pm    Post subject: Reply with quote
Er, 0.9.8 is a bit outdated already. I'll put up an official 0.9.10 release this week.

You should try the daily plugin snapshot from:
http://www.panda3d.org/buildbot/
Choose the "Runtime Build".
mavasher


Posts: 265
Location: Texas

PostPosted: Mon Jan 04, 2010 10:37 pm    Post subject: Reply with quote
ok, got the new runtime, packed a p3d file. Got it working. I uploaded it to p3dp to test this out.

I copied David's code from tagger. Got it to load it. The next hurdle was the certificate business.

I read through the manual about the certificates. But then came the frustrations- openssl doesn't have any out-of-the-box binaries for Windows. They just offer source. But I don't have any complier on my windows box and think this is overkill. I found something of a compiled version and got it to create a .pem file with the
Code:
openssl genrsa 1024 > cert.pem
command. But the next command failed:
Code:
C:\openssl\bin>openssl req -new -x509 -nodes -sha1 -days 365 -key cert.pem >> cert.pem
Unable to load config info from /usr/local/ssl/openssl.cnf


I've looked through the internet for this error but no luck on a solution. And the file in question somehow didn't make it into the build I downloaded. I tried packp3d anyway to see what would happen but it didn't like the .pem file.

I have PGP on my system but can't figure out how to get it to export a .pem file. Anyone have any ideas? I just want to test the thing, I don't need or want it to be uber secure at this point.
_________________
On Panda3DProjects.com:
http://www.p3dp.com/?mavasher
rdb
pro-rsoft

Posts: 5836
Location: Netherlands

PostPosted: Tue Jan 05, 2010 3:36 am    Post subject: Reply with quote
Er, openssl.exe should be shipped in Panda's "bin" dir. Also, there's a website that offers binary downloads of OpenSSL, Google for "Win32 OpenSSL".

However, it's easier to get yourself a trusted certificate. You can get a free one from Comodo:
http://www.instantssl.com/ssl-certificate-products/free-email-certificate.html
mavasher


Posts: 265
Location: Texas

PostPosted: Tue Jan 05, 2010 5:54 pm    Post subject: Reply with quote
Thanks rdb,

I still couldn't get openssl to work but comodo worked after some goading. So I loaded up some shaders I've been working on. My HTML really sucks at the moment, I've forgotten everything so bear with me. I have 3 programs up.


http://mavasher.p3dp.com/
_________________
On Panda3DProjects.com:
http://www.p3dp.com/?mavasher
Display posts from previous:   
Post new topic   Reply to topic    Panda3D Forum Index -> Panda Features in Development All times are GMT - 5 Hours
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Page 4 of 7

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group