Mac OS X Prism Web Apps

133 views
Skip to first unread message

Afonso

unread,
Jul 1, 2011, 10:46:11 AM7/1/11
to mozilla-labs-prism
Hello,

I'm trying to use Prism to create a web app on Mac OS X, but the
problem I'm encountering is that I cannot move Prism.app from the
location it was when the web app was created.

Is there a way to change this behaviour?

Is there a way to make Prism have the webapp inside its .app?

Regards,
Afonso

Johnny

unread,
Jul 21, 2011, 9:53:57 AM7/21/11
to mozilla-labs-prism
I MADE IT!!!
I don't really know why the Prism guys didn't include an option to
create a bundle with your own web app that you can distribute.
That's in fact the reason I downloaded Prism in the first place.

But anyways, I figured it out by myself, so here we go:
You create your web app with Prism, which Prism will place in your
Applications folder. Then you right-click on the web app in the
Applications folder and select "Show Package Contents". Go to the
subfolder Contents/Resources. Then copy the Prism App inside this
folder. Now look for the file application.ini, also in the Resources
folder. Open it with a text editor. At the bottom you will find the
section [Environment]. Now change the following lines to that:
GRE_HOME=/Applications/Mywebapp.app/Contents/Resources/Prism.app/
Contents/Frameworks/XUL.framework
PRISM_HOME=/Applications/Mywebapp.app/Contents/Resources/Prism.app/
Contents/Resources
Of course you have the replace Mywebapp with the name of your app.

And that's it. If you distribute the App, make sure it will be put in
the /Applications folder, because of the absolute paths in
application.ini it will only run from there.


Cheers, Johnny

Q

unread,
Jul 21, 2011, 10:15:02 AM7/21/11
to mozilla-l...@googlegroups.com
This would rock if you could do it for all Prism apps, including for Windows. Being able to make redistributable Web apps. makes a lot of sense. I have several chemistry students who I would love to send a dynamic periodic table web app to, as it might be difficult to encourage them to use it any other way.

Having said which I'm not sure if development of Prism is even still on-going?

There doesn't seem to have been any activity from the developers in a long time.

--- On Thu, 21/7/11, Johnny <bernhar...@googlemail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "mozilla-labs-prism" group.
To post to this group, send email to mozilla-l...@googlegroups.com.
To unsubscribe from this group, send email to mozilla-labs-prism+unsub...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mozilla-labs-prism?hl=en.

Johnny

unread,
Jul 25, 2011, 6:09:05 PM7/25/11
to mozilla-labs-prism
Yeah I'm planning to do it for Windows as well. But I'm gonna have to
write an installer because I want proper Start Menu shortcuts and all.
I'm gonna post something when I'm finished.

Cheers, Johnny

On Jul 21, 4:15 pm, Q <quant...@yahoo.com> wrote:
> This would rock if you could do it for all Prism apps, including for Windows. Being able to make redistributable Web apps. makes a lot of sense. I have several chemistry students who I would love to send a dynamic periodic table web app to, as it might be difficult to encourage them to use it any other way.
>
> Having said which I'm not sure if development of Prism is even still on-going?
>
> There doesn't seem to have been any activity from the developers in a long time.
>
> --- On Thu, 21/7/11, Johnny <bernhard.cas...@googlemail.com> wrote:
> To unsubscribe from this group, send email to mozilla-labs-pr...@googlegroups.com.

David Miller

unread,
Jul 26, 2011, 10:35:20 AM7/26/11
to mozilla-l...@googlegroups.com
You can do a work-around that functions GREAT using Opera. No development
required and works for Win/Mac/Linux. See my post in the other thread on
Prism for a quick how-to.

David

> > To post to this group, send email to mozilla-labs-
> pr...@googlegroups.com.


> > To unsubscribe from this group, send email to mozilla-labs-

> prism+un...@googlegroups.com.


> > For more options, visit this group
> athttp://groups.google.com/group/mozilla-labs-prism?hl=en.
>

> --
> You received this message because you are subscribed to the Google
> Groups "mozilla-labs-prism" group.

> To post to this group, send email to mozilla-labs-
> pr...@googlegroups.com.


> To unsubscribe from this group, send email to mozilla-labs-

> prism+un...@googlegroups.com.

Afonso

unread,
Aug 3, 2011, 5:20:11 PM8/3/11
to mozilla-labs-prism
Well I got it to work. Let me try to explain what I did:
1) Get Prism.app;
2) Run it to create a "webapp" of your website;
3) Open your webapp (ie Show contents) go to MyApp/Contents/Resources,
and copy it to inside the Prism.app/Contents/Resources;
4) Get your new icon file in Prism.app/Contents/Resources and replace
the one called webrunner.icns;
5) Create a c/c++ app that will launch prism like so: prism --app
application.ini --override ../Resources/webapp/override.ini --webapp
webapp;
6) Change a bunch of files inside Prism.app that reference Prism
(basically to to have it display as My App instead of Prism, but I
left the Prism information on the about);
7) Changed the Prism.app to launch my c++ executable instead of prism;
8) Rename Prism.app to My App.app.

It is a _very_ troublesome way of getting it to work, but after it is
done is just works, you can place it anywhere, and you don't need
Prism.app separately.

Afonso

unread,
Aug 3, 2011, 5:25:18 PM8/3/11
to mozilla-labs-prism
The command should be this:

prism --app application.ini --override ../Resources/webapp/
override.ini --webapp ../Resources/webapp

And please note that this implies that you need to do the c++ code so
that it has the full path to the prism executable, so it will look
more like:

/Path/ToWhereMyAppIs/My App/Contents/MacOS/prism --app application.ini
--override /Path/ToWhereMyAppIs/My App/Contents/MacOS/../Resources/
webapp/override.ini --webapp /Path/ToWhereMyAppIs/My App/Contents/
MacOS/../Resources/webapp

Hope it helps somebody.

Regards,
Nuno Afonso

Unknown Unknown

unread,
Feb 24, 2012, 2:30:55 PM2/24/12
to mozilla-l...@googlegroups.com
Is there anyway that after I make my own webApp and add Prism inside the webapp.app to decide a default screen size? so everytime people download and install it it'll open in a window size I decide?

 Thank you so much!

Bernd Mueller

unread,
Mar 4, 2012, 8:03:40 AM3/4/12
to mozilla-l...@googlegroups.com
webapp.js: (example)

function load() {
    try {
        window.resizeTo(400,300);
    } catch(err) {
        window.alert("Error: "+err.message);

Unknown Unknown

unread,
Mar 4, 2012, 1:09:07 PM3/4/12
to mozilla-l...@googlegroups.com
Thanks for the reply!
 On what file exactly do I put this code?

Bernd Mueller

unread,
Mar 4, 2012, 4:20:37 PM3/4/12
to mozilla-l...@googlegroups.com
Google is your friend :-)

https://wiki.mozilla.org/Prism/Scripting

Unknown Unknown

unread,
Mar 12, 2012, 9:17:44 AM3/12/12
to mozilla-l...@googlegroups.com
Thanks It was very helpful, I got it a bit more now. Just one last question... Where do I put this file at? It doesn't say it there...

 Thank you! and sorry! :)

Unknown Unknown

unread,
Mar 12, 2012, 9:20:20 AM3/12/12
to mozilla-l...@googlegroups.com
Also I was wondering, Is there any possible to make it run on every dictionary? I mean currently if I do as the guide above suggested with adding these:
 GRE_HOME=/Applications/Mywebapp.app/Contents/Resources/Prism.app/ 
Contents/Frameworks/XUL.framework 
PRISM_HOME=/Applications/Mywebapp.app/Contents/Resources/Prism.app/ 
Contents/Resources 

 It works only when it's inside the Applications folder, Is there any way to change that to make it run on all dictionaries?


 Thank you!


On Friday, July 1, 2011 5:46:11 PM UTC+3, Afonso wrote:

Bernd Mueller

unread,
Mar 14, 2012, 2:38:09 PM3/14/12
to mozilla-l...@googlegroups.com

Unknown Unknown

unread,
Mar 16, 2012, 10:35:17 AM3/16/12
to mozilla-l...@googlegroups.com
How the heck do I do step 5/6/7 ??? Would be great if you could tell us exactly what to edit and how to do things...
Reply all
Reply to author
Forward
0 new messages