I’m attempting to build a web-player version of a project that I’m working on, and I’m hitting a problem:
First, of the browsers that I’ve tested (Firefox and Chrome under Windows 7 and Firefox under Ubuntu, I think that it was), none have automatically offered the option to install the plugin – is this expected? Are users expected to go to the runtime download page, install the resultant download and only then go to my embedding page, or is something going wrong with the browsers or my embedding page? A quick test with a page embedding a Unity game seemed to offer the option to install the Unity plugin.
I’ve done some searching of the forum and manual, but haven’t managed to find anything that seemed promising.
Panda does have the ability to do so, but we don’t ship it with the default runtime build. Check out make_installer.py in direct/src/plugin_installer, it has the ability to generate a .cab file or .xpi file for exactly that purpose.
Hmm… Okay, I’m a little confused now, I’ll confess. Alas, the manual doesn’t seem to know about “make_installer”, and the search function on the forum insists on removing the underscore, giving me a fair few false positives to sift through.
To start with, I should perhaps mention that I’m rather new to web deployment; I decided to give it a shot for the small demo that I’m working on because web deployment is apparently one of the preferred methods in the developer community in which I want to post it.
I believe that I’ve found the script that you mention (under Ubuntu it seems to be just in direct/plugin_installer, not direct/src/plugin_installer), and, based on a look at the output of make_installer.py -h, it appears that it’s designed to create an executable that I would presumably then ask people to download and run – which seems somewhat odd to me.
Why would each developer targeting web-deployment build their own version of the plugin? Isn’t the idea that the plugin is common to all Panda3D applications, for a given platform?
I have the strong feeling that I’m missing something here…
There is no documentation on it besides the source code and -h output, sorry. The source code is fairly simple to understand, though. make_installer.py is used to generate the public runtime installer .exe, but can also generate a CAB file which can be used for automatic installation in Internet Explorer.
In the same directory you will also find make_xpi.py, which can generate an .xpi installer for FireFox.
The reason you need to build it yourself is because we don’t currently provide it as a public build. We probably ought to; there just hasn’t been much clamour for it.
You don’t need to build the plugin from source; you just need to populate a directory with the plugin .dll, .plugin, or .so (as appropriate) as instructed by make_xpi or make_installer.
So, if I understand correctly, I build the specified files (.exe, .dll, .so, etc.), then upload them all alongside my embedding page, and, in the most prominent browsers at least (I don’t expect support for every single browser currently available), users should see a prompt offering the plugin, is that correct?
No, you already have the specified files. You can download them from the Panda3D Runtime download page. nppanda3d.dll, for instance. Then, you run make_xpi in order to generate a FireFox installer for the plugin, etc. In the case of .xpi, you can just point the user’s browser to the .xpi file and it’ll automatically prompt to install the add-on containing nppanda3d.dll (or whatever is appropriate for that platform).
Ah, I see, thank you. I’m not sure that I have matter entirely correct, but I’ll experiment, I think. I’ll return if I don’t manage to get it working, I imagine.
Um… Between the “sys.platform” checks and the fact that running “make_installer” seems to run, but produce no apparent output, am I correct in guessing that these commands don’t work under Ubuntu?
However, if they do work, then I have further questions, I’m afraid:
First of all, what version number am I supposed to provide? That of my game? (Which doesn’t seem to make sense.) That of the Panda runtime? (But isn’t it supposed to just go and get the latest?) That of my version of Panda? (which make some sense… but then it was shipped with a specific version.) Something else that I’m missing entirely?
I see that “make_xpi.py” excludes Linux – am I then stuck with asking such users to go off to the Panda download page and install the runtime themselves?
I am sorry if these questions are becoming overmany, or are beginner questions: I’m not at all familiar with building programs for web-player (or the web in general), in Panda or otherwise.
It worked, but it was always kind of clumsy, and we never supported all the browsers in the world.
It would be possible to re-implement this logic for the Panda community. This would require the attention of a developer serious enough to do the research required for all currently extant browsers and platforms, and to continue to maintain this system as browsers continue to evolve. If you’re interested in being this developer, we’d welcome the contributions; you’d have to do a fair amount of research about web development and browser plugin development.
Or, you could simply direct users who lack the plugin to runtime.panda3d.org, which will also work, if a little less automatically.
Ah, I see – I had gotten the impression that the build process in Panda was made with web-deployment as the primary intended build system, with standalone modes secondary.
The reason that I’m so concerned about manually directing people to the plugin is that the more steps that are involved, the more likely someone is to decide that it’s no longer worth the bother of them continuing the process. I’m a member of another game development community that seems to provide very good and useful criticism and feedback on game projects. Over there the preference seems to be first for a single-download zip file (specifically one that doesn’t install anything to directories other than the zip extraction location), then web-player, then other forms – a few have even voiced preference against installers, citing dislike of having it install things that they don’t know about to various parts of their system, all for a demo that’s likely to be removed in fairly short order.
For myself, I rather prefer the installer route – and it occurs to me that web-player is likely to install things to their system anyway – but would prefer to have my demos available in a form preferred in general by the community in question.
However, it looks to me as though the process of building for the web-player in Panda is not something that I want to wrestle with, especially as it’s not a form of distribution that I’m terribly fond of. I might offer a web-build with a link to the runtime, but I think that I’ll keep installers as my primary build system; if that results in less feedback, then that’s a pity, but so be it.
Thank you very much for your patience, both of you!
We wrestled with these same discussions at Disney. It’s remarkable the strength of people’s opinions on which is the only correct form of distribution.
Let me point out, though, that the embedded-browser version of p3d is indeed the intended primary method of p3d distribution; but in its simplest usage it does require the user to explicitly install the Panda3D plugin. To go to the next level, with automatic plugin installation, does require considerably more effort on the web developer’s part; and while that may successfully lower the barrier to entry for the end user, that may or may not be actually necessary or even desirable (and this is a much deeper discussion).
Explicit plugin installation is not the end of the world. It allows the user to feel more comfortable with what is being installed on their machine. It is still easy for a naive user to do. It is also no different from Flash’s initial distribution model, nor Unity’s, nor dozens of other browser-based games. (Flash has, of course, achieved nearly 100% penetration of pre-installed plugins; and Unity has the manpower to maintain automatic browser support for all browsers.) Panda doesn’t have anyone responsible for maintaining this yet, but it could if someone were to volunteer; and in the meantime it is still a perfectly suitable distribution model even without that level of integration.
Hmm… Fair enough, and good points all.
I think that – presuming that all goes to plan – I’ll go for the both: the simple web-build (with a basic html href link to the plugin download page) and an installer-based version. That should at least give people options.
(The final product, however, will by far and wide most likely be installer-only.)
Oh, it’s quite simple: the only correct form of distribution is the one that I say is the correct form of distribution.
For the record, the official link that you can redirect people to is panda3d.org/get . This is guaranteed not to change and to always bring the user one button click away from the runtime download.
Excellent, and thank you.