maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   How to install javascript apps? (https://talk.maemo.org/showthread.php?t=38873)

rumpel789 2009-12-31 06:14

How to install javascript apps?
 
I am trying to package a big javascript game (2MB data) and wonder how to launch it.

A desktop file in /usr/share/applications/hildon in which a browser with the file-URL is started somewhat works:

[Desktop Entry]
Categories=user/games
Encoding=UTF-8
Version=1.0
Type=Application
Name=skattrainer
Icon=skattrainer
Exec=/usr/bin/browser --url=file:///opt/skattrainer/index.html

However, after exiting the browser the process remains and after multiple invocations the browser freezes. How to launch the browser properly from a desktop file?

Alternatively, I could also just use a bookmark.
So there the question is how to add one automatically when the package is installed?

Thanks for any pointers.

Johnx 2009-12-31 08:42

Re: How to install javascript apps?
 
How about do it the way they do for the ovi store? I'll paste in the .desktop file for it in case you don't have a physical N900 on hand:
Code:

/usr/share/applications/hildon $ cat ovi.desktop
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=tana_ap_ovi_store
Comment=Open Ovi store in new window
Exec=dbus-send --print-reply --dest=com.nokia.osso_browser /com/nokia/osso_browser/request com.nokia.osso_browser.open_new_window string:http://link.ovi.mobi/n900ovistore
Icon=general_ovi_store
Terminal=false
Type=Application
Categories=System;TerminalEmulator;
X-HildonDesk-ShowInToolbar=true
#X-Osso-Service=xterm
X-Osso-Type=application/x-executable

PS: In the future, please don't double post. :|

rumpel789 2009-12-31 18:21

Re: How to install javascript apps?
 
Thanks - this works.


All times are GMT. The time now is 22:01.

vBulletin® Version 3.8.8