©2003 Kåre Sjölander and Jonas Beskow
Introduction Download Documentation Links Forum
WaveSurfer user forum

FAQ  FAQ
Search  Search
Memberlist  Memberlist
Register  Register
Profile  Profile
Login  Login

WSPLUGINDIR and windows

 
Post new topic   Reply to topic    www.speech.kth.se/wavesurfer Forum Index -> WaveSurfer
View previous topic :: View next topic  
Author Message
edouard
Guest





PostPosted: Wed Jul 09, 2003 9:41 am    Post subject: WSPLUGINDIR and windows Reply with quote

the way WSPLUGINDIR environment variable is handled is not portable, wsurf assumes a colon separated list of directories (unix behavior) but on windows it is a semi-colon separated list and besides colon is used after drive letter. I suggest rewrite wsurf::GetLocalPlugins function that way :
Code:
proc wsurf::GetLocalPlugins {} {
variable Info

set res {}
if {[info exists ::env(WSPLUGINDIR)]} {
  if {[string match unix $::tcl_platform(platform)]} {
   set dirs [split $::env(WSPLUGINDIR) :]
  } elseif {[string match windows $::tcl_platform(platform)]} {
   set dirs [split $::env(WSPLUGINDIR) ;]
  } else {
   set dirs [split $::env(WSPLUGINDIR) :]
  }   
  foreach dir $dirs {
   set res [concat $res [glob -nocomplain [file join $dir *.plug]]]
  }
}

return $res
}
Back to top
edouard
Guest





PostPosted: Wed Aug 27, 2003 4:52 pm    Post subject: Re: WSPLUGINDIR and windows Reply with quote

same thing for WSCONFIGDIR :

Code:
proc wsurf::GetLocalConfigurations {} {
variable Info

set res {}
if {[info exists ::env(WSCONFIGDIR)]} {
  if {[string match unix $::tcl_platform(platform)]} {
   set dirs [split $::env(WSCONFIGDIR) :]
  } elseif {[string match windows $::tcl_platform(platform)]} {
   set dirs [split $::env(WSCONFIGDIR) ;]
  } else {
   set dirs [split $::env(WSCONFIGDIR) :]
  }   
  foreach dir $dirs {
   set res [concat $res [glob -nocomplain [file join $dir *.conf]]]
  }
}

return $res
}
Back to top
kare



Joined: 16 Aug 2002
Posts: 371
Location: KTH, Centre for Speech Technology

PostPosted: Thu Aug 28, 2003 10:43 am    Post subject: Reply with quote

Thanks for the fixes!, I've included them in the upcoming release.

Kåre
Back to top
View users profile Send private message Visit posters website
Display posts from previous:   
Post new topic   Reply to topic    www.speech.kth.se/wavesurfer Forum Index -> WaveSurfer All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2.0.1 © 2001, 2002 phpBB Group