I've made a script and I wan't to know how can I make a .sis file from this script ... and there is any code for the app run in background? I want to put "Background" on the menu ...
Thanks a lot! Bye
I've made a script and I wan't to know how can I make a .sis file from this script ... and there is any code for the app run in background? I want to put "Background" on the menu ...
Thanks a lot! Bye
Use Ensymble for making the script into a sis file
I can't help much with the background option, but have a look at the Appswitch module.
Last edited by bogdan.galiceanu; 2008-02-19 at 04:59.
Pankaj Nathani
www.croozeus.com
Thanks mates, but, I couldn't understand this site and this .sis file for running in background ... what should I do with the .sis file that you passed my for running in background? and this ensymble site? sorry i'm from Brazil I can't understand English very well ... could some one explain me better?
I've downloaded the ensymble-0.26 but i don't know how to make the .sis file ... i've read about it but I couldn't understand
Go through this post
http://discussion.forum.nokia.com/fo...3&postcount=10
Also many of the previous posts regarding the same topic may be very useful.
Please specify what you cannot understand.
Best Regards
Croozeus
Pankaj Nathani
www.croozeus.com
Finally, I did the .py a .sis! thaks for all of you ... I just want to know the Background question ... what do I have to do for the app run in Background? And, how can I get it to boot with the cellphone? thaks for all the help!
Use the Appswitch module for running the application in background. bogdan.galiceanu posted the link in his post.
Moreover there is a autostart feature in Ensymble 0.26 that can help you to start the application while the phone starts.
Ensymble 0.26
Hope that helps
Best Regards
Croozeus
Pankaj Nathani
www.croozeus.com
Thanks again, croozeus!!! But my question about background is this: bogdan.galiceanu posted a sis file for running the app in background ... what can I do with this .sis file?! Thanks!
I don't want to put an image as background, I want to run the application in background (hide the application)
I haven't used this module, so I can't tell you anything about my experience with it. But here's how I think it works:
First, install the sis file. I gave you the link to the unsigned version, so you'll have to sign it in order to Install it. If you don't know how to do that, try this selfsigned version first. If that doesn't work, look for guides on how to sign a sis file (there are plenty on the Net).
Now all you have to do is use the functions provided by this module to put your application into the background. Like I said, I don't know how to do that because I haven't used this before, but I'm sure someone else can explain it.
Hope that helps![]()
Thanks man! But I would like to know if I can't do it all into just 1 .sis file ... I'am doing a application like RotateMe, but in Python, just for fun and for some friends ... But I don't want to have to install the 2 .sis ... can a I do that? transform all that into just 1 .sis file? If yes, how can I do it and what code I have to put in my script? Thanks for all of you for the big help!
Yes, you can, with the mergesis command of Ensymble. It explains how to do it in the Readme file. Here's the text:
The "mergesis" command
----------------------
SYNOPSIS
$ ensymble.py mergesis
[--cert=mycert.cer] [--privkey=mykey.key] [--passphrase=12345]
[--encoding=terminal,filesystem] [--verbose]
<infile> [mergefile]... <outfile>
DESCRIPTION
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.
Note: The "mergesis" command will only work with SIS files that do not
already contain other embedded SIS files.
PARAMETERS
infile
Path of the base SIS file.
mergefile
Zero or more SIS files to embed in the base sis file.
outfile
Path of the resulting SIS file. If a directory name is given, base SIS
file name is used as the output file name.
--cert=mycert.cer
-a mycert.cer
Certificate to use for signing in PEM (text) format. If no certificate
and its private key are given, Ensymble uses a default self-signed
certificate (see option "--cert" for command "py2sis" above).
--privkey=mykey.key
-k mykey.key
Private key of the certificate in PEM (text) format. If option "--cert"
(above) is given, this option is required as well.
--passphrase=12345
-p 12345
Pass phrase of the private key.
Note: Using command line options to give the pass phrase is insecure.
Any user of the computer will be able to see command lines of started
programs and thus will see the pass phrase in plain view. Instead,
standard input should be used (see examples below).
If no pass phrase is given on the command line or standard input, it
will be asked interactively.
EXAMPLES
Note: The command lines below may be wrapped over multiple lines due to
layout constraints. In reality, each of them should be contained in one
physical command line.
$ ensymble.py mergesis
--cert=mycert.cer --key=mykey.key --passphrase=12345
myapp_v1_0_0.sis PythonForS60_1_3_17_3rdEd_selfsigned.SIS
myapp_standalone_v1_0_0.sis
A Python for S60 script "myapp_v1_0_0.sis" will be merged with Python
runtime SIS "PythonForS60_1_3_17_3rdEd_selfsigned.SIS". A new SIS file
"myscript_standalone_v1_0_0.sis" will be created and signed with
"mycert.cer" using private key "mykey.key".
$ echo "12345" | ensymble.py mergesis
--cert=mycert.cer --key=mykey.key
basefile.sis addon1.sis addon2.sis
Pass phrase can be given in Ensymble standard input, so that it will not
be visible to all users of the computer (see option "--passphrase"
above).
Thanks, mate ... i'm trying to get the app to run in hide mode (using appswitch) ... my app function is to auto-rotate the screen like RotateMe ... but, they say this code is dangerous ... it's just put it into the script the same way it is? :
Code:# AppKill - frontend for the appswitch module # (c) Goetz Schwandtner 12-2006 import appuifw, e32 import appswitch class AppKill(object): def __init__(self): self.showall = False appuifw.app.title = u'AppKill (c) G.Schwandtner' self.appl = list(appswitch.application_list(self.showall)) self.lb = appuifw.Listbox(self.appl,self.switch_to) appuifw.app.menu=[(u'kill app',self.kill_app),(u'about',self.about),(u'toggle hidden',self.toggle_hidden),(u'refresh',self.refresh)] appuifw.app.body=self.lb appuifw.app.exit_key_handler=self.quit self.lock=e32.Ao_lock() self.lock.wait() def about(self): appuifw.note(u'(c) 2006 Goetz Schwandtner') def refresh(self): self.appl=list(appswitch.application_list(self.showall)) self.lb.set_list(self.appl) def cur_app(self): return self.appl[self.lb.current()] def switch_to(self): appswitch.switch_to_fg(self.cur_app()) def kill_app(self): appswitch.kill_app(self.cur_app()) self.refresh() def toggle_hidden(self): self.showall = not self.showall self.refresh() def quit(self): self.lock.signal() appuifw.app.set_exit() if __name__ == '__main__': ak=AppKill()
My application code is this:
Code:import sensor, appuifw, audio, e32 sensor_type = sensor.sensors()['RotSensor'] N95_sensor = sensor.Sensor(sensor_type['id'],sensor_type['category']) N95_sensor.set_event_filter(sensor.RotEventFilter()) appuifw.note(u"Gire o telefone!") def get_sensor_data(status): if status == sensor.orientation.TOP : appuifw.app.orientation='portrait' elif status == sensor.orientation.RIGHT : appuifw.app.orientation='landscape' def item1(): appuifw.note(u"Por: Rafael Tavares e Marcelo (The King)", "info") def item2(): appuifw.app.exit= quit def quit(): N95_sensor.disconnect() app_lock.signal() appuifw.app.menu = [(u"About", item1)] N95_sensor.connect(get_sensor_data) print ' Gire seu telefone!' print 'Por: Rafael e Marcelo' appuifw.app.screen='full' appuifw.app.title = u"Sensor de Rotacao" appuifw.app.exit_key_handler = quit app_lock = e32.Ao_lock() app_lock.wait()
How to proceed? do you think it will work fine in background?
And another stupid question: how can I write in the screen when app is in .sis? 'print' doesn't work.
Thanks for all!!!