×

Discussion Board

Page 1 of 3 123 LastLast
Results 1 to 15 of 39
  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    3

    Python -> Sis with Mac

    Is there a way to make .py -> .sis with OS X(Leopard, 10.5.2). Py2Sis does not seem to work with Leopard.

  2. #2
    Regular Contributor
    Join Date
    Jul 2005
    Location
    Espoo, Finland
    Posts
    66

    Re: Python -> Sis with Mac

    Quote Originally Posted by Vitsaus View Post
    Is there a way to make .py -> .sis with OS X(Leopard, 10.5.2). Py2Sis does not seem to work with Leopard.
    I've used Ensymble (http://www.nbl.fi/~nbl928/ensymble.html). Works like a charm.

    - Teemu

  3. #3
    Registered User
    Join Date
    Mar 2008
    Posts
    3

    Re: Python -> Sis with Mac

    Thanks for help. Seems good. I will give it a try.

    Edit: I can confirm: It works like a charm

    Quote Originally Posted by tsharju View Post
    I've used Ensymble (http://www.nbl.fi/~nbl928/ensymble.html). Works like a charm.

    - Teemu
    Last edited by Vitsaus; 2008-03-16 at 19:24.

  4. #4
    Regular Contributor
    Join Date
    May 2008
    Posts
    86

    Re: Python -> Sis with Mac

    It's ok for me, but I cannot understand how to get it work to pakage more files!
    If I just want to convert pys60 to sis I got no problems, but my application need a jpg as background! how do I add it to my sis file?

  5. #5
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Python -> Sis with Mac

    Quote Originally Posted by nufun View Post
    It's ok for me, but I cannot understand how to get it work to pakage more files!
    If I just want to convert pys60 to sis I got no problems, but my application need a jpg as background! how do I add it to my sis file?
    Hi nufun and welcome to the Python Discussion Board. You can use Ensymble's simplesis command.

  6. #6
    Regular Contributor
    Join Date
    May 2008
    Posts
    86

    Re: Python -> Sis with Mac

    Thanks for the replay! Now I created the sis file from the folder,
    but after I've installed the application on my phone, it is no shown in the prefered installed application. I don't know how to lunch it. I can only uninstall it!

  7. #7
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Python -> Sis with Mac

    So basically here are the steps you should take:
    1)Make a sis file from your .py script using py2sis (I assume you've already done this)
    2)Make a sis file from the folder with the image using simplesis
    Optional:3)Use mergesis to combine the 2 sis files into 1 which you then install. If you don't do this, just install the 2 sis files separately.

    The icon for the program from your .py file should show up in you "Applications" folder in the menu and the folder from the folder sis should be in the appropriate location (it doesn't have an icon as it's not a real program, just a folder).

    Please check and let us know if you still have problems or questions

  8. #8
    Regular Contributor
    Join Date
    May 2008
    Posts
    86

    Re: Python -> Sis with Mac

    Ok.. I'll try to understand if my steps are all rights..

    1. py2sis myapp.py --> myapp.sis
    2. simplesis the folder containing ONLY the jpg background image --> jpg.sis
    3. mergesis myapp.sis (as infile) and jpg.sis (as mergefile) --> test.sis
    4. installing test.sis on my phone I get prompted "install myapp?" and then "install jpg?". Confirm everything.
    5. lunch myapp
    6. something is lunched but it immediately stops.

    I guess the problem is image path in the python script cause if I try to install a version without background everything goes fine..

    I suppose the jpg is installed in !:\system\apps\myapp\ is it correct?

  9. #9
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Python -> Sis with Mac

    Quote Originally Posted by nufun View Post
    I suppose the jpg is installed in !:\system\apps\myapp\ is it correct?
    The jpg is placed where in the according level of the file system.

    If you made the jpg file into a sis, it will be installed on C (phone memory) or E (memory card) depending on which one you selected when prompted during the installation.
    So the path to the image (the one written in the .py file) should be "C:\myimage.jpg" for example.

    If you were to package "myfolder" along with the image in it, a strange thing would happen. Only the contents of the folder (in this case the image) would be packaged (so the image would still be in "C:\myimage.jpg" regardless of the attempt to keep it in that specific folder). So in order to package a folder you would have to place it into another folder and write the mergesis for "somefolder\myfolder". In this case the image would be in "C:\myfolder\myimage.jpg".

    I'm sorry if this is confusing but if you have any questions the community is here for you
    Last edited by bogdan.galiceanu; 2008-05-09 at 17:42.

  10. #10
    Regular Contributor
    Join Date
    May 2008
    Posts
    86

    Re: Python -> Sis with Mac

    I got it!!!

    Thanks a lot! You were fundamental!

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

    Re: Python -> Sis with Mac

    If the JPEG is not meant to be accessed from anywhere else but your application, you can pack a whole directory tree with just the py2sis command of Ensymble. Everything in the directory tree can then be found in the application private directory.

    Example:

    Code:
    $ ls -Lp mypys60app
    mypys60app:
    data/         default.py       supportmodule.py
    
    mypys60app/data:
    image1.jpg    image2.jpg
    
    $ ensymble.py --uid=myuid --version=1.2.3 --drive=C mypys60app
    This will create a SIS file mypys60app_1_2_3.sis that, once installed on the phone has the following structure:

    Code:
      private\myuid\
        data\
          image1.jpg
          image2.jpg
        default.py
        supportmodule.py
    (The SIS file will also contain other necessary support files, not shown here for simplicity. SIS files created with the simplesis command do not have these extra files.)

  12. #12
    Regular Contributor
    Join Date
    May 2008
    Posts
    86

    Re: Python -> Sis with Mac

    wow! that's cool! but how can I declare my jpg path in the code?
    I would leave the possibility to choose the destination drive so I have tried

    bg_image = u".\\data\\myimage.jpg"

    but I got error..

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

    Re: Python -> Sis with Mac

    Quote Originally Posted by nufun View Post
    wow! that's cool! but how can I declare my jpg path in the code?
    sys.path[0] contains path to the private directory:

    Code:
    import sys
    import os
    
    bg_image = os.path.join(sys.path[0], "data", "myimage.jpg")
    
    ...

  14. #14
    Registered User
    Join Date
    Jul 2007
    Posts
    16

    Re: Python -> Sis with Mac

    thank you jethro, but i used sys.path[0] and got system error (-2) and my app does not run at all

  15. #15
    Regular Contributor
    Join Date
    May 2008
    Posts
    86

    Re: Python -> Sis with Mac

    I'm having some problem too.
    I tried with different phones and different drive and I got errors.

Similar Threads

  1. Python version > 2.2.2
    By Alex#736 in forum Symbian
    Replies: 3
    Last Post: 2008-02-03, 20:46
  2. PyS60 Python Console step-by-step on Mac OSX
    By notpeter in forum Symbian
    Replies: 1
    Last Post: 2007-09-22, 07:56
  3. Has Nokia broken 7650 J2ME in v4.39?
    By LongSteve in forum Mobile Java General
    Replies: 6
    Last Post: 2003-06-03, 17:05
  4. Replies: 5
    Last Post: 2003-02-07, 11:25
  5. 7650 and MS Bluetooth Transceiver
    By damnedi in forum Bluetooth Technology
    Replies: 1
    Last Post: 1970-01-01, 02:00

Posting Permissions

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