Go Back   FlashFXP Forums > > > >

Eggdrop All eggdrop related questions

Reply
 
Thread Tools Rate Thread Display Modes
Old 11-11-2003, 06:59 PM   #1
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default Windrop inside ioftpd dir

Apparently, as B0unty brought to my attention, putting my windrop directory inside ioftpd (w:\ioftpd\windrop) is NOT cool...
windrop then try to load libraries from w:\ioftpd\lib\tcl8.4 instead of w:\ioftpd\windrop\lib\tcl8.4 ..?

I searched google a little:
Quote:
auto_path
If set, then it must contain a valid Tcl list giving directories to search during auto-load operations. This variable is initialized during startup to contain, in order: the directories listed in the TCLLIBPATH environment variable, the directory named by the $tcl_library variable, the parent directory of $tcl_library, the directories listed in the $tcl_pkgPath variable.

env(TCL_LIBRARY)
If set, then it specifies the location of the directory containing library scripts (the value of this variable will be assigned to the tcl_library variable and therefore returned by the command info library). If this variable isn't set then a default value is used.
putlog "tcl_library = $tcl_library" shows "tcl_library = W:/ioFTPD/lib/tcl8.4" .... uncool...

I checked my environment, and no TCL_LIBRARY is defined... So... since the doc says $tcl_library is filled from the env. variable, and it's not set, I wonder where the W:/ioFTPD/lib/tcl8.4 comes from ..?

Any idea ?

PS To fix, scripts simply has to re-set $auto_path before trying to include any package:
set auto_path "./lib/tcl8.4/ $auto_path"
package require http 2.4
# bingo!
Mouton is offline   Reply With Quote
Old 11-11-2003, 07:02 PM   #2
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

Found something else that might answer that:
Quote:
The initial value of tcl_library is set when an interpreter is created by searching several different directories until one is found that contains an appropriate Tcl startup script.
Quote:
If TCL_LIBRARY isn't set or doesn't refer to an appropriate directory, then Tcl checks several other directories based on a compiled-in default location, the location of the binary containing the application, and the current working directory.
Makes one wonder...
Mouton is offline   Reply With Quote
Old 11-11-2003, 07:42 PM   #3
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

Apparently, it's not a windrop issue:
Code:
W:\ioFTPD\windrop>tclsh84.exe
% info library
W:/ioFTPD/lib/tcl8.4
%
Might be something funneh with win32 tcl libraries.
Mouton is offline   Reply With Quote
Old 03-21-2004, 01:14 PM   #4
epoke
Member
ioFTPD Foundation User
 
Join Date: Nov 2003
Posts: 60
Default

hum so is it possible to put windrop directory inside ioftpd ?
is there a fix ,trick ?
tia
epoke is offline   Reply With Quote
Old 03-21-2004, 01:27 PM   #5
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

replacing packages ... with source ... works.
Mouton is offline   Reply With Quote
Old 03-21-2004, 02:02 PM   #6
epoke
Member
ioFTPD Foundation User
 
Join Date: Nov 2003
Posts: 60
Talking

erf this mean ...
sorry i don't understood
epoke is offline   Reply With Quote
Old 03-21-2004, 02:38 PM   #7
Harm
Too much time...
Ultimate Scripter
 
Join Date: Jul 2003
Posts: 1,430
Default

It means that all 'package require ...' instructions won't work since the path to the tcl libs is wrong.
BUT that all 'source bla.tcl' instructions will work.

So, you have to replace all 'package require' with 'source'.

Or better, you can avoid this behaviour if you don't have your windrop dir in your ioFTPD dir. ie. c:\windrop is a good location.
Harm is offline   Reply With Quote
Old 04-07-2004, 11:40 AM   #8
mog-on
Junior Member
 
Join Date: Jun 2003
Posts: 20
Default

You can use your tcl's package wherever they are.

You just have to set correctly 'auto_path' before 'package require' using 'lappend auto_path MyLibPath'.

MyLibPath must contain a correct 'pkgIndex.tcl' which can be generated using the command 'pkg_mkIndex' (refer to tcl doc for details)

'source' works obviously ... but this is dirty
mog-on is offline   Reply With Quote
Reply

Tags
$tcl_library, directory, set, tcl_library, variable

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Does FlashFXP Support SFTP Sites? Yes it does Pennix General Discussion 18 09-28-2008 11:58 AM


All times are GMT -5. The time now is 08:59 PM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)