# is there a better way to check if file copy worked or not in tcl?
proc fileCopy {sFrom sTo} {
set bUpdateFile 0
if {[catch {file stat "$sFrom" aFromStat} r]} {
FAIL "no 'from' file? $sFrom $::errorCode $::errorInfo"
return
}
if {[catch {file stat "$sTo" aToStat} r]} {
# no to file to compare with, do update
set bUpdateFile 1
}
if {! $bUpdateFile} {
# compare file stat info: mtime and size
#log "stat from=[parray aFromStat] to=[parray aToStat] "
if {$aFromStat(mtime) != $aToStat(mtime) || $aFromStat(size) != $aToStat(size)} {
set bUpdateFile 1
log "stat mtime from=$aFromStat(mtime) to=$aToStat(mtime)"
log "stat size from=$aFromStat(size) to=$aToStat(size)"
} else {
log "no update needed. stat from=[parray aFromStat {mtime,size}] to=[parray aToStat {mtime,size}]"
# did nothing
PASS "update not needed to:$sTo"
}
}
if {$bUpdateFile} {
log "file copy -force $sFrom $sTo"
if {[catch {file copy -force "$sFrom" "$sTo"} sError]} {
FAIL "file copy failed: err:$sError to:$sTo"
}
# check for fail (mutters silly tcl manual!? how check success of file copy?)
if {[catch {file stat "$sTo" aNewToStat} r]} {
FAIL "cannot check file stat for copied file? to:$sTo"
} else {
if {$aFromStat(mtime) == $aNewToStat(mtime) && $aFromStat(size) == $aNewToStat(size)} {
PASS "update done to:$sTo"
} else {
FAIL "update fstat doesn't match to:$sTo"
parray aFromStat
parray aNewToStat
}
}
}
}
proc log {s} {
puts "$s"
}
proc PASS {s} {
log "PASS: $s"
}
proc FAIL {s} {
log "FAIL: $s"
}
exec touch a.txt
fileCopy a.txt b.txt
exec rm -f ne.txt
fileCopy ne.txt b.txt
## OH! you must catch calls to file copy!
fileCopy a.txt notexistdir/fu/b.txt
fileCopy a.txt "K:/notexistdir/fu/b.txt"
log "test finish"
OUTPUT:
$ tclsh Tests/OLC/fileCopy.tcl
stat mtime from=1271431590 to=1271431430
stat size from=0 to=0
file copy -force a.txt b.txt
PASS: update done to:b.txt
FAIL: no 'from' file? ne.txt POSIX ENOENT {no such file or directory} could not read "ne.txt": no such file or directory
while executing
"file stat "$sFrom" aFromStat"
file copy -force a.txt notexistdir/fu/b.txt
FAIL: file copy failed: err:error copying "a.txt" to "notexistdir/fu/b.txt": no such file or directory to:notexistdir/fu/b.txt
FAIL: cannot check file stat for copied file? to:notexistdir/fu/b.txt
file copy -force a.txt K:/notexistdir/fu/b.txt
FAIL: file copy failed: err:error copying "a.txt" to "K:/notexistdir/fu/b.txt": no such file or directory to:K:/notexistdir/fu/b.txt
FAIL: cannot check file stat for copied file? to:K:/notexistdir/fu/b.txt
test finish
http://wiki.tcl.tk/10068
http://tmml.sourceforge.net/doc/tcl/file.html
http://www.beedub.com/book/2nd/unix.doc.html
Showing posts with label howto. Show all posts
Showing posts with label howto. Show all posts
Friday, 16 April 2010
HELP! How to get tcl expect session to not wrap lines at 80 columns?
Is it possible to get Windows + tcl + tcl expect session to not wrap lines at 80 columns?
I've spent a couple of days over past few months blipping into try and investigate and solve this but for a simple/stupid thing it's proving troublesome.
Somewhere in a tcl + tcl expect function which telnet's into qnx hardware cards or VMs:
# I had a big argument trying to get tcl+expect to set it's session to not t
# runcate columns at 80 chars (which causes various annoying parsing difficu
# lties). No matter what teminal tcl script was invoked from or what termina
# l environment/settings were used the expect session negotiated at telnet p
# rotocol level a terminal with 80 chars width. Also could not solve problem
# with sttying and setting terminal environment on qnx after login.
# If anyone can solve this please send info.
Wrapping at 80 chars is very annoying isn't it! But more annoying for trying to parse command-line interaction in a reliable way. Surely this has been solved by someone before? But after googling and grepping web it appears it might not have been ever solved + published on teh hinternet (in keeping with the tcl philosophy of hack it and get it working messily and move on).
# Wherever tcl is invoked from terminal then settings are passed through int
# o tcl process (environment set, terminal escapes, stty), and THESE are pas
# sed into telnet process invoked by tcl. BUT tcl + expect + telnet windows
# telnet sends NegotiateWindowSize 80x25 no matter what else is done.
# If a telnet session running in windows terminal or putty has window resize
# then telnet option messages are sent again. For now I can't find how to te
# ll that telnet session to set column width. Setting stty rows/cols or send
# ing ansi escape sequences doesn't seem to have an effect.
I have some wireshark logs with the telnet negotiation packets captured. I suppose we also have tcl expect source code ... but it is the telnet invoked which queries the environment it has and decides column setting to use.
# This causes Invalid telnet packet sent:
# sent telnetSuboptionBegin Negotiate about window size
# width \x02\x00 height \x00\x35
#olc::sendCli "\xff\xfa\x1f\x02\x00\x00\x35\xff\xf0"
stty-ing (or changing terminal program used) before tcl called or inside tcl before expect session started or sending ansi/other ESC sequences didn't work for me.
# stty rows 52 columns 512 < $spawn_out(slave,name)
# log::logarray expect_out
# log::logarray spawn_out
#LOG: log::logarray:spawn_out(slave,name) = ExpectInjector_pid8148
#?×?×?×8L?×ÐÝ: redirection not supported on Windows NT
#(ù8ùHùàmXùhùÀn: redirection not supported on Windows NT
Tried lots of different things but need to collect information on what works and how it works:
[Windows application] - [tclsh - [tcl expect - [spawn telnet]]] - [QNX VM or hardware]
Try Windows application =
cygwin rxvt
windows shell
eclipse (running tcl with DLTK plugin)
Try outside tcl telnet in from each application, then each of these:
* resizing window possible? + results in line wrapping? Negotiated at telnet level?
* stty settings before telnet
* stty settings on qnx after telnet in
* control using ansi ESC codes: disable line wrap OR set terminal width (OR other settings)
Try inside tcl invoked from each application and try each of the above and add:
* in tcl set stty things
* in tcl set environment things
* in tcl expect set things
Last thing: try all of the above from a linux machine with equivalent linux applications (terminal tool, xterm, eclipse).
Too many variants affect the problem!
It comes down to what qnx's bash does with it's output SO would be good if we could start there.
So ansi ESC codes / environment settings?
I've spent a couple of days over past few months blipping into try and investigate and solve this but for a simple/stupid thing it's proving troublesome.
Somewhere in a tcl + tcl expect function which telnet's into qnx hardware cards or VMs:
# I had a big argument trying to get tcl+expect to set it's session to not t
# runcate columns at 80 chars (which causes various annoying parsing difficu
# lties). No matter what teminal tcl script was invoked from or what termina
# l environment/settings were used the expect session negotiated at telnet p
# rotocol level a terminal with 80 chars width. Also could not solve problem
# with sttying and setting terminal environment on qnx after login.
# If anyone can solve this please send info.
Wrapping at 80 chars is very annoying isn't it! But more annoying for trying to parse command-line interaction in a reliable way. Surely this has been solved by someone before? But after googling and grepping web it appears it might not have been ever solved + published on teh hinternet (in keeping with the tcl philosophy of hack it and get it working messily and move on).
# Wherever tcl is invoked from terminal then settings are passed through int
# o tcl process (environment set, terminal escapes, stty), and THESE are pas
# sed into telnet process invoked by tcl. BUT tcl + expect + telnet windows
# telnet sends NegotiateWindowSize 80x25 no matter what else is done.
# If a telnet session running in windows terminal or putty has window resize
# then telnet option messages are sent again. For now I can't find how to te
# ll that telnet session to set column width. Setting stty rows/cols or send
# ing ansi escape sequences doesn't seem to have an effect.
I have some wireshark logs with the telnet negotiation packets captured. I suppose we also have tcl expect source code ... but it is the telnet invoked which queries the environment it has and decides column setting to use.
# This causes Invalid telnet packet sent:
# sent telnetSuboptionBegin Negotiate about window size
# width \x02\x00 height \x00\x35
#olc::sendCli "\xff\xfa\x1f\x02\x00\x00\x35\xff\xf0"
stty-ing (or changing terminal program used) before tcl called or inside tcl before expect session started or sending ansi/other ESC sequences didn't work for me.
# stty rows 52 columns 512 < $spawn_out(slave,name)
# log::logarray expect_out
# log::logarray spawn_out
#LOG: log::logarray:spawn_out(slave,name) = ExpectInjector_pid8148
#?×?×?×8L?×ÐÝ: redirection not supported on Windows NT
#(ù8ùHùàmXùhùÀn: redirection not supported on Windows NT
Tried lots of different things but need to collect information on what works and how it works:
[Windows application] - [tclsh - [tcl expect - [spawn telnet]]] - [QNX VM or hardware]
Try Windows application =
cygwin rxvt
windows shell
eclipse (running tcl with DLTK plugin)
Try outside tcl telnet in from each application, then each of these:
* resizing window possible? + results in line wrapping? Negotiated at telnet level?
* stty settings before telnet
* stty settings on qnx after telnet in
* control using ansi ESC codes: disable line wrap OR set terminal width (OR other settings)
Try inside tcl invoked from each application and try each of the above and add:
* in tcl set stty things
* in tcl set environment things
* in tcl expect set things
Last thing: try all of the above from a linux machine with equivalent linux applications (terminal tool, xterm, eclipse).
Too many variants affect the problem!
It comes down to what qnx's bash does with it's output SO would be good if we could start there.
So ansi ESC codes / environment settings?
Tuesday, 14 July 2009
notes/howto setup symbian dev environment linux
You can set up a symbian development environment in a couple of hours.
Follow these instructions: http://www.martin.st/symbian/ they are very good.
Here are my extra notes on the install.
They might be useful to someone else (or myself again in future).
I have a nokia E65 and although it is very grotty (interface-wise) it has nice hardware. I like being able to make software for my electronic devices. I played with python apps on the phone a bit. Symbian signing is very awkward for sharing and even playing/experimenting/developing little apps.
I http://www.openstreetmap.org a bit and I use a bluetooth GPS with my mobile to collect the data with WhereAmI http://www.symbianos.org/whereami which is a really nice map display and GPS collection tool. It can also collect GSM cellid information, or rather, it hints it can but it doesn't on my phone. So I want to get the source and see what the problem is and can I get it working.
================================================================================
http://www.google.ie/search?q=symbian+development+linux
http://wiki.forum.nokia.com/index.php/Symbian_development_on_Linux_and_OS_X
The three main approaches. Realistically there seems to be one sensible approach.
Symbian's build system is based mostly on perl. And a bit of make.
It seems heavyish and they should have used make perhaps but the symbian apps are all going to be small enough really. These scripts are modified to work on unix. This matches symbian build system very closely. Seems to be best supported.
Other options: Replacing the build system with makefiles giving a lighter build system or integrating the build system with IDEs don't seem to be well supported.
http://www.martin.st/symbian/ based on GnuPoc project
"for S60 3rd ed and UIQ 3, you need the EKA2 toolchain."
Of course we're going to build the compiler from source and not take binaries >;)
And of course we're going to install the extra gnupoc tools so we don't have to use wine too much.
1. Working in this area and tools/scripts + source code are going here:
export SYM_WORKING_DIR=$HOME/src/mobile
2. compiler is going here:
export SYM_COMPILER_DIR=$HOME/csl-gcc
3. SDK is going here:
export EPOCROOT=$HOME/symbian-sdks/s60_3_fp2_v11/
http://www.forum.nokia.com/Tools_Docs_and_Code/Tools/Platforms/S60_Platform_SDKs/
3rd ed fp2 v1.1 430Mish
Here is the error I got that showed I needed bison. "Unexcpected(sic) error"
Flailing newbie help trap.
Here is the error I got that showed I needed ssl-dev package.
It actually did say you needed openssl in the README.
Flailing newbie help trap.
No excuses for slacking off while compiling/installing/downloading.
Also poke inside the scripts you've installed.
Read more about gnupoc here: http://gnupoc.sourceforge.net/HOWTO/
http://gnupoc.sourceforge.net/
gnupoc_install gnupoc-utils
http://web.archive.org/web/*/http://www.wayfinder.it/resources/uiq_gnupoc.php
Reading the "Build tools guide" is helpful to know more about what the build scripts are doing.
http://developer.symbian.com/main/documentation/sdl/symbian94/sdk/doc_source/ToolsAndUtilities94/BuildTools/index.html
How to use bldmake, How to use abld, etc.
Info on figuring out problems with how to set up environment for SDK:
This is done above to resolve this problem:
GSM_LOCATION is compiled out in the source code as you get it now.
svn diff >../whereami_enable_gsm_location.patch
meld .
Follow these instructions: http://www.martin.st/symbian/ they are very good.
Here are my extra notes on the install.
They might be useful to someone else (or myself again in future).
I have a nokia E65 and although it is very grotty (interface-wise) it has nice hardware. I like being able to make software for my electronic devices. I played with python apps on the phone a bit. Symbian signing is very awkward for sharing and even playing/experimenting/developing little apps.
I http://www.openstreetmap.org a bit and I use a bluetooth GPS with my mobile to collect the data with WhereAmI http://www.symbianos.org/whereami which is a really nice map display and GPS collection tool. It can also collect GSM cellid information, or rather, it hints it can but it doesn't on my phone. So I want to get the source and see what the problem is and can I get it working.
================================================================================
http://www.google.ie/search?q=symbian+development+linux
http://wiki.forum.nokia.com/index.php/Symbian_development_on_Linux_and_OS_X
The three main approaches. Realistically there seems to be one sensible approach.
Symbian's build system is based mostly on perl. And a bit of make.
It seems heavyish and they should have used make perhaps but the symbian apps are all going to be small enough really. These scripts are modified to work on unix. This matches symbian build system very closely. Seems to be best supported.
Other options: Replacing the build system with makefiles giving a lighter build system or integrating the build system with IDEs don't seem to be well supported.
Start here.
http://www.martin.st/symbian/ based on GnuPoc project
"for S60 3rd ed and UIQ 3, you need the EKA2 toolchain."
Of course we're going to build the compiler from source and not take binaries >;)
And of course we're going to install the extra gnupoc tools so we don't have to use wine too much.
What is going to be installed.
1. Working in this area and tools/scripts + source code are going here:
export SYM_WORKING_DIR=$HOME/src/mobile
2. compiler is going here:
export SYM_COMPILER_DIR=$HOME/csl-gcc
3. SDK is going here:
export EPOCROOT=$HOME/symbian-sdks/s60_3_fp2_v11/
Install steps.
0. Signup to nokia and start SDK download
http://www.forum.nokia.com/Tools_Docs_and_Code/Tools/Platforms/S60_Platform_SDKs/
3rd ed fp2 v1.1 430Mish
1. install gnupoc tools and 2. install compiler
mkdir -p $SYM_WORKING_DIR; cd $SYM_WORKING_DIR
wget http://www.martin.st/symbian/gnupoc-package-1.13.tar.gz
# http://www.codesourcery.com/sgpp/lite/arm/releases/2005Q1C # and form fill and get OR:
wget http://www.martin.st/symbian/gnu-csl-arm-2005Q1C-arm-none-symbianelf.src.tar.bz2
tar -zxvf gnupoc-package-1.13.tar.gz
cd gnupoc-package-1.13
cd tools
less README
# I needed to install bison, I also do other development so possibly already had a
# bunch of other devel packages and tools installed. If it needs bison it probably
# needs make/autoconf/gcc packages
sudo apt-get install bison
./install_csl_gcc ../../gnu-csl-arm-2005Q1C-arm-none-symbianelf.src.tar.bz2 $SYM_COMPILER_DIR
# I also did need libssl-dev and already had zlib
sudo apt-get install libssl-dev
dpkg -l |grep zlib
./install_eka2_tools $SYM_COMPILER_DIR
#that goes off and gets cross-binutils and compiler and builds them ....
Here is the error I got that showed I needed bison. "Unexcpected(sic) error"
Flailing newbie help trap.
bison -d -o gengtype-yacc.c gengtype-yacc.y
make[1]: bison: Command not found
make[1]: [gengtype-yacc.h] Error 127 (ignored)
gcc -c -g -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-error -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -I. -I. -I./. -I./../include \
gengtype-lex.c -o gengtype-lex.o
gcc: gengtype-lex.c: No such file or directory
gcc: no input files
make[1]: *** [gengtype-lex.o] Error 1
make[1]: Leaving directory `$HOME/src/mobile/gnupoc-package-1.13/tools/csl-build/gcc-csl-arm/gcc'
make: *** [all-gcc] Error 2
Unexcpected error: aborting.
Here is the error I got that showed I needed ssl-dev package.
It actually did say you needed openssl in the README.
Flailing newbie help trap.
g++ -Wall -gstabs+ -I../include -DTEST -ggdb -c signutils.cpp -o signutils.o
signutils.cpp:36:25: error: openssl/evp.h: No such file or directory
signutils.cpp:37:25: error: openssl/pem.h: No such file or directory
signutils.cpp:44:25: error: openssl/err.h: No such file or directory
2-and-a-half. Read up on symbian build tools and
No excuses for slacking off while compiling/installing/downloading.
Also poke inside the scripts you've installed.
Read more about gnupoc here: http://gnupoc.sourceforge.net/HOWTO/
http://gnupoc.sourceforge.net/
gnupoc_install gnupoc-utils
http://web.archive.org/web/*/http://www.wayfinder.it/resources/uiq_gnupoc.php
Reading the "Build tools guide" is helpful to know more about what the build scripts are doing.
http://developer.symbian.com/main/documentation/sdl/symbian94/sdk/doc_source/ToolsAndUtilities94/BuildTools/index.html
How to use bldmake, How to use abld, etc.
3. install the SDK
# Example on(sic) installing an SDK:
## no! don't get your own unshield. sudo apt-get install unshield
export PATH=`pwd`/unshield:$PATH
cd $SYM_WORKING_DIR/gnupoc-package-1.13/sdks
mv ~/Downloads/S60_3rd_Edition_SDK_Feature_Pack_2_v1_1_en.zip ../..
./install_gnupoc_s60_32 ../../S60_3rd_Edition_SDK_Feature_Pack_2_v1_1_en.zip ~/symbian-sdks/s60_3_fp2_v11
# needed to do this (lzma_decoder.h and any SDK includes need to be findable from working area)
# perhaps should be working inside the SDK dir structure
cd $SYM_WORKING_DIR/whereami_trunk/sis
ln -s $HOME/symbian-sdks/s60_3_fp2_v11/epoc32 ../../
## I did this: don't know did it work, switched to using gcc
cp $HOME/symbian-sdks/s60_3_fp2_v11/epoc32/tools/uidcrc.exe $HOME/.wine/drive_c/windows/
cp $HOME/symbian-sdks/s60_3_fp2_v11/epoc32/tools/make.exe $HOME/.wine/drive_c/windows/
#MESSY:
cp $HOME/symbian-sdks/s60_3_fp2_v11/epoc32/tools/*.exe $HOME/.wine/drive_c/windows/
ls $HOME/symbian-sdks/s60_3_fp2_v11/epoc32/release/winscw/udeb/sdkw.exe
Info on figuring out problems with how to set up environment for SDK:
### unshield did not work for me initially at this stage until I figured out where it was and set PATH
./unshield/unshield -V
./unshield/unshield -D3 l _e/data2.cab
find $HOME/symbian-sdks/s60_3_fp2_v11/epoc32/tools -name \*.orig -exec rm {} \;
cd $HOME/symbian-sdks/s60_3_fp2_v11/epoc32/tools; chmod a+x *.pl bldmake abld makmake bmconv rcomp makesis epoc eshell petran pfsdump setupcomms elf2e32 mifconv makekeys signsis extmake rtf2ptml cjpeg
### Take a look at the SDK, the install doc, the examples
ls $HOME/symbian-sdks/s60_3_fp2_v11/
epoc32/ S60_3rd_Edition_FP2_SDK_for_Symbian_OS_Installation_Guide_V1.1.pdf
examples/ s60cppexamples/
GCCE_readme.txt s60tools/
Nokia_EULA.txt series60doc/
ls $HOME/symbian-sdks/s60_3_fp2_v11/s60cppexamples/
addressbook clientserverasync dynamicsettinglist helperfunctions localization note progressbar webclient
aiwconsumerbasics clientserversync filelist helpexample locationlandmarksrefappfors60 npbitmap query
animation contacts finditemtestapp hwrmtestapp locationlandmarksuirefapp ocrexample readme.txt
audiostreamexample datamobility focusevent imopenapiexample locationrefappfors60 openc_ex registration
brctlsampleapp directorylocalizerex graphics isvtelcallapp locationsatviewrefapp openglex richtexteditor
chat _doc guiengine isvtelinfoapp messaging popupfield sipexample
clfexample driveinfo helloworldbasic listbox myview popuplist uniteditorex
cat $HOME/symbian-sdks/s60_3_fp2_v11/s60cppexamples/readme.txt
To open the Example Application Help documentation, please go to the _doc folder
and double-click the index.htm file found there.
wine: could not load L"C:\\windows\\system32\\make.exe": Module not found
make: *** [FINALicons] Error 126
ls $HOME/csl-gcc/bin/
arm-none-symbianelf-addr2line arm-none-symbianelf-cpp arm-none-symbianelf-gcov arm-none-symbianelf-ranlib bmconv makekeys signsis
arm-none-symbianelf-ar arm-none-symbianelf-g++ arm-none-symbianelf-ld arm-none-symbianelf-readelf copy makesis uidcrc
arm-none-symbianelf-as arm-none-symbianelf-gcc arm-none-symbianelf-nm arm-none-symbianelf-size del mifconv
arm-none-symbianelf-c++ arm-none-symbianelf-gcc-3.4.3 arm-none-symbianelf-objcopy arm-none-symbianelf-strings elf2e32 rcomp
arm-none-symbianelf-c++filt arm-none-symbianelf-gccbug arm-none-symbianelf-objdump arm-none-symbianelf-strip extmake rem
find $EPOCROOT -name make.exe
$HOME/symbian-sdks/s60_3_fp2_v11/epoc32/tools/make.exe
$HOME/symbian-sdks/s60_3_fp2_v11/epoc32/tools_orig/make.exe
cp $HOME/symbian-sdks/s60_3_fp2_v11/epoc32/tools/uidcrc.exe $HOME/.wine/drive_c/windows/
cp $HOME/symbian-sdks/s60_3_fp2_v11/epoc32/tools/make.exe $HOME/.wine/drive_c/windows/
perl -S makmake.pl -D $HOME/src/mobile/whereami_trunk/group/s60_v3/whereami WINSCW
ERROR: Unable to identify a valid CodeWarrior for Symbian OS installation
make: *** [MAKEFILEwhereami] Error 255
MESSY:
cp $HOME/symbian-sdks/s60_3_fp2_v11/epoc32/tools/*.exe $HOME/.wine/drive_c/windows/
$HOME/symbian-sdks/s60_3_fp2_v11/epoc32/release/winscw/udeb/sdkw.exe
4. try out hello world
cd ~/symbian-sdks/s60_3_fp2_v11/s60cppexamples
cd helloworldbasic/group/
bldmake bldfiles
abld build gcce urel
cd ../sis
makesis helloworldbasic_gcce.pkg helloworldbasic.sis
Yay. Install finished
Install this in your .bashrc
# This goes in my .bashrc or symbian environment setup script:
export SYM_WORKING_DIR=$HOME/src/mobile
export SYM_COMPILER_DIR=$HOME/csl-gcc
export PATH=$PATH:$HOME/symbian-sdks/s60_3_fp2_v11/epoc32/tools
export PATH=$PATH:$SYM_COMPILER_DIR/bin
export EPOCROOT=$HOME/symbian-sdks/s60_3_fp2_v11/
Now play with WhereAmI
# everyday commands:
cd $SYM_WORKING_DIR/whereami_trunk
cd group/s60_v3
bldmake bldfiles
abld build gcce urel # this works instead
cd ../../sis
makesis whereami_s60_v3.pkg whereami_s60_v3_jco.sis
signsis whereami_s60_v3_jco.sis whereami_s60_v3_jco.sisx mycert.cer mykey.key
cd ../../group/s60_v3
cd $SYM_WORKING_DIR
svn co https://svn.symbianos.org/whereami/trunk/ whereami_trunk
# And this is how I can work quickly compile and make .sis for whereami
# put this in a script or README or notes or blog somewhere
cd $SYM_WORKING_DIR/whereami_trunk
cd group/s60_v3
bldmake bldfiles
#abld build winscw udeb #? needs wine, .. make.exe problem?
abld build gcce urel # this works instead
cd ../../sis
makesis whereami_s60_v3.pkg whereami_s60_v3_jco.sis
# and key signing to make sisx, don't know does this help much?
# privately made key. My phone is a bit hacked so I can install any .sis on it.
# first make key and cert for yourself
[[ ! -f mykey.key ]] || [[ ! -f mycert.cer ]] &&
makekeys -cert -expdays 3650 -dname "CN=Name Surname OU=Development O=Company Name C=UK EM=foo@bar.com" mykey.key mycert.cer
# sign application each time you need to
signsis whereami_s60_v3_jco.sis whereami_s60_v3_jco.sisx mycert.cer mykey.key
# how clean make/build?
# this does a bit of it anyway:
rm $HOME/symbian-sdks/s60_3_fp2_v11/epoc32/build${HOME}/src/mobile/whereami_trunk/group/s60_v3/whereami*/*/urel/*.{o,exe}
WhereAmI needed lzma_decoder.h
This is done above to resolve this problem:
cd $SYM_WORKING_DIR/whereami_trunk/sis
ln -s $HOME/symbian-sdks/s60_3_fp2_v11/epoc32 ../../
WARNING: Can't find following headers in User or System Include Paths
"lzma_decoder.h"
(User Inc Paths "$HOME/src/mobile/whereami_trunk/src/" "$HOME/src/mobile/whereami_trunk/group/s60_v3/" "$HOME/src/mobile/whereami_trunk/inc/" "$HOME/src/mobile/whereami_trunk/data/")
Dependency list for "$HOME/src/mobile/whereami_trunk/src/nmeaparser.cpp" may be incomplete
dpkg-query -L lzma-dev # no, LzmaDecode.h
# here it is:
svn co https://svn.symbianos.org/lzma/
cd lzma/C/Symbian/group
#oops! it's part of SDK:
$HOME/symbian-sdks/s60_3_fp2_v11/epoc32/include/lzma_decoder.h
GSM_LOCATION enable
GSM_LOCATION is compiled out in the source code as you get it now.
+++ add to this file group/s60_v3/whereami.mmp (after GPS_LBS)
MACRO GSM_LOCATION
#define GSM_LOCATION
svn diff >../whereami_enable_gsm_location.patch
meld .
Subscribe to:
Posts (Atom)