mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 05:50:32 +05:00
Search for ngsolve.tcl in PATH (after NETGENDIR)
This commit is contained in:
parent
dbee019adf
commit
e68333ee00
17
ng/ng.tcl
17
ng/ng.tcl
@ -269,7 +269,22 @@ if { $stereo == "defined" } {
|
||||
}
|
||||
|
||||
|
||||
catch { source ${ngdir}/ngsolve.tcl }
|
||||
set ngsolve_loaded 0
|
||||
catch {
|
||||
source ${ngdir}/ngsolve.tcl;
|
||||
set ngsolve_loaded 1
|
||||
}
|
||||
|
||||
# try to find ngsolve.tcl in PATH
|
||||
set pathlist [split $::env(PATH) \ [expr {$::tcl_platform(platform) == "windows" ? ";" : ":"}]]
|
||||
foreach dir $pathlist {
|
||||
if { $ngsolve_loaded != 1 } {
|
||||
catch {
|
||||
source ${dir}/ngsolve.tcl
|
||||
set ngsolve_loaded 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
set scriptfilename [Ng_GetCommandLineParameter script]
|
||||
|
@ -5948,7 +5948,20 @@ const char * ngscript[] = {""
|
||||
,"Ng_SetVisParameters;\n"
|
||||
,"redraw\n"
|
||||
,"}\n"
|
||||
,"catch { source ${ngdir}/ngsolve.tcl }\n"
|
||||
,"set ngsolve_loaded 0\n"
|
||||
,"catch {\n"
|
||||
,"source ${ngdir}/ngsolve.tcl;\n"
|
||||
,"set ngsolve_loaded 1\n"
|
||||
,"}\n"
|
||||
,"set pathlist [split $::env(PATH) \\ [expr {$::tcl_platform(platform) == \"windows\" ? \";\" : \":\"}]]\n"
|
||||
,"foreach dir $pathlist {\n"
|
||||
,"if { $ngsolve_loaded != 1 } {\n"
|
||||
,"catch {\n"
|
||||
,"source ${dir}/ngsolve.tcl\n"
|
||||
,"set ngsolve_loaded 1\n"
|
||||
,"}\n"
|
||||
,"}\n"
|
||||
,"}\n"
|
||||
,"set scriptfilename [Ng_GetCommandLineParameter script]\n"
|
||||
,"if { $scriptfilename != \"undefined\" } {\n"
|
||||
,"if { [catch { source $scriptfilename } errstring] == 1 } {\n"
|
||||
|
Loading…
Reference in New Issue
Block a user