Home > Archive > Tcl > December 2007 > How to compile tcl or encrypt tcl
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How to compile tcl or encrypt tcl
|
|
| stratus 2007-12-24, 10:19 pm |
| I use TclPro1.5 to compile my tcl script with tixwish in the Solaris before.
But I cannot use the same method in Linux. Why?
Is there any utility for me to compile or encrypt the code by using tixwish?
The following is the simple code if I use the tixwish:
#!/home/albertl/local/bin/tixwish
puts "haha"
And after using procomp by the TclPro1.5
Error in startup script: The TclPro ByteCode Loader is not available or does not support the correct version
while executing
"error "The TclPro ByteCode Loader is not available or does not support the correct version""
invoked from within
"if {[catch {package require tbcload 1.3} err] == 1} {
error "The TclPro ByteCode Loader is not available or does not support the correct version"
...."
(file "a.tbc" line 4)
The problem seems that tbcload1.3 cannot be found?
But tbcload is already there "/home/albertl/local/lib/tbcload1.3"
Why?
Can anyone tell me?
| |
| Michael Schlenker 2007-12-25, 8:12 am |
| stratus schrieb:
> I use TclPro1.5 to compile my tcl script with tixwish in the Solaris before.
> But I cannot use the same method in Linux. Why?
>
> Is there any utility for me to compile or encrypt the code by using tixwish?
>
Tixwish is just a wish shell with the Tix package baked in. If TclPro
does not have a specific bigwish with Tix included your out of luck on
that road (but could build your own if you liked).
You might have success with freewrap or TDK, don't know for sure.
Michael
| |
| Georgios Petasis 2007-12-27, 7:16 pm |
| First of all, once you "compile" yout tcl scripts with TclPro, then the
generated bytecodes will run on all platforms, including Solaris.
A plain tclsh, wish or what other interpreter you use, cannot understand
the serialisation of bytecodes generated by TclPro. You need a package
for doing this, and this package is named tbcload.
You have two options:
a) Install and unse under Solaris ActiveTcl. ActiveTcl includes the
latest tbcload package binaries.
or
b) Find the latest tbcload sources and compile it yourself.
For a few links, you can try http://wiki.tcl.tk/2624.
My suggestion is however to buy TclDevKit, which will produce much more
better bytecodes, and will compile also code for tcl 8.4 & 8.5, that the
old (but free) TclPro cannot handle...
Unless you don't use the new features :-)
George
O/H stratus έγραψε:
> I use TclPro1.5 to compile my tcl script with tixwish in the Solaris before.
> But I cannot use the same method in Linux. Why?
>
> Is there any utility for me to compile or encrypt the code by using tixwish?
>
> The following is the simple code if I use the tixwish:
>
> #!/home/albertl/local/bin/tixwish
>
> puts "haha"
>
> And after using procomp by the TclPro1.5
> Error in startup script: The TclPro ByteCode Loader is not available or does not support the correct version
> while executing
> "error "The TclPro ByteCode Loader is not available or does not support the correct version""
> invoked from within
> "if {[catch {package require tbcload 1.3} err] == 1} {
> error "The TclPro ByteCode Loader is not available or does not support the correct version"
> ..."
> (file "a.tbc" line 4)
>
>
> The problem seems that tbcload1.3 cannot be found?
> But tbcload is already there "/home/albertl/local/lib/tbcload1.3"
> Why?
>
> Can anyone tell me?
|
|
|
|
|