D 2023-09-06T07:54:33.910 J foundin 1.0 J icomment The\sdocumentation\smentions\sthat\sif\syou\swant\sto\sbe\sable\sto\s`package\srequire\swapp`\sdirectly,\syou\sshould\sbuild\s`wapptclsh`.\sHowever\sit's\salso\svery\seasy\s(and\sI\swould\sargue\svery\suseful)\sto\sset\sup\swapp\sto\sbe\sdirectly\scompatible\swith\svanilla\s`tclsh`.\sIf\syou\sput\sa\s`pkgIndex.tcl`\sfile\sin\sthe\sroot\sdir\swith\sthe\sfollowing\scontents:\r\n\r\n`package\sifneeded\swapp\s1.0\s[list\ssource\s[file\sjoin\s$dir\swapp.tcl]]`\r\n\r\n...\sand\smake\ssure\sthe\sroot\sdir\sis\sdirectly\sor\sindirectly\sin\s[auto_path](https://wiki.tcl-lang.org/page/auto_path),\swapp\swill\sact\sas\sa\snormal\sTcl\spackage.\r\n\r\nIf\syou\sput\sthe\s`pkgIndex.tcl`\sfile\sand\sthe\sfollowing\s`testwapp.tcl`\sfile\sinside\sthe\sroot\sdir:\r\n\r\n\s\s\s\slappend\sauto_path\s[file\sdirname\s[info\sscript]]\r\n\s\s\s\s\r\n\s\s\s\spackage\srequire\swapp\r\n\s\s\s\s\r\n\s\s\s\sproc\swapp-default\s{}\s{\r\n\s\s\s\s\s\swapp-subst\s{