Index: installer.tcl
==================================================================
--- installer.tcl
+++ installer.tcl
@@ -293,12 +293,16 @@
 	if {[string match [info nameofexecutable]* [info library]]} {
 	    # Starkit
 	    set libdir [file join [file dirname [file dirname [info nameofexecutable]]] lib]
 	} else {
 	    # Unwrapped.
-	    if {[catch {set libdir [lindex $::tcl_pkgPath end]}]} {
-		set libdir [file dirname [info library]]
+	    foreach path $::auto_path {
+		if {[string match "^//zipfs:" $path]} {
+		    continue
+		}
+		set libdir $path
+		break
 	    }
 	}
 
 	set basedir [file dirname $libdir]
 	set bindir  [file join $basedir bin]

