- Timestamp:
- Jan 11, 2016, 1:14:34 PM (11 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 8685395
- Parents:
- a61660c
- File:
-
- 1 edited
-
toltcl/generic/tolsh.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
toltcl/generic/tolsh.c
ra61660c r9450eca 2 2 #include "toltcl.h" 3 3 4 #if !defined(WIN32) 4 #if defined(WIN32) 5 #include "windows.h" 6 #else 5 7 #include "tol/tol_init.h" 6 8 #endif … … 27 29 } 28 30 31 #if defined(WIN32) 32 void SetupDllSearchPath( const char *argv0 ) 33 { 34 int n; 35 //const char **strArr; 36 const char **ptr; 37 Tcl_DString dstr; 38 39 //ptr = &strArr; 40 Tcl_SplitPath( argv0, &n, &ptr ); 41 if( n >= 2 ) 42 { 43 Tcl_DStringInit( &dstr ); 44 Tcl_JoinPath( n - 1, ptr, &dstr ); 45 SetDllDirectory( Tcl_DStringValue( &dstr ) ); 46 Tcl_DStringFree( &dstr ); 47 } 48 Tcl_Free( (char*)ptr ); 49 } 50 #endif 51 29 52 int AppInit(Tcl_Interp *interp) 30 53 { … … 34 57 } 35 58 SetupArgv( interp ); 59 const char *argv0 = Tcl_GetNameOfExecutable(); 60 #if defined(WIN32) 61 SetupDllSearchPath( argv0 ); 62 #endif 36 63 Tcl_VarEval( interp, "lappend", " auto_path", " [file join", 37 " [file dir [file dir ", Tcl_GetNameOfExecutable(),64 " [file dir [file dir ", argv0, 38 65 " ] ] lib ]", NULL ); 39 66 if ( !Tcl_PkgRequire( interp, "TolshApp", TOLTCL_VERSION, 1) )
Note: See TracChangeset
for help on using the changeset viewer.
