Skip to content

Commit

Permalink
Fix TKPATH setting for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin D Smith committed Oct 12, 2017
1 parent 98c5462 commit 4bbf35c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions R/swat.R
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,13 @@
tryCatch(
{
library.dynam('rswat', pkg, lib)
if ( Sys.getenv('TKPATH') == '' &&
(file.exists(file.path(lib, pkg, 'libs', 'tkmk.so')) ||
file.exists(file.path(lib, pkg, 'libs', 'tkmk.dll'))) ) {
InitializeTK(file.path(lib, pkg, 'libs:'))
if ( Sys.getenv('TKPATH') == '' ) {
if ( file.exists(file.path(lib, pkg, 'libs', 'tkmk.so')) ) {
InitializeTK(file.path(lib, pkg, 'libs:'))
}
else if ( file.exists(file.path(lib, pkg, 'libs', 'tkmk.dll')) ) {
InitializeTK(file.path(lib, pkg, 'libs;'))
}
}
}
, error=function(e) {
Expand Down

0 comments on commit 4bbf35c

Please sign in to comment.