$NetBSD: patch-ab,v 1.2 2003/01/11 23:04:12 jlam Exp $ --- pgaccess.tcl.orig Sun Dec 1 19:57:56 2002 +++ pgaccess.tcl @@ -12,5 +12,5 @@ fi # the next line restarts using wish \ -exec wish "$0" "$@" +exec @PGTKSH@ "$0" "$@" #------------------------------------------------------------ @@ -34,19 +34,12 @@ switch $tcl_platform(platform) { puts $fid "" - puts $fid "# path to libpgtcl" - if {![info exists env(PGLIB)]} { - set env(PGLIB) "/usr/lib" - } - puts $fid "PGLIB=$env(PGLIB)" - puts $fid "" - puts $fid "# pgaccess home directory" if {![info exists env(PGACCESS_HOME)]} { - set env(PGACCESS_HOME) "/usr/lib/pgaccess" + set env(PGACCESS_HOME) "@PGACCESS_HOME@" } puts $fid "PGACCESS_HOME=$env(PGACCESS_HOME)" puts $fid "" - puts $fid "export PGLIB PGACCESS_HOME" + puts $fid "export PGACCESS_HOME" close $fid puts "done" @@ -299,32 +292,4 @@ global PgAcVar CurrentDB proc {main} {argc argv} { global PgAcVar CurrentDB tcl_platform env - if {[info exists env(PGLIB)]} { - set libpgtclpath [file join $env(PGLIB) libpgtcl] - } else { - puts "PGLIB enviroment variable is not set, setting it to 'libpgtcl'." - set libpgtclpath {libpgtcl} - } - - set shlib ${libpgtclpath}[info sharedlibextension] - - if {![file exists $shlib]} { - puts "\nError: Shared library file: '$shlib' does not exist. \n\ - Check this file, or check PGLIB variable (in pgaccessrc)\n" - - exit - } - - if {[catch {load $shlib} err]} { - puts "Error: can not load $shlib shared library." - puts "You need to make sure that the library exists and" - puts "the environment variable PGLIB points to the directory" - puts "where it is located.\n" - puts "If you use Windows, be sure that the needed libpgtcl.dll" - puts "and libpq.dll files are copied in the Windows/System" - puts "directory" - puts "\nERROR MESSAGE: $err\n" - exit - } - set tdb "" set thost ""