I have developed a cross-platform tcl script that includes a subdirectory that must be written with temporary files and that includes certain files by default. (The temporary files are used in order to add new resources files or for update the existing files).
The script works ok on Windows. However, it seems that in Linux this is not so simple (user rights issues) and another working directory must be configured outside the script directory. In that case it seems to involve some kind of "installation" since if you change the default working directory, the included files should be moved to this new location. Sorry if this sound silly but isn't possible in Linux just install the script (full) in a less restricted location ?.
How is this usually resolved using tcl tools?.
Thanks,
Configuring a path by what platform you are on is mostly just a matter of checking
$tcl_platform(platform). I would warn that your Windows code is probably just working by accident; it's a platform that can be quite thoroughly locked down too.If all you need is a temporary file, use
file tempfileand it will default to being made somewhere the current user can write. (The current beta of 9.0 also hasfile tempdir.)