Hello, All,
I know, this is an old discussion. But I struggled the last days with the same problem and think that I have found a clean solution.
Tcl doesn't find init.tcl, because the shell environment variable $ENV{TCL_Library} points to the wrong place, I think. Altering the environment variables of a parent process is not easy, but I think the following solution is the best and cleanest solution, if you don't want to use a tkkit.
You only have to add the following begin block to you Tcl::Tk or Tkx perl script:
BEGIN {
if ($ENV{PAR_TEMP} && $ENV{TCL_Library} ne "$ENV{PAR_TEMP}/inc/lib
+/tcl8.6") {
print "Starting a Tcl::Tk PAR-exe file\n";
print "We need to set shell environment variables first \n";
+
$ENV{TCL_Library} = "$ENV{PAR_TEMP}/inc/lib/tcl8.6";
# I don't know whether this is really necessary?
$ENV{TK_Library} = "$ENV{PAR_TEMP}/inc/lib/tcl8.6";
system($0);
exit();
}
}
I hope, this will help someone.. It is really cool to distribute the perl/Tcl::Tk scripts with pp...
Best wishes,
Max
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|