summaryrefslogtreecommitdiffstats
path: root/doc/zipfs.n
diff options
context:
space:
mode:
authorTorsten <Torsten>2024-09-02 11:00:42 (GMT)
committerTorsten <Torsten>2024-09-02 11:00:42 (GMT)
commit5bd4eed982f50d4dfe8245b2312028a5f12826df (patch)
treed4b7dd8bf85c5f971f10471d536e77ef32635460 /doc/zipfs.n
parentcf8be2a4a6881ce0776abd08e4fafdd63d178523 (diff)
downloadtcl-5bd4eed982f50d4dfe8245b2312028a5f12826df.zip
tcl-5bd4eed982f50d4dfe8245b2312028a5f12826df.tar.gz
tcl-5bd4eed982f50d4dfe8245b2312028a5f12826df.tar.bz2
cherrypicked typos, errors and clarifications from the documentation-cleanup-for-transition branch (those marked as 'Fix:')
Diffstat (limited to 'doc/zipfs.n')
-rw-r--r--doc/zipfs.n17
1 files changed, 13 insertions, 4 deletions
diff --git a/doc/zipfs.n b/doc/zipfs.n
index 2cf00aa..b0189f6 100644
--- a/doc/zipfs.n
+++ b/doc/zipfs.n
@@ -185,12 +185,14 @@ stripped prefix) determines the later root name of the archive's content.
.
Creates an image (potentially a new executable file) similar to \fBzipfs
mkzip\fR; see that command for a description of most parameters to this
-command, as they behave identically here.
+command, as they behave identically here. If \fIoutfile\fR exists, it will
+be silently overwritten.
.RS
.PP
If the \fIinfile\fR parameter is specified, this file is prepended in front of
the ZIP archive, otherwise the file returned by \fBinfo nameofexecutable\fR
-(i.e., the executable file of the running process) is used. If the
+(i.e., the executable file of the running process,
+typically \fBwish\fR or \fBtclsh\fR) is used. If the
\fIpassword\fR parameter is not the empty string, an obfuscated version of that password
(see \fBzipfs mkkey\fR) is placed between the image and ZIP chunks of the
output file and the contents of the ZIP chunk are protected with that
@@ -289,6 +291,10 @@ set base [file join [\fBzipfs root\fR] myApp]
\fBzipfs mount\fR $zip $base $password
.CE
.PP
+The following example creates an executable application by appending a ZIP archive
+to the tclsh file it was called from and storing the resulting executable in
+the file
+.QW myApp.bin .
When creating an executable image with a password, the password is placed
within the executable in a shrouded form so that the application can read
files inside the embedded ZIP archive yet casual inspection cannot read it.
@@ -300,15 +306,18 @@ set password "hunter2"
# Create some simple content to define a basic application
file mkdir $appDir
-set f [open $appDir/main.tcl]
+set f [open $appDir/main.tcl w]
puts $f {
puts "Hi. This is [info script]"
}
close $f
-# Create the executable
+# Create the executable application
\fBzipfs mkimg\fR $img $appDir $appDir $password
+# remove the now obsolete temporary appDir folder
+file delete -force $appDir
+
# Launch the executable, printing its output to stdout
exec $img >@stdout
# prints the following line assuming [zipfs root] returns "//zipfs:/":