Browse Source

adjust tcl:™️:path for starting with tclsh src/punk86.vfs/main.tcl

master
Julian Noble 6 months ago
parent
commit
58a5b5e193
  1. 7
      src/punk86.vfs/lib/app-punk/repl.tcl

7
src/punk86.vfs/lib/app-punk/repl.tcl

@ -24,8 +24,11 @@ if {[file isdirectory [pwd]/modules]} {
#2)
if {[string match "*.vfs/*" [file normalize [info script]]]} {
#src/xxx.vfs/lib/app-punk/repl.tcl
#we assume if calling directly into .vfs that the user would prefer to use src/modules - so go up 4 levels
set modulefolder [file dirname [file dirname [file dirname [file dirname [file normalize [info script]]]]]]/modules
# assume if calling directly into .vfs that the user would prefer to use src/modules - so go up 4 levels
#set srcmodulefolder [file dirname [file dirname [file dirname [file dirname [file normalize [info script]]]]]]/modules
# - the src/modules folder doesn't contain important modules such as vendormodules - so the above probably isn't that useful
set srcfolder [file dirname [file dirname [file dirname [file dirname [file normalize [info script]]]]]]
set modulefolder [file join [file dirname $srcfolder] modules] ;#modules folder at same level as src folder
} else {
# .../bin/punkXX.exe look for ../modules (i.e modules folder at same level as bin folder)
set modulefolder [file dirname [file dirname [info nameofexecutable]]]/modules

Loading…
Cancel
Save