How to mark a app as Auto Run?

Asked by Blackpaw on 2009-04-20

I have a self contained signed application generated, but can't figure how to tell the build script to flag it as a autorun application?

Question information

Language:
English Edit question
Status:
Answered
For:
PyS60 community Edit question
Assignee:
No assignee Edit question
Last query:
2009-04-27
Last reply:
2009-04-27

Boot options: https://help.ubuntu.com/community/BootOptions - To add/remove startup services, you can use the package 'bum', or update-rc.d - To add your own startup scripts, use /etc/rc.local - See also !grub and !dualboot - Making a boot floppy: https://help.ubuntu.com/community/GrubHowto/BootFloppy - Also see https://help.ubuntu.com/community/SmartBootManagerHowto

Blackpaw (blackpaw) said : #2

Ahhh - while the answer is appreciated actionparsnip, this is Symbian 60 on nokia devices, not a linux PC.

Jussi Toivola (jussi-toivola) said : #3

Unfortunately, there is no support for doing it with the current build scripts for your own executable. It's only used with application watcher at the moment. You'll need to hack the SConstruct yourself a bit.

See DistributionSis is in the SConsctruct and line 1090. Change the value of startonboot to something like:
startonboot = "myapplication.exe".

Adding a command line parameter for this would be quite trivial.

Also, see SymbianPackage's startonboot argument. http://code.google.com/p/scons-for-symbian/source/browse/trunk/scons_symbian.py

Blackpaw (blackpaw) said : #4

Thanks Jussi, unfortunately it fails with this error:
----------------------------------------------------------------------------------------------------
\epoc32\gcc\bin\cpp -undef -C -I- -I T:\epoc32\include -I T:\epoc32\include\vari
ant -DLANGUAGE_SC -D_UNICODE T:\workspace\pys60\pys60community\src\gcce_urel\Sof
tlogMobile_0x2001D8EB.exe_rss\[e1000004].rss -o T:\workspace\pys60\pys60communit
y\src\gcce_urel\SoftlogMobile_0x2001D8EB.exe_rss\[e1000004].rpp -include T:\epoc
32\include\variant\symbian_os_v9.1.hrh
scons: *** [gcce_urel\SoftlogMobile_0x2001D8EB.exe_rss\[e1000004].rpp] Exception

Traceback (most recent call last):
  File "C:\Python25\Lib\site-packages\scons-1.1.0\SCons\Taskmaster.py", line 220
, in execute
    self.targets[0].build()
  File "C:\Python25\Lib\site-packages\scons-1.1.0\SCons\Node\__init__.py", line
370, in build
    apply(self.get_executor(), (self,), kw)
  File "C:\Python25\Lib\site-packages\scons-1.1.0\SCons\Executor.py", line 145,
in __call__
    return self.do_execute(target, kw)
  File "C:\Python25\Lib\site-packages\scons-1.1.0\SCons\Executor.py", line 131,
in do_execute
    status = apply(act, (self.targets, self.get_sources(), env), kw)
  File "C:\Python25\Lib\site-packages\scons-1.1.0\SCons\Action.py", line 467, in
 __call__
    stat = self.execute(target, source, env)
  File "C:\Python25\Lib\site-packages\scons-1.1.0\SCons\Action.py", line 681, in
 execute
    result = spawn(shell, escape, cmd_line[0], cmd_line, ENV)
  File "T:\workspace\pys60\pys60community\src\scons_symbian\colorizer.py", line
235, in spawn
    shell = False, env = env )
  File "C:\Python25\lib\subprocess.py", line 594, in __init__
    errread, errwrite)
  File "C:\Python25\lib\subprocess.py", line 822, in _execute_child
    startupinfo)
TypeError: environment can only contain strings
scons: building terminated because of errors.

Blackpaw (blackpaw) said : #5

ps. my startonboot is:

  startonboot = "SoftlogMobile_0x2001D8EB.exe"

Blackpaw (blackpaw) said : #6

Ok, after looking at the erro message "TypeError: environment can only contain strings" I tried setting my env to None in colorizer.py at line 221.

That actually worked, so I presume my ENV strings contains something which is killing the spawn process. Setting env to None is obviously a workaround - not sure what the proper fix would be.

Jussi Toivola (jussi-toivola) said : #7

Please add: 'print env' to the colorizer.py to see what is None and paste the result here.

Blackpaw (blackpaw) said : #8

Environment string from that follows. Nothing appear to be null in it:

{'TMP': 'C:\\DOCUME~1\\lindsay\\LOCALS~1\\Temp', 'COMPUTERNAME': 'LINDSAYM', 'MW
SYM2LIBRARYFILES': 'MSL_All_MSE_Symbian_D.lib;gdi32.lib;user32.lib;kernel32.lib;
', 'USERDOMAIN': 'BRIAN', 'VS90COMNTOOLS': 'c:\\Program Files\\Microsoft Visual
Studio 9.0\\Common7\\Tools\\', 'COMMONPROGRAMFILES': 'C:\\Program Files\\Common
Files', 'PROCESSOR_IDENTIFIER': 'x86 Family 15 Model 4 Stepping 1, GenuineIntel'
, 'PROGRAMFILES': 'C:\\Program Files', 'PROCESSOR_REVISION': '0401', 'SYSTEMROOT
': 'C:\\WINDOWS', 'PATH': 'c:\\Python25\\Scripts\\;c:\\Python25\\Scripts\\..;C:\
\Program Files\\Common Files\\Symbian\\Tools;C:\\Program Files\\Nokia\\Carbide.c
++ v2.0\\x86Build\\Symbian_Tools\\Command_Line_Tools;C:\\Program Files\\CSL Arm
Toolchain\\bin;C:\\Perl\\bin\\;C:\\Program Files\\PC Connectivity Solution\\;C:\
\Program Files\\CollabNet Subversion Client;c:\\bin;C:\\PROGRA~1\\Borland\\Delph
i5\\Projects\\Bpl;C:\\PROGRA~1\\Borland\\Delphi5\\Bin;C:\\WINDOWS\\system32;C:\\
WINDOWS;C:\\WINDOWS\\System32\\Wbem;c:\\Program Files\\Microsoft SQL Server\\90\
\Tools\\binn\\;C:\\Program Files\\TortoiseSVN\\bin;C:\\Program Files\\Java\\jdk1
.5.0_17\\bin;C:\\Program Files\\CSL Arm Toolchain\\bin;c:\\Qt\\4.4.4-temple\\bin
;c:\\python25;C:\\Program Files\\stunnel;C:\\Program Files\\Bazaar', 'TEMP': 'C:
\\DOCUME~1\\lindsay\\LOCALS~1\\Temp', 'PROCESSOR_ARCHITECTURE': 'x86', 'ALLUSERS
PROFILE': 'C:\\Documents and Settings\\All Users', 'SESSIONNAME': 'Console', 'HO
MEPATH': '\\Documents and Settings\\lindsay', 'MWSYM2LIBRARIES': 'C:\\Program Fi
les\\Nokia\\Carbide.c++ v2.0\\x86Build\\Symbian_Support\\Win32-x86 Support\\Libr
aries\\Win32 SDK;C:\\Program Files\\Nokia\\Carbide.c++ v2.0\\x86Build\\Symbian_S
upport\\Runtime\\Runtime_x86\\Runtime_Win32\\Libs', 'USERNAME': 'lindsay', 'LOGO
NSERVER': '\\\\JPF3', 'PROMPT': '$P$G', 'COMSPEC': 'C:\\WINDOWS\\system32\\cmd.e
xe', 'USERDNSDOMAIN': 'BRIAN.SOFTLOG', 'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE
;.JS;.JSE;.WSF;.WSH', 'CLIENTNAME': 'Console', 'FP_NO_HOST_CHECK': 'NO', 'WINDIR
': 'C:\\WINDOWS', 'APPDATA': 'C:\\Documents and Settings\\lindsay\\Application D
ata', 'HOMEDRIVE': 'C:', 'SYSTEMDRIVE': 'C:', 'MWCSYM2INCLUDES': 'C:\\Program Fi
les\\Nokia\\Carbide.c++ v2.0\\x86Build\\Symbian_Support\\MSL\\MSL_C\\MSL_Common\
\Include;C:\\Program Files\\Nokia\\Carbide.c++ v2.0\\x86Build\\Symbian_Support\\
MSL\\MSL_C\\MSL_Win32\\Include;C:\\Program Files\\Nokia\\Carbide.c++ v2.0\\x86Bu
ild\\Symbian_Support\\MSL\\MSL_C\\MSL_X86;C:\\Program Files\\Nokia\\Carbide.c++
v2.0\\x86Build\\Symbian_Support\\MSL\\MSL_C++\\MSL_Common\\Include;C:\\Program F
iles\\Nokia\\Carbide.c++ v2.0\\x86Build\\Symbian_Support\\MSL\\MSL_Extras\\MSL_C
ommon\\Include;C:\\Program Files\\Nokia\\Carbide.c++ v2.0\\x86Build\\Symbian_Sup
port\\MSL\\MSL_Extras\\MSL_Win32\\Include;C:\\Program Files\\Nokia\\Carbide.c++
v2.0\\x86Build\\Symbian_Support\\Win32-x86 Support\\Headers\\Win32 SDK', 'NUMBER
_OF_PROCESSORS': '1', 'PROCESSOR_LEVEL': '15', 'EPOCROOT': '\\', 'OS': 'Windows_
NT', 'USERPROFILE': 'C:\\Documents and Settings\\lindsay'}

Jussi Toivola (jussi-toivola) said : #9

And this is printed just before the exception? If so, I'm out of ideas :(

I found some SCons bugs with the same exception. Google: "environment can only contain strings" scons. It seems that similar error is caused if there are unicode strings in the environment. It may help if you try convert the environment variables into regular strings.

Can you help with this problem?

Provide an answer of your own, or ask Blackpaw for more information if necessary.

To post a message you must log in.