Browser plugin nearing completion

Hmm, that is annoying. In my little demo, I have only compiled one Linux plugin, and I don’t have the time or resources to recompile it differently for each distro that is out there.

But we can do this for the production release. Also, I believe pro-rsoft is working on a deb file/rpm file that will have proper dependency relationships indicated for library versions like this.

Edit: actually, on reflection, this is the “core API” which is failing to load, which is part of the second stage of the plugin system, and thus can’t easily be built separately for different distros. Hmm, this might be more of a problem than I thought. Perhaps it will be more important to link with a static version of libjpeg after all.

David

sry for the late reply, it does run on snow leopard using firefox, but not using safari. apart from that it seems to work fine. safari doesnt even list the plugin under the installed ones right now, iirc it was listed previously in there.

(open file:///Applications/Safari.app/Contents/Resources/English.lproj/Plug-ins.html in safari to list them)

Hm, that will be a problem on 64-bits unixes, linking a static library into a dynamic library. We could work around that by compiling our own versions of libssl, libjpeg, etc. though.

Amazing work drwr! Works flawless in FF 3.5.3, Windows 32bit. I’m very excited to follow the progress on this and being able to use it in the future.

Alex

Latest update: there is now (with many thanks due to pro-rsoft) a proper OSX installer, similar to the Windows installer.

Mac users, please delete the panda3d program you might have downloaded from my link in a previous post, and run the new installer instead: this will provide both /usr/bin/panda3d, for running p3d files on the command line, and /Applications/Panda3D.app, for running p3d files from Finder or your desktop. Please let me know if you have any difficulties with these programs, especially those of you who reported problems with earlier versions of the panda3d executable.

Edit: oh yeah, don’t forget to delete ~/Library/Internet Plug-Ins/nppanda3d.plugin. The new installer places this in /Library instead, so the one you may have put in your personal directory should be removed when you run the installer.

David

seems to work fine under safari. but i still got the problem with safari under 10.6 where it doesnt run, however it’s listed under the plugins page now.

after downloading a p3d file it also runs using the panda3d.app.

great work.

Does anything new appear in the log directory ~/Library/Caches/Panda3D/log when you attempt to run it under Safari?

David

it does create a new log-entry in p3dplugin.log:

new instance 0x10cada
new instance->pdata = 0x11ba70
start_download: https://apollo.ddrose.com/~drose/p3d_7/contents.xml?1256663154

the other files are unaffected.

could it have to do with having a second browser already open? gotta test that.

edit: no that doest affect anything

Just tried it. This is the coolest thing in the world (of panda3d, at least)! This will open up many doorways for the engine. Thank you david!

I have an issue with the p3d packer. For my megaman class, Megaman(): I get a syntax error when I do a panda3d packp3d.p3d. To fix it, I changed Megaman(): to Megaman(DirectObject): and it compiled fine and ran in a browser. However, Megaman(DirectObject): is not necessary when running the program through the regular offline engine. Is this a python problem?

Empty () at the end of a class def is not allowed in python 2.4. Simple remove them, and it will work fine. The release build will use a newer python where this will not be an issue.

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

my 2 cents on this page

  • EDIT * not - I see now you already dug it :frowning:

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.

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

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)

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).

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.

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

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

Probably in the weekend.

Yes, it rather does.

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