ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> tdk
tdk
[TDK] A wrapped app runs differently than when unwrapped: how to debug?
by George Petasis other posts by this author
Jun 13 2008 4:13AM messages near this date
view in the new Beta List Site
Re: [TDK] [Komodo-discuss] Tcl remote debugger and spawnpoints | Re: [TDK] A wrapped app runs differently than when unwrapped: how to debug?
Hi all,

I am facing a problem with TDK 4.1.0, which I don't know how to debug.
I have a medium-sized application in Tcl, with a few C extensions
(through SWIG).
The applications runs ok from the disk (unwrapped). Among other stuff,
it interacts with excel,
and writes a spreadsheet.

Now, I wrap my application using the command line interface:

eval exec tclapp -- -debug -relativeto [list $OutputDir]          -compile -follow-recommend
 -archive [list $repository]           -pkgref Itcl -pkgref Itk          -pkgref img::base -
pkgref img::png -pkgref img::bmp -pkgref
img::gif          -pkgref img::ico -pkgref img::jpeg -pkgref img::ps -pkgref
img::tiff          -pkgref img::window -pkgref BWidget          -pkgref Iwidgets -pkgref tco
m -pkgref tile          -pkgref struct::tree -pkgref struct::list -pkgref cmdline          -
prefix [list $prefix_exe] -icon [list $icon]          -out [list $output_exe]          -enco
ding cp1251 -encoding iso8859-1 -encoding iso8859-7          -encoding utf-8 $Files

BUT, the exe I get exhibits a slightly different behaviour: it is unable
to write the excel spreadsheet for some (but not all)
excel spreadsheets. So, something is different between the wrapped &
unwrapped applications. How can I find out what is different?
The only think that I discovered is different, is the system encoding.
The unwrapped app has cp1253, while the wrapped has cp1252. But changing
in the wrapped app the encoding with "encoding system cp1253" has no
effect, and I still get an error from excel.

So, I tried to change the way I create the wrapped app, and decided to
use the tclapp GUI to do the wrapping. But with no success :-) What I
did was:

I started tclapp.
I selected "C:/Program Files
(x86)/Tcl/bin/base-tk8.5-thread-win32-ix86.exe" as prefix file.
I clicked "Compile .tcl files"
I set "C:/Users/petasis/Editor-Runtime/editor.exe" as output file.

In the "Files" tab, I pressed the last button on the right "Wrap all
files found under directory"
I selected the application "main" file, and pressed "Set Main"

Then, in the "Packages" tab, I pressed "Scan files for required
packages" (the first one).
This added many packages. Then I pressed "Add required and recommended
dependent packages" (the third one).
This added even more packages.

I wrapped my app, but not it fails finding a package:

can't find package Tablelist_tile
     while executing
"package require Tablelist_tile"

During wrapping of course, the package was there:

Packages ...
   BWidget           1.8    tcl        @ R c:\program files
(x86)\tcl\lib\teapot
   Img               1.3    tcl        @ R c:\program files
(x86)\tcl\lib\teapot
P Itcl              3.4    tcl        @
P Itcl              3.4    win32-ix86 @
   Itk               3.4    win32-ix86 @ R c:\program files
(x86)\tcl\lib\teapot
   Iwidgets          4.0.2  tcl        @ R c:\program files
(x86)\tcl\lib\teapot
P Tcl               8.5.2  win32-ix86 @
P Tk                8.5.2  tcl        @
P Tk                8.5.2  win32-ix86 @
   Tktable           2.9    win32-ix86 @ R c:\program files
(x86)\tcl\lib\teapot
   cmdline           1.3    tcl        @ R c:\program files
(x86)\tcl\lib\teapot
P dde               1.3.2  win32-ix86 @
   img::base         1.3    win32-ix86 @ R c:\program files
(x86)\tcl\lib\teapot
   img::bmp          1.3    win32-ix86 @ R c:\program files
(x86)\tcl\lib\teapot
   img::gif          1.3    win32-ix86 @ R c:\program files
(x86)\tcl\lib\teapot
   img::ico          1.3    win32-ix86 @ R c:\program files
(x86)\tcl\lib\teapot
   img::jpeg         1.3    win32-ix86 @ R c:\program files
(x86)\tcl\lib\teapot
   img::pcx          1.3    win32-ix86 @ R c:\program files
(x86)\tcl\lib\teapot
   img::pixmap       1.3    win32-ix86 @ R c:\program files
(x86)\tcl\lib\teapot
   img::png          1.3    win32-ix86 @ R c:\program files
(x86)\tcl\lib\teapot
   img::ppm          1.3    win32-ix86 @ R c:\program files
(x86)\tcl\lib\teapot
   img::ps           1.3    win32-ix86 @ R c:\program files
(x86)\tcl\lib\teapot
   img::sgi          1.3    win32-ix86 @ R c:\program files
(x86)\tcl\lib\teapot
   img::sun          1.3    win32-ix86 @ R c:\program files
(x86)\tcl\lib\teapot
   img::tga          1.3    win32-ix86 @ R c:\program files
(x86)\tcl\lib\teapot
   img::tiff         1.3    win32-ix86 @ R c:\program files
(x86)\tcl\lib\teapot
   img::window       1.3    win32-ix86 @ R c:\program files
(x86)\tcl\lib\teapot
   img::xbm          1.3    win32-ix86 @ R c:\program files
(x86)\tcl\lib\teapot
   img::xpm          1.3    win32-ix86 @ R c:\program files
(x86)\tcl\lib\teapot
   jpegtcl           1.0    win32-ix86 @ R c:\program files
(x86)\tcl\lib\teapot
   pngtcl            1.2.24 win32-ix86 @ R c:\program files
(x86)\tcl\lib\teapot
P registry          1.2.1  win32-ix86 @
   struct::list      1.6.2  tcl        @ R c:\program files
(x86)\tcl\lib\teapot
   struct::tree      2.1.1  tcl        @ R c:\program files
(x86)\tcl\lib\teapot
   tablelist         4.9    tcl        @ R c:\program files
(x86)\tcl\lib\teapot
   tablelist::common 4.9    tcl        @ R c:\program files
(x86)\tcl\lib\teapot
   tablelist_tile    4.9    tcl        @ R c:\program files
(x86)\tcl\lib\teapot
   tcllibc           0.3.2  win32-ix86 @ R c:\program files
(x86)\tcl\lib\teapot
   tcom              3.9    win32-ix86 @ R c:\program files
(x86)\tcl\lib\teapot
   tifftcl           3.8.2  win32-ix86 @ R c:\program files
(x86)\tcl\lib\teapot
   tile              0.8.2  win32-ix86 @ R c:\program files
(x86)\tcl\lib\teapot
   zlibtcl           1.2.3  win32-ix86 @ R c:\program files
(x86)\tcl\lib\teapot

So, what to do now? Any ideas?

BTW, my app works as a wrapped one with 8.4 & TDK 3.x. Including
writting the excel spreadsheet for the files
that now fails. How to debug this?

Regards,

George

_______________________________________________
TDK mailing list
TDK@[...].com
http://listserv.ActiveState.com/mailman/listinfo/tdk
Thread:
George Petasis
Jeff Hobbs
Georgios Petasis
Andreas Kupries
Georgios Petasis
Andreas Kupries

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved