×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 25
  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    6

    Make python app, including interpreter, that will work anywhere

    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

  2. #2
    Registered User
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352

    Re: Make python app, including interpreter, that will work anywhere

    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 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

  3. #3
    Registered User
    Join Date
    Nov 2007
    Posts
    6

    Re: Make python app, including interpreter, that will work anywhere

    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++ ?

  4. #4
    Super Contributor
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037

    Re: Make python app, including interpreter, that will work anywhere

    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

  5. #5
    Registered User
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352

    Re: Make python app, including interpreter, that will work anywhere

    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 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

  6. #6
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Make python app, including interpreter, that will work anywhere

    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

  7. #7
    Registered User
    Join Date
    Nov 2007
    Posts
    6

    Re: Make python app, including interpreter, that will work anywhere

    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

  8. #8
    Registered User
    Join Date
    Nov 2007
    Posts
    6

    Re: Make python app, including interpreter, that will work anywhere

    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.

  9. #9
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Make python app, including interpreter, that will work anywhere

    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

  10. #10
    Registered User
    Join Date
    Nov 2007
    Posts
    6

    Re: Make python app, including interpreter, that will work anywhere

    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 ?

  11. #11
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Make python app, including interpreter, that will work anywhere

    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

  12. #12
    Registered User
    Join Date
    Nov 2007
    Posts
    6

    Re: Make python app, including interpreter, that will work anywhere

    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 ?

  13. #13
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Make python app, including interpreter, that will work anywhere

    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

  14. #14
    Super Contributor
    Join Date
    May 2004
    Location
    Tampere, Finland
    Posts
    524

    Re: Make python app, including interpreter, that will work anywhere

    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:

    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.

  15. #15
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,795

    Re: Make python app, including interpreter, that will work anywhere

    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
    Pankaj Nathani
    www.croozeus.com

Similar Threads

  1. Replies: 3
    Last Post: 2010-03-19, 16:46
  2. Replies: 1
    Last Post: 2007-06-17, 19:19
  3. the app doesnt work on the phone?
    By ahm4000 in forum Symbian
    Replies: 6
    Last Post: 2007-05-13, 02:47
  4. Replies: 0
    Last Post: 2004-10-18, 18:06
  5. Is it possible to make a app to make ringtone in J2ME ...
    By mayank13 in forum Mobile Java General
    Replies: 1
    Last Post: 2002-11-13, 12:20

Posting Permissions

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