You Are Here:

Community: Developer Discussion Boards

Reply « Previous Thread | Next Thread »

#1 Old Make python app, including interpreter, that will work anywhere - 2007-11-21, 11:14

Join Date: Nov 2007
Posts: 6
dj.dule
Offline
Registered User
Hi all,

I am fairly new to Python development for S60. I downloaded Python for my Nokia N70, installed it, developed application and everything works without any probem. I even created SIS, following this manual:
http://www.mobilenin.com/pys60/info_...pplication.htm

SIS includes Python and my application. Everything works fine on my N70.

I tried to install that SIS on Nokia N95 and it is not recognised at all as installable SIS. I understood there is some difference between R2 and R3 of Symbian.

My question is is there any way I could create SIS that includes Python, my (fairly simple) application that I could distribute to all Nokia users with symbian phones? Where I can find any manual on this?

TIA

Dusan
Reply With Quote

#2 Old Re: Make python app, including interpreter, that will work anywhere - 2007-11-21, 11:33

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
Quote:
Originally Posted by dj.dule View Post
Hi all,

I am fairly new to Python development for S60. I downloaded Python for my Nokia N70, installed it, developed application and everything works without any probem. I even created SIS, following this manual:
http://www.mobilenin.com/pys60/info_...pplication.htm

SIS includes Python and my application. Everything works fine on my N70.

I tried to install that SIS on Nokia N95 and it is not recognised at all as installable SIS. I understood there is some difference between R2 and R3 of Symbian.

My question is is there any way I could create SIS that includes Python, my (fairly simple) application that I could distribute to all Nokia users with symbian phones? Where I can find any manual on this?

TIA

Dusan
Hello Dusan welcome to this Python DiBo

It's not adviced to combine PyS60 and your script for 3rd PyS60 version because it has been signed by Nokia with 17 capabilities !
It's better to install PyS60 separately and make a standalone app with your script (unsigned or selsigned it depends on the features you want to use !)
For this use ensymble (Look in the wiki !)

If you want to distribute PyS60 with your script included in it you have to recompile source code and add your script
You have to selfsigned or signed with your dev cert too !

BR

Cyke64


pys60 1.4.5,1.9.7,pygame,PyS60 CE on E90 , N810 with Python 2.5.2 and ... last PyS60 1.9.7 with touch ui on 5800 !

pys60 extension modules on http://cyke64.googlepages.com/
Reply With Quote

#3 Old Re: Make python app, including interpreter, that will work anywhere - 2007-11-21, 14:12

Join Date: Nov 2007
Posts: 6
dj.dule
Offline
Registered User
Quote:
Originally Posted by cyke64 View Post
Hello Dusan welcome to this Python DiBo

If you want to distribute PyS60 with your script included in it you have to recompile source code and add your script
You have to selfsigned or signed with your dev cert too !

Cyke64
Thank you for nice welcome and answer.

If I understand properly, there is no way I can develop standalone application in Python. Whatever I do and install would require additional installation of Python for S60 ?

So basically, if I want to make standalone app, I need to develop it in C++ ?
Reply With Quote

#4 Old Re: Make python app, including interpreter, that will work anywhere - 2007-11-21, 14:18

Join Date: Mar 2004
Posts: 1,926
Location: Czech Republic
stenlik's Avatar
stenlik
Offline
Forum Nokia Champion
Hi,

you can do that in C++ or Java, means J2ME and FlashLite. But don't cast aside a Python, eben if you have to install PyS60...

BR
STeN
Reply With Quote

#5 Old Re: Make python app, including interpreter, that will work anywhere - 2007-11-21, 15:07

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
Stenlik is right !

PyS60 is not too big and when PyS60 is installed on client side you can send as many standalone PyS60 application that you want

BR

Cyke64


pys60 1.4.5,1.9.7,pygame,PyS60 CE on E90 , N810 with Python 2.5.2 and ... last PyS60 1.9.7 with touch ui on 5800 !

pys60 extension modules on http://cyke64.googlepages.com/
Reply With Quote

#6 Old Re: Make python app, including interpreter, that will work anywhere - 2007-11-21, 15:08

Join Date: Dec 2006
Posts: 2,094
Sorcery-ltd's Avatar
Sorcery-ltd
Offline
Forum Nokia Champion
Couldn't you include PyS60 as an embedded sis file with your Python sis file? You can even check to see if it is already installed within your sis file. It shouldn't then matter that PyS60 has many more capabilities than your script. This is similar to the case with embedding OpenC in Symbian C++ project.

You'd need to look up the package file syntax for the relevant Symbian OS version (8.1 for your N70 I think and 9.x for 3rd Edition phones).

However, that doesn't solve the original issue which is getting the same sis files to install on S60 2nd Edition and 3rd Edition. Unforunately the format has changed so I don't think you can.

Sorcery
Reply With Quote

#7 Old Re: Make python app, including interpreter, that will work anywhere - 2007-11-21, 15:12

Join Date: Nov 2007
Posts: 6
dj.dule
Offline
Registered User
Quote:
Originally Posted by cyke64 View Post
Stenlik is right !
PyS60 is not too big and when PyS60 is installed on client side you can send as many standalone PyS60 application that you want
BR
Cyke64
It is not matter of size. I would like to make an app for end users. Making them install python and my application will IMHO make app itself look non-professional and drive users away from it, since they need to install two packages instead of one to use very simple appl
Reply With Quote

#8 Old Re: Make python app, including interpreter, that will work anywhere - 2007-11-21, 15:19

Join Date: Nov 2007
Posts: 6
dj.dule
Offline
Registered User
Quote:
Originally Posted by Sorcery-ltd View Post
Couldn't you include PyS60 as an embedded sis file with your Python sis file? You can even check to see if it is already installed within your sis file. It shouldn't then matter that PyS60 has many more capabilities than your script. This is similar to the case with embedding OpenC in Symbian C++ project.

You'd need to look up the package file syntax for the relevant Symbian OS version (8.1 for your N70 I think and 9.x for 3rd Edition phones).

However, that doesn't solve the original issue which is getting the same sis files to install on S60 2nd Edition and 3rd Edition. Unforunately the format has changed so I don't think you can.

Sorcery
Something like this would do the job, but I cannot find any docs on how to do it. Ensymble does not mention any of it.

Making 2 versions is acceptable.
Reply With Quote

#9 Old Re: Make python app, including interpreter, that will work anywhere - 2007-11-21, 16:42

Join Date: Dec 2006
Posts: 2,094
Sorcery-ltd's Avatar
Sorcery-ltd
Offline
Forum Nokia Champion
Hmmm, looks like Ensymble's merge functionality doesn't embeds sis files unconditionally and doesn't preserve the certificates on the embedded files, so you couldn't embed PyS60 that way. To do what you want you'd have to download a couple of the C++ SDKs (S60 3rd Edition MR & 2nd Edition FP3 would probably be reasonable choices).

Then you can look in the SDK documentation at the package file format, and the makesis and signsis tools. It is a bit complicated but you should be able to figure it out. Note also that there are problems with having a shared dependency on Symbian 9.x which psiloc found a workaround for here:
http://www.psiloc.com/en/Company/Blo...s_on_Symbian_9
So you'd need some Symbian C++ skills to develop a complete installation solution for multiple applications too. Alternatively you can just provide 2 versions for 3rd edition onwards, one for people with Python installed and one without.

Any Python experts know why this is a really bad idea?

If it works it might be a great feature to add to ensymble? You wouldn't need general embedding preserving certificates, just an option to embed the latest signed PyS60 sis.

Sorcery
Reply With Quote

#10 Old Re: Make python app, including interpreter, that will work anywhere - 2007-11-21, 16:43

Join Date: Nov 2007
Posts: 6
dj.dule
Offline
Registered User
OK, so let me summarize everything:

-It is not possible to create single SIS file to cover all platforms. Instead, two should be made, one for 2nd edition, one for 3rd edition.
- http://www.mobilenin.com/pys60/info_...pplication.htm explains how to make SIS with Python embeded for 2nd generation. This works for me.
- http://wiki.opensource.nokia.com/pro...apps_in_3rd_ed explains how to make SIS for 3rd generation. But there is no mention on how to embed python.

Any useful resource on this ? How to create one sis with my python script and python ?
Reply With Quote

#11 Old Re: Make python app, including interpreter, that will work anywhere - 2007-11-21, 17:30

Join Date: Dec 2006
Posts: 2,094
Sorcery-ltd's Avatar
Sorcery-ltd
Offline
Forum Nokia Champion
If you use those instructions for 3rd Edition and embed PyS60 then you'll get a crippled version with limited capabilites. If that's all you need then no problem (except maybe for users with other Python apps that do need other capabilities?).

I guess if you don't mind restricted capabilites you could use the merge function in ensymble and just merge your sis file with the PyS60 sis file?

Sorcery
Reply With Quote

#12 Old Re: Make python app, including interpreter, that will work anywhere - 2007-11-21, 18:14

Join Date: Nov 2007
Posts: 6
dj.dule
Offline
Registered User
Quote:
Originally Posted by Sorcery-ltd View Post
If you use those instructions for 3rd Edition and embed PyS60 then you'll get a crippled version with limited capabilites. If that's all you need then no problem (except maybe for users with other Python apps that do need other capabilities?).

I guess if you don't mind restricted capabilites you could use the merge function in ensymble and just merge your sis file with the PyS60 sis file?

Sorcery
I would appreciate if you could point me to right documentation, so I will know what "crippled version" I will get, and what I will have with merge function. I tried to merge my own app with PyS60 but received some strange error message.

My app has it's own icon, simple GUI, user chooses file and file is then uploaded to my site. If everything works I would not mind having crippled app.

If not, anyone have idea how to do it and where to find documentation ?
Reply With Quote

#13 Old Re: Make python app, including interpreter, that will work anywhere - 2007-11-21, 18:36

Join Date: Dec 2006
Posts: 2,094
Sorcery-ltd's Avatar
Sorcery-ltd
Offline
Forum Nokia Champion
Quote:
I would appreciate if you could point me to right documentation, so I will know what "crippled version" I will get.
I have no idea if this is documented. The official signed PyS60 has a lot of capabilities. The capabilities relate to it's ability to use certain APIs in C++. If Python functions result in calls to these APIs then they won't work properly (or at all in some cases) if the capabilities are not present.

What those Python fuctions are should be documented somewhere (experts help?) but whether you use them is down to your application. Your app sounds pretty simple so this probably isn't a problem.

If your application is the only Python application on a user's device then there isn't an issue. They may find other people's Python applications don't work with the "crippled" version of PyS60 you've installed for them.

If you don't care about that at all I don't feel like searching out any more answers for you. Sorry.

Sorcery
Reply With Quote

#14 Old Re: Make python app, including interpreter, that will work anywhere - 2007-11-21, 20:44

Join Date: May 2004
Posts: 524
Location: Tampere, Finland
jethro.fn's Avatar
jethro.fn
Offline
Forum Nokia Champion
Quote:
Originally Posted by Sorcery-ltd View Post
Hmmm, looks like Ensymble's merge functionality doesn't embeds sis files unconditionally and doesn't preserve the certificates on the embedded files, so you couldn't embed PyS60 that way.

...

If it works it might be a great feature to add to ensymble? You wouldn't need general embedding preserving certificates, just an option to embed the latest signed PyS60 sis.
This excerpt from Ensymble README can be a bit misleading:

Quote:
The "mergesis" command takes a set of SIS files and inserts them as unconditional embedded SIS files in the first one. The resulting SIS package is then signed with the certificate provided. None of the certificates of the first SIS file are preserved.
What is means is that the first SIS file on the command line is treated unlike the others. Its certificates are stripped, other files embedded inside and the whole thing is then signed with the given certificate. "Unconditional" in this context means that no questions will be asked during install and no detection of already installed packages will be done. All embedded SIS files will be installed, no matter what.

What the above excerpt does not say (and I must clarify it in the next version of Ensymble) is that embedded SIS files _retain their certificates and all capabilities_!

So, following the example from Ensymble README, this will do the trick:

Code:
ensymble.py mergesis
  --cert=mycert.cer --key=mykey.key --passphrase=12345
  myapp_v1_0_0.sis PythonForS60_1_4_1_3rdEd.SIS
  myapp_standalone_v1_0_0.sis
Note that on some 3rd Edition phones, unistalling your application also uninstalls PyS60, even if some other applications depends on it.
Reply With Quote

#15 Old Re: Make python app, including interpreter, that will work anywhere - 2008-01-16, 09:07

Join Date: May 2007
Posts: 2,738
Location: 21.46 N 72.11 E
croozeus's Avatar
croozeus
Offline
Forum Nokia Champion
Quote:
Originally Posted by jethro.fn View Post
Code:
ensymble.py mergesis
  --cert=mycert.cer --key=mykey.key --passphrase=12345
  myapp_v1_0_0.sis PythonForS60_1_4_1_3rdEd.SIS
  myapp_standalone_v1_0_0.sis
Today I made a standalone appplication and had to edit the above code slightly. Just posting it here for reference. The code below works perfectly!

Code:
ensymble.py mergesis
  --cert=mycert.cer --privkey=mykey.key --passphrase=12345
  myapp_v1_0_0.sis PythonForS60_1_4_1_3rdEd.SIS
  myapp_standalone_v1_0_0.sis
Best Regards
Croozeus
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem running small standonline python app ninjaj Python 1 2007-06-17 20:19
the app doesnt work on the phone? ahm4000 General Symbian C++ 6 2007-05-13 03:47
Stand-alone Python app not launched correctly from other native app bercobeute Python 2 2005-03-04 15:30
HELP -- AknSelectionListDialog app getting Options and OK Key to work????? fsiegel Symbian User Interface 0 2004-10-18 19:06
Is it possible to make a app to make ringtone in J2ME ... mayank13 Mobile Java General 1 2002-11-13 13:20

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia