#!/usr/local/bin/steal-wish -f

global auto_path
set libraryPath ""
set searchList ""
lappend searchList "."
lappend searchList ".."
lappend searchList "../library"
foreach dirName $auto_path {
  lappend searchList $dirName
}
foreach dirName $searchList {
  if {[file exists $dirName/tkGS.tcl]} {
    set libraryPath $dirName
  } {
    if {[file exists $dirName/TkSteal/tkGS.tcl]} {
      set libraryPath $dirName/TkSteal
    } {
      if {[file exists [file dirname $dirName]/TkSteal/tkGS.tcl]} {
        set libraryPath [file dirname $dirName]/TkSteal
      }
    }
  }
}
lappend auto_path $libraryPath
source $libraryPath/tkGS.tcl

if {$tkVersion >= 3.3} {
  button .q -text Quit -command {exit 0}
} {
  button .q -text Quit -command {catch "destroy ."; catch "exit 0"}
}
tkgs .f -file test.ps -width 200 -height 200 -bbox {37 652 149 758}
pack append . .f {top fill expand} .q {top}
wm maxsize . 1000 1000

# eof

